Commit Graph
27330 Commits
Author SHA1 Message Date
yuneng-jiang d62dfd4be2 Merge remote-tracking branch 'origin' into litellm_org_usage 2025-11-13 15:26:59 -08:00
Ishaan JaffandGitHub 124ba463f8 [Feat] RunwayML - Add support for /audio/speech eleven_multilingual_v2 endpoint (#16604)
* init RunwayMLTextToSpeechConfig

* add RunwayMLTextToSpeechConfig

* add  RunwayMLTextToSpeechConfig

* test_runwayml_tts_async

* runway ml speech

* fix voices

* fix test

* docs runway lm

* add runwayml here

* fix RunwayMLTextToSpeechConfig

* test_openai_voice_mapping_to_runwayml
2025-11-13 14:32:09 -08:00
Nicholas CoutureandGitHub 4be372eb48 fix: support Anthropic tool_use and tool_result in token counter (#16351)
* fix: support Anthropic tool_use and tool_result in token counter

* refactor(token_counter): add dynamic field inference for Anthropic content blocks

* test: Add additional tests

* make format

* Fix lint error

* Fix mypy narrow type lint errors
2025-11-13 14:30:46 -08:00
Ishaan JaffandGitHub 911a009869 [Docs] LiteLLM Quick start - show how model resolution works (#16602)
* docs nderstanding Model Configuration

* docs fix
2025-11-13 13:28:01 -08:00
7133488282 [Feat] VertexAI - Add BGE Embeddings support (#16033)
* Support for Custom Vertex AI Models via PSC Endpoint with api_base (#15953)

* Support for Custom Vertex AI Models via PSC Endpoint with api_base

* Add docs related psc

* remove not needed files

* remove print statemnt

* fix mypy errors

* add TextEmbeddingBGEInput

* add VertexBGEConfig

* add BGE handling

* test_vertex_ai_bge_embedding_with_custom_api_base

* fix request transform vertex BGE

* test_vertex_ai_bge_embedding_with_custom_api_base

* tes BGE

* test_is_bge_model_detection

* docs cleanup

* handling BGE URL

* fix VertexBGEConfig

* test_vertex_ai_bge_with_endpoint_id_pattern

* docs vertex BGE

* docs

* docs fix

* fix VertexAIModelRoute

* from ..common_utils import VertexAIError, get_vertex_base_model_name
add

* fix VertexAIGemmaModels

* fix get_vertex_base_model_name

* test_vertex_ai_bge_psc_endpoint_url_construction

---------

Co-authored-by: Sameer Kankute <sameer@berri.ai>
2025-11-13 12:41:00 -08:00
YutaSaitoandGitHub 8e0b66a814 fix: exclude unauthorized MCP servers from allowed server list (#16551)
* fix: exclude unauthorized MCP servers from allowed server list

* fix: test after resolving merge conflicts
2025-11-13 12:33:54 -08:00
Sameer KankuteandGitHub ea80510f78 [Feat] Day-0, Add gpt-5.1 and gpt-5.1-codex family support (#16598)
* Add day 0 support for gpt-5.1 models

* Add gpt-5.1-codex day 0 support

* update pricing values
2025-11-13 10:55:54 -08:00
Jón LevyandGitHub 555d7b8be8 feat(bedrock): Add bearer token authentication support for AgentCore (#16556) v1.79.3.dev7 2025-11-13 08:17:36 -08:00
Lucas SugiandGitHub e1c607e22a feat: Add headers to VLLM Passthrough requests [Log success Events] (#16532) 2025-11-12 19:46:34 -08:00
491f57a349 feat: Add support for reasoning_effort="none" for Gemini models (#16548)
Implements support for reasoning_effort="none" parameter for Gemini models,
providing significant cost savings (up to 96% cheaper) by disabling thinking
budget while maintaining response quality.

Changes:
- Added "supports_reasoning": true to gemini-2.0-flash-thinking-exp-01-21 in model config
- Implemented mapping for reasoning_effort="none" to thinkingConfig {thinkingBudget: 0, includeThoughts: false}
- Added unit test to verify the mapping works correctly

Performance impact:
- Without reasoning_effort: ~313 tokens
- With reasoning_effort="none": ~12 tokens (96% cheaper)

Closes #16420

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
2025-11-12 19:41:07 -08:00
Cesar GarciaandGitHub c017f665e0 docs(openai): Document reasoning_effort summary field options (#16549)
Related to PR #16210 which fixed automatic summary field addition

Changes:
- Document reasoning_effort string vs dict formats
- Add summary field options (auto, detailed, concise)
- Add table of supported reasoning_effort values by GPT-5 model
- Clarify model-specific support and limitations
- Note that summary field requires org verification

The previous implementation automatically added summary field causing
400 errors for unverified orgs. Now users can opt-in by passing
reasoning_effort as dict with explicit summary field.
2025-11-12 19:40:11 -08:00
Cesar GarciaandGitHub 049d45ea90 fix(gemini): Preserve non-ASCII characters in function call arguments (#16550)
Fixes #16533

Before this fix, non-ASCII characters (Japanese, Spanish, Chinese, etc.)
in function call arguments were being escaped as Unicode sequences.

Example:
- Before: "やあ" → "\u3084\u3042"
- After: "やあ" → "やあ" (preserved)

Changes:
- Add ensure_ascii=False to json.dumps() in _transform_parts()
- Add test for Japanese and Spanish Unicode character preservation

This is not a breaking change as both formats are equivalent in JSON.
The fix improves readability and aligns with OpenAI's behavior.
2025-11-12 19:01:38 -08:00
Sameer KankuteandGitHub 018bd2e039 Add Gemini image edit support (#16430)
* Add gemini image edit support

* fix lint errors

* fix lint errors

* fix lint errors

* Add docs
2025-11-12 18:48:27 -08:00
yuneng-jiangandGitHub 8bf491c939 [Fix] /spend/logs/ui Access Control (#16446)
* RBAC for /spend/logs/ui

* Addressing comments
2025-11-12 18:44:21 -08:00
yuneng-jiangandGitHub cb27d6c456 [Fix] UI - Delete Callbacks Failing (#16473)
* Temp commit for branch switching

* Created normalize callback name util function and tests
2025-11-12 18:43:37 -08:00
Sameer KankuteandGitHub 92bd12c862 Fix raising wrong 429 error on wrong exception (#16482)
* fix raising wrong 429 error on wrong exception

* remove double re import
2025-11-12 18:41:12 -08:00
Ishaan Jaffer 78c169a524 docs fix 2025-11-12 18:30:01 -08:00
Sameer KankuteandGitHub 394da34a0b Add all gemini image models support in image generation (#16526) 2025-11-12 18:26:44 -08:00
yuneng-jiangandGitHub 898f15c33c Add Langfuse OTEL and SQS to health check (#16514) 2025-11-12 18:25:30 -08:00
yuneng-jiangandGitHub c23b2c5023 Config Guardrails should not be deletable from table (#16540) 2025-11-12 18:23:31 -08:00
yuneng-jiang 35eece2b7b Merge remote-tracking branch 'origin' into litellm_org_usage 2025-11-12 18:22:44 -08:00
yuneng-jiang 94da5c076c Add Daily Org Spend Table, read path, and write path 2025-11-12 18:22:26 -08:00
Ishaan JaffandGitHub b30439257b [Feat] Add RunwayML Img Gen API support (#16557)
* TestRunwaymlImageGeneration

* fix RUNWAYML

* rename

* fix rename

* get_runwayml_image_generation_config

* get_runwayml_image_generation_config

* TestRunwaymlImageGeneration

* add RUNWAYML_POLLING_TIMEOUT

* fix rnwayml transform img gen

* runwayml_image_cost_calculator

* runwayml_image_cost_calculator

* docs runwayml

* fix runwayML polling

* test_get_first_default_fallback
2025-11-12 18:20:14 -08:00
Benjamin ChrobotandGitHub 1393900c22 [Docs] Fix code block indentation for fallbacks page (#16542) 2025-11-12 18:08:52 -08:00
yuneng-jiangandGitHub f0c83e183e SSO Modal Cosmetic Changes (#16554) 2025-11-12 17:55:05 -08:00
Krrish Dholakia a05ad46394 feat: add litellm cloud self-serve to docs 2025-11-12 17:13:14 -08:00
Krrish Dholakia c14afa93b0 fix(responses_id_security.py): fix issue when no master key set 2025-11-12 14:09:11 -08:00
f4a5196728 fix: Improve Azure auth parameter handling for None values (#14436)
* fix: Improve Azure auth parameter handling for None values

Previously, litellm_params.get() with default fallbacks could ignore
environment variables when the param existed but was None. Now explicitly
checks for None values before falling back to environment variables.

🤖 Generated with [Claude Code](https://claude.ai/code)

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

* fix lint

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
2025-11-12 14:01:55 -08:00
Krrish Dholakia 48579f7539 feat(anthropic/chat/transformation.py): add minimal reasoning effort thinking support
Closes Slack issue
2025-11-12 13:57:14 -08:00
YutaSaitoandGitHub 2843dab7fe fix: allow tool call even when server name prefix is missing (#16425)
* fix: allow tool call even when server name prefix is missing

* fix: test

* fix: test

* fix: test
2025-11-12 13:50:52 -08:00
Krrish Dholakia ae3178d5d4 docs(deploy.md): document how to disable pulling live model prices (faster startup time) on docker deployment 2025-11-12 13:49:44 -08:00
Krrish Dholakia 020a66c01f docs(model_access_guide.md): explain how model access works on litellm 2025-11-12 13:44:38 -08:00
Krrish Dholakia c6d2714c52 docs(model_access_guide.md): document how model access works on litellm 2025-11-12 13:43:13 -08:00
yuneng-jiangandGitHub c5496fd61c [Feature] UI - Move Budgets out of Experimental (#16544)
* Move budget out of experimental and delete budget with friction

* Fixed tests

* Revert non test change
2025-11-12 13:27:02 -08:00
Cesar GarciaandGitHub 20350fa094 docs: update broken Slack invite links to support page (#16546)
Replace broken Slack links (litellmossslack.slack.com and expired invite URLs)
with the correct support page URL (https://www.litellm.ai/support) across all
documentation files.

Files updated:
- CONTRIBUTING.md
- docs/my-website/docs/contact.md
- docs/my-website/docs/proxy/docker_quick_start.md
- docs/my-website/docs/troubleshoot.md
- docs/my-website/src/pages/contact.md
v1.79.3.dev5
2025-11-12 12:41:55 -08:00
Ishaan JaffandGitHub 061b7b2713 [Fix] Bedrock Embeddings - Ensure correct aws_region is used when provided dynamically (#16547)
* test_bedrock_embedding_uses_correct_region_when_specified

* fix aws_region_name in bedrock embeddings
2025-11-12 12:38:58 -08:00
Ishaan JaffandGitHub abde56391b [Fix] - Bedrock Knowledge Bases - add support for filtering kb queries (#16543)
* test_e2e_bedrock_knowledgebase_retrieval_with_llm_api_call_with_tools_and_filters

* fix vs registry

* fix merging params

* test_bedrock_kb_request_body_has_transformed_filters

* fix typing / linting
2025-11-12 12:38:50 -08:00
Mubashir OsmaniandGitHub e6bbf3ce81 fix: app_roles missing from jwt payload (#16448)
* fix: jwt app_roles missing

* add test
2025-11-12 12:07:04 -08:00
Jean-Adrien DucastaingandGitHub 086e557d78 fix: use vllm passthrough config for hosted vllm provider instead of raising error (#16537)
* fix(passthrough): use VLLM passthrough config for hosted VLLM provider instead of raising an error

* test(passthrough): add tests for hosted VLLM passthrough configuration and routing

* fix account linking for CLA
2025-11-12 09:12:14 -08:00
Jón LevyandGitHub 63445f2f37 fix(agentcore): Convert SSE stream iterator to async for proper streaming support (#16293)
* fix(agentcore): support async agentcore runtime streaming

* revert: CLAUDE.md

* revert: .gitignore

* fix: map runtimeUserId to X-Amzn-Bedrock-AgentCore-Runtime-User-Id header for runtime oauth support
2025-11-11 19:21:53 -08:00
Sameer KankuteandGitHub 517eb0ee10 Use safe loading of creds (#16479) 2025-11-11 19:16:29 -08:00
Francesco BertolottiandGitHub 06efc7631d Update model logging format for custom LLM provider (#16485)
This avoids the annoying red message 
```
Provider List: https://docs.litellm.ai/docs/providers
```
when there is a cache hit.
2025-11-11 19:13:42 -08:00
Andrew MaguireandGitHub bd15250960 fix: Add atexit handlers to flush callbacks for async completions (#16487)
Fixes #16486

## Problem
Callbacks configured via litellm.success_callback (e.g., PostHog, LangSmith)
were not being invoked for litellm.acompletion() in short-lived scripts.
The callbacks worked correctly for synchronous completions but async
completions would queue callbacks that were lost when the script exited
before GLOBAL_LOGGING_WORKER could process them.

Root cause: asyncio.run() closes the event loop immediately after the
async function completes, preventing the background worker from processing
queued callbacks.

## Solution
Implemented a two-level atexit handler approach:

1. GLOBAL_LOGGING_WORKER atexit handler (logging_worker.py):
   - Processes remaining callbacks from queue before exit
   - Creates new event loop to run pending coroutines synchronously
   - Applies time and iteration limits to prevent blocking shutdown

2. Integration-specific atexit handlers (posthog.py as example):
   - Flushes internal queue to external service
   - Uses synchronous HTTP client for reliable delivery
   - Each integration needs its own handler due to varying sync APIs

## Changes
- litellm/litellm_core_utils/logging_worker.py:
  - Added _flush_on_exit() method
  - Registered atexit handler in __init__
  - Processes up to MAX_ITERATIONS_TO_CLEAR_QUEUE events
  - Time-limited to MAX_TIME_TO_CLEAR_QUEUE seconds

- litellm/integrations/posthog.py:
  - Added _flush_on_exit() method
  - Registered atexit handler in __init__
  - Groups events by credentials for batch sending
  - Uses sync_client for reliable HTTP delivery

- tests/logging_callback_tests/test_posthog.py:
  - Added test_async_callback_atexit_handler_exists()
  - Added test_posthog_atexit_flushes_internal_queue()
  - Added test_sync_callback_not_affected_by_atexit()

## Testing
- All existing tests pass
- Manual end-to-end testing confirms fix:
  - Async events now arrive in PostHog
  - Sync events continue working (no regression)
- Unit tests verify atexit handlers registered and functional

## Impact
- Fixes async callback delivery for ALL integrations using GLOBAL_LOGGING_WORKER
- No breaking changes - only adds missing functionality
- Sync path unchanged - no performance impact
2025-11-11 19:12:53 -08:00
Matt CowgerandGitHub 51dc4a8476 fix: add new models, delete repeat models, update pricing. (#16491)
Added 4 new OpenRouter models:

openrouter/deepseek/deepseek-v3.2-exp
openrouter/minimax/minimax-m2
openrouter/z-ai/glm-4.6
openrouter/z-ai/glm-4.6:exacto ]

Updated openrouter/qwen/qwen3-coder:

Significantly reduced input/output costs (1e-06 → 2.2e-7 / 5e-06 → 9.5e-7)
Reduced max token limits (1,000,000 → 262,100)
Added supports_function_calling flag

Removed 2 duplicated Vertex AI Qwen models (just removed duplicates):

vertex_ai/qwen/qwen3-next-80b-a3b-instruct-maas
vertex_ai/qwen/qwen3-next-80b-a3b-thinking-maas
2025-11-11 19:11:22 -08:00
Alan PonnachanandGitHub 8cb610b8b2 Sanitize null token values in provider responses (#16493) 2025-11-11 19:08:00 -08:00
Anthony MonacoandGitHub a1748ad550 Documentation Code Example corrections (#16502)
* Update quick_start.md

changed -D to -d

* Update users.md

Changed in a number of locations:

 "budget_duration": 10s,

to 

 "budget_duration": "10s",

* Update users.md

Changed all 10s to 30s to keep in line with the example
2025-11-11 19:06:44 -08:00
Krrish Dholakia 6931d3013a docs(readme.md): document 8ms p95 latency 2025-11-11 19:05:50 -08:00
yuneng-jiangandGitHub ba674f241c [Fix] Use user budget instead of key budget when creating new team (#16074)
* Use end user budget instead of key budget when creating new team

* Fixed implementation to use user's max budget from the UserTable instead of EndUserTable
2025-11-11 18:55:05 -08:00
yuneng-jiangandGitHub 67478a9074 [Fix] Litellm tags usage add request_id (#16111)
* Add request_id into tag spend

* Linting
2025-11-11 18:53:48 -08:00
yuneng-jiangandGitHub b9759b4bfa [Feature] UI - Add LiteLLM Params to Edit Model (#16496)
* Add LiteLLM Params to Edit Model

* Fixed tests
2025-11-11 18:52:11 -08:00