Skip to content

feat(tts): allow per-call provider override - #60059

Closed
0xAdamFortuna wants to merge 1 commit into
NousResearch:mainfrom
0xAdamFortuna:adam/tts-provider-override
Closed

0xAdamFortuna wants to merge 1 commit into
NousResearch:mainfrom
0xAdamFortuna:adam/tts-provider-override

Conversation

@0xAdamFortuna

Copy link
Copy Markdown
Contributor

Summary

  • Allows text_to_speech callers to override the configured TTS provider for one request.

Test Plan

  • uv run --python 3.11 --with pytest --with pytest-asyncio --with pytest-xdist python -m pytest -q -o 'addopts=' tests/tools/test_tts_command_providers.py::TestTextToSpeechToolWithCommandProvider

Notes

  • Split from a local Hermes patch queue branch based on current upstream/main.
  • Draft PR so maintainers can review the generic seam independently.

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have tool/tts Text-to-speech and transcription labels Jul 7, 2026
Allow text_to_speech callers to override the configured provider for a single request without changing global configuration.
@0xAdamFortuna
0xAdamFortuna force-pushed the adam/tts-provider-override branch from d7e766f to 6dc7f38 Compare July 7, 2026 09:33

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for splitting out the TTS work. The new seam is not yet reachable from an actual Hermes TTS invocation.

Problems

  • tools/tts_tool.py:2284 adds provider_override, but the registered tool schema still accepts only text and output_path (tools/tts_tool.py:2999-3015), and the handler forwards only those fields (tools/tts_tool.py:3022-3024). The new test covers a direct helper call, not the tool path.
  • No existing system-owned caller uses the override: gateway auto-TTS still invokes the helper without it in gateway/platforms/base.py:5025-5027 and gateway/run.py:13309-13311.

Suggested changes

  • Wire a named existing internal consumer that requires this selection and test that end-to-end, or remove the unused seam.
  • Keep provider selection out of the model schema unless its documented user-configured ownership (tools/tts_tool.py:3001) is intentionally changed.

Automated hermes-sweeper review.

Comment thread tools/tts_tool.py
def text_to_speech_tool(
text: str,
output_path: Optional[str] = None,
provider_override: Optional[str] = None,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

provider_override is not forwarded by the registered text_to_speech handler, whose current schema exposes only text and output_path (tools/tts_tool.py:2999-3024); no in-tree caller passes this argument either. Please wire a concrete system-owned consumer and test that path, or avoid adding an unused seam.

@teknium1

Copy link
Copy Markdown
Collaborator

The per-call provider override landed in #73513 via @Cdddo's #47462, which was earlier and schema-exposed (matching the ask in #47459); your internal-only provider_override covered the same routing. Thanks for the contribution!

(Landed via #73513, merge 4aac89b429.) Closing.

@teknium1 teknium1 closed this Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users tool/tts Text-to-speech and transcription type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants