Skip to content

fix(gateway): route voice media through send_voice in background tasks#12368

Open
jjjojoj wants to merge 4 commits into
NousResearch:mainfrom
jjjojoj:fix/bg-task-voice-routing-12064
Open

fix(gateway): route voice media through send_voice in background tasks#12368
jjjojoj wants to merge 4 commits into
NousResearch:mainfrom
jjjojoj:fix/bg-task-voice-routing-12064

Conversation

@jjjojoj

@jjjojoj jjjojoj commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #12064

_run_background_task() unpacked the (path, is_voice) tuple from extract_media() but discarded the is_voice flag, sending all audio files via send_document(). Audio files with [[audio_as_voice]] were not rendered as voice messages in background task responses.

Changes

  • Check _is_voice flag in the media delivery loop
  • Route voice files through send_voice() when the adapter supports it, matching the main delivery path behavior in base.py:1855-1875
  • Fall back to send_document() for non-voice media or adapters without send_voice

Test plan

  • Background task response with [[audio_as_voice]] MEDIA:/path/to/audio.ogg sends via send_voice
  • Non-voice media (images, documents) still goes through send_document
  • Adapters without send_voice method fall back gracefully
  • py_compile verified

jjjojoj and others added 4 commits April 18, 2026 22:51
…esearch#12175)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…2294)

build_skills_system_prompt() loaded disabled set AFTER the cache check,
so config changes to skills.disabled silently had no effect until restart.
Move get_disabled_skill_names() before cache check and add sorted disabled
tuple to cache key so any change invalidates the cache.
NousResearch#12064)

Background task media delivery unpacked the (path, is_voice) tuple but
discarded the is_voice flag, sending all audio via send_document. Now
routes voice files through send_voice() when the adapter supports it.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery tool/tts Text-to-speech and transcription labels Apr 23, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Competing fix with #12172 and #12091 for #12064 — all address background task voice routing.

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

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists 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.

Background task media delivery passes extract_media tuples into send_document()

2 participants