Skip to content

fix(s08): recognize Anthropic "prompt is too long" for reactive compact - #565

Open
ZxlDragonDoctor wants to merge 1 commit into
shareAI-lab:mainfrom
ZxlDragonDoctor:fix/s08-prompt-is-too-long
Open

ZxlDragonDoctor wants to merge 1 commit into
shareAI-lab:mainfrom
ZxlDragonDoctor:fix/s08-prompt-is-too-long

Conversation

@ZxlDragonDoctor

Copy link
Copy Markdown

Problem

Anthropic documents context-window overflow as a 400 invalid_request_error with message prompt is too long. s08 only matches prompt_too_long and too many tokens, so reactive compact never runs and the error propagates.

Solution

  • Add prompt is too long to the overflow matcher in s08_context_compact/code.py
  • Sync README.md, README.zh.md, README.ja.md to document the third trigger

Fixes #560

Anthropic documents context overflow as "prompt is too long" (400 invalid_request_error).
s08 only matched prompt_too_long and too many tokens, so reactive compact never ran.

Fixes shareAI-lab#560
@ZxlDragonDoctor

Copy link
Copy Markdown
Author

Friendly ping - this PR has been open for a few days with no review activity. Happy to rebase, adjust scope, or add tests if anything is blocking. Thanks!

@ZxlDragonDoctor

Copy link
Copy Markdown
Author

Friendly ping - this PR is still open with no review activity. Happy to rebase, adjust scope, or adjust the patch if anything is blocking. Thanks!

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.

[s08] Reactive compaction does not recognize Anthropic's "prompt is too long" error

1 participant