Commit graph

36905 commits

Author SHA1 Message Date
Ishaan Jaffer
5abd5851e5
fix(streaming): extend role-only chunk preservation to azure_ai provider 2026-04-13 18:18:43 -07:00
Ishaan Jaffer
63eb58a82b
fix(test/audio): skip empty-choices chunks in streaming response check
OpenAI streaming with include_usage=True emits a final usage chunk
with choices=[]. check_streaming_response() assumed every chunk has
at least one choice and crashed with IndexError on chunk.choices[0].

Add an early-continue guard to skip usage-only chunks.
2026-04-13 16:59:32 -07:00
Ishaan Jaffer
9640dd5765
fix(streaming): scope role-only chunk preservation to Azure only
The Azure streaming fix (PR #25638) made is_chunk_non_empty() treat
any first chunk with role!=None as non-empty, for all providers. This
broke OpenAI/Mistral tests where the role-only first chunk was expected
to be filtered, and test idx==0 assumed the first emitted chunk had
actual content (tool_calls, logprobs, etc.).

Restrict the condition to Azure, which is the provider that actually
needs it: Azure sends prompt_filter_results before the first content
chunk, which consumes sent_first_chunk and strips role from the real
first chunk. Other providers should retain the original behavior.
2026-04-13 16:59:27 -07:00
Ishaan Jaffer
bd5740a367
fix(streaming): skip role-only first chunk when logprobs.content is empty
When logprobs are requested, OpenAI's first streaming chunk has
role='assistant' and logprobs=ChoiceLogprobs(content=[]). The Azure
streaming fix (PR #25638) made is_chunk_non_empty() treat any first
chunk with a non-None role as non-empty, which caused this role-only
chunk to be emitted. Callers checking 'logprobs in chunk.choices[0]'
then crashed on logprobs.content[0] (IndexError: list index out of range).

Guard the role condition: don't emit the first chunk as non-empty when
logprobs is present but has no content entries. Azure's use case (no
logprobs, empty choices[]) is unaffected.
2026-04-13 16:42:15 -07:00
Ishaan Jaffer
473f5dc4ba
fix(mypy): type-safe dict conversion for codex_parameters in transformation.py 2026-04-13 14:59:34 -07:00
Ishaan Jaffer
702f09c186
style: black format user_api_key_auth.py 2026-04-13 14:59:34 -07:00
Ishaan Jaffer
be36e5f3e3
style: black format proxy/_types.py 2026-04-13 14:59:34 -07:00
Ishaan Jaffer
165b1add61
style: black format main.py 2026-04-13 14:59:34 -07:00
Ishaan Jaffer
30a548e216
style: black format streaming_handler.py 2026-04-13 14:59:34 -07:00
Ishaan Jaffer
c351c691c3
style: black format streaming_chunk_builder_utils.py 2026-04-13 14:59:34 -07:00
Ishaan Jaffer
c2ef164396
docs: add MCP_UV_CACHE_DIR to environment variables reference 2026-04-13 14:34:09 -07:00
ishaan-berri
c01c36acab
Merge pull request #25570 from BerriAI/litellm_jwt_mapping
fix(jwt): implement unregistered_jwt_client_behavior for JWT→virtual key mapping
2026-04-13 14:25:42 -07:00
ishaan-berri
20ab731870
Merge pull request #25600 from mubashir1osmani/fix-uvx-mcp
fix: add cache dir uvx stdio mcp servers
2026-04-13 14:23:02 -07:00
ishaan-berri
aa4d41ad2d
Merge pull request #25644 from michelligabriele/fix/retry-policy-internal-server-error
fix(router): honor RetryPolicy.InternalServerErrorRetries in dispatcher
2026-04-13 13:22:46 -07:00
michelligabriele
9edc10a543
fix(router): lazy-import InternalServerError to break cyclic import 2026-04-13 19:47:30 +02:00
michelligabriele
597cd0000d
fix(router): honor RetryPolicy.InternalServerErrorRetries in dispatcher 2026-04-13 19:31:58 +02:00
ishaan-berri
e398b52f11
Merge pull request #25638 from BerriAI/fix/azure-streaming-role-assistant
fix: preserve role='assistant' in Azure streaming with include_usage
2026-04-13 10:08:08 -07:00
Krrish Dholakia
d319cd8cc6
fix: blog dark mode - text invisible on dark background (#25620)
The blog CSS selectors for dark mode used descendant selectors like
[data-theme='dark'] .blog-wrapper which never matched because both
data-theme and .blog-wrapper are applied to the same <html> element
by Docusaurus. Fixed by using compound selectors (no space):
[data-theme='dark'].blog-wrapper.

Also added missing dark-mode overrides for:
- pre/code blocks in blog posts
- link colors in blog posts
- marquee items, separators, and labels on blog list page
- pagination links on blog list page
- meta text and author separators on blog list page

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
2026-04-13 09:08:57 -07:00
Chesars
3794fd25cf
fix: preserve role='assistant' in Azure streaming with include_usage
When Azure sends stream_options.include_usage=True, it emits an initial
chunk with choices=[] (prompt_filter_results) before the first content
chunk. Previously, LiteLLM inflated this empty-choices chunk with a
default StreamingChoices, which consumed the sent_first_chunk flag and
caused strip_role_from_delta to strip role from the real first chunk.
Additionally, the first real chunk with role='assistant' and content=''
was discarded by is_chunk_non_empty as "empty".

This fix:
- Forwards chunks with choices=[] faithfully (no inflated default)
- Only marks sent_first_chunk for chunks with real choices
- Treats chunks with role in delta as non-empty
- Guards choices[0] access in __next__/__anext__ and stream_chunk_builder

Fixes #24221
2026-04-13 09:00:33 -07:00
ishaan-berri
0df1b9dd26
Merge pull request #25618 from eric-liu-nvidia/nvidia/eliu/fix_litellm_translation_layer
fix: codex and /v1/responses support issue
2026-04-13 08:15:09 -07:00
michelligabriele
0eae9f101e
fix(auth): gate post-custom-auth DB lookups behind opt-in flag (#25634) 2026-04-13 08:02:16 -07:00
Eric Liu
fa8a2faeb2 fix: codex and /v1/responses support issue 2026-04-13 03:46:52 +00:00
Sameer Kankute
5e80e075c7
Merge pull request #25397 from BerriAI/litellm_oss_staging_04_08_2026
Litellm oss staging 04 08 2026
2026-04-13 09:12:40 +05:30
Sameer Kankute
fa605d85c0
Merge pull request #25616 from BerriAI/main
merge main
2026-04-13 08:43:43 +05:30
mubashir1osmani
79f4d899d4
fix uvx mcp servers 2026-04-12 08:52:29 -04:00
yuneng-jiang
5544803b35
Merge pull request #25406 from BerriAI/litellm_regen_key_modal_antd
Some checks are pending
CodeQL / Analyze (actions) (push) Waiting to run
CodeQL / Analyze (javascript-typescript) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
CodSpeed Benchmarks / benchmarks (push) Waiting to run
Helm unit test / unit-test (push) Waiting to run
Read Version from pyproject.toml / read-version (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Unit Tests: Proxy DB Operations / proxy-db (auth-checks, tests/proxy_unit_tests/test_auth_checks.py tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Waiting to run
Unit Tests: Proxy DB Operations / proxy-db (key-generation, tests/proxy_unit_tests/test_key_generate_prisma.py, 30, 0) (push) Waiting to run
Unit Tests: Proxy DB Operations / proxy-db (remaining, tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Waiting to run
Unit Tests: Security / security (push) Waiting to run
GitHub Actions Security Analysis / zizmor (push) Waiting to run
[Refactor] UI - Virtual Keys: migrate regenerate key modal to AntD
2026-04-11 21:27:09 -07:00
Yuneng Jiang
1857be43a7
Merge remote-tracking branch 'origin/main' into litellm_regen_key_modal_antd 2026-04-11 20:45:17 -07:00
ishaan-berri
fdd7500904
blog: add back arrow to blog post pages (#25587)
* blog: add back arrow to post pages

* blog: style back arrow — fixed top-left below navbar
2026-04-11 19:15:45 -07:00
ishaan-berri
1edf41c26f
Merge pull request #25585 from BerriAI/litellm_dev_04_11_2026_p1
Litellm dev 04 11 2026 p1
2026-04-11 18:46:57 -07:00
Krrish Dholakia
973986aac2 docs: readme tweak 2026-04-11 18:34:23 -07:00
ishaan-berri
12c1467228
Merge pull request #25583 from BerriAI/blog/ramp-style-restyle-with-redis-post
blog: Ramp-style engineering blog restyle + Redis circuit breaker post
2026-04-11 18:31:34 -07:00
Ishaan Jaffer
35f4b47ff8
apply content guidelines: scale/resilience narrative, FAQ, Key Takeaways, Conclusion CTA 2026-04-11 18:12:32 -07:00
ishaan-berri
f74d626253
Merge pull request #25580 from BerriAI/blog/ramp-style-restyle-with-redis-post
blog: restyle docs.litellm.ai/blog to engineering blog aesthetic
2026-04-11 18:10:57 -07:00
Ishaan Jaffer
14eed24471
add redis circuit breaker blog post with React diagrams 2026-04-11 18:02:59 -07:00
Ishaan Jaffer
8e616ecdf4
add BlogPostPage swizzle: hide sidebar, add hiring CTA on every post 2026-04-11 18:02:56 -07:00
Ishaan Jaffer
dac44fb443
blog list styles: clean typography, marquee animation, hero layout 2026-04-11 18:02:52 -07:00
Ishaan Jaffer
85cb7db8b9
blog list page: Ramp-style flat list with hero, provider marquee, hiring CTA 2026-04-11 18:02:48 -07:00
Ishaan Jaffer
05d516482f
restyle blog list page to match engineering blog aesthetic 2026-04-11 18:02:44 -07:00
Yuneng Jiang
7c6bd98fdf
fix: address PR review comments on RegenerateKeyModal
- Remove redundant useEffect cleanup that duplicated handleClose logic
- Remove unnecessary currentAccessToken state, use accessToken from hook directly
2026-04-11 18:01:02 -07:00
Krrish Dholakia
e08e3bf748 docs: clarify how to get benchmarking script 2026-04-11 17:31:03 -07:00
Krrish Dholakia
12bca649fc docs: refactor benchmarking docs to be clearer 2026-04-11 17:30:09 -07:00
yuneng-jiang
2c786ca2e6
Merge pull request #25578 from BerriAI/yj_apr11_bump
Some checks are pending
CodeQL / Analyze (actions) (push) Waiting to run
CodeQL / Analyze (javascript-typescript) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
CodSpeed Benchmarks / benchmarks (push) Waiting to run
Helm unit test / unit-test (push) Waiting to run
Read Version from pyproject.toml / read-version (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Unit Tests: Proxy DB Operations / proxy-db (auth-checks, tests/proxy_unit_tests/test_auth_checks.py tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Waiting to run
Unit Tests: Proxy DB Operations / proxy-db (key-generation, tests/proxy_unit_tests/test_key_generate_prisma.py, 30, 0) (push) Waiting to run
Unit Tests: Proxy DB Operations / proxy-db (remaining, tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Waiting to run
Unit Tests: Security / security (push) Waiting to run
GitHub Actions Security Analysis / zizmor (push) Waiting to run
bump: version 1.83.6 → 1.83.7
2026-04-11 17:09:31 -07:00
Yuneng Jiang
e162c6d502
bump: version 1.83.6 → 1.83.7 2026-04-11 17:00:33 -07:00
yuneng-jiang
d7823e3a09
Merge pull request #25577 from BerriAI/yj_apr11_build_3
[Infra] Rebuild UI
2026-04-11 16:04:12 -07:00
Yuneng Jiang
a89ad3aaff
chore: update Next.js build artifacts (2026-04-11 22:57 UTC, node v22.16.0) 2026-04-11 15:57:01 -07:00
yuneng-jiang
99cb3af1a6
Merge pull request #25562 from BerriAI/litellm_internal_staging_04_11_2026
Litellm internal staging 04 11 2026
2026-04-11 15:55:29 -07:00
Yuneng Jiang
c40e459447
fix linting 2026-04-11 15:44:15 -07:00
Yuneng Jiang
909247785e
Merge remote-tracking branch 'origin' into litellm_internal_staging_04_11_2026 2026-04-11 15:41:03 -07:00
yuneng-jiang
9a43e32d6e
Merge pull request #25464 from BerriAI/litellm_passthrough_contenttype
fix(proxy): pass-through multipart uploads and Bedrock JSON body
2026-04-11 15:40:16 -07:00
shivam
3742b0cee1
refactor: define pass-through custom body state key in types module
Avoid module-level cyclic import between llm_passthrough_endpoints and
pass_through_endpoints; CodeQL and partial init order no longer risk
undefined LITELLM_PASS_THROUGH_CUSTOM_BODY_STATE_KEY.

Made-with: Cursor
2026-04-11 15:26:44 -07:00