Commit graph

1 commit

Author SHA1 Message Date
jingtao
6138f5a079
fix(ai): keep signed empty text/thinking blocks in google history (#7362)
Gemini can attach thoughtSignature to a part whose visible text is
empty and requires it echoed back; convertMessages dropped such blocks
together with the signature, breaking the reasoning chain. With the
chain broken, gemini flash models intermittently end a mid-task turn
with a thought-only STOP and no tool call. Empty blocks are now dropped
only when they are unsigned, mirroring the anthropic converter.

Co-authored-by: Jingtao Xu <jingtaozf@gmail.com>
2026-07-31 10:30:38 +02:00