Commit Graph

34378 Commits

Author SHA1 Message Date
yuneng-jiang
7f11fa0a05 enterprise build 2026-02-05 20:48:07 -08:00
yuneng-jiang
828b13279e bump: version 0.1.29 → 0.1.30 2026-02-05 20:44:43 -08:00
yuneng-jiang
ec5dc0be51 email soft budgets 2026-02-05 20:42:43 -08:00
Swayambhu
eee37c569d fix: ensure Ant Design notification instance is initialized only once using useRef. 2026-02-06 10:01:44 +05:30
yuneng-jiang
5ce5399fbb
Merge pull request #20469 from swayambhu94/fix/ui/model-hub-table-crash
fix: Add array type checks for model, agent, and MCP hub data to prev…
2026-02-05 20:14:51 -08:00
Swayambhu
08a6fe2bfa refactor: migrate Ant Design notifications to use App.useApp() context via a new global provider.
1.
notifications_manager.tsx
 - Hybrid notification approach:

Added notificationInstance variable to store the context-based instance
Added
setNotificationInstance()
 function to inject the instance from context
Created
getNotification()
 helper that prefers context instance, falls back to static
Added COMMON_NOTIFICATION_PROPS (exported) with showProgress: true and pauseOnHover: true
All notification methods (
error
,
warning
,
info
,
success
,
fromBackend
) now spread COMMON_NOTIFICATION_PROPS
2.
AntdGlobalProvider.tsx
 - New context provider:

Wraps app with Antd's <App> component
Uses App.useApp() hook to get the context-based notification instance
Injects it into NotificationManager via
setNotificationInstance()
2026-02-06 09:44:02 +05:30
yuneng-jiang
26cdc4a47b
Merge pull request #20465 from BerriAI/litellm_ui_dep_tremor
[Refactor] UI - Admin Page: Migrate to AntD Tabs
2026-02-05 20:12:17 -08:00
Sameer Kankute
1bcd407af6 Add adaptive thiking for bedrock converse 2026-02-06 09:40:16 +05:30
Sameer Kankute
f15dd691b4 Fix anthropic.claude-opus-4-6-v1 for bedrock 2026-02-06 09:28:50 +05:30
Sameer Kankute
186fd2e64e Add adaptive thinking support for anthropic opus 4.6 2026-02-06 09:24:43 +05:30
Kelvin Tran
524970b8d2 feat: add opus 4.5 and 4.6 to use outout_format param 2026-02-05 19:41:15 -08:00
Cesar Garcia
95f8cbe5ca
[Feat] add ElevenLabs eleven_v3 and eleven_multilingual_v2 to model cost map (#20522)
* [Feat] add ElevenLabs `eleven_v3` and `eleven_multilingual_v2` to model cost map

Register ElevenLabs TTS models for cost tracking:
- elevenlabs/eleven_v3: most expressive model, 70+ languages, audio tags
- elevenlabs/eleven_multilingual_v2: default TTS model, 29 languages

Also update ElevenLabs docs with supported models table and eleven_v3 audio tags example.

* docs: remove model-agnostic tip from ElevenLabs docs
2026-02-05 19:37:42 -08:00
Cesar Garcia
8263c8ad15
feat(web_search): add gpt-5-search-api model and docs clarifications (#20512)
* docs(web_search): clarify OpenAI search model requirements

- Add gpt-5-search-api to supported OpenAI search models
- Add warning that regular models (gpt-5, gpt-4.1) do NOT support web_search_options
- Add tip that web_search_options is optional for search models

* feat(models): add gpt-5-search-api pricing for OpenAI and Azure
2026-02-05 19:36:43 -08:00
Swayambhu
926fb3525c refactor: Add error handling for network calls and apply consistent formatting across networking functions. 2026-02-06 08:33:18 +05:30
Sameer Kankute
3923ef2857
Merge pull request #20491 from BerriAI/litellm_gemini_files_gcs
fix: make sure gcs_bucket_name passes
2026-02-06 08:26:14 +05:30
Sameer Kankute
f12875bd42
Update litellm/integrations/websearch_interception/tools.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-06 08:21:09 +05:30
Sameer Kankute
a2e70a561d
Potential fix for code scanning alert no. 4046: Clear-text logging of sensitive information
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-06 08:20:50 +05:30
yuneng-jiang
3bececfa7a
Merge pull request #20539 from BerriAI/litellm_usage_failed_req
[Refactor] UI - Usage Page: Spend By Provider
2026-02-05 16:39:55 -08:00
yuneng-jiang
f64f949715 Spend by provider refactor 2026-02-05 16:22:07 -08:00
Shivam Rawat
93cf1ef517
Merge pull request #20535 from BerriAI/litellm_move_anthropic_test_script
[Chore] Move anthropic input/output test to right folder
2026-02-05 16:12:08 -08:00
yuneng-jiang
523a36ed53
Merge pull request #20530 from BerriAI/litellm_ui_team_soft_budget
[Feature] Add soft_budget to Team Table + Create/Update Endpoints
2026-02-05 15:52:17 -08:00
shivam
3dc70c3398 moved the test anthropic file 2026-02-05 15:44:24 -08:00
Ishaan Jaffer
bff5f8d7b0 doc fix 2026-02-05 15:31:41 -08:00
yuneng-jiang
45c6382667 cz bump + builds 2026-02-05 14:47:11 -08:00
yuneng-jiang
8b0d0b2610 bump: version 0.4.30 → 0.4.31 2026-02-05 14:46:38 -08:00
yuneng-jiang
a17efa1c8e Add soft_budget to team table and create update endpoints 2026-02-05 14:43:48 -08:00
Ishaan Jaff
887a907e42
[Fix] Guardrails API - Ensure OpenAI Moderations Guard works with OpenAI Embeddings (#20523)
* init OpenAIEmbeddingsHandler

* init apply_guardrail

* use apply guardrails for OpenAI moderations

* test_embeddings_handler_string_input

* test_openai_moderation_guardrail_apply_guardrail

* fix typing

* test_openai_moderation_responses_api_input_field

* test fixes
2026-02-05 14:40:15 -08:00
Ryan Crabbe
1ba10cc22c perf: eliminate duplicate dict(request.headers) calls
- Create _raw_headers once at start, reuse for SecretFields
- Reuse _headers from clean_headers() instead of creating new dict
  (clean_headers already removes authorization)
- Eliminates 2 of 3 dict(request.headers) calls per request
2026-02-05 14:26:26 -08:00
Ryan Crabbe
58291e5e65 perf: skip guardrails processing when not configured (16% faster add_litellm_data_to_request)
- Remove duplicate add_guardrails_from_policy_engine() call that was
  already being made inside move_guardrails_to_metadata()
- Add early-out guard in move_guardrails_to_metadata() to skip all
  guardrails processing when no guardrails/policies are configured
- Remove redundant data.update() wrapper around
  add_litellm_metadata_from_request_headers() which already modifies
  data in place

Benchmark (3 runs x 2000 req x 1000 concurrency):
- add_litellm_data_to_request: 8.87s → 7.45s (-16%)
- Guardrails overhead: 1.0s (11.2%) → 0.24s (3.2%) (-76%)
2026-02-05 14:09:11 -08:00
Ryan Crabbe
b4b27203fc perf: cache request.url.path in _get_metadata_variable_name (add_litellm_data_to_request)
Cache request.url.path once instead of accessing it 6 times (2 in
assistants check + 4 in LITELLM_METADATA_ROUTES loop). Reduces
per-call time from 47µs to 20µs (-58%).

Also inline the assistants API check to avoid function call overhead.

Adds 8 tests for _get_metadata_variable_name covering all return paths.
2026-02-05 14:09:11 -08:00
Chesars
1d0c2f47a7 docs: add Opus 4.6 to OpenRouter model map and update Anthropic docs
- Add openrouter/anthropic/claude-opus-4.6 to model cost map
- Update Bedrock docs to list Opus 4.6 and Sonnet 4.5 as 1M context compatible
- Add missing Opus 4.6, Opus 4.5, and Opus 4.1 to Anthropic supported models table
2026-02-05 18:45:40 -03:00
Chesars
b7b48fd8ba add supports_video_input for openrouter/auto 2026-02-05 18:04:54 -03:00
shin-bot-litellm
0649720f79
Fix test isolation for test_log_langfuse_v2_handles_null_usage_values (#20475)
Create fresh mock objects within the test instead of reusing mocks
from setUp that have side_effect configured. The setUp's side_effect
on mock_langfuse_client.trace can interfere with return_value settings
when tests try to reset and reconfigure mocks.

Using dedicated mock objects for this test avoids state pollution
from setUp's side_effect configuration and makes the test more
deterministic in parallel execution environments.
2026-02-05 12:57:41 -08:00
shin-bot-litellm
1d92968e17
Fix test isolation for test_watsonx_gpt_oss_prompt_transformation (#20474)
Set cached tokenizer config directly and mock both sync and async
tokenizer functions to avoid race conditions when running with
parallel test execution (-n 16).

The issue was that parallel tests could populate the
litellm.known_tokenizer_config cache between clearing it and
when the code checked it. This caused the sync code path to be
used instead of the async path, bypassing the mocked async functions.

Fix:
1. Set cache directly instead of clearing it
2. Also mock sync versions _get_tokenizer_config and _get_chat_template_file

This ensures the test is deterministic regardless of test execution order.
2026-02-05 12:57:20 -08:00
Chesars
b417de6fe8 feat(model_prices): add OpenRouter native models to model cost map
Add openrouter/auto, openrouter/free, and openrouter/bodybuilder
to the model prices and context window JSON. These are OpenRouter's
own native models with their capabilities (context window, function
calling, vision, reasoning, etc).
2026-02-05 17:44:01 -03:00
yuneng-jiang
b5956cb020
Merge pull request #20513 from BerriAI/litellm_ui_test_cov_01
[Infra] UI - Adding Unit Tests for Coverage
2026-02-05 12:19:03 -08:00
yuneng-jiang
b41876b5f5
Merge pull request #20452 from BerriAI/litellm_non_root_pkglk
[Fix] Non Root Dockerfile: Keep package-lock.json
2026-02-05 12:18:29 -08:00
yuneng-jiang
a04a2de6a1
Merge pull request #20472 from nina-hu/fix/timezone-daily-spend-filtering
fix(ui): adjust daily spend date filtering for user timezone
2026-02-05 12:12:44 -08:00
yuneng-jiang
21d6025c01 adding test for converage 2026-02-05 12:02:12 -08:00
Peter Dave Hello
e882296fdc Align Claude Opus 4.6 Bedrock metadata and model IDs
Unify follow-up fixes for Opus 4.6 pricing and routing metadata into
a single changeset.

Set long-context-capable Opus 4.6 entries to 1M input tokens where
>200K pricing is defined, align alias and dated capability metadata,
and add Bedrock Converse v1 IDs with and without :0 suffixes.

Keep regional endpoint pricing at a 10% premium over global entries
and mirror all cost-map changes in the backup file used for local
loading and offline fallback behavior.

Extend Opus 4.6 regression tests to verify metadata parity, Bedrock
regional pricing parity across :0 and non-:0 IDs, and converse model
registration in constants and runtime model sets.
2026-02-06 03:48:10 +08:00
Ishaan Jaffer
ea35ab6d4e day 0 blog post 2026-02-05 11:47:36 -08:00
Peter Dave Hello
dbd4bb5cf4
Add Claude Opus 4.6 (#20508)
Add Claude Opus 4.6 entries for Anthropic, Bedrock Converse, and Vertex AI.

Align pricing and capability metadata with Anthropic docs, including
long-context rates, above-200k prompt-caching rates, prefill removal,
and tool-use system prompt token counts.

Register the Bedrock Converse model ID in constants and add targeted
tests to validate model map values and converse registration.
2026-02-05 11:33:44 -08:00
Ishaan Jaff
eae5fa195e
[Feat] add claude-opus-4-6 to model cost map (#20506)
* add claude-opus-4-6 to model cost map

* fix azure_ai

* new model
2026-02-05 10:59:56 -08:00
Ishaan Jaff
d2bd029fa4
[Fix] 404 Not Found on /api/event_logging/batch endpoint (#20504)
* fix typing

* add event_logging_batch

* TestEventLoggingBatchEndpoint
2026-02-05 10:58:08 -08:00
Ryan Crabbe
6743d20de2 docs: add trailing slash to /mcp endpoint URLs
The /mcp endpoint requires a trailing slash because the MCP server
is mounted as a sub-application using app.mount(). Starlette's mount
behavior causes a 307 redirect from /mcp to /mcp/, which many MCP
clients fail to handle.

Updates documentation examples to use /mcp/ consistently.
2026-02-05 10:50:45 -08:00
Krish Dholakia
f65eec8fa8
docs: Update CLI arguments documentation with all available options (#20437)
- Reorganized documentation into logical sections (Server Configuration,
  Server Backend Options, SSL/TLS Configuration, Model Configuration,
  Model Parameters, Database Configuration, Debugging, Testing & Health Checks)
- Added missing CLI arguments:
  - --iam_token_db_auth: RDS IAM token authentication for database connections
  - --run_gunicorn: Start proxy with gunicorn backend
  - --run_hypercorn: Start proxy with hypercorn backend (HTTP/2 support)
  - --ssl_keyfile_path, --ssl_certfile_path, --ciphers: SSL/TLS configuration
  - --keepalive_timeout: Uvicorn keepalive timeout setting
  - --max_requests_before_restart: Worker recycling for memory management
  - --use_prisma_db_push: Alternative database schema update method
  - --test_async, --num_requests: Async endpoint testing
  - --version/-v: Print version
  - --max_budget: Set budget limits for API calls
  - --headers, --add_key, --save: Model configuration options
  - --use_queue: Celery workers for async endpoints
  - --local: Local debugging flag
- Updated default value for --num_workers to reflect actual behavior
- Added environment variable documentation for applicable options

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-02-05 08:46:37 -08:00
Sameer Kankute
9376fcf771
Apply suggestion from @greptile-apps[bot]
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-05 19:53:01 +05:30
Sameer Kankute
eabe3b2e9c fix: mypy issue 2026-02-05 19:50:16 +05:30
Sameer Kankute
b74afec2be
Merge pull request #20398 from BerriAI/litellm_oss_staging_02_04_2026
Litellm oss staging 02 04 2026
2026-02-05 19:42:36 +05:30
Sameer Kankute
26d25de577 fix: make sure gcs_bucket_name passes 2026-02-05 19:42:17 +05:30