Commit graph

55068 commits

Author SHA1 Message Date
Maximilian Rink
e736c9402e fix(cache): avoid redundant namespace cast 2026-10-21 01:16:45 +02:00
Maximilian Rink
ba2423667a fix(cache): narrow namespace join values 2026-10-21 01:16:43 +02:00
Maximilian Rink
f5e9ff5fee fix(cache): type namespace components explicitly 2026-10-21 01:16:41 +02:00
Maximilian Rink
bf67330534 fix(cache): preserve explicit namespaces for authenticated callers 2026-10-21 01:16:40 +02:00
Maximilian Rink
99221b70c9 fix: suppress documented provider cast lint delta 2026-10-21 01:16:39 +02:00
Maximilian Rink
f6246ad03b test: cover cache bypass paths 2026-10-21 01:16:39 +02:00
Maximilian Rink
08cbfeb92d test: cover authenticated cache key isolation 2026-10-21 01:16:38 +02:00
Maximilian Rink
087a582819 fix: keep type-discipline suppressions on casts 2026-10-21 01:16:37 +02:00
Maximilian Rink
ba39908079 style: format documented type casts 2026-10-21 01:16:36 +02:00
Maximilian Rink
fed7e34ecc fix: document intentional type casts in cache PR 2026-10-21 01:16:34 +02:00
Maximilian Rink
8040db0906 style: format spend tracking utility 2026-10-21 01:16:34 +02:00
Maximilian Rink
0d25ab4096 fix: keep type-check delta stable after cache update 2026-10-21 01:16:33 +02:00
Maximilian Rink
4c344d2992 test: restore cache auth fixture import 2026-10-21 01:16:32 +02:00
Maximilian Rink
d99cf3505e style: format cache key fallback 2026-10-21 01:16:31 +02:00
Maximilian Rink
44f477d456 test(proxy): exercise authenticated cache caller isolation 2026-10-21 01:16:29 +02:00
Maximilian Rink
5c3b7e2949 fix(cache): avoid weak caller namespace hashing 2026-10-21 01:16:28 +02:00
Maximilian Rink
b265bed794 test(cache): resolve upstream test conflicts 2026-10-21 01:16:28 +02:00
Maximilian Rink
0c6777e408 chore(cache): justify cache key mutation boundaries 2026-10-21 01:16:28 +02:00
Maximilian Rink
e87ae809a6 fix(cache): keep typed cache helper within strict gates 2026-10-21 01:16:27 +02:00
Maximilian Rink
9265ad7131 style(cache): format cache implementation 2026-10-21 01:16:27 +02:00
Maximilian Rink
c3ff7cd320 fix(cache): propagate unavailable cache keys safely 2026-10-21 01:16:26 +02:00
Maximilian Rink
877981dc4c fix(cache): satisfy type discipline for scoped keys 2026-10-21 01:16:25 +02:00
Maximilian Rink
db5bf1ca86 fix(cache): fail closed for incomplete auth identities 2026-10-21 01:16:25 +02:00
Maximilian Rink
207a58e51a fix: scope cache keys by hashed auth token 2026-10-21 01:16:24 +02:00
Maximilian Rink
0b13b2eaca fix: use HMAC for caller cache namespaces 2026-10-21 01:16:24 +02:00
Maximilian Rink
b59d30aaba fix: type cache namespace metadata 2026-10-21 01:16:23 +02:00
Maximilian Rink
96a948efac fix: satisfy cache type discipline gate 2026-10-21 01:16:23 +02:00
Maximilian Rink
ab85c2304c fix(cache): isolate authenticated proxy callers 2026-10-21 01:16:22 +02:00
Maximilian Rink
4eea6a45f3 typing: keep router cache boundary type-safe 2026-10-21 01:16:21 +02:00
Maximilian Rink
2df3f7e2c6 typing: document dynamic cache metadata boundaries 2026-10-21 01:16:20 +02:00
Maximilian Rink
b18aa4ce6c style: format cache scope annotations 2026-10-21 01:16:19 +02:00
Maximilian Rink
882e2709ca typing: annotate cache scope tuples 2026-10-21 01:16:19 +02:00
Maximilian Rink
48c556e6cf style: place cache cast suppression on call 2026-10-21 01:16:18 +02:00
Maximilian Rink
5f5dd82b3e style: satisfy cache scope type gates 2026-10-21 01:16:17 +02:00
Maximilian Rink
38d9f4a917 style: use comprehension for cache metadata 2026-10-21 01:16:16 +02:00
Maximilian Rink
d2e6654c28 fix(proxy): keep cache scope types explicit 2026-10-21 01:16:15 +02:00
Maximilian Rink
ef74262465 chore: document config rebinding 2026-10-21 01:16:14 +02:00
Maximilian Rink
2659f1ef64 fix(proxy): scope rebuilt router cache by caller 2026-10-21 01:16:14 +02:00
Maximilian Rink
67cc9913d2 test: type mock provider wrapper 2026-10-21 01:16:13 +02:00
Maximilian Rink
36d4afd59a test: assert caller cache hit before isolation miss 2026-10-21 01:16:12 +02:00
Maximilian Rink
55536bc23d test(proxy): await response cache write deterministically 2026-10-21 01:16:10 +02:00
Maximilian Rink
d76329de6d fix(proxy): preserve response caching on DB router rebuild 2026-10-21 01:16:09 +02:00
yuneng-jiang
7c39dbfab8
build(deps): bump pillow and dashboard vite, defer certifi to clear osv-scan (#47678)
Pillow 13.0.0 requires Python >= 3.11, so the ci group pin is split by
Python version and the 3.10 resolution stays on 12.3.0 with a 7-day
osv-scanner override. Dashboard vite moves from 7.3.5 to 7.3.7. The
certifi fix (2026.10.19) is still inside the 3-day uv exclude-newer
window, so its advisory is ignored until 2026-10-23
2026-10-20 23:12:28 +00:00
mrinal-berri
dba4fa0e94
fix(proxy): flush tool discovery queue when use_redis_transaction_buffer is enabled (#47653)
* fix(proxy): flush tool discovery queue when use_redis_transaction_buffer is enabled

With the Redis transaction buffer on, discovered tools were never written to
LiteLLM_ToolTable: the only call to _flush_tool_discovery_queue was on the
non-Redis commit path. Each pod's tool queue is never buffered in Redis, so
every pod now flushes its own queue on each spend tick, before the leader
lock check.

Co-authored-by: Noah Nistler <60981020+noahnistler@users.noreply.github.com>

* test(proxy): exercise real leader election in the tool discovery flush test

The writer's PodLockManager had no Redis in the test, so neither case was ever
the leader and the lock-held parameter changed nothing. The fake Redis also had
no async_rpush_pipeline, so every tick took the push-failure branch. Wire the
fake into the lock manager the way ProxyLogging does in production, back it
with real lists, and assert only the lock holder drains the spend buffer.

Co-authored-by: Noah Nistler <60981020+noahnistler@users.noreply.github.com>

---------

Co-authored-by: Noah Nistler <60981020+noahnistler@users.noreply.github.com>
2026-10-20 16:08:01 -07:00
devin-ai-integration[bot]
d7c3588efd
feat(nvidia_riva)!: add riva_offline mode for offline-only ASR models (#41021)
* feat(nvidia_riva): add riva_offline mode for offline-only ASR models

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

* test(nvidia_riva): assert offline vs streaming via fake service call tracking

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

* chore(ui): regenerate schema.d.ts after user soft_budget docstring removal

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

* fix(nvidia_riva): parse riva_offline strings, map oversize offline audio to 413

A multipart riva_offline=false no longer turns offline mode on, a malformed value drops under drop_params and answers 400 without it, and a Riva RESOURCE_EXHAUSTED for a message over the server's max now returns a non-retryable 413 instead of a retried 429

* fix(nvidia_riva): apply the request timeout to offline recognition and keep riva_offline on an api_base override

Offline Recognize now runs as a gRPC future waited on with the request
timeout, so a stalled Riva server returns a 408 and the call is cancelled.
riva_offline is a mode flag, not a credential, so an api_base override no
longer clears it. The 413 hint for audio over the gRPC message limit is
reworded, and the new tests carry type annotations.

* fix(nvidia_riva): wait the request timeout in seconds whatever its form and cap the riva client to versions that import

A timeout from os.environ, a multipart form field, or an httpx.Timeout reached the gRPC future as a string or object,
so result() raised TypeError and every offline call came back as a false 408. The handler now turns the timeout into
float seconds with CompletionTimeout.as_limit, taking the read limit of an httpx.Timeout, for both the offline future
and the streaming deadline

The stt-nvidia-riva extra caps nvidia-riva-client below 2.17, since every later release either pins an older grpcio
or ships stubs that need a newer one than the grpcio==1.78.0 pin, so a fresh install failed at import

* fix(nvidia_riva): parse the timeout only where the call uses it and drop the riva client cap

A malformed timeout no longer fails streaming calls on clients that take no
timeout. On offline calls it is a 400, or the default under drop_params, and
an httpx.Timeout with no read limit waits the default instead of forever.

The nvidia-riva-client cap made installs next to a newer client unresolvable,
so the extra goes back to main's specifier.

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-10-20 23:03:56 +00:00
joshua-berri
4aec80f5ee
fix(mcp): upgrade to MCP SDK 2.3.0 and raise the per-event SSE size cap (#47034)
* fix(mcp): upgrade to MCP SDK 2.3.0 and raise the per-event SSE size cap

MCP SDK 2.x reads Streamable HTTP responses through httpx2's SSE parser,
which rejects any single event over 1 MiB, so a large tools/call result
failed with 'SSE stream ended without a response'. mcp 2.3.0 exposes
max_sse_event_size, and MCPClient now passes a 64 MiB default,
configurable with LITELLM_MCP_MAX_SSE_EVENT_SIZE_BYTES

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

* fix(mcp): fall back for invalid SSE event limits

* test(mcp): verify configured SSE limits and recovery

* chore(mcp): remove redundant dependency comment

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joshua Valluru <326636767+joshua-berri@users.noreply.github.com>
2026-10-20 16:00:00 -07:00
Mateo Wang
9fbeebc988
feat(extraction): add /v1/extraction with Cloudflare Clairic support (#47473)
* feat(extraction): add Clairic extraction types and Cloudflare provider config

* feat(extraction): add the /v1/extraction route, router wiring, and Clairic billing

* fix(extraction): refuse or drop stream, pass unknown keys, run guardrails, keep the requested model name

Clairic does not stream, so stream=true answers 400 and is dropped and billed under drop_params. Keys LiteLLM does not know pass through to Cloudflare. Guardrails scan state, field instructions and text answers. Frozen decision and extraction responses now carry the requested model name. List fields must name their item type. /health/test_connection and the Add Model page accept the extraction mode.

* fix(extraction): keep upstream model names on decisions, scan images, keep typed values, refuse OpenAI params

Scope the frozen-response model stamp to extraction so /v1/decisions and /v1/systemone return the upstream name as on main. Pass request images to guardrails as data URLs and drop answer spans when a response guardrail rewrites state_text. Field spec values keep their JSON type, so a wrong type answers 400 instead of being coerced. OpenAI generation params answer 400 unless drop_params. The Model Hub shows a /v1/extraction snippet for extraction models.

* fix(extraction): send only Clairic's request fields, count extraction tokens, keep typed answers typed, drop spans a request guardrail made stale, and honor --max_tokens

* fix(extraction): scan number answers in response guardrails, rewrite guardrail fields in linear time, and leave --max_tokens as on main

* fix(extraction): scan float answers as whole numbers so fraction digits never trip a response guardrail

* fix(extraction): round only mean and median for response guardrails so fractional values keep their decimal text

* fix(extraction): count state and fields for budget reservations and scan estimate quantiles in response guardrails

* fix(extraction): send each repeated text to guardrails once and keep the context-window budget reservation

* test(extraction): type request_data in the guardrail test helpers
2026-10-20 15:51:45 -07:00
yuneng-jiang
9717b38050
bump: litellm-enterprise 0.1.78 -> 0.1.79, litellm-proxy-extras 0.4.110 -> 0.4.111, litellm 1.107.0 -> 1.108.0 (#47668) 2026-10-20 22:37:26 +00:00
berriai-litellm-provider-info-sync[bot]
5c836d6e13
feat(cost-map): add fireworks deepseek v4.1 flash 1017 us at the us-only premium (#47667)
Price-Sync: litellm-providers

Co-authored-by: berriai-litellm-provider-info-sync[bot] <328147090+berriai-litellm-provider-info-sync[bot]@users.noreply.github.com>
2026-10-20 15:36:29 -07:00
berriai-litellm-provider-info-sync[bot]
8e3ce6d110
fix(vertex-ai): drop flex prices from gemini-nano-banana-2.1 (#47666)
Price-Sync: litellm-providers

Co-authored-by: berriai-litellm-provider-info-sync[bot] <328147090+berriai-litellm-provider-info-sync[bot]@users.noreply.github.com>
2026-10-20 15:34:37 -07:00