Commit graph

36177 commits

Author SHA1 Message Date
Chesars
f132f2c811 chore: add Black Forest Labs models to model registry
Add BFL models to model_prices_and_context_window.json with pricing:
- flux-kontext-pro: $0.04/image
- flux-kontext-max: $0.08/image
- flux-pro-1.0-fill: $0.05/image
- flux-pro-1.0-expand: $0.05/image

Add black_forest_labs_models set to __init__.py for model discovery.
2026-03-04 18:08:50 -03:00
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
Cesar Garcia
bc10274928
Merge pull request #19518 from Chesars/fix-model-management-ui
Fix model management page UI improvements
2026-03-04 18:02:55 -03:00
Cesar Garcia
2e9326523a
Update ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/ModelsAndEndpointsView.test.tsx
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-04 18:01:28 -03:00
Cesar Garcia
424c433141
Merge pull request #22801 from Chesars/feat/mistral-audio-transcription
feat(mistral): add Voxtral audio transcription support
2026-03-04 17:55:33 -03:00
Cesar Garcia
0c2e6b5185
Merge pull request #22803 from Chesars/fix/reasoning-to-reasoning-content-delta
fix(streaming): map reasoning to reasoning_content in Delta for gpt-oss providers
2026-03-04 17:54:35 -03:00
Chesars
68cccc830d style(ui): fix indentation on TableRow props in all_models_table 2026-03-04 17:52:32 -03:00
Cesar Garcia
35b9ec3a86
Merge pull request #17662 from Chesars/fix/gemini-2x-media-resolution-detail-parameter
fix(gemini): support detail parameter for image resolution on Gemini 2.x models
2026-03-04 17:51:51 -03:00
Cesar Garcia
3a8fdc4b81
Update ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/components/AllModelsTab.tsx
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-04 17:50:55 -03:00
Chesars
e48b7ae8f9 fix(streaming): map reasoning to reasoning_content in Delta for gpt-oss providers
Providers like Cerebras return delta.reasoning in streaming responses
for gpt-oss models, but LiteLLM's Delta class expects reasoning_content.
This causes reasoning content to be silently dropped during streaming.

Fixes #13300
2026-03-04 17:44:30 -03:00
Chesars
18af581563 fix(ui): add missing onRowClick prop to AllModelsDataTable component
The AllModelsTab component was passing onRowClick to AllModelsDataTable
but the prop was not defined in the interface, causing the TypeScript
build to fail.
2026-03-04 17:42:51 -03:00
Chesars
c1a8bdd164 fix(gemini): support detail parameter for image resolution on Gemini 2.x models
Add global media_resolution support for Gemini 2.x models (2.0, 2.5) when
using OpenAI's detail parameter on images. Previously, the detail parameter
was only working for Gemini 3+ models (per-part) and was silently ignored
for older Gemini models.

- Add _get_highest_media_resolution() and _extract_max_media_resolution_from_messages()
  to extract highest detail from all images/files in a request
- Update _transform_request_body() to add mediaResolution to generationConfig
  for Gemini 2.x models only (not 1.x which doesn't support it, not 3+ which
  uses per-part)
- Add mediaResolution field to GenerationConfig TypedDict
- Support detail extraction from both image_url and file content types
- Add comprehensive unit tests and update documentation
2026-03-04 17:32:19 -03:00
Chesars
354f44c661 fix: serialize boolean provider params as lowercase strings
str(True) produces "True" but Mistral API expects lowercase "true".
Use str(value).lower() for bool params in provider-specific fields.
2026-03-04 16:56:51 -03:00
SebLz
2b91978b99
fix(responses): preserve query params in compact URL construction (#22668)
Co-authored-by: LIESLEN <sebastien.lentz@arcelormittal.com>
2026-03-04 11:33:13 -08:00
Chesars
c1d1f72f43 docs: add Mistral Voxtral audio transcription documentation
Add Mistral to the supported providers list in audio_transcription.md
and add Audio Transcription section to the Mistral provider page with
SDK usage, optional params, diarize support, and proxy configuration.
2026-03-04 16:26:53 -03:00
Chesars
086a58a06a feat(mistral): add Voxtral audio transcription support
Add MistralAudioTranscriptionConfig for Mistral's /v1/audio/transcriptions
endpoint, enabling litellm.transcription() with mistral/voxtral-mini-latest
and other Voxtral models. Supports multipart form-data with OpenAI-compatible
params (language, temperature, response_format, timestamp_granularities)
plus Mistral-specific params like diarize.
2026-03-04 16:20:05 -03:00
Miguel Armenta
750fc4a980
azure content enhancement... (#22581)
* azure content enhancement...

* rafactored to increase confidence score

* improvements based on additional feedback

* removed unused import

* Force-split any word longer than max length allowed

* preserve whitespace in text splitting

* moving common initialization to base class

* consolidate enforcement into async_make_request as single point, remove redundant caller-side checks, extract shared init/HTTP logic into base, and fix stale log messages

* clean up

* clean up tests
2026-03-04 10:22:30 -08:00
ryan-crabbe
0df36582de
Merge pull request #22728 from BerriAI/litellm_batch_expiry_validation_followup
fix(proxy): improve team expiry enforcement validation
2026-03-04 10:16:02 -08:00
Sameer Kankute
23d312dbd2
Merge pull request #22771 from BerriAI/litellm_responses_websocket_2
Add support for responses websocket for all providers
2026-03-04 22:12:12 +05:30
Milan
32b3874684 fix: update Okta SSO docs and custom SSO handler example
1. Okta SSO docs (admin_ui_sso.md):
   - Rewrite Step 3 to document both Org Auth Server (free) and
     Custom Auth Server (paid SKU) as tabbed options
   - Add Step 4 for GENERIC_CLIENT_STATE and PKCE configuration
     (moved from troubleshooting into the main guide)
   - Clarify no_matching_policy error only applies to Custom Auth Server
   - Deduplicate troubleshooting section to reference Step 4

2. Custom SSO handler (custom_sso.py + custom_sso.md):
   - Replace broken user_info() call with prisma_client.get_data()
   - user_info() is a FastAPI route handler requiring Request and
     UserAPIKeyAuth params, cannot be called directly
   - Keep new_user/add_new_member as commented-out import references
     in docs for customers who need them
2026-03-04 17:59:55 +02:00
Julio Quinteros Pro
edbb8ce360
Merge pull request #22775 from BerriAI/fix/model-prices-schema-new-properties
fix: add new model_prices properties to validation schema
2026-03-04 11:52:01 -03:00
Julio Quinteros Pro
53ea6a280a
Merge pull request #22776 from BerriAI/fix/ruff-unused-imports
fix: remove unused EncryptedContentAffinityCheck import in router.py
2026-03-04 11:51:11 -03:00
Julio Quinteros Pro
512a5fa3c7
Merge pull request #22788 from BerriAI/fix/azure-batches-add-tenacity-ci
Add tenacity to e2e Azure batch CI and revert importorskip
2026-03-04 11:50:44 -03:00
Julio Quinteros Pro
9f000373de
Merge pull request #22789 from BerriAI/fix/linting-ci-openai-version
Remove incompatible openai==1.100.1 pin from linting CI
2026-03-04 11:50:29 -03:00
Julio Quinteros Pro
75b2e40cd3 Remove incompatible openai==1.100.1 pin from linting CI
The linting workflow force-installed openai==1.100.1 which conflicts
with litellm's requirement of openai>=2.8.0, causing pip dependency
resolver errors and CI cancellation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 11:46:31 -03:00
Julio Quinteros Pro
aa62ddaf0a Add tenacity to e2e Azure batch CI and revert importorskip
PR #22785 used pytest.importorskip which causes exit code 5 (all
skipped) in CI. Instead, add tenacity to the CI workflow pip install
and restore direct imports.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 11:45:14 -03:00
Julio Quinteros Pro
4ec92ba924 fix: add new model_prices properties to validation schema
Add cache_read_input_token_cost_per_audio_token, supports_code_execution,
and supports_file_search to the JSON schema used by the model prices
validation test.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 11:37:02 -03:00
Julio Quinteros Pro
f0cd93aeb2 fix: remove unused imports in tool_management_endpoints and streaming_iterator
- Remove unused ToolOutputPolicy import
- Remove unused _WsClientConnection TYPE_CHECKING import

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 11:36:08 -03:00
Julio Quinteros Pro
0dc8b08987 fix: remove unused top-level EncryptedContentAffinityCheck import
The class is already imported locally where it's used (line 1261).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 11:36:08 -03:00
Julio Quinteros Pro
317c162dfe
Merge pull request #22785 from BerriAI/fix/azure-batches-test-tenacity-import
Guard tenacity import in e2e Azure batch tests
2026-03-04 11:34:57 -03:00
Julio Quinteros Pro
a7e2bc3a92
Merge pull request #22784 from BerriAI/fix/responses-id-security-test
Fix responses ID security test for new request_cache parameter
2026-03-04 11:34:23 -03:00
Julio Quinteros Pro
fac622b5e6
Merge pull request #22783 from BerriAI/fix/schema-migration-check
Add missing migration for LiteLLM_ToolTable policy changes
2026-03-04 11:34:16 -03:00
Julio Quinteros Pro
f4e8c02ba2
Merge pull request #22781 from BerriAI/fix/tool-management-endpoint-tests
Fix tool management tests using wrong field name call_policy
2026-03-04 11:34:04 -03:00
Julio Quinteros Pro
d3b210fdd0
Merge pull request #22780 from BerriAI/fix/a2a-cost-calculator-test
Fix A2A message context_id access when message is a dict
2026-03-04 11:33:53 -03:00
Julio Quinteros Pro
f0c80d2a86
Merge pull request #22778 from BerriAI/fix/azure-test-exclude-aresponses-websocket
Exclude aresponses_websocket from Azure SDK client init test
2026-03-04 11:33:23 -03:00
Julio Quinteros Pro
570e8861bd
Merge pull request #22777 from BerriAI/fix/mcp-streaming-test-and-iterator
Fix flaky MCP streaming test and iterator silent failure
2026-03-04 11:33:11 -03:00
Julio Quinteros Pro
8495e05221 Guard tenacity import in e2e Azure batch tests
tenacity is not in pyproject.toml dependencies, causing ImportError
during test collection. Use pytest.importorskip to gracefully skip
when tenacity is not available.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 11:32:20 -03:00
Julio Quinteros Pro
c0ac788709 Fix responses ID security test for new request_cache parameter
The _encrypt_response_id method now receives request_cache=None as a
keyword argument from async_post_call_success_hook. Updated the mock
assertion to expect this parameter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 11:29:51 -03:00
Julio Quinteros Pro
d8d3375a3c Add missing migration for LiteLLM_ToolTable policy changes
PR #22732 changed the ToolTable schema (renamed call_policy to
input_policy, added output_policy/user_agent/last_used_at columns,
updated indexes) but didn't include a migration for these changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 11:27:51 -03:00
Julio Quinteros Pro
1ec6502f88 Fix tool management tests using wrong field name call_policy
Tests used call_policy throughout but the actual API model uses
input_policy and output_policy. Updated _make_tool_row helper,
list filter query param, and policy update request/response assertions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 11:20:17 -03:00
Julio Quinteros Pro
d6949e5323 Fix A2A message context_id access when message is a dict
The asend_message function accessed request.params.message.context_id
using attribute syntax, but message can be either a dict or an object.
Handle both cases using isinstance check, matching the existing pattern
in litellm/a2a_protocol/utils.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 11:16:48 -03:00
Julio Quinteros Pro
d22996ee87 Exclude aresponses_websocket from Azure SDK client init test
The aresponses_websocket CallType was recently added but not included
in the test exclusion list. It uses WebSocket passthrough (not Azure SDK
client initialization), so it correctly doesn't call
initialize_azure_sdk_client.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 11:13:57 -03:00
Julio Quinteros Pro
e8301829cd Fix flaky MCP streaming test by properly mocking inner aresponses call
The test_streaming_mcp_events_validation test was flaky because:
1. It didn't mock the nested aresponses() call inside the iterator's
   _create_initial_response_iterator(), causing real API calls that fail
   without credentials
2. The iterator silently swallowed exceptions and set phase="finished",
   discarding pre-generated MCP discovery events
3. The _execute_tool_calls mock had wrong signature (missing tool_server_map)

Production fix: MCPEnhancedStreamingIterator no longer sets phase="finished"
on LLM call failure — it falls through to emit MCP discovery events first.

Test fix: Added mock for litellm.responses.main.aresponses returning a fake
async streaming iterator, fixed mock signatures, removed try/except that
masked failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 11:09:24 -03:00
Chesars
c8d3734249 fix: merge main, fix summary in Responses API path, resolve conflicts
- Fix translate_thinking_to_reasoning in responses_adapters/transformation.py
  to make summary opt-in (was hardcoded to "detailed")
- Update e2e test to mock litellm.responses (new OpenAI routing path)
- Add tests for Responses API adapter summary preservation
- Resolve merge conflict in test file
2026-03-04 10:54:03 -03:00
Chesars
ba5d32b6b8 fix: address review feedback — remove redundant guard, preserve summary in translate_anthropic_to_openai
- Remove redundant isinstance(thinking, dict) check in handler.py since
  early return on line 64 guarantees thinking is a dict at that point
- Preserve summary in translate_anthropic_to_openai() for consistency
  across all code paths (adapter, guardrail, main.py)
2026-03-04 10:51:59 -03:00
Chesars
ece0325234 fix(anthropic): make thinking.summary opt-in, don't hardcode default
Remove hardcoded summary="detailed" injection — summary is opt-in per
OpenAI spec and increases costs. Users opt-in per-request via LiteLLM
extension: thinking={"type": "enabled", "budget_tokens": N, "summary": "concise"}.

Also preserve summary in translate_thinking_for_model() which previously
dropped it when converting thinking → reasoning_effort for non-Claude models.

Fixes #20998
2026-03-04 10:45:28 -03:00
Sameer Kankute
51552eafe7
Merge pull request #22751 from BerriAI/litellm_fix_mcp_edit_tools
Fix MCP server URL and tools management
2026-03-04 18:30:28 +05:30
Sameer Kankute
db0d5588fa
Merge pull request #22740 from BerriAI/litellm_fix_file_wild_card
Add support for wildcards models for files api
2026-03-04 18:30:00 +05:30
Sameer Kankute
ece7fdb213
Merge pull request #22744 from BerriAI/litellm_mcp_streaming_fix
Add mcp streaming events Fix and consistent response ID
2026-03-04 18:29:48 +05:30
Sameer Kankute
b5183e9f3b
Merge pull request #22752 from BerriAI/litellm_search_api_add
[Feat] Add Google Search API Integration
2026-03-04 18:29:10 +05:30