Commit graph

35876 commits

Author SHA1 Message Date
Yuneng Jiang
ac4ff60654
chore: fixes
Some checks failed
Unit Tests: Caching (Redis) / caching-redis (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (auth-checks, tests/proxy_unit_tests/test_auth_checks.py tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (key-generation, tests/proxy_unit_tests/test_key_generate_prisma.py, 30, 0) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (remaining, tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Has been cancelled
Unit Tests: Security / security (push) Has been cancelled
2026-04-05 00:41:50 -07:00
yuneng-jiang
21b0ff9662 Fix incomplete string escaping in public_model_hub.tsx
Use replaceAll() instead of replace() to ensure all occurrences of "*"
are replaced, not just the first one.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 17:59:43 -07:00
yuneng-jiang
d8e4fc4dd0
Merge pull request #24260 from BerriAI/litellm_yj_march_19_2026
[Infra] Merge internal dev branch with main
2026-03-20 17:35:19 -07:00
yuneng-jiang
2ca4fa6189
Merge branch 'main' into litellm_yj_march_19_2026 2026-03-20 17:28:41 -07:00
yuneng-jiang
e6e3085845
Merge pull request #24258 from joereyna/fix/anthropic-file-content-test-mock
fix(test): mock get_auth_header instead of get_api_key in anthropic file content test
2026-03-20 16:14:59 -07:00
yuneng-jiang
e678ddea43 Fix unreachable special MCP server name guard in add_mcp_server
The special name check (all_team_servers, all_proxy_servers) was an elif
after the server_id-is-not-None check, making it unreachable since special
names are non-None strings. Split into separate if blocks so the special
name guard runs before the duplicate-ID check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 16:12:48 -07:00
joereyna
f0e0d98f86 fix(test): mock get_auth_header instead of get_api_key in anthropic file content test 2026-03-20 16:07:09 -07:00
yuneng-jiang
6862930538 Revert test to match reverted team MCP manager feature
The team MCP manager feature was reverted in PR #24255, so the test
needs to go back to the original single auth failure test that expects
a 403 for non-admin users.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 15:44:00 -07:00
yuneng-jiang
1fad0d557d
Merge pull request #24255 from BerriAI/revert-24171-litellm_/awesome-dhawan
Revert "[Feature] Team MCP Server Manager Role"
2026-03-20 15:42:10 -07:00
yuneng-jiang
c9683c6f97
Revert "[Feature] Team MCP Server Manager Role" 2026-03-20 15:41:57 -07:00
ryan-crabbe
72c307df0e
Merge pull request #24217 from BerriAI/litellm_ryan_march_18
feat: add control plane for multi-proxy worker management
2026-03-20 14:05:19 -07:00
Ryan Crabbe
541863a566 Merge branch 'litellm_ryan_march_18' of https://github.com/BerriAI/litellm into litellm_ryan_march_18 2026-03-20 13:58:32 -07:00
Ryan Crabbe
6f81eb01fe fix: apply Black formatting to ui_sso.py 2026-03-20 13:57:26 -07:00
ryan-crabbe
59b4a05782
Merge branch 'main' into litellm_ryan_march_18 2026-03-20 13:36:37 -07:00
yuneng-jiang
ba4aae02c7 Fix outdated MCP server auth test for team MCP manager flow
The test_create_mcp_server_auth_failure test expected a 403 for non-admin
users, but the team MCP manager feature changed the auth flow to first
check for team_id (400) before checking permissions. Split into two tests:
one for missing team_id (400) and one for non-manager rejection (403).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 13:10:10 -07:00
yuneng-jiang
5d317c3a5c Merge remote-tracking branch 'origin' into litellm_yj_march_19_2026 2026-03-20 12:59:21 -07:00
yuneng-jiang
50f88c8642
Merge pull request #24243 from BerriAI/litellm_/gifted-spence
[Docs] Add missing team_member_budget_duration param to new_team docstring
2026-03-20 12:51:13 -07:00
yuneng-jiang
4d198558c8
Merge branch 'main' into litellm_/gifted-spence 2026-03-20 12:44:20 -07:00
yuneng-jiang
404c68c74b Add missing team_member_budget_duration param to new_team docstring
Fixes CI failure in test_api_docs.py which validates that all Pydantic
model fields are documented in endpoint docstrings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 12:42:35 -07:00
yuneng-jiang
3ea69c9539 Merge remote-tracking branch 'origin' into litellm_yj_march_19_2026 2026-03-20 12:37:26 -07:00
yuneng-jiang
b36269e2c1
Merge pull request #24171 from BerriAI/litellm_/awesome-dhawan
[Feature] Team MCP Server Manager Role
2026-03-20 12:30:50 -07:00
yuneng-jiang
700fd86de9 Fix importorskip guard and add LiteLLM_TeamTableCachedObj import
- Add pytest.importorskip("mcp") at module level so tests skip cleanly
  in CI environments without the mcp package (instead of ImportError)
- Import LiteLLM_TeamTableCachedObj into MCP_AVAILABLE block so type
  annotations resolve for static analysis and get_type_hints()
- Remove string quotes from type annotations now that the import exists

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 12:13:09 -07:00
yuneng-jiang
c6ffda9671
Merge pull request #23484 from michelligabriele/fix/team-member-budget-duration-on-create
fix(proxy): add team_member_budget_duration to NewTeamRequest
2026-03-20 11:56:30 -07:00
yuneng-jiang
f884e4ac66
Merge branch 'main' into fix/team-member-budget-duration-on-create 2026-03-20 11:48:08 -07:00
ryan-crabbe
d381b58570
Merge branch 'main' into litellm_ryan_march_18 2026-03-20 11:44:45 -07:00
yuneng-jiang
1cd7a48c33 Add tests for edit and delete MCP server manager paths
Addresses Greptile feedback about missing integration tests for PUT/DELETE
when invoked by mcp_server_manager role. Adds tests for edit success/403,
delete success with team cleanup/403, and the _remove_mcp_server_from_team
helper directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 09:19:53 -07:00
yuneng-jiang
b8c9bf7d25 refactor: extract _auto_assign and _remove helpers, use team_endpoints helper
- Replace raw prisma_client.db.litellm_teamtable.update with
  handle_update_object_permission from team_endpoints (follows
  established helper-function pattern)
- Extract _auto_assign_mcp_server_to_team and
  _remove_mcp_server_from_team helpers for reuse and testability
- Update tests to mock at the correct boundaries

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 09:05:18 -07:00
yuneng-jiang
8c396e5ca9
Merge pull request #24172 from BerriAI/litellm_extract_useChatHistory_hook
[Refactor] Extract useChatHistory hook from ChatUI.tsx
2026-03-20 00:17:07 -07:00
yuneng-jiang
bdf24757c0
Merge pull request #24189 from BerriAI/litellm_teams_table_modernize
[Feature] UI - Teams: Modernize Teams Table
2026-03-20 00:16:47 -07:00
yuneng-jiang
9b519c4754
Merge pull request #24192 from BerriAI/litellm_migrate_antd_message_to_context_api
[Fix] UI: AntD Messages Not Rendering
2026-03-20 00:16:04 -07:00
Joe Reyna
d7c419bfee
Merge pull request #24179 from joereyna/fix/upgrade-mcp-1.26.0
fix: upgrade mcp to 1.26.0 and bump version to 1.82.5
2026-03-19 23:37:10 -07:00
yuneng-jiang
34d954f8cb [Fix] UI: Migrate AntD message API to use context-based MessageManager
AntD v5 static message API doesn't render without an App wrapper or
useMessage() context holder. Mirrors the existing notification pattern
by adding message.useMessage() to AntdGlobalProvider and routing all
calls through a new MessageManager module.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 23:29:38 -07:00
yuneng-jiang
65bfd449e9 address greptile review feedback (greploop iteration 2)
- Remove dead get_team_object mock in test (now reuses team_obj from _assert)
- Add test for existing_permission_id=None branch (team linkage)
- Remaining P1s are by-design per spec (admin blocked from MCP, team_id
  ignored for proxy admin)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 23:23:18 -07:00
yuneng-jiang
e714104702 fix: address Greptile review feedback
- P0: Separate try/except for auto-assign so server creation succeeds
  even if team permission update fails
- P1: Clean up team permission entry on MCP server delete
- P1: Add MCP_AVAILABLE skip guard to tests
- P2: Return team_obj from _assert_can_manage_team_mcp_server to
  eliminate redundant get_team_object call in create endpoint

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 23:10:44 -07:00
yuneng-jiang
dfc4401e1c fix: use check_db_only=True in _assert_can_manage_team_mcp_server
Cached team objects may have stale object_permission data. Bypassing
cache ensures the server-in-team check uses fresh data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 23:00:38 -07:00
yuneng-jiang
6c06e6dc80 fix: link new object_permission_id back to team on first MCP server create
When a team has no object_permission_id yet, the auto-assign logic creates
an ObjectPermissionTable row but never linked it to the team. Now updates
the team's object_permission_id after creation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 22:57:27 -07:00
yuneng-jiang
f4e5fb2b4a fix: exclude team_id from Prisma create payload in _prepare_mcp_server_data
team_id is a request-level field, not a DB column. Excluding it prevents
Prisma from rejecting the create call.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 22:50:35 -07:00
Ryan Crabbe
ad43a35d76 feat: add control plane for multi-proxy worker management
Adds a control plane capability that enables a central admin instance
to manage multiple regional worker proxies from a single UI.

Backend:
- Worker registry loaded from YAML config (worker_id, name, url)
- /.well-known/litellm-ui-config exposes is_control_plane and workers list
- /v3/login + /v3/login/exchange: opaque code exchange for cross-origin
  username/password auth (JWT never in URL/logs, single-use 60s TTL)
- SSO cookie handoff with return_to → opaque code → exchange
- _validate_return_to: full origin validation (scheme+hostname+port)
- Startup warning when control_plane_url set without Redis
- Both /v3 endpoints gated behind control_plane_url config

Frontend:
- Worker selector dropdown on login page (gated behind is_control_plane)
- Cross-origin SSO code exchange handling on callback
- switchToWorkerUrl: localStorage-persisted worker URL for API calls
- useWorker hook: shared worker state management
- WorkerDropdown in navbar for switching workers
- Logout/switch clears worker state from localStorage

Tests:
- 7 tests for /v3/login + /v3/login/exchange
- 10 tests for _validate_return_to
- 2 tests for control plane discovery endpoint
2026-03-19 22:50:19 -07:00
yuneng-jiang
883611aa91 [Feature] UI - Teams: Modernize teams table with AntD, server-side pagination, and v2 API
Migrate the OldTeams table from Tremor to Ant Design components, matching the
Access Groups page pattern. Switch from /team/list to /v2/team/list for
server-side pagination, filtering, and sorting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 22:42:15 -07:00
joereyna
32ada454a2 fix: upgrade mcp to 1.26.0 2026-03-19 21:32:42 -07:00
yuneng-jiang
30589b06ad
Merge pull request #24187 from joereyna/fix/black-format-lint-cleanup
chore: apply black formatting and enable black pre-commit hook
2026-03-19 21:31:48 -07:00
joereyna
6f6e23a7b0 chore: apply black formatting to experimental_pass_through transformation 2026-03-19 21:25:02 -07:00
joereyna
ff6faacc64 fix: resolve mypy union-attr error in anthropic messages transformation 2026-03-19 21:20:12 -07:00
yuneng-jiang
f34fe4758a fix: stale closure, simplified session isolation, debounce-race in useChatHistory
- clearChatHistory: use functional setChatHistory updater so blob URL
  revocation operates on the latest snapshot, not a stale closure capture.
- Simplified mode: skip sessionStorage hydration and persistence for
  messageTraceId, responsesSessionId, and useApiSessionManagement so
  embedded widgets don't cross-contaminate the full playground session.
- Debounce race: skip re-writing empty chatHistory to sessionStorage
  after clearChatHistory already removed the key.
- Added 5 new tests covering these fixes (39 total).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 21:19:51 -07:00
joereyna
c6b5c07005 chore: apply black formatting and enable black pre-commit hook 2026-03-19 21:00:54 -07:00
yuneng-jiang
954bfcbd42 chore: remove verbose console.log calls from useChatHistory hook
Removes 17 console.log statements that fired on every streaming chunk
in updateTextUI, updateTimingData, updateUsageData, and other hot-path
functions. The console.error for sessionStorage parse failures is kept.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 20:46:51 -07:00
joereyna
e5dc912367 bump: version 1.82.4 → 1.82.5 2026-03-19 19:58:04 -07:00
Krrish Dholakia
3093ef844e fix: document new config_settings.md 2026-03-19 18:57:02 -07:00
Krish Dholakia
48e9d0b271
Merge pull request #24140 from devin-petersohn/feat/anthropic-auth-token-and-base-url
feat(anthropic): support ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL env vars
2026-03-19 18:50:48 -07:00
Krish Dholakia
3a0652c445
Merge branch 'main' into feat/anthropic-auth-token-and-base-url 2026-03-19 18:41:19 -07:00