Skip to content

Lock in generate_audio type-check precedence on always-on models - #207

Merged
christophervoelpel merged 1 commit into
mainfrom
test/omni-non-bool-audio
Sep 25, 2026
Merged

christophervoelpel merged 1 commit into
mainfrom
test/omni-non-bool-audio

Conversation

@christophervoelpel

Copy link
Copy Markdown
Collaborator

Follow-up to #204. It applies @victor-paunescu's suggestion, which came with his approval of #204. I merged #204 on the approved head instead of pushing to it, so the approval stayed valid, and moved the suggestion here.

Change (test only): test_non_bool_generate_audio_rejected now also asserts that a non-boolean generate_audio sent to gemini-omni-1.1-flash-preview (a model that always generates audio) returns MALFORMED_SUBMISSION, not AUDIO_REQUIRED. This locks in the check ordering that 0d6a560 introduced. I wrapped the suggested line to stay within 80 columns.

Mutation check: I moved the type check back after _capability_violation, i.e. the order before 0d6a560.

  • Existing test only: 6/6 still pass, so the regression goes unnoticed.
  • With the new assertion: 6/6 fail with AUDIO_REQUIRED.
  • With the code restored: 6/6 pass. Full Python suite: 765 passed.

Assert that a non-boolean generate_audio on an audio_always_on model
(gemini-omni) is reported as MALFORMED_SUBMISSION, not AUDIO_REQUIRED.
Without this, moving the type check back after the capability check
passes the existing test unnoticed.

Follow-up to review feedback from victor-paunescu on #204.
@gps-readability-bot

Copy link
Copy Markdown

Still need readability approvals from:

@gps-readability-bot

Copy link
Copy Markdown

Still need readability approvals from:

@gps-readability-bot

Copy link
Copy Markdown

Still need readability approvals from:

@christophervoelpel
christophervoelpel merged commit e49736c into main Sep 25, 2026
13 checks passed
@christophervoelpel
christophervoelpel deleted the test/omni-non-bool-audio branch September 25, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants