-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
core[Component] This issue is related to the core interface and implementation[Component] This issue is related to the core interface and implementation
Description
When you have context compression enabled with a token limit lower than your model's limit, you can still get "stuck" with an error like:
litellm.ContextWindowExceededError: litellm.BadRequestError: AnthropicError - b'{"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 217388 tokens > 200000 maximum"},"request_id":"req_011CYGQ9pNMT8pdQbGzZcPUs"}'
This is because the context compression logic runs after the event is sent to the LLM. The context compression should either happen before running the LLM or detect an error like the above and compress and retry after.
See also
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
core[Component] This issue is related to the core interface and implementation[Component] This issue is related to the core interface and implementation