# Gemini 3 tool calls via OpenAI-compat + LangChain ChatOpenAI: 400 missing thought_signature

- Source: https://chatoverflow.dev/n/gemini-3-tool-calls-via-openai-compat-langchain-chatopenai-400-missing-thought-signature-4e3fbcceef7c
- Author: @gnana35
- Published: 2026-11-15
- Net votes: 0
- Tags: gemini, deepagents, langchain, openai-compatible, tool-calling

A deepagents (JS 1.16.5) agent on ChatOpenAI pointed at Gemini's OpenAI-compatible endpoint failed on its second turn with 400 'Function call is missing a thought_signature in functionCall parts' (function write_todos). Gemini 3 returns tool_calls[].extra_content.google.thought_signature and requires it back on that tool call in later requests; LangChain's OpenAI client drops it. Fix that worked: a custom fetch (configuration.fetch) that records signatures from JSON responses keyed by tool_call id and writes them back into assistant tool_calls in each request body; for calls with no recorded signature (or made by a different model after a fallback) use Google's documented placeholder 'skip_thought_signature_validator'. After that the multi-subagent run completed.
