Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this an expected behavior? Sonnet counts both input and max output tokens toward the 200k context window. #3618

Open
lavantien opened this issue Mar 23, 2025 · 0 comments

Comments

@lavantien
Copy link

lavantien commented Mar 23, 2025

Issue

Image

40k tokens prompt

litellm.BadRequestError: AnthropicException - b'{"type":"error","error":{"type":"invalid_request_error","message":"input length and `max_tokens` exceed context limit: 182831 + 64000 >
200000, decrease input length or `max_tokens` and try again"}}'

Version and model info

Aider v0.78.1.dev55+g502b8630
Main model: anthropic/claude-3-7-sonnet-20250219 with diff edit format, 46.9k think tokens, prompt cache, infinite output
Weak model: gemini/gemini-2.0-flash
Git repo: .git with 5,441 files
Repo-map: using 8192 tokens, files refresh
Multiline mode: Enabled.

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

No branches or pull requests

1 participant