[GH-ISSUE #3345] [BUG]: Agent function run failure with deepseek reason model. #2155

Closed
opened 2026-02-22 18:28:22 -05:00 by yindo · 1 comment
Owner

Originally created by @colakang on GitHub (Feb 25, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3345

How are you running AnythingLLM?

Docker (local)

What happened?

Log:
[backend] info: [AgentHandler] Start da384db3-3886-4488-99ab-979354cb6529::deepseek:deepseek-reasoner
[backend] info: [TELEMETRY SENT] {"event":"agent_chat_started","distinctId":"6a267e67-572f-4790-a390-c3a6643224d6","properties":{"runtime":"docker"}}
[backend] info: [AgentHandler] Attached websocket plugin to Agent cluster
[backend] info: [AgentHandler] Attached chat-history plugin to Agent cluster
[backend] info: [AgentHandler] Attaching user and default agent to Agent cluster.
[backend] info: [AgentHandler] Attached create-chart plugin to Agent cluster
[backend] info: [AgentHandler] Attached web-browsing plugin to Agent cluster
[backend] info: [AgentHandler] Attached flow flow_d2b1f5ea-851c-44a7-94ab-57d4d4ad6ca3 (Meeting Notes) plugin to Agent cluster
[backend] info: [AgentLLM - deepseek-reasoner] Will assume chat completion without tool call inputs.
[backend] error: invalid json response body at https://api.deepseek.com/v1/chat/completions reason: Unexpected end of JSON input FetchError: invalid json response body at https://api.deepseek.com/v1/chat/completions reason: Unexpected end of JSON input
at /app/server/node_modules/node-fetch/lib/index.js:273:32
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async defaultParseResponse (/app/server/node_modules/openai/core.js:46:22)
at async DeepSeekProvider.complete (/app/server/utils/agents/aibitat/providers/deepseek.js:87:26)
at async AIbitat.handleExecution (/app/server/utils/agents/aibitat/index.js:596:24)
at async AIbitat.reply (/app/server/utils/agents/aibitat/index.js:578:21)
at async AIbitat.chat (/app/server/utils/agents/aibitat/index.js:374:15)
at async AIbitat.start (/app/server/utils/agents/aibitat/index.js:308:5)
at async /app/server/endpoints/agentWebsocket.js:52:7
[backend] info: [AgentHandler] End da384db3-3886-4488-99ab-979354cb6529::deepseek:deepseek-reasoner
[backend] info: [TokenManager] Returning existing instance for model: gpt-4o

Are there known steps to reproduce?

No response

Originally created by @colakang on GitHub (Feb 25, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3345 ### How are you running AnythingLLM? Docker (local) ### What happened? Log: [backend] info: [AgentHandler] Start da384db3-3886-4488-99ab-979354cb6529::deepseek:deepseek-reasoner [backend] info: [TELEMETRY SENT] {"event":"agent_chat_started","distinctId":"6a267e67-572f-4790-a390-c3a6643224d6","properties":{"runtime":"docker"}} [backend] info: [AgentHandler] Attached websocket plugin to Agent cluster [backend] info: [AgentHandler] Attached chat-history plugin to Agent cluster [backend] info: [AgentHandler] Attaching user and default agent to Agent cluster. [backend] info: [AgentHandler] Attached create-chart plugin to Agent cluster [backend] info: [AgentHandler] Attached web-browsing plugin to Agent cluster [backend] info: [AgentHandler] Attached flow flow_d2b1f5ea-851c-44a7-94ab-57d4d4ad6ca3 (Meeting Notes) plugin to Agent cluster [backend] info: [AgentLLM - deepseek-reasoner] Will assume chat completion without tool call inputs. [backend] error: invalid json response body at https://api.deepseek.com/v1/chat/completions reason: Unexpected end of JSON input FetchError: invalid json response body at https://api.deepseek.com/v1/chat/completions reason: Unexpected end of JSON input at /app/server/node_modules/node-fetch/lib/index.js:273:32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async defaultParseResponse (/app/server/node_modules/openai/core.js:46:22) at async DeepSeekProvider.complete (/app/server/utils/agents/aibitat/providers/deepseek.js:87:26) at async AIbitat.handleExecution (/app/server/utils/agents/aibitat/index.js:596:24) at async AIbitat.reply (/app/server/utils/agents/aibitat/index.js:578:21) at async AIbitat.chat (/app/server/utils/agents/aibitat/index.js:374:15) at async AIbitat.start (/app/server/utils/agents/aibitat/index.js:308:5) at async /app/server/endpoints/agentWebsocket.js:52:7 [backend] info: [AgentHandler] End da384db3-3886-4488-99ab-979354cb6529::deepseek:deepseek-reasoner [backend] info: [TokenManager] Returning existing instance for model: gpt-4o ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:28:22 -05:00
yindo closed this issue 2026-02-22 18:28:22 -05:00
Author
Owner

@timothycarambat commented on GitHub (Feb 26, 2025):

Please do not use a reasoning model for tool calling. Reasoning models are inherently "talkative" and are very bad at forming coherent and sensisble JSON outputs since the first 60% of a response is just . Reasoning models are great for thinking and solving complex logic, but not tool calling per se

@timothycarambat commented on GitHub (Feb 26, 2025): Please do not use a reasoning model for tool calling. Reasoning models are inherently "talkative" and are very bad at forming coherent _and sensisble_ JSON outputs since the first 60% of a response is just <think>. Reasoning models are great for thinking and solving complex logic, but not tool calling per se
yindo changed title from [BUG]: Agent function run failure with deepseek reason model. to [GH-ISSUE #3345] [BUG]: Agent function run failure with deepseek reason model. 2026-06-05 14:44:52 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2155