Skip to content

fix: route background-task media responses by type#12172

Open
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/background-task-media-tuples-12064
Open

fix: route background-task media responses by type#12172
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/background-task-media-tuples-12064

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • route background-task MEDIA outputs by file type instead of sending every extracted media path through the document path
  • preserve the voice-media behavior for [[audio_as_voice]] responses so background tasks send audio replies through send_voice()
  • add a regression test that exercises a background task response containing a voice MEDIA tag

This issue was partially mitigated on current main because the loop already unpacks (media_path, is_voice), but the background-task delivery path still ignored the media type/voice flag and treated the extracted file as a generic document attachment.

Closes #12064.

Testing

  • python3 -m pytest -o addopts= tests/gateway/test_background_command.py

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery labels Apr 23, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related competing PRs: #12091, #12368 — all fix #12064 (background task media routing). Maintainers should pick one.

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 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