Skip to content

fix(gemini): preserve tool calls through opengateway - #1204

Merged
kevincodex1 merged 1 commit into
Twigpine:mainfrom
kevincodex1:fix/gmi-gemini-tool-calls
May 16, 2026
Merged

kevincodex1 merged 1 commit into
Twigpine:mainfrom
kevincodex1:fix/gmi-gemini-tool-calls

Conversation

@kevincodex1

@kevincodex1 kevincodex1 commented May 16, 2026 •

Copy link
Copy Markdown
Member

preserve tool calls for gemini

@Vasanthdev2004

Copy link
Copy Markdown
Collaborator

Blockers

None found.

Non-Blocking

  • PR description is minimal — "preserve tool calls for gemini" could be more detailed.
  • Removes GLM-5.1 from Opengateway — not clear why in the description.

Looks Good

  • Preserves Gemini tool call signatures through OpenGateway
  • Adds google/gemini-3.1-flash-lite-preview to brand and model catalogs
  • Removes GLM-5.1 from Opengateway (likely not available anymore)
  • Good test coverage — 2 new tests for tool call preservation (non-streaming and streaming)
  • 452 additions, 49 deletions — focused changes
  • Updates README and docs to reflect GLM removal

Verdict: Approve — clean Gemini tool call fix.

@Vasanthdev2004 Vasanthdev2004 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean Gemini tool call fix. Good test coverage.

@anandh8x anandh8x left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking streaming robustness note:

The current implementation preserves Gemini thought_signature when extra_content is on the tool call itself or on the same streaming delta as the tool call.

One edge case to consider: OpenAI-compatible streams are delta-based, so a gateway could theoretically emit delta.extra_content.google.thought_signature in an earlier assistant metadata chunk, then emit delta.tool_calls in a later chunk. In that shape the signature would be dropped because the shim doesn’t currently retain pending extra_content across chunks.

Not asking for changes unless this shape is observed in practice, but a small regression test or per-choice pending signature state would make this more future-proof.

@kevincodex1
kevincodex1 merged commit 13a0901 into Twigpine:main May 16, 2026
2 checks passed
The-FOOL-00 pushed a commit to The-FOOL-00/openclaude that referenced this pull request May 24, 2026
discopops pushed a commit to discopops/openclaude that referenced this pull request May 28, 2026
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.

3 participants