Skip to content

Fix raising wrong 429 error on wrong exception - #16482

Merged
ishaan-jaff merged 2 commits into
mainfrom
litellm_wrong_429_error
Nov 13, 2025
Merged

Fix raising wrong 429 error on wrong exception#16482
ishaan-jaff merged 2 commits into
mainfrom
litellm_wrong_429_error

Conversation

@Sameerlite

@Sameerlite Sameerlite commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

Title

Fix raising wrong 429 error on wrong exception

Relevant issues

Fixes LIT-1142

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🐛 Bug Fix

Changes

  • The issue was that earlier is_error_str_rate_limit method only checked if 429 exists in the string, so this meant even a string like "Invalid user message={'role': 'user', 'content': ['asbjdad429addad']..." would also be considered as a rate limit error. But now i have updated it to more robust code to check the error string

@vercel

vercel Bot commented Nov 11, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
litellm Error Error Nov 11, 2025 4:10pm

@Sameerlite
Sameerlite marked this pull request as ready for review November 11, 2025 16:10

@ishaan-jaff ishaan-jaff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ishaan-jaff
ishaan-jaff merged commit 92bd12c into main Nov 13, 2025
38 of 53 checks passed
@ishaan-berri
ishaan-berri deleted the litellm_wrong_429_error branch March 26, 2026 21:56
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
* fix raising wrong 429 error on wrong exception

* remove double re import
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.

2 participants