Skip to content

Conversation

@ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Feb 13, 2026

Summary

Anthropic's "Input is too long for requested model" error was misclassified as api instead of context_exceeded, preventing users from seeing the compaction suggestion UI.

Closes #1702

Background

In categorizeError, the APICallError block only checked for "prompt is too long:" — the older Anthropic error format. The newer "Input is too long for requested model" variant fell through to return "api" and never reached the generic "too long" string match lower in the function (which only applies to plain Error instances, not APICallError).

Implementation

Added a second case-insensitive check for "input is too long" alongside the existing "prompt is too long" pattern inside the APICallError.isInstance() block.


Generated with mux • Model: anthropic:claude-opus-4-6 • Thinking: xhigh

The categorizeError function inside the APICallError block only matched
'prompt is too long:', missing the 'Input is too long for requested model'
variant. This caused it to fall through to 'api' instead of
'context_exceeded', preventing users from seeing the compaction suggestion UI.
@ethanndickson ethanndickson added this pull request to the merge queue Feb 13, 2026
Any commits made after this event will not be merged.
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 13, 2026
@ethanndickson ethanndickson added this pull request to the merge queue Feb 13, 2026
Any commits made after this event will not be merged.
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 13, 2026
@ethanndickson ethanndickson added this pull request to the merge queue Feb 13, 2026
Any commits made after this event will not be merged.
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 13, 2026
@ethanndickson ethanndickson added this pull request to the merge queue Feb 13, 2026
Any commits made after this event will not be merged.
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 13, 2026
@ethanndickson ethanndickson added this pull request to the merge queue Feb 13, 2026
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Input is too long for requested model" not classified as context_exceeded

1 participant