Skip to content

fix(tts): wire dashboard tts.timeout_ms through ApplySystemConfigs + seed#1176

Merged
mrgoonie merged 1 commit into
nextlevelbuilder:devfrom
dataplanelabs:upstream-fix/tts-timeout-wire
Jun 15, 2026
Merged

fix(tts): wire dashboard tts.timeout_ms through ApplySystemConfigs + seed#1176
mrgoonie merged 1 commit into
nextlevelbuilder:devfrom
dataplanelabs:upstream-fix/tts-timeout-wire

Conversation

@vanducng

Copy link
Copy Markdown
Contributor

Bug

`ApplySystemConfigs` and `seedConfigForContext` both handle `tts.provider`, `tts.auto`, `tts.mode`, `tts.max_length` — but neither carries `tts.timeout_ms`. Result: the dashboard /tts page Timeout (ms) input is inert; `cfg.Tts.TimeoutMs` stays at config.json default; `setupTTS` passes 0 to provider constructors; each provider falls back to its hardcoded default (Edge = 30s).

Real-world impact

Tenant configures Timeout=300000 (5 min) on the dashboard for long-form TTS. Saves. Trace still shows `tts failed: edge-tts failed: signal: killed` at exactly 30s. The dashboard value never reached the provider.

Fix

Two-line addition mirroring the existing pattern for the other `tts.*` keys:

  • `internal/config/config_system.go`: `integer("tts.timeout_ms", &c.Tts.TimeoutMs)`
  • `cmd/gateway_system_config_sync.go`: `setInt("tts.timeout_ms", cfg.Tts.TimeoutMs)`

Hot-reload (`tts-config-reload` subscriber in lifecycle) re-builds the manager + Edge provider, so the dashboard change now propagates without restart.

Test plan

  • `go build ./...` + `-tags sqliteonly` + `go vet` green
  • Manual: dashboard set Timeout (ms) = 300000 → save → trigger long-form TTS → edge-tts succeeds within the 300s window

…seed

ApplySystemConfigs and seedConfigForContext both handle tts.provider,
tts.auto, tts.mode, tts.max_length — but neither carries tts.timeout_ms.
Result: the dashboard /tts page Timeout (ms) input is inert; cfg.Tts.TimeoutMs
stays at config.json default; setupTTS passes 0 to provider constructors;
each provider falls back to its hardcoded default (e.g. edge = 30s).

Two-line fix to mirror the existing pattern for the other tts.* keys.
@mrgoonie

Copy link
Copy Markdown
Contributor

Backlog review: merge-candidate. This is a two-line config wiring fix for tts.timeout_ms through system_configs seed/apply, with go and web checks passing. It pairs well with #1175; either merge together or after #1175, but this PR itself is small and low-risk.

@mrgoonie

Copy link
Copy Markdown
Contributor

review-pr --fix --reply result

Verdict: Approve.

Summary: This PR wires tts.timeout_ms through both ApplySystemConfigs and system config seeding, matching the existing tts.provider, tts.auto, tts.mode, and tts.max_length pattern.

Iterations: 1 review/verify loop, 0 fix commits.
Findings: No critical or important findings.
Merge/conflict state: GitHub reports CLEAN.
CI state: Existing PR checks are green (go, web).

Local verification run:

  • go test ./internal/config ./cmd
  • go build ./...
  • go vet ./...
  • go build -tags sqliteonly ./...

Unresolved blockers/questions: none.

@mrgoonie mrgoonie merged commit 00c2563 into nextlevelbuilder:dev Jun 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants