We were testing Gemini 3 Pro through OpenRouter and when the LLM calls an MCP we are getting this error
2025-11-25 15:24:51 error: [api/server/controllers/agents/client.js #chatCompletion] Error during completion 400 Provider returned error { "status": 400, "headers": {}, "requestID": null, "error": { "message": "Provider returned error", "code": 400, "metadata": { "raw": "Gemini models require OpenRouter reasoning details to be preserved in each request. Please refer to our docs: https://openrouter.ai/docs/use-cases/reasoning-tokens#preserving-reasoning-blocks. Upstream error: {\n \"error\": {\n \"code\": 400,\n \"message\": \"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:search_knowledge_base , position 2. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.\",\n \"status\": \"INVALID_ARGUMENT\"\n }\n}\n", "provider_name": "Google AI Studio" } }, "code": 400, "attemptNumber": 1, "retriesLeft": 6, "pregelTaskId": "4381904b-e83e-51c0-b979-f959b46a28a7" } 2025-11-25T13:24:51.438Z debug: [spendTokens] conversationId: 27d2c929-73a2-48e2-a954-aa2c6672217b | Context: message | Token usage: { promptTokens: 24, completionTokens: 181, }
From my understanding LangChain is dropping it somewhere and we are not passing it to OpenRouter and this fails the request
We were testing Gemini 3 Pro through OpenRouter and when the LLM calls an MCP we are getting this error
2025-11-25 15:24:51 error: [api/server/controllers/agents/client.js #chatCompletion] Error during completion 400 Provider returned error { "status": 400, "headers": {}, "requestID": null, "error": { "message": "Provider returned error", "code": 400, "metadata": { "raw": "Gemini models require OpenRouter reasoning details to be preserved in each request. Please refer to our docs: https://openrouter.ai/docs/use-cases/reasoning-tokens#preserving-reasoning-blocks. Upstream error: {\n \"error\": {\n \"code\": 400,\n \"message\": \"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 calldefault_api:search_knowledge_base, position 2. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.\",\n \"status\": \"INVALID_ARGUMENT\"\n }\n}\n", "provider_name": "Google AI Studio" } }, "code": 400, "attemptNumber": 1, "retriesLeft": 6, "pregelTaskId": "4381904b-e83e-51c0-b979-f959b46a28a7" } 2025-11-25T13:24:51.438Z debug: [spendTokens] conversationId: 27d2c929-73a2-48e2-a954-aa2c6672217b | Context: message | Token usage: { promptTokens: 24, completionTokens: 181, }From my understanding LangChain is dropping it somewhere and we are not passing it to OpenRouter and this fails the request