Commit graph

31779 commits

Author SHA1 Message Date
Sameer Kankute
c5c1fbc5a2 Fix test_calculate_usage_completion_tokens_details_always_populated and logging object test 2026-01-28 18:00:42 +05:30
Sameer Kankute
0fadcbb21f
Merge pull request #19915 from BerriAI/litellm_x_ai_responses_web
Add xai websearch params support fo Responses API
2026-01-28 17:34:28 +05:30
Sameer Kankute
7386621d04
Merge pull request #19839 from BerriAI/litellm_oss_staging_01_27_2026
Litellm oss staging 01 27 2026
2026-01-28 17:33:27 +05:30
Sameer Kankute
f6ead49afe Add Prompt caching and reasoning support for MiniMax, GLM, Xiaomi 2026-01-28 17:25:26 +05:30
Sameer Kankute
4f7425df0c
Merge pull request #19661 from Chesars/fix/oci-image-url-format
fix(oci): serialize imageUrl as object for OCI GenAI API
2026-01-28 15:26:50 +05:30
Sameer Kankute
f58305b747
Merge pull request #19882 from milan-berri/fix/tiktoken-offline-import-order
initialize tiktoken environment at import time to support offline usage
2026-01-28 15:13:47 +05:30
Sameer Kankute
156751e8fc
Merge pull request #19919 from lizhen921/fix/anthropic-cache-control-null-issue
fix(anthropic): remove explicit cache_control null in tool_result content
2026-01-28 13:24:56 +05:30
yuneng-jiang
07c8618227 Fixing tests 2026-01-27 23:47:47 -08:00
lizhen
e4cb28aa07 fix(anthropic): remove explicit cache_control null in tool_result content
Fixes issue where tool_result content blocks include explicit
'cache_control': null which breaks some Anthropic API channels.

Changes:
- Only include cache_control field when explicitly set and not None
- Prevents serialization of null values in tool_result text content
- Maintains backward compatibility with existing cache_control usage

Related issue: Anthropic tool_result conversion adds explicit null values
that cause compatibility issues with certain API implementations.

Co-Authored-By: Claude (claude-4.5-sonnet) <noreply@anthropic.com>
2026-01-28 15:39:01 +08:00
yuneng-jiang
c4d3750601 adding tests 2026-01-27 23:38:23 -08:00
yuneng-jiang
58eca8fb28 Spend logs setting modal 2026-01-27 23:34:50 -08:00
Sameer Kankute
9b44984510
Merge pull request #19899 from xianzongxie-stripe/add_native_background_mode_override
Add native_background_mode to override polling_via_cache for specific models
2026-01-28 12:27:19 +05:30
Sameer Kankute
bd15ebba84 fix: Pydantic will fail to parse it because cached_tokens is required but not provided 2026-01-28 11:51:26 +05:30
yuneng-jiang
ab655ef296
Merge pull request #19913 from BerriAI/litellm_store_prompt_backend
[Feature] Allow Dynamic Setting of store_prompts_in_spend_logs
2026-01-27 22:07:57 -08:00
Sameer Kankute
6fb2a0d11f Fix: output_tokens_details.reasoning_tokens None 2026-01-28 11:35:18 +05:30
yuneng-jiang
28ca991296 Allow dynamic setting of store_prompts_in_spend_logs 2026-01-27 20:52:07 -08:00
Sameer Kankute
d76fb5932a Add xai websearch params support 2026-01-28 09:54:43 +05:30
Ishaan Jaff
3080e04180
[Feat] UI: Allow Admins to control what pages are visible on LeftNav (#19907)
* feat: enabled_ui_pages_internal_users

* init ui for internal user controsl

* fix ui settings

* fix build

* fix leftnav

* fix leftnav

* test fixes

* fix leftnav

* isPageAccessibleToInternalUsers

* docs fix

* docs ui viz
2026-01-27 19:31:24 -08:00
Sameer Kankute
74b308bc2d
Merge pull request #19911 from BerriAI/litellm_merge_timeout_issue
merge main in timeout
2026-01-28 08:56:49 +05:30
Sameer Kankute
5276085f3c
Merge branch 'litellm_fix_timeout_test_fix' into litellm_merge_timeout_issue 2026-01-28 08:56:29 +05:30
mubashir1osmani
9a245031bd
feat(hosted_vllm): support thinking parameter in anthropic_messages() and .completion()
feat(hosted_vllm): support `thinking` parameter in `anthropic_messages()` and `.completion()`
2026-01-27 22:13:53 -05:00
yuneng-jiang
b76286e11c
Merge pull request #19908 from BerriAI/litellm_ui_model_table_server_sort
[Feature] UI - Model Page: Server Sort
2026-01-27 19:02:54 -08:00
Sameer Kankute
42a0d576f3
Merge pull request #19910 from BerriAI/main
merge 01 27
2026-01-28 08:30:47 +05:30
Cesar Garcia
64c102e3c2
fix(gemini): subtract implicit cached tokens from text_tokens for correct cost calculation (#19775)
When Gemini uses implicit caching, it returns cachedContentTokenCount but
NOT cacheTokensDetails. Previously, text_tokens was not adjusted in this case,
causing costs to be calculated as if all tokens were non-cached.

This fix subtracts cachedContentTokenCount from text_tokens when no
cacheTokensDetails is present (implicit caching), ensuring correct cost
calculation with the reduced cache_read pricing.
2026-01-27 18:18:47 -08:00
Cesar Garcia
807ba011eb
fix(main): use local tiktoken cache in lazy loading (#19774)
The lazy loading implementation for encoding in __getattr__ was calling
tiktoken.get_encoding() directly without first setting TIKTOKEN_CACHE_DIR.
This caused tiktoken to attempt downloading the encoding file from the
internet instead of using the local copy bundled with litellm.

This fix uses _get_default_encoding() from _lazy_imports which properly
sets TIKTOKEN_CACHE_DIR before loading tiktoken, ensuring the local cache
is used.
2026-01-27 18:16:58 -08:00
Brian Caswell
920ef665a3
inspect BadRequestError after all other policy types (#19878)
As indicated by https://docs.litellm.ai/docs/exception_mapping,
BadRequestError is used as the base type for multiple exceptions.  As
such, it should be tested last in handling retry policies.

This updates the integration test that validates retry policies work as
expected.

Fixes #19876
2026-01-27 18:15:04 -08:00
yuneng-jiang
29c841d7f9 Fixing build and tests 2026-01-27 18:14:30 -08:00
Ryan Wilson
70eb732b41
docs: fix guardrail logging docs (#19833) 2026-01-27 18:13:04 -08:00
Pragya Sardana
b4a27712a1
Add Init Containers in the community helm chart (#19816) 2026-01-27 18:10:47 -08:00
yuneng-jiang
37bfab929d All Models Page server side sorting 2026-01-27 18:08:17 -08:00
Teo Stocco
d6cf4df3cb
fix: tool with antropic #19800 (#19805) 2026-01-27 18:02:37 -08:00
Jay Prajapati
6a9d41234f
fix: allow tool_choice for Azure GPT-5 chat models (#19813)
* fix: don't treat gpt-5-chat as GPT-5 reasoning

* fix: mark azure gpt-5-chat as supporting tool_choice

* test: cover gpt-5-chat params on azure/openai
2026-01-27 17:51:13 -08:00
Jay Prajapati
4717f742eb
fix: filter unsupported beta headers for Bedrock Invoke API (#19877)
- Add whitelist-based filtering for anthropic_beta headers
- Only allow Bedrock-supported beta flags (computer-use, tool-search, etc.)
- Filter out unsupported flags like mcp-servers, structured-outputs
- Remove output_format parameter from Bedrock Invoke requests
- Force tool-based structured outputs when response_format is used

Fixes #16726
2026-01-27 17:47:27 -08:00
Harshit Jain
54a83e75cc
fix: add fix for migration issue and and stable linux debain (#19843) 2026-01-27 17:38:02 -08:00
Harshit Jain
d0939075bc
fix: guardrails issues streaming-response regex (#19901) 2026-01-27 17:36:18 -08:00
michelligabriele
8c4ccdc313
test(proxy): add regression tests for vertex passthrough model names with slashes (#19855)
Added test cases for custom model names containing slashes in Vertex AI
passthrough URLs (e.g., gcp/google/gemini-2.5-flash).

Test cases:
- gcp/google/gemini-2.5-flash
- gcp/google/gemini-3-flash-preview
- custom/model
2026-01-27 17:34:40 -08:00
yuneng-jiang
936a4fc884
Merge pull request #19905 from BerriAI/litellm_ci_ui_fix
[Infra] CI/CD - Fixing UI Tests
2026-01-27 17:21:39 -08:00
yuneng-jiang
01e22fd5ab Fixing UI tests 2026-01-27 17:19:02 -08:00
yuneng-jiang
7109aafe4c
Merge pull request #19903 from BerriAI/litellm_ui_model_table_adjustable_col
[Feature] Add sortBy and sortOrder params for /v2/model/info
2026-01-27 17:16:22 -08:00
yuneng-jiang
a7ead71499 ruff check 2026-01-27 17:00:14 -08:00
yuneng-jiang
1581bcf985 add sortBy and sortOrder params for /v2/model/info 2026-01-27 16:54:52 -08:00
Xianzong Xie
f9eea06a37 Add tests for native_background_mode feature
Added 8 new unit tests for the native_background_mode feature:
- test_polling_disabled_when_model_in_native_background_mode
- test_polling_disabled_for_native_background_mode_with_provider_list
- test_polling_enabled_when_model_not_in_native_background_mode
- test_polling_enabled_when_native_background_mode_is_none
- test_polling_enabled_when_native_background_mode_is_empty_list
- test_native_background_mode_exact_match_required
- test_native_background_mode_with_provider_prefix_in_request
- test_native_background_mode_with_router_lookup

Committed-By-Agent: cursor
2026-01-27 16:48:22 -08:00
Ishaan Jaff
51339f5ef1
[Feat] RAG API - Add s3_vectors as provider on /vector_store/search API + UI for creating + PDF support for /rag/ingest (#19895)
* init S3VectorsRAGIngestion as a supported ingestion provider for RAG API

* test: TestRAGS3Vectors

* init S3VectorsVectorStoreOptions

* init s3 vectors

* code clean up + QA

* fix: get_credentials

* S3VectorsRAGIngestion

* TestRAGS3Vectors

* docs: AWS S3 Vectors

* add asyncio QA checks

* fix: S3_VECTORS_DEFAULT_DIMENSION

* init ui for bedrock s3 vectors

* fix add /search support for s3_vectors

* init atransform_search_vector_store_request

* feat: S3VectorsVectorStoreConfig

* TestS3VectorsVectorStoreConfig

* atransform_search_vector_store_request

* fix: S3VectorsVectorStoreConfig

* add validation for bucket name etd

* fix UI validation for s3 vector store

* init extract_text_from_pdf

* add pypdf

* fix code QA checks

* fix navbar

* init s3_vector.png

* fix QA code
2026-01-27 16:30:59 -08:00
Xianzong Xie
0b8c10c488 Add native_background_mode to override polling_via_cache for specific models
This follow-up to PR #16862 allows users to specify models that should use
the native provider's background mode instead of polling via cache.

Config example:
  litellm_settings:
    responses:
      background_mode:
        polling_via_cache: ["openai"]
        native_background_mode: ["o4-mini-deep-research"]
        ttl: 3600

When a model is in native_background_mode list, should_use_polling_for_request
returns False, allowing the request to fall through to native provider handling.

Committed-By-Agent: cursor
2026-01-27 15:54:46 -08:00
Ishaan Jaff
fe444f3ed5
[Feat] RAG API - Add support for using s3 Vectors as Vector Store Provider for /rag/ingest (#19888)
* init S3VectorsRAGIngestion as a supported ingestion provider for RAG API

* test: TestRAGS3Vectors

* init S3VectorsVectorStoreOptions

* init s3 vectors

* code clean up + QA

* fix: get_credentials

* S3VectorsRAGIngestion

* TestRAGS3Vectors

* docs: AWS S3 Vectors

* add asyncio QA checks

* fix: S3_VECTORS_DEFAULT_DIMENSION
2026-01-27 14:45:26 -08:00
yuneng-jiang
93d6aae4a3 mypy linting 2026-01-27 14:06:54 -08:00
yuneng-jiang
1411a227aa bulk update keys endpoint 2026-01-27 13:58:32 -08:00
jayy-77
980ec2afe8 test: cover LITELLM_USER_AGENT override in custom_httpx handlers 2026-01-28 02:09:47 +05:30
jayy-77
b87076875b refactor: drop disable_default_user_agent setting 2026-01-28 02:09:40 +05:30
jayy-77
bf0670edfd fix: honor LITELLM_USER_AGENT for default User-Agent 2026-01-28 02:09:30 +05:30