Commit Graph

24948 Commits

Author SHA1 Message Date
Krish Dholakia
550feffeb9
Merge pull request #14512 from timelfrink/fix/lm-studio-bearer-header-14502
fix(lm_studio): resolve illegal Bearer header value issue
2025-09-13 09:40:30 -07:00
Krish Dholakia
a6ba744085
Merge pull request #14529 from BerriAI/litellm_contributor_prs_09_12_2025_p1
Fixed Log Tab Key Alias
2025-09-13 09:39:28 -07:00
Krish Dholakia
ad9515a81e
Merge branch 'main' into litellm_contributor_prs_09_12_2025_p1 2025-09-13 09:38:43 -07:00
Krish Dholakia
de8cf40ffa
Merge pull request #14482 from BerriAI/litellm_dev_09_11_2025_p3
Feature - new `litellm_request_debug=true` flag, enables emitting raw request/response log on single request
2025-09-12 19:56:53 -07:00
Krish Dholakia
663dbc6080
Merge pull request #14477 from BerriAI/litellm_dev_09_11_2025_p2
`/v1/messages` - don't send content block after message w/ finish reason + usage block + `/key/unblock` - support hashed tokens
2025-09-12 19:51:44 -07:00
Ishaan Jaff
8b3b943557 docs fix 2025-09-12 19:51:14 -07:00
Krish Dholakia
e254d9013b
Merge pull request #14469 from sashank5644/litellm_log_key_alias_filtering
Fixed Log Tab Key Alias filtering inaccurately for failed logs
2025-09-12 19:46:17 -07:00
Krrish Dholakia
05e3e3685b docs(forward_client_headers.md): document new forwarding client headers to llm api feature 2025-09-12 19:38:07 -07:00
Ishaan Jaff
93af8fd6ba
[QA] E2E - Testing for bedrock batches api (#14525)
* add bedrock/batch-anthropic.claude-3-5-sonnet-20240620-v1:0

* test_bedrock_batches_api

* fix

* fix import

* test_bedrock_batches_api
2025-09-12 19:31:19 -07:00
Ishaan Jaff
93d6e9bf49 pip install "google-genai==1.22.0" 2025-09-12 19:30:47 -07:00
Ishaan Jaff
20c390dc71
[Docs] - Bedrock Batches API (#14526)
* docs bedrock batch

* docs fix

* docs bedrock batches

* fix Create Batch Request

* docs fix
2025-09-12 19:08:13 -07:00
Krrish Dholakia
6596c24d5c fix(litellm_pre_call_utils.py): add wildcard model support for forwardable model group headers 2025-09-12 18:45:24 -07:00
Ishaan Jaff
075a089d82
[Feat] Bedrock Batches - Ensure correct transformation applied to incoming requests (#14522)
* use is_batch_jsonl_file

* fix valid_content_type

* fix transform_create_file_request

* fix _transform_openai_jsonl_content_to_bedrock_jsonl_content

* test_transform_openai_jsonl_content_to_bedrock_jsonl_content

* fix mypy linting errors

* fix BEDROCK_BATCH_MODEL

* fix working sample

* fix comment

* fix model list

* fix: use with managed batches

* refactor
2025-09-12 18:32:57 -07:00
Krrish Dholakia
bdd960c451 docs(admin_ui_sso.md): clarify sso usage on docs 2025-09-12 18:03:03 -07:00
Arseny Boykov
f4318bccd3
[Performance] Use _PROXY_MaxParallelRequestsHandler_v3 by default again (#14450)
* Use _PROXY_MaxParallelRequestsHandler_v3 by default (#14352)

(cherry picked from commit f3fa45cf8fbd5f5cce2f45a7312776d5005fb08e)
(cherry picked from commit 5b680bb4a3)

* Use random api_key for parallel requests test

* Fix off-by-one error in parallel request rate limit

The rate limiter was incorrectly rejecting requests when the limit was met, but not exceeded. The check in `is_cache_list_over_limit` was `int(counter_value) + 1 > current_limit`, which caused the first request to be rejected if the limit was 1.

This commit removes the `+ 1`, changing the logic to `int(counter_value) > current_limit`. The check now correctly allows requests up to the specified parallel limit.

* Test actual parallel requests

* Ensure rate limiting works correctly for multiple users

* Add sequential rate-limit test

* Revert random key usage
2025-09-12 17:33:55 -07:00
Ishaan Jaff
e87e50328e
[Feat] Bedrock Batches - Working e2e flow to upload file + create batch (#14518)
* fix: bedrock batches transform

* fix: upload_url

* fixes for model name

* fix upload_url

* fix bedrock batch test

* test_mock_bedrock_file_url_mapping
2025-09-12 15:37:09 -07:00
Tim Elfrink
b84785b5b7 fix(lm_studio): resolve illegal Bearer header value issue
- Change default API key from space ' ' to 'fake-api-key'
- Fixes httpcore.LocalProtocolError: Illegal header value b'Bearer  '
- Maintains compatibility with explicit API keys and environment variables
- Add comprehensive tests for provider info retrieval

Fixes #14502
2025-09-12 22:41:30 +02:00
Ishaan Jaff
18372f9ebe
Revert "fix vertex ai file upload" (#14501) 2025-09-12 12:02:24 -07:00
Sameerlite
fa175e8d90
Fix gemini cli error (#14417)
* Fix gemini cli error

* Added better handling

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
2025-09-12 11:56:51 -07:00
Sameer Kankute
1a123b2cd5
Litellm gemini cli bug fix (#14451)
* Fix gemini cli error

* Add reasoning request support

* Added better handling

* remove other PR code

* refactored code for better structure following

---------

Co-authored-by: sameer@berri.ai <sameer@berri.ai>
2025-09-12 11:55:26 -07:00
Boopesh Shanmugam
8b338a4d8c
User Headers X LiteLLM Users Mapping feature (#14485)
* Draft commit.

* user header mapping feature with backward compatibility with user_header_name field.

* user header mapping feature with backward compatibility with user_header_name field optimizations.

* Added unit tests.
2025-09-12 11:49:37 -07:00
Krish Dholakia
f8036a25a2
Merge pull request #14455 from lmnr-ai/fix/async-logging-tasks-context
propagate execution context into logging tasks
2025-09-12 00:36:08 -07:00
Krish Dholakia
113d2a8c5a
Merge pull request #14459 from holzman/fix-provider-budget
Fix provider budgets
2025-09-12 00:34:52 -07:00
Krish Dholakia
0413a701a2
Merge pull request #14460 from Sameerlite/litellm_vertex_gcs_bucket_issue
fix vertex ai file upload
2025-09-12 00:04:21 -07:00
Ishaan Jaff
f374103c46 UI new build 2025-09-11 20:20:52 -07:00
Krrish Dholakia
c802c472b5 docs(debugging.md): document new feature
Closes https://github.com/BerriAI/litellm/issues/13814
2025-09-11 20:17:39 -07:00
Ishaan Jaff
698a2dd382 fix: convert_anthropic_tool_to_databricks_tool 2025-09-11 20:12:01 -07:00
Ishaan Jaff
32d87c242b
[Fixes] Using Qwen API Tiered Pricing (#14479)
* fix: use dashscope cost calc

* add qwen logo
2025-09-11 20:07:41 -07:00
Krrish Dholakia
48619f2b7b fix(litellm_logging.py): support emitting raw response on self.litellm_request_debug is true
Addresses https://github.com/BerriAI/litellm/issues/13814
2025-09-11 20:07:26 -07:00
Ishaan Jaff
1e230e87e3 fixes for mypy 2025-09-11 20:05:29 -07:00
Krrish Dholakia
d89152bb2c feat(litellm_logging.py): support new litellm debug parameter - litellm_request_debug on requests
enables printing raw request when flag is set to true on requests
2025-09-11 20:04:24 -07:00
Ishaan Jaff
94038108ad fix dashscope api base 2025-09-11 20:00:54 -07:00
Ishaan Jaff
69ef062f55 fix tiered_pricing test 2025-09-11 19:56:44 -07:00
Ishaan Jaff
51d5255452
[Bug]: Azure OpenAI & AI Foundry Reject Image Generation Payload Due to extra_body Injection in LiteLLM v1.76.3 (#14475)
* add request body azure img gen

* fix test_get_optional_params_image_gen_filters_empty_values

* test_azure_image_generation_request_body

* test_azure_image_generation_request_body
2025-09-11 19:39:06 -07:00
Krrish Dholakia
0c8b311155 test: add unit testing for both flows on key unblock 2025-09-11 19:15:15 -07:00
Krrish Dholakia
0f6898ad0a fix(key_management_endpoints.py): check if key is a hashed token or sk key before lookup
Fixes https://github.com/BerriAI/litellm/issues/13887
2025-09-11 19:10:00 -07:00
Krrish Dholakia
805069c287 fix(adapters/streaming_iterator.py): Don't send content block after message delta block is sent
Fixes https://github.com/BerriAI/litellm/issues/14315
2025-09-11 18:52:02 -07:00
Ishaan Jaff
dda115cc6d
[Feat] Cost Tracking - Add support for Tiered Cost Tracking for Qwen API (Dashscope) (#14471)
* add dashscope logo

* docs fix

* docs fix

* fix supports_batch_calling

* fix naming

* fix input_cost_per_audio_token

* use output_cost_per_reasoning_token

* add tiered_pricing in get_model_info

* test fixes

* fix cost calc

* ruff fix
2025-09-11 18:14:39 -07:00
Krish Dholakia
b1025b54fb
Merge pull request #14466 from BerriAI/revert-14252-main
Revert "Add additionalProperties to vertex ai Schema definition"
2025-09-11 14:38:57 -07:00
Krish Dholakia
5c3d407b7a
Revert "Add additionalProperties to vertex ai Schema definition" 2025-09-11 14:38:25 -07:00
Sashanken
c6626559a2 Fixed Log Tab Key Alias filtering inaccurately for failed logs 2025-09-11 13:05:48 -07:00
Burt Holzman
e9e548d797 Fix provider budgets 2025-09-11 12:08:43 -05:00
Sameer Kankute
090e0fddf4 fix vertex ai file upload 2025-09-11 22:20:54 +05:30
Din
ee5a9d0aa0 propagate execution context into logging tasks 2025-09-11 15:54:40 +01:00
Ishaan Jaff
258b674dbb fix deepinfra test 2025-09-10 19:39:23 -07:00
Ishaan Jaff
385206c4bc fix code QA 2025-09-10 19:35:29 -07:00
Ishaan Jaff
ea377de5a5 fixes mypy linting 2025-09-10 19:34:35 -07:00
Ishaan Jaff
a13aa4740a
[Fixes] Bug fixes to using LiteLLM MCP Gateway (#14392)
* fix: use _get_mcp_servers_in_path

* fix checks for using litellm_proxy as MCP tool provider

* fix: fix mcp_tools_with_litellm_proxy

* fix: fix aresponses_api_with_mcp

* aresponses_api_with_mcp

* test_mcp_allowed_tools_filtering

* fix: _filter_mcp_tools_by_allowed_tools

* fix: _filter_mcp_tools_by_allowed_tools

* test_streaming_responses_api_with_mcp_tools

* fixes: test tools transfrom MCP->OpenaI spec

* test_streaming_responses_api_with_mcp_tools

* fix: chat ui allow multi select with allowed tools

* fix: use correct MCP events with litellm proxy response API

* fix get_event_model_class

* fix litellm proxy MCP handler

* fix MCPEnhancedStreamingIterator

* chat ui show list tools result

* UI: show MCP events

* fix stream iterator

* fixes: litellm proxy mcp handler

* test responses + mcp

* fix: update responses api with mcp handling

* ruff check fix

* central: _process_mcp_tools_to_openai_format

* fix: refactor code

* test_mcp_allowed_tools_filtering

* test mcp with litellm proxy

* fix mcp call

* demo: video using MCP ui

* fixes for using stream iterator

* test_no_duplicate_mcp_tools_in_streaming_e2e

* docs fix

* fix code snippet
2025-09-10 19:12:11 -07:00
Ishaan Jaff
c09d9e5e8e
feat: Validate LiteLLM Virtual Key format (#14428)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: ishaan <ishaan@berri.ai>
2025-09-10 18:58:48 -07:00
Ishaan Jaff
1f42e41c8d
[Bug]: Fix Authorization header not being sent to configured MCP servers (#14422)
* test: test_mcp_server_config_auth_value_header_used

* fix: authentication_token

* docs: fix instructions on using responses api with MCPs

* mcp fixes
2025-09-10 16:41:08 -07:00