Commit graph

34154 commits

Author SHA1 Message Date
Chesars
cd731811d9 feat(black_forest_labs): add native image edit support for Black Forest Labs
Add native integration for Black Forest Labs image editing models
(flux-kontext-pro, flux-kontext-max, flux-pro-1.0-fill, flux-pro-1.0-expand).

Changes:
- Add BlackForestLabsImageEditConfig for BFL API transformation
- Add BLACK_FOREST_LABS to LlmProviders enum
- Add use_multipart_form_data() to BaseImageEditConfig for JSON vs form-data
- Modify image_edit_handler to support JSON request bodies
- Add comprehensive unit tests

Closes #11401
2026-03-04 18:08:50 -03:00
github-actions[bot]
8665e92aa8
chore: regenerate poetry.lock to match pyproject.toml (#3)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-03 17:52:45 +00:00
Sameer Kankute
afc7b87b36
Merge pull request #22656 from BerriAI/litellm_add_vector_store_Ui
Add support for Attaching knowledge base to model via UI
2026-03-03 22:25:59 +05:30
Sameer Kankute
daa0397f30
Merge pull request #22674 from BerriAI/litellm_gemini-3.1-flash-lite-preview
Day 0 gemini 3.1 flash lite preview support
2026-03-03 22:23:17 +05:30
Sameer Kankute
9d06106af0 Fix gemini-3.1-flash-lite-preview for streaming 2026-03-03 22:22:57 +05:30
Sameer Kankute
c3fe4634b6 Add correct pricing for gemini 3.1 flash lite 2026-03-03 22:06:16 +05:30
Cesar Garcia
a0cc550f48
Merge pull request #22665 from Chesars/feat/add-zai-glm-5-model-pricing
feat(models): add zai/glm-5 and zai/glm-5-code to model cost map
2026-03-03 12:17:42 -03:00
Chesars
75518c3ca7 feat(models): add zai/glm-5 and zai/glm-5-code to model cost map
Add native ZhipuAI GLM-5 and GLM-5-Code model entries with pricing
from docs.z.ai/guides/overview/pricing.
2026-03-03 12:03:40 -03:00
Harshit28j
7d322e0d44 Merge branch 'main' of https://github.com/BerriAI/litellm into litellm_custm_auth 2026-03-03 20:24:44 +05:30
Cesar Garcia
dfd7203d7f
Merge pull request #22650 from Chesars/fix/add-missing-dashscope-glm5-pricing
fix(pricing): add 7 missing DashScope model pricing entries
2026-03-03 11:53:30 -03:00
Cesar Garcia
105a40ba4f
Merge pull request #22649 from Chesars/fix/add-missing-openrouter-model-pricing
fix(pricing): add 5 missing OpenRouter model pricing entries
2026-03-03 11:53:07 -03:00
Harshit28j
6d535e5639 fix(proxy): allow custom auth routes to bypass route authorization checks
Custom user-added routes (e.g. /ldap/ngs/ready) used with Depends(user_api_key_auth) were being rejected as admin-only after _run_post_custom_auth_checks was introduced in commit 14badde13c.

The route authorization check in common_checks is designed for LiteLLM's own management routes. Custom auth flows that add their own routes should be trusted since the custom auth function already validated the request. Budget and expiry checks still run.

Add skip_route_check parameter to common_checks() and pass skip_route_check=True from _run_post_custom_auth_checks() to skip route authorization while preserving budget/team/model checks.

Regression test added: test_common_checks_skip_route_check_for_custom_auth

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-03 20:20:47 +05:30
Sameer Kankute
c1b39a6425
Merge pull request #22651 from BerriAI/litellm_encrypted_content_affinity_2
Add support for encrypted content affinity
2026-03-03 19:43:47 +05:30
Sameer Kankute
a9ee8ff5d2
Merge pull request #22641 from BerriAI/litellm_remove_default_litellm_thinking
[Chore]Remove defualt hardcoded thinking levels for gemini 3 family
2026-03-03 19:42:40 +05:30
Sameer Kankute
bdfc602dbf
Merge pull request #22625 from BerriAI/litellm_azure_ai_finetune
Fix: Azure ai finetuning api
2026-03-03 19:42:17 +05:30
Harshit Jain
bb1da7091a
Merge pull request #22631 from Harshit28j/litellm_bump_litellm_08_03
bump: version 1.82.0 → 1.82.1
2026-03-03 19:35:56 +05:30
Sameer Kankute
88dd1b5801
Merge pull request #22657 from BerriAI/revert-22654-litellm_add_Qwen3.5-397B-A17B
Revert "feat(togetherai): add support for togetherai/Qwen3.5-397B-A17B model"
2026-03-03 19:35:39 +05:30
Sameer Kankute
24ec7f882f
Revert "feat(togetherai): add support for togetherai/Qwen3.5-397B-A17B model" 2026-03-03 19:35:26 +05:30
Sameer Kankute
6c0387d170 Add support for Attaching knowledge base to model via UI 2026-03-03 19:31:55 +05:30
Sameer Kankute
974c02fae4
Merge pull request #22654 from Varad2001/litellm_add_Qwen3.5-397B-A17B
feat(togetherai): add support for togetherai/Qwen3.5-397B-A17B model
2026-03-03 19:19:41 +05:30
Varad Khonde
d66f8bc15d feat(togetherai): add support for togetherai/Qwen3.5-397B-A17B model 2026-03-03 19:17:28 +05:30
Sameer Kankute
9ffbd9e30e
Merge pull request #22464 from Point72/ephrimstanley/batch-fixes-feb27
Managed batches fixes for vertex
2026-03-03 18:53:53 +05:30
Sameer Kankute
2f6279d189 Fix import issue 2026-03-03 18:41:15 +05:30
Sameer Kankute
ca597e18c8 Fix routing of encrypted content 2026-03-03 18:37:28 +05:30
Sameer Kankute
521f804350 Fix encrypted content streaming affinity issue 2026-03-03 18:37:22 +05:30
Sameer Kankute
2bc4da76ce Update the tests 2026-03-03 18:36:07 +05:30
Sameer Kankute
37834f1d2a Update the docs 2026-03-03 18:36:07 +05:30
Sameer Kankute
7928d41e9a Update the routing 2026-03-03 18:36:07 +05:30
Sameer Kankute
122f534d87 Add encoding method for Encrypted-content-aware deployment 2026-03-03 18:36:07 +05:30
Sameer Kankute
adec115db8 Fix logging for error 2026-03-03 18:36:07 +05:30
Sameer Kankute
18bf3f2df6 Fix mock github test 2026-03-03 18:36:07 +05:30
Sameer Kankute
a88a17796b Fix logging and encrypted content extraction 2026-03-03 18:36:07 +05:30
Sameer Kankute
37612bdf56 ADd incident report 2026-03-03 18:36:07 +05:30
Sameer Kankute
fbec5c5ccf Add docs for encrypted_content_affinity 2026-03-03 18:36:07 +05:30
Sameer Kankute
9f627c67d8 Add tests for encrypted_content_affinity 2026-03-03 18:36:07 +05:30
Sameer Kankute
394c49d303 Add tests for encrypted_content_affinity 2026-03-03 18:36:07 +05:30
Sameer Kankute
92b2556282 Add encrypted_content_affinity in router 2026-03-03 18:34:46 +05:30
Sameer Kankute
058fac848e Add Encrypted-content-aware deployment affinity for the Router 2026-03-03 18:34:46 +05:30
Chesars
7977126181 fix(pricing): add 7 missing DashScope model pricing entries
Fixes #22646

Adds pricing for DashScope models that were missing from the cost map,
causing $0 spend tracking in the proxy dashboard:

- dashscope/qwen3-max-2026-01-23 (tiered, same as qwen3-max)
- dashscope/qwen3-next-80b-a3b-instruct ($0.15/$1.20 per 1M)
- dashscope/qwen3-next-80b-a3b-thinking ($0.15/$1.20 per 1M)
- dashscope/qwen3-vl-235b-a22b-instruct ($0.40/$1.60 per 1M)
- dashscope/qwen3-vl-235b-a22b-thinking ($0.40/$4.00 per 1M)
- dashscope/qwen3-vl-32b-instruct ($0.16/$0.64 per 1M)
- dashscope/qwen3-vl-32b-thinking ($0.16/$2.87 per 1M)
2026-03-03 09:52:17 -03:00
Chesars
409208771e fix(pricing): add 5 missing OpenRouter model pricing entries
Fixes #22609

Adds pricing for OpenRouter models that were routing correctly but
returning $0 for spend tracking due to missing cost map entries:

- openrouter/anthropic/claude-sonnet-4.6 ($3.00/$15.00 per 1M tokens)
- openrouter/google/gemini-3.1-pro-preview ($2.00/$12.00 per 1M tokens)
- openrouter/openai/gpt-5.1-codex-max ($1.25/$10.00 per 1M tokens)
- openrouter/qwen/qwen3-coder-plus ($1.00/$5.00 per 1M tokens)
- openrouter/z-ai/glm-5 ($0.80/$2.56 per 1M tokens)
2026-03-03 09:24:49 -03:00
Sameer Kankute
deb8fea6b1 Add blog post for gemini-3.1-flash-lite-preview 2026-03-03 15:19:16 +05:30
Sameer Kankute
851be58775 Add day 0 support of gemini-3.1-flash-lite-preview 2026-03-03 15:07:47 +05:30
Sameer Kankute
213423cb45 Fix test case 2026-03-03 15:05:20 +05:30
Sameer Kankute
f8034f15ad Remove defualt hardcoded thinking levels for gemini 3 family 2026-03-03 14:51:12 +05:30
Harshit28j
d07689d2d7 bump: version 1.82.0 → 1.82.1 2026-03-03 11:59:58 +05:30
Krish Dholakia
67f90254ed
feat(guardrails): team-based guardrail registration and approval workflow (#22459)
* feat(guardrails): team-based guardrail registration and approval workflow

Add team-based guardrail submission system where teams can register
Generic Guardrail API guardrails for admin review. Includes:

- POST /guardrails/register endpoint for team-scoped submissions
- Admin review endpoints (list/get/approve/reject submissions)
- Team Guardrails tab in the UI dashboard
- extra_headers support for forwarding client headers to guardrail APIs
- Prisma schema migration for status, submitted_at, reviewed_at fields
- Documentation for team-based guardrails and static/dynamic headers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(guardrails): address review feedback - SSRF, silent failure, redundant query

- Validate api_base URL scheme (http/https only) and hostname in
  register_guardrail to prevent SSRF via team submissions
- Return warning field in approve response when in-memory initialization
  fails so admins know the guardrail won't work until next sync cycle
- Eliminate redundant DB query in list_guardrail_submissions by fetching
  all team guardrails once and deriving both filtered list and summary
  counts from the single result set

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(guardrails): add pending_review status guard to reject endpoint

Prevent rejecting already-active or already-rejected guardrails, which
would create a DB/memory inconsistency (active in memory but rejected
in DB). Now mirrors the approve endpoint's status check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 22:06:49 -08:00
Shivaang
213799282b
fix(openrouter): register OpenRouter as native Responses API provider (#22355)
OpenRouter supports the Responses API at /api/v1/responses with
encrypted_content for multi-turn stateless reasoning workflows.
Without native registration, requests fall through to the chat
completion bridge, which uses a different format (reasoning_details)
and drops encrypted_content entirely.

This adds OpenRouterResponsesAPIConfig to route requests directly to
OpenRouter's Responses API endpoint, preserving encrypted_content.

Fixes https://github.com/BerriAI/litellm/issues/22189

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
2026-03-02 22:02:59 -08:00
Jaeyeon Kim(김재연)
6bcba46dda
fix: set mock status_code in JWT OIDC discovery tests (#22361)
The _resolve_jwks_url method checks response.status_code != 200, but
MagicMock returns a MagicMock object for status_code which is always
truthy (!= 200). Explicitly set mock_response.status_code = 200 so the
tests exercise the intended code path.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 21:57:54 -08:00
ryan-crabbe
5b0238736c
Add incident report: cache eviction closes in-use httpx clients (#22309) 2026-03-02 21:49:48 -08:00
Sameer Kankute
18216ac07c Fix: Azure ai finetuning api 2026-03-03 10:48:00 +05:30