Skip to content

fix: surface command STT fallback usage - #50564

Open
Mushy-Snugglebites-badonkadonk wants to merge 4 commits into
NousResearch:mainfrom
Mushy-Snugglebites-badonkadonk:fix/command-stt-visible-fallback
Open

fix: surface command STT fallback usage#50564
Mushy-Snugglebites-badonkadonk wants to merge 4 commits into
NousResearch:mainfrom
Mushy-Snugglebites-badonkadonk:fix/command-stt-visible-fallback

Conversation

@Mushy-Snugglebites-badonkadonk

@Mushy-Snugglebites-badonkadonk Mushy-Snugglebites-badonkadonk commented Jun 22, 2026

Copy link
Copy Markdown

Summary

  • Allows command STT providers to fall back to local/faster-whisper when fallback_provider: local (or fallback: local) is configured.
  • Keeps stt.local: null safe and resolves the fallback through its own local-model configuration instead of leaking a command-provider model override.
  • Preserves the originating provider in structured fallback metadata and surfaces a concise transcript-echo warning across normal, pending-voice, and pending-clarify paths without placing raw command failures or metadata in LLM-visible or durable conversation context.
  • Documents the command-provider fallback settings.

Validation

Rebased onto main at 2b618fe7e5c31ea62a167a40b3b72c52a88047b2 and verified with focused coverage for command-provider fallback, explicit-null local config, model-override isolation, fresh/pending transcript echoes, and raw clarify replies:

uv run --frozen --with pytest --with pytest-asyncio pytest -q \
  tests/tools/test_transcription_tools.py::TestTranscribeAudioDispatch::test_command_provider_falls_back_to_local_when_configured \
  tests/tools/test_transcription_tools.py::TestTranscribeAudioDispatch::test_command_provider_local_fallback_accepts_null_local_config \
  tests/tools/test_transcription_tools.py::TestTranscribeAudioDispatch::test_command_provider_model_override_does_not_leak_into_local_fallback \
  tests/tools/test_transcription_tools.py::TestTranscribeAudioDispatch::test_command_provider_returns_original_failure_without_fallback \
  tests/gateway/test_stt_config.py
12 passed

uv run --frozen --with ruff ruff check gateway/run.py tools/transcription_tools.py tests/gateway/test_stt_config.py tests/tools/test_transcription_tools.py
All checks passed!

git diff --check also passes. The full transcription-tools file has one unrelated Apple Silicon expectation failure that reproduces unchanged on the rebased main commit; the focused PR coverage above is green.

AI assistance disclosure

This PR was prepared with AI assistance under human direction and reviewed/tested locally before submission.

@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery tool/tts Text-to-speech and transcription P3 Low — cosmetic, nice to have labels Jun 22, 2026
@Mushy-Snugglebites-badonkadonk
Mushy-Snugglebites-badonkadonk force-pushed the fix/command-stt-visible-fallback branch from edd77a6 to fc5efdf Compare July 10, 2026 23:07

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for addressing a verified gap: current main returns a command-provider failure directly at tools/transcription_tools.py:1703-1711, so the configured local fallback is not currently reachable.

Problems

  • The added local_cfg = stt_config.get("local", {}) can be None when config contains stt.local: null; the following .get() then raises. Current native local dispatch uses stt_config.get("local") or {} at tools/transcription_tools.py:1660, following the null-subsection fix in 3a394210.
  • fallback_provider / fallback is new user-facing command-provider configuration, but website/docs/user-guide/features/tts.md:546-553 does not document either key.

Suggested changes

  • Use the existing or {} guard and add a null-stt.local regression test for this fallback path.
  • Add the fallback setting and semantics to the STT command-provider docs.

Automated hermes-sweeper review.

Comment thread tools/transcription_tools.py
@teknium1 teknium1 added sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 15, 2026
@Mushy-Snugglebites-badonkadonk
Mushy-Snugglebites-badonkadonk force-pushed the fix/command-stt-visible-fallback branch from fc5efdf to 763189c Compare July 19, 2026 02:49
@teknium1 teknium1 added the area/usage-cost Token accounting, usage reporting, billing, cost tracking label Jul 19, 2026
@Mushy-Snugglebites-badonkadonk
Mushy-Snugglebites-badonkadonk force-pushed the fix/command-stt-visible-fallback branch from 763189c to 32c75db Compare July 21, 2026 13:37
@Mushy-Snugglebites-badonkadonk
Mushy-Snugglebites-badonkadonk force-pushed the fix/command-stt-visible-fallback branch from 32c75db to 3837b79 Compare July 29, 2026 20:10
@andrexibiza

Copy link
Copy Markdown
Contributor

Verified against current main (70db671fac) as part of the Vox Lockin provider-registry lane. Not salvageable within lane 05's scope; no duplicate opened.

Findings:

  • Merge conflicts with main in 3 files: gateway/run.py, tests/gateway/test_stt_config.py, tests/tools/test_transcription_tools.py (git merge-tree --write-tree origin/main pr-50564 exit 1, content conflicts). The branch needs a rebase.
  • File ownership: the PR touches gateway/run.py and website/docs/user-guide/features/tts.md, which are outside lane 05's provider-registry ownership (gateway media/delivery behavior is lane 07 territory per the Vox Lockin manifest). Its core subject — surfacing command-STT fallback usage in gateway clarify replies — is a gateway-behavior class, not the lazy-install registry class.
  • The hermes-sweeper review's two gaps stand and are worth fixing in a rebased revision: the added stt_config.get("local", {}) should use the or {} null-guard (per the local: null / edge: null in config.yaml crashes STT/TTS with 'NoneType' object has no attribute 'get' #47318 pattern at transcription_tools.py:1660), and the new fallback_provider config keys need docs in tts.md.

Recommendation: rebase onto main, apply the two review fixes, and re-request review. Lane 05's class (piper registry parity, probe install-safety, null-config guards) ships separately in #78202.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/usage-cost Token accounting, usage reporting, billing, cost tracking comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages tool/tts Text-to-speech and transcription type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants