Errors caused by parallel tool calls #912

Closed
opened 2026-02-16 10:20:55 -05:00 by yindo · 1 comment
Owner

Originally created by @leslie2046 on GitHub (Dec 30, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues Dify issues & Dify Official Plugins, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.11.2

Plugin version

0.0.28

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

Image

✔️ Error log

[on_llm_before_invoke]
Model: deepseek-reasoner
Parameters:
	Tools:
		current_time
		lunar_query
		get_weather
Stream: True
User: 4faa9894-8d6c-47b8-94fd-7c0226676db4
Prompt messages:
	role: system
	content: 你是一名助手
	role: user
	content: 同时查询下当前时间和北京天气
	role: assistant
	content: <think>
用户想要同时查询当前时间和北京天气。我有两个工具:current_time用于获取当前时间,get_weather用于查询天气。我需要同时调用这两个工具。它们都可以独立运行,没有依赖关系。所以,我可以同时调用它们。我来写一个同时调用这两个工具的代码块。
</think>
	role: assistant
	content: 
	name: current_time
	role: tool
	content: 2025-12-31 09:27:35
	role: assistant
	content: 
	name: get_weather
	role: tool
	content: tool response: {"error_code": 0, "reason": "查询成功!", "result": {"city": "北京", "future": [{"date": "2025-12-31", "direct": "北风转西南风", "temperature": "-9/0℃", "weather": "晴", "wid": {"day": "00", "night": "00"}}, {"date": "2026-01-01", "direct": "东北风转北风", "temperature": "-8/1℃", "weather": "多云转晴", "wid": {"day": "01", "night": "00"}}, {"date": "2026-01-02", "direct": "西南风", "temperature": "-8/3℃", "weather": "晴", "wid": {"day": "00", "night": "00"}}, {"date": "2026-01-03", "direct": "西北风转北风", "temperature": "-4/5℃", "weather": "晴转多云", "wid": {"day": "00", "night": "01"}}, {"date": "2026-01-04", "direct": "西风转北风", "temperature": "-6/5℃", "weather": "多云转晴", "wid": {"day": "01", "night": "00"}}], "realtime": {"aqi": "13", "direct": "东北风", "humidity": "25", "info": "晴", "power": "3级", "temperature": "-6", "wid": "00"}}}.

[on_llm_new_chunk]2025-12-31 09:27:37,61 DEBUG [_config.py:82] 43564939cb load_ssl_context verify=True cert=None trust_env=True http2=False
2025-12-31 09:27:37,64 DEBUG [_config.py:148] 43564939cb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem'
2025-12-31 09:27:37,68 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False
2025-12-31 09:27:37,69 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem'
2025-12-31 09:27:37,113 DEBUG [debug_logging.py:225]  Event: NodeRunAgentLogEvent
2025-12-31 09:27:37,115 DEBUG [_config.py:82] 43564939cb load_ssl_context verify=True cert=None trust_env=True http2=False
2025-12-31 09:27:37,115 DEBUG [_config.py:148] 43564939cb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem'
2025-12-31 09:27:37,118 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False
2025-12-31 09:27:37,119 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem'
2025-12-31 09:27:37,156 DEBUG [_config.py:82] 43564939cb load_ssl_context verify=True cert=None trust_env=True http2=False
2025-12-31 09:27:37,156 DEBUG [_config.py:148] 43564939cb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem'
2025-12-31 09:27:37,157 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False
2025-12-31 09:27:37,158 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem'
2025-12-31 09:27:37,198 DEBUG [_trace.py:47] 43564939cb connect_tcp.started host='192.168.0.188' port=5002 local_address=None timeout=600.0 socket_options=None
2025-12-31 09:27:37,199 DEBUG [_trace.py:47] 7e421c0deb connect_tcp.started host='192.168.0.188' port=5002 local_address=None timeout=600.0 socket_options=None
2025-12-31 09:27:37,199 DEBUG [_trace.py:47] 43564939cb connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7464c58ad5b0>
2025-12-31 09:27:37,199 DEBUG [_trace.py:47] 43564939cb send_request_headers.started request=<Request [b'POST']>
2025-12-31 09:27:37,200 DEBUG [_trace.py:47] 43564939cb send_request_headers.complete
2025-12-31 09:27:37,200 DEBUG [_trace.py:47] 43564939cb send_request_body.started request=<Request [b'POST']>
2025-12-31 09:27:37,200 DEBUG [_trace.py:47] 7e421c0deb connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7464c584ff20>
2025-12-31 09:27:37,200 DEBUG [_trace.py:47] 43564939cb send_request_body.complete
2025-12-31 09:27:37,200 DEBUG [_trace.py:47] 7e421c0deb send_request_headers.started request=<Request [b'GET']>
2025-12-31 09:27:37,200 DEBUG [_trace.py:47] 43564939cb receive_response_headers.started request=<Request [b'POST']>
2025-12-31 09:27:37,200 DEBUG [_trace.py:47] 7e421c0deb send_request_headers.complete
2025-12-31 09:27:37,200 DEBUG [_trace.py:47] 7e421c0deb send_request_body.started request=<Request [b'GET']>
2025-12-31 09:27:37,201 DEBUG [_trace.py:47] 7e421c0deb send_request_body.complete
2025-12-31 09:27:37,201 DEBUG [_trace.py:47] 7e421c0deb receive_response_headers.started request=<Request [b'GET']>
2025-12-31 09:27:37,226 DEBUG [_trace.py:47] 7e421c0deb receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Type', b'application/json; charset=utf-8'), (b'Date', b'Wed, 31 Dec 2025 01:27:37 GMT'), (b'Transfer-Encoding', b'chunked')])
2025-12-31 09:27:37,227 INFO [_client.py:1038] 7e421c0deb HTTP Request: GET http://192.168.0.188:5002/plugin/d8669796-681c-419a-8a68-2fefa954ac92/management/list?page=1&page_size=256&response_type=paged "HTTP/1.1 200 OK"
2025-12-31 09:27:37,227 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.started request=<Request [b'GET']>
2025-12-31 09:27:37,228 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.complete
2025-12-31 09:27:37,228 DEBUG [_trace.py:47] 7e421c0deb response_closed.started
2025-12-31 09:27:37,228 DEBUG [_trace.py:47] 7e421c0deb response_closed.complete
2025-12-31 09:27:37,229 DEBUG [_trace.py:47] 7e421c0deb close.started
2025-12-31 09:27:37,229 DEBUG [_trace.py:47] 7e421c0deb close.complete
2025-12-31 09:27:37,325 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False
2025-12-31 09:27:37,325 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem'
2025-12-31 09:27:37,351 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False
2025-12-31 09:27:37,351 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem'
2025-12-31 09:27:37,377 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False
2025-12-31 09:27:37,377 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem'
2025-12-31 09:27:37,403 DEBUG [_trace.py:47] 7e421c0deb connect_tcp.started host='192.168.0.188' port=5002 local_address=None timeout=600.0 socket_options=None
2025-12-31 09:27:37,404 DEBUG [_trace.py:47] 7e421c0deb connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7464c560fb60>
2025-12-31 09:27:37,404 DEBUG [_trace.py:47] 7e421c0deb send_request_headers.started request=<Request [b'GET']>
2025-12-31 09:27:37,404 DEBUG [_trace.py:47] 7e421c0deb send_request_headers.complete
2025-12-31 09:27:37,404 DEBUG [_trace.py:47] 7e421c0deb send_request_body.started request=<Request [b'GET']>
2025-12-31 09:27:37,404 DEBUG [_trace.py:47] 7e421c0deb send_request_body.complete
2025-12-31 09:27:37,404 DEBUG [_trace.py:47] 7e421c0deb receive_response_headers.started request=<Request [b'GET']>
2025-12-31 09:27:37,408 DEBUG [_trace.py:47] 7e421c0deb receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Type', b'application/json; charset=utf-8'), (b'Date', b'Wed, 31 Dec 2025 01:27:37 GMT'), (b'Transfer-Encoding', b'chunked')])
2025-12-31 09:27:37,409 INFO [_client.py:1038] 7e421c0deb HTTP Request: GET http://192.168.0.188:5002/plugin/d8669796-681c-419a-8a68-2fefa954ac92/management/tools?page=1&page_size=256 "HTTP/1.1 200 OK"
2025-12-31 09:27:37,409 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.started request=<Request [b'GET']>
2025-12-31 09:27:37,410 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.complete
2025-12-31 09:27:37,410 DEBUG [_trace.py:47] 7e421c0deb response_closed.started
2025-12-31 09:27:37,410 DEBUG [_trace.py:47] 7e421c0deb response_closed.complete
2025-12-31 09:27:37,410 DEBUG [_trace.py:47] 7e421c0deb close.started
2025-12-31 09:27:37,410 DEBUG [_trace.py:47] 7e421c0deb close.complete
2025-12-31 09:27:37,431 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False
2025-12-31 09:27:37,431 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem'
2025-12-31 09:27:37,459 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False
2025-12-31 09:27:37,459 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem'
2025-12-31 09:27:37,485 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False
2025-12-31 09:27:37,486 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem'
2025-12-31 09:27:37,512 DEBUG [_trace.py:47] 7e421c0deb connect_tcp.started host='192.168.0.188' port=5002 local_address=None timeout=600.0 socket_options=None
2025-12-31 09:27:37,513 DEBUG [_trace.py:47] 43564939cb receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Type', b'text/event-stream'), (b'Date', b'Wed, 31 Dec 2025 01:27:37 GMT'), (b'Transfer-Encoding', b'chunked')])
2025-12-31 09:27:37,513 INFO [_client.py:1038] 43564939cb HTTP Request: POST http://192.168.0.188:5002/plugin/d8669796-681c-419a-8a68-2fefa954ac92/dispatch/llm/invoke "HTTP/1.1 200 OK"
2025-12-31 09:27:37,513 DEBUG [_trace.py:47] 43564939cb receive_response_body.started request=<Request [b'POST']>
2025-12-31 09:27:37,514 ERROR [base.py:277] 43564939cb Error in stream response for plugin {'code': -500, 'message': '{"message":"{\\"args\\":{\\"description\\":\\"[models] Error: API request failed with status code 400: {\\\\\\"error\\\\\\":{\\\\\\"message\\\\\\":\\\\\\"Missing `reasoning_content` field in the assistant message at message index 4. For more information, please refer to https://api-docs.deepseek.com/guides/thinking_mode#tool-calls\\\\\\",\\\\\\"type\\\\\\":\\\\\\"invalid_request_error\\\\\\",\\\\\\"param\\\\\\":null,\\\\\\"code\\\\\\":\\\\\\"invalid_request_error\\\\\\"}}\\"},\\"error_type\\":\\"InvokeError\\",\\"message\\":\\"[models] Error: API request failed with status code 400: {\\\\\\"error\\\\\\":{\\\\\\"message\\\\\\":\\\\\\"Missing `reasoning_content` field in the assistant message at message index 4. For more information, please refer to https://api-docs.deepseek.com/guides/thinking_mode#tool-calls\\\\\\",\\\\\\"type\\\\\\":\\\\\\"invalid_request_error\\\\\\",\\\\\\"param\\\\\\":null,\\\\\\"code\\\\\\":\\\\\\"invalid_request_error\\\\\\"}}\\"}","error_type":"PluginInvokeError","args":null}', 'data': None}
2025-12-31 09:27:37,515 DEBUG [_trace.py:47] 43564939cb receive_response_body.failed exception=GeneratorExit()
2025-12-31 09:27:37,515 DEBUG [_trace.py:47] 43564939cb response_closed.started
2025-12-31 09:27:37,515 DEBUG [_trace.py:47] 7e421c0deb connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7464c560e060>
2025-12-31 09:27:37,515 DEBUG [_trace.py:47] 43564939cb response_closed.complete
2025-12-31 09:27:37,515 DEBUG [_trace.py:47] 7e421c0deb send_request_headers.started request=<Request [b'GET']>
2025-12-31 09:27:37,517 INFO [_internal.py:97] 43564939cb 172.19.0.4 - - [31/Dec/2025 01:27:37] "POST /inner/api/invoke/llm HTTP/1.1" 200 -
2025-12-31 09:27:37,518 DEBUG [debug_logging.py:225]  Event: NodeRunAgentLogEvent
2025-12-31 09:27:37,518 DEBUG [_trace.py:47] 7e421c0deb send_request_headers.complete
2025-12-31 09:27:37,518 DEBUG [debug_logging.py:187]  📝 Stream chunk from 1766146760051: 

2025-12-31 09:27:37,519 DEBUG [_trace.py:47] 7e421c0deb send_request_body.started request=<Request [b'GET']>
2025-12-31 09:27:37,519 DEBUG [debug_logging.py:225]  Event: NodeRunAgentLogEvent
2025-12-31 09:27:37,519 DEBUG [_trace.py:47] 7e421c0deb send_request_body.complete
2025-12-31 09:27:37,520 DEBUG [debug_logging.py:225]  Event: NodeRunAgentLogEvent
2025-12-31 09:27:37,520 DEBUG [_trace.py:47] 7e421c0deb receive_response_headers.started request=<Request [b'GET']>
2025-12-31 09:27:37,542 DEBUG [_trace.py:47] 7e421c0deb receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Type', b'application/json; charset=utf-8'), (b'Date', b'Wed, 31 Dec 2025 01:27:37 GMT'), (b'Transfer-Encoding', b'chunked')])
2025-12-31 09:27:37,542 INFO [_client.py:1038] 7e421c0deb HTTP Request: GET http://192.168.0.188:5002/plugin/d8669796-681c-419a-8a68-2fefa954ac92/management/list?page=1&page_size=256&response_type=paged "HTTP/1.1 200 OK"
2025-12-31 09:27:37,542 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.started request=<Request [b'GET']>
2025-12-31 09:27:37,544 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.complete
2025-12-31 09:27:37,544 DEBUG [_trace.py:47] 7e421c0deb response_closed.started
2025-12-31 09:27:37,544 DEBUG [_trace.py:47] 7e421c0deb response_closed.complete
2025-12-31 09:27:37,544 DEBUG [_trace.py:47] 7e421c0deb close.started
2025-12-31 09:27:37,544 DEBUG [_trace.py:47] 7e421c0deb close.complete
2025-12-31 09:27:37,651 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False
2025-12-31 09:27:37,652 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem'
2025-12-31 09:27:37,679 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False
2025-12-31 09:27:37,680 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem'
2025-12-31 09:27:37,705 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False
2025-12-31 09:27:37,706 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem'
2025-12-31 09:27:37,731 DEBUG [_trace.py:47] 7e421c0deb connect_tcp.started host='192.168.0.188' port=5002 local_address=None timeout=600.0 socket_options=None
2025-12-31 09:27:37,732 DEBUG [_trace.py:47] 7e421c0deb connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7464c58ad580>
2025-12-31 09:27:37,732 DEBUG [_trace.py:47] 7e421c0deb send_request_headers.started request=<Request [b'GET']>
2025-12-31 09:27:37,732 DEBUG [_trace.py:47] 7e421c0deb send_request_headers.complete
2025-12-31 09:27:37,732 DEBUG [_trace.py:47] 7e421c0deb send_request_body.started request=<Request [b'GET']>
2025-12-31 09:27:37,732 DEBUG [_trace.py:47] 7e421c0deb send_request_body.complete
2025-12-31 09:27:37,732 DEBUG [_trace.py:47] 7e421c0deb receive_response_headers.started request=<Request [b'GET']>
2025-12-31 09:27:37,737 DEBUG [_trace.py:47] 7e421c0deb receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Type', b'application/json; charset=utf-8'), (b'Date', b'Wed, 31 Dec 2025 01:27:37 GMT'), (b'Transfer-Encoding', b'chunked')])
2025-12-31 09:27:37,737 INFO [_client.py:1038] 7e421c0deb HTTP Request: GET http://192.168.0.188:5002/plugin/d8669796-681c-419a-8a68-2fefa954ac92/management/tools?page=1&page_size=256 "HTTP/1.1 200 OK"
2025-12-31 09:27:37,737 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.started request=<Request [b'GET']>
2025-12-31 09:27:37,738 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.complete
2025-12-31 09:27:37,738 DEBUG [_trace.py:47] 7e421c0deb response_closed.started
2025-12-31 09:27:37,738 DEBUG [_trace.py:47] 7e421c0deb response_closed.complete
2025-12-31 09:27:37,738 DEBUG [_trace.py:47] 7e421c0deb close.started
2025-12-31 09:27:37,738 DEBUG [_trace.py:47] 7e421c0deb close.complete
2025-12-31 09:27:37,976 ERROR [base.py:277] 7e421c0deb Error in stream response for plugin {'code': -500, 'message': '{"message":"{\\"args\\":{},\\"error_type\\":\\"Exception\\",\\"message\\":\\"read llm model failed: request failed: req_id: 43564939cb PluginInvokeError: {\\\\\\"args\\\\\\":{\\\\\\"description\\\\\\":\\\\\\"[models] Error: API request failed with status code 400: {\\\\\\\\\\\\\\"error\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\"message\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"Missing `reasoning_content` field in the assistant message at message index 4. For more information, please refer to https://api-docs.deepseek.com/guides/thinking_mode#tool-calls\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"invalid_request_error\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"param\\\\\\\\\\\\\\":null,\\\\\\\\\\\\\\"code\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"invalid_request_error\\\\\\\\\\\\\\"}}\\\\\\"},\\\\\\"error_type\\\\\\":\\\\\\"InvokeError\\\\\\",\\\\\\"message\\\\\\":\\\\\\"[models] Error: API request failed with status code 400: {\\\\\\\\\\\\\\"error\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\"message\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"Missing `reasoning_content` field in the assistant message at message index 4. For more information, please refer to https://api-docs.deepseek.com/guides/thinking_mode#tool-calls\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"invalid_request_error\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"param\\\\\\\\\\\\\\":null,\\\\\\\\\\\\\\"code\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"invalid_request_error\\\\\\\\\\\\\\"}}\\\\\\"}\\"}","error_type":"PluginInvokeError","args":null}', 'data': None}
2025-12-31 09:27:37,976 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.failed exception=GeneratorExit()
Originally created by @leslie2046 on GitHub (Dec 30, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.11.2 ### Plugin version 0.0.28 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce <img width="1769" height="964" alt="Image" src="https://github.com/user-attachments/assets/3fd4c975-c701-4ade-afa0-90e2c3f063b9" /> ### ✔️ Error log ``` [on_llm_before_invoke] Model: deepseek-reasoner Parameters: Tools: current_time lunar_query get_weather Stream: True User: 4faa9894-8d6c-47b8-94fd-7c0226676db4 Prompt messages: role: system content: 你是一名助手 role: user content: 同时查询下当前时间和北京天气 role: assistant content: <think> 用户想要同时查询当前时间和北京天气。我有两个工具:current_time用于获取当前时间,get_weather用于查询天气。我需要同时调用这两个工具。它们都可以独立运行,没有依赖关系。所以,我可以同时调用它们。我来写一个同时调用这两个工具的代码块。 </think> role: assistant content: name: current_time role: tool content: 2025-12-31 09:27:35 role: assistant content: name: get_weather role: tool content: tool response: {"error_code": 0, "reason": "查询成功!", "result": {"city": "北京", "future": [{"date": "2025-12-31", "direct": "北风转西南风", "temperature": "-9/0℃", "weather": "晴", "wid": {"day": "00", "night": "00"}}, {"date": "2026-01-01", "direct": "东北风转北风", "temperature": "-8/1℃", "weather": "多云转晴", "wid": {"day": "01", "night": "00"}}, {"date": "2026-01-02", "direct": "西南风", "temperature": "-8/3℃", "weather": "晴", "wid": {"day": "00", "night": "00"}}, {"date": "2026-01-03", "direct": "西北风转北风", "temperature": "-4/5℃", "weather": "晴转多云", "wid": {"day": "00", "night": "01"}}, {"date": "2026-01-04", "direct": "西风转北风", "temperature": "-6/5℃", "weather": "多云转晴", "wid": {"day": "01", "night": "00"}}], "realtime": {"aqi": "13", "direct": "东北风", "humidity": "25", "info": "晴", "power": "3级", "temperature": "-6", "wid": "00"}}}. [on_llm_new_chunk]2025-12-31 09:27:37,61 DEBUG [_config.py:82] 43564939cb load_ssl_context verify=True cert=None trust_env=True http2=False 2025-12-31 09:27:37,64 DEBUG [_config.py:148] 43564939cb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem' 2025-12-31 09:27:37,68 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False 2025-12-31 09:27:37,69 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem' 2025-12-31 09:27:37,113 DEBUG [debug_logging.py:225] Event: NodeRunAgentLogEvent 2025-12-31 09:27:37,115 DEBUG [_config.py:82] 43564939cb load_ssl_context verify=True cert=None trust_env=True http2=False 2025-12-31 09:27:37,115 DEBUG [_config.py:148] 43564939cb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem' 2025-12-31 09:27:37,118 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False 2025-12-31 09:27:37,119 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem' 2025-12-31 09:27:37,156 DEBUG [_config.py:82] 43564939cb load_ssl_context verify=True cert=None trust_env=True http2=False 2025-12-31 09:27:37,156 DEBUG [_config.py:148] 43564939cb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem' 2025-12-31 09:27:37,157 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False 2025-12-31 09:27:37,158 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem' 2025-12-31 09:27:37,198 DEBUG [_trace.py:47] 43564939cb connect_tcp.started host='192.168.0.188' port=5002 local_address=None timeout=600.0 socket_options=None 2025-12-31 09:27:37,199 DEBUG [_trace.py:47] 7e421c0deb connect_tcp.started host='192.168.0.188' port=5002 local_address=None timeout=600.0 socket_options=None 2025-12-31 09:27:37,199 DEBUG [_trace.py:47] 43564939cb connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7464c58ad5b0> 2025-12-31 09:27:37,199 DEBUG [_trace.py:47] 43564939cb send_request_headers.started request=<Request [b'POST']> 2025-12-31 09:27:37,200 DEBUG [_trace.py:47] 43564939cb send_request_headers.complete 2025-12-31 09:27:37,200 DEBUG [_trace.py:47] 43564939cb send_request_body.started request=<Request [b'POST']> 2025-12-31 09:27:37,200 DEBUG [_trace.py:47] 7e421c0deb connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7464c584ff20> 2025-12-31 09:27:37,200 DEBUG [_trace.py:47] 43564939cb send_request_body.complete 2025-12-31 09:27:37,200 DEBUG [_trace.py:47] 7e421c0deb send_request_headers.started request=<Request [b'GET']> 2025-12-31 09:27:37,200 DEBUG [_trace.py:47] 43564939cb receive_response_headers.started request=<Request [b'POST']> 2025-12-31 09:27:37,200 DEBUG [_trace.py:47] 7e421c0deb send_request_headers.complete 2025-12-31 09:27:37,200 DEBUG [_trace.py:47] 7e421c0deb send_request_body.started request=<Request [b'GET']> 2025-12-31 09:27:37,201 DEBUG [_trace.py:47] 7e421c0deb send_request_body.complete 2025-12-31 09:27:37,201 DEBUG [_trace.py:47] 7e421c0deb receive_response_headers.started request=<Request [b'GET']> 2025-12-31 09:27:37,226 DEBUG [_trace.py:47] 7e421c0deb receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Type', b'application/json; charset=utf-8'), (b'Date', b'Wed, 31 Dec 2025 01:27:37 GMT'), (b'Transfer-Encoding', b'chunked')]) 2025-12-31 09:27:37,227 INFO [_client.py:1038] 7e421c0deb HTTP Request: GET http://192.168.0.188:5002/plugin/d8669796-681c-419a-8a68-2fefa954ac92/management/list?page=1&page_size=256&response_type=paged "HTTP/1.1 200 OK" 2025-12-31 09:27:37,227 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.started request=<Request [b'GET']> 2025-12-31 09:27:37,228 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.complete 2025-12-31 09:27:37,228 DEBUG [_trace.py:47] 7e421c0deb response_closed.started 2025-12-31 09:27:37,228 DEBUG [_trace.py:47] 7e421c0deb response_closed.complete 2025-12-31 09:27:37,229 DEBUG [_trace.py:47] 7e421c0deb close.started 2025-12-31 09:27:37,229 DEBUG [_trace.py:47] 7e421c0deb close.complete 2025-12-31 09:27:37,325 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False 2025-12-31 09:27:37,325 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem' 2025-12-31 09:27:37,351 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False 2025-12-31 09:27:37,351 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem' 2025-12-31 09:27:37,377 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False 2025-12-31 09:27:37,377 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem' 2025-12-31 09:27:37,403 DEBUG [_trace.py:47] 7e421c0deb connect_tcp.started host='192.168.0.188' port=5002 local_address=None timeout=600.0 socket_options=None 2025-12-31 09:27:37,404 DEBUG [_trace.py:47] 7e421c0deb connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7464c560fb60> 2025-12-31 09:27:37,404 DEBUG [_trace.py:47] 7e421c0deb send_request_headers.started request=<Request [b'GET']> 2025-12-31 09:27:37,404 DEBUG [_trace.py:47] 7e421c0deb send_request_headers.complete 2025-12-31 09:27:37,404 DEBUG [_trace.py:47] 7e421c0deb send_request_body.started request=<Request [b'GET']> 2025-12-31 09:27:37,404 DEBUG [_trace.py:47] 7e421c0deb send_request_body.complete 2025-12-31 09:27:37,404 DEBUG [_trace.py:47] 7e421c0deb receive_response_headers.started request=<Request [b'GET']> 2025-12-31 09:27:37,408 DEBUG [_trace.py:47] 7e421c0deb receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Type', b'application/json; charset=utf-8'), (b'Date', b'Wed, 31 Dec 2025 01:27:37 GMT'), (b'Transfer-Encoding', b'chunked')]) 2025-12-31 09:27:37,409 INFO [_client.py:1038] 7e421c0deb HTTP Request: GET http://192.168.0.188:5002/plugin/d8669796-681c-419a-8a68-2fefa954ac92/management/tools?page=1&page_size=256 "HTTP/1.1 200 OK" 2025-12-31 09:27:37,409 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.started request=<Request [b'GET']> 2025-12-31 09:27:37,410 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.complete 2025-12-31 09:27:37,410 DEBUG [_trace.py:47] 7e421c0deb response_closed.started 2025-12-31 09:27:37,410 DEBUG [_trace.py:47] 7e421c0deb response_closed.complete 2025-12-31 09:27:37,410 DEBUG [_trace.py:47] 7e421c0deb close.started 2025-12-31 09:27:37,410 DEBUG [_trace.py:47] 7e421c0deb close.complete 2025-12-31 09:27:37,431 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False 2025-12-31 09:27:37,431 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem' 2025-12-31 09:27:37,459 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False 2025-12-31 09:27:37,459 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem' 2025-12-31 09:27:37,485 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False 2025-12-31 09:27:37,486 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem' 2025-12-31 09:27:37,512 DEBUG [_trace.py:47] 7e421c0deb connect_tcp.started host='192.168.0.188' port=5002 local_address=None timeout=600.0 socket_options=None 2025-12-31 09:27:37,513 DEBUG [_trace.py:47] 43564939cb receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Type', b'text/event-stream'), (b'Date', b'Wed, 31 Dec 2025 01:27:37 GMT'), (b'Transfer-Encoding', b'chunked')]) 2025-12-31 09:27:37,513 INFO [_client.py:1038] 43564939cb HTTP Request: POST http://192.168.0.188:5002/plugin/d8669796-681c-419a-8a68-2fefa954ac92/dispatch/llm/invoke "HTTP/1.1 200 OK" 2025-12-31 09:27:37,513 DEBUG [_trace.py:47] 43564939cb receive_response_body.started request=<Request [b'POST']> 2025-12-31 09:27:37,514 ERROR [base.py:277] 43564939cb Error in stream response for plugin {'code': -500, 'message': '{"message":"{\\"args\\":{\\"description\\":\\"[models] Error: API request failed with status code 400: {\\\\\\"error\\\\\\":{\\\\\\"message\\\\\\":\\\\\\"Missing `reasoning_content` field in the assistant message at message index 4. For more information, please refer to https://api-docs.deepseek.com/guides/thinking_mode#tool-calls\\\\\\",\\\\\\"type\\\\\\":\\\\\\"invalid_request_error\\\\\\",\\\\\\"param\\\\\\":null,\\\\\\"code\\\\\\":\\\\\\"invalid_request_error\\\\\\"}}\\"},\\"error_type\\":\\"InvokeError\\",\\"message\\":\\"[models] Error: API request failed with status code 400: {\\\\\\"error\\\\\\":{\\\\\\"message\\\\\\":\\\\\\"Missing `reasoning_content` field in the assistant message at message index 4. For more information, please refer to https://api-docs.deepseek.com/guides/thinking_mode#tool-calls\\\\\\",\\\\\\"type\\\\\\":\\\\\\"invalid_request_error\\\\\\",\\\\\\"param\\\\\\":null,\\\\\\"code\\\\\\":\\\\\\"invalid_request_error\\\\\\"}}\\"}","error_type":"PluginInvokeError","args":null}', 'data': None} 2025-12-31 09:27:37,515 DEBUG [_trace.py:47] 43564939cb receive_response_body.failed exception=GeneratorExit() 2025-12-31 09:27:37,515 DEBUG [_trace.py:47] 43564939cb response_closed.started 2025-12-31 09:27:37,515 DEBUG [_trace.py:47] 7e421c0deb connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7464c560e060> 2025-12-31 09:27:37,515 DEBUG [_trace.py:47] 43564939cb response_closed.complete 2025-12-31 09:27:37,515 DEBUG [_trace.py:47] 7e421c0deb send_request_headers.started request=<Request [b'GET']> 2025-12-31 09:27:37,517 INFO [_internal.py:97] 43564939cb 172.19.0.4 - - [31/Dec/2025 01:27:37] "POST /inner/api/invoke/llm HTTP/1.1" 200 - 2025-12-31 09:27:37,518 DEBUG [debug_logging.py:225] Event: NodeRunAgentLogEvent 2025-12-31 09:27:37,518 DEBUG [_trace.py:47] 7e421c0deb send_request_headers.complete 2025-12-31 09:27:37,518 DEBUG [debug_logging.py:187] 📝 Stream chunk from 1766146760051: 2025-12-31 09:27:37,519 DEBUG [_trace.py:47] 7e421c0deb send_request_body.started request=<Request [b'GET']> 2025-12-31 09:27:37,519 DEBUG [debug_logging.py:225] Event: NodeRunAgentLogEvent 2025-12-31 09:27:37,519 DEBUG [_trace.py:47] 7e421c0deb send_request_body.complete 2025-12-31 09:27:37,520 DEBUG [debug_logging.py:225] Event: NodeRunAgentLogEvent 2025-12-31 09:27:37,520 DEBUG [_trace.py:47] 7e421c0deb receive_response_headers.started request=<Request [b'GET']> 2025-12-31 09:27:37,542 DEBUG [_trace.py:47] 7e421c0deb receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Type', b'application/json; charset=utf-8'), (b'Date', b'Wed, 31 Dec 2025 01:27:37 GMT'), (b'Transfer-Encoding', b'chunked')]) 2025-12-31 09:27:37,542 INFO [_client.py:1038] 7e421c0deb HTTP Request: GET http://192.168.0.188:5002/plugin/d8669796-681c-419a-8a68-2fefa954ac92/management/list?page=1&page_size=256&response_type=paged "HTTP/1.1 200 OK" 2025-12-31 09:27:37,542 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.started request=<Request [b'GET']> 2025-12-31 09:27:37,544 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.complete 2025-12-31 09:27:37,544 DEBUG [_trace.py:47] 7e421c0deb response_closed.started 2025-12-31 09:27:37,544 DEBUG [_trace.py:47] 7e421c0deb response_closed.complete 2025-12-31 09:27:37,544 DEBUG [_trace.py:47] 7e421c0deb close.started 2025-12-31 09:27:37,544 DEBUG [_trace.py:47] 7e421c0deb close.complete 2025-12-31 09:27:37,651 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False 2025-12-31 09:27:37,652 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem' 2025-12-31 09:27:37,679 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False 2025-12-31 09:27:37,680 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem' 2025-12-31 09:27:37,705 DEBUG [_config.py:82] 7e421c0deb load_ssl_context verify=True cert=None trust_env=True http2=False 2025-12-31 09:27:37,706 DEBUG [_config.py:148] 7e421c0deb load_verify_locations cafile='/home/leslie/share/code/dify/api/.venv/lib/python3.12/site-packages/certifi/cacert.pem' 2025-12-31 09:27:37,731 DEBUG [_trace.py:47] 7e421c0deb connect_tcp.started host='192.168.0.188' port=5002 local_address=None timeout=600.0 socket_options=None 2025-12-31 09:27:37,732 DEBUG [_trace.py:47] 7e421c0deb connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7464c58ad580> 2025-12-31 09:27:37,732 DEBUG [_trace.py:47] 7e421c0deb send_request_headers.started request=<Request [b'GET']> 2025-12-31 09:27:37,732 DEBUG [_trace.py:47] 7e421c0deb send_request_headers.complete 2025-12-31 09:27:37,732 DEBUG [_trace.py:47] 7e421c0deb send_request_body.started request=<Request [b'GET']> 2025-12-31 09:27:37,732 DEBUG [_trace.py:47] 7e421c0deb send_request_body.complete 2025-12-31 09:27:37,732 DEBUG [_trace.py:47] 7e421c0deb receive_response_headers.started request=<Request [b'GET']> 2025-12-31 09:27:37,737 DEBUG [_trace.py:47] 7e421c0deb receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Type', b'application/json; charset=utf-8'), (b'Date', b'Wed, 31 Dec 2025 01:27:37 GMT'), (b'Transfer-Encoding', b'chunked')]) 2025-12-31 09:27:37,737 INFO [_client.py:1038] 7e421c0deb HTTP Request: GET http://192.168.0.188:5002/plugin/d8669796-681c-419a-8a68-2fefa954ac92/management/tools?page=1&page_size=256 "HTTP/1.1 200 OK" 2025-12-31 09:27:37,737 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.started request=<Request [b'GET']> 2025-12-31 09:27:37,738 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.complete 2025-12-31 09:27:37,738 DEBUG [_trace.py:47] 7e421c0deb response_closed.started 2025-12-31 09:27:37,738 DEBUG [_trace.py:47] 7e421c0deb response_closed.complete 2025-12-31 09:27:37,738 DEBUG [_trace.py:47] 7e421c0deb close.started 2025-12-31 09:27:37,738 DEBUG [_trace.py:47] 7e421c0deb close.complete 2025-12-31 09:27:37,976 ERROR [base.py:277] 7e421c0deb Error in stream response for plugin {'code': -500, 'message': '{"message":"{\\"args\\":{},\\"error_type\\":\\"Exception\\",\\"message\\":\\"read llm model failed: request failed: req_id: 43564939cb PluginInvokeError: {\\\\\\"args\\\\\\":{\\\\\\"description\\\\\\":\\\\\\"[models] Error: API request failed with status code 400: {\\\\\\\\\\\\\\"error\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\"message\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"Missing `reasoning_content` field in the assistant message at message index 4. For more information, please refer to https://api-docs.deepseek.com/guides/thinking_mode#tool-calls\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"invalid_request_error\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"param\\\\\\\\\\\\\\":null,\\\\\\\\\\\\\\"code\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"invalid_request_error\\\\\\\\\\\\\\"}}\\\\\\"},\\\\\\"error_type\\\\\\":\\\\\\"InvokeError\\\\\\",\\\\\\"message\\\\\\":\\\\\\"[models] Error: API request failed with status code 400: {\\\\\\\\\\\\\\"error\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\"message\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"Missing `reasoning_content` field in the assistant message at message index 4. For more information, please refer to https://api-docs.deepseek.com/guides/thinking_mode#tool-calls\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"invalid_request_error\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"param\\\\\\\\\\\\\\":null,\\\\\\\\\\\\\\"code\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"invalid_request_error\\\\\\\\\\\\\\"}}\\\\\\"}\\"}","error_type":"PluginInvokeError","args":null}', 'data': None} 2025-12-31 09:27:37,976 DEBUG [_trace.py:47] 7e421c0deb receive_response_body.failed exception=GeneratorExit() ```
yindo added the bug label 2026-02-16 10:20:55 -05:00
yindo closed this issue 2026-02-16 10:20:55 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 30, 2025):

This error happens because the deepseek-reasoner API requires a reasoning_content field in each assistant message, but Dify's current tool call handling does not include this field when constructing messages for tool calls—especially when multiple tools are called in one round. The FunctionCallingAgentStrategy builds assistant messages with content and tool_calls, but never sets reasoning_content, which leads to the 400 error you see when using deepseek-reasoner with parallel tool calls. This is a model-specific requirement and is not yet handled in Dify's agent code for deepseek-reasoner or in the official plugins. There are no merged fixes or workarounds for this in recent PRs or issues. To resolve this, Dify would need to be updated to include reasoning_content in assistant messages for deepseek-reasoner tool calls, following the API's expectations as described in their documentation.

Reference: FunctionCallingAgentStrategy implementation

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 30, 2025): <!-- Answer --> This error happens because the deepseek-reasoner API requires a reasoning_content field in each assistant message, but Dify's current tool call handling does not include this field when constructing messages for tool calls—especially when multiple tools are called in one round. The FunctionCallingAgentStrategy builds assistant messages with content and tool_calls, but never sets reasoning_content, which leads to the 400 error you see when using deepseek-reasoner with parallel tool calls. This is a model-specific requirement and is not yet handled in Dify's agent code for deepseek-reasoner or in the official plugins. There are no merged fixes or workarounds for this in recent PRs or issues. To resolve this, Dify would need to be updated to include reasoning_content in assistant messages for deepseek-reasoner tool calls, following the API's expectations as described in their documentation. Reference: [FunctionCallingAgentStrategy implementation](https://github.com/langgenius/dify-official-plugins/blob/e2a4f30204137131f6665d90b27b04c52a887bd1/agent-strategies/cot_agent/strategies/function_calling.py#L93-L675) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/9ab49ecb-eb46-4544-a2ee-d3c26b7ee5c5?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/9ab49ecb-eb46-4544-a2ee-d3c26b7ee5c5?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/9ab49ecb-eb46-4544-a2ee-d3c26b7ee5c5?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/9ab49ecb-eb46-4544-a2ee-d3c26b7ee5c5?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9ab49ecb-eb46-4544-a2ee-d3c26b7ee5c5?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/9ab49ecb-eb46-4544-a2ee-d3c26b7ee5c5?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/9ab49ecb-eb46-4544-a2ee-d3c26b7ee5c5?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20error%20happens%20because%20the%20deepseek-reasoner%20API%20requires%20a%20reasoning_content%20field%20in%20each%20assistant%20message%2C%20but%20Dify%27s%20current%20tool%20call%20handling%20does%20not%20include%20this%20field%20when%20constructing%20messages%20for%20tool%20calls%E2%80%94especially%20when%20multiple%20tools%20are%20called%20in%20one%20round.%20The%20FunctionCallingAgentStrategy%20builds%20assistant%20messages%20with%20content%20and%20tool_calls%2C%20but%20never%20sets%20reasoning_content%2C%20which%20leads%20to%20the%20400%20error%20you%20see%20when%20using%20deepseek-reasoner%20with%20parallel%20tool%20calls.%20This%20is%20a%20model-specific%20requirement%20and%20is%20not%20yet%20handled%20in%20Dify%27s%20agent%20code%20for%20deepseek-reasoner%20or%20in%20the%20official%20plugins.%20There%20are%20no%20merged%20fixes%20or%20workarounds%20for%20this%20in%20recent%20PRs%20or%20issues.%20To%20resolve%20this%2C%20Dify%20would%20need%20to%20be%20updated%20to%20include%20reasoning_content%20in%20assistant%20messages%20for%20deepseek-reasoner%20tool%20calls%2C%20following%20the%20API%27s%20expectations%20as%20described%20in%20their%20documentation.%20%0A%0AReference%3A%20%5BFunctionCallingAgentStrategy%20implementation%5D%28https%3A//github.com/langgenius/dify-official-plugins/blob/e2a4f30204137131f6665d90b27b04c52a887bd1/agent-strategies/cot_agent/strategies/function_calling.py%23L93-L675%29)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/2350)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#912