Commit Graph
28804 Commits
Author SHA1 Message Date
AlexsanderHamir 41b67b577b Fix: simplify PR template 2025-12-15 07:44:47 -08:00
Alexsander HamirandGitHub debf3598f8 Add: CI/CD rules to default PR template for LiteLLM team. (#17985) 2025-12-15 07:41:17 -08:00
Alexsander HamirandGitHub d743cde041 add: litellm team PR template (#17983) 2025-12-15 07:21:33 -08:00
Sameer KankuteandGitHub 57bf6f74e8 Merge pull request #17844 from SamAcctX/patch-2
OpenRouter GPT 5.2, Mistral 3, and Devstral 2
2025-12-15 18:32:50 +05:30
Krish DholakiaandGitHub 26fd6d5362 Guardrails API - support LLM tool call response checks on /chat/completions, /v1/responses, /v1/messages on regular + streaming calls (#17619)
* fix(unified_guardrails.py): send all chunks on completion of final stream

* feat(generic_guardrail_api.py): handle tool call response on streaming LLM responses

* fix(anthropic/chat/guardrail_translation): initial commit adding anthropic tool response streaming guardrails

enables guardrail checks on tool response from llm's to work via `/v1/messages`

* feat(anthropic/): working guardrail checks on tool response from LLMs

ensures guardrail checks on anthropic /v1/messages works as expected

* feat(responses/guardrail_translation): support tool call response guardrails on streaming for /v1/responses

ensures complete coverage of tool call responses

* refactor(openai.py): refactor to use consistent pydantic model for responses api tool response on streaming

enables non-openai model tool call response to work correctly with guardrail checks on /v1/responses

* test: update tests

* fix: fix linting error

* fix: fix failing tests

* fix: fix import errors

* fix(openai/chat/guardrail_transformation): fix final chunk returned on streaming
2025-12-15 18:19:52 +05:30
SamAcctXandGitHub 6879924965 chore: GPT 5.2, Devstral 2, Mistral 3 backup json 2025-12-15 05:54:29 -06:00
Krish DholakiaandGitHub a3f5a94784 fix(openai/responses/guardrail_translation): fix basemodel import (#17977)
* fix(openai/responses/guardrail_translation): fix basemodel import

ensures /v1/responses output is correctly processed by guardrail handler

* fix: fix linting error

* fix: fix linting errors
2025-12-15 16:13:45 +05:30
Cesar GarciaandGitHub 6ddc7875ea Fix: add OpenAI-compatible API for Anthropic with modify_params=True (#17106)
* docs: add OpenAI-compatible API limitations for Anthropic thinking

Document the fundamental incompatibility between Anthropic extended
thinking and OpenAI-compatible API clients. Explains:

- Why thinking_blocks must be resent (stateless vs stateful APIs)
- OpenAI vs Anthropic architecture differences
- Solutions for client developers

* Update docs

* fix: auto-drop thinking param when thinking_blocks missing

When modify_params=True, LiteLLM now automatically drops the 'thinking'
param if the last assistant message with tool_calls is missing
thinking_blocks. This prevents the Anthropic error:
"Expected thinking or redacted_thinking, but found tool_use"

This workaround addresses the OpenAI-Anthropic API incompatibility where
OpenAI-compatible clients don't preserve thinking_blocks.
2025-12-15 13:35:46 +05:30
YutaSaitoandGitHub bba229f922 Merge pull request #17963 from BerriAI/litellm_feat_rest-mcp-list-tools-auth-header
add MCP auth header propagation
2025-12-15 08:20:50 +09:00
Yuta Saito 73e00c1382 fix: add MCP auth header propagation 2025-12-15 07:45:35 +09:00
Ishaan Jaffer 87ba4fabd7 docs fix 2025-12-14 14:20:47 -08:00
Ishaan Jaffer 2b434ac744 docs azure ai agents 2025-12-14 14:19:49 -08:00
Ishaan Jaffer d65d97d609 fix: a2a gateway - azure foundry invoke 2025-12-14 14:06:35 -08:00
Ishaan Jaffer 71ab4a3108 docs 2025-12-14 14:06:16 -08:00
Ishaan Jaffer 493e4b3315 docs 2025-12-14 13:00:56 -08:00
Ishaan Jaffer cf1eb0a594 docs vllm 2025-12-14 12:36:07 -08:00
Ishaan Jaffer 3cac6b0a40 vllm batch 2025-12-14 12:36:07 -08:00
Ishaan Jaffer c79e0c165f add vllm batches 2025-12-14 12:36:07 -08:00
Emerson GomesandGitHub d8fc5c3a37 Add Azure Cohere 4 reranking models (#17961) 2025-12-14 12:34:46 -08:00
Ishaan Jaffer 869368ea31 docs fix 2025-12-14 11:52:08 -08:00
Ishaan Jaffer 338dbaa6bc docs a2a gateway 2025-12-14 11:51:35 -08:00
Ishaan Jaffer 11187024b3 fix title 2025-12-14 11:44:42 -08:00
dongbin-lunarkandGitHub 0be6dd57c3 fix: pass credentials to PredictionServiceClient for Vertex AI custom endpoints (#17757)
When calling Vertex AI Model Garden custom endpoints with service account
credentials (instead of ADC), the credentials were not passed to the
PredictionServiceClient, resulting in "default credentials not found" error.

- Move credential loading before cache check to ensure availability
- Pass credentials to sync/async PredictionServiceClient
- Add vertex_credentials param to async_completion and async_streaming

Closes #8597
2025-12-14 08:41:43 +05:30
Cesar GarciaandGitHub c892c2c83d fix(anthropic): use dynamic max_tokens based on model (#17900)
* fix(anthropic): use dynamic max_tokens based on model

When users don't specify max_tokens in requests to Anthropic models,
LiteLLM now uses the correct max_output_tokens value from the model
pricing JSON instead of a hardcoded 4096.

This fixes truncated responses for Claude 3.5+ models which support
higher output limits (8192 for Claude 3.5, 128k for Claude 3.7, etc.)

Fixes #8835

* fix(anthropic): restore env var support for backwards compatibility

Keep DEFAULT_ANTHROPIC_CHAT_MAX_TOKENS as fallback when model is not
found in JSON, allowing users to configure via environment variable.
2025-12-14 08:31:27 +05:30
Cesar GarciaandGitHub bd1a075a89 feat(stability): add Stability AI image generation support (#17894)
Add direct Stability AI REST API support for image generation endpoints.
This enables using Stability's SD3, SD3.5, and Stable Image models via
LiteLLM's OpenAI-compatible interface.

Changes:
- Add STABILITY provider to LlmProviders enum
- Create StabilityImageGenerationConfig with multipart/form-data support
- Add OpenAI size to Stability aspect_ratio mapping
- Register provider in ProviderConfigManager
- Add 9 Stability models to model_prices_and_context_window.json
- Add documentation at docs/providers/stability.md
- Add 25 unit tests

Supported models:
- stability/sd3, sd3-large, sd3-large-turbo, sd3-medium
- stability/sd3.5-large, sd3.5-large-turbo, sd3.5-medium
- stability/stable-image-ultra, stable-image-core
2025-12-14 08:29:45 +05:30
Cesar GarciaandGitHub 5262896d62 fix(perplexity): use API-provided cost instead of manual calculation (#17887)
Fixes #15337

Perplexity API returns pre-calculated costs in `usage.cost.total_cost`
that include the `request_cost` (fixed per-request fee). LiteLLM was
ignoring this and calculating costs manually, resulting in ~27x
underreporting (e.g., $0.0002 vs actual $0.006).

Changes:
- Use `usage.cost.total_cost` from Perplexity response when available
- Fall back to manual calculation if cost object not present
- Add tests for both behaviors
2025-12-14 08:24:44 +05:30
Kerem TurgutluandGitHub 1da0bdd33d fix gemini web search requests count (#17921)
* fix gemini web search requests count

* filter queries
2025-12-14 08:18:26 +05:30
Ishaan Jaffer 88d5efb2b7 docs v1.80.10.rc.1 2025-12-13 18:02:06 -08:00
Ishaan Jaffer bd0ae49c74 ui new build v1.80.10.rc.1 v1.80.10-nightly 2025-12-13 17:28:04 -08:00
Ishaan Jaffer efa9f69991 TestRunwaymlImageGeneration 2025-12-13 17:21:20 -08:00
Ishaan JaffandGitHub 2641f58be5 Litellm 1 80 10 (#17945)
* update providers

* v0

* docs fix

* docs fix

* docs fix
2025-12-13 17:19:58 -08:00
Ishaan Jaffer accebc49a2 TestNvidiaNim 2025-12-13 16:38:11 -08:00
Ishaan Jaffer f6c4ad92e4 async def test_update_team_guardrails_with_org_id(): 2025-12-13 16:24:58 -08:00
Ishaan Jaffer 95e818fdc4 bump litellm-proxy-extras 2025-12-13 16:22:26 -08:00
Ishaan Jaffer d9794f0811 fix bedrock embeddings - validate env 2025-12-13 16:16:30 -08:00
Ishaan Jaffer 92b72fc759 test_runwayml_tts_async 2025-12-13 16:10:48 -08:00
Ishaan Jaffer 2fd8621b38 test recraft 2025-12-13 16:10:34 -08:00
Ishaan Jaffer 050264f7d7 test_recraft_image_edit_api 2025-12-13 16:09:52 -08:00
Ishaan JaffandGitHub 14eed8aff7 [Fixes] A2a Gateway - ensure azure foundry agents work (#17943)
* add agents  v2 fixes azure

* fix auth

* get_azure_ad_token fix

* docs foundry
2025-12-13 16:08:03 -08:00
yuneng-jiangandGitHub 232bb33fec Merge pull request #17942 from BerriAI/litellm_ui_notification
[Feature] Show progress and pause on hover for Notifications
2025-12-13 15:37:55 -08:00
yuneng-jiangandGitHub 6567e43560 Merge pull request #17940 from BerriAI/litellm_ui_mcp_headers
[Fix] Add extra_headers and allowed_tools to UpdateMCPServerRequest
2025-12-13 15:20:55 -08:00
yuneng-jiang db7454c6ee Show progress and pause on hover for notifications 2025-12-13 15:16:13 -08:00
Alexsander HamirandGitHub 6635325629 fix: filter internal params in fallback code and fix test issues (#17941)
- Filter skip_mcp_handler and other internal params in fallback_utils.py before calling acompletion
  Fixes issue where internal parameters were being passed to provider APIs causing errors
- Remove deployment field from GCS bucket logger test metadata
  Fixes model name mismatch where deployment field was overriding the model in logging
- Update Bedrock Titan test to use non-deprecated model (titan-text-express-v1)
  Fixes test failure due to deprecated amazon.titan-text-lite-v1 model
2025-12-13 15:05:26 -08:00
Ishaan JaffandGitHub ed356fdfc0 [Docs] Cursor Integration (#17939)
* docs cursor

* remove bloat

* stash changes

* docs fix

* simpler docs

* docs

* docs cursor

* add cursor/chat/completions
2025-12-13 14:44:40 -08:00
yuneng-jiang 61767779f8 Adding tests 2025-12-13 14:44:26 -08:00
yuneng-jiang 5ee2338f9e Adding extra_headers and allowed_tools in UpdateMCPServerRequest 2025-12-13 14:36:37 -08:00
Alexsander HamirandGitHub fab1b81b7f fix: add agent_id field to GCS PubSub spend_logs_payload.json test expectation (#17938)
- Add agent_id: null to expected JSON to match actual payload structure
- Fixes test_async_gcs_pub_sub_v1 test failure
- agent_id is an optional field in SpendLogsPayload that is always included (as null when not provided)
2025-12-13 13:35:20 -08:00
yuneng-jiangandGitHub b681729e0c Merge pull request #17937 from BerriAI/litellm_a2a_doc_fix
[Docs] Add Import Image to A2A Docs
2025-12-13 13:30:06 -08:00
yuneng-jiang 8b0dd58a64 Importing Image in A2A Doc 2025-12-13 13:29:01 -08:00
Alexsander HamirandGitHub 425b8400b0 fix: add storage_backend and storage_url columns to schema.prisma files (#17936)
- Updated litellm/proxy/schema.prisma to include storage_backend and storage_url columns
- Updated litellm-proxy-extras/litellm_proxy_extras/schema.prisma to include storage_backend and storage_url columns
- Fixes database schema mismatch causing 'storage_backend column does not exist' errors
- Keeps all schema files in sync with root schema.prisma
2025-12-13 13:28:34 -08:00