Commit Graph
31566 Commits
Author SHA1 Message Date
Sameer KankuteandGitHub 25fa1ad4e7 Merge pull request #20386 from naaa760/fix/extra-head-chat-comp-brid
fix(proxy): forward extra headers in chat
2026-02-04 09:11:43 +05:30
naaa760 0cb6b58768 fix(proxy): forward extra_headers in chat 2026-02-04 08:56:50 +05:30
Sameer KankuteandGitHub 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 KankuteandGitHub 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
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-jiangandGitHub 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-jiangandGitHub 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-jiangandGitHub 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
michelligabrieleandGitHub 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-jiangandGitHub 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 a2653bcd5e Adding Allowed Routes to Key Info and Edit Pages 2026-02-03 15:26:51 -08:00
Ishaan JaffandGitHub 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 FuandGitHub 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 4eece154d056ba33689a5584c86c8fc352bb7cdd.
2026-02-03 14:41:31 -08:00
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 541a2b075a91b1b2d9efaf0407572f35bf5d4324.

* update pyproject.toml as requested

* Revert "update pyproject.toml as requested"

This reverts commit 716ea0caa1fee5e5f028d3f86479fedea2fac68b.

---------

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 JaffGitHubCursor Agentishaangreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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 JaffGitHubgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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
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
Sameer KankuteandGitHub 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
Felipe Rodrigues Gare Carnielli ea19d8dbf6 fixing glm-4.7 input cost per token 2026-02-03 09:57:00 -03:00
Sameer KankuteandGitHub b7f0d05dfd Merge pull request #20337 from BerriAI/main
update 02 staging PR
2026-02-03 17:08:01 +05:30
Sameer KankuteandGitHub 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 KankuteandGitHub 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 KankuteandGitHub 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 KankuteandGitHub 1b1854b704 Revert "Litellm tuesday cicd release" 2026-02-03 14:29:16 +05:30
Sameer KankuteandGitHub 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
Sameer Kankute 86ae627007 Fix litellm/tests/test_litellm/proxy/_experimental/mcp_server/test_semantic_tool_filter.py tests 2026-02-03 12:08:19 +05:30
Sameer Kankute 7dd0248987 Revert "fix: models loadbalancing billing issue by filter (#18891) (#19220)"
This reverts commit 72e5193451.
2026-02-03 12:04:15 +05:30
17c0a88a60 fix: add missing capability flags to vercel_ai_gateway models (#20276)
67 vercel_ai_gateway models were missing capability flags (supports_vision,
supports_function_calling, supports_tool_choice, supports_response_schema).

These capabilities were inferred from the corresponding direct provider entries
for the same models (e.g., vercel_ai_gateway/anthropic/claude-3.5-sonnet now has
the same capabilities as anthropic/claude-3.5-sonnet).

Models fixed include:
- Claude 3/3.5/3.7 (Anthropic)
- GPT-4/5 variants (OpenAI)
- Gemini 2.0/2.5 (Google)
- Grok 3/4 (xAI)
- Mistral/Mixtral variants
- Qwen models
- DeepSeek models
- And more

This ensures consistent capability reporting across providers for the same
underlying models.

Co-authored-by: krauckbot <krauckbot123@gmail.com>
2026-02-02 22:07:17 -08:00
Cesar GarciaandGitHub a904c3f40d fix(github_copilot): preserve system prompts and auto-inject headers (#20113)
- Remove system-to-assistant message conversion (API now supports system prompts)
- Auto-inject required Copilot headers in chat completions (same as /responses)
- Deprecate disable_copilot_system_to_assistant flag
- Update docs to remove manual extra_headers requirement

Fixes #19873
2026-02-02 22:05:44 -08:00
Cesar GarciaandGitHub b33e1e8019 feat(sdk): add proxy_auth for auto OAuth2/JWT token management (#20238)
Adds litellm.proxy_auth to automatically obtain and refresh OAuth2/JWT
tokens when connecting to LiteLLM Proxy or any OAuth2-protected endpoint.

- Add ProxyAuthHandler for token lifecycle (obtain, cache, refresh)
- Add AzureADCredential wrapper for azure-identity credentials
- Add GenericOAuth2Credential for any OAuth2 provider (Okta, Auth0, etc)
- Auto-inject Authorization headers in completion() and embedding()

Closes #19834
2026-02-02 22:04:08 -08:00
yuneng-jiangandGitHub 9202870e14 Merge pull request #20308 from BerriAI/litellm_ui_community_buttons
[Feature] UI - Navbar: Option to Hide Community Engagement Buttons
2026-02-02 20:10:01 -08:00
yuneng-jiangandGitHub 2984832843 Merge pull request #20310 from BerriAI/litellm_ui_def_team_settings
[Feature] UI - Default Team Settings: Migrate Default Team Settings to use Reusable Model Select
2026-02-02 20:09:13 -08:00
Ishaan Jaffer 7ae980410b docs fix 2026-02-02 19:50:22 -08:00
Ishaan Jaffer 5aa8725c63 docs Tracing Tools 2026-02-02 19:48:00 -08:00