Commit graph

51754 commits

Author SHA1 Message Date
devin-ai-integration[bot]
bd68d04aae fix(proxy): price a 499 spend row only for the proxy's own disconnect, and never after the call already completed (#47652)
Backport of #47652 to stable/1.103.x

Cherry-picked from ffb7133d32 (main)
2026-10-21 03:37:25 +00:00
devin-ai-integration[bot]
db8f45dc87 fix(proxy): price earlier timed-out retry attempts at their own deployment's model rate (#47648)
Backport of #47648 to stable/1.103.x

Cherry-picked from 27efc387f7 (main)
2026-10-21 03:37:25 +00:00
devin-ai-integration[bot]
7e630b07d4 fix(proxy): price a billed failure row at the deployment's long-context tier like the success path (#47647)
Backport of #47647 to stable/1.103.x

Cherry-picked from 70ece3501f (main)
2026-10-21 03:37:25 +00:00
devin-ai-integration[bot]
8147f8d68f fix(proxy): scope the search free-tier counter to the request's provider (#47646)
Backport of #47646 to stable/1.103.x

Cherry-picked from 640f2d865b (main)
2026-10-21 03:37:25 +00:00
devin-ai-integration[bot]
6dd7b489de fix(proxy): strip caller base_model from spend pricing and reject lone surrogates in multipart metadata (#47639)
Backport of #47639 to stable/1.103.x

Cherry-picked from 2a268951c4 (main)
2026-10-21 03:37:25 +00:00
devin-ai-integration[bot]
aa838f931b fix(router): price cost-based routing through model_info.base_model (#47617)
Backport of #47617 to stable/1.103.x

Cherry-picked from 0c6731eb5c (main)
2026-10-21 03:37:25 +00:00
devin-ai-integration[bot]
be085c9028 fix(proxy): flush the spend-log queue only for Responses turns the bridge reads back (#47614)
Backport of #47614 to stable/1.103.x

Cherry-picked from 423362bab2 (main)
2026-10-21 03:37:25 +00:00
devin-ai-integration[bot]
bb2ec9a422 fix(proxy): bill partial Responses API streams when the client disconnects (#47611)
Backport of #47611 to stable/1.103.x

Cherry-picked from f0ae445cc4 (main)
2026-10-21 03:37:25 +00:00
devin-ai-integration[bot]
d7e344440c fix(proxy): requeue spend logs when a Postgres restart tears down the prisma engine mid-write (#47571)
Backport of #47571 to stable/1.103.x

Cherry-picked from ccd0d4ea49 (main)
2026-10-21 01:55:14 +00:00
devin-ai-integration[bot]
6120ddf786 fix(litellm_proxy): forward tool_config cache_control_injection_points to the downstream proxy (#47570)
Backport of #47570 to stable/1.103.x

Cherry-picked from 04e9ed4c52 (main)
2026-10-21 01:55:14 +00:00
devin-ai-integration[bot]
20c0e82370 fix(logging): report the pay-as-you-go entry billing used on Azure PTU spillover (#47567)
Backport of #47567 to stable/1.103.x

Cherry-picked from 4222523261 (main)
2026-10-21 01:55:14 +00:00
devin-ai-integration[bot]
c6ee8e0d54 feat(proxy): write one spend row per billed timed-out retry attempt (#47416)
Backport of #47416 to stable/1.103.x

Cherry-picked from ad8ca533ca (main)
2026-10-21 01:55:14 +00:00
devin-ai-integration[bot]
c23f17dcff feat(proxy): opt-in free-tier allowance for Google Search grounding spend (#47494)
Backport of #47494 to stable/1.103.x

Cherry-picked from e63aec029a (main)
2026-10-21 01:55:14 +00:00
devin-ai-integration[bot]
81b9ab7e51 feat(proxy): lift every earlier billed timed-out retry attempt onto the failed request (#47490)
Backport of #47490 to stable/1.103.x

Cherry-picked from 7a4a255d1d (main)
2026-10-21 00:45:27 +00:00
devin-ai-integration[bot]
e7e1aa8984 fix(vertex_ai): bill per-character text embeddings on Google's billableCharacterCount (#47460)
Backport of #47460 to stable/1.103.x

Cherry-picked from d29200fa05 (main)
2026-10-21 00:45:27 +00:00
devin-ai-integration[bot]
183e1c8a49 fix(logging): do not stamp a provider handoff when pre_call runs for a proxy-only failure (#47456)
Backport of #47456 to stable/1.103.x

Cherry-picked from 3fa1587f43 (main)
2026-10-21 00:45:27 +00:00
devin-ai-integration[bot]
c793111f40 fix(proxy): price a billed failure row at the deployment's own rate like the success path (#47437)
Backport of #47437 to stable/1.103.x

Cherry-picked from fb555b00dc (main)
2026-10-21 00:45:27 +00:00
devin-ai-integration[bot]
6a65634599 fix(proxy): price the estimated input tokens on a client-cancelled (499) request's spend row (#47436)
Backport of #47436 to stable/1.103.x

Cherry-picked from 0e7c4908bb (main)
2026-10-21 00:45:27 +00:00
devin-ai-integration[bot]
543f1899d4 fix(proxy): price the estimated input tokens on a read-timed-out request's spend row (#47435)
Backport of #47435 to stable/1.103.x

Cherry-picked from 7b76b2b15f (main)
2026-10-21 00:45:27 +00:00
devin-ai-integration[bot]
37b7c14830 feat(router): let a deployment set a timeout per service_tier (#47406)
Backport of #47406 to stable/1.103.x

Cherry-picked from 62ce515d15 (main)
2026-10-21 00:45:27 +00:00
devin-ai-integration[bot]
8147fae4d6 fix(anthropic): apply tool_config cache-control points on chat and /v1/messages (#47394)
Backport of #47394 to stable/1.103.x

Cherry-picked from 93b79d2587 (main)
2026-10-21 00:45:27 +00:00
devin-ai-integration[bot]
1f47a4b5e7 fix(cost): bill Gemini audio/image/video prompt tokens at the resolved input rate when no modality rate exists (#47373)
Backport of #47373 to stable/1.103.x

Cherry-picked from 09e9193514 (main)
2026-10-20 23:56:56 +00:00
yuneng-jiang
dce7feb75c
Merge pull request #47522 from BerriAI/patch_f62f7f90
Some checks are pending
LiteLLM Rust / rust-lint (push) Waiting to run
LiteLLM Rust / rust-test (push) Waiting to run
LiteLLM Rust / rust-wheel (push) Waiting to run
chore(release): v1.103.6 patch
2026-10-20 09:10:17 -07:00
Yuneng Jiang
fe02b14e96
chore: bump litellm 1.103.5 -> 1.103.6
litellm 1.103.5 already shipped, so the next release off this line is 1.103.6
2026-10-20 01:06:21 -07:00
Hektor Jacynycz Garcia
cd788ce1aa
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-20 01:06:21 -07:00
devin-ai-integration[bot]
fb0f3b693a
test(realtime): drop legacy InvalidStatusCode tests and pin websockets imports (#42624)
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.

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
(cherry picked from commit 38f0eb876b)
2026-10-20 01:06:21 -07:00
devin-ai-integration[bot]
c66597f432
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-10-20 01:06:21 -07:00
mrinal-berri
dec1691c90
Merge pull request #46949 from BerriAI/litellm_backport_responses_bridge_stable_1_103_x
Some checks failed
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-wheel (push) Has been cancelled
fix(responses): backport #46099 and #46109 to stable/1.103.x for v1.103.5
2026-10-16 20:50:39 -05:00
Mrinal Chanshetty
6ed7a3d042 bump: version 1.103.5 2026-10-16 13:41:01 -05:00
Mrinal Chanshetty
34996a0e1e test(integration): register the responses bridge fold contracts on stable/1.103.x
The line's integration conftest refuses any owned test missing from
contracts.json, so the backported #46099 and #46109 tests get covers marks
and manifest entries here; main has no manifest.
2026-10-16 13:39:11 -05:00
devin-ai-integration[bot]
fe622b8e0c fix(responses): number bridged chat tool calls 0, 1 and pin the remaining bridge shapes (#46109)
Backport of #46109 to stable/1.103.x.
Cherry-picked from b6df3d7fe5 (main).
Adapted to the line: unit tests live under tests/test_litellm/, and the
black-only reformat of the existing completion-responses tests is not carried.
2026-10-16 13:34:13 -05:00
devin-ai-integration[bot]
a70f1310ad fix(responses): fold bridged Responses output into one chat choice (#46099)
Backport of #46099 to stable/1.103.x.
Cherry-picked from 4b7b8efd4c (main).
Adapted to the line: unit test lives under tests/test_litellm/, and only this
PR's own tests are carried into the integration file.
2026-10-16 13:34:12 -05:00
devin-ai-integration[bot]
69ff376019 test(integration): add list_value helper
Prerequisite for the backport of #46099 to stable/1.103.x: its integration
tests import list_value, which reached main in #43981.
Hand-ported from 43f07d0bd8 (main).
2026-10-16 13:33:44 -05:00
yuneng-jiang
65e36b0298
Merge pull request #45011 from BerriAI/litellm_pgb_bump_1103
chore(docker): bump pgbouncer to 1.26.0
2026-10-07 10:32:50 -07:00
yuneng
497a3b406b chore(docker): bump pgbouncer to 1.26.0 2026-10-07 06:53:40 +00:00
yuneng-jiang
68b1fe1b66
Merge pull request #44776 from BerriAI/litellm_chore_8a10a6
Some checks failed
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (push) Has been cancelled
chore(release): refresh dependencies on stable/1.103.x and cut 1.103.4
2026-10-05 22:27:42 -07:00
Yuneng Jiang
0e6c47f8d1
chore: refresh uv.lock for 1.103.4 2026-10-05 18:54:46 -07:00
Yuneng Jiang
d040262bf8
bump: version 1.103.3 → 1.103.4 2026-10-05 18:54:27 -07:00
Yuneng Jiang
dc36db371c
chore(deps): bump source-map-js in the vscode-extension lockfile 2026-10-05 18:52:52 -07:00
Yuneng Jiang
7679ae853f
chore(deps): bump source-map-js and smol-toml in the dashboard lockfile 2026-10-05 18:52:52 -07:00
Yuneng Jiang
0c1ed2e155
chore(deps): bump next, moment and brace-expansion in the dashboard 2026-10-05 18:52:51 -07:00
Yuneng Jiang
eb91e815c0
chore(deps): bump werkzeug to 3.1.9 2026-10-05 18:51:41 -07:00
Yuneng Jiang
9bfde413b3
chore(deps): bump multidict to 6.9.1 2026-10-05 18:51:40 -07:00
Yuneng Jiang
1f388e5221
chore(deps): bump mako to 1.4.2 2026-10-05 18:51:40 -07:00
Yuneng Jiang
0cc25f2f18
chore(deps): bump langgraph-sdk to 0.4.4 2026-10-05 18:51:39 -07:00
Yuneng Jiang
6db4026e27
chore(deps): bump oauthlib to 4.0.0 2026-10-05 18:51:39 -07:00
Yuneng Jiang
41017f478d
chore(deps): bump fsspec to 2026.6.0 2026-10-05 18:51:38 -07:00
yuneng-jiang
ecae261b10
Merge pull request #44437 from BerriAI/litellm_chore_bba82d
Some checks failed
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (push) Has been cancelled
test(e2e): backport Together structured-output and text-completion fixes to stable/1.103.x
2026-10-03 14:11:07 -07:00
yuneng
ff6578183b test(e2e): align completion, SAIL, and spend-log fixtures with supported contracts (#43902)
Partial backport to stable/1.103.x: only the text completion endpoint test moves off the retired gpt-3.5-turbo-instruct to openai/gpt-5.4-nano with reasoning off. This line predates the OpenAI SDK rewrite of the test, so reasoning_effort goes through EndpointsClient.text_completions instead of extra_body. The SAIL, spend-log and coverage registry repairs are not needed for this line's e2e suite

(cherry picked from commit e61733b170)
2026-10-03 21:07:17 +00:00
yuneng
3896240d3b test(ci): repair stale tests and flaky CI infrastructure (#43983)
Partial backport to stable/1.103.x: only the Together AI structured-output e2e case moves to the hybrid reasoning backend with reasoning off, since the reasoning-only model it picked returned no content. The CI infrastructure and other test repairs are not needed for this line's e2e suite

(cherry picked from commit 6ca90b927c)
2026-10-03 21:07:17 +00:00