Conversation
This was referenced May 15, 2026
Contributor
Author
|
Thanks @NishantEC for the review! Appreciate the approval on the TTS config fix. 🙏 |
…v vars
_resolve_openai_audio_client_config was env-only: it read
VOICE_TOOLS_OPENAI_KEY/OPENAI_API_KEY and returned DEFAULT_OPENAI_BASE_URL,
ignoring tts.openai.api_key and tts.openai.base_url from config.yaml.
Mirror the STT resolver order (config → env → managed gateway):
1. tts.openai.api_key/base_url from config.yaml
2. VOICE_TOOLS_OPENAI_KEY / OPENAI_API_KEY env vars
3. Managed OpenAI audio gateway (with prefers_gateway("tts") check)
Also preserves config base_url in the env-var fallback path (previously
used hardcoded DEFAULT_OPENAI_BASE_URL even when cfg_base_url was set).
Closes NousResearch#26175
zccyman
force-pushed
the
fix/tts-openai-config-read-26175
branch
from
May 18, 2026 00:32
b906130 to
91ae77a
Compare
Collaborator
|
Thanks for targeting the config-only OpenAI TTS path. The premise is confirmed on current main: Problems
Suggested changes
Automated hermes-sweeper review. |
teknium1
pushed a commit
that referenced
this pull request
Jul 28, 2026
Salvaged from PR #26233 (@LeonSGP43), rebased onto the current 3-tuple _resolve_openai_audio_client_config (is_managed flag, post-#73072 layout). Same fix independently submitted earlier in PR #26209 (@zccyman) — credit to both. Resolution order now mirrors the STT resolver: tts.openai.api_key/base_url from config.yaml -> VOICE_TOOLS_OPENAI_KEY/OPENAI_API_KEY env (still honoring config base_url) -> managed gateway. _has_openai_audio_backend also counts a config api_key as an available backend. Fixes #26175
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
Salvaged from PR NousResearch#26233 (@LeonSGP43), rebased onto the current 3-tuple _resolve_openai_audio_client_config (is_managed flag, post-NousResearch#73072 layout). Same fix independently submitted earlier in PR NousResearch#26209 (@zccyman) — credit to both. Resolution order now mirrors the STT resolver: tts.openai.api_key/base_url from config.yaml -> VOICE_TOOLS_OPENAI_KEY/OPENAI_API_KEY env (still honoring config base_url) -> managed gateway. _has_openai_audio_backend also counts a config api_key as an available backend. Fixes NousResearch#26175
prmartinow
pushed a commit
to prmartinow/hermes-agent
that referenced
this pull request
Aug 26, 2026
Salvaged from PR NousResearch#26233 (@LeonSGP43), rebased onto the current 3-tuple _resolve_openai_audio_client_config (is_managed flag, post-NousResearch#73072 layout). Same fix independently submitted earlier in PR NousResearch#26209 (@zccyman) — credit to both. Resolution order now mirrors the STT resolver: tts.openai.api_key/base_url from config.yaml -> VOICE_TOOLS_OPENAI_KEY/OPENAI_API_KEY env (still honoring config base_url) -> managed gateway. _has_openai_audio_backend also counts a config api_key as an available backend. Fixes NousResearch#26175
melon-xf
added a commit
to melon-xf/hermes-agent
that referenced
this pull request
Sep 3, 2026
Salvaged from PR NousResearch#26233 (@LeonSGP43), rebased onto the current 3-tuple _resolve_openai_audio_client_config (is_managed flag, post-NousResearch#73072 layout). Same fix independently submitted earlier in PR NousResearch#26209 (@zccyman) — credit to both. Resolution order now mirrors the STT resolver: tts.openai.api_key/base_url from config.yaml -> VOICE_TOOLS_OPENAI_KEY/OPENAI_API_KEY env (still honoring config base_url) -> managed gateway. _has_openai_audio_backend also counts a config api_key as an available backend. Fixes NousResearch#26175
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_resolve_openai_audio_client_config()was env-only — it readVOICE_TOOLS_OPENAI_KEY/OPENAI_API_KEYand always returnedDEFAULT_OPENAI_BASE_URL, ignoringtts.openai.api_keyandtts.openai.base_urlfromconfig.yaml.Closes #26175
Problem
Users pointing TTS at a self-hosted or local OpenAI-compatible endpoint (llama.cpp, qwen3-tts, Ollama, etc.) either need a placeholder env var (and still cannot redirect the host) or get no audio at all — even with a fully-populated
tts.openaiconfig block.Solution
Mirror the STT resolver order used in
transcription_tools.py::_resolve_openai_audio_client_config:tts.openai.api_key+tts.openai.base_urlfromconfig.yamlvia existing_load_tts_config()resolve_openai_audio_api_key()fallback (now also respectscfg_base_urlinstead of hardcodingDEFAULT_OPENAI_BASE_URL)prefers_gateway("tts")checkPreserves the existing
tts.use_gatewaypreference — when set, the managed gateway is preferred even if credentials exist.Updated the error message to mention config as well: "Neither tts.openai.api_key in config nor VOICE_TOOLS_OPENAI_KEY/OPENAI_API_KEY is set"
Files Changed
tools/tts_tool.py_resolve_openai_audio_client_config()Test Results
Design Decisions
_load_tts_config()helper (was already defined but unused by this function)base_urlis also respected from the env-var fallback path, unlike the previous code which hardcodedDEFAULT_OPENAI_BASE_URLprefers_gateway("tts")check is preserved on both config and env-var paths