fix(gateway): route voice media through send_voice in background tasks#12368
Open
jjjojoj wants to merge 4 commits into
Open
fix(gateway): route voice media through send_voice in background tasks#12368jjjojoj wants to merge 4 commits into
jjjojoj wants to merge 4 commits into
Conversation
…esearch#12175) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ousResearch#12176) 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.
Collaborator
This was referenced Apr 23, 2026
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
Fixes #12064
_run_background_task()unpacked the(path, is_voice)tuple fromextract_media()but discarded theis_voiceflag, sending all audio files viasend_document(). Audio files with[[audio_as_voice]]were not rendered as voice messages in background task responses.Changes
_is_voiceflag in the media delivery loopsend_voice()when the adapter supports it, matching the main delivery path behavior inbase.py:1855-1875send_document()for non-voice media or adapters withoutsend_voiceTest plan
[[audio_as_voice]] MEDIA:/path/to/audio.oggsends viasend_voicesend_documentsend_voicemethod fall back gracefullypy_compileverified