Skip to content

[pull] main from danny-avila:main#80

Merged
pull[bot] merged 2 commits into
innFactory:mainfrom
danny-avila:main
May 8, 2026
Merged

[pull] main from danny-avila:main#80
pull[bot] merged 2 commits into
innFactory:mainfrom
danny-avila:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 8, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

…ered index (#159)

`fixThoughtSignatures` correlates each AI message with a Gemini-formatted
"model" content block to re-attach `thoughtSignature` onto functionCall
parts. The pre-fix code filtered the AI-message list down to only those
WITH a non-empty `additional_kwargs.signatures`, then walked the filtered
array in lockstep with the unfiltered modelContents. As soon as any prior
AI message lacked signatures (a plain-text "Hello!" turn before a
tool-using turn, in the most common case), the indices desynced and the
toolcall AI message got matched against the wrong content block — leaving
the real functionCall sigless and triggering a 400 from Vertex on the
follow-up call.

Live repro on `gemini-3.1-flash-lite-preview` (mirrors LibreChat#13006):
turn-1 plain text + turn-2 bash_tool functionCall →
`Google request failed with status code 400` after the tool result is
sent back. With the fix, the round-trip completes.

Walk every AI message by position, skip non-signature ones inline so the
later messages still align with their model content blocks. Added unit
tests covering the failure case + multi-turn dispatch + idempotence.
@pull pull Bot locked and limited conversation to collaborators May 8, 2026
@pull pull Bot added the ⤵️ pull label May 8, 2026
@pull pull Bot merged commit da06b06 into innFactory:main May 8, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant