Commit graph

45730 commits

Author SHA1 Message Date
Mateo Wang
99884f0eaa test: fake the provider file boundary in the poller error-file regression test 2026-08-29 12:53:52 -07:00
Mateo Wang
817bbe1dc6
Merge pull request #34440 from dan2k3k4/litellm_soniox_srt_cue_grouping
fix(soniox): align synthesized SRT/VTT cues to real speech timing
2026-08-29 12:49:57 -07:00
ryan-crabbe-berri
8e1d1f1ef0 fix(budgets): write the model access group spend counter after each call
Two problems, both caught in review.

The new table only landed in the root schema.prisma. Client generation reads
litellm/proxy/schema.prisma and packaging reads the copy under
litellm-proxy-extras, so the generated client had no
litellm_modelaccessgroupbudgettable and every budget read and write against
it would have failed at runtime. The root is the source of truth; both
copies are now byte-identical to it.

Nothing incremented spend:model_access_group:{group} after a call. Only the
reservation path ever wrote it, so with disable_budget_reservation the
read-time check was reading a counter nobody maintained and falling back to
the row's spend, which is cached for up to DEFAULT_MODEL_ACCESS_GROUP_CACHE_TTL.
A caller could run well past the pool inside that window, which is precisely
the case the read-time check exists to cover.

increment_spend_counters now takes the matched groups and charges them
through _init_and_increment_unreserved_spend_counter, so a group already
covered by a reservation is skipped rather than counted twice. The cost
callback sources the names with get_request_model_access_groups, the same
reader the spend writer uses.
2026-08-29 12:49:47 -07:00
mateo-berri
177463e9b0 Merge branch 'litellm_internal_staging' into litellm_mcp_connector_bulk_import
Regenerates the lazy OpenAPI snapshot and dashboard schema.d.ts from the merged tree.
Passes list/dict copies into NewMCPServerRequest from the connector conversion and switches the
server-managed NewMCPServerRequest fields to keyword defaults so the basedpyright budget gate stays flat.
2026-08-29 12:49:45 -07:00
mateo-berri
2affd800ec test(headroom): cover stream conversion after deployment-level compression 2026-08-29 12:45:56 -07:00
Mateo Wang
c453920f7a
Merge pull request #38285 from BerriAI/litellm_azure_v1_image_routes
fix(azure): use /openai/v1 image routes for v1, preview and latest api versions
2026-08-29 12:45:37 -07:00
mateo-berri
886d39c3a2 test(bedrock): expect cohere embed base64 encoding_format to normalize to float 2026-08-29 12:44:01 -07:00
ryan-crabbe-berri
f962a1188e style(proxy): justify the blanket except in window_from_table for the BLE001 gate 2026-08-29 12:42:06 -07:00
ryan-crabbe-berri
b9835941d0 Merge commit 'ea5a9f6ef0' into litellm_window_spend_reader 2026-08-29 12:38:33 -07:00
yuneng-jiang
d435a62ce6
Merge pull request #38782 from BerriAI/litellm_/logs-reopen-shadcn-migration-2c9526
fix(ui): restore the reopen control for the log drawer's trace sidebar
2026-08-29 12:38:26 -07:00
ryan-crabbe-berri
ea5a9f6ef0 style(proxy): mark WindowSpendTransaction fields ReadOnly for the LIT012 gate 2026-08-29 12:38:26 -07:00
mateo-berri
ae1039f811 ci: rerun checks on an identical tree after a windows job infra failure 2026-08-29 12:29:31 -07:00
ryan-crabbe-berri
8463cb901e Merge remote-tracking branch 'origin/litellm_window_spend_writer' into litellm_window_spend_reader 2026-08-29 12:29:14 -07:00
ryan-crabbe-berri
12aea29bad chore(ui): keep schema.d.ts in sync with staging on the window spend writer branch 2026-08-29 12:28:59 -07:00
ryan-crabbe-berri
2fac72392a Merge remote-tracking branch 'origin/litellm_window_spend_schema' into litellm_window_spend_writer 2026-08-29 12:27:58 -07:00
ryan-crabbe-berri
6ef42f5991 style(proxy): satisfy ANN204 and SIM117 in the budget window spend writer 2026-08-29 12:27:57 -07:00
ryan-crabbe-berri
cfe5e37e95 chore(ui): drop unrelated schema.d.ts enum reorder from the window spend schema branch 2026-08-29 12:27:49 -07:00
ryan-crabbe-berri
01b7610d0a
chore(migrations): drop the generated comment from the budget window spend migration 2026-08-29 12:25:50 -07:00
ryan-crabbe-berri
0cd89148e3
feat(proxy): add LiteLLM_BudgetWindowSpend table for per-window budget spend
Multi-window budgets (budget_limits on keys/teams) currently keep window
spend only in cache. Every cold or expired counter recomputes the window
by aggregating LiteLLM_SpendLogs, which has no usable index for that
query and saturates the DB on large tables (#35766).

This adds a LiteLLM_BudgetWindowSpend table holding one row per
configured window, keyed (entity_type, entity_id, window_duration),
with window_start identifying the period the spend belongs to.
Follow-up PRs maintain these rows from the spend update writer and move
window budget enforcement reads onto them.
2026-08-29 12:25:50 -07:00
Devin AI
d77b4be31d fix(models): align GLM-5.3 max_tokens with max_output_tokens
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-29 19:21:51 +00:00
github-actions[bot]
183a782e57 chore: sync schema.prisma copies from root 2026-08-29 19:15:11 +00:00
Devin AI
df3d37db2a fix(models): add verified Gemini, Mistral, Fireworks, xAI registry entries
- gemini: nano-banana-pro-preview, gemma-4-26b-a4b-it, gemma-4-31b-it
- mistral: 14 official aliases from api.mistral.ai/v1/models
- fireworks_ai: glm-5p3, qwen3-embedding-8b
- xai: grok-imagine-video, grok-imagine-video-1.5

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-29 19:14:09 +00:00
ryan-crabbe-berri
d2440639d5 feat(budgets): enforce shared budgets on model access groups
A model access group could gate which models a caller reaches but never how
much that group of callers could spend in total. Capping a shared pool meant
setting a per-entity budget on every key by hand, which caps each key
separately and still leaves no way to read what the group cost.

Spend is attributed to a group only when the group's name appears on an
allowlist the caller was granted (key, team, team-member scope, project or
org) and that group serves the requested model. Asking for a model that
merely belongs to a group attributes nothing, because nothing about the
caller named the group. Levels are unioned rather than ranked, so a team
granted "*" whose member is scoped to one group still counts as gated by
that group.

Enforcement runs on both paths tags already use: a reservation counter on
the pre-call path and a read-time max_budget check inside the existing
concurrent budget gather, so the ceiling still holds under
disable_budget_reservation.

Adds LiteLLM_ModelAccessGroupBudgetTable, which is the only place a group is
ever a row: the groups themselves stay free-text strings in
model_info.access_groups, so a row exists only once someone gives that group
a budget. GET, PUT and DELETE /access_group/{name}/budget manage it, and
/access_group/{name}/info now carries the spend and budget alongside the
models.
2026-08-29 12:13:55 -07:00
ryan-crabbe-berri
1981160775 feat(budgets): add model access group budget table and shared types
Adds the durable row that a model access group budget hangs off. Model
access groups live only as free-text strings inside
model_info.access_groups, so unlike tags there is no existing row to
carry a budget_id.

Foundation only: schema, migration, repository, entity type, spend
transaction bucket, auth carrier field and registry cache keys. Nothing
reads or writes these yet.
2026-08-29 12:13:55 -07:00
mateo-berri
a3eac3f771 fix(bedrock): normalize encoding_format base64 to float for cohere embed models 2026-08-29 12:13:09 -07:00
Mateo Wang
4ef012627d fix: count error-file failures in the batch cost poller path 2026-08-29 12:06:42 -07:00
mateo-berri
4d4cf40334 fix(headroom): delegate to the parent deployment hook so deployment-level configs still compress 2026-08-29 12:06:38 -07:00
mateo-berri
a007fa49e5 Merge branch 'litellm_internal_staging' into litellm_veo_31_lite 2026-08-29 12:04:42 -07:00
mateo-berri
4c42c01cb2 Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_soniox_srt_cue_grouping
# Conflicts:
#	litellm/llms/soniox/common_utils.py
2026-08-29 12:02:21 -07:00
Mateo Wang
002d0068f5
Merge pull request #38580 from BerriAI/devin_ai_fix_model_new_read_replica_lag_38556
fix(proxy): pin model reconcile read to the writer DB so /model/new does not 500 under read replica lag
2026-08-29 12:02:08 -07:00
Devin AI
23703a5341 Merge remote-tracking branch 'origin/litellm_internal_staging' into devin/1787944648-registry-audit-rolling 2026-08-29 19:02:03 +00:00
Yuneng Jiang
08c83c12e9
Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_/logs-reopen-shadcn-migration-2c9526 2026-08-29 11:55:20 -07:00
Yuneng Jiang
4a3dcd5e8e
refactor(ui): give the collapsed log drawer its own sidebar toggle
Open, the trace sidebar is byte-identical to before: the toggle sits over its
header exactly where it did, and the header keeps the padding that makes room
for it. Collapsed, that button has nowhere to live, so the drawer header shows
one instead, on the model row or the request id row when the log names no
model.

Both come from SidebarToggle, so they cannot drift in design. The chevrons now
point the way the sidebar will move: right while it is open, left while it is
collapsed.
2026-08-29 11:53:14 -07:00
Mateo Wang
c24f821652
Merge pull request #34849 from BerriAI/litellm_keyless_key_managed_resource_owner
fix(managed resources): let keys with no user_id or team_id read their own batches and files
2026-08-29 11:50:00 -07:00
ryan-crabbe-berri
e8994e8ce1 Merge branch 'litellm_window_spend_writer' into litellm_window_spend_reader 2026-08-29 11:49:42 -07:00
Yuneng Jiang
20e6d6457a
refactor(ui): show the log drawer's sidebar toggle only where it has a row
Putting the toggle in the drawer header unconditionally stranded it on its own
line: the model row renders empty for a log that names no model or provider, so
the chevron sat alone above the request id.

The sidebar keeps the toggle whenever it is open, in its own header. Collapsed,
the toggle moves into the drawer header and joins the model row, or the request
id row when there is no model to join. Shared between both through
SidebarToggle so the two call sites cannot drift.
2026-08-29 11:48:04 -07:00
ryan-crabbe-berri
4e22a5ef5a Merge branch 'litellm_window_spend_schema' into litellm_window_spend_writer 2026-08-29 11:47:37 -07:00
mateo-berri
f2f988bd57 test: cover forged _headroom_interception_converted_stream strip at the proxy boundary 2026-08-29 11:46:23 -07:00
Mateo Wang
5e60ec5c31
Merge pull request #38743 from BerriAI/litellm_techdebt_20260829
refactor: clean up tech debt that landed on 2026-08-29
2026-08-29 11:46:05 -07:00
mateo-berri
6d3e687ce4 fix(db): let the writer pin yield to the replica while the writer is degraded 2026-08-29 11:44:45 -07:00
Yuneng Jiang
b27a1a13a2
refactor(ui): move the trace sidebar toggle into the log drawer header
The collapsed rail kept the toggle in flow but left a 40px stub of empty
sidebar on screen. The toggle now leads the drawer header's first row, ahead of
the provider logo and the model name, so it reads as part of the header and the
sidebar goes back to unmounting when collapsed.

Still no absolute positioning and no stacking level: the button is a normal
in-flow child of the header row it sits in. DrawerHeader takes the collapsed
state and the toggle handler as props rather than reaching for the drawer's
state.
2026-08-29 11:42:45 -07:00
ryan-crabbe-berri
65e535e089 Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_window_spend_schema 2026-08-29 11:42:39 -07:00
yuneng-jiang
06852ca290
Merge pull request #38779 from BerriAI/litellm_/release-version-bump-71ce15
chore: bump litellm-enterprise 0.1.61 -> 0.1.62, litellm-proxy-extras 0.4.90 -> 0.4.91
2026-08-29 11:42:18 -07:00
yuneng-jiang
207893db9c
Merge pull request #38778 from BerriAI/litellm_/json-readability-logs-661421
fix(ui): make the logs JSON viewer follow the theme in dark mode
2026-08-29 11:42:04 -07:00
mateo-berri
9e01bd1441 fix(azure): send the deployment name as the body model on v1 image routes 2026-08-29 11:41:58 -07:00
ryan-crabbe-berri
144fbe9fff Merge branch 'litellm_window_spend_writer' into litellm_window_spend_reader 2026-08-29 11:37:11 -07:00
ryan-crabbe-berri
21b201d526 Merge branch 'litellm_window_spend_schema' into litellm_window_spend_writer 2026-08-29 11:37:09 -07:00
ryan-crabbe-berri
a6273bb332 chore(migrations): drop the generated comment from the budget window spend migration 2026-08-29 11:36:59 -07:00
Yuneng Jiang
34355778e6
bump: litellm-enterprise 0.1.61 -> 0.1.62, litellm-proxy-extras 0.4.90 -> 0.4.91 2026-08-29 11:33:32 -07:00
mateo-berri
68f891fd2b Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_keyless_key_managed_resource_owner 2026-08-29 11:33:08 -07:00