[GH-ISSUE #5616] [BUG]: Error message: "error: 400 status code (no body) Error: 400 status code (no body)" #5196

Closed
opened 2026-06-05 14:52:34 -04:00 by yindo · 2 comments
Owner

Originally created by @attutude on GitHub (May 12, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5616

How are you running AnythingLLM?

Docker (remote machine)

What happened?

I discovered that in the workspace, when the vector database contains a large amount of vector data (e.g., 1700 or 3000 vectors in the workspace), sending messages with a low token count does not throw any errors and the message response works normally. However, when sending messages with a high token count (more than 10,000 tokens), the following error is thrown:

[backend] info: [TokenManager] Returning existing instance for model: DeepSeek-R1-LOCAL
[backend] error: 400 status code (no body) Error: 400 status code (no body)
at APIError.generate (/app/server/node_modules/openai/error.js:45:20)
at OpenAI.makeStatusError (/app/server/node_modules/openai/core.js:263:33)
at OpenAI.makeRequest (/app/server/node_modules/openai/core.js:306:30)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async LLMPerformanceMonitor.measureStream (/app/server/utils/helpers/chat/LLMPerformanceMonitor.js:67:20)
at async GenericOpenAiLLM.streamGetChatCompletion (/app/server/utils/AiProviders/genericOpenAi/index.js:195:35)
at async Object.streamChat (/app/server/utils/chats/apiChatHandler.js:665:20)
at async /app/server/endpoints/api/workspaceThread/index.js:594:9

Are there known steps to reproduce?

No response

LLM Provider & Model (if applicable)

No response

Embedder Provider & Model (if applicable)

No response

Originally created by @attutude on GitHub (May 12, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5616 ### How are you running AnythingLLM? Docker (remote machine) ### What happened? I discovered that in the workspace, when the vector database contains a large amount of vector data (e.g., 1700 or 3000 vectors in the workspace), sending messages with a low token count does not throw any errors and the message response works normally. However, when sending messages with a high token count (more than 10,000 tokens), the following error is thrown: [backend] info: [TokenManager] Returning existing instance for model: DeepSeek-R1-LOCAL [backend] error: 400 status code (no body) Error: 400 status code (no body) at APIError.generate (/app/server/node_modules/openai/error.js:45:20) at OpenAI.makeStatusError (/app/server/node_modules/openai/core.js:263:33) at OpenAI.makeRequest (/app/server/node_modules/openai/core.js:306:30) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async LLMPerformanceMonitor.measureStream (/app/server/utils/helpers/chat/LLMPerformanceMonitor.js:67:20) at async GenericOpenAiLLM.streamGetChatCompletion (/app/server/utils/AiProviders/genericOpenAi/index.js:195:35) at async Object.streamChat (/app/server/utils/chats/apiChatHandler.js:665:20) at async /app/server/endpoints/api/workspaceThread/index.js:594:9 <!-- Failed to upload "image.png" --> ### Are there known steps to reproduce? _No response_ ### LLM Provider & Model (if applicable) _No response_ ### Embedder Provider & Model (if applicable) _No response_
yindo added the possible bugneeds info / can't replicate labels 2026-06-05 14:52:34 -04:00
yindo closed this issue 2026-06-05 14:52:35 -04:00
Author
Owner

@attutude commented on GitHub (May 12, 2026):

When the vector database in the workspace contains only a small amount of vector data, sending messages with a high token count (more than 10,000 tokens) does not trigger any errors, and the message response is normal.

<!-- gh-comment-id:4429210169 --> @attutude commented on GitHub (May 12, 2026): When the vector database in the workspace contains only a small amount of vector data, sending messages with a high token count (more than 10,000 tokens) does not trigger any errors, and the message response is normal.
Author
Owner

@timothycarambat commented on GitHub (May 12, 2026):

Can you disclose what the generic connector you are using is? This seems like a simple context limit overflow issue and that the context window being used in AnythingLLM is higher than what the service can provide and so it 400's based on the request since there are too many tokens in the request to process.

<!-- gh-comment-id:4435087300 --> @timothycarambat commented on GitHub (May 12, 2026): Can you disclose what the generic connector you are using is? This seems like a simple context limit overflow issue and that the context window being used in AnythingLLM is higher than what the service can provide and so it 400's based on the request since there are too many tokens in the request to process.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#5196