fix(gateway): audio attachment note no longer steers the agent into punting

Sibling site of the PDF/DOCX note fixed in PR #44175: the audio file
attachment context note led with "Ask the user what they'd like you to
do with it", steering the model into asking instead of transcribing.
Rewritten to instruct the agent to transcribe/process the file itself
when the request involves its content, only asking when intent is
genuinely unclear. Contract assertion added to the existing audio
attachment note test.
This commit is contained in:
Teknium
2026-06-11 11:58:19 -07:00
parent 4e9be3ee32
commit 13650ab7f8
2 changed files with 9 additions and 1 deletions
@@ -134,6 +134,10 @@ async def test_audio_attachment_context_note_format():
assert "audio file attachment" in result.lower()
# Should NOT contain the voice-message transcription wrapper text
assert "voice message" not in result.lower()
# Guides the agent to transcribe/process the file itself rather than
# punting back to the user (same bug class as the PDF/DOCX note).
assert "transcri" in result.lower()
assert "ask the user what they'd like" not in result.lower()
# ---------------------------------------------------------------------------