Commit graph

31779 commits

Author SHA1 Message Date
Yuneng Jiang
a2fe4f0b91
chore: fixes 2026-04-04 23:33:18 -07:00
Shin
64ecc9ba9e fix: resolve merge conflicts with main and fix broken doc link
- Fixed broken link /docs/anthropic_unified/ -> /docs/providers/anthropic
- Resolved merge conflict in sidebars.js keeping main's new structure
- Added tutorials/openclaw to the tutorials list
2026-02-07 08:44:20 +00:00
Sameer Kankute
f5ed7826a4
Merge pull request #20637 from BerriAI/litellm_blog_claude_4_6
Update opus 4.6 blog with adaptive thinking
2026-02-07 13:09:56 +05:30
Sameer Kankute
8741512183 Update opus 4.6 blog with adaptive thinking 2026-02-07 13:07:20 +05:30
yuneng-jiang
a427a2b89e
Merge pull request #20634 from BerriAI/litellm_ui_team_budget_settings
[Feature] UI - Team Settings: Soft Budget + Alerting Emails
2026-02-06 21:44:21 -08:00
yuneng-jiang
8ae1fe32c4 fixing test 2026-02-06 20:47:43 -08:00
yuneng-jiang
e968e3798c team settings soft budget and alerting emails 2026-02-06 20:40:52 -08:00
Ishaan Jaffer
51af66fdb2 ui new buil 2026-02-06 19:15:29 -08:00
shin-bot-litellm
537f7af583
fix(test): update deprecated gemini embedding model (#20621)
Replace text-embedding-004 with gemini-embedding-001.

The old model was deprecated and returns 404:
'models/text-embedding-004 is not found for API version v1beta'

Co-authored-by: Shin <shin@openclaw.ai>
2026-02-06 18:35:40 -08:00
shin-bot-litellm
54618c5511
fix(mypy): resolve type checking errors in 5 files (#20627)
- a2a_protocol/exception_mapping_utils.py: Fix type ignore comment for None assignment
- caching/redis_cache.py: Add type ignore for async ping return type
- caching/redis_cluster_cache.py: Add type ignore for async ping return type
- llms/deprecated_providers/palm.py: Add type ignore for palm.generate_text
- proxy/auth/handle_jwt.py: Add type ignore for jwt.decode options argument

All changes add appropriate type: ignore comments to handle library typing inconsistencies.
2026-02-06 18:34:55 -08:00
Ishaan Jaffer
36be0044dc docs 2026-02-06 18:30:17 -08:00
Ishaan Jaff
1b24a0fdd7
docs (#20626) 2026-02-06 18:24:21 -08:00
yuneng-jiang
271877ffb5
Merge pull request #20623 from BerriAI/litellm_user_id_fix
[Fix] /key/list user_id Empty String Edge Case
2026-02-06 18:06:59 -08:00
Alexsander Hamir
0d7465694d
Add OpenAI/Azure release test suite with HTTP client lifecycle regression detection (#20622) 2026-02-06 18:03:05 -08:00
Ishaan Jaff
9b1ccc0608
[Feat] IP-Based Access Control for MCP Servers (#20620)
* update MCPAuthenticatedUser

* add available_on_public_internet for MCPs

* update claude.md

* init IPAddressUtils

* init available_on_public_internet

* add on REST endpoints

* filter with IP

* TestIsInternalIp

* _extract_mcp_headers_from_request

* init get_mcp_client_ip

* _get_general_settings

* allowed_server_ids

* address PR comments

* get_mcp_server_by_name fix

* fix server

* fix review comments

* get_public_mcp_servers

* address _get_allowed_mcp_servers

* test fix

* fix linting

* inint ui types

* add ui for managing MCP private/public

* add ui

* fixes

* add to schema

* add types

* fix endpoint

* add endpoint

* update manager

* test mcp

* dont use external party for ip address
2026-02-06 17:58:24 -08:00
yuneng-jiang
4d1b5d80ae fixing user_id 2026-02-06 17:55:45 -08:00
Ishaan Jaff
81146472cb
[Feat] MCP Gateway - Allow setting MCP Servers as Private/Public available on Internet (#20607)
* update MCPAuthenticatedUser

* add available_on_public_internet for MCPs

* update claude.md

* init IPAddressUtils

* init available_on_public_internet

* add on REST endpoints

* filter with IP

* TestIsInternalIp

* _extract_mcp_headers_from_request

* init get_mcp_client_ip

* _get_general_settings

* allowed_server_ids

* address PR comments

* get_mcp_server_by_name fix

* fix server

* fix review comments

* get_public_mcp_servers

* address _get_allowed_mcp_servers
2026-02-06 17:51:20 -08:00
shin-bot-litellm
29990c88ba
fix(mypy): resolve missing return statements and type casting issues (#20618)
* fix(mypy): resolve missing return statements and type casting issues

* fix(pangea): use elif to prevent UnboundLocalError and handle None messages

Address Greptile review feedback:
- Make branches mutually exclusive using elif to prevent input_messages from being overwritten
- Handle case where data.get('messages') returns None to avoid passing invalid payload to Pangea API

---------

Co-authored-by: Shin <shin@openclaw.ai>
2026-02-06 17:49:35 -08:00
Krish Dholakia
ba74e6d9d2
Add http support to custom code guardrails + Unified guardrails for MCP + Agent guardrail support (#20619)
* fix: fix styling

* fix(custom_code_guardrail.py): add http support for custom code guardrails

allows users to call external guardrails on litellm with minimal code changes (no custom handlers)

Test guardrail integrations more easily

* feat(a2a/): add guardrails for agent interactions

allows the same guardrails for llm's to be applied to agents as well

* fix(a2a/): support passing guardrails to a2a from the UI

* style(code-editor): allow editing custom code guardrails on ui + add examples of pre/post calls for custom code guardrails

* feat(mcp/): support custom code guardrails for mcp calls

allows custom code guardrails to work on mcp input

* feat(chatui.tsx): support guardrails on mcp tool calls on playground
2026-02-06 17:34:32 -08:00
Simon Sadedin
0a55571f75
[Feat] add au version of claude-opus-4-6 to model cost map (#20566)
Notes: General support for Opus 4.6 was added in #20506 however
it omitted the AU (australian) specific instance profile used
in Bedrock. This change only adds the the au id. It is copied
from the US model settings which is consistent with past
additions of this regional model profile.
2026-02-06 16:06:33 -08:00
michelligabriele
f4a0b80a25
fix(sso): extract user roles from JWT access token for Keycloak compatibility (#20591)
Keycloak (and similar OIDC providers) include role claims in the JWT
access token but not in the UserInfo endpoint response. Previously,
roles were only extracted from UserInfo, causing all SSO users to
default to internal_user_view_only regardless of their actual role.

Changes:
- Extract user roles from JWT access token in process_sso_jwt_access_token()
  when UserInfo doesn't provide them (tries role_mappings first, then
  GENERIC_USER_ROLE_ATTRIBUTE)
- Handle list-type role values in get_litellm_user_role() since Keycloak
  returns roles as arrays (e.g. ["proxy_admin"] instead of "proxy_admin")
- Add 9 new unit tests covering role extraction and list handling
- Update 3 existing tests for new JWT decode behavior

Closes #20407
2026-02-06 16:05:51 -08:00
yuneng-jiang
218373c427
Merge pull request #20205 from BerriAI/litellm_router_search_fix
[Re-issue: Fix] Keys and Teams Router Setting + Allow Override of Router Settings
2026-02-06 15:42:22 -08:00
yuneng-jiang
fd3ca081cc use cached keys and teams for router settings 2026-02-06 15:07:29 -08:00
Ishaan Jaff
b78f4c924c
[Fix] A2a Agent Gateway Fixes - A2A agents deployed with localhost/internal URLs in their agent cards (e.g., http://0.0.0.0:8001/) (#20604)
* v1 card resolver fix

* fix: is_localhost_or_internal_url

* fix code

* test_fix_agent_card_url_replaces_localhost

* test restruct

* test_a2a_non_streaming

* test agnts

* add exception handling

* init errors

* add localhost retry

* add agent_testing

* test_a2a_non_streaming

* _build_streaming_logging_obj

* code qa fixes

* test_card_resolver_fallback_from_new_to_old_path

* fix linting
2026-02-06 15:02:34 -08:00
michelligabriele
6a213fc3bc
fix(mcp): resolve OAuth2 'Capabilities: none' bug for upstream MCP servers (#20602)
- process_mcp_request() now falls back to OAuth2 passthrough when Authorization header contains a non-LiteLLM token (catches HTTPException and ProxyException 401/403)
- MCPClient._get_auth_headers() adds missing MCPAuth.oauth2 case
2026-02-06 15:00:35 -08:00
yuneng-jiang
400e560ee5 Merge remote-tracking branch 'origin' into litellm_router_search_fix 2026-02-06 14:08:55 -08:00
yuneng-jiang
a4689c9b22
Merge pull request #20549 from swayambhu94/fix/ui/antd-notification
refactor: migrate Ant Design notifications to use `App.useApp()` cont…
2026-02-06 13:15:37 -08:00
yuneng-jiang
dfc4a1b412
Merge pull request #20599 from BerriAI/litellm_model_page_col_resize
[Fix] UI - Model Page: Column Resizing on Smaller Screens
2026-02-06 12:38:01 -08:00
yuneng-jiang
ac8f3807db
Merge pull request #20462 from BerriAI/litellm_model_info_cost
[Fix] UI - Model Info Page: Fix Input and Output Labels
2026-02-06 12:34:34 -08:00
yuneng-jiang
4de0ed7a9e
Merge pull request #20444 from BerriAI/litellm_ui_config_req_auth_mh
[Feature] UI - Admin Settings: Add option for Authentication for public AI Hub
2026-02-06 12:34:27 -08:00
yuneng-jiang
49eab29335
Merge pull request #20596 from BerriAI/litellm_ui_yj_cov_01
[Infra] UI - Testing: Adding Unit Testing Coverage
2026-02-06 12:33:40 -08:00
yuneng-jiang
8df6cfe9d8 fix model page col resize 2026-02-06 12:27:03 -08:00
Alexsander Hamir
5733f6213b
Add INFO-level session reuse logging per request (#20597)
- Log when shared aiohttp session is attached to each request
- Log when no shared session is available
- Visible at INFO level (production-safe)
2026-02-06 11:36:33 -08:00
yuneng-jiang
ee70010ef1 Adding testing coverage 2026-02-06 11:32:35 -08:00
yuneng-jiang
b859d76cc2
Merge pull request #20553 from BerriAI/litellm_team_soft_budget_email
[Feature] Team Soft Budget Email Alerts
2026-02-06 09:36:16 -08:00
Alexsander Hamir
09fb6d0087
Warn when budget lookup fails; cache won't populate (#20545)
* Warn when budget lookup fails; cache won't populate

- Add _log_budget_lookup_failure helper in auth_checks.py
- Log at WARNING in get_user_object, get_team_object, get_key_object
  when DB lookups fail (schema mismatch, etc.)
- Add schema migration hint for prisma/db errors
- Add dry-run test for _log_budget_lookup_failure

* fix: skip budget lookup failure log for expected user-not-found case

Avoid logging 'cache will not be populated' when the user simply doesn't
exist - not caching is correct behavior in that case. Only log for
unexpected errors (schema, DB, etc.) where the message is meaningful.
2026-02-06 09:24:44 -08:00
Alexsander Hamir
53a1f2d21c
perf(prometheus): parallelize budget metrics, fix caching bug, reduce CPU by ~40% (#20544) 2026-02-06 09:18:24 -08:00
Sameer Kankute
ad1282de82
Merge pull request #20551 from BerriAI/litellm_opus_4.6_thinking
Add full support  for Opus 4.6 (Anthropic, Azure AI, Bedrock, Vertex AI)
2026-02-06 19:30:47 +05:30
Sameer Kankute
eab7a99800
Merge pull request #20578 from BerriAI/litellm_claude_code_beta_headers
Add unsupported claude code beta headers in json
2026-02-06 19:10:13 +05:30
Sameer Kankute
285b2d2a12 add context_management header for compact_20260112 for messages 2026-02-06 19:06:49 +05:30
Sameer Kankute
db8423b799 Fix: test_json_response_nested_json_schema 2026-02-06 18:52:04 +05:30
Sameer Kankute
2e0715bd61 Fix mypy issue 2026-02-06 18:45:54 +05:30
Sameer Kankute
05ce4c68e5 Fix: test_vertex_ai_partner_models_anthropic_remove_prompt_caching_scope_beta_header 2026-02-06 18:34:57 +05:30
Sameer Kankute
fa26c6eeec fix mypy issue 2026-02-06 18:29:28 +05:30
Sameer Kankute
40ff79655c Add not_available in inference_geo 2026-02-06 18:29:28 +05:30
Sameer Kankute
786bd6ebc0 Fix merge conflicts 2026-02-06 18:29:14 +05:30
Sameer Kankute
c1a43914ee Add documentation related to new beta header json 2026-02-06 17:54:56 +05:30
Sameer Kankute
3f9a7b1956 Add update_headers_with_filtered_beta in all messages API providers 2026-02-06 17:45:45 +05:30
Sameer Kankute
25a19b2091 Add update_headers_with_filtered_beta in anthropic 2026-02-06 17:45:05 +05:30
Sameer Kankute
920fea9520 feat: Add Unsupported Anthropic beta headers for each provider json 2026-02-06 17:44:09 +05:30