Commit graph

49820 commits

Author SHA1 Message Date
kerry
024a887521 feat(model_info): add Gemini fallback generalization rules (vertex routing + 2.5+ family baseline)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:49:35 +00:00
Yuneng Jiang
ad74c3ede7
bump: litellm-enterprise 0.1.67 -> 0.1.68, litellm-proxy-extras 0.4.97 -> 0.4.98, litellm 1.102.0 -> 1.103.0 2026-09-15 15:48:54 -07:00
yassin
91dde59bc3 refactor(proxy): validate request metadata before reconstructing key rate-limit view
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:48:47 +00:00
Yassin Kortam
eec954bf9a
Merge pull request #41296 from BerriAI/litellm_models_table_url_state
feat(ui): persist Models table search, filters, sort and page in the URL
2026-09-15 15:46:27 -07:00
Yassin Kortam
94a6dfaf52
Merge pull request #41307 from BerriAI/litellm_passthrough_deployment_model_id
fix(passthrough): attribute Vertex passthrough successes to the resolved router deployment
2026-09-15 15:44:38 -07:00
yassin
d4d8cc9092 fix(proxy): apply access denied message to JWT paths, sanitize denial log, await dashboard saves
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:44:03 +00:00
shivam
65132ef2e9 fix(cost): price native Responses WebSocket turns at their returned service_tier
The logging object built for aresponses_websocket sessions dropped the
service_tier carried by each billable response.completed/response.incomplete
event, so sessions were priced at the default tier. The logging object now
carries the tier when the session is single-tier, and completion_cost splits
mixed-tier sessions into one object per tier before pricing. Fixes #41299

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:42:58 +00:00
yassin
b13cf21fd1 fix(vertex_ai): bill Gemini Omni Interactions usage and Veo sampleCount on passthrough
Route Vertex and Gemini /interactions create responses through the shared
Interactions usage transformation so SpendLogs carry per-modality tokens and
cost instead of zeros, and carry parameters.sampleCount into Veo usage as
video_count so duration-based video cost is multiplied by the number of
generated videos

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:42:27 +00:00
Mateo Wang
6ee1d72ae8
Merge pull request #40872 from BerriAI/litellm_bedrock_sanitize_tool_use_id
fix(bedrock): sanitize client tool_call ids to Bedrock toolUseId constraints
2026-09-15 15:41:39 -07:00
yassin
be082013f7 fix(ui): label the response time chart tooltip with the series name
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:38:55 +00:00
kerry
357e0fca8e chore: merge origin/main into test cleanup
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:36:58 +00:00
yassin
db0f06d153 fix(proxy): skip team model tpm accounting when key owns model tpm limit
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:35:48 +00:00
yassin
ebb9a3ceeb chore(ui): regenerate schema.d.ts for the /nvidia_nim passthrough route
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:34:59 +00:00
yassin
c48723f210 fix(proxy): let a db pass-through entry override the yaml entry on the same path
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:34:35 +00:00
Mateo Wang
c3222ec110
Merge pull request #41171 from BerriAI/litellm_converted_stream_spend_tracking
fix(logging): track spend for streams a deployment hook converted to non-streaming
2026-09-15 15:34:13 -07:00
yassin
5d6e367d56 fix(proxy): keep alias rewrite off pass-through bodies and auth-merged params
Skip router_settings.model_group_alias resolution on registered pass-through
routes, rebuild the rewritten body from the cached client payload instead of the
auth-enriched request_data, and centralize the resolved-scope sentinel in
litellm/constants.py

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:32:11 +00:00
mateo-berri
69e9edb91a test(responses): fold the empty-choices regression tests into the mapped streaming iterator test file
Some checks failed
ai-gateway image / ai-gateway release image (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
Terraform Modules / fmt, validate, test (aws) (push) Has been cancelled
Terraform Modules / fmt, validate, test (gcp) (push) Has been cancelled
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled
2026-09-15 15:31:38 -07:00
kerry
f6ef0a24e0 fix(tests): restore rerank response import
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:28:23 +00:00
mateo-berri
fa116a0ecc Merge remote-tracking branch 'origin/main' into litellm_bedrock_sanitize_tool_use_id 2026-09-15 15:27:55 -07:00
yassin
1b6e76af16 fix(proxy): resolve LITELLM_LOG for uvicorn at startup and restore logger state in tests
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:27:24 +00:00
yassin
168607cc3f fix(proxy): register /nvidia_nim/ with the lazy passthrough loader
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:26:49 +00:00
yassin
754e87fa67 fix(ui): keep gateway auth and content-type headers ahead of playground custom headers
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:24:13 +00:00
mateo-berri
f22c7d274a Merge remote-tracking branch 'origin/main' into litellm_bedrock_rag_retrieval_filter
Some checks failed
ai-gateway image / ai-gateway release image (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
Terraform Modules / fmt, validate, test (aws) (push) Has been cancelled
Terraform Modules / fmt, validate, test (gcp) (push) Has been cancelled
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled
# Conflicts:
#	litellm/rag/main.py
#	tests/test_litellm/rag/test_main.py
2026-09-15 15:21:57 -07:00
mateo-berri
a6b0d4266f Merge origin/main into litellm_lit4767_empty_choices_streaming_guard
Takes main's Anthropic Messages adapter iterator, transformation, and
combined-chunk tests as-is: #35314 already skips choiceless chunks at the
top of both adapter loops, so the adapter-side guards this branch carried
are superseded. The Responses bridge guards stay
2026-09-15 15:20:16 -07:00
yassin
5b0fa89056 feat(ui): show average response time per model in usage model activity
Roll request_duration_ms of successful, non-internal requests into the
daily spend tables as total_response_time_ms plus timed_requests, expose
both through the daily activity endpoints, and derive the average in the
Usage -> Model Activity view of the Admin UI

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:16:12 +00:00
kerry
2586b21893 test: keep tests that survive correct cost-map updates
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:16:08 +00:00
yassin
9261a72eb7 test(passthrough): cover Vertex router resolution without a matching deployment
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:14:44 +00:00
yassin
c05af7a12f feat(ui): add custom request headers to the API Playground
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:12:06 +00:00
yassin
69be041da7 feat(proxy): add /nvidia_nim passthrough route for NIM object detection and OCR /v1/infer
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:11:08 +00:00
yassin
af4a0b4bc3 fix(proxy): keep yaml pass-through endpoints visible to auth after db overlay
Resolves LIT-2053

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:10:42 +00:00
yassin
460a0128c9 refactor(proxy): drop docstrings from key model limit helpers
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:08:39 +00:00
yassin
bae2bf003e fix(proxy): resolve router_settings.model_group_alias before key/team model auth
Key and team router_settings.model_group_alias aliases were resolved only after the key/team model allowlist checks ran, so a key allowed the alias target was denied when it requested the alias. Resolve the alias during auth and rewrite the request body to the target before the allowlist checks. The alias the client sent is kept in the request scope so the response model still echoes it.

Resolves LIT-3054

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:06:55 +00:00
Yassin Kortam
226b1e1bb9
Merge pull request #41288 from BerriAI/litellm_langsmith_preserve_events_during_flush
fix(langsmith): keep events appended during an in-flight flush instead of clearing them
2026-09-15 15:06:36 -07:00
yassin
168b5bc4fb feat(proxy): configurable client-facing model access denied message
Add litellm_settings.model_access_denied_message, a template ({model} placeholder) returned to clients instead of the detailed "can only access models=[...]" text on key/team/user/org/project and team-member model access denials. The full denial reason is still written to the proxy logs at WARNING. Unset keeps the existing detailed message, status codes and error types are unchanged.

Expose the new setting and the existing expose_router_debug_in_errors flag in the Admin UI general settings (String editor, Boolean toggle with an explicit True default) and allow both as safe DB overrides so they persist and propagate across workers.

Resolves LIT-5283

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 22:05:08 +00:00
Yassin Kortam
e36626174b
Merge pull request #41297 from BerriAI/litellm_return_400_on_lone_surrogate_input
fix(proxy): return 400 instead of 500 for lone surrogate escapes in request body
2026-09-15 15:04:08 -07:00
Yassin Kortam
579a30de83
Merge pull request #41300 from BerriAI/litellm_lit_1742_custom_provider_map_router
fix(router): accept custom_provider_map providers before the first completion call
2026-09-15 15:03:42 -07:00
Yassin Kortam
ee51be4db2
Merge pull request #41289 from BerriAI/litellm_fix_clientside_credential_deployment_scope
fix(router): stop registering a caller-supplied credential as a router deployment
2026-09-15 15:00:50 -07:00
yassin
c49fb1dd9d fix(openai): drop env var read for openai_system_messages_first, config and Admin UI set it
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 21:58:35 +00:00
yassin
5237fe4df3 refactor(passthrough): read the deployment model_info request state in two steps
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 21:57:12 +00:00
Yassin Kortam
1b8daf20e0
Merge pull request #38268 from BerriAI/litellm_fix_xai_web_search_nested_filters
fix(xai): honor nested web_search filters on the xAI Responses API
2026-09-15 14:56:36 -07:00
yassin
3cb64978d4 fix(proxy): honor LITELLM_LOG for uvicorn and proxy extras loggers
LITELLM_LOG=ERROR still printed INFO lines from uvicorn (startup and access log) and from the litellm_proxy_extras migration logger, because neither read the variable. Forward the resolved level to uvicorn when LITELLM_LOG is set and no explicit log_config or JSON logging is in use, and let the extras logger take its level from LITELLM_LOG

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 21:55:37 +00:00
yassin
99fa38504a fix(ui): bound Models table page, page size and sort_by read from the URL
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 21:55:07 +00:00
yassin
77d913958d feat(openai): add openai_system_messages_first to put system messages first for prompt caching
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 21:53:29 +00:00
yassin
51a4cb9fdd fix(proxy): key model rpm/tpm override takes precedence over team model limit
A key inside a team with model_rpm_limit / model_tpm_limit in team metadata could not
override those limits for itself: the v3 limiter always added the team's per-model
descriptor next to the key's, so the tighter team limit won. The docs already say the
resolution order is key metadata > key model_max_budget > team metadata

get_key_own_model_rate_limit returns only what the key sets on itself, and the team
descriptor now carries only the metrics the key does not override, so an rpm-only
override still leaves the team tpm pool enforced

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 21:48:06 +00:00
Yassin Kortam
fa09de9e45
Merge pull request #41279 from BerriAI/litellm_reset_budget_decrement_spend
fix(proxy): reset budgets by decrementing pre-reset spend instead of zeroing rows
2026-09-15 14:45:03 -07:00
kerry
a428cc8d84 test: restore runtime-derived tests dropped by mistake
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 21:44:39 +00:00
Yassin Kortam
c1e1d62903
Merge pull request #41291 from BerriAI/litellm_lit1643_auth_failure_user_agent
fix(proxy): keep client User-Agent on auth failure spend logs
2026-09-15 14:44:32 -07:00
yassin
0cc6968495 fix(router): accept custom_provider_map providers before the first completion call
get_llm_provider() and Router._add_deployment() only knew the built-in
provider_list and JSON providers, so a provider registered through
litellm.custom_provider_map was rejected until custom_llm_setup() had
run inside the first completion() call. Both now check the map directly.

Resolves LIT-1742

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 21:43:47 +00:00
tin-berri
ce1a4f896a
Merge pull request #41272 from BerriAI/litellm_fuse_v2_classifier_pr
feat(router): add Fuse V2 classifier after capability forecasting
2026-09-15 14:43:44 -07:00
yassin
e62ff9ebee fix(proxy): return 400 instead of 500 for lone surrogate escapes in request body
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 21:40:53 +00:00