Commit graph

45712 commits

Author SHA1 Message Date
Devin AI
31ae093cbf test(ollama): assert api_base resolution at the HTTP boundary with respx
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-31 20:14:19 +00:00
Devin AI
f7c33f7c81 fix(ollama): resolve explicit api_base before litellm.api_base global and forward it to the bridge model-info lookup
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-31 20:04:14 +00:00
devin-ai-integration[bot]
1249f84b10
fix(vertex_ai): graft default vertex path when api_base has a version-only path (#38986)
* fix(vertex_ai): graft default vertex path when api_base has a version-only path

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

* fix(vertex_ai): keep query and fragment placement when grafting vertex path

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

* fix(vertex_ai): merge alt=sse into existing query when streaming

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-08-31 12:56:34 -07:00
Mateo Wang
0c21b30cb7
feat(spend_tracking): persist router metadata in spend logs for internal router models (#39001)
* feat(spend_tracking): persist router metadata in spend logs for internal router models

* test(spend_tracking): expect router_metadata key in exact-payload tests, type the routed-kwargs helper
2026-08-31 12:52:34 -07:00
Ashton Sidhu
9f9236e8d5
fix(guardrails): exclude images from HiddenLayer v1 scans (#29210)
* Don't scan images

* Fix failing tests

* Fix lint: typed image-part filter, restore monkeypatch-based tests

---------

Co-authored-by: Yucheng Zhu <yucheng@berri.ai>
2026-08-31 12:50:42 -07:00
Mateo Wang
a73e770798
Merge pull request #38993 from BerriAI/litellm_fix_converse_duplicate_guardrailconfig
fix(bedrock): stop duplicating Converse config blocks inside inferenceConfig
2026-08-31 12:19:41 -07:00
davida-ps
9f67a58198
fix(guardrails): configure Prompt Security file timeout policy (#38083)
* fix(guardrails): fail open on Prompt Security file timeouts

* fix(guardrails): configure Prompt Security timeout policy
2026-08-31 12:05:57 -07:00
mateo-berri
cf1b431d58 fix(bedrock): stop duplicating Converse config blocks inside inferenceConfig 2026-08-31 11:50:45 -07:00
Mateo Wang
c09fa5b712
Merge pull request #38883 from BerriAI/litellm_docs_user_spend_endpoint_semantics
docs(proxy): clarify spend semantics on /v2/user/info and /user/daily/activity
2026-08-31 11:47:41 -07:00
Mateo Wang
3905c9d9df
Merge pull request #38381 from mubashir1osmani/litellm_close_unacknowledged_duplicate_issues
feat(ci): close duplicate issues after a 3-day grace period
2026-08-31 11:38:12 -07:00
mateo-berri
e938e89d13 docs(proxy): account for budget rollover and daily upserts in spend wording 2026-08-31 11:19:11 -07:00
Mateo Wang
c03a38d501
Merge pull request #38801 from BerriAI/devin_ai_1788036971-stale-cost-map-sources
fix: update stale source URLs and deprecation dates in model cost map
2026-08-31 10:04:25 -07:00
yucheng-berri
30f3228510
test(newrelic): cover static default_team_settings per-team routing (#38857)
* test(newrelic): cover static default_team_settings per-team routing

The dynamic POST /team/{team_id}/callback path for New Relic is tested, but
the static default_team_settings twin had no regression coverage. Add a test
that drives default_team_settings -> add_team_based_callbacks_from_config and
asserts the resolved trusted vars dispatch to BOTH the per-team metrics logger
(cost/usage) and the trace logger (LLM/agent spans), so a config-file customer
gets the same per-team routing as the API customer.

Also correct the /team/callback docstring: callback_name is a str validated
against the credential-capable callbacks, not a fixed langfuse/langsmith/gcs
Literal, and document the newrelic_api_key / newrelic_region vars.

* chore(ui): sync schema.d.ts with the /team/callback docstring

Regenerate the dashboard OpenAPI types for the add_team_callbacks description
change: callback_name is a validated str (not a langfuse/langsmith/gcs
Literal) and the newrelic_api_key / newrelic_region vars are documented.

* docs(newrelic): note LITELLM_OTEL_V2 prerequisite, trim test comments

Address review: team-scoped New Relic config is rejected with a 400 unless the
proxy runs with LITELLM_OTEL_V2=true, so document that in the /team/callback
endpoint and sync schema.d.ts. Drop the narrative setup comments in the new
test per the repo comment convention; the test name and docstring already say why.
2026-08-31 16:58:35 +00:00
Mateo Wang
d6cce13308
Merge pull request #38772 from BerriAI/litellm_claude_md_test_behavior_not_structure
docs(claude.md): require tests to check behavior, not code structure
2026-08-31 09:32:48 -07:00
devin-ai-integration[bot]
f079e4061b
fix(proxy): deliver budget alerts on webhook-only alerting and accept ALERTING_WEBHOOK_URL (#38441)
* fix(proxy): deliver budget alerts on webhook-only alerting and accept ALERTING_WEBHOOK_URL

ProxyLogging.budget_alerts forwarded to the alerting pipeline only when
'slack' was in general_settings.alerting, so alerting: ['webhook'] plus
WEBHOOK_URL silently never delivered a budget alert (the config
/health/services?service=webhook exists to test). Forward when 'webhook'
is present too; SlackAlerting.send_alert already fans out per channel.

Also accept a provider-neutral ALERTING_WEBHOOK_URL env fallback for the
Slack-format channel (any Slack-compatible receiver works), mark it as a
sensitive var, and de-brand the admin UI alerting copy.

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

* fix(ui): format settings.tsx with prettier

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

* chore(ui): regenerate schema.d.ts for updated alerting description

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

* ci: retrigger checks after ALERTING_WEBHOOK_URL docs merged

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-08-31 09:22:36 -07:00
Mateo Wang
32291c9ad2
Merge pull request #38942 from BerriAI/litellm_lite_claude_enable_tool_search-8eee
feat(cli): set ENABLE_TOOL_SEARCH=true for lite claude
2026-08-31 09:02:48 -07:00
Devin AI
4291afbfa5 fix(registry): correct OpenAI preview shutdown dates, add whisper/transcribe and Bedrock/Vertex deprecation dates
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-31 13:08:06 +00:00
Devin AI
f111262e54 Merge remote-tracking branch 'origin/litellm_internal_staging' into devin_ai_1788036971-stale-cost-map-sources 2026-08-31 13:03:35 +00:00
Cursor Agent
43c64e2471
fix(cli): keep an existing ENABLE_TOOL_SEARCH value
Default remains true so lite claude turns tool search back on through
a proxy. An explicit false or auto in the env or settings is left alone

Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
2026-08-31 06:00:45 +00:00
Cursor Agent
096e016baf
fix(cli): sort claude_settings __all__ for ruff RUF022
Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
2026-08-31 05:58:00 +00:00
Cursor Agent
cafdfda8ba
feat(cli): set ENABLE_TOOL_SEARCH=true for lite claude
Claude Code turns tool search off when ANTHROPIC_BASE_URL is a proxy.
lite claude, lite up, login --config-claude, and autoroute now force
ENABLE_TOOL_SEARCH=true so MCP tools stay deferred through the proxy

Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
2026-08-31 05:52:17 +00:00
Mateo Wang
4ba8517134
Merge pull request #38722 from BerriAI/litellm_bedrock_guardrail_stream_audit
feat(bedrock): honor streaming buffer/sampling config for unbuffered post_call scans
2026-08-30 10:17:11 -07:00
Mateo Wang
8a156ed42d
Merge pull request #36722 from BerriAI/litellm_decrease_anys_fable6
chore(typing): clear 1.2k basedpyright Any errors across 16 hotspot files
2026-08-30 10:09:02 -07:00
mateo-berri
fbf7644676 Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_decrease_anys_fable6
# Conflicts:
#	basedpyright-code-budget.json
#	litellm/integrations/websearch_interception/handler.py
#	litellm/proxy/response_polling/background_streaming.py
#	ruff-strict-budget.json
#	type-discipline-budget.json
2026-08-30 10:02:06 -07:00
Devin AI
36c53e1288 chore(ui): regenerate schema.d.ts for updated endpoint descriptions
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-30 07:46:45 +00:00
Devin AI
4fb1440747 docs(proxy): clarify spend semantics on /v2/user/info and /user/daily/activity
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-30 07:40:56 +00:00
mateo-berri
60296cb540 Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_bedrock_guardrail_stream_audit 2026-08-29 21:49:13 -07:00
Mateo Wang
5e4b3838aa
Merge pull request #37778 from BerriAI/litellm_decrease_anys_opus5
chore(typing): clear Any seams across 47 files, ratchet basedpyright ceilings -3,302
2026-08-29 21:48:11 -07:00
mateo-berri
667f761f1d Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_decrease_anys_fable6 2026-08-29 21:43:56 -07:00
mateo-berri
43c838f4b9 Merge branch 'litellm_internal_staging' into litellm_decrease_anys_opus5 2026-08-29 21:41:04 -07:00
Mateo Wang
b63bced31b
Merge pull request #38863 from BerriAI/litellm_fix_savings_test_cache_read_premise
fix(tests): derive the no-cache-read-rate savings baseline from the model map
2026-08-29 21:40:18 -07:00
mateo-berri
22ff5a8a69 Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_decrease_anys_fable6
# Conflicts:
#	basedpyright-code-budget.json
#	ruff-strict-budget.json
#	type-discipline-budget.json
2026-08-29 21:32:59 -07:00
mateo-berri
a23f0fc3c3 Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_bedrock_guardrail_stream_audit
# Conflicts:
#	litellm/proxy/common_request_processing.py
2026-08-29 21:23:35 -07:00
Tin Chi Lo
f62aa1b3a8 fix(tests): derive the no-cache-read-rate savings baseline from the model map 2026-08-29 19:35:10 -07:00
yucheng-berri
d44d281d1d
fix(proxy): emit timing headers and overhead for /v1/messages and /v1/responses (#38840) 2026-08-29 18:11: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