Commit graph

45676 commits

Author SHA1 Message Date
mateo-berri
1a14aadd03 bump: version 1.100.2 2026-09-19 12:13:22 -07:00
mateo-berri
fff43dfc05 fix(bedrock): clamp maxTokens to the 16-token minimum for OpenAI GPT and xAI Grok models on Converse (#41870)
Backport of #41870 to stable/1.100.x. Cherry-picked from a6e3a72ed8 (main) with -m 1.

converse_transformation.py conflicted because this line has no `import re` and no
_is_openai_gpt_reasoning_model helper next to the insertion point. The resolution adds
exactly the four hunks #41870 merged: the import, the 16-token constant,
_requires_min_max_tokens, and the clamped maxTokens assignment. The test file applied clean.
2026-09-19 12:11:50 -07:00
Mateo Wang
b7d81e98b6
Merge pull request #41208 from BerriAI/litellm_backport_1_100_x_responses_content_policy_fallback
fix(responses): backport mid-stream content_policy_violation fallback routing to stable/1.100.x
2026-09-15 02:47:52 -07:00
mateo-berri
40f4fa2629 test(responses): import import_module in the error-events tests 2026-09-15 01:41:17 -07:00
mateo-berri
2e3a7f689d fix(responses): keep context-window events out of mid-stream fallback and fix stale exception assertions
(cherry picked from commit fff7a2cecf)
2026-09-15 01:16:38 -07:00
mateo-berri
2e44af6d20 fix(responses): import BaseLLMException lazily and collect stream chunks via anext
Move the BaseLLMException import into _map_error_event_exception so the
module no longer imports it at load time, clearing the module-level cyclic
import CodeQL flagged. The class is used only on the cold error path.

Replace the mutable list-append test collector with aiter/anext so the
regression tests read the stream immutably.

(cherry picked from commit c246372859)
2026-09-15 01:16:38 -07:00
mateo-berri
80b2c803bd fix(responses): route mid-stream error events through exception_type so content_policy_fallbacks fire
Mid-stream error events on the streaming Responses API were all raised as
APIError, so a content_policy_violation event never matched the router's
content-policy fallback dispatch and the client got the raw error instead
of the fallback model's answer. Map each error event's code and status
through the existing exception_type mapping, matching the non-streaming
path, and unwrap the typed ContentPolicyViolationError and
ContextWindowExceededError so the router routes them to the configured
content_policy_fallbacks and context_window_fallbacks.

(cherry picked from commit 073d4fe2b0)
2026-09-15 01:16:38 -07:00
Mateo Wang
1dba17b10d
Merge pull request #40495 from BerriAI/litellm_revert_1_100_x_spend_backports
revert: drop the spend attribution backports from stable/1.100.x
2026-09-09 18:10:35 -07:00
mateo-berri
dec2c2a72a Revert "fix(spend-tracking): keep batch spend keys joinable after v1.99 provenance gate (#39568)"
This reverts commit 803e0f736e.
2026-09-09 16:58:47 -07:00
mateo-berri
d7198f48c0 Revert "fix(spend-tracking): keep internal service-account key names readable in spend logs (#39572)"
This reverts commit c2e18a4320.
2026-09-09 16:58:46 -07:00
Mateo Wang
e4e811ce2b
Merge pull request #40455 from BerriAI/litellm_backport_1_100_x_retry_breadcrumb_growth
fix(router): backport #39491 to stable/1.100.x so retry breadcrumbs stop retaining every earlier request
2026-09-09 14:27:44 -07:00
mateo-berri
a9ea5713ab test(router): type the breadcrumb test helpers 2026-09-09 14:01:38 -07:00
mateo-berri
76b5fec1c5 fix(router): keep retry breadcrumbs per request and out of the request snapshot
Backport of #39491 to stable/1.100.x. Cherry-picked from 7bc2d0b06e (litellm_internal_staging), with the router hunk of 7c87451ead.
2026-09-09 13:21:09 -07:00
Mateo Wang
ecc04bf811
Merge pull request #40176 from BerriAI/litellm_backport_1_100_x_spend_key_hash
chore(release): backport #39568 and #39572 to stable/1.100.x and cut 1.100.1
2026-09-07 17:18:00 -07:00
mateo-berri
0b176c30de chore: refresh uv.lock for 1.100.1 2026-09-07 16:05:53 -07:00
mateo-berri
8b0ae0285f bump: version 1.100.0 -> 1.100.1 2026-09-07 16:05:47 -07:00
mateo-berri
c2e18a4320 fix(spend-tracking): keep internal service-account key names readable in spend logs (#39572)
Backport of #39572 to stable/1.100.x.
Cherry-picked from merge commit da09976c16 (litellm_internal_staging) with -m 1.
2026-09-07 16:00:13 -07:00
Mateo Wang
803e0f736e fix(spend-tracking): keep batch spend keys joinable after v1.99 provenance gate (#39568)
Backport of #39568 to stable/1.100.x.
Cherry-picked from merge commit 04a198e3e3 (litellm_internal_staging) with -m 1.
2026-09-07 16:00:01 -07:00
yuneng-jiang
e4f2526570
Merge pull request #39992 from BerriAI/litellm_rc-1.100.0-wolfi-glibc-2.44
fix(docker): bump wolfi-base for glibc 2.44 and pin apk python to 3.13 on rc/1.100.0 (cherry-pick #38917, #38973)
2026-09-05 18:45:39 -07:00
mateo-berri
13f98f83f3
fix(docker): bump wolfi-base for glibc 2.44 and pin apk python to 3.13 in migrations image
(cherry picked from commit 39473745dd)
2026-09-05 18:06:16 -07:00
mateo-berri
728dec258f
fix(docker): bump wolfi-base for glibc 2.44 and pin apk python to 3.13
(cherry picked from commit 14f392bb9b)
2026-09-05 18:06:16 -07:00
yuneng-jiang
10631eb834
Merge pull request #38805 from BerriAI/litellm_internal_staging
chore(ci): promote internal staging to main
2026-08-29 18:09:58 -07:00
yuneng-jiang
6b33d17563
Merge pull request #38850 from BerriAI/litellm_e2e_retry_transient_upstream
test(e2e): retry upstream-saturation failures in the claude CLI driver
2026-08-29 17:48:04 -07:00
yuneng-jiang
df848d85ff
Merge pull request #38833 from BerriAI/litellm_deflake_reliability_fallbacks
test(e2e): stop the reliability fallback tests flaking on gpt-5.5's reasoning budget
2026-08-29 17:44:30 -07:00
yucheng-berri
3c2fa5fafb
fix(otel/v2): detach credential-routed tenant spans into their own trace (#38847)
* fix(otel/v2): detach credential-routed tenant spans into their own trace

Multi-tenant OTel v2 routes a team or key's LLM-call span to that tenant's
own vendor account (New Relic, Arize, Langfuse, Weave) via dynamic OTLP
credential headers, while the request-root, auth, and db spans stay on the
operator's default backend. The span was still parented into the request
trace, so the tenant account received a child whose parent it never got,
and New Relic rendered it as a fragmented trace with a missing parent.

Detach a credential-routed span the same way a project-routed (Phoenix)
span already detaches: root a fresh trace in the tenant account and link
back to the request trace for correlation. Service-name routing keeps
parenting, since it only relabels service.name on the same operator
backend where the parent is present.

Guard the detach on the callback actually owning an OTLP exporter the
credentials can reach: a callback owning only a console or in_memory
exporter has nowhere to stamp them, so the span would export to the
default backend unchanged and detaching would orphan it on the very
backend that holds its parent. In that case warn once and keep the
default tracer.

* fix(otel/v2): derive tenant-route routability from resolved exporter transport

A denylist classified an owned exporter as routable whenever its kind was
not console/in_memory, so a typo'd or unavailable kind (e.g. "otlp",
"grcp") passed the check while _exporter_from_spec falls it back to a
header-ignoring console exporter. Detaching such a span would root a fresh
trace that only ever reaches the operator console, never the tenant
backend, orphaning it on both sides.

Route on a shared exporter_transport() predicate that resolves the kind the
same way _exporter_from_spec builds it (registered factories + otlp_http
aliases -> http, otlp_grpc aliases -> grpc, else headerless), so an
unresolvable kind is headerless and stays parented. Fixes the same latent
gap in project routability.
2026-08-29 17:41:25 -07:00
Yassin Kortam
d619b1c227
feat(helm): make extra ingress paths configurable in the componentized chart (#35700)
The componentized chart's Ingress renders a fixed path set: the UI paths, a
hardcoded gateway prefix list mirroring gateway/routes/allowlist.py, and a `/`
Prefix catch-all to the backend. values.yaml exposes no path knob, so an
operator who needs a route the chart does not know about has to fork the
template.

That prefix list is a snapshot of the data plane at release time and drifts
from it. `/watsonx` is in GATEWAY_PATH_PREFIXES with no ingress rule and no
backend prefix, so `/watsonx/*` falls into the catch-all, reaches the backend,
and 404s. A provider passthrough prefix added upstream after the chart version
an operator runs has the same shape, and a custom
general_settings.pass_through_endpoints route has a path only the operator
knows, so the chart can never ship a rule for it at all.

ingress.extraPaths takes a list of {path, service, pathType} entries rendered
in addition to the built-in paths, never in place of them. They render after
every built-in path and before the backend catch-all, and an entry repeating a
path the chart already routes is rejected: duplicates within one rule are
resolved by position or by controller-specific tie breaking, so an entry at
`/` Prefix would swallow the whole backend management API rather than add to
it. `service` picks the component Service — gateway by default, or backend or
ui — so an operator does not have to reconstruct release-templated Service
names, and `pathType` defaults to Prefix. A non-mapping entry, an entry with
no path, an unknown service, an unknown pathType, and a duplicate each abort
the render naming the offending index rather than emitting an Ingress that
misroutes traffic.

The duplicate check needs the built-in paths as data, so the UI paths move
from six literal YAML blocks into a $uiPaths list rendered by one range, and
their explanatory comments move from the rendered manifest into template
comments. The Ingress object this produces is unchanged: the same 92 paths in
the same order with the same backends, verified by parsing both renders.

The target component still answers only the paths its own route allowlist
keeps, so this makes a route routable, not servable.
2026-08-29 17:39:44 -07:00
yuneng-jiang
8e45522117
Merge pull request #38852 from BerriAI/litellm_/model-test-connection-artifact-805be5
fix(ui): drop stray text next to Close in the model connection test dialog
2026-08-29 17:30:43 -07:00
ryan-crabbe-berri
9da0b30888
Merge pull request #38843 from BerriAI/litellm_mag_budget_ui
feat(ui): set a model access group's shared budget from the dashboard
2026-08-29 17:27:17 -07:00
Yuneng Jiang
795c036279
fix(ui): drop stray text next to Close in the model connection test dialog
The Add Model page's connection test dialog rendered a literal ", ]" beside the Close button, left over from converting an array of footer buttons into JSX children.
2026-08-29 17:26:38 -07:00
Mateo Wang
ff2f06e37f
Merge pull request #38444 from BerriAI/litellm_mcp_connector_bulk_import
feat(mcp): bulk-import Anthropic MCP connectors via API and admin UI
2026-08-29 17:21:57 -07:00
Yuneng Jiang
bda2917273
test(e2e): retry upstream-saturation failures in the claude CLI driver
The driver retries rate-limit-shaped failures twice with a 65s backoff, but
RATE_LIMIT_SHAPED_RE only matches 429 / rate limit / too many requests /
throttled / CLI timeout. A saturated provider does not always say any of
those: litellm-e2e-pr build 182 turned a green cell red on

  status 503: litellm.ServiceUnavailableError: BedrockException -
  {"message":"Bedrock is unable to process your request."}

which matched nothing and so was never retried.

Add TRANSIENT_UPSTREAM_SHAPED_RE for 503, 529, "service unavailable",
"overloaded" and Bedrock's "unable to process your request", and have the
retry loop ask is_retryable_shaped (either shape) instead of
is_rate_limit_shaped.

Kept as a second pattern rather than widened into the first on purpose. The
conftest feeds RATE_LIMIT_SHAPED_RE into the rate-limit summary, which the
binary-search helper reads to decide whether to lower a provider's request
rate. A 503 says the provider is out of capacity, not that we are asking too
often, so folding it in there would keep ratcheting our rate down against a
condition our rate never caused.

Retry-loop logging now names which shape fired, so a saturated upstream is
distinguishable from a throttled one in the run output.

Verified against the literal failure text from build 182: is_retryable_shaped
is True while is_rate_limit_shaped stays False.

Note this covers CLI-driven rows only. HTTP-probe rows (tool_search,
count_tokens) have no retry layer at all, so the specific cell that failed in
build 182 is still unprotected -- that is a separate change to http_probe.
2026-08-29 17:13:10 -07:00
ryan-crabbe-berri
797a4dcbfe fix(ui): badge the Model Access Group Budgets tab as Beta rather than New 2026-08-29 17:10:20 -07:00
ryan-crabbe-berri
934edbab1f chore: sync the lazy OpenAPI snapshot with the access group list docstring 2026-08-29 17:08:10 -07:00
yucheng-berri
842c423ccd
fix(guardrails): stop Lakera monitor mode forwarding unmasked PII on Responses-API bodies (#38841)
#34940 widened the mask-in-place safety guard so a Responses-API
`instructions` field (and a combined messages+input body) skips the
PII masking branch. With `on_flagged: "monitor"` that fell straight
through to "allow", so PII that used to be masked now reaches the
model unredacted.

Monitor means "don't block", not "don't redact". Recover the one shape
whose payload is still fully writable: mask it and write the redacted
instructions back into `data["instructions"]` directly, since
apply_redacted_messages_back has no path for that field and would
otherwise fold the instructions text into `data["input"]`.

The combined messages+input and multimodal shapes stay unmasked - both
are unsafe to write back, not merely unwritable - and now log an error
naming the reason instead of passing silently.

No block/allow decision changes: block and inject_system_message keep
the exact outcomes #34940 shipped.
2026-08-29 17:07:39 -07:00
ryan-crabbe-berri
8530f80c78 chore(ui): sync schema.d.ts with the access group list docstring 2026-08-29 17:05:39 -07:00
ryan-crabbe-berri
e257383cc6
Merge pull request #38249 from BerriAI/litellm_fix_empty_user_models_visibility
fix(proxy): list all non-team models for users with an empty model list
2026-08-29 17:04:28 -07:00
yuneng-jiang
b82da3d138
Merge pull request #38846 from BerriAI/litellm_/release-version-bump-817682
chore: rebuild Admin UI bundle for the next release
2026-08-29 16:58:10 -07:00
ryan-crabbe-berri
6f8a3b8661 fix(proxy): scope model listing direct access to the calling key's grant
Direct access on /model/info was read from the user record alone, so an
unrestricted user calling with a key limited to a few models saw every non-team
deployment, including ones the key gets a 403 on. Resolve the key's grant the
same way and intersect the two.

Resolving a grant now also expands access groups, which the key path needs and
the user path was missing.

Claude-Session: https://claude.ai/code/session_01XL7LBFEew4wi8gphVCDq6n
2026-08-29 16:54:02 -07:00
Yuneng Jiang
76eb7409b8
chore: update Next.js build artifacts (2026-08-29 23:50 UTC, node v24.19.0) 2026-08-29 16:50:17 -07:00
ryan-crabbe-berri
243f8317f4 style(ui): drop decorative section banners from the access group budget hooks 2026-08-29 16:47:50 -07:00
Mateo Wang
2a79a81b46
Merge pull request #38837 from BerriAI/litellm_fix_azure_responses_anyof_tool_schema
fix(azure): flatten top-level tool schema combinators for Azure Responses GPT-4-family deployments
2026-08-29 16:46:22 -07:00
ryan-crabbe-berri
7c0e58ed06 fix(ui): stop offering access group budget writes that the proxy refuses
An Admin Viewer and a group whose name contains a slash both reached an
enabled Set budget action that could only ever come back 403 or 404. Gate
the row actions on proxy admin and on the name being addressable, with the
reason in the tooltip.
2026-08-29 16:45:48 -07:00
Mateo Wang
1f5e76155b
Merge pull request #38836 from BerriAI/litellm_fix_messages_effort_budget_cap
fix(anthropic): cap reasoning_effort thinking budget below max_tokens on /v1/messages
2026-08-29 16:45:18 -07:00
Mateo Wang
ecd42ea77a
Merge pull request #38792 from BerriAI/litellm_fix_responses_anyof_tool_schema
fix(openai): flatten top-level anyOf/oneOf/allOf in Responses API tool schemas
2026-08-29 16:45:11 -07:00
Mateo Wang
42d8360f29
Merge pull request #38820 from BerriAI/litellm_fix_together_sync_output_ceiling
fix(together_ai): stop writing context_length as max_output_tokens in the serverless sync
2026-08-29 16:44:56 -07:00
ryan-crabbe-berri
2ffd3d0e7d
Merge pull request #35887 from BerriAI/litellm_window_spend_reader
perf(proxy): read budget-window spend from the maintained window table
2026-08-29 16:44:53 -07:00
Mateo Wang
a979c89b88
Merge pull request #38804 from BerriAI/litellm_registry_audit_rolling_38693
fix(models): registry audit: new Together/Fireworks/Gemini/Mistral/xAI models, xai retirement repricing, bedrock grok-4.6 caching, deprecation dates
2026-08-29 16:44:45 -07:00
ryan-crabbe-berri
a5cd3fae81 fix(ui): name the tab Model Access Group Budgets and keep sub-cent budgets readable
Marks the tab New, and stops a budget under a cent rendering as "of $0.00"
next to an over-budget meter.
2026-08-29 16:38:58 -07:00
ryan-crabbe-berri
f82708f41d Merge branch 'litellm_window_spend_writer' into litellm_window_spend_reader 2026-08-29 16:36:09 -07:00
ryan-crabbe-berri
ce96db5a61 test(proxy): pass the window spend args in the access group requeue test 2026-08-29 16:36:04 -07:00