Conversation
Adds an optional provider parameter to the text_to_speech tool that lets the model select a TTS provider per-call instead of always using the globally configured tts.provider. When provider is set, it bypasses the configured default and routes directly to the specified backend. When omitted (the default), the tool behaves exactly as before. Closes NousResearch#47459
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the focused implementation. The current-main premise is real: text_to_speech_tool() still takes its provider solely from tts.provider at tools/tts_tool.py:2177-2178.
Problems
- This changes an explicit current contract.
tools/tts_tool.py:2160-2161says the model sends text while the user configures provider, and the exposed schema attools/tts_tool.py:2844says provider is “not model-selected.” A maintainer decision is needed before adding a model-controlled override. - The proposed override is not validated. An unrecognized value reaches the existing Edge fallback at
tools/tts_tool.py:2357-2378, so a typo would not use the selected provider. - The PR changes only
tools/tts_tool.pyand includes no regression coverage for override/default/invalid-provider routing.
Suggested changes
- Confirm the intended provider-selection contract first. If it is approved, reject unknown or unavailable override values and add routing tests for built-ins, command providers, plugins, and the default fallback.
Automated hermes-sweeper review.
| def text_to_speech_tool( | ||
| text: str, | ||
| output_path: Optional[str] = None, | ||
| provider: Optional[str] = None, |
There was a problem hiding this comment.
This makes provider selection model-controlled, but the current tool contract says the user configures provider and the schema says it is not model-selected. Please obtain an explicit maintainer decision before exposing this parameter.
|
Merged into main via consolidated salvage PR #73513 (merge Your contribution is credited to you in git history. Thank you! Closing this PR as merged-via-salvage. |
Summary
Adds an optional
providerparameter to thetext_to_speechtool that lets the model select a TTS provider per-call instead of always using the globally configuredtts.provider.Motivation
Currently,
text_to_speechreadstts.providerfrom~/.hermes/config.yaml. If a user configures Edge TTS as default but an agent task needs ElevenLabs for a specific call, there's no way to do that without changing global config mid-conversation.This is a common need:
Changes
tools/tts_tool.py:provider: Optional[str] = Noneparameter totext_to_speech_tool()provideris set, it bypasses the configured default and routes directly to the specified backendedge,openai,elevenlabs,minimax,xai,mistral,gemini,neutts,kittentts,piper), user-declared command provider names, or plugin-registered namesTTS_SCHEMA) to include the new parameterWhen
provideris omitted (the default), behavior is unchanged — reads fromtts.providerin config.yaml.Backward Compatibility
providerdefaults toNone_voice_speak_response) is unaffectedTesting
ast.parse()passesinspect.signature()shows['text', 'output_path', 'provider']text=andoutput_path=keyword argsCloses #47459