mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
fix(router): wildcard-aware deployment lookup for order-based fallback
Use get_model_list() instead of _get_all_deployments() so pattern-routed model groups (e.g. openai/* -> openai/gpt-4.1-mini) are included when computing the deployment order set for fallback logic. Made-with: Cursor
This commit is contained in:
parent
28b5e2e450
commit
79ee78ece0
1 changed files with 4 additions and 2 deletions
|
|
@ -5358,9 +5358,11 @@ class Router:
|
|||
_request_team_id: Optional[str] = (
|
||||
kwargs.get("metadata", {}) or {}
|
||||
).get("user_api_key_team_id")
|
||||
all_deployments = self._get_all_deployments(
|
||||
# Use wildcard-aware lookup so order-based fallback also works for model
|
||||
# groups resolved via pattern routing (e.g. `openai/*` -> `openai/gpt-4.1-mini`).
|
||||
all_deployments = self.get_model_list(
|
||||
model_name=original_model_group, team_id=_request_team_id
|
||||
)
|
||||
) or []
|
||||
_order_set: set = {
|
||||
litellm.utils._get_deployment_order(d)
|
||||
for d in all_deployments
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue