[GH-ISSUE #5374] [BUG]: Anthropic's SDK changes breaks non-streaming responses on Agent LLM Instruction #5051

Closed
opened 2026-06-05 14:51:45 -04:00 by yindo · 0 comments
Owner

Originally created by @bhtabor on GitHub (Apr 7, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5374

How are you running AnythingLLM?

Docker (local)

What happened?

Agent Flow LLM Instruction is returning the following error for all the recent Anthropic models.

[backend] info: [TELEMETRY SENT] {"event":"agent_flow_execution_started","distinctId":"bff9019e-a3bc-4565-98c9-ce15ddb839e2","properties":{"runtime":"docker"}}
[backend] info: [EphemeralAgentHandler] [AgentFlowToolExecutor] - executing API Call block
[backend] info: [EphemeralAgentHandler] [AgentFlowToolExecutor] - executing LLM Instruction block
[backend] info: [EphemeralAgentHandler] Sending request to LLM (anthropic::claude-haiku-4-5-20251001)
[backend] info: [EphemeralAgentHandler] LLM processing failed: Streaming is strongly recommended for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-python#streaming-responses for more details Error: Streaming is strongly recommended for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-python#streaming-responses for more details
    at Anthropic._calculateNonstreamingTimeout (/app/server/node_modules/@anthropic-ai/sdk/core.js:284:19)
    at Messages.create (/app/server/node_modules/@anthropic-ai/sdk/resources/messages/messages.js:46:54)
    at AnthropicProvider.complete (/app/server/utils/agents/aibitat/providers/anthropic.js:396:51)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async executeLLMInstruction (/app/server/utils/agentFlows/executors/llm-instruction.js:27:24)
    at async FlowExecutor.executeStep (/app/server/utils/agentFlows/executor.js:162:18)
    at async FlowExecutor.executeFlow (/app/server/utils/agentFlows/executor.js:207:24)
    at async AgentFlows.executeFlow (/app/server/utils/agentFlows/index.js:174:12)
    at async Object.handler (/app/server/utils/agentFlows/index.js:246:30)
    at async AIbitat.handleAsyncExecution (/app/server/utils/agents/aibitat/index.js:896:22)
    at async AIbitat.reply (/app/server/utils/agents/aibitat/index.js:775:17)
    at async AIbitat.chat (/app/server/utils/agents/aibitat/index.js:487:15)
    at async AIbitat.start (/app/server/utils/agents/aibitat/index.js:421:5) 

A related issue is reported on https://github.com/evalstate/fast-agent/issues/186

Using agent streaming on llm instruction completion helped fix this issue for me https://github.com/bhtabor/anything-llm/commit/c606be77a8e197457f3893b6b63b3c973365d351

Are there known steps to reproduce?

Use LLM Instruction in Agent Flow

LLM Provider & Model (if applicable)

Anthropic / All Recent models (Haiku 3 works)

Embedder Provider & Model (if applicable)

No response

Originally created by @bhtabor on GitHub (Apr 7, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5374 ### How are you running AnythingLLM? Docker (local) ### What happened? Agent Flow LLM Instruction is returning the following error for all the recent Anthropic models. ``` [backend] info: [TELEMETRY SENT] {"event":"agent_flow_execution_started","distinctId":"bff9019e-a3bc-4565-98c9-ce15ddb839e2","properties":{"runtime":"docker"}} [backend] info: [EphemeralAgentHandler] [AgentFlowToolExecutor] - executing API Call block [backend] info: [EphemeralAgentHandler] [AgentFlowToolExecutor] - executing LLM Instruction block [backend] info: [EphemeralAgentHandler] Sending request to LLM (anthropic::claude-haiku-4-5-20251001) [backend] info: [EphemeralAgentHandler] LLM processing failed: Streaming is strongly recommended for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-python#streaming-responses for more details Error: Streaming is strongly recommended for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-python#streaming-responses for more details at Anthropic._calculateNonstreamingTimeout (/app/server/node_modules/@anthropic-ai/sdk/core.js:284:19) at Messages.create (/app/server/node_modules/@anthropic-ai/sdk/resources/messages/messages.js:46:54) at AnthropicProvider.complete (/app/server/utils/agents/aibitat/providers/anthropic.js:396:51) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async executeLLMInstruction (/app/server/utils/agentFlows/executors/llm-instruction.js:27:24) at async FlowExecutor.executeStep (/app/server/utils/agentFlows/executor.js:162:18) at async FlowExecutor.executeFlow (/app/server/utils/agentFlows/executor.js:207:24) at async AgentFlows.executeFlow (/app/server/utils/agentFlows/index.js:174:12) at async Object.handler (/app/server/utils/agentFlows/index.js:246:30) at async AIbitat.handleAsyncExecution (/app/server/utils/agents/aibitat/index.js:896:22) at async AIbitat.reply (/app/server/utils/agents/aibitat/index.js:775:17) at async AIbitat.chat (/app/server/utils/agents/aibitat/index.js:487:15) at async AIbitat.start (/app/server/utils/agents/aibitat/index.js:421:5) ``` A related issue is reported on https://github.com/evalstate/fast-agent/issues/186 Using agent streaming on llm instruction completion helped fix this issue for me https://github.com/bhtabor/anything-llm/commit/c606be77a8e197457f3893b6b63b3c973365d351 ### Are there known steps to reproduce? Use LLM Instruction in Agent Flow ### LLM Provider & Model (if applicable) Anthropic / All Recent models (Haiku 3 works) ### Embedder Provider & Model (if applicable) _No response_
yindo added the possible bug label 2026-06-05 14:51:45 -04:00
yindo closed this issue 2026-06-05 14:51:45 -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#5051