[GH-ISSUE #5232] [BUG]: Agent web scraping uses up to 4096 tokens doesn't follow user context value despite llm can go higher. #4978

Closed
opened 2026-06-05 14:51:15 -04:00 by yindo · 1 comment
Owner

Originally created by @fairol1988 on GitHub (Mar 18, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5232

How are you running AnythingLLM?

Docker (local)

What happened?

Scraping a website using ministral-3:3b.

Agent will give output that the page content exceeds the model's context limit. Summarizing it now.

Ollama ps shows llm context usage is just 4096 rather than user input of 30,000. LLM performance is also set to maximum.

Are there known steps to reproduce?

"@agent scrape http://address and check for issues"

webpage is json formatted table with characters up to 64,000. So i'm assuming token requirement of around 16000-20000.

this llm can support up to 256k tokens.

Originally created by @fairol1988 on GitHub (Mar 18, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5232 ### How are you running AnythingLLM? Docker (local) ### What happened? Scraping a website using ministral-3:3b. Agent will give output that the page content exceeds the model's context limit. Summarizing it now. Ollama ps shows llm context usage is just 4096 rather than user input of 30,000. LLM performance is also set to maximum. ### Are there known steps to reproduce? "@agent scrape http://address and check for issues" webpage is json formatted table with characters up to 64,000. So i'm assuming token requirement of around 16000-20000. this llm can support up to 256k tokens.
yindo added the possible bug label 2026-06-05 14:51:15 -04:00
yindo closed this issue 2026-06-05 14:51:15 -04:00
Author
Owner

@timothycarambat commented on GitHub (Mar 19, 2026):

Seems like Ollama is not reporting the context window for the model so that we can specify it?
https://github.com/Mintplex-Labs/anything-llm/blob/master/frontend/src/components/LLMSelection/OllamaLLMOptions/index.jsx#L187-L205

https://github.com/Mintplex-Labs/anything-llm/blob/master/server/utils/agents/aibitat/providers/ollama.js#L59-L66

Check the container logs - it will be reporting the exact number we are using for context during inference (agent and regular chat)

<!-- gh-comment-id:4092162993 --> @timothycarambat commented on GitHub (Mar 19, 2026): Seems like Ollama is not reporting the context window for the model so that we can specify it? https://github.com/Mintplex-Labs/anything-llm/blob/master/frontend/src/components/LLMSelection/OllamaLLMOptions/index.jsx#L187-L205 https://github.com/Mintplex-Labs/anything-llm/blob/master/server/utils/agents/aibitat/providers/ollama.js#L59-L66 Check the container logs - it will be reporting the exact number we are using for context during inference (agent and regular chat)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4978