Skip to content

[Fix] Vertex Gemini 3.7 fails after tools return empty output - #1250

Draft
zoomote[bot] wants to merge 3 commits into
mainfrom
fix/gemini-37-model-turn-2ydsbmeptf6ze
Draft

[Fix] Vertex Gemini 3.7 fails after tools return empty output#1250
zoomote[bot] wants to merge 3 commits into
mainfrom
fix/gemini-37-model-turn-2ydsbmeptf6ze

Conversation

@zoomote

@zoomote zoomote Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

​Opened on behalf of @taltas. Follow up by mentioning @roomote, in the web UI, or in Discord.

What changed

  • Preserve empty Gemini tool results as user functionResponse turns with an explicit (empty) payload.
  • Add formatter coverage for empty string and array tool results, plus provider-level coverage that verifies the outbound request still ends with the user tool response.
  • Reduce the corresponding ESLint suppression count after removing the obsolete test cast.

Why this change was made

Vertex Gemini 3.7 Flash rejects requests that end with a model turn. Zoo Code previously dropped empty tool responses during Gemini conversion, so those conversations could end on the model's preceding tool call and fail with HTTP 400.

Impact

Vertex Gemini 3.7 Flash conversations can continue after tools return empty output instead of failing request validation. Non-empty tool results and existing Gemini request behavior remain unchanged.

Related PRs

@codecov

codecov Bot commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@zoomote

zoomote Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the missing Codecov branch coverage in commit 911fe9e7c. The empty-array tool-result fallback now has direct regression coverage; focused coverage, the full test suite, lint, and type checks pass. CI has been retriggered on the pushed PR head.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant