[GH-ISSUE #2121] [BUG]: Scraping with agent does not leverage full context window #1381

Closed
opened 2026-02-22 18:24:32 -05:00 by yindo · 0 comments
Owner

Originally created by @mikaeluu85 on GitHub (Aug 15, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2121

Originally assigned to: @timothycarambat on GitHub.

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

An error is presented:

"This page's content is way too long. I will summarize it right now."

Expected outcome is full scrape, the page is limited in length and should fit in contect window (128k)

Per discussions on Discord with @timothycarambat:

Tim Carambat — Yesterday at 9:43 PM
Your model's context window is too small for the content - so it overflows and needs to be "summarized" so the model can digest it
What model, provider?
Mikael — Yesterday at 9:53 PM
Ah, so its model-related. I thought is was anythingllm related (desktop).
OpenAI gpt4o in this case.
But, isnt gpt4o like 128k?
Do the scrape use like html2text or similar lib?
Or is the contect all html?
Mikael — Yesterday at 10:00 PM
context*
Tim Carambat — Yesterday at 10:14 PM
its like html2text, but if you are using gpt-4o that is plenty of space for sure
Ah i see where this is going on:
https://github.com/Mintplex-Labs/anything-llm/blob/bdf37bf180a7920bff93c5dd75597d9a7ad2519a/server/utils/agents/aibitat/providers/ai-provider.js#L176
Mikael — Yesterday at 10:25 PM
Aha, the 8k I believe is the limit for non paid, no?
Or atleast I have read that somewhere.
Tim Carambat — Yesterday at 10:26 PM
Not anymore, it used to be the OpenAI limit but that does not apply anymore

Are there known steps to reproduce?

Using AnythingLLM desktop client, Version 1.6.2 (1.6.2) and macOS Sonoma (14.6.1).
Provider used: OpenAI with Paid API
LLM: GPT-4o and 3.5-16k

Invoke the agent scraper on for example:

https://www.deskbird.com/blog/office-space-planning

Originally created by @mikaeluu85 on GitHub (Aug 15, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2121 Originally assigned to: @timothycarambat on GitHub. ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? An error is presented: "This page's content is way too long. I will summarize it right now." Expected outcome is full scrape, the page is limited in length and should fit in contect window (128k) Per discussions on Discord with @timothycarambat: **Tim Carambat — Yesterday at 9:43 PM** Your model's context window is too small for the content - so it overflows and needs to be "summarized" so the model can digest it What model, provider? **Mikael — Yesterday at 9:53 PM** Ah, so its model-related. I thought is was anythingllm related (desktop). OpenAI gpt4o in this case. But, isnt gpt4o like 128k? Do the scrape use like html2text or similar lib? Or is the contect all html? **Mikael — Yesterday at 10:00 PM** context* **Tim Carambat — Yesterday at 10:14 PM** its like html2text, but if you are using gpt-4o that is plenty of space for sure Ah i see where this is going on: [https://github.com/Mintplex-Labs/anything-llm/blob/bdf37bf180a7920bff93c5dd75597d9a7ad2519a/server/utils/agents/aibitat/providers/ai-provider.js#L176](https://github.com/Mintplex-Labs/anything-llm/blob/bdf37bf180a7920bff93c5dd75597d9a7ad2519a/server/utils/agents/aibitat/providers/ai-provider.js#L176) **Mikael — Yesterday at 10:25 PM** Aha, the 8k I believe is the limit for non paid, no? Or atleast I have read that somewhere. **Tim Carambat — Yesterday at 10:26 PM** Not anymore, it used to be the OpenAI limit but that does not apply anymore ### Are there known steps to reproduce? Using AnythingLLM desktop client, Version 1.6.2 (1.6.2) and macOS Sonoma (14.6.1). Provider used: OpenAI with Paid API LLM: GPT-4o and 3.5-16k Invoke the agent scraper on for example: https://www.deskbird.com/blog/office-space-planning
yindo added the enhancement label 2026-02-22 18:24:32 -05:00
yindo closed this issue 2026-02-22 18:24:32 -05:00
yindo changed title from [BUG]: Scraping with agent does not leverage full context window to [GH-ISSUE #2121] [BUG]: Scraping with agent does not leverage full context window 2026-06-05 14:40:28 -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#1381