Commit graph

54919 commits

Author SHA1 Message Date
yuneng-jiang
2a61f2114d
Merge pull request #50980 from BerriAI/litellm_chore_5cb36d
chore: bump litellm to 1.108.5 on lts/1.108.x
2026-11-10 10:34:08 -08:00
Yuneng Jiang
eae79e59ff
chore: bump litellm 1.108.4 -> 1.108.5
litellm 1.108.4 already shipped, so the next release off this line is 1.108.5
2026-11-10 10:26:30 -08:00
yuneng-jiang
58c13a5290
Merge pull request #50962 from BerriAI/litellm_backport_39966_lts_1_108_x
feat(openai)!: honor per-deployment workload identity on non-chat routes (#39966) [lts/1.108.x]
2026-11-10 10:24:14 -08:00
yuneng-jiang
5ef9d2a895
Merge pull request #50860 from BerriAI/litellm_backport_transcription_usage_seconds_lts_1_108_x
fix(cost): backport usage.seconds billing and the unsized FLAC guard to lts/1.108.x
2026-11-10 10:23:09 -08:00
Mateo Wang
099b914e16 feat(openai)!: honor per-deployment workload identity on non-chat routes (#39966)
Backport of #39966 to lts/1.108.x.
Cherry-picked from b39eadcb82 (main).

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-10 17:08:29 +00:00
devin-ai-integration[bot]
0633730678 test(transcription): annotate the new passthrough test's locals as Final
Backport of #50842 to lts/1.108.x.
Cherry-picked from eb0f251b47 (litellm_transcription_unknown_frame_count).
2026-11-10 06:43:07 +00:00
devin-ai-integration[bot]
0e5241c504 fix(transcription): read the frame count once to keep the type gate flat
Backport of #50842 to lts/1.108.x.
Cherry-picked from 54dcd9230f (litellm_transcription_unknown_frame_count).
2026-11-10 06:43:07 +00:00
devin-ai-integration[bot]
3f50c8734e refactor(transcription): inline the unknown frame count check
Backport of #50842 to lts/1.108.x.
Cherry-picked from b6d25f2752 (litellm_transcription_unknown_frame_count).
2026-11-10 06:43:07 +00:00
devin-ai-integration[bot]
70f388a8ab fix(transcription): treat libsndfile's unknown frame count as no duration
Backport of #50842 to lts/1.108.x.
Cherry-picked from e6a0534785 (litellm_transcription_unknown_frame_count).
2026-11-10 06:43:07 +00:00
devin-ai-integration[bot]
76539f9156 fix(cost): bill transcriptions by the seconds the provider reports
Line port of the usage.seconds billing slice onto lts/1.108.x: normalized_audio_duration_seconds and _get_transcription_usage_duration from #35600 (ecb8ef5ca8), and the provider-seconds-first _transcription_duration_for_cost from #50727 (dfb1aac8b1), with their unit tests. The rest of #35600 stays on main.
2026-11-10 06:21:04 +00:00
Mateo Wang
2a56160037
Merge pull request #50755 from zoveki/litellm_backport_messages_drop_params_gate_lts_1_108_x
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
fix(anthropic-messages): apply additional_drop_params before the unsupported param checks
2026-11-10 01:36:32 +00:00
Mateo Wang
a354fb7132
Merge pull request #50718 from zoveki/litellm_backport_49183_lts_1_108_x
fix(ollama_chat): backport streamed tool call indices to lts/1.108.x (#49183)
2026-11-09 22:52:57 +00:00
mateo-berri
b25cf6f9f4 fix(anthropic-messages): apply additional_drop_params before the unsupported param checks 2026-11-09 13:43:56 -08:00
yuneng-jiang
e6f080fb56
Merge pull request #50729 from BerriAI/litellm_chore_97d6e4
chore: bump litellm to 1.108.4 on lts/1.108.x
2026-11-09 12:37:23 -08:00
mateo-berri
2fd636e610 Merge remote-tracking branch 'origin/lts/1.108.x' into litellm_backport_49183_lts_1_108_x
# Conflicts:
#	litellm/litellm_core_utils/prompt_templates/common_utils.py
2026-11-09 12:19:36 -08:00
Yuneng Jiang
b5d169266c
chore: bump litellm 1.108.3 -> 1.108.4
litellm 1.108.3 already shipped, so the next release off this line is 1.108.4
2026-11-09 12:18:50 -08:00
yuneng-jiang
984bc6878f
Merge pull request #50462 from BerriAI/litellm_backport_messages_reject_background_lts_1_108_x
fix(anthropic): backport background rejection on the /v1/messages Responses bridge to lts/1.108.x
2026-11-09 12:05:49 -08:00
Yuneng Jiang
7f78209db1
Merge branch 'lts/1.108.x' into litellm_backport_messages_reject_background_lts_1_108_x 2026-11-09 11:57:36 -08:00
Mateo Wang
b815053525
Merge pull request #50399 from BerriAI/litellm_backport_50073_lts_1_108_x
fix(bedrock): backport #50073 to lts/1.108.x
2026-11-09 19:43:35 +00:00
Mateo Wang
a76413209e
Merge pull request #50365 from BerriAI/litellm_backport_45715_lts_1_108_x
fix(vertex_ai): backport Claude batches in Anthropic's row shape to lts/1.108.x (#45715)
2026-11-09 19:43:07 +00:00
Mateo Wang
862a1fbeee
Merge pull request #50456 from BerriAI/litellm_backport_49076_lts_1_108_x
fix(anthropic): backport #49076 encrypted reasoning round-trip to lts/1.108.x
2026-11-09 19:36:36 +00:00
yuneng-jiang
842ab91663
Merge pull request #50568 from BerriAI/litellm_/recursing-jones-b2e294
fix(bedrock)!: backport #47429 pass-through guardrailConfig and the integration test fixes to lts/1.108.x
2026-11-09 11:23:41 -08:00
shrey
b1de7aa85d
Merge pull request #50605 from BerriAI/litellm_backport_45961_stable_1_108_x
fix(sdk): backport #45961 to lts/1.108.x
2026-11-09 09:46:09 -08:00
yuneng-jiang
ddda2b41ac
Merge pull request #50693 from BerriAI/litellm_backport_48490_49785_lts_1_108_x
fix(videos): backport #48490 and #44614 to lts/1.108.x
2026-11-09 09:40:14 -08:00
ekpog200
854937381d fix(videos)!: keep model_id in proxy video ids so per-model keys resolve on status/content (#44614)
Backport of #44614 to lts/1.108.x.
Cherry-picked from ba61ecdf57 (main). The line has no splits_stream_timeout on _update_kwargs_with_deployment, so only the _video_call_pin wrapping is added around deployment selection. The line has no litellm/llms/base_llm/videos/async_task_utils.py, so its _id_safe_name dedupe is applied to the dashscope video transformation that holds the same helper on this line.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-09 15:05:22 +00:00
devin-ai-integration[bot]
ca4e6521e7 fix(router): serve a team's wildcard deployment before a proxy-wide wildcard (#48490)
Backport of #48490 to lts/1.108.x.
Cherry-picked from 76d001a7c0 (main). The line has no wildcard_routed_models helper and no get_models_by_pattern, so only wildcard_route_deployments is changed.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-09 14:47:28 +00:00
MFJG
cb738a5697 fix(sdk): backport #45961 to lts/1.108.x
completion() loaded the MCP gateway handler for any request with tools,
and the handler pulls in mcp 2.x only code, so tool calls failed on
installs with mcp 1.x (google-adk 1.36.1) or no mcp at all

Cherry-picked from 783cf06f31. Only conflict was import context in
litellm/responses/main.py

(cherry picked from commit 783cf06f31)
2026-11-07 17:55:52 -08:00
Yuneng Jiang
d06f5a5021
test(e2e): repin the Together reasoning replay backend to MiniMax-M3.1-Flash
MiniMax-M3 reached its 2026-11-06 deprecation date in the cost map, which names MiniMax-M3.1-Flash as its successor

(cherry picked from commit 90f7ab6fe6)
2026-11-07 17:08:44 -08:00
Yuneng Jiang
4fb2f026a0
refactor(bedrock): drop the unused converse URL helper and cover a trailing-slash converse pass-through 2026-11-07 16:58:22 -08:00
Yuneng Jiang
f4ba1bfafc
fix(bedrock)!: backport #47429 deployment guardrailConfig on /bedrock pass-through routes to lts/1.108.x
The router-model pass-through dropped a Bedrock deployment's guardrailConfig, so converse, converse-stream, invoke and invoke-with-response-stream reached Bedrock unguarded while /v1/chat/completions on the same deployment was blocked. The signer now sends it the way Bedrock reads it, in the body for Converse and as the X-Amzn-Bedrock-Guardrail* headers for Invoke, replacing any guardrail the caller sent

Adapted to the line, which does not have #47040. The guardrail headers are merged through merge_bedrock_invoke_headers without the request metadata header, and the unit tests drop the request metadata assertions and the identity argument that only #47040 needs
2026-11-07 16:45:18 -08:00
Yuneng Jiang
52f49b8e86
test(integration): backport main's Gateway.rows, Scenario.model name and MCP ack fix to lts/1.108.x
Backports test-only changes from main so the line's integration signal stops reporting stale helpers as failures.

Gateway.database_url and Gateway.rows come from #47213 (fc27dfdc7d), and the name keyword on Scenario.model comes from #48917 (ebf84f8649). Only those hunks of tests/integration/_support/client.py are taken. The rest of #47213 gives each owned proxy its own database and Redis, which none of the line's tests need, and the workers field from a later main change is left out.

The MCP progress and cancellation test wraps its upstream in _acknowledge_notifications_after_dispatch, from #49967 (b5952f243a). The helper is already on the line.
2026-11-07 14:34:39 -08:00
yuneng-jiang
b7d579fab2
Merge pull request #50545 from BerriAI/litellm_chore_23d634
Some checks failed
LiteLLM Rust / rust-wheel (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
chore: bump litellm to 1.108.3 on lts/1.108.x
2026-11-07 11:05:20 -08:00
mateo-berri
d5ad71dd65 test(anthropic): type the retry helper parameter in the cancellation test
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
2026-11-07 10:54:21 -08:00
mateo-berri
edb48c1d09 fix(anthropic): stop a cancelled SDK retry from starting another call
The resent-failure retry predicate returned true for BaseException
subclasses such as asyncio.CancelledError, so a cancelled
acompletion_with_retries or aresponses_with_retries call could start
another provider call. Retry only Exception subclasses again, as
tenacity's default did, while still skipping a resent failure.
2026-11-07 10:45:18 -08:00
Yuneng Jiang
3eda243ea8
chore: bump litellm 1.108.2 -> 1.108.3
litellm 1.108.2 already shipped, so the next release off this line is 1.108.3
2026-11-07 10:31:40 -08:00
mateo-berri
b277d687b5 fix(anthropic): stop SDK retries from resending a rejected block or clearing the global num_retries
A transient 429 or 500 on a /v1/messages turn that carries a replayed encrypted
block was retried by an SDK call's num_retries loop, which sent the block again
until every retry was rejected. On async calls the loop then raised the first
transient error, so the turn failed instead of being sent again without the
block. The retry loop now stops at that rejection and passes it on, so the turn
is sent again once without encrypted blocks.

A rejected first try on a sync call also cleared the process-wide
litellm.num_retries, so later calls in the process were no longer retried. That
setting now stays as configured.
2026-11-07 10:22:13 -08:00
mateo-berri
433a76f754 fix(anthropic): skip the SDK num_retries retry for an attempt that is sent again 2026-11-07 09:28:59 -08:00
mateo-berri
c72cb031d8 test(anthropic): type the success logger and use a fixed token expiry in the bridge tests 2026-11-07 08:55:37 -08:00
mateo-berri
5a6475d112 test(anthropic): type the parameters of the failure-recording test loggers
Backport of 3d53f0047d (#49076) to lts/1.108.x.
2026-11-07 08:46:14 -08:00
mateo-berri
a1c02f7d1a fix(anthropic): log only the outcome of a turn sent again, and keep every reasoning item in Messages logs on the line
A /v1/messages turn whose replayed encrypted block the backend rejects is sent
once more without it. The rejected first attempt no longer fires failure
callbacks or releases its parallel slot and budget reservation, so only the
turn sent again is logged and counted.

Success logs for a Messages client now keep every reasoning item of a
non-streamed turn, matching the reply the client got.
2026-11-07 07:33:23 -08:00
mateo-berri
97df7cb369 fix(anthropic): keep every non-streamed reasoning item for Messages clients on the line's bridge
This line's transform_request rewrites the logging call_type to responses, so the non-streamed reply read the Messages-client check after the rewrite and kept only the last reasoning item. The bridge handler now reads it before the request transform and passes it to transform_response, as the streamed path already does.
2026-11-07 06:06:59 -08:00
mateo-berri
ce35f27bfa fix(anthropic): keep every non-streamed reasoning item for Messages clients and read a deployment's reasoning_summary in the keep check
Backport of #49076 to lts/1.108.x.
Ported from cadfe1d179 (cursor/chatgpt-encrypted-reasoning-messages-1723) onto the line's pass_through/adapters layout.
2026-11-07 04:08:08 -08:00
mateo-berri
d9011b1593 test(ollama): cover short and boundary-length repair warning previews
Backport of #49183 to lts/1.108.x.
Cherry-picked from 1f71ed377f (fix-ollama-chat-stream-tool-call-index).
Adapted to the line. The repair warning tests live in test_litellm_core_utils_prompt_templates_common_utils.py here.
2026-11-07 01:59:16 -08:00
mateo-berri
d6625245b4 fix(anthropic): send openai/ Messages turns again once without encrypted reasoning a backend rejects
The openai/ Responses path on /v1/messages had no retry, so a chatgpt/ block left in history answered 400 on every later openai/ turn. That path now sends the turn once more without encrypted reasoning, the same way the chat bridge does. The retry matches only invalid_encrypted_content or a "could not be verified" message naming the content, so the exception mapper's own hint no longer triggers it. The xAI web search keep path is backed out, since xAI sends no encrypted reasoning over the bridge.

Backport of 15e6017012 from #49076 to lts/1.108.x, ported by hand onto the pass_through modules.

Co-authored-by: DDT <141296842+Hugo-DDT@users.noreply.github.com>
2026-11-07 01:53:19 -08:00
mateo-berri
f86222be48 fix(anthropic): stream reasoning signatures only to Messages clients, keep xAI web search reasoning, and retry only when the sent request carried it 2026-11-06 23:23:15 -08:00
mateo-berri
2280aa224b fix(ollama): keep the repair warning's argument preview unless message logging is off
Backport of #49183 to lts/1.108.x.
Cherry-picked from 5ef6d62cca (fix-ollama-chat-stream-tool-call-index).
Adapted to the line. The repair warning lives in common_utils.py here.
2026-11-06 21:19:18 -08:00
mateo-berri
27574a429a fix(anthropic): keep each streamed reasoning summary with its own item
A summary delta carries no item index, so the next item's summary joined the block that already got its signature. A thinking chunk after an indexed signature now opens a new block.
2026-11-06 20:45:06 -08:00
yuneng-jiang
7e95523094
Merge pull request #50487 from BerriAI/backport_49984_lts_1108
Some checks failed
LiteLLM Rust / rust-lint (push) Waiting to run
LiteLLM Rust / rust-test (push) Waiting to run
LiteLLM Rust / rust-wheel (push) Waiting to run
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled
test(e2e): backport the e2e speedup and main's CI cleanups to lts/1.108.x
2026-11-06 19:44:32 -08:00
joshua-berri
03d9254dc2
Merge pull request #50484 from BerriAI/litellm_backport_mcp_sse_lts_1_108_x
fix(mcp): backport #47034 to lts/1.108.x
2026-11-06 19:41:16 -08:00
mateo-berri
ba5d7b83b9 fix(anthropic): start a new streamed block for each reasoning item
The backported Responses bridge tags each reasoning item's thinking block with its output index, but this line's Anthropic stream wrapper only opened a new block when the block type changed, so a second reasoning item of the same type was dropped. This ports the index check from #46863, which main already has.
2026-11-06 19:30:43 -08:00