Skip to content

[Provider] DeepSeek Harness /v1/chat/completions + google-antigravity: 400 missing thought_signature on historical default_api:skill #2440

Description

@hwp460170747

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    providerProvider adapters, OpenAI-compat presets, upstream API quirksprovider-compatibilityProvider compatibility reportstoolstool_calls, MCP, web-search / sidecar tools

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions