Commit graph

29199 commits

Author SHA1 Message Date
Jason Roberts
6fc39d31b4
feat(guardrails): add configurable fail-open, timeout, and app_user to PANW Prisma AIRS guardrail (#17785)
Add configurable fail-open/fail-closed behavior, timeout settings, and app_user
metadata tracking. Includes security hardening, enhanced
observability (:unscanned header), and comprehensive test coverage (44/44 passing).

No breaking changes.
2025-12-11 15:23:59 -08:00
Ishaan Jaff
cca21c0926
[Feat] New API Provider - Add Azure AI Foundry Agents on /chat/completions, /responses, /messages + Agent Gateway (#17845)
* init get_azure_ai_route

* init AzureAIAgentsConfig

* init AzureAIAgentsConfig

* AzureAIAgentsHandler

* test_azure_ai_agents_acompletion_non_streaming

* test_azure_ai_agents_acompletion_streaming

* fix stream

* _process_sse_stream

* Azure AI Foundry Agents

* init  Azure AI Foundry Agent

* fix code QA checks

* fix api key

* docs fix
2025-12-11 15:21:28 -08:00
Ishaan Jaff
8041e373d6
[Bug Fix] Watsonx Audio Transcription - ensure only correct params are sent to API (#17840)
* fix transform

* test_watsonx_transcription_only_user_params_sent
2025-12-11 15:21:09 -08:00
yuneng-jiang
cb9bae1aba
Merge pull request #16764 from BerriAI/litellm_tag_spend_dedupe
[Fix] Deduplicate /tag/daily/activity metadata
2025-12-11 15:20:16 -08:00
Dominic Fallows
756c60540e
feat: add support for configurable confidence score thresholds and scope in Presidio PII masking (#17817)
* feat: add support for configurable confidence score thresholds in Presidio PII masking

* feat: enhance Presidio PII masking with configurable score thresholds and behavior documentation

* feat: add configurable output masking and filter scope for Presidio PII guardrail
2025-12-11 15:19:11 -08:00
yuneng-jiang
2a864e25f8
Merge pull request #17668 from BerriAI/litellm_sso_config_2
[Fix] Remove SSO Config Values from Config Table on SSO Update
2025-12-11 15:17:33 -08:00
yuneng-jiang
d2141096dc
Merge pull request #17797 from BerriAI/litellm_ui_agent_usage
[Feature] Agent Usage UI
2025-12-11 15:03:21 -08:00
SamAcctX
8717f6f529
OpenRouter GPT 5.2, Mistral 3, and Devstral 2 2025-12-11 17:02:24 -06:00
yuneng-jiang
de9a195d8c
Merge pull request #17781 from BerriAI/litellm_daily_agent_table
[Feature] Daily Agent Usage Backend
2025-12-11 15:01:50 -08:00
mubashir1osmani
1b2ea270b4
fix: attach team to org table (#17832)
* fix: attach team to org table

* add test
2025-12-11 14:54:50 -08:00
Cesar Garcia
f7425f297b
fix(openai): use optimized async http client for text completions (#17831)
* fix(openai): use optimized async http client for text completions

OpenAITextCompletion.acompletion was using litellm.aclient_session directly
instead of the optimized http client with aiohttp transport that
OpenAIChatCompletion uses. This fixes inconsistent behavior where custom
SSL configs and the faster aiohttp transport were not applied to async
text completion requests.

Fixes #17676

* test(openai): add test for text completion async http client

Verify that OpenAITextCompletion.acompletion uses the optimized
BaseOpenAILLM._get_async_http_client() instead of litellm.aclient_session.

Related to #17676

* test: move http client test to existing test file

Move test_acompletion_uses_optimized_http_client to
test_text_completion_unit_tests.py instead of separate file.
2025-12-11 14:54:26 -08:00
Alexsander Hamir
15404db3d0
[Fix] CI/CD – Docs & Spend logs (#17843)
* fix: resolve mypy type errors in hiddenlayer guardrail and transformation

- Fix return type of apply_guardrail from str to GenericGuardrailAPIInputs
- Add None checks for logging_obj before accessing attributes
- Convert AllMessageValues to dict format for HiddenLayer API compatibility
- Fix payload type annotation in _call_hiddenlayer
- Ensure transformed_output always returns list[dict[str, Any]] in transformation.py

* fix: use litellm_call_id as trace_id fallback in langfuse logging

- Only use standard_logging_object.trace_id if explicitly set via litellm_session_id or litellm_trace_id params
- Fallback to litellm_call_id when no explicit trace_id is provided (matches test expectation)
- Return the trace_id we set instead of generation_client.trace_id for consistency
- Add warning if langfuse modifies the trace_id to help debug potential issues

Fixes test_logging_trace_id test failure where auto-generated UUID was used instead of litellm_call_id

* fix: document envs

* fix: handle None response in /spend/logs endpoint when no records found

- Return empty list [] instead of [None] when spend_log is None
- Prevents 500 errors when querying by request_id, api_key, or user_id with no matching records
- Fixes test_chat_completion_bad_model_with_spend_logs test failure

* fix: use standard_logging_object trace_id when available in langfuse logger

- Fix trace_id selection logic to use standard_logging_object.trace_id when available
- Previously only used standard_logging_object.trace_id if explicitly set via params
- Now uses standard_logging_object.trace_id whenever it's present, matching test expectations
- Falls back to litellm_call_id if no trace_id is found
- Fixes test_log_langfuse_v2_uses_standard_trace_id_when_available test failure
2025-12-11 14:00:33 -08:00
Yuta Saito
8cccf3e9f0 fix: update MCP handler invocation to pass full call context from main.py 2025-12-12 06:41:58 +09:00
Alexsander Hamir
e9baa83a0f
[Fix] CI/CD – Clean Up Performance PR Changes & others (#17838) 2025-12-11 12:50:03 -08:00
Peter Dave Hello
70643a8b9c
Add support for OpenAI GPT-5.2 models (#17836)
References:
- https://openai.com/index/introducing-gpt-5-2/
- https://platform.openai.com/docs/models/gpt-5.2
2025-12-11 12:49:30 -08:00
yuneng-jiang
a7c9f7247a
Merge pull request #17834 from BerriAI/litellm_ui_team_model_fix
[Fix] Create Team Model Dropdown Honors Organization's Models
2025-12-11 11:44:10 -08:00
yuneng-jiang
6e99faeced Create Team Model Dropdown fix 2025-12-11 10:16:42 -08:00
yuneng-jiang
26926d5fea
Merge pull request #17804 from BerriAI/litellm_add_model_settings_fix
[Fix] Ensure Model Page Honors UI Settings
2025-12-11 09:20:28 -08:00
yuneng-jiang
f9dc034c73
Merge pull request #17775 from BerriAI/litellm_sendgrid
[Feature] Sendgrid integration
2025-12-11 09:19:41 -08:00
Krrish Dholakia
917997cf79 fix: remove dead file 2025-12-11 08:27:55 -08:00
YutaSaito
e9571ddbc4
fix: MCP OAuth callback routing and URL handling (#17789)
* fix: MCP OAuth callback routing and URL handling

* test: add test for proxy_server
2025-12-11 08:22:59 -08:00
Cesar Garcia
6a3e6465ea
fix(completion): transform image content in tool results for Responses API (#17799)
When using litellm.completion() with model="openai/responses/...", images
in tool message content were not being transformed from Chat Completion
format to Responses API format.

Chat Completion format: {"type": "image_url", "image_url": {"url": "..."}}
Responses API format: {"type": "input_image", "image_url": "..."}

This caused OpenAI to reject the request with error 400 since "image_url"
is not a valid type for function_call_output content.
2025-12-11 08:21:05 -08:00
Cesar Garcia
2e303bf556
fix(anthropic): capture web_search_tool_result in streaming for multi-turn conversations (#17798)
This fix addresses two issues with Anthropic web search streaming:

1. Fix trailing {} in tool call arguments
   - web_search_tool_result blocks have input_json_delta events that were
     incorrectly emitted as tool calls
   - Added current_content_block_type tracking to only emit tool calls for
     tool_use and server_tool_use blocks

2. Capture web_search_tool_result for multi-turn
   - The web_search_tool_result content comes ALL AT ONCE in content_block_start
   - Now captured in provider_specific_fields.web_search_results
   - stream_chunk_builder combines these for final message
   - Allows multi-turn conversations to work with streaming web search
2025-12-11 08:19:23 -08:00
YutaSaito
13df50830d
chore: prefer standard trace id for Langfuse logging (#17791) 2025-12-11 08:18:45 -08:00
CyrusTC
5d326386fb
feat(bedrock): add serviceTier support for Converse API (#17810)
Add support for the Bedrock Converse API serviceTier parameter to allow
specifying processing tier (priority, default, or flex).

Changes:
- Add ServiceTierBlock type in litellm/types/llms/bedrock.py
- Add serviceTier to CommonRequestObject
- Add serviceTier to get_config_blocks() in AmazonConverseConfig
- Add comprehensive tests for serviceTier functionality
- Add documentation for serviceTier usage

This allows users to configure service tier via:
- litellm_params in proxy config
- optional_params in SDK calls
2025-12-11 08:16:32 -08:00
Cesar Garcia
97be0da0d2
fix(azure_ai): Remove unsupported params from Azure AI Anthropic requests (#17822)
* fix(azure_ai): Remove unsupported params from Azure AI Anthropic requests

Azure AI Anthropic endpoint rejects max_retries and stream_options parameters
with "Extra inputs are not permitted" error. These are LiteLLM-internal
parameters that should not be sent to the API.

Fixes 400 Bad Request error when using azure_ai/claude-sonnet-4-5 and other
Azure AI Anthropic models.

* test(azure_ai): Add test for unsupported params removal in Azure AI Anthropic

Verifies that max_retries, stream_options, and extra_body are properly
removed from the request before sending to Azure AI Anthropic endpoint.
2025-12-11 08:09:13 -08:00
Ashton Sidhu
a514313540
Add Hiddenlayer Guardrail Hooks (#17728)
* Core logic working, need to add tests

* Re add removed files

* Remove mistaken files

* one more file

* Add deployment params

* Add tests

* Remove unused imports

* Update docs from feedback

* Update guardrails
2025-12-11 07:43:26 -08:00
Sameer Kankute
3de46889bb
Merge pull request #17805 from BerriAI/litellm_fix_azure_anthropic_model_map
Fix llm provider for azure_ai in model map
2025-12-11 16:04:11 +05:30
Sameer Kankute
118a06ddfb bump openai package to 2.9.0 2025-12-11 16:01:52 +05:30
Sameer Kankute
7b1cef86a7 Add support for target_storage param 2025-12-11 15:08:17 +05:30
Sameer Kankute
51065295ba Fix llm provider for azure_ai in model map 2025-12-11 11:36:56 +05:30
yuneng-jiang
7ca2c2abfc Adding tests 2025-12-10 21:37:38 -08:00
yuneng-jiang
6f6a8f782e Fix UI settings 2025-12-10 21:31:35 -08:00
Sameer Kankute
8942053c8b
Merge pull request #17700 from BerriAI/litellm_batches_passthrough_cost_tracking
Add anthropic retrieve batches and retreive file content support
2025-12-11 10:31:54 +05:30
Sameer Kankute
1107febf05
Merge pull request #17803 from BerriAI/litellm_preserve_system_instructions
fix: Preserve systemInstructions for vertex ai generate content request
2025-12-11 10:31:08 +05:30
yuneng-jiang
084ed01518 proxy extras and migration 2025-12-10 20:53:13 -08:00
yuneng-jiang
3784b5597a bump: version 0.4.12 → 0.4.13 2025-12-10 20:51:23 -08:00
yuneng-jiang
91056c1d7e Merge remote-tracking branch 'origin' into litellm_daily_agent_table 2025-12-10 20:47:58 -08:00
yuneng-jiang
1c6de2b80d Merge remote-tracking branch 'origin' into litellm_sendgrid 2025-12-10 20:39:25 -08:00
yuneng-jiang
cffd0ac350 sendgrid docs 2025-12-10 20:39:10 -08:00
yuneng-jiang
ca11264bbf Fixing sendgrid integration 2025-12-10 20:31:33 -08:00
Sameer Kankute
9344d29a15 fix: Preserve systemInstructions for vertex ai generate content request 2025-12-11 09:52:32 +05:30
Sameer Kankute
2ea855d225
Merge pull request #17707 from raghav-stripe/raghav-fix-responsesapi-rl
fix: responses api not applying tpm rate limits on api keys
2025-12-11 08:57:16 +05:30
Shivam Rawat
9d7a255d55
made litellm proxy and sdk difference cleaner in overview (#17790) 2025-12-10 19:14:49 -08:00
Cesar Garcia
b2e3f56f69
feat(models): add Mistral Codestral 2508, Devstral 2512, and Labs Devstral Small 2512 (#17801)
Add newly released Mistral coding models:
- mistral/codestral-2508: 256K context, $0.30/$0.90 per M tokens
- mistral/devstral-2512: 256K context, $0.40/$2.00 per M tokens
- mistral/labs-devstral-small-2512: 256K context, $0.10/$0.30 per M tokens
2025-12-10 19:14:02 -08:00
Ishaan Jaff
4a7437ba5f
[Feat] Agent Gateway - allow adding langgraph, bedrock agent core agents (#17802)
* fix: langgraph bridge streaming

* add public/agents/fields

* test_a2a_completion_bridge_non_streaming

* TestA2AStreamingTransformation

* AgentCredentialFieldMetadata

* add new logo

* refactor add agent

* fix add dynamic fields

* feat allow adding langgraph agent

* add langgraph provider

* stash

* add AgentCreateInfo

* agent_create_fields

* fix fields

* test_a2a_completion_bridge_bedrock_agentcore

* test_a2a_completion_bridge_bedrock_agentcore

* add public endpoints

* fix a2a endpoints

* fix dynamic fields
2025-12-10 19:13:50 -08:00
Sameer Kankute
ad5d94a82f
Merge pull request #17771 from BerriAI/litellm_db_videos_issue
fix: respect videos content db creds
2025-12-11 08:27:43 +05:30
Sameer Kankute
44d57b695a remove print statment 2025-12-11 08:22:22 +05:30
yuneng-jiang
439d42ba67 bump: version 0.1.24 → 0.1.25 2025-12-10 18:26:07 -08:00
Yuta Saito
4efa21ee7d docs: clarify MCP tool support across providers 2025-12-11 10:39:24 +09:00