Skip to content

[Feature] Adding Optional scope Param to /models#19539

Merged
yuneng-jiang merged 1 commit intomainfrom
litellm_models_scope
Jan 22, 2026
Merged

[Feature] Adding Optional scope Param to /models#19539
yuneng-jiang merged 1 commit intomainfrom
litellm_models_scope

Conversation

@yuneng-jiang
Copy link
Collaborator

Relevant issues

This PR adds an optional scope param to the /models endpoint. When a team admin, org admin, or proxy admin calls /models with the scope=expands, this will override and show all proxy models. This is to support the new logic around model select on the UI, where team admins and org admins need access to all proxy models.

Tested with the following:

  1. Org admin: User has no-default-models, Org has all-proxy-models
  2. Team admin: User has no-default-models, team has all-proxy-models

endpoint behaves as expected, and returns all proxy models

Tested the regular case:

  1. Normal Internal user with no-default-models, not in a team or an org

endpoint behaves as expected, and only returns no-default-models

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
  • 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

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Type

🆕 New Feature
✅ Test

Changes

image

@vercel
Copy link

vercel bot commented Jan 22, 2026

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

Project Deployment Review Updated (UTC)
litellm Ready Ready Preview, Comment Jan 22, 2026 0:44am

Request Review

@yuneng-jiang yuneng-jiang merged commit 6b6785b into main Jan 22, 2026
48 of 62 checks passed
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.

1 participant