You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Config loading hard-fails on unknown text_to_speech.engine even when TTS is disabled #1141
Config loading exits with code 1 when ~/.infer/config.yaml contains a text_to_speech.engine value the running binary does not know - even though text_to_speech.enabled is false. The gateway engine was introduced in 0.186.0 (#1136), so a config written by 0.186.0 bricks every older binary that shares the same ~/.infer/config.yaml. Hit in practice with the desktop app: its bundled CLI (0.185.0) shared the config with a 0.186.0 dev-shell CLI and could no longer start any session.
Observe: ERROR Loading config: invalid text_to_speech.engine "gateway": only "qwen3-tts" is supported. and exit code 1
Expected Behavior
Validation of a feature's sub-fields is skipped (or downgraded to a warning) when the feature is disabled. A config key only understood by a newer version should not make config loading fatal for the whole process.
Actual Behavior
The process refuses to load the config and exits with code 1, taking down every consumer of the shared config - including the desktop app, which can no longer start sessions at all.
changed the title [-]Config loading hard-fails on unknown text_to_speech.engine even when TTS is disabled[/-][+][BUG] Config loading hard-fails on unknown text_to_speech.engine even when TTS is disabled[/+]on Sep 1, 2026
Fixed and ready for review: PR #1142 (#1142), branch fix/issue-1141, commit 1f8ee7d.
What changed
The root cause was a single spot: Config.Validate() in config/config.go validated the text_to_speech engine/model switch unconditionally, and it's the only engine-validation site on the config-load path (the runtime tool path never engages while TTS is off, and no other code validates the engine).
config/config.go - wrapped the text_to_speech engine/model validation in if c.TextToSpeech.Enabled. A disabled TTS never consults its engine, so an unknown engine written by a newer binary sharing ~/.infer/config.yaml (the desktop-app scenario from the issue) no longer makes config loading exit 1. When the feature is enabled, unknown engines and malformed gateway models still fail fast as before.
config/text_to_speech_test.go - new table test "unknown engine or bad model is ignored when disabled" (gateway engine from a newer binary, unknown engine piper, bad gateway model q8); the existing rejection tests now opt in with Enabled = true since rejection only applies to an enabled feature.
Verification
go test -tags purego ./config/ -run TestValidateTextToSpeechEngine -v: all pass, including the three new disabled cases.
go vet -tags purego on touched packages: pass. Pre-commit hooks (mod tidy, fmt, import aliases, golangci-lint, markdownlint) all passed on the commit; tree is clean and pushed.
Note: TestPointerDefaultsSurviveWithoutEnvOverride / TestPointerOptionPrecedence in cmd/runtime fail in this Actions-runner sandbox identically to main (pre-existing environmental failure around require_approval pointer defaults, unrelated to this change).
Skipped a "downgrade to warning" path - a disabled feature's unknown key is inert, so silently tolerating it is the smaller correct behavior; warnings would need a logging channel config load doesn't have today.
Activity
[-]Config loading hard-fails on unknown text_to_speech.engine even when TTS is disabled[/-][+][BUG] Config loading hard-fails on unknown text_to_speech.engine even when TTS is disabled[/+]edenreich commentedon Sep 1, 2026
@infer Can you fix this? use /cobra-viper /go /ponytail:ponytail
inference-gateway-maintainer commentedon Sep 1, 2026
Model:
ollama_cloud/glm-5.3-flash· View JobTodos
Pull Request
#1142
✅ Infer Result: Success
Fixed and ready for review: PR #1142 (#1142), branch
fix/issue-1141, commit1f8ee7d.What changed
The root cause was a single spot:
Config.Validate()inconfig/config.govalidated thetext_to_speechengine/model switch unconditionally, and it's the only engine-validation site on the config-load path (the runtime tool path never engages while TTS is off, and no other code validates the engine).config/config.go- wrapped thetext_to_speechengine/model validation inif c.TextToSpeech.Enabled. A disabled TTS never consults its engine, so an unknown engine written by a newer binary sharing~/.infer/config.yaml(the desktop-app scenario from the issue) no longer makes config loading exit 1. When the feature is enabled, unknown engines and malformed gateway models still fail fast as before.config/text_to_speech_test.go- new table test "unknown engine or bad model is ignored when disabled" (gateway engine from a newer binary, unknown enginepiper, bad gateway modelq8); the existing rejection tests now opt in withEnabled = truesince rejection only applies to an enabled feature.Verification
go test -tags purego ./config/ -run TestValidateTextToSpeechEngine -v: all pass, including the three new disabled cases.go vet -tags puregoon touched packages: pass. Pre-commit hooks (mod tidy, fmt, import aliases, golangci-lint, markdownlint) all passed on the commit; tree is clean and pushed.TestPointerDefaultsSurviveWithoutEnvOverride/TestPointerOptionPrecedenceincmd/runtimefail in this Actions-runner sandbox identically to main (pre-existing environmental failure aroundrequire_approvalpointer defaults, unrelated to this change).Housekeeping
[DOCS]ticket filed for the conditional-validation note: [DOCS] note that disabled text_to_speech skips engine and model validation docs#630.Skipped a "downgrade to warning" path - a disabled feature's unknown key is inert, so silently tolerating it is the smaller correct behavior; warnings would need a logging channel config load doesn't have today.
Model:
ollama_cloud/glm-5.3-flash· Exit Code:0· Duration: 5m 7sTokens: 1,877,493 in · 15,868 out · 1,893,361 total (33 requests)
Tool calls: 54 total · 100% success rate
Traces
Stats
Triggered by edenreich · Infer Action · OSS
fix(config): skip text_to_speech engine validation when disabled (#1142)
inference-gateway-releaser commentedon Sep 1, 2026
🎉 This issue has been resolved in version 0.186.1 🎉
The release is available on:
Your semantic-release bot 📦🚀