Commit Graph
34117 Commits
Author SHA1 Message Date
Sameer KankuteandGitHub 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 JainandGitHub 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 KankuteandGitHub 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 KankuteandGitHub 24ec7f882f Revert "feat(togetherai): add support for togetherai/Qwen3.5-397B-A17B model" 2026-03-03 19:35:26 +05:30
Sameer KankuteandGitHub 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 KankuteandGitHub 9ffbd9e30e Merge pull request #22464 from Point72/ephrimstanley/batch-fixes-feb27
Managed batches fixes for vertex
2026-03-03 18:53:53 +05:30
Harshit28j d07689d2d7 bump: version 1.82.0 → 1.82.1 2026-03-03 11:59:58 +05:30
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
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
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-crabbeandGitHub 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
86d5b4c632 feat: add Nebius AI Studio models to model_prices_and_context_window.json (#22614)
Add 30 Nebius AI Studio models covering:
- Text-to-text: DeepSeek (R1, R1-0528, R1-Distill, V3, V3-0324), Meta Llama
  (3.1-8B/70B/405B, 3.3-70B), Qwen (3-235B/32B/30B/14B/4B, 2.5-72B/32B,
  2.5-Coder-7B, QwQ-32B), Mistral Nemo, NousResearch Hermes-3, NVIDIA
  Nemotron Ultra/Super, Google Gemma-3-27B, Llama-Guard-3
- Vision: Qwen2.5-VL-72B, Qwen2-VL-72B, Qwen2-VL-7B
- Embedding: BAAI/bge-en-icl, BAAI/bge-multilingual-gemma2, intfloat/e5-mistral-7b

Pricing sourced from https://nebius.com/prices-ai-studio (base flavor).
Context windows sourced from https://docs.nebius.com/studio/inference/models/

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
2026-03-02 18:43:07 -08:00
dfa2798169 Fix PR template: correct test directory path from tests/litellm/ to tests/test_litellm/ (#22612)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-03-02 17:49:53 -08:00
bfceb7fc3f feat(perplexity): add embedding support for pplx-embed-v1 models (#22610)
* feat: add Perplexity embedding support (pplx-embed-v1)

Add support for Perplexity AI's embedding models via the LLM HTTP handler:

Models:
- pplx-embed-v1-0.6b (1024 dims, 32K context, $0.004/1M tokens)
- pplx-embed-v1-4b (2560 dims, 32K context, $0.03/1M tokens)

Implementation:
- PerplexityEmbeddingConfig in litellm/llms/perplexity/embedding/
- Registered in ProviderConfigManager, __init__.py lazy imports, main.py dispatch
- Model pricing added to model_prices_and_context_window.json
- Supports dimensions and encoding_format parameters
- Uses base_llm_http_handler.embedding() pattern

Tests:
- 19 unit tests covering transformation, params, URLs, provider config, model info

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

* docs: add Perplexity AI embeddings documentation

- Create providers/perplexity_embedding.md with SDK and proxy usage examples
- Convert Perplexity from flat doc to category in sidebars.js
- Category includes existing chat/responses doc + new embeddings doc
- Covers pplx-embed-v1-0.6b and pplx-embed-v1-4b models
- Documents supported parameters (dimensions, encoding_format)
- Includes proxy config and curl examples

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

* fix: decode Perplexity base64_int8 embeddings to OpenAI-format float arrays

Perplexity returns embeddings as base64-encoded signed int8 values by default,
not float arrays like OpenAI. This commit adds decoding in
transform_embedding_response so the proxy returns standard OpenAI-compatible
float arrays (normalized to [-1, 1]).

- Added _decode_base64_embedding() static method
- Handles both base64 strings (decoded) and float lists (passthrough)
- Added 3 new tests for base64 decoding + passthrough

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
2026-03-02 17:37:50 -08:00
b8befb3403 Add CrowdStrike AIDR guardrail hook (#17876)
* Add CrowdStrike AIDR guardrail hook

* fixup! use apply_guardrail event hook

* fixup! update imports

* fix(guardrails): include AI response in CrowdStrike AIDR output events

Issue:
_build_guard_input_for_response() was:
- Sending only the original user input (messages).
- Not sending the AI provider response.

This fix will:
  - Extract response.choices from the ModelResponse object and include them in guard_input payload.
  - Thus, ensure AIDR output rules receive the AI-generated content for analysis.
  - Fix and update tests.

* fix(guardrails): prevent duplicate input events in CrowdStrike AIDR guardrail

Issue:
The CrowdStrike AIDR guardrail was running on during_call hooks wihtout event_hook configured.

This fix will:
- Set event_hook to ["pre_call", "post_call"] (AIDR admins will control what policy is applied)

This change will:
- Require default_on parameter
- Prevent duplicate API calls to AIDR for the same input
- Avoid unchecked AI provider API calls on during_call hook

* docs: add CrowdStrike AIDR to the list of Guardrails under Integrations

* docs: update CrowdStrike AIDR documentation page

---------

Co-authored-by: Konstantin Lapine <konstantin.lapine@crowdstrike.com>
2026-03-02 17:26:54 -08:00
Cesar GarciaandGitHub 2525d66dbe Merge pull request #22584 from BerriAI/litellm_oss_staging_02_27_2026
Litellm oss staging 02 27 2026
2026-03-02 19:05:02 -03:00
Cesar GarciaandGitHub e559d4dd11 Merge pull request #22582 from BerriAI/litellm_oss_staging_02_26_2026
Litellm oss staging 02 26 2026
2026-03-02 18:51:37 -03:00
Chesars 6292c3dbdf merge: resolve conflicts with upstream/main
- anthropic.md: keep claude-opus-4-6 alias and claude-sonnet-4-6 entry
- transformation.py: take upstream's formatted effort_map with fallback
2026-03-02 18:49:24 -03:00
Cesar GarciaandGitHub 835a2c3dc6 Merge pull request #22583 from Chesars/fix/add-bedrock-cache-token-pricing
fix(pricing): add missing cache token pricing for 24 Bedrock Claude models
2026-03-02 18:46:28 -03:00
Cesar GarciaandGitHub 680b9ee9f2 Merge pull request #22586 from Chesars/fix/update-gemini-deprecation-dates
fix: update Gemini model deprecation dates
2026-03-02 18:45:30 -03:00
Cesar GarciaandGitHub a54a1d27d7 Merge pull request #22596 from Chesars/fix/add-dashscope-models-pricing
fix: add missing pricing for dashscope/qwen3.5-plus and dashscope/qwen3-vl-plus
2026-03-02 18:45:08 -03:00
Cesar GarciaandGitHub 229eb5234d Merge pull request #22601 from Chesars/fix/update-mistral-models-pricing
feat: add missing Mistral models and update pricing
2026-03-02 18:44:38 -03:00
Chesars 884f7c5e4e fix: update mistral-small-latest to match Small 3.2 specs
mistral-small-latest now points to Small 3.2 (since June 2025).
Updated pricing from $0.10/$0.30 to $0.06/$0.18 per 1M tokens,
context from 32k to 131k, and added vision support to match
mistral-small-3-2-2506.
2026-03-02 18:36:05 -03:00
Chesars 87fe521f46 fix: remove unused OpenAIImageGenerationOptionalParams import
Fixes ruff F401 in check_code_and_doc_quality CI check.
2026-03-02 18:24:29 -03:00
Chesars abb7eb250a fix: remove retired Saba model from new entries
Saba was retired on 9/30/2025 per Mistral docs, replaced by Small 3.2.
2026-03-02 18:19:46 -03:00
Chesars bd822a7a68 fix: add supports_response_schema to Ministral 3 models
Ministral 3 (3B, 8B, 14B) support structured outputs per Mistral docs.
2026-03-02 18:19:02 -03:00
Shivam RawatandGitHub d5355602d5 added configurable env for mcp timeouts (#22287) 2026-03-02 13:13:41 -08:00
mubashir1osmaniandGitHub ea8d22753d docs: add fallback setup for virtual key with Loom video
docs: add fallback setup for virtual key with Loom video
2026-03-02 16:04:27 -05:00
mubashir1osmaniGitHubgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
e96c4fed39 Update docs/my-website/docs/tutorials/fallbacks.md
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-02 16:03:55 -05:00
Chesars 619f53d55a feat: add missing Mistral models and update outdated pricing
Add 9 new Mistral models (mistral-large-2512, mistral-medium-3-1-2508,
mistral-small-3-2-2506, ministral-3-3b/8b/14b-2512, saba-2502,
magistral-medium/small-1-2-2509) and update mistral-large-latest,
mistral-large-3, and mistral-medium-latest with correct pricing and
context windows.

Fixes #22585
2026-03-02 18:02:41 -03:00
mubashir1osmaniandClaude Opus 4.6 fac29f1963 docs: add fallback setup for virtual key with Loom video
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 15:57:36 -05:00
Chesars bfa611cb45 docs: clarify why is_model_gpt_5_search_model uses substring matching
supports_web_search in model info flags models that can use web search
as a tool, not search-only models with restricted params.
2026-03-02 17:41:20 -03:00
Chesars ec16bd3509 merge: resolve conflict with upstream/main in presidio.py
Take upstream's refactored PII handling with _unmask_pii_text and
_process_response_for_pii helpers. Add missing StreamingChoices import.
2026-03-02 17:40:22 -03:00
Chesars f0e571413d fix: add missing pricing for dashscope/qwen3.5-plus and dashscope/qwen3-vl-plus
Fixes #22591 - These models were missing from the pricing JSON, causing
$0 cost tracking when routed via the dashscope/* wildcard.

Pricing sourced from official Alibaba Cloud Model Studio docs (international tier).
2026-03-02 17:24:19 -03:00
Chesars 5495003e60 fix: add missing Dict/Optional imports in ChatGPT streaming_utils
Fixes NameError at runtime when ChatGPTToolCallNormalizer is
instantiated. The imports were missed when type hints were changed
from Python 3.10+ syntax (dict[], str | None) to typing module
syntax (Dict[], Optional[str]).
2026-03-02 17:19:40 -03:00
Cesar GarciaandGitHub 7ab46104e2 Merge pull request #22593 from BerriAI/revert-20516-fix/openrouter-native-model-double-strip
Revert "fix(adapter): double-stripping of model names with provider-matching prefixes"
2026-03-02 17:13:19 -03:00
Cesar GarciaandGitHub 0da565f023 Revert "fix(adapter): double-stripping of model names with provider-matching prefixes" 2026-03-02 17:12:48 -03:00
Cesar GarciaandGitHub 5d512f64fe Merge pull request #22320 from tombii/fix/openrouter-native-model-double-stripping
fix(openrouter): pattern-based fix for native model double-stripping
2026-03-02 17:01:48 -03:00
Chesars 09ef5e67e5 refactor: move native OpenRouter check to get_llm_provider before strip
The previous check in _get_openai_compatible_provider_info() ran after
the model name was already split, so it never caught the second
get_llm_provider() call from the anthropic_messages bridge.

Moved the check to get_llm_provider() before the provider-list
stripping, using a pattern-based approach (custom_llm_provider ==
"openrouter" and model.startswith("openrouter/")) instead of a
hardcoded set. This covers all current and future native OpenRouter
models.

Updated tests to verify the bridge double-call scenario with
custom_llm_provider passed through.
2026-03-02 16:55:34 -03:00
Chesars ee3475d187 fix: correct gemini/gemini-2.0-flash-lite-preview-02-05 deprecation_date
Update from 2025-12-02 to 2025-12-09 per
https://ai.google.dev/gemini-api/docs/deprecations
2026-03-02 15:54:24 -03:00
Chesars 53dc4ee7ef fix: revert gemini/gemini-2.0-flash-live-001 deprecation_date to 2025-12-09
The June 1 date is for Vertex AI, but this entry is for the Gemini API
where the shutdown date is December 9, 2025 per
https://ai.google.dev/gemini-api/docs/deprecations
2026-03-02 15:52:01 -03:00
Chesars ad1ab9e874 fix: add deprecation_date for gemini/gemini-3-pro-preview (Gemini API)
Gemini API shuts down gemini-3-pro-preview on 2026-03-09, per
https://ai.google.dev/gemini-api/docs/deprecations
2026-03-02 15:48:00 -03:00
Chesars 9c8620db00 fix: update Gemini model deprecation dates per Google notifications
- gemini-3-pro-preview: add deprecation_date 2026-03-26 (Vertex AI)
- gemini-2.0-flash / flash-001: update to 2026-06-01
- gemini-2.0-flash-lite / lite-001: update to 2026-06-01
- gemini/gemini-2.0-flash-live-001: update to 2026-06-01
- Also updated deepinfra, openrouter, vercel_ai_gateway variants
2026-03-02 15:40:40 -03:00
Chesars 5c4d3d85e5 fix(pricing): add missing cache token pricing for 24 Bedrock Claude models
Bedrock Claude models were missing cache_read_input_token_cost and
cache_creation_input_token_cost fields, causing cache tokens to be
billed at the full input rate instead of the discounted cache rate.

Added pricing using Bedrock's documented multipliers (0.1x for cache
read, 1.25x for cache write) consistent with all existing entries.
2026-03-02 15:02:21 -03:00
Sameer KankuteandGitHub 92407ec0d4 Merge pull request #22340 from BerriAI/litellm_oss_staging_02_28_2026
Litellm oss staging 02 28 2026
2026-03-02 19:48:03 +05:30
Sameer Kankute fc41f46f0f Fix vertex ai function calls 2026-03-02 19:43:24 +05:30
Sameer Kankute e40e913622 Fix vertex ai function calls 2026-03-02 19:42:18 +05:30
Sameer Kankute 7e2f2a8ffa Fix inflight mypy 2026-03-02 19:41:32 +05:30