Commit graph

55122 commits

Author SHA1 Message Date
hx
5b91e1cc73 style: sort imports 2026-10-24 11:50:16 +08:00
hx
ae4bbac5b7 chore(ui): regenerate schema.d.ts against upstream main 2026-10-24 11:50:16 +08:00
hx
be312eb160 fix(responses): validate litellm params without unpacking untyped kwargs
Adding xai_oauth_token_file to GenericLiteLLMParams adds one unknown
argument at every GenericLiteLLMParams(**kwargs) call site. Building the
params in responses() with model_validate, which behaves the same for a
model without a custom __init__, keeps the basedpyright total below base.
2026-10-24 11:50:16 +08:00
hx
cdeb862da2 test(proxy): classify xai_oauth_token_file in the credential slot registry 2026-10-24 11:49:09 +08:00
hx
30c61218ae chore(ui): regenerate schema.d.ts for xai_oauth_token_file 2026-10-24 11:49:09 +08:00
hx
b71f522c13 fix(xai): map spending-limit 403s in the xAI adapter and tighten token file handling
Move the spending-limit to rate-limit mapping out of the shared exception mapper
into XAIChatConfig and XAIResponsesAPIConfig get_error_class. Keep the operator's
XAI_OAUTH_AUTH_FILE behaviour, reject symlinks that escape the token dir, report a
usage error for unsafe CLI account names, and cover per-account router failover
2026-10-24 11:49:09 +08:00
hx
87cb0ad96e fix(xai): reject xai_oauth_token_file in request bodies regardless of client-side opt-ins
The token file picks which OAuth account stored on the proxy host signs the
request, so allow_client_side_credentials and configurable_clientside_auth_params
must not hand it to callers. Only deployment config may set it
2026-10-24 11:48:48 +08:00
hx
840a0095f7 fix(xai): treat oauth token file as operator-only config 2026-10-24 11:48:48 +08:00
hx
74a69e965e feat(xai): support multi-account SuperGrok OAuth with automatic failover
Add per-deployment xai_oauth_token_file so multiple SuperGrok accounts
can share one proxy. Map xAI 403 spending-limit to RateLimitError so the
router can fail over to another deployment

Co-authored-by: HX <HXhlx@users.noreply.github.com>
2026-10-24 11:47:36 +08:00
devin-ai-integration[bot]
e159005545
fix(spend): await the per-request rollup enqueues and report their failures (#48131)
* fix(spend): await the per-request rollup enqueues and report their failures

The daily and entity spend rollups ran in an unreferenced asyncio task that
nothing awaited or drained, so a shutdown after the spend log was enqueued
could drop every rollup for that request, and a malformed metadata payload
dropped the request from all daily tables at debug level. The rollups now run
inline in update_database, each helper failure is logged through
spend_log_error with the request id, and unreadable metadata only costs the
row its metadata-derived fields

Resolves LIT-6027

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

* fix(spend): type the rollup failure helpers for the lint gates

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

* fix(spend): track the rollup enqueue task so shutdown drains it

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

* test(spend): shutdown drain waits for an in-flight rollup enqueue

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

* fix(spend): register the rollup task without blocking the cost callback

Awaiting the rollups inline made a blocked queue put stall increment_spend_counters, so budget checks could run on stale counters. The task is now only registered via spawn_logging_task; drain_logging_tasks still waits for it on shutdown

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

---------

Co-authored-by: joshua <joshua@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-23 18:54:34 -07:00
ishaan-j-berri
0a1cfffb12
feat(chat): add document uploads (discussion #32085) (#48137)
* feat(chat): support PDF, text, Word, and Excel attachments

* test(chat): match the document attachment recovery banner

---------

Co-authored-by: Ishaan <ishaan@berri.ai>
2026-10-23 18:25:10 -07:00
yuneng-jiang
755fdc570d
fix(docker): update bundled LiteAdmin CA roots and aiohttp (#48139)
Move the liteadmin-builder pin from litellm-admin-agent ef501e9 to
5661c80, which ships certifi 2026.10.19 and aiohttp 3.14.5 in the
/opt/liteadmin venv. That certifi drops emSign ECC Root CA - G3, whose
intermediates were revoked; the earlier bundled-CA updates did not
reach this venv because it installs from the agent's own lock file.

The only other change in ef501e9..5661c80 is the AgentChat bump from
litellm-admin-agent#24 (Slack follow-up routing with models that reject
structured output).
2026-10-24 01:25:05 +00:00
Fahima Mokhtari
428c9f6bf3
fix(aws_polly): read the engine from the bare model name (#47963)
* fix(aws_polly): read the engine from the bare model name

speech() strips the aws_polly/ prefix before AWSPollyTextToSpeechConfig sees
the model, so _extract_engine_from_model got a bare "standard", found no
slash and returned the neural default. Every Polly request went out with
Engine: neural whatever the model named.

Take the last path segment instead, which covers both the bare name and the
prefixed one.

* test(aws_polly): move imports to the top of the file

* docs(aws_polly): update the engine comment to the bare model name
2026-10-23 18:10:51 -07:00
moe-berri
9fab92672a
fix(opencode): forward stable sessions automatically across inference routes (#48121)
Forward caller-supplied stable session metadata to recognized OpenCode destinations across Chat Completions, Responses, and native Messages. Preserve explicit headers, configured affinity headers, and existing transports.

Fixes #39503
2026-10-23 17:38:47 -07:00
Ishaan
f6b2086502
fix(chat): recognize the development preview workspace (#48123) 2026-10-23 16:55:13 -07:00
Ishaan
6292f217a3
fix(chat): retain MCP results across follow-up requests (#48124)
Reuses the ordered MCP replay and discovery presentation from PR #45123, adapted to the current Chat request pipeline.
2026-10-23 16:54:56 -07:00
yucheng-berri
f7e6ddec66
feat(proxy): add LITELLM_OFFLINE_MODE, one switch for the fetches LiteLLM makes on its own (#48096)
* feat(proxy): add LITELLM_OFFLINE_MODE to stop every request the proxy makes on its own

* fix(ui): name LITELLM_OFFLINE_MODE where the cost map panel says local mode is forced

* test: isolate the offline-mode tokenizer tests from the local Hugging Face cache

* test: cover the offline policy templates and the cached Kimi K3 tokenizer

* test(integration): count Kimi K3 tokens in the offline-mode egress test

* refactor(token_counter): skip non-bundled tokenizers in offline mode instead of listing downloaded ones

---------

Co-authored-by: yucheng-berri <293926326+yucheng-berri@users.noreply.github.com>
2026-10-23 16:54:19 -07:00
Ishaan
96abce842b
fix(azure): accept explicit v1 Responses bases (#48072) (#48118)
* fix(azure): accept explicit v1 Responses bases (#48072)

* refactor(azure): simplify explicit v1 Responses URL handling
2026-10-23 16:43:59 -07:00
Ishaan
ca64a3bef2
feat(chat): add Moyai UI, model hub, images, and usage metrics (#40557) (#48108)
* feat(chat): port Moyai UI with Model Hub and images

* feat(chat): add Models sidebar with embedded Model Hub

* feat(chat): polish Model Hub with provider cards and logos

* refactor(chat): use a provider dropdown in Model Hub

* feat(chat): keep workspace switching visible with a Chat identity

* Add minimal opt-in Chat usage metrics and prioritize Chat in workspace selector

* fix(chat): enable usage metrics by default only when chat is used

* fix(chat): count requesting users with frontend-only metrics

* feat(chat): send default-on request metrics to litellm-tel
2026-10-23 23:39:23 +00:00
shrey-berri
23ccff69a1
fix(azure_ai): forward the thinking-binding-controls beta header to Foundry (#48033) 2026-10-23 16:34:55 -07:00
Igor Tavares
acfa7a29ad
fix(proxy): record spend_logs_metadata on /interactions (#47848)
The router plants its deployment fields in litellm_metadata for Interactions
calls, while the proxy put the request's metadata (spend_logs_metadata, tags,
key fields) under metadata. The spend log resolves litellm_metadata and only
carries user_api_key* fields over, so spend_logs_metadata never reached
LiteLLM_SpendLogs. Route /interactions like /responses so both land in
litellm_metadata.

Fixes #47841

Co-authored-by: Igor Tavares <2163472+igorborgest@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:27:33 -07:00
moe-berri
bffc166cd6
feat(ui): sort budgets by reset duration (#48107)
* feat(ui): sort budgets by reset duration

* fix(ui): order unlimited budget limits as infinity

* fix(ui): sort localized budget reset durations
2026-10-23 16:21:53 -07:00
moe-berri
683442eb61
feat(ui): sort every teams table data column (#48109)
* feat(ui): sort every teams table data column

* fix(ui): order unlimited team limits as infinity and verify org scope

* fix(ui): validate team sort filters without recursion
2026-10-23 16:21:36 -07:00
moe-berri
91287b49f4
feat(ui): sort every users table data column (#48105)
* feat(ui): sort every users table data column

* fix(ui): order unlimited user budgets as infinity and verify org scope

* fix(ui): cover user sort queries and document pagination bound
2026-10-23 16:12:51 -07:00
shrey-berri
eeedf98d40
fix(azure_ai): drop tool_reference parts from tool messages on chat (#48032) 2026-10-23 16:04:09 -07:00
Ishaan
e4766973a0
feat(ui): give Aria usage charts and PDF answer exports (#48094)
* fix(ui): preserve Aria usage token breakdown and viewer model access

* fix(ui): make Aria conversations easier to read and reply to

* fix(ui): wrap long headings in assistant tables

* feat(ui): simplify Aria and add usage charts with PDF answer export

* fix(ui): retain full chart values in Aria PDF exports
2026-10-23 15:54:26 -07:00
moe-berri
ffe3b5e07e
feat(ui): sort every organizations table data column (#48106)
* feat(ui): sort every organizations table data column

* fix(ui): normalize organization sorting and unlimited limits
2026-10-23 15:45:32 -07:00
moe-berri
1aa531767c
feat(ui): sort virtual keys by expiry, activity, spend and limits (#48074) 2026-10-23 15:45:17 -07:00
moe-berri
7a75cf273e
fix(ui): align pass-through headers and authentication defaults (#48081) 2026-10-23 15:38:32 -07:00
ryan-crabbe-berri
22cfee1534
build(deps): bump mlflow, pypdf and setuptools to clear osv-scan (#48110) 2026-10-23 22:35:17 +00:00
devin-ai-integration[bot]
f3d53a9b50
fix(cost-map): rolling registry audit, add elevenlabs api rates, together minimax-m3.1-flash, mistral voxtral 3 and azure_ai phi-4 dates (#47623)
* fix(cost-map): add mistral voxtral 3 transcription and tts rows

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

* fix(cost-map): add azure_ai phi-4 family retirement dates

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

* fix(cost-map): add elevenlabs v4 and flash/turbo tts rows at API rates and together minimax-m3.1-flash

Co-authored-by: Shebin Sabu <85486313+shebin09@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* chore(cost-map): credit elevenlabs api pricing from #47917

Co-authored-by: Shebin Sabu <85486313+shebin09@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Shebin Sabu <85486313+shebin09@users.noreply.github.com>
2026-10-23 14:57:35 -07:00
tin-berri
5769a1959b
fix(sso): enforce free user admission without locking out existing users (#48097) 2026-10-23 14:48:29 -07:00
Kerry Lu
8fa875ff92
feat(model-prices): add Vertex batch rates for Llama 4 MaaS models (#48085)
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-23 14:47:17 -07:00
yuneng-jiang
ada3614eb4
Merge pull request #48103 from BerriAI/litellm_rotate_cosign_key
chore(signing): rotate the cosign image-signing key
2026-10-23 14:38:16 -07:00
Kerry Lu
7165399aa5
chore(codeowners): add joshua-berri as a code owner of the model cost map (#48101)
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-23 14:32:46 -07:00
Yuneng Jiang
2dfcb05ee6
Pin the README verify command to the rotated cosign key 2026-10-23 14:20:47 -07:00
Yuneng Jiang
e82a3c6469
Rotate the cosign image-signing public key 2026-10-23 14:19:53 -07:00
Ishaan
8f9894fbd6
fix(ci): unblock dependency security checks (#48055)
* fix(deps): upgrade vulnerable Python dependencies

* fix(deps): lock patched Python dependency versions

* fix(otel): preserve JSON export with the updated SDK

* test(otel): cover JSON export with the updated SDK

* test(otel): update SDK log records and worker discovery

* fix(ui): align Lens peer dependency with patched Next.js

* fix(otel): hand the AgentOps exporter a session it owns for the JWT header

OpenTelemetry 1.45 moved the OTLP HTTP exporter's requests.Session behind a
transport, so writing the minted JWT to the exporter's private _session raised,
was swallowed, and every AgentOps batch went out unauthenticated. The exporter
now creates the session, passes it through the public session= argument and
sets the Authorization header on it

The tests now drive a real export, serving the token endpoint with respx and
capturing the OTLP POST with requests_mock, instead of reading SDK internals

* fix(otel): skip FastAPI instrumentation once the app has started

opentelemetry-instrumentation-fastapi 0.66b1 wraps build_middleware_stack instead
of calling add_middleware, so instrumenting an app whose middleware stack is
already built no longer raises. The call silently did nothing while we still
registered the global response propagator. Check the built stack up front and
skip both, which is what the existing test expects

* test(otel): assert exported requests and span flags instead of SDK internals

OpenTelemetry 1.45 dropped the exporter's private _headers and sets the W3C
random-trace-id flag on new traces, so traceresponse ends in -03. The Langtrace
and Langfuse tests now export through requests_mock and check the URL and headers
the collector receives, and the traceresponse tests expect the server span's own
trace flags

* fix(deps): bump dashboard zod to 4.6.6 and make the vendored Lens use it

zod 4.6.5 is flagged by the dependency scan and blocks osv-scan on every PR. A
root bump alone leaves the vendored Lens tarball, which pins zod 4.6.5 exactly,
on its own nested copy, so a top-level zod override points every consumer at the
root version and the lock carries a single zod 4.6.6

* test(ui): stub the tag summary fetch the client panel retry refreshes

Retrying the model breakdown refetches /tag/summary, which this integration test
left on the real network. When that request failed before the assertion, the
panel switched to its summary error and unmounted the model row, so the test
passed or failed by timing

* fix(deps): drop the duplicated Lens override from the dashboard package.json

* style(ui): format the client panel fetch stub

---------

Co-authored-by: Yuneng Jiang <yuneng@berri.ai>
2026-10-23 14:05:46 -07:00
Ishaan
f0f15404d5
feat(ui): unify gateway and usage assistance as Aria Agent (#48082)
* feat(ui): consolidate gateway and usage assistants as Aria Agent

* refactor(ui): give Aria an original blue sprite mascot

* feat(ui): prompt shared Aria from usage and retire duplicate usage agent

* fix(ui): keep Aria naming consistent and reachable across dashboard

* feat(ui): open Aria in a floating popup with suggested questions

* fix(ui): simplify the shared Aria Agent title
2026-10-23 20:24:19 +00:00
berriai-litellm-provider-info-sync[bot]
5adb0ed362
fix(vertex-ai): add deprecation_date to retired veo-2.0-generate-001 (#47847)
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-23 12:56:21 -07:00
yucheng-berri
013be3eb04
feat(proxy): add LITELLM_DISABLE_LATEST_RELEASE_CHECK to stop the release check (#48065)
* feat(proxy): add LITELLM_DISABLE_LATEST_RELEASE_CHECK to stop the release check

The dashboard asks the proxy for the latest LiteLLM release, and the proxy fetches it from api.github.com on every cache miss. Deployments that block or audit outbound traffic had no way to turn that off. With LITELLM_DISABLE_LATEST_RELEASE_CHECK=true the endpoint returns null without making a request, which the dashboard already treats as no upgrade banner.

* fix(proxy): regenerate dashboard types for the release check flag

The endpoint docstring feeds the OpenAPI description, so the ui-api-types
check needs schema.d.ts regenerated. The docstring now says the flag skips
every outbound request, which stays true once the changelog feed is read
too

---------

Co-authored-by: Sujit Nirmal <nirmalsujit891@gmail.com>
Co-authored-by: yucheng-berri <293926326+yucheng-berri@users.noreply.github.com>
2026-10-23 12:52:27 -07:00
Ishaan
e14d2fdc38
fix(completions): omit stream usage unless requested (#47953) (#48052)
* fix(completions): omit stream usage unless requested

Co-authored-by: HootRock <wtr1274970944@163.com>

* refactor(completions): move stream wrapper into text completions

* refactor(completions): preserve typed compatibility exports

* fix(completions): preserve lazy export typing

* ci(completions): run streaming tests in endpoint shard

---------

Co-authored-by: HootRock <wtr1274970944@163.com>
2026-10-23 19:36:20 +00:00
shrey-berri
2590f641f5
feat(proxy): expose wildcard model listings in general settings (#47979) 2026-10-23 12:19:35 -07:00
shrey-berri
52166b51a1
fix(security): update bundled CA roots and preserve Prisma image compatibility (#47969)
* fix(security): bump grpcio and boto3 so their bundled CA files drop the compromised eMudhra roots

grpc ignores SSL_CERT_FILE and verifies every channel against its own bundled roots.pem. In 1.78.0 that file still trusts emSign ECC Root CA - G3 and AAA Certificate Services, so Vertex AI, Google KMS, Chirp STT and OTLP gRPC exporters (Arize) accept all 14 advisory chains. 1.84.1 is the first release whose roots.pem drops both roots.

botocore uses certifi when it is installed and falls back to its bundled cacert.pem otherwise. Through 1.43.116 that file still trusts AAA Certificate Services. Requiring boto3 1.43.117 pulls in botocore 1.43.117, the first release whose cacert.pem rejects all 14 advisory chains, so the fallback stays safe if certifi is ever absent

* fix(docker): provide OpenSSL 3 when generating Prisma engines
2026-10-23 18:44:13 +00:00
berriai-litellm-provider-info-sync[bot]
82a4ef4095
chore(cost-map): update openai gpt-6-luna decisions cache rates from the decisions guide (#48066)
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-23 11:36:12 -07:00
yucheng-berri
46922bf120
fix(proxy): take the upgrade notice from the changelog instead of GitHub releases (#47998)
The Admin UI upgrade notice read GitHub's latest release, which the release
pipeline sets on its own, so admins were offered releases the changelog had
not announced yet and sent to the auto-generated GitHub release page. The
notice now reads the newest stable release from the docs changelog feed and
links to its changelog page. GitHub release notes are still used for the
feature and fix counts of that version's minor line.

Co-authored-by: yucheng-berri <293926326+yucheng-berri@users.noreply.github.com>
2026-10-23 11:18:38 -07:00
Ishaan
1e6dc81769
fix(decisions): remove the System One question count cap (#47985) 2026-10-23 18:11:40 +00:00
Ishaan
e5cedbb861
fix(anthropic): include null stop_sequence in native responses (#47987)
* fix(anthropic): preserve nullable stop_sequence in native responses

* refactor(anthropic): clarify stop sequence defaults and test streaming

* refactor(anthropic): extract stop sequence normalization helper

* refactor(anthropic): default missing stop sequence in place
2026-10-23 18:01:06 +00:00
Mateo Wang
08f04fbc97
test(interactions): read the spec from a vendored snapshot and canary the live one daily (#48002)
* test(interactions): assert the live status enum is parsable instead of pinning it

* test(interactions): read the spec from a vendored snapshot and canary the live one daily

* test(interactions): run the canary on PRs touching its inputs, file an issue on a red run, pin the regenerate command

* test(interactions): take the live spec URL as a pytest option, assert its source, split the canary's tracking-issue job

* test(interactions): file the canary issue whenever its compliance step did not pass, match the issue title exactly, cover UrlContextResult
2026-10-23 17:20:40 +00:00
shrey-berri
bc18e10f6b
fix: recognize OpenAI context_length_exceeded errors (#47954) 2026-10-23 10:09:39 -07:00