Skip to content

fix: preserve gemini thought signatures (#25933)#26169

Merged
f0ssel merged 1 commit into
release/2.34from
backport/25933-to-2.34
Jun 11, 2026
Merged

fix: preserve gemini thought signatures (#25933)#26169
f0ssel merged 1 commit into
release/2.34from
backport/25933-to-2.34

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Backport of #25933

Original PR: #25933 — fix: preserve gemini thought signatures
Merge commit: c349ea6
Requested by: @ssncferreira

AI Bridge reserializes OpenAI chat-completions requests before sending
them upstream. For Gemini OpenAI-compatible routes, that OpenAI
typed-parameter round trip drops
`tool_calls[].extra_content.google.thought_signature`, so Google rejects
tool-result continuations with `Function call is missing a
thought_signature`.

This PR:
- patches the AI Bridge upstream serialization boundary for Gemini
OpenAI-compatible chat completions
- shares the Gemini thought-signature patching helpers with chatd's
OpenAI-compatible transport patch to keep behavior consistent
- treats direct Google OpenAI-compatible upstream endpoints as
Gemini-scoped even when the request model is an alias
- adds the Google fallback thought signature to every assistant tool
call in the active turn, including parallel tool calls
- covers the regression that `extra_content` is dropped before the
upstream body is patched

> Mux updated this PR description on behalf of Mike.

---------

Co-authored-by: Susana Cardoso Ferreira <susana@coder.com>
(cherry picked from commit c349ea6)
@f0ssel f0ssel merged commit 9595e6c into release/2.34 Jun 11, 2026
@f0ssel f0ssel deleted the backport/25933-to-2.34 branch June 11, 2026 18:25
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants