AnythingLLM agent tools previously passed an object instead of a string to the context limit caller, causing a silent fallback to an 8K context window. This update adds type validation and error logging to ensure user-defined context windows are respected, preventing errors when processing large documents.
Resolves a type mismatch in agent tool execution that caused silent fallback to a default 8K context window by enforcing strict type validation and adding verbose error logging for provider context limits.
Users processing large documents with AnythingLLM agents will no longer experience silent text truncation or unexpected errors caused by the system ignoring their custom context window settings. The fix enforces strict type validation on context limit parameters across web-scraping, document summarization, and filesystem tools, replacing a silent 8K fallback with explicit error logging. Developers integrating custom tools should monitor if the new strict type checking exposes other unhandled object types in their workflows.