Commit graph

50353 commits

Author SHA1 Message Date
joshua
783038010b refactor(mcp): register SDK2 request handlers and drop request_ctx ContextVar
Port the proxy MCP server off the removed SDK1 decorator API. Handlers now
take (ctx, params), are registered via add_request_handler, and return full
result models. Request-scoped session/context propagation moves to a
litellm-owned active_mcp_request_ctx_var ContextVar set at handler entry.
Reject MCP-Protocol-Version values outside the SDK2 handshake set with a
400 before session-manager delegation. Fold SDK2 MCPError-wrapped parse
and content-type failures into the existing connection diagnostics.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-18 23:34:30 +00:00
joshua
545bbeb001 test(mcp): update MCP suites for SDK 2 APIs
Rename McpError/isError/inputSchema-style references to the SDK 2
spellings, parse the JSONRPCMessage union with a TypeAdapter, and drive
the SDK transports off httpx2 MockTransport injection where respx can no
longer intercept. Adjust for SDK 2 behavior: the initialize handshake
negotiates handshake-era protocol versions only, an empty SSE stream
surfaces CONNECTION_CLOSED, non-2xx tool responses surface INTERNAL_ERROR
MCPError instead of HTTPStatusError, and the SDK read timeout carries the
JSON-RPC REQUEST_TIMEOUT code.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-18 22:13:18 +00:00
joshua
5dc01319d7 refactor(mcp): port MCP client and server helpers to MCP SDK 2
McpError -> MCPError (new code/message/data constructor), camelCase model
attributes and constructor kwargs -> snake_case, RequestResponder ->
ClientSession message handler receiving ServerNotification | Exception,
RequestContext -> ClientRequestContext, read_timeout_seconds -> float,
server_capabilities property, JSONRPCMessage union parsed via TypeAdapter,
and httpx -> httpx2 for every object handed to the SDK transports
(MCPSigV4Auth, the httpx client factory, outbound_credentials auth
classes and resolver return types). Helpers that serve both litellm httpx
clients and the SDK's httpx2 transport accept both response types.

The SDK read-timeout code is now the JSON-RPC REQUEST_TIMEOUT (-32001)
instead of HTTP 408; as_mcp_read_timeout keeps the TimeoutError context
discriminator. Upstream transport exceptions and responses found in
exception trees are matched as httpx2 alongside httpx.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-18 22:13:04 +00:00
joshua
4bc3f1d0fc build(deps): migrate MCP integration to MCP SDK 2.2.0
Replace the bespoke dependency-install CI gate with a real migration:
require mcp>=2.2.0,<3 alongside httpx2>=2.5.0,<3 and pydantic>=2.12.0,<3
in the proxy and mcp extras, drop langchain-mcp-adapters (pins mcp<2)
from the dev group, and remove the dependency-install workflow and
tests/mcp_dependency_tests that only exercised the old pins.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-18 22:12:40 +00:00
Joshua Valluru
dfd0474788 fix(ci): preserve repository paths in dependency coverage reports 2026-09-17 18:25:46 -07:00
Joshua Valluru
21beb9b7b1 fix(ci): verify coverage uploads and normalize dependency inventories 2026-09-17 18:11:49 -07:00
Joshua Valluru
6aa921c1bc fix(ci): run dependency tests in an isolated Python environment 2026-09-17 17:42:01 -07:00
Joshua Valluru
b42e2827a5 ci(mcp): document pinned workflow action versions 2026-09-17 17:36:58 -07:00
Joshua Valluru
c19b5c5847 ci(deps): document pinned action versions 2026-09-17 17:36:46 -07:00
Joshua Valluru
1dbcf31fe8 ci(mcp): run isolated dependency gates in GitHub Actions 2026-09-17 17:29:03 -07:00
Joshua Valluru
0a87dc6cb1 ci(deps): run wheel installation gates in GitHub Actions 2026-09-17 17:25:20 -07:00
Joshua Valluru
3519d01549 test(mcp): add isolated SDK2 dependency compatibility gate 2026-09-17 17:16:47 -07:00
Joshua Valluru
eebc76cf2c fix(deps): correct minimum versions for supported Python releases 2026-09-17 17:03:19 -07:00
Mateo Wang
deb9d8aedd
Merge pull request #41607 from BerriAI/litellm_typesafe_passthrough
Some checks are pending
LiteLLM Rust / rust-test (push) Waiting to run
Unit Tests: Documentation Validation / documentation (push) Waiting to run
Unit Tests: Proxy DB Operations / assert-shard-coverage (push) Waiting to run
Unit Tests: Proxy DB Operations / endpoints-and-responses (push) Blocked by required conditions
Unit Tests / caching-local (push) Waiting to run
Unit Tests / core-utils (push) Waiting to run
Unit Tests / enterprise-package (push) Waiting to run
Unit Tests / enterprise-routing (push) Waiting to run
Unit Tests / integrations (push) Waiting to run
Unit Tests: Proxy DB Operations / auth-checks (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / budgets (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / custom-logging (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / db-and-spend (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / guardrails-hooks (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / jwt-and-keys (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / key-generation (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / logging-misc (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / proxy-runtime (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / proxy-server-core (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / proxy-utils (push) Blocked by required conditions
Unit Tests / Vertex AI (push) Waiting to run
Unit Tests / All Other Providers (push) Waiting to run
Unit Tests / misc (push) Waiting to run
Unit Tests / proxy-auth (push) Waiting to run
Unit Tests / proxy-endpoints (push) Waiting to run
Unit Tests / proxy-extras (push) Waiting to run
Unit Tests / proxy-infra (push) Waiting to run
Unit Tests / proxy-server (push) Waiting to run
Unit Tests / responses-caching-types (push) Waiting to run
GitHub Actions Security Analysis / zizmor (push) Waiting to run
feat(proxy): add TypeSafe AI Jev evaluate passthrough with registry-priced spend tracking
2026-09-17 16:37:33 -07:00
ryan-crabbe-berri
e5aa10a1ea
Merge pull request #41686 from BerriAI/litellm_member_budget_clone_reset_and_audit
fix(team): keep a forked member budget's reset window and audit bulk member budget writes
2026-09-17 16:32:31 -07:00
ryan-crabbe-berri
10616d7407
Merge pull request #40875 from BerriAI/litellm_cache_leakage_all_models
fix(ui): list every provider in the cache leakage by-model table
2026-09-17 16:18:16 -07:00
Mateo Wang
57d41bda29
Merge pull request #41684 from BerriAI/litellm_wildcard_license_auto_router
fix(license): let a wildcard allowed_features license grant the auto_router feature
2026-09-17 16:11:40 -07:00
Mateo Wang
07b5051c0d
Merge pull request #41689 from BerriAI/litellm_responses_bridge_strip_internal_kwargs
fix(responses): keep the addressed response id off bridged provider requests
2026-09-17 16:11:04 -07:00
Mateo Wang
0da001901b
Merge pull request #41672 from BerriAI/litellm_autoroute_start_stop
feat(cli): rename lite autoroute up/down to start/stop, keeping the old names as deprecated aliases
2026-09-17 16:07:00 -07:00
yujonglee
ad5998072b
Merge pull request #41690 from BerriAI/litellm_extract_providers
refactor(rust): extract provider translations
2026-09-17 16:05:59 -07:00
ryan-crabbe-berri
f16c4e7a22 fix(team): drop a redundant None check on a non-nullable allowed_models column 2026-09-17 16:00:24 -07:00
ryan-crabbe-berri
29a959b3e8
Merge pull request #41632 from BerriAI/litellm_bulk_team_member_budget_update
feat(management_v1): bulk update team member budgets
2026-09-17 15:58:32 -07:00
mateo-berri
d3963e5d63 test(cli): pin the up alias port forwarding and the removed-settings stop message 2026-09-17 15:55:50 -07:00
Yujong Lee
6ce78b85a5 refactor(rust): remove core provider reexports
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-17 22:55:15 +00:00
mateo-berri
79029d89f9 test(responses): drop the history docstrings from the bridge regression tests 2026-09-17 15:51:35 -07:00
Mateo Wang
289c52bcd6
Merge pull request #39512 from BerriAI/litellm_fix_image_edits_bracketed_alias
fix(images): stop forwarding the raw image[] and mask[] form keys
2026-09-17 15:48:32 -07:00
Yujong Lee
558022c3dd refactor(rust): extract provider translations
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-17 22:46:02 +00:00
Mateo Wang
fec8231b83
Merge pull request #41419 from BerriAI/litellm_bedrock_openai_no_cachepoint
fix(bedrock): never emit Converse cachePoint for OpenAI-family models
2026-09-17 15:43:04 -07:00
ryan-crabbe-berri
f04f0258f7 refactor(team): model the bulk budget audit payload as frozen types 2026-09-17 15:41:06 -07:00
mateo-berri
1feaa48705 fix(proxy): log TypeSafe calls that name no model as unknown 2026-09-17 15:37:00 -07:00
mateo-berri
ca91751d5b fix(responses): keep the addressed response id off bridged provider requests
The Responses id security hook keeps the id a client addressed under
`_litellm_addressed_response_id` in the request body so internal retries can
re-authorize it. On a model without a native Responses config that body is
bridged into `completion()` kwargs, the key was treated as a provider param,
and providers rejected it, so every follow-up turn carrying
`previous_response_id` returned 400.

Register the key in `all_litellm_params` so it is dropped before any provider
request, and share one constant between the hook and the param list.
2026-09-17 15:35:11 -07:00
mateo-berri
4371ddb620 feat(cli): keep lite autoroute up and down as hidden deprecated aliases 2026-09-17 15:25:12 -07:00
ryan-crabbe-berri
775b83bcf4 refactor(team): drop null limits and ISO-format timestamps in the bulk budget audit payload 2026-09-17 15:19:35 -07:00
ryan-crabbe-berri
909a30d6a1 fix(team): keep a forked member budget's reset window and audit bulk member budget writes
Forking a shared budget row rebuilt budget_reset_at from the duration, so editing
an unrelated limit restarted the member's window while their spend carried over:
a tpm bump quietly handed them a fresh period. The fork now inherits the source
row's deadline, and only recomputes when the patch actually sets budget_duration.

The bulk member budget route now writes one audit entry per call, a team-scoped
'updated' row carrying every written member's limits before and after, matching
what /team/member_add already records for membership changes. It honors the
litellm-changed-by header like the other audited team routes.
2026-09-17 15:17:00 -07:00
mateo-berri
c2fbb11dca fix(license): let a wildcard allowed_features license grant the auto_router feature 2026-09-17 15:08:09 -07:00
Yassin Kortam
356b8d4074
Merge pull request #41444 from zachbernstein-sdx/fix/scim-pagination-count-clamp
fix(scim): align pagination `count` validation with RFC 7644
2026-09-17 14:59:22 -07:00
Mateo Wang
80b0a875dc
Merge pull request #41673 from BerriAI/litellm_deprecate_litellm_proxy_entrypoint
feat(cli): deprecate the litellm-proxy entrypoint in favour of lite
2026-09-17 14:54:47 -07:00
mateo-berri
255190ca35 Merge remote-tracking branch 'origin/main' into litellm_fix_image_edits_bracketed_alias 2026-09-17 14:49:54 -07:00
mateo-berri
36b471ff24 Merge commit '1dd4c13815' into litellm_bedrock_openai_no_cachepoint 2026-09-17 14:36:33 -07:00
Yassin Kortam
bc9f4fec5b
Merge pull request #41542 from BerriAI/litellm_bedrock_realtime_sdk_0_11
fix(bedrock): support aws-sdk-bedrock-runtime 0.10/0.11 in Bedrock Realtime
2026-09-17 14:26:39 -07:00
Yassin Kortam
1b4739c415
Merge pull request #41493 from BerriAI/litellm_bridge_mid_conversation_system_turns
fix(anthropic-bridge): convert mid-conversation system turns to user turns on /v1/messages to chat completions
2026-09-17 14:25:36 -07:00
mateo-berri
ec0e6dd98a feat(cli): deprecate the litellm-proxy entrypoint in favour of lite 2026-09-17 14:05:31 -07:00
mateo-berri
a440d6d452 refactor(cli): rename lite autoroute up/down to start/stop 2026-09-17 14:05:20 -07:00
yassin
6e84ff0cb2 fix(bedrock): keep raw SDK import failure out of the realtime client error
Log the underlying ImportError server side and send the client only the installed
version, the supported range and the install hint

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-17 20:57:28 +00:00
yuneng-jiang
1dd4c13815
Merge pull request #41374 from BerriAI/litellm_fix_guardrail_lifecycle_untimed_entries
fix(ui): keep untimed guardrail entries on the request lifecycle
2026-09-17 13:44:18 -07:00
yuneng-jiang
efce8b0485
Merge pull request #41373 from BerriAI/litellm_fix_integration_conftest_import
fix(tests): resolve the integration support package without run.py's PYTHONPATH
2026-09-17 13:34:05 -07:00
yassin
a56390ed09 Merge remote-tracking branch 'origin/main' into litellm_bedrock_realtime_sdk_0_11
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

# Conflicts:
#	uv.lock
2026-09-17 20:32:59 +00:00
ryan-crabbe-berri
5396810bb6 fix(management_v1): authorize bulk member budget writes off the writer and reject unschedulable reset windows
The roster the authorization check reads came from the routed reader, so a
replica lagging behind a team-admin demotion could still grant that caller
member-budget writes. Pin that read to the writer, as the model reconcile does.

A budget_duration the reset job can never schedule from, a non-positive one
that leaves the row permanently due or an unparseable one that blew up mid
batch as a 500, is now a 422 naming the row it came from, with nothing written.
The check is the same one /team/member_update and /budget/new already run,
lifted out of validate_budget_duration so both surfaces share it.
2026-09-17 13:31:32 -07:00
yuneng-jiang
7fb3e73276
Merge pull request #41659 from BerriAI/litellm_/release-version-bump-229f45
chore: bump litellm-proxy-extras 0.4.98 -> 0.4.99
2026-09-17 13:30:19 -07:00
Yuneng Jiang
6544671a31
fix(ui): order each lifecycle phase on its own clock 2026-09-17 13:29:45 -07:00