基于gemini模型的 OpenAI 兼容网关无法调用tools工具,报错Unable to submit request because function call `default_api:web_fetch` in the 5. content block is missing a `thought_signature`
#1180 opened on Mar 17, 2026
Description
Problem summary
2026-03-18T03:44:53.493566Z [error ] Background run failed. Exception: <class 'openai.BadRequestError'>(Error code: 400 - [{'error': {'code': 400, 'message': 'Unable to submit request because function call default_api:web_fetch in the 5. content block is missing a thought_signature. Learn more: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/thought-signatures', 'status': 'INVALID_ARGUMENT'}}]) [langgraph_api.worker] api_variant=local_dev assistant_id=bee7d354-5df5-5f26-a978-10ea053f620d graph_id=lead_agent langgraph_api_version=0.7.65 request_id=2999390a-2b08-409f-ba7b-09744baf3180 run_attempt=1 run_completed_in_ms=11807 run_created_at=2026-03-18T03:44:41.687255+00:00 run_ended_at=2026-03-18T03:44:53.493566+00:00 run_exec_ms=10812 run_id=019cff0b-aed7-7d42-b2c3-f6ddddb8157f run_started_at=2026-03-18T03:44:42.681445+00:00 run_wait_time_ms=994 thread_id=185e4a0d-e7d8-478c-ad22-a4dfac8701ea thread_name=asyncio_3
Expected behavior
正常调用tools工具
Actual behavior
2026-03-18T03:44:53.493566Z [error ] Background run failed. Exception: <class 'openai.BadRequestError'>(Error code: 400 - [{'error': {'code': 400, 'message': 'Unable to submit request because function call default_api:web_fetch in the 5. content block is missing a thought_signature. Learn more: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/thought-signatures', 'status': 'INVALID_ARGUMENT'}}]) [langgraph_api.worker] api_variant=local_dev assistant_id=bee7d354-5df5-5f26-a978-10ea053f620d graph_id=lead_agent langgraph_api_version=0.7.65 request_id=2999390a-2b08-409f-ba7b-09744baf3180 run_attempt=1 run_completed_in_ms=11807 run_created_at=2026-03-18T03:44:41.687255+00:00 run_ended_at=2026-03-18T03:44:53.493566+00:00 run_exec_ms=10812 run_id=019cff0b-aed7-7d42-b2c3-f6ddddb8157f run_started_at=2026-03-18T03:44:42.681445+00:00 run_wait_time_ms=994 thread_id=185e4a0d-e7d8-478c-ad22-a4dfac8701ea thread_name=asyncio_3
Operating system
Other
Platform details
No response
Python version
No response
Node.js version
No response
pnpm version
No response
uv version
No response
How are you running DeerFlow?
Local (make dev)
Reproduction steps
1、配置模型 - name: gemini-3.1-pro-preview
display_name: Gemini 3.1 Pro Preview
use: langchain_openai:ChatOpenAI
# use: src.models.patched_gemini:PatchedChatOpenAI
model: google/gemini-3.1-pro-preview
api_key: xxx
base_url: https://ai-gateway.tec-do.cn/tec-power/vertexai/text-gcp/v1
max_tokens: 8192
temperature: 0.7
supports_thinking: true
when_thinking_enabled:
extra_body:
thinking:
type: enabled
2、运行make start
3、对话:爬取某个网站的SEO信息
4、langgraph.log报错Unable to submit request because function call default_api:web_fetch in the 5. content block is missing a thought_signature
Relevant logs
2026-03-17T13:38:41.245048Z [error ] Tool execution failed (async): name=bash id=None [deerflow.agents.middlewares.tool_error_handling_middleware] api_variant=local_dev assistant_id=bee7d354-5df5-5f26-a978-10ea053f620d graph_id=lead_agent langgraph_api_version=0.7.65 langgraph_node=tools request_id=62341761-2332-44c3-b218-401da859ec5a run_attempt=1 run_id=019cfc04-d2a1-7c81-b1ac-bd848203a960 thread_id=c92803b1-d7bd-419f-a209-8d0849566b7d thread_name=MainThread
Git state
No response
Additional context
No response