litellm_fix(perf): skip global router_settings in per-request Router creation#20133
Closed
shin-bot-litellm wants to merge 1 commit intoBerriAI:mainfrom
Closed
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
1 task
Global settings already on shared router from startup. Removes redundant per-request Router creation. Issue BerriAI#19921
6da043b to
20aad2e
Compare
Contributor
Author
|
Closing - need deeper investigation first. The fix may be incomplete (DB query still happens on every request). Will reopen with proper fix after full analysis. |
cursor bot
pushed a commit
that referenced
this pull request
Feb 4, 2026
This documents the root causes and solutions for the 'All connection attempts failed' error that users experienced after upgrading to v1.81.x: 1. Per-request Router creation with expensive Prometheus initialization (fixed in #20087) 2. Redundant Router creation for global settings (fixed in #20133) 3. DB connection pool exhaustion with IAM auth (fixed in #13140) 4. Connection pool configuration recommendations Includes SQL queries to diagnose/clean router_settings and config recommendations. Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Issue: Global
router_settingsin DB trigger per-request Router creation, but they're already applied to the sharedllm_routerat startup.Fix
Remove global settings lookup from
_get_hierarchical_router_settings():Now only key/team-specific settings create per-request Routers.
Related