feat: extended /v1/models endpoint, now it returns with fallbacks on demand - #12811
Merged
5 commits merged intoJul 23, 2025
Merged
feat: extended /v1/models endpoint, now it returns with fallbacks on demand#128115 commits merged into
/v1/models endpoint, now it returns with fallbacks on demand#128115 commits merged into
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Nice feature! @murad-khafizov |
|
would be great to document this somewhere. Maybe under model access? https://docs.litellm.ai/docs/proxy/model_access open to your thoughts on this. |
4 tasks
Contributor
Author
Thanks for the hint, here is the PR to update the docs accordingly: |
fzowl
pushed a commit
to fzowl/litellm
that referenced
this pull request
Jun 24, 2026
…n demand (BerriAI#12811) * Extended `/v1/model` endpoint to support fallbacks * unit tests reworked * linting fixes * fix lining error * fix linting
This pull request was closed.
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.
Type
🆕 New Feature
Changes
Summary
Enhanced the existing
/v1/modelsendpoint to include completefallback information for models while maintaining full backward
compatibility. This enables clients to discover all available
fallbacks for each model based on the router's fallback
configuration.
Key Features
include_metadata: bool = False- Include additional metadatain response
fallback_type: Optional[str] = None- Specify fallback type(defaults to "general")
each model, not just the next one
general,context_window,and
content_policyfallbacks/v1/modelscalls workunchanged
enhancements
Implementation Details
Core Function (
litellm/proxy/auth/model_checks.py)