Repository navigation
[Provider] DeepSeek Harness /v1/chat/completions + google-antigravity: 400 missing thought_signature on historical default_api:skill #2440
Description
Client or integration
Other
Provider or upstream service
google-antigravity (Antigravity Gemini)
OpenCodex version
2.31.0
Endpoint or capability
/v1/chat/completions — multi-turn tool-call continuation
Current behaviour
DeepSeek Harness (DSH) Web GUI uses OpenCodex as a stateless OpenAI Chat Completions client, upstream google-antigravity.
First tool round succeeds (DSH UI: 1 explanation, 1 skill, 1 read). The next request that replays that history is rejected by Antigravity:
OpenAI API error (400): {"message":"Provider error 400: Antigravity invalid request: Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance. Additional data, function call default_api:skill , position 213. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.","type":"invalid_request_error","code":"invalid_request_error"}
DSH shows INVALID_REQUEST. Retrying the same session does not recover; the unsigned functionCall is already in history.
Reproduced on @bitkyc08/opencodex 2.31.0. ~/.opencodex/thought-signature-replay.json exists, so the replay store is present, but Chat Completions continuation still goes out unsigned.
Expected behaviour
When a Chat Completions client cannot round-trip tool_calls[].extra_content.google.thought_signature, OpenCodex should still re-attach the original Gemini thoughtSignature onto each historical functionCall part before calling Antigravity — from the replay cache keyed by model + call identity, the same way the Responses path tries to do after #1735 / #1781 / #1823 / #2150 / #2198 / #2281.
The continuation request must include the signature on the same part that originally carried the function call. Dummy skip_thought_signature_validator is not acceptable for Antigravity (it still 400s).
Minimal redacted request or reproduction
# Windows 11 Enterprise LTSC (10.0.26100)
# @bitkyc08/opencodex 2.31.0 as local service
# provider: google-antigravity
# client: DeepSeek Harness Web GUI -> /v1/chat/completions
# DSH/pi-ai openai-completions round-trips reasoning_details only, NOT extra_content.google.thought_signature
1. Point DSH at OpenCodex /v1/chat/completions with a google-antigravity Gemini 3 thinking model.
2. Ask something that forces tools (DSH calls skill, then read).
3. First tool round: 200, tools execute.
4. Next request with assistant tool_calls + tool results: 400 on default_api:skill (here: position 213).
Continuation shape (redacted). tool_calls have no extra_content:
{
"model": "<google-antigravity gemini-3 thinking model>",
"messages": [
{"role": "user", "content": "<task>"},
{"role": "assistant", "tool_calls": [{"id": "<id1>", "type": "function", "function": {"name": "skill", "arguments": "{...}"}}]},
{"role": "tool", "tool_call_id": "<id1>", "content": "<skill result>"},
{"role": "assistant", "tool_calls": [{"id": "<id2>", "type": "function", "function": {"name": "read", "arguments": "{...}"}}]},
{"role": "tool", "tool_call_id": "<id2>", "content": "<file contents>"}
],
"tools": [{"type": "function", "function": {"name": "skill"}}, {"type": "function", "function": {"name": "read"}}]
}Actual response or error
HTTP 400 from OpenCodex /v1/chat/completions
OpenAI API error (400): {"message":"Provider error 400: Antigravity invalid request: Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance. Additional data, function call `default_api:skill` , position 213. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.","type":"invalid_request_error","code":"invalid_request_error"}
DSH UI: 过程步骤 (3) = 1 explanation · 1 skill · 1 read, then INVALID_REQUEST.Upstream documentation
https://ai.google.dev/gemini-api/docs/thought-signatures
https://ai.google.dev/gemini-api/docs/function-calling
https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/thinking/thought-signatures
Gemini 3 returns HTTP 400 if a replayed functionCall part is missing thought_signature, including at MINIMAL thinking. OpenAI-compat wire shape is tool_calls[].extra_content.google.thought_signature.
Suggested mapping or implementation notes
No response
Additional context and attachments
- Client: DeepSeek Harness Web GUI (http://127.0.0.1:3080)
- OS: Windows 11 Enterprise LTSC (build 26100)
- OpenCodex: 2.31.0, google-antigravity enabled
- Failed function: default_api:skill at position 213
- First turn tools succeeded; failure is history replay only
- No API keys, tokens, prompts, tool arguments, or account emails included
Checks
- I searched existing provider and compatibility issues.
- The request and response were redacted.
- The expected behaviour is based on an upstream specification or a concrete client requirement.
Activity
Ingwannu commentedon Aug 23, 2026
Confirmed: this is a real v2.31.0 release-only failure boundary, but the fix is already on
dev; no duplicate patch is needed.The v2.31.0 tag (
6ae83b1f1, released August 22, 2026) predates #2339. On that tag I reproduced the inconsistent same-frame case behind this report:functionCall(skill)→ thought signature →functionCall(read);readcall;tool_calls[].extra_contentcould therefore replay the earlierskillcall without the metadata the release had incorrectly associated with it.PR #2339 fixed this on
devine724c63a3/4fb942d4dby making the source-order loop the sole owner of streaming signature attachment. On currentdev@bf8bcfd3c, the Chat-facing metadata and the replay cache agree: the earlier call remains unsigned and only the following call receives the signature.Verification on repository-pinned Bun 1.4.0:
devwith the corrected ordering.tests/google-signature-history-roundtrip.test.ts: 24 passed, 0 failed on currentdev.default_api:skillalso re-attaches a directly associated signature when the client omitsextra_content.One clarification:
thought-signature-replay.jsonis the call-id store and requires a complete conversation/route/credential scope. The Google-family fallback involved here is the separate boundedantigravity-replay.jsonstore, keyed by wire model, session, and canonical function-call identity.Closing as fixed on
dev. The correction will be present in the next release after v2.31.0.