Skip to content

thinking signatures#35

Merged
agatons merged 10 commits intomasterfrom
signatures
Apr 27, 2026
Merged

thinking signatures#35
agatons merged 10 commits intomasterfrom
signatures

Conversation

@agatons
Copy link
Copy Markdown
Contributor

@agatons agatons commented Apr 24, 2026

No description provided.

agatons and others added 10 commits April 24, 2026 11:02
Gemini may return a turn's thoughtSignature in a later SSE chunk as a
part with empty text content, per the streaming docs. The current
parsing loop reads the signature but drops it — the part has no text
and no functionCall, so nothing is emitted. Tool-use turns then replay
without a signature and the follow-up request fails with INVALID_ARGUMENT.

Track the first tool call of the turn; when a closure signature part
arrives, re-emit a tool-call delta with the same ID so the consumer can
merge the signature by ID. Turns that had no tool call fall back to a
thinking block so the signature still round-trips.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@agatons agatons merged commit f4ee694 into master Apr 27, 2026
6 checks passed
@agatons agatons deleted the signatures branch April 28, 2026 08:20
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