What happened?
Gemini 3 on vertex ai returns 400 Invalid JSON in request body / INVALID_ARGUMENT on the turn that follows a parallel tool-call response.
Root cause is in dist/providers/google-shared.ts. When a Gemini 3 turn has parallel function calls, only the first one carries a thoughtSignature. #1829 added the skip_thought_signature_validator sentinel as the fallback for claude code assistant and antigravity. The sentinel is not recognized by vertex ai.
Steps to reproduce
- provider:
google-vertex against vertex ai endpoint
- model:
google/gemini-3.1-pro-preview
- prompt that asks the agent to run two parallel bash commands
- assistant turn returns 2 functionCall parts with the only the first carrying
thoughtSignature
convertMessages replays the assistant turn and substitutes SKIP_THOUGHT_SIGNATURE for the second call's missing signature.
- vertex returns:
{"error":{"code":400,"message":"Invalid JSON in request body","status":"INVALID_ARGUMENT"}}
Expected behavior
Move the sentinel logic out of the shared convertMessages and into google-gemini-cli.ts only. google.ts and google-vertex.ts call into a sentinel-free version.
Happy to open a pr with regression tests.
Version
0.70.6
What happened?
Gemini 3 on vertex ai returns 400
Invalid JSON in request body/INVALID_ARGUMENTon the turn that follows a parallel tool-call response.Root cause is in
dist/providers/google-shared.ts. When a Gemini 3 turn has parallel function calls, only the first one carries athoughtSignature. #1829 added theskip_thought_signature_validatorsentinel as the fallback for claude code assistant and antigravity. The sentinel is not recognized by vertex ai.Steps to reproduce
google-vertexagainst vertex ai endpointgoogle/gemini-3.1-pro-previewthoughtSignatureconvertMessagesreplays the assistant turn and substitutes SKIP_THOUGHT_SIGNATURE for the second call's missing signature.{"error":{"code":400,"message":"Invalid JSON in request body","status":"INVALID_ARGUMENT"}}Expected behavior
Move the sentinel logic out of the shared
convertMessagesand intogoogle-gemini-cli.tsonly.google.tsandgoogle-vertex.tscall into a sentinel-free version.Happy to open a pr with regression tests.
Version
0.70.6