Bedrock Claude "Input is too long" error with Thinking enabled & heavy context - Context window not pruning correctly #11750
Unanswered
jorgerodriguez93
asked this question in
Troubleshooting
Replies: 2 comments 7 replies
-
|
Can you export the conversation from the top right? Using these options:
Is this happening "mid-run" or as soon as you send a message? |
Beta Was this translation helpful? Give feedback.
3 replies
-
|
Later this week, I'm making improvements in this area including summarization, so hopefully that will help beyond the current state of the code. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
We are opening this issue as a follow-up to Discussion #11334. While a solution was suggested there, it has not resolved the problem in our production environment.
We are consistently encountering the Input is too long for requested model error when conversations become lengthy. This indicates that LibreChat is not correctly calculating the available context window to determine when to truncate or drop older messages/context.
It seems the current context management logic does not account for the combined overhead of:
Instead of pruning the conversation history to fit within the model's limit, LibreChat attempts to send a payload that exceeds the Bedrock limit.
Previous Attempts
As suggested in Discussion #11334, we attempted to adjust standard parameters
maxContextTokens, but the issue persists. The logic seems to fail, suggesting the token counting/subtraction logic might be off for this specific configuration.Version Information
[LibreChat v0.8.2]
Steps to Reproduce
Model & Configuration
Model: global.anthropic.claude-opus-4-5-20251101-v1:0
Max Output Tokens: 64000
Thinking Budget: 10000
Attachments:
file_context: ~10 files
file_search: ~8 files
Tools/MCP: Clickhouse MCP active.
What browsers are you seeing the problem on?
No response
Relevant log output
Screenshots
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions