Commit graph

45043 commits

Author SHA1 Message Date
mateo
bb0bb48da8 fix(proxy): do not let held-back keepalive pings block the budget reservation refund on client disconnect
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-08 20:05:45 +00:00
tin-berri
e35ee4e5fa
feat(router): independent, default-on deployment affinity for the auto-router (#36146) 2026-08-08 13:02:29 -07:00
Mateo Wang
554f065361
Merge pull request #36296 from BerriAI/litellm_claude_md_descending_importance
docs: clarify guideline priority ordering in CLAUDE.md
2026-08-08 13:01:38 -07:00
mateo
ff5f8132d1 docs: clarify guideline priority ordering in CLAUDE.md
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-08 19:55:37 +00:00
Yuneng Jiang
1a40a67394
fix: stabilize generated user role ordering 2026-08-08 12:54:23 -07:00
Mateo Wang
334e6dabf4
Merge pull request #36295 from BerriAI/litellm_remove_pre_commit_rule
chore: remove pre-commit rule
2026-08-08 12:44:48 -07:00
mateo
cbefb1ce5f fix(anthropic): keep pinging while the held-back follow-up stream is in flight
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-08 19:41:42 +00:00
Shivam Rawat
7b89b3a29f
Merge pull request #35708 from BerriAI/devin_ai_lit_5033_websearch_interception_spend
fix(websearch_interception): bill intercepted searches to the calling key
2026-08-08 12:41:31 -07:00
devin-ai-integration[bot]
12aeb53aec
fix(otel): mark v2 server spans as failed for pre-call errors (#34546)
* fix(otel): mark v2 server spans as failed for pre-call errors (LIT-4780)

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

* fix(otel): authenticate malformed-body requests before rejecting them (LIT-4780)

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

* test(auth): cover malformed-body rejection when auth error is recovered

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

* fix(auth): skip authorization for a request whose body never parsed

Deferring the parse failure ran the full auth phase, including budget reservation, whose reserved amount is only released by the endpoint's post call path; the endpoint never runs, so malformed requests leaked reservations and locked a budgeted key out. Authorization now runs only when the body parsed, and a parse failure with a rejected key keeps returning the 400 it returned before.

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

---------

Co-authored-by: shivam <shivam@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-08 12:40:00 -07:00
Mateo Wang
4150248095
chore: remove pre-commit rule
some users do not use make pre-commit as it is a multi-minute process. I personally use it but I want users themselves to decide whether to pre-commit before each commit or not, based on what works best for them
2026-08-08 12:38:23 -07:00
mubashir1osmani
3725233736 Merge remote-tracking branch 'berri/litellm_internal_staging' into litellm_playground_shadcn
Some checks failed
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled
# Conflicts:
#	ui/litellm-dashboard/src/components/llm_calls/fetch_models.tsx
2026-08-08 12:33:13 -07:00
devin-ai-integration[bot]
cfd64d45a8
fix(ui): show team BYOK models in team fallback settings (#36241)
* fix(ui): show team BYOK models in team fallback settings

Team router settings loaded fallback options from /model_group/info, which resolves models without a team, so a team's own BYOK deployments were never selectable in its own fallback config. Load the team-scoped listing when a team id is present.

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

* fix(ui): ignore stale team model responses in router settings

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

* refactor(ui): use react-query for fallback model listing in router settings accordion

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: ryan-crabbe-berri <ryan@berri.ai>
2026-08-08 19:28:57 +00:00
mateo
398e3d214c refactor(anthropic): trim hold-back commentary and drop dead rebuilt-content expression
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-08 19:28:40 +00:00
mubashir1osmani
f2e3b6a568 fix(ui): drop null guardrail names from MultiSelect options 2026-08-08 12:25:41 -07:00
Yuneng Jiang
0d7f7c689a
test: repair stale CircleCI contracts 2026-08-08 12:19:29 -07:00
mubashir1osmani
757d5a4dcd fix(ui): apply coy theme after code props on ReasoningContent 2026-08-08 12:19:17 -07:00
mubashir1osmani
4aff515a8e fix(ui): cast syntax highlighter theme through unknown 2026-08-08 12:15:09 -07:00
mubashir1osmani
38e1fe8ffd fix(ui): extract chat handlers and type MCP tool pool 2026-08-08 12:11:33 -07:00
Mateo Wang
8b16ee1dc2
Merge pull request #36277 from BerriAI/litellm_make_check_fallback
build(lint): rename make pre-commit to make check with a working-tree fallback
2026-08-08 12:08:34 -07:00
mubashir1osmani
01d55b9d0f fix(ui): guard null voice selection from shadcn Select 2026-08-08 12:07:36 -07:00
mubashir1osmani
d78a016bc5 fix(ui): green playground shadcn CI after staging merge
Normalize MCP description nullability for MultiSelect, preserve model
selection via functional setState, and update endpoint/vector-store
selector tests for the shadcn combobox API
2026-08-08 12:01:44 -07:00
mateo-berri
24888d56a6 Merge remote-tracking branch 'origin/litellm_internal_staging' into devin_ai_lit_5033_websearch_interception_spend
# Conflicts:
#	litellm/integrations/websearch_interception/handler.py
2026-08-08 12:00:06 -07:00
mubashir1osmani
0302283eba chore: merge litellm_internal_staging into playground shadcn stack 2026-08-08 11:56:47 -07:00
yuneng-jiang
b0fd3e1e30
Merge pull request #36288 from BerriAI/litellm_sync_main_into_internal_staging
chore(ci): sync main into internal staging
2026-08-08 11:25:43 -07:00
Mateo Wang
f6df762b25
test: roll back live router replay membership between tests (#36278)
Since #35491, every Router joins the module-global _live_routers weak set at
construction, and every model cost map swap replays the deployments of every
member on top of the freshly adopted map. #36039 isolated the register_model
ledger half of that replay but not this half: under pytest-xdist, a Router
created by an earlier test in the same worker that was still referenced (or
simply not yet garbage collected) re-registered its deployments during
TestPriceDataReloadIntegration::test_distributed_reload_check_function, and
register_model hydrated the sparse mocked gpt-3.5-turbo entry into a full
ModelInfo dict, failing the exact-equality assert (reruns cannot help since
the polluting router survives in the worker process)

The autouse isolate_litellm_state fixture now snapshots _live_routers before
each test and restores its membership on teardown, so a test's routers stop
contributing to cost map rebuilds once the test ends. A canary pair in
test_conftest_isolation.py asserts the rollback
2026-08-08 10:45:43 -07:00
Yuneng Jiang
09323fcc4a
chore(ci): sync main into internal staging 2026-08-08 10:42:07 -07:00
mateo-berri
fb7861fbfd build(lint): count deleted files toward check triggers 2026-08-08 10:41:06 -07:00
Mateo Wang
4d9defd573
Merge pull request #36282 from BerriAI/litellm_decrease_anys_fable3
chore(typing): clear 1.4k basedpyright Any errors across 21 hotspot files
2026-08-08 10:36:46 -07:00
Mateo Wang
1d0cba7f7c
Merge pull request #35551 from BerriAI/devin_ai_require_managed_files_read_paths_35530 2026-08-08 10:22:18 -07:00
Mateo Wang
8fdb1c1cf2
Merge pull request #36161 from BerriAI/litellm_ruff_external_strict_rules 2026-08-08 09:21:13 -07:00
mateo-berri
20eb7bb437 chore(typing): clear 1.4k basedpyright Any errors across 21 hotspot files
Typing-only pass over the 21 files with the highest reportAny and
reportExplicitAny density among self-contained modules: management
endpoints, guardrails, streaming internals, response transformations,
MCP server, enterprise managed files, and vector store management.

Whole-tree basedpyright drops from 148,648 to 146,984 errors (-1,664),
with reportAny -1,111 and reportExplicitAny -296. No rule increased
repo-wide and no file regressed on any rule. No cast(), type: ignore,
noqa, suppression comments, or new Any annotations anywhere in the diff,
and no runtime behavior changes.

Budgets ratcheted by make lint-budget-update: basedpyright -1,663 across
48 rules, ruff-strict -86, type-discipline -110.
2026-08-08 08:14:29 -07:00
mateo-berri
f038be22db build(lint): rename make pre-commit to make check with a working-tree fallback 2026-08-08 03:25:35 -07:00
mateo-berri
8c0556abf6 fix(proxy): authenticate managed ids before routing 2026-08-08 02:42:34 -07:00
mateo-berri
855c49d0ef fix(proxy): skip prisma-dependent hooks when no database is attached 2026-08-08 01:44:56 -07:00
mateo-berri
b01eacd67c ci: run the new fine-tuning and vector store file test dirs 2026-08-08 01:36:30 -07:00
mateo-berri
5f7a663005 fix(proxy): enforce require_managed_files on every raw provider id route
require_managed_files was only checked on upload, so raw provider ids still
reached the batch, fine-tuning and vector store file routes. Ownership rows
exist only for managed ids, so those requests were forwarded under shared
credentials with no tenant check: knowing another tenant's id was enough to
read, run against, cancel or delete their object.

Generalise the file-id guard to validate_managed_id_requirement(resource_id,
resource_kind) and call it on batch create/retrieve/cancel, fine-tuning
create/retrieve/cancel (training_file and validation_file both) and the shared
vector store file id resolver. Behaviour is unchanged when the setting is off.
2026-08-08 01:33:32 -07:00
mateo
f994068a73 fix(anthropic): keep pinging during agentic hooks and fail instead of replaying server-fulfilled tool_use
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-08 07:30:24 +00:00
Mateo Wang
e24a9146e3
Merge pull request #36252 from BerriAI/litellm_ci_concurrency_guards
ci: give the remaining pull_request workflows a concurrency group
2026-08-08 00:28:01 -07:00
Mateo Wang
c28cbb804c
Merge pull request #35141 from BerriAI/litellm_vertex_batch_create_error_propagation
fix(vertex_ai): surface real error/status on vertex batch create instead of IndexError 500
2026-08-07 23:28:36 -07:00
mateo-berri
292161f766 fix(proxy): read through to the DB on registry misses so just-created models, guardrails, and agents resolve on sibling replicas 2026-08-07 23:25:10 -07:00
mateo-berri
10209a8f91 Merge branch 'litellm_internal_staging' into devin_ai_require_managed_files_read_paths_35530 2026-08-07 23:17:28 -07:00
mateo-berri
5cd027cbbc fix(lint): let the ratchet guard recognise a graduated rule
A budget rule that graduates into a config's hard-fail select list rightly
leaves the budget file, but the ratchet guard read any disappearance as a
silently raised ceiling. Teach it the pairing between ruff-strict-budget.json
and ruff.toml: a dropped rule is excused only when the paired config's
lint.extend-select (minus lint.ignore) now hard-fails it, so deleting a rule
without graduating it still trips the guard.
2026-08-07 23:11:23 -07:00
mateo-berri
f304b7b19f refactor(lint): graduate the 35 zero-violation strict rules into ruff.toml
Every strict-gate rule whose budget ceiling was already 0 moves into the base
config's lint.extend-select, so editors and ruff check --fix surface the
diagnostics directly and the budget file shrinks to rules with real debt.
Graduates stay in ruff-strict.toml's select so the strict RUF100 pass keeps
policing their stale noqa directives, and base external entries they made
redundant (FURB, I001, RUF010, RUF022, RUF023, RUF051) are dropped so base
RUF100 polices those directly. UP037 had two violations hidden behind a star
import; importing Literal explicitly fixes them so UP037 can graduate too.
New drift tests pin the invariants: every strict-selected rule is budgeted or
hard-failed by base, every base-owned rule stays visible to exactly one
RUF100 pass, and graduated rules fail the normal ruff run.
2026-08-07 23:10:33 -07:00
mateo-berri
7bffbbd1f2 refactor(vertex_ai): drop unreachable post-path status checks in batches handler
HTTPHandler.post and AsyncHTTPHandler.post call raise_for_status before returning, so the status_code != 200 branches after the create and cancel POSTs could never run. Non-2xx already surfaces as httpx.HTTPStatusError from inside the client. The checks after GETs stay: the get helpers return without raising. Tests that faked a non-raising POST response are replaced by HTTPStatusError propagation coverage.
2026-08-07 23:00:50 -07:00
Devin AI
21df36ed09 Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_vertex_batch_create_error_propagation 2026-08-08 05:42:05 +00:00
Mateo Wang
dee667edb7
Merge pull request #36257 from BerriAI/litellm_ruff_external_split
fix(lint): make strict-gate noqas survive base ruff and flag stale ones
2026-08-07 22:39:50 -07:00
Yuneng Jiang
ee0c0cc7e8
feat(proxy): let USE_V2_MIGRATION_RESOLVER select the v2 migration resolver
--use_v2_migration_resolver had no env var, and the Helm migrations job runs
prisma_migration.py, which calls run_server with a fixed argv. There was no
seam to pass the flag, so a Helm install could not reach the v2 resolver at
all. Reading it from the environment makes the existing flag configurable
from a deployment.
2026-08-07 22:18:59 -07:00
mateo-berri
c3536c29a0 fix(lint): cover every base-owned ruff rule in the strict gate's external list 2026-08-07 21:38:53 -07:00
mateo-berri
557d14cc71 fix(lint): make strict-gate noqas survive base ruff and flag stale ones 2026-08-07 21:27:00 -07:00
Mateo Wang
d0758a291c
Merge pull request #36215 from BerriAI/litellm_declare_model_info_pricing
refactor(types): declare mirrored pricing fields on ModelInfo
2026-08-07 21:06:14 -07:00