Skip to content

feat(provider): add Anthropic-specific markers to _is_context_overflow - #640

Closed
Tiktokaiagent wants to merge 1 commit into
use-agent-os:mainfrom
Tiktokaiagent:comp/613-anthropic-overflow-v2
Closed

feat(provider): add Anthropic-specific markers to _is_context_overflow#640
Tiktokaiagent wants to merge 1 commit into
use-agent-os:mainfrom
Tiktokaiagent:comp/613-anthropic-overflow-v2

Conversation

@Tiktokaiagent

Copy link
Copy Markdown
Contributor

Summary

Adds provider-specific context overflow markers to _is_context_overflow:

Anthropic: prompt_too_long, request_too_large, exceed context limit, request size exceeds, input length and max_tokens exceed context limit
OpenAI: maximum context length exceeded
Gemini: max_input_tokens, token count exceeds

Adds 7 parametrized test cases covering all providers.

Fixes #613
Closes #613

Adds Anthropic-specific context overflow markers (prompt_too_long,
request_too_large, 'exceed context limit', 'request size exceeds'),
along with OpenAI's 'maximum context length exceeded' and Gemini's
'max_input_tokens' / 'token count exceeds'.

Fixes use-agent-os#613
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.

[Feature]: Add Anthropic-specific markers to _is_context_overflow for context overflow classification

1 participant