Commit graph

42526 commits

Author SHA1 Message Date
yuneng-jiang
474d7e50f0
Merge pull request #39212 from BerriAI/litellm_pin_py313_1_97_x
fix(docker): pin apk python to 3.13 and bump wolfi-base on stable/1.97.x (cherry-pick #38917 + #38973)
2026-09-01 15:44:21 -07:00
Mateo Wang
785695ea9a
fix(docker): bump wolfi-base for glibc 2.44 in migrations image (cherry-pick #38973)
The migrations image fails for a different reason than the other five: its
base is pinned at 42df77a9 (glibc 2.43-r13), but Wolfi's current python-3.13
needs 2.44, so `uv sync` dies before it ever reaches the Python pin:

  ImportError: /usr/lib/libm.so.6: version `GLIBC_2.44' not found
    (required by .../math.cpython-313-aarch64-linux-gnu.so)

Cherry-picks #38973 (merge 0f84a7053a) onto stable/1.97.x: bumps the base to
e624c5d5 and applies the same python-3.13 pin the sibling images got in the
previous commit.

The wolfi-base digest hunk conflicted the same way as #38917's and was
resolved identically, to e624c5d5.

Without this the componentized leg cannot publish: a failed build-amd64 or
build-arm64 matrix leg skips merge and sign-images, and package-and-push-chart
accepts `merge.result == 'skipped'` -- so the chart would publish pointing at
component images that were never built.

(cherry picked from commit 0f84a7053a)
2026-09-01 15:37:16 -07:00
Mateo Wang
525ea5d27c
fix(docker): pin apk python to 3.13 on stable/1.97.x (cherry-pick #38917)
Wolfi now resolves unpinned `python3` to 3.14. uvloop 0.21.0 has no 3.14
wheel, so uv builds it from sdist and libuv's configure bootstrap fails,
killing every Docker image job in `uv sync`. This is the same failure that
took down the 1.99.0 release pipeline.

Cherry-picks #38917 (merge f814945d4c) onto stable/1.97.x: pins
python-3.13 / python-3.13-dev in every apk layer, passes --python
python3.13 to each uv sync, and sets UV_PYTHON_DOWNLOADS=0 so a missing
interpreter fails loudly instead of silently downloading one.

The wolfi-base digest hunks conflicted -- stable/1.97.x sits at 42df77a9
while #38917 moved a31344ab -> e624c5d5. Resolved to e624c5d5, the base
the 1.99.0 images build and ship on today.

migrations/Dockerfile is deliberately untouched; that image is covered by
#38973, which is not part of this pick.

(cherry picked from commit f814945d4c)
2026-09-01 15:31:57 -07:00
yuneng-jiang
92676d4114
Merge pull request #39200 from BerriAI/litellm_backport_1_97_x_sec-197x-0901
chore(deps): refresh stale dependency pins and cut 1.97.1
2026-09-01 15:06:17 -07:00
Yuneng Jiang
9c0b1f1fbb chore: relock for 1.97.1 2026-09-01 15:00:13 -07:00
Yuneng Jiang
98ebea5835 bump: version 1.97.0 → 1.97.1 2026-09-01 14:59:42 -07:00
Yuneng Jiang
a526a366c9 chore(deps): bump browserslist to 4.28.8
Transitive-only dependency; lockfile-only. Pulls its own new requirement floors (caniuse-lite, node-releases, electron-to-chromium, update-browserslist-db, baseline-browser-mapping), all landing on the versions internal staging already resolves.
2026-09-01 14:58:41 -07:00
Yuneng Jiang
2987be521a chore(deps): bump nanoid to 3.3.18
Transitive-only dependency of postcss; lockfile-only, no package.json change needed.
2026-09-01 14:57:44 -07:00
Yuneng Jiang
abf8a4fb28
chore: drop the stale pypdf scanner exemptions
Both entries expired on 2026-08-12 and named advisories the lock now resolves
past, so they no longer exempt anything. The diskcache entry stays: that
package still has no fixed release.
2026-09-01 14:53:45 -07:00
Yuneng Jiang
7a9d13229c
chore(deps): bump pypdf to 6.15.0 in the build_from_pip image
The pip-installed image pinned 6.7.5 while uv.lock resolved 6.14.2, so the
two install paths had drifted eight patch releases apart. Match the lock.
2026-09-01 14:53:11 -07:00
Yuneng Jiang
f2f3a5d769
chore(deps): bump pypdf to 6.15.0 2026-09-01 12:48:34 -07:00
Yuneng Jiang
8160f30f09
chore(deps): bump sqlparse to 0.6.0 2026-09-01 12:48:33 -07:00
Yuneng Jiang
6f81299fe6
chore(deps): raise RestrictedPython floor to 8.5
RestrictedPython 8.3 extended its protected-name validation to cover
positional-only parameters, so sandboxed source can no longer bind a
local named _getattr_, _getitem_, _write_ or _print_ that takes
precedence over the hooks the custom-code guardrail sandbox installs.
8.4 and 8.5 continue in the same direction with safer_getattr and the
Python 3.15 syntax audit.

The floor moves rather than the lock alone so downstream installs of
litellm[proxy] pick up the same behaviour.

(cherry picked from commit f1bebb6fbd)
2026-09-01 12:48:15 -07:00
Mateo Wang
ef84494d52
Merge pull request #37058 from BerriAI/litellm_passthrough_accept_encoding
fix(passthrough): stop forwarding client Accept-Encoding upstream

(cherry picked from commit 9a96b9327c)
2026-08-15 15:59:27 -07:00
yuneng-jiang
6a919aec6a
Merge pull request #36304 from BerriAI/litellm_internal_staging
Some checks failed
Unit Tests: LLM Provider Transformations / All Other Providers (push) Has been cancelled
Unit Tests: MCP, Secrets, Containers & Misc / misc (push) Has been cancelled
Unit Tests: Proxy Auth & Key Management / proxy-auth (push) Has been cancelled
Unit Tests: Proxy DB Operations / assert-shard-coverage (push) Has been cancelled
Unit Tests: Proxy API Endpoints / proxy-endpoints (push) Has been cancelled
Unit Tests: Proxy API Endpoints / proxy-server (push) Has been cancelled
Unit Tests: Proxy Infrastructure / proxy-infra (push) Has been cancelled
Unit Tests: Proxy Legacy Tests / auth-and-jwt (push) Has been cancelled
Unit Tests: Proxy Legacy Tests / key-generation (push) Has been cancelled
Unit Tests: Proxy Legacy Tests / proxy-config (push) Has been cancelled
Unit Tests: Proxy Legacy Tests / proxy-response-and-misc (push) Has been cancelled
Unit Tests: Proxy Legacy Tests / proxy-server (push) Has been cancelled
Unit Tests: Proxy Legacy Tests / proxy-server-extras (push) Has been cancelled
Unit Tests: Proxy Legacy Tests / proxy-token-counter (push) Has been cancelled
Unit Tests: Proxy Legacy Tests / proxy-user-auth-and-spend (push) Has been cancelled
Unit Tests: Proxy Legacy Tests / proxy-utils (push) Has been cancelled
Unit Tests: Responses, Caching & Types / responses-caching-types (push) Has been cancelled
GitHub Actions Security Analysis / zizmor (push) Has been cancelled
Unit Tests: Proxy DB Operations / auth-checks (push) Has been cancelled
Unit Tests: Proxy DB Operations / budgets (push) Has been cancelled
Unit Tests: Proxy DB Operations / custom-logging (push) Has been cancelled
Unit Tests: Proxy DB Operations / db-and-spend (push) Has been cancelled
Unit Tests: Proxy DB Operations / endpoints-and-responses (push) Has been cancelled
Unit Tests: Proxy DB Operations / guardrails-hooks (push) Has been cancelled
Unit Tests: Proxy DB Operations / jwt-and-keys (push) Has been cancelled
Unit Tests: Proxy DB Operations / key-generation (push) Has been cancelled
Unit Tests: Proxy DB Operations / logging-misc (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-runtime (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-server-core (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-utils (push) Has been cancelled
chore(ci): promote internal staging to main
2026-08-08 14:24:04 -07:00
yuneng-jiang
27d2fa8481
Merge pull request #36297 from BerriAI/litellm_/release-ui-build-528a42
chore: rebuild Admin UI bundle for the 2026-08-08 release
2026-08-08 14:21:24 -07:00
Yuneng Jiang
84d63cbdcf
chore: update Next.js build artifacts (2026-08-08 20:14 UTC, node v24.19.0) 2026-08-08 13:14:45 -07:00
yuneng-jiang
10798ca3d4
Merge pull request #36286 from BerriAI/litellm_internal_staging
chore(ci): promote internal staging to main
2026-08-08 13:11:47 -07:00
yuneng-jiang
97a59c8c90
Merge pull request #36293 from BerriAI/litellm_fix_circleci_88641_outdated_tests
test: repair stale CircleCI contracts
2026-08-08 13:08:22 -07: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
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
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
Yuneng Jiang
0d7f7c689a
test: repair stale CircleCI contracts 2026-08-08 12:19:29 -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
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
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
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 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
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