litellm/litellm/models
tin-berri db2402754a
feat(mcp): let users select the entra_obo token_exchange profile in the UI and API (#32144)
* feat(mcp): let users select the entra_obo token_exchange profile in the UI and API

The backend token_exchange arm supports two wire dialects via token_exchange_profile
("rfc8693" default, or "entra_obo" for Microsoft Entra's On-Behalf-Of, the RFC 7523
jwt-bearer grant), but it could only be set through config.yaml. This surfaces it to the
create/update REST API and the dashboard so an admin can create an entra_obo server there,
completing the parity started in the parent PR for the other token-exchange fields.

token_exchange_profile becomes a dedicated column on LiteLLM_MCPServerTable, mirroring the
sibling fields: it is added to the request models, read column-first in
build_mcp_server_from_table with the credentials-blob as a back-compat fallback and a
default of rfc8693, and carried through both runtime-to-table builders so registry
round-trips preserve it. It is a non-secret dialect selector, so it is not scrubbed from
non-admin or virtual-key responses.

In the dashboard a Profile dropdown (RFC 8693 vs Microsoft Entra OBO) is added to the
token-exchange section. Entra OBO carries the target resource in the scope, so selecting it
makes the scope required and hints the api://<app-id>/.default form, while audience and
subject_token_type (which that dialect ignores) are hidden.

* fix(mcp): extend the blob-to-column lift and non-admin scrubbing to token_exchange_profile

token_exchange_profile gets the same storage contract as the other three
token-exchange settings: the column is authoritative, a blob copy is the legacy
shape — lifted into the column on every write and stripped from the stored
blob — and switching auth_type away from token exchange clears it
(_AUTH_FLOW_SCOPED_FIELDS). Both restricted-view sanitizers scrub it for
uniformity, and the edit form's auth-switch payload nulling includes it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(mcp): assert every token-exchange setting is configurable via config.yaml

Pins the config surface: token_exchange_endpoint, audience, subject_token_type
and token_exchange_profile load from top-level config keys onto the built
server and through to the resolver spec; omitted keys resolve to their
documented defaults (RFC 8693 subject token type, rfc8693 profile), and
token_exchange servers need no oauth2_flow.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 16:39:20 -07:00
..
__init__.py feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
access_group.py feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
base.py feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
budget.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
config.py feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
credentials.py feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
end_user.py feat(proxy): type Customer Management response_model for OpenAPI coverage (#31043) 2026-06-30 09:58:01 -07:00
managed_files.py fix(proxy): stop CacheCodec dropping null fields on cache round-trip (#32207) 2026-07-06 12:53:00 -07:00
mcp_server.py feat(mcp): let users select the entra_obo token_exchange profile in the UI and API (#32144) 2026-07-07 16:39:20 -07:00
model.py feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
object_permission.py feat(mcp): add mcp_tool_search virtual tools for large tool catalogs (#31777) 2026-06-30 20:03:59 -07:00
organization.py feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
organization_membership.py feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
project.py feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
skills.py feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
spend_logs.py feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
tag.py feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
team.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
team_membership.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
user.py feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
verification_token.py feat(proxy): add key-level budget_fallbacks to reroute requests when a per-model budget is exceeded (#31783) 2026-07-03 12:20:12 -07:00