Commit graph

48801 commits

Author SHA1 Message Date
yuneng-jiang
0de9a17857
Merge pull request #45215 from BerriAI/litellm_backport_1_102_x_bp44508
Some checks failed
ai-gateway image / ai-gateway release image (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
chore(release): backport #44508 to stable/1.102.x and cut 1.102.4
2026-10-07 18:22:58 -07:00
Yuneng Jiang
346cbb9f2c
chore: refresh uv.lock for 1.102.4 2026-10-07 17:40:00 -07:00
Yuneng Jiang
37e08c1e2a
bump: version 1.102.3 → 1.102.4 2026-10-07 17:39:49 -07:00
Hektor Jacynycz Garcia
2287994de4
fix(logging): log spend once for large non-streaming requests on the chat to Responses bridge (#44508)
* fix(logging): claim the async success dedup flag before the first await

Nested @client wrappers on the chat -> Responses bridge schedule two async
success tasks on one logging object. The dedup flag was checked at the top
of _async_success_handler_body but only set after several awaits; the
worker-thread base64 offload for messages >= 256 KiB yields there, so the
second task passed the same check and the request was logged twice
(two SpendLogs rows, key/team/daily spend counted twice).

Fixes #44500

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(logging): serialise async success handlers per logging object instead of claiming early

Claiming the dedup flag before the first await (previous commit) let a first
handler that is cancelled before its callbacks run (e.g. by the logging
worker's per-coroutine timeout) suppress the second one, losing the request's
success accounting. Serialise non-streaming handlers on the same Logging
object with an asyncio.Lock kept in a module-level WeakKeyDictionary: the
second handler waits, then skips if the first logged, or logs itself if the
first raised or was cancelled first. Streaming chunk logging is not locked.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* test(integration): pin one spend row and one key charge for large bridged chat completions

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

* test(integration): wait for the large request's spend row before asserting

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

* test(logging): use fixed timestamps in async success dedup tests

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

* style(logging): trim the async success dedup lock comment

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

* fix(logging): reset background interaction dedupe under the success dedup lock

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

* test(logging): use a fixed start time in the interactions logging helper

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

* fix: claim the async success log at schedule time instead of locking the handler

Nested @client wrappers (chat over the Responses bridge, Anthropic Messages over the chat adapter) exit with one shared Logging object and each queued their own async success handler. The handler checked has_logged_async_success before its awaited work and set it after, so both could pass the check and the request was logged and billed twice.

_schedule_async_success_logging now claims the log on the Logging object synchronously through claim_async_success_log, and a later wrapper returns without enqueuing. There is no await between the check and the decision, so no lock is needed. The per-object asyncio.Lock, the WeakKeyDictionary that held it and the locked block in async_log_background_interaction_completion are gone.

Tests: the regression test moves to tests/unit/test_utils.py and drives two _dispatch_success_logging exits with one Logging object through the logging worker, asserting one log with the inner result. It fails without the claim. The cancelled-handler test is dropped since a second wrapper no longer retries. The background interaction completion test stays.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(logging): pin the background completion event order and name the innermost wrapper in the claim docstrings

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

* test(integration): send one bridged request and assert the inner Responses result is the logged one

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

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: kerry <kerry@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit 157d96dcd0)
2026-10-07 17:39:15 -07:00
yuneng-jiang
d174b05cd1
Merge pull request #45010 from BerriAI/litellm_pgb_bump_1102
chore(docker): bump pgbouncer to 1.26.0
2026-10-07 10:32:30 -07:00
yuneng
56b84f8dee chore(docker): bump pgbouncer to 1.26.0 2026-10-07 06:53:40 +00:00
yuneng-jiang
90b310eaf3
Merge pull request #44805 from BerriAI/litellm_backport_wolfi_digest_1102
Some checks are pending
ai-gateway image / ai-gateway release image (push) Waiting to run
LiteLLM Rust / rust-test (push) Waiting to run
LiteLLM Rust / rust-lint (push) Waiting to run
chore(docker): bump wolfi-base digest to pick up glibc 2.44-r6 (#42643)
2026-10-05 23:19:22 -07:00
yuneng
cdba2fb6f4 chore(docker): bump wolfi-base digest to pick up glibc 2.44-r6 (#42643)
The pinned base's /etc/apk/world locks glibc-2.44=2.44-r1, so the apk upgrade in the runtime stage cannot move it. The new digest ships 2.44-r6 on amd64 and arm64

(cherry picked from commit bc911abdbb)
2026-10-06 06:02:38 +00:00
yuneng-jiang
6ec76c2dba
Merge pull request #44775 from BerriAI/litellm_chore_1fcdd5
chore(release): refresh dependencies on stable/1.102.x and cut 1.102.3
2026-10-05 22:27:34 -07:00
Yuneng Jiang
0d694da391
chore: refresh uv.lock for 1.102.3 2026-10-05 18:54:46 -07:00
Yuneng Jiang
b85766d4e4
bump: version 1.102.2 → 1.102.3 2026-10-05 18:54:26 -07:00
Yuneng Jiang
355e3cb5a3
chore(deps): bump source-map-js and smol-toml in the dashboard lockfile 2026-10-05 18:52:50 -07:00
Yuneng Jiang
6c0106db5b
chore(deps): bump next, moment and brace-expansion in the dashboard 2026-10-05 18:52:50 -07:00
Yuneng Jiang
9c62fc8aa3
chore(deps): bump werkzeug to 3.1.9 2026-10-05 18:51:06 -07:00
Yuneng Jiang
f0ae177dca
chore(deps): bump multidict to 6.9.1 2026-10-05 18:51:06 -07:00
Yuneng Jiang
1bfe9d6883
chore(deps): bump mako to 1.4.2 2026-10-05 18:51:05 -07:00
Yuneng Jiang
c474132e8a
chore(deps): bump langgraph-sdk to 0.4.4 2026-10-05 18:51:04 -07:00
Yuneng Jiang
b7b7cfea19
chore(deps): bump oauthlib to 4.0.0 2026-10-05 18:51:04 -07:00
Yuneng Jiang
9a170f0834
chore(deps): bump gitpython to 3.1.62 2026-10-05 18:51:03 -07:00
Yuneng Jiang
4a7212d329
chore(deps): bump fsspec to 2026.6.0 2026-10-05 18:51:03 -07:00
Yuneng Jiang
3b24b4c146
chore(deps): bump tornado to 6.5.9 2026-10-05 18:51:02 -07:00
Yuneng Jiang
9f9aca4655
chore(deps): bump urllib3 to 2.8.0 2026-10-05 18:51:01 -07:00
Yuneng Jiang
6d5cb46eae
chore(deps): bump pypdf to 6.19.0 2026-10-05 18:51:01 -07:00
Yuneng Jiang
c2c339390d
chore(deps): bump pyjwt to 2.15.0 2026-10-05 18:51:00 -07:00
yuneng-jiang
15448f30b3
Merge pull request #43823 from BerriAI/litellm_sync_stable_1_102_x
Some checks failed
ai-gateway image / ai-gateway release image (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
chore(release): sync stable/1.102.x to v1.102.2
2026-09-30 10:59:56 -07:00
yuneng-jiang
a0c4a3347a
Merge pull request #12 from BerriAI/litellm_session_token_1_102_x
refactor(auth): bind UI/CLI session tokens to their own AES-GCM context (stable/1.102.x)
2026-09-29 15:39:18 -07:00
Yuneng Jiang
02a0dc1480
chore(lint): scope a TRY004 suppression to the bearer-token salt key check
This line's ruff strict budget has no headroom for the one TRY004 the
backport adds; the raise reports missing configuration, not a bad type.
2026-09-29 15:34:34 -07:00
Yuneng Jiang
1d5fdc87fe
refactor(auth): bind UI/CLI session tokens to their own AES-GCM context
Backport of BerriAI/litellm-private#5 (12981f93d3) onto stable/1.102.x, applied as
the PR's net diff so main-only intermediate refactors stay out.

The dashboard and lite CLI SSO specs under tests/e2e/ui/oidc are left out
because this line has no OIDC e2e harness to run them.
2026-09-29 15:17:24 -07:00
yuneng-jiang
5f8561bdc2
Merge pull request #7 from BerriAI/litellm_bump_1_102_2
chore: bump litellm 1.102.1 -> 1.102.2
2026-09-28 17:06:17 -07:00
Yuneng Jiang
fec5028abf
bump: litellm 1.102.1 -> 1.102.2 2026-09-28 15:07:47 -07:00
Mateo Wang
d09bbae1c6
Merge pull request #42618 from BerriAI/litellm_backport_stable_1_102_x_realtime_otel
Some checks failed
ai-gateway image / ai-gateway release image (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
chore(release): backport #42388 and #41462 to stable/1.102.x
2026-09-22 20:04:11 -07:00
Mateo Wang
188c9d1f9f
Merge pull request #42595 from BerriAI/litellm_cherrypick_1_102_x
feat(typesafe): backport the jev change set to stable/1.102.x for v1.102.1
2026-09-22 20:01:25 -07:00
mateo-berri
d1cd2dccaf chore(backport): regenerate the openapi snapshot and dashboard api types for stable/1.102.x
The committed schema.d.ts and lazy OpenAPI snapshot were taken verbatim from main by the #41615 and #41757 picks, so they described classifier types, routing causes, and a guardrail that this line does not ship and lacked the /auto_router/manage permission. Regenerated under Python 3.12, the interpreter the check-ui-api-types workflow uses.
2026-09-22 19:13:48 -07:00
mateo-berri
5aa45f1bca test(realtime): drop legacy InvalidStatusCode tests and pin websockets imports
The two redaction tests raised the deprecated InvalidStatusCode, which the
websockets 15 asyncio client never raises, and asserted the raw 403 close
code that the handshake refusal path replaced with 1008. The refusal path
builds its close reason from the status code alone, so there is no secret
to redact there, and the handshake refusal tests already cover the error
event and the 1008 close.

Those refusal tests only passed when run after a sibling test had imported
websockets.asyncio.client, since websockets lazy-loads its exceptions
submodule. Importing InvalidStatus, Response, and Headers from their own
submodules makes them pass in any order.

(cherry picked from commit 54dbe8eb9a)
2026-09-23 00:46:03 +00:00
mateo-berri
4bfac88281 fix(ui): adapt the jev dashboard pieces to stable/1.102.x 2026-09-22 17:40:03 -07:00
yuneng
da246e9282 chore(deps): bump anyio to 4.14.2 and soupsieve to 2.9.0
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-22 23:03:52 +00:00
Yassin Kortam
9a46f1f53e Merge pull request #41462 from BerriAI/litellm_otel_promote_nested_request_metadata_keys
feat(otel): promote nested request metadata keys to litellm.metadata.* span attributes

(cherry picked from commit 79fc5153d3)
2026-09-22 23:02:58 +00:00
devin-ai-integration[bot]
96e7739dcb fix(realtime): surface an upstream handshake refusal as an error event and policy close (#42388)
* fix(realtime): surface an upstream handshake refusal as an error event and policy close

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

* test(realtime): tidy the handshake refusal e2e

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

* fix(realtime): keep upstream exception text out of the Azure client error

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

* refactor(realtime): map handshake refusal close codes with a lookup

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>
(cherry picked from commit 2bab39e374)
2026-09-22 23:02:53 +00:00
devin-ai-integration[bot]
d0687347a7 feat(openrouter): price typesafe/jev-1.13 and add an openrouter decisions pass-through (#42301)
Backport of #42301 to stable/1.102.x.
Cherry-picked from 1106b16745 (main).
2026-09-22 22:49:10 +00:00
moe-berri
e20cfbeaeb feat(auto-router): add JEV classifier alongside LLM classifier
Backport of #41886 to stable/1.102.x.
Cherry-picked from a83773cfa5 (main).
2026-09-22 22:49:10 +00:00
moe-berri
92a2a2f924 fix(proxy): enforce virtual key budgets for JEV test routing
Backport of #41879 to stable/1.102.x.
Cherry-picked from 1e161f516c (main).
2026-09-22 22:49:10 +00:00
Yassin Kortam
4b0ffcdf41 feat(guardrails): add TypeSafe Jev relevance-based compaction guardrail
Backport of #41757 to stable/1.102.x.
Cherry-picked from 2edda5aec3 (main).
2026-09-22 22:49:10 +00:00
yuneng-jiang
79b72b8594 fix(proxy): forward every method on the typesafe pass-through route
Backport of #41723 to stable/1.102.x.
Cherry-picked from 34718f0da6 (main).
2026-09-22 22:49:10 +00:00
Mateo Wang
b5ac61374e feat(router): add TypeSafe Jev as a complexity router classifier
Backport of #41615 to stable/1.102.x.
Cherry-picked from cf42b607c3 (main).
2026-09-22 22:49:10 +00:00
Tin Chi Lo
1a3cec8f5e feat(auto-router): allow opted-in team members to manage their routers
Prerequisite for #41615 and #41879 on stable/1.102.x.
Cherry-picked from 109ca70f66 (main).
2026-09-22 22:49:10 +00:00
mateo-berri
3b483c80f6 feat(typesafe): add TypeSafe Jev passthrough with logging and cost tracking
Backport of #41607 to stable/1.102.x.
Cherry-picked from deb9d8aedd (main).

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-22 21:34:24 +00:00
Mateo Wang
89000e402f
Merge pull request #42538 from BerriAI/litellm_cherrypick_safeguards_1_102_x
fix(anthropic): backport #42152 and #42288 to stable/1.102.x for v1.102.1
2026-09-22 14:29:04 -07:00
kerry
0fee6fcc76 fix(test): run the all-beta-headers bedrock cases on Claude Fable 5.1
Backport of #42048 to stable/1.102.x.
Cherry-picked from 7966f50c34 (main). The safeguards backport maps the dangerous-tool-use-2026-09-03 beta for Bedrock, which Claude Opus 4.5 on Bedrock Invoke rejects as an invalid beta flag, so the all-beta-headers Bedrock cases run on Claude Fable 5.1 as they do on main.
2026-09-22 12:54:44 -07:00
mateo-berri
712428eded chore(types): keep the backported safeguards annotations within the line's budgets
The picked TypedDict fields use read-only Sequence[Mapping[str, object]] annotations and the picked Vertex test carries a test-quality-ok marker, so stable/1.102.x's LIT001, LIT012 and TQ008 budgets hold. Static typing only, no runtime change.
2026-09-22 12:18:27 -07:00
mateo-berri
4f4ed1121a bump: version 1.102.1 2026-09-22 10:46:02 -07:00