Commit graph

31779 commits

Author SHA1 Message Date
naaa760
0cb6b58768 fix(proxy): forward extra_headers in chat 2026-02-04 08:56:50 +05:30
Sameer Kankute
7b57d1acf1
Merge pull request #20331 from BerriAI/litellm_bstch_status_retrieve
Fix: Managed Batches: Inconsistent State Management for list and cancel batches
2026-02-04 08:52:17 +05:30
Sameer Kankute
f11c16a0e7
Merge pull request #20334 from BerriAI/litellm_fireworks_ai_field_remoal
Fix: Extra inputs are not permitted, field: 'messages[2].provider_specific_fields
2026-02-04 08:50:04 +05:30
Sameer Kankute
bd87c446f2
Merge pull request #20329 from BerriAI/litellm_delete_files_bug
Add support for delete and GET via file_id for gemini
2026-02-04 08:49:24 +05:30
Ishaan Jaff
66eadfabe4
[Bug] Ensure MCP permissions are enforced when using JWT Auth (#20383)
* fix: enforce team MCP permissions when using JWT authentication

Root cause: When JWT auth was used with teams in groups (via team_ids_jwt_field),
the team's MCP permissions were not being enforced because:

1. The default team_allowed_routes did not include mcp_routes
2. allowed_routes_check() failed for MCP endpoints like /mcp/tools/list
3. find_team_with_model_access() skipped the team due to failed route check
4. team_id was None in UserAPIKeyAuth
5. MCPRequestHandler._get_allowed_mcp_servers_for_team() returned empty list

Fix: Add 'mcp_routes' to the default team_allowed_routes in LiteLLM_JWTAuth.

This ensures that teams can access MCP endpoints by default, allowing the
team's MCP server permissions to be properly enforced.

Added tests:
- test_reproduce_jwt_mcp_enforcement_issue: Reproduces the exact bug scenario
- test_verify_mcp_routes_in_default_team_allowed_routes: Verifies fix
- test_mcp_route_check_passes_for_team: Verifies route check works

Co-authored-by: ishaan <ishaan@berri.ai>

* test: add comprehensive E2E tests for JWT + team MCP permission enforcement

Added tests:
- test_e2e_jwt_team_mcp_permissions_enforced: Full E2E test verifying JWT auth
  with teams in groups properly sets team_id and MCPRequestHandler returns
  the team's MCP servers
- test_e2e_jwt_without_team_no_mcp_servers: Verifies no MCP servers returned
  when JWT has no teams
- test_e2e_jwt_team_mcp_key_intersection: Verifies intersection logic when
  both key and team have MCP permissions (result = intersection)

These tests verify the complete flow:
1. JWT token with team in groups field
2. JWT auth properly sets team_id on UserAPIKeyAuth
3. MCPRequestHandler.get_allowed_mcp_servers() returns team's MCP servers
4. Key/team permission intersection works correctly

Co-authored-by: ishaan <ishaan@berri.ai>

* test: add simple tests for JWT + MCP permission enforcement

Simple, focused tests that validate:
1. test_simple_jwt_mcp_permissions_enforced: JWT user with team gets team's MCP servers
2. test_simple_jwt_no_team_no_mcp_servers: JWT user without team gets no MCP servers
3. test_simple_jwt_team_id_required_for_mcp_permissions: Verifies team_id is required
4. test_jwt_auth_sets_team_id_for_mcp_route: JWT auth sets team_id for MCP routes

These tests directly verify the core MCP permission enforcement logic works
when using JWT authentication with teams.

Co-authored-by: ishaan <ishaan@berri.ai>

* Add test: MCP route without model still returns team_id

Co-authored-by: ishaan <ishaan@berri.ai>

* Add 2 debug logs for JWT+MCP troubleshooting

- handle_jwt.py: Log team route check result (team_id, route, is_allowed)
- user_api_key_auth_mcp.py: Log team_id when looking up MCP permissions

Co-authored-by: ishaan <ishaan@berri.ai>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: ishaan <ishaan@berri.ai>
2026-02-03 19:13:13 -08:00
yuneng-jiang
12b8cd5971
Merge pull request #20380 from BerriAI/litellm_ui_key_budget_change
[Feature] UI - User Budget Page: Unlimited Budget Checkbox
2026-02-03 18:29:46 -08:00
yuneng-jiang
831f89b964 unlimited budget ui changes 2026-02-03 18:19:33 -08:00
yuneng-jiang
f9669cc132
Merge pull request #20375 from BerriAI/litellm_user_update_fix
[Fix] /user/update Allow for max_budget Resets
2026-02-03 17:02:16 -08:00
yuneng-jiang
92786b5608
Merge pull request #20317 from BerriAI/litellm_antd_modal
Chore: Antd Modal Deprecated Props
2026-02-03 17:02:01 -08:00
yuneng-jiang
cf256c742f allow max_budget reset 2026-02-03 16:32:21 -08:00
michelligabriele
a50896f91e
fix: revert httpx client caching that caused closed client errors (#20025)
AsyncHTTPHandler.__del__ was closing httpx clients still in use by
AsyncOpenAI/AsyncAzureOpenAI due to independent cache lifecycles.
Restores standalone httpx client creation for OpenAI/Azure providers.
2026-02-03 16:15:04 -08:00
yuneng-jiang
c8f0d39b4d
Merge pull request #20369 from BerriAI/litellm_ui_key_settings_routes
[Feature] UI - Keys: Allowed Routes to Key Info and Edit Pages
2026-02-03 16:10:30 -08:00
yuneng-jiang
3e3b21e6c3 masking sensitive values 2026-02-03 16:09:37 -08:00
yuneng-jiang
23d9a89793 search tools list includes config defined search tools 2026-02-03 15:57:13 -08:00
yuneng-jiang
a2653bcd5e Adding Allowed Routes to Key Info and Edit Pages 2026-02-03 15:26:51 -08:00
Ishaan Jaff
d267c69086
[Feat] Use A2A registered agents with /chat/completions (#20362)
* test_a2a_registry_integration

* fix: render agents on model dropdown on UI

* init append_agents_to_model_group

* route_a2a_agent_request

* is_a2a_agent_model

* route_a2a_agent_request

* fix: error handling

* docs A2A usage

* docs fix

* feat: working A2a streaming

* fix transform
2026-02-03 15:25:38 -08:00
Xiaohan Fu
2b25d03046
Fix fail-open for grayswan and pass metadata to cygnal api endpoint (#19837)
* fix fail-open for grayswan; pass metadata to cygnal api endpoint; update docs

* pass litellm_metadata to cygnal in payload

* switch error msg to const, and clean exception handling.

* update pyproject.toml as requested

* Revert "update pyproject.toml as requested"

This reverts commit 4eece154d0.
2026-02-03 14:41:31 -08:00
Alexander Grattan
cc76f95555
fix: check for model_response_choices before guardrail input (#19784)
* fix: check for model_response_choices before guardrail input

* test: add tests for responses api translation

* fix: protect other guardrail translations

* refactor: remove type ignores

* anthropic request body got mutated fix

* add warning when extra_body is provided but user is non premium

* fix: resolve mypy union-attr errors in anthropic guardrail handler

Cast choices[0] to Choices type before accessing .message attribute
to satisfy mypy's union type checking for Choices | StreamingChoices.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* add logger when model response has no choices for streaming /response and /messages

* update pyproject.toml as requested

* Revert "update pyproject.toml as requested"

This reverts commit 541a2b075a.

* update pyproject.toml as requested

* Revert "update pyproject.toml as requested"

This reverts commit 716ea0caa1.

---------

Co-authored-by: Xiaohan Fu <xiaohan@grayswan.ai>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 14:41:13 -08:00
Ishaan Jaff
59cab4d2aa
UI - Show team alias on Models health page (#20359)
* feat(ui): Add team-alias column to Models Health Status UI

- Added Team Alias column to the Models Health Status table
- Updated HealthCheckComponent to accept teams prop
- Updated health_check_columns to display team alias based on team_id
- Falls back to team_id if team alias not found, or shows '-' if no team
- Updated parent components to pass teams data to HealthCheckComponent

Co-authored-by: ishaan <ishaan@berri.ai>

* Update ui/litellm-dashboard/src/components/model_dashboard/health_check_columns.tsx

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: ishaan <ishaan@berri.ai>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-03 12:53:50 -08:00
Ishaan Jaff
9ed11c5cdf
[Feat] Allow calling A2A agents through LiteLLM /chat/completions API (#20358)
* init A2AConfig

* add transform files

* feat: A2A

* feat A2AConfig

* fix get_secret_str

* init: A2AConfig

* init A2AConfig common utils

* A2AConfig

* test_a2a_completion_async_non_streaming

* fix

* Update litellm/main.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* add multi part conversation support

* extract_text_from_a2a_message

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-03 12:52:33 -08:00
Ishaan Jaffer
c80fae71ef bump litellm enterprise PIP 2026-02-03 10:39:39 -08:00
Lucky Lodhi
a25289e30a fixed typo 2026-02-03 13:53:22 +00:00
Lucky Lodhi
c1aa1c380c removing thinking lines 2026-02-03 13:50:43 +00:00
Sameer Kankute
d8761de660 Add get files API support and tests 2026-02-03 18:59:10 +05:30
Sameer Kankute
ff568de2cb Add get files API support and tests 2026-02-03 18:57:39 +05:30
Lucky Lodhi
b6934584fe fixed linting 2026-02-03 13:04:36 +00:00
Sameer Kankute
be89b38ea8
Merge pull request #20319 from FelipeRodriguesGare/add/models
adding together ai models to litellm models json
2026-02-03 18:28:39 +05:30
Nikita Timofeev
ffbc8d20c4 bugfix: Remove user messages merging
There is no reason to merge user messages.
2026-02-03 12:58:28 +00:00
Felipe Rodrigues Gare Carnielli
ea19d8dbf6 fixing glm-4.7 input cost per token 2026-02-03 09:57:00 -03:00
Lucky Lodhi
1aa619d660 added 1h ttl support for aws bedrock 2026-02-03 11:59:35 +00:00
Sameer Kankute
b7f0d05dfd
Merge pull request #20337 from BerriAI/main
update 02 staging PR
2026-02-03 17:08:01 +05:30
Sameer Kankute
070d501ced
Merge pull request #20336 from BerriAI/litellm_bump_version_1.81.7
bump litellm 1.81.7
2026-02-03 16:52:12 +05:30
Sameer Kankute
47c5366cf3 bump litellm 1.81.7 2026-02-03 16:51:42 +05:30
Sameer Kankute
3765d88809 Fix: Extra inputs are not permitted, field: 'messages[2].provider_specific_fields' 2026-02-03 16:23:18 +05:30
Sameer Kankute
c2a33ea2ea
Apply suggestion from @greptile-apps[bot]
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-03 16:11:07 +05:30
Sameer Kankute
793a7fd993
Merge pull request #20333 from BerriAI/litellm_tuesday_cicd_release_final
Litellm tuesday cicd release final
2026-02-03 15:37:30 +05:30
Sameer Kankute
21e95c73e4 Fix litellm_security_tests 2026-02-03 15:24:31 +05:30
Sameer Kankute
31cdffd3a4 Revert "fix: prevent error when max_fallbacks exceeds available models (#20071)"
This reverts commit ef73f330f1.
2026-02-03 15:15:30 +05:30
Sameer Kankute
fae0554fdc Revert "add missing indexes on VerificationToken table (#20040)"
This reverts commit 1e8848ca97.
2026-02-03 15:01:28 +05:30
Sameer Kankute
017b78de40 Fix code quality tests 2026-02-03 15:01:17 +05:30
Sameer Kankute
9a6bafe89e Fix litellm/tests/test_litellm/proxy/_experimental/mcp_server/test_semantic_tool_filter.py tests 2026-02-03 15:01:10 +05:30
Sameer Kankute
eb8f4d3e05 Revert "fix: models loadbalancing billing issue by filter (#18891) (#19220)"
This reverts commit 72e5193451.
2026-02-03 15:00:57 +05:30
Sameer Kankute
410e54648c Fix: Managed Batches: Inconsistent State Management for list and cancel batches 2026-02-03 14:47:28 +05:30
Sameer Kankute
80acd4cf98
Merge pull request #20330 from BerriAI/revert-20328-litellm_tuesday_cicd_release
Revert "Litellm tuesday cicd release"
2026-02-03 14:29:28 +05:30
Sameer Kankute
1b1854b704
Revert "Litellm tuesday cicd release" 2026-02-03 14:29:16 +05:30
Sameer Kankute
23f662ef93
Merge pull request #20328 from BerriAI/litellm_tuesday_cicd_release
Litellm tuesday cicd release
2026-02-03 13:42:02 +05:30
Sameer Kankute
cad15e21cc Add support for delete via only file_id 2026-02-03 13:18:44 +05:30
Sameer Kankute
a92a0fa686 Add support for delete via only file_id 2026-02-03 12:53:07 +05:30
Sameer Kankute
ecb6413028 Revert "add missing indexes on VerificationToken table (#20040)"
This reverts commit 1e8848ca97.
2026-02-03 12:22:18 +05:30
Sameer Kankute
b379fb6338 Fix code quality tests 2026-02-03 12:10:29 +05:30