[litellm-agent] Staging → litellm_internal_staging (5/7/2026) - #27422
Conversation
Squash-merged by litellm-agent from oss-pr-review-agent-shin[bot]'s PR.
|
@greptile please review |
|
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
…26325) Squash-merged by litellm-agent from milan-berri's PR.
|
@greptile please review |
Greptile SummaryThis staging PR aggregates five independent feature/fix branches into
Confidence Score: 5/5Safe to merge — all changes are additive or narrowly scoped fixes with no backwards-incompatible behavior changes on existing flows. The auth changes (same-origin redirect validation, scope routing selector, team-ID consolidation) each extend previously-broken behavior in ways that are strictly more permissive for legitimate callers and no less restrictive for attackers. The guardrail reconciliation is append-only to the registry API and isolated behind the polling tick. The health-endpoint and tag-list changes are pure additions guarded by optional parameters. Every changed path has accompanying mock-only unit tests with good case coverage. No files require special attention.
|
| Filename | Overview |
|---|---|
| litellm/proxy/_experimental/mcp_server/oauth_utils.py | Adds get_request_base_url (moved from discoverable_endpoints.py) and new validate_trusted_redirect_uri that accepts same-origin or loopback URIs; edge cases are guarded and fall through to the more-restrictive loopback check. |
| litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py | Migrates get_request_base_url to oauth_utils, adds request: Request parameter to callback and _get_validated_client_redirect_uri, and switches both sinks to validate_trusted_redirect_uri. |
| litellm/proxy/auth/user_api_key_auth.py | Adds scope selector to JWT routing override matching with space-delimited splitting; wildcard patterns on non-scope claims reject whitespace-containing claim strings. |
| litellm/proxy/auth/handle_jwt.py | Adds get_all_jwt_team_ids that merges singular team_id_jwt_field and plural team_ids_jwt_field claims into a deduplicated list, intentionally excluding team_id_default. |
| litellm/proxy/guardrails/guardrail_registry.py | Adds _sources dict for db/config provenance tracking, get_source, and reconcile_db_guardrails that evicts stale DB-backed entries without touching config entries. |
| litellm/proxy/guardrails/guardrail_endpoints.py | List endpoint filters out in-memory entries tagged source='db' (stale); info endpoint 404s stale DB-backed entries instead of returning them as config guardrails. |
| litellm/proxy/health_endpoints/_health_endpoints.py | Prioritizes deployment lookup by model_info.id via get_deployment() before falling back to model_name search, fixing the disambiguation bug for wildcard deployments. |
| litellm/proxy/management_endpoints/tag_management_endpoints.py | Adds optional start_date/end_date query params to /tag/list; validation helper enforces YYYY-MM-DD format, mutual presence, and start <= end. |
| litellm/proxy/proxy_server.py | Adds reconcile_db_guardrails call after the DB polling loop; stale in-memory DB entries are evicted per polling cycle. |
| litellm/proxy/management_endpoints/ui_sso.py | Replaces get_team_ids_from_jwt with get_all_jwt_team_ids in both SSO branches so the singular team_id JWT field is merged into team membership. |
| litellm/proxy/_types.py | Adds optional scope field to JWTRoutingOverride and updates the docstring to clarify wildcard semantics and scope-specific space-delimited tokenization. |
| ui/litellm-dashboard/src/components/networking.tsx | Extends tagListCall with optional startTime/endTime Date parameters and appends start_date/end_date query params to the /tag/list request. |
| ui/litellm-dashboard/src/components/UsagePage/components/UsagePageView.tsx | Refactors tag fetching into a date-range-aware useEffect with cancellation token; re-fetches whenever accessToken, startTime, or endTime changes. |
| ui/litellm-dashboard/src/components/model_info_view.tsx | Forwards model_info.id to the test-connection backend call so the health endpoint can disambiguate wildcard deployments with the same model_name. |
| ui/litellm-dashboard/src/components/templates/key_info_view.tsx | Fixes layout: outer container switches from h-screen to h-full overflow-y-auto; Settings tab Card removes the max-h-[65vh] constraint. |
Reviews (2): Last reviewed commit: "fix(auth): harden JWT routing wildcard i..." | Re-trigger Greptile
Reject fnmatch wildcards on non-scope claims when the claim string contains whitespace so malformed iss values cannot match patterns like trusted.*. Merge every entry when team_id_jwt_field resolves to a list instead of keeping only the first element. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@greptile please review |
…05_07_2026 [litellm-agent] Staging → litellm_internal_staging (5/7/2026)
Automated staging PR created by litellm-agent.
This branch collects PRs approved by the agent on 5/7/2026.