Repository navigation
fix(gemini): preserve tool calls through opengateway - #1204
Conversation
BlockersNone found. Non-Blocking
Looks Good
Verdict: Approve — clean Gemini tool call fix. |
Vasanthdev2004
left a comment
There was a problem hiding this comment.
Clean Gemini tool call fix. Good test coverage.
anandh8x
left a comment
There was a problem hiding this comment.
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.
preserve tool calls for gemini