Skip to content

fix: enforce LiteAdmin MCP route permissions - #48080

Merged
tin-berri merged 7 commits into
mainfrom
litellm_mcp_key_authorization
Oct 30, 2026
Merged

tin-berri merged 7 commits into
mainfrom
litellm_mcp_key_authorization

Conversation

@tin-berri

@tin-berri tin-berri commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

This aligns management checks with the gateway’s existing access rules and improves compatibility across supported environments. Focused regression coverage keeps request handling and access isolation consistent.

Details

Changes

  • Use registered routes and shared authorization checks
  • Clarify the request-handling contract
  • Improve optional-dependency and Python compatibility
  • Keep generated API types synchronized

Verification

  • 89 focused management tests pass locally
  • make check passes
  • Three deliberate mutations are caught by the regression tests
  • Older supported Python versions skip connector-dependent cases correctly
  • Fresh CI and bot reviews are running for f5080d7bcdba619f3adec0c65d34b90f2e156be2

Live verification

Before/after checks used real local services and isolated test data. The recording at 73eae699ee0a3cb399fdaf7e404ed5953847a77a remains applicable to the current tip because the follow-up changes documentation and tests only

mcp-feature.mp4

Limitations

  • Hosted-mount verification was blocked by the available enterprise license
  • The standalone connector flow was verified
  • Existing connector restrictions on resource identifiers remain

Pre-submission checklist

  • Focused tests and local quality checks pass
  • Live verification completed for the affected flow
  • CI passes on the latest commit
  • Latest automated reviews are complete and addressed

@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.29730% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
litellm/proxy/admin_mcp.py 96.66% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@codspeed

codspeed Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ 1 benchmark is dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 38 untouched benchmarks
🆕 4 new benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 test_pdf_page_of_drawing_operators_and_no_image N/A 23.3 ms N/A
🆕 test_pdf_page_of_forms_sharing_one_resources_dictionary N/A 19.7 ms N/A
🆕 test_pdf_page_of_parent_forms_sharing_one_child_form N/A 305.6 ms N/A
🆕 test_token_counter_long_unknown_model_name N/A 2.2 ms N/A

Comparing litellm_mcp_key_authorization (f5080d7) with main (24afa12)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (e0778bc) during the generation of this report, so 24afa12 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@tin-berri tin-berri changed the title fix(admin-mcp): enforce credential route permissions fix: update LiteAdmin MCP integration Oct 23, 2026
@tin-berri

Copy link
Copy Markdown
Contributor Author

@greptileai

@tin-berri

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor

cursor Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Skipping Bugbot: Unable to authenticate your request. Please make sure Bugbot is properly installed and configured for this repository.

Tomvis added a commit to Tomvis/liteadmin-mcp that referenced this pull request Oct 24, 2026
…mcp_permissions (HW-217)

Upstream 31fb096 requires /user/info?admin_mcp=true to return
admin_mcp_permissions, which no LiteLLM release ships yet
(BerriAI/litellm#48080 open). Opt-in keeps the proxy_admin check and
shows every tool; gateways that return the field are still enforced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WL1AnKCfSVBCpVhFti8G46
@tin-berri

Copy link
Copy Markdown
Contributor Author

@greptileai

Please review the latest commit after merging main and resolving the lockfile conflict while preserving the LiteAdmin MCP dependency pin

@tin-berri

Copy link
Copy Markdown
Contributor Author

bugbot run

Please review the latest commit after merging main and resolving the lockfile conflict while preserving the LiteAdmin MCP dependency pin

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The latest test-only changes appear safe to merge

Summary

The PR makes Admin MCP permissions follow the caller's HTTP route grants. The latest commit simplifies test setup without changing production behavior

  • Admin MCP permissions follow the caller’s registered management routes.
  • The Rust beta mapping no longer lists Databricks for this Anthropic beta.

Reviews (5) · Last reviewed commit: "test(admin-mcp): simplify HTTP permissio..." · Reviewed by Greptile

Comment thread tests/unit/proxy/test_admin_mcp.py
Comment thread litellm/proxy/admin_mcp.py Outdated

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread litellm/proxy/admin_mcp.py Outdated
Comment thread litellm/proxy/admin_mcp.py Outdated
@tin-berri tin-berri changed the title fix: update LiteAdmin MCP integration fix: enforce LiteAdmin MCP route permissions Oct 29, 2026
@tin-berri

Copy link
Copy Markdown
Contributor Author

@greptileai

Please review commit 45fb345, including permission matching, older Python guards, and live proof. Local checks pass; CI is running

@tin-berri

Copy link
Copy Markdown
Contributor Author

bugbot run

Please review commit 45fb345 after the authorization fixes. Local checks pass, and the PR contains real before-and-after evidence

Comment thread litellm-rust/crates/llms-types/src/providers/anthropic/beta.rs

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@tin-berri

Copy link
Copy Markdown
Contributor Author

@greptileai

Please review 73eae69, including the Databricks call-path evidence. Live MCP proof is refreshed; local checks pass and CI is running

@tin-berri

Copy link
Copy Markdown
Contributor Author

bugbot run

Please review 73eae69 after merging main. Authorization code is unchanged from your clean review; live proof and local checks pass

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread litellm/proxy/admin_mcp.py
@tin-berri

Copy link
Copy Markdown
Contributor Author

bugbot run

Please review 35212f2 and the HTTP regression covering nested encoding. Removing decoding, double decoding, and plus conversion each fail

@tin-berri

Copy link
Copy Markdown
Contributor Author

@greptileai

Please review 35212f2. Added real HTTP regressions and clarified path encoding. All 89 admin MCP tests and make check pass

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@tin-berri

Copy link
Copy Markdown
Contributor Author

bugbot run

Please review f5080d7, including the focused HTTP encoding regression. Missing decoding, double decoding, and plus conversion all fail the tests

@tin-berri

Copy link
Copy Markdown
Contributor Author

@greptileai

Please review f5080d7. Simplified regression scaffolding while retaining all eight encoding cases. All 89 admin tests and local quality gates pass

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f5080d7. Configure here.

@tin-berri
tin-berri enabled auto-merge (squash) October 30, 2026 01:48
@tin-berri
tin-berri merged commit fd594ab into main Oct 30, 2026
118 checks passed
@tin-berri
tin-berri deleted the litellm_mcp_key_authorization branch October 30, 2026 02:00
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.

2 participants