aider icon indicating copy to clipboard operation
aider copied to clipboard

litellm.APIError: APIError: OpenrouterException -

Open lockmeister opened this issue 1 year ago • 0 comments

Update: Solved caused by lack of funds at openrouter. It would be handy to have a more informative error message if possible

after hitting a rate limit using Sonnet 3.5, I switched to openrouter. However I then got a litellm error. I tried restarting aider and also checked my internet connection but the problem persisted.

sequence of actions and outputs:

after hitting rate limit: litellm.RateLimitError: AnthropicException - {"type":"error","error":{"type":"rate_limit_error","message":"Number of request tokens has exceeded your daily rate limit (https://docs.anthropic.com/en/api/rate-limits); see the response headers for current usage. Please reduce the prompt length or the maximum tokens requested, or try again later. You may also contact sales at https://www.anthropic.com/contact-sales to discuss your options for a rate limit increase."}} Retrying in 0.2 seconds...

then /model openrouter/anthropic/claude-3.5-sonnet

Then litellm.APIError: APIError: OpenrouterException -

I also tried gpt4 with same issue.

UPDATE: soon after I got this: Cache warming error: litellm.RateLimitError: AnthropicException - {"type":"error","error":{"type":"rate_limit_error","message":"Number of request tokens has exceeded your daily rate limit (https://docs.anthropic.com/en/api/rate-limits); see the response headers for current usage. Please reduce the prompt length or the maximum tokens requested, or try again later. You may also contact sales at https://www.anthropic.com/contact-sales to discuss your options for a rate limit increase."}}

Aider version: 0.57.1 Python version: 3.10.12 Platform: Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 Python implementation: CPython Virtual environment: Yes OS: Linux 5.15.153.1-microsoft-standard-WSL2 (64bit) Git version: git version 2.34.1

Aider v0.57.1 Main model: openrouter/anthropic/claude-3.5-sonnet with diff edit format, prompt cache, infinite output Weak model: openrouter/anthropic/claude-3-haiku-20240307 Git repo: .git with 20 files Repo-map: using 1024 tokens, files refresh

lockmeister avatar Sep 26 '24 03:09 lockmeister