Commit graph

711 commits

Author SHA1 Message Date
yassin
5fee1c8710 Merge remote-tracking branch 'origin/main' into litellm_model_access_denied_message
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

# Conflicts:
#	tests/test_litellm/proxy/auth/test_handle_jwt.py
2026-09-16 16:27:18 +00:00
Joshua Valluru
ee676d59f2 fix(mcp): preserve browser OAuth for unrelated bearer tokens 2026-09-15 23:08:14 -07:00
Joshua Valluru
e035682ed1 refactor(auth): separate JWT identity and OAuth authorization 2026-09-15 22:15:57 -07:00
Joshua Valluru
c7e4160ee6 fix(mcp): enforce OAuth write policy across signed callbacks 2026-09-15 19:15:34 -07:00
Joshua Valluru
97211bc356 fix(mcp): authorize per-user OAuth credential writes 2026-09-15 19:00:47 -07:00
yassin
b085a3c151 fix(mcp): return fixed client message on sampling model access denial
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-16 01:51:29 +00:00
yassin
15f2e25e8a refactor(proxy): replace configurable model access denied message with a fixed clean client message
Drop the model_access_denied_message setting, its {model} template, the DB
override entry and the Admin UI field. Model access denials now always return
the fixed client message while the allowlist diagnostic is logged at the final
HTTP, realtime and MCP boundaries

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-16 01:44:36 +00:00
Joshua Valluru
61e3b5ddae fix(mcp): persist OAuth credentials for rowless JWT admins 2026-09-15 17:31:07 -07:00
yassin
241b177f05 fix(proxy): log the internal model access denial reason for MCP sampling denials
MCP sampling catches the denial itself and returns ErrorData, so the central ProxyException handler never sees it. Log the sanitized internal reason there and share the CR/LF stripping through ModelAccessDeniedProxyException.sanitized_internal_message

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-16 00:22:48 +00:00
Joshua Valluru
53318796fd fix(mcp): separate JWT identity lookup from request authorization 2026-09-15 17:13:10 -07:00
Joshua Valluru
88d0371a46 fix(mcp): reuse the standard JWT auth builder for OAuth ownership 2026-09-15 16:50:55 -07:00
Joshua Valluru
eda98f38d9 fix(mcp): preserve canonical JWT owner lookup without cached identity 2026-09-15 12:41:12 -07:00
Joshua Valluru
92e182b898 fix(mcp): persist OAuth credentials for validated JWT users 2026-09-15 12:29:03 -07:00
Joshua Valluru
939fa4ee73 test(mcp): remove unrelated formatting changes 2026-09-12 18:27:20 -07:00
Joshua Valluru
f33bac8080 test(mcp): model delegated hook credentials 2026-09-12 17:29:26 -07:00
Joshua Valluru
364e466210 fix(mcp): strip duplicate delegated credentials 2026-09-12 17:18:54 -07:00
Joshua Valluru
97b964dd9a fix(mcp): prevent delegated admission key forwarding 2026-09-12 17:00:21 -07:00
Joshua Valluru
94e4dd725f fix(mcp): require admission for delegated OAuth 2026-09-12 16:41:23 -07:00
devin-ai-integration[bot]
0c98afa780
fix(mcp): enforce end user mcp_tool_permissions on tools/list and tools/call (#40865)
* fix(mcp): apply end user mcp_tool_permissions as a tool ceiling on tools/list and tools/call

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(mcp): restore scoped session admission coverage dropped by mistake

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: yassin <yassin@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-12 10:33:09 -07:00
joshua-berri
70cf348aa5
Merge pull request #40791 from BerriAI/litellm_fix_mcp_root_discovery_6634
fix(mcp): use gateway authentication for root discovery
2026-09-11 20:23:10 -07:00
joshua-berri
e86adf98ac
Merge pull request #40808 from BerriAI/litellm_fix_mcp_oauth_issuer_7078
fix(mcp): match per-server OAuth metadata issuers
2026-09-11 20:23:00 -07:00
Joshua Valluru
9d31de2f20 fix(mcp): bound discovery cache result bytes 2026-09-11 18:08:27 -07:00
Joshua Valluru
05d2c316f5 refactor(mcp): reuse in-memory discovery storage 2026-09-11 17:53:51 -07:00
Joshua Valluru
0690520080 test(mcp): isolate static-prefix discovery UI assets 2026-09-11 17:26:35 -07:00
Joshua Valluru
f66239a50f test(mcp): cover static-prefix issuer discovery 2026-09-11 17:13:47 -07:00
Joshua Valluru
da61fa3564 fix(mcp): preserve existing relay discovery identifiers 2026-09-11 17:11:42 -07:00
Joshua Valluru
17863fa5cf fix(mcp): match per-server OAuth metadata issuers 2026-09-11 17:05:35 -07:00
Joshua Valluru
87e2e7afac fix(mcp): preserve request prefixes in BYOK discovery 2026-09-11 15:25:03 -07:00
Joshua Valluru
731f79fa31 fix(mcp): preserve BYOK discovery and isolate session authorization 2026-09-11 15:17:02 -07:00
Joshua Valluru
ceb1f04988 fix(mcp): bind discovery caching to credentials and active callers 2026-09-11 14:49:00 -07:00
Joshua Valluru
6d5c2d85ef fix(mcp): use gateway authentication for root discovery 2026-09-11 14:44:13 -07:00
Joshua Valluru
cc559cbb06 test(mcp): verify discovery prefixing without mocked results 2026-09-11 14:22:26 -07:00
Joshua Valluru
c038aaf622 fix(mcp): cache upstream discovery lists 2026-09-11 14:20:03 -07:00
devin-ai-integration[bot]
e073cd3aeb
fix(mcp): write failure spend log for guardrail-blocked /mcp-rest/tools/call (#40555)
* fix(mcp): write failure spend log for guardrail-blocked /mcp-rest/tools/call

call_tool_rest_api only translated exceptions to HTTP responses, so a pre_mcp_call
guardrail block never reached failure_handler / async_failure_handler /
post_call_failure_hook and no LiteLLM_SpendLogs failure row was written. Extract
the failure logging from call_mcp_tool into _fire_mcp_tool_call_failure_logging
and run it in the REST route for anything raised between
common_processing_pre_call_logic and execute_mcp_tool

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(mcp): keep the original REST tool error when failure logging raises

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(mcp): log virtual mcp_tool_call failures and keep REST success latency scoped to tool execution

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: yucheng <yucheng@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-11 12:54:03 -07:00
joshua-berri
6882f057b4
Merge pull request #40440 from BerriAI/litellm_mcp_upstream_error_log_detail
fix(mcp): log upstream request method, body and response on tool-list and OAuth2 token failures
2026-09-11 11:24:42 -07:00
joshua-berri
3f81ba3d30
Merge pull request #40679 from BerriAI/litellm_fix_mcp_oauth_registration_7498
fix(mcp): explain refused OAuth registration and bound discovery retries
2026-09-11 10:51:31 -07:00
devin-ai-integration[bot]
3df127b439
fix(proxy): give user-key objects their own in-memory cache partition (#40713)
Key objects share the 200-entry UserApiKeyCache in-memory store with teams,
end users, tags and memberships, so churn in those objects evicts hot keys
and forces a LiteLLM_VerificationToken lookup on the next request. Route
bare hashed-token keys to a dedicated InMemoryCache inside UserApiKeyCache
while keeping Redis, TTL, serialization and invalidation shared

Co-authored-by: yassin <yassin@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-11 09:52:09 -07:00
Joshua Valluru
3883a891f0 fix(mcp): redact compact credential field names 2026-09-11 08:10:19 -07:00
Joshua Valluru
5c190e69bf fix(mcp): preserve timeout fallback on Python 3.10 2026-09-11 08:00:39 -07:00
Joshua Valluru
e8c411fb43 test(mcp): cover deeply nested credential inspection limits 2026-09-11 07:32:38 -07:00
Joshua Valluru
5b13dfcc59 fix(mcp): omit credential-bearing paths from failure logs 2026-09-11 07:27:10 -07:00
Joshua Valluru
0ee9e1e448 fix(mcp): redact reflected credentials and avoid import cycles 2026-09-11 07:20:48 -07:00
Joshua Valluru
40f01e2fa5 chore: merge current staging into MCP OAuth fix 2026-09-11 07:07:07 -07:00
Joshua Valluru
8d5a675878 fix(mcp): expire temporary OAuth discovery results 2026-09-11 07:02:11 -07:00
Joshua Valluru
eec7c1e7f8 chore: merge current staging for MCP diagnostic compatibility 2026-09-11 07:01:06 -07:00
Joshua Valluru
3fc483d424 fix(mcp): capture bounded error diagnostics without exposing credentials 2026-09-11 06:58:40 -07:00
joshua-berri
9a715df212
Merge pull request #40665 from BerriAI/litellm_fix_openapi_mcp_health_4896
fix(mcp): check OpenAPI specifications without native MCP handshakes
2026-09-10 22:02:45 -07:00
Joshua Valluru
f04fb748c5 fix(mcp): explain refused OAuth registration and bound discovery retries 2026-09-10 21:02:46 -07:00
Joshua Valluru
ca03c889c9 fix(mcp): avoid caching cancelled OpenAPI health probes 2026-09-10 20:26:53 -07:00
Joshua Valluru
da1dfcdb24 refactor(mcp): reuse the shared HTTP handler for bounded probes 2026-09-10 19:59:07 -07:00