Commit graph

35930 commits

Author SHA1 Message Date
Sameer Kankute
6830b63269
Revert "fix(whisper): correct output_cost_per_second pricing and cost calcula…"
This reverts commit 00dd984415.
2026-03-21 20:44:52 +05:30
Sameer Kankute
676a79e9f7 bump: litellm-enterprise 0.1.34 → 0.1.35 2026-03-21 20:42:34 +05:30
Sameer Kankute
5b5c998dbd
Merge branch 'main' into litellm_oss_staging_03_19_2026 2026-03-21 20:31:08 +05:30
Sameer Kankute
c1e90ed300 Fix mypy errors 2026-03-21 20:29:14 +05:30
Cesar Garcia
a3095f47fd
Merge pull request #24076 from Chesars/feat/cache-control-tool-config-21969
feat(bedrock): support cache_control_injection_points for tool_config location
2026-03-20 23:29:53 -03:00
Cesar Garcia
a4f091c025
Merge pull request #24073 from Chesars/feat/gemini-context-circulation
feat(gemini): support context circulation for server-side tool combination
2026-03-20 23:29:30 -03:00
Chesars
29ab11a9c2 fix(types): add CacheControlToolConfigInjectionPoint to union type 2026-03-20 23:23:28 -03:00
Cesar Garcia
ead607a42b
Merge pull request #24072 from Chesars/fix/strict-additional-properties-20997-clean
fix(adapter): add additionalProperties: false for OpenAI strict mode in Anthropic adapter
2026-03-20 22:19:39 -03:00
yuneng-jiang
d8e4fc4dd0
Merge pull request #24260 from BerriAI/litellm_yj_march_19_2026
[Infra] Merge internal dev branch with main
2026-03-20 17:35:19 -07:00
yuneng-jiang
2ca4fa6189
Merge branch 'main' into litellm_yj_march_19_2026 2026-03-20 17:28:41 -07:00
yuneng-jiang
e6e3085845
Merge pull request #24258 from joereyna/fix/anthropic-file-content-test-mock
fix(test): mock get_auth_header instead of get_api_key in anthropic file content test
2026-03-20 16:14:59 -07:00
yuneng-jiang
e678ddea43 Fix unreachable special MCP server name guard in add_mcp_server
The special name check (all_team_servers, all_proxy_servers) was an elif
after the server_id-is-not-None check, making it unreachable since special
names are non-None strings. Split into separate if blocks so the special
name guard runs before the duplicate-ID check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 16:12:48 -07:00
joereyna
f0e0d98f86 fix(test): mock get_auth_header instead of get_api_key in anthropic file content test 2026-03-20 16:07:09 -07:00
yuneng-jiang
6862930538 Revert test to match reverted team MCP manager feature
The team MCP manager feature was reverted in PR #24255, so the test
needs to go back to the original single auth failure test that expects
a 403 for non-admin users.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 15:44:00 -07:00
yuneng-jiang
1fad0d557d
Merge pull request #24255 from BerriAI/revert-24171-litellm_/awesome-dhawan
Revert "[Feature] Team MCP Server Manager Role"
2026-03-20 15:42:10 -07:00
yuneng-jiang
c9683c6f97
Revert "[Feature] Team MCP Server Manager Role" 2026-03-20 15:41:57 -07:00
ryan-crabbe
72c307df0e
Merge pull request #24217 from BerriAI/litellm_ryan_march_18
feat: add control plane for multi-proxy worker management
2026-03-20 14:05:19 -07:00
Ryan Crabbe
541863a566 Merge branch 'litellm_ryan_march_18' of https://github.com/BerriAI/litellm into litellm_ryan_march_18 2026-03-20 13:58:32 -07:00
Ryan Crabbe
6f81eb01fe fix: apply Black formatting to ui_sso.py 2026-03-20 13:57:26 -07:00
ryan-crabbe
59b4a05782
Merge branch 'main' into litellm_ryan_march_18 2026-03-20 13:36:37 -07:00
yuneng-jiang
ba4aae02c7 Fix outdated MCP server auth test for team MCP manager flow
The test_create_mcp_server_auth_failure test expected a 403 for non-admin
users, but the team MCP manager feature changed the auth flow to first
check for team_id (400) before checking permissions. Split into two tests:
one for missing team_id (400) and one for non-manager rejection (403).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 13:10:10 -07:00
yuneng-jiang
5d317c3a5c Merge remote-tracking branch 'origin' into litellm_yj_march_19_2026 2026-03-20 12:59:21 -07:00
yuneng-jiang
50f88c8642
Merge pull request #24243 from BerriAI/litellm_/gifted-spence
[Docs] Add missing team_member_budget_duration param to new_team docstring
2026-03-20 12:51:13 -07:00
yuneng-jiang
4d198558c8
Merge branch 'main' into litellm_/gifted-spence 2026-03-20 12:44:20 -07:00
yuneng-jiang
404c68c74b Add missing team_member_budget_duration param to new_team docstring
Fixes CI failure in test_api_docs.py which validates that all Pydantic
model fields are documented in endpoint docstrings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 12:42:35 -07:00
yuneng-jiang
3ea69c9539 Merge remote-tracking branch 'origin' into litellm_yj_march_19_2026 2026-03-20 12:37:26 -07:00
yuneng-jiang
b36269e2c1
Merge pull request #24171 from BerriAI/litellm_/awesome-dhawan
[Feature] Team MCP Server Manager Role
2026-03-20 12:30:50 -07:00
yuneng-jiang
700fd86de9 Fix importorskip guard and add LiteLLM_TeamTableCachedObj import
- Add pytest.importorskip("mcp") at module level so tests skip cleanly
  in CI environments without the mcp package (instead of ImportError)
- Import LiteLLM_TeamTableCachedObj into MCP_AVAILABLE block so type
  annotations resolve for static analysis and get_type_hints()
- Remove string quotes from type annotations now that the import exists

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 12:13:09 -07:00
yuneng-jiang
c6ffda9671
Merge pull request #23484 from michelligabriele/fix/team-member-budget-duration-on-create
fix(proxy): add team_member_budget_duration to NewTeamRequest
2026-03-20 11:56:30 -07:00
yuneng-jiang
f884e4ac66
Merge branch 'main' into fix/team-member-budget-duration-on-create 2026-03-20 11:48:08 -07:00
ryan-crabbe
d381b58570
Merge branch 'main' into litellm_ryan_march_18 2026-03-20 11:44:45 -07:00
BillionToken
78139472a1
fix(moonshot): preserve reasoning_content on Pydantic Message objects in multi-turn tool calls (#23828)
* fix(moonshot): preserve reasoning_content on Pydantic Message objects in multi-turn tool calls

The condition 'reasoning_content not in msg' doesn't work correctly for
Pydantic Message objects because they don't support the 'in' operator
like dicts do. This caused reasoning_content to be stripped from
assistant messages in multi-turn conversation history.

Changed the condition to use msg.get('reasoning_content') instead,
which works correctly for both dicts and Pydantic models.

Fixes #23765

* added newline eof

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update tests/test_litellm/llms/moonshot/test_moonshot_chat_transformation.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Simplify assertions in test_moonshot_chat_transformation

Removed redundant assertions for non-assistant messages.

---------

Co-authored-by: BillionClaw <267901332+BillionClaw@users.noreply.github.com>
Co-authored-by: Aarish Alam <arishalam121@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-21 00:09:17 +05:30
Geoffray Viossat
00dd984415
fix(whisper): correct output_cost_per_second pricing and cost calculation (#23842)
- Set output_cost_per_second to 0.0 (was 0.0001) for whisper-1 and
  azure/whisper-1: transcription is billed on input duration only,
  not output duration
- Fix cost_per_second() in openai/cost_calculation.py: change elif to if
  so input_cost_per_second is evaluated independently of output_cost_per_second,
  and remove the erroneous completion_cost = 0.0 assignment that masked
  any previously-set output cost
- Add TestCostPerSecondArithmetic unit tests covering both cost fields,
  the None-guard, and zero-duration edge case

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 00:02:15 +05:30
Jayachander Reddy kandakatla
714c1b80e1
docs(pricing): add official source links for Azure DeepSeek & Cohere models (#20181)
Added 'source' keys to Azure DeepSeek v3.2(Standard & Speciale) and Cohere Rerank 4.0 (Pro & Fast) entries for pricing verification.
2026-03-20 23:55:53 +05:30
Krish Dholakia
e8ec9eb44a
Merge pull request #24220 from milan-berri/fix/streaming-metadata-hidden-params
fix(logging): merge hidden_params into metadata for streaming requests
2026-03-20 11:25:45 -07:00
Christopher Baer
589c6cdad0
fix(gemini-embeddings): convert task_type to camelCase taskType for Gemini API (#24191)
The Gemini REST API documents the embedding task type parameter as
camelCase `taskType`. The existing transformation functions convert
`dimensions` to `outputDimensionality` but miss the parallel
`task_type` to `taskType` conversion. This adds that conversion to
both `transform_openai_input_gemini_content` (batchEmbedContents path)
and `transform_openai_input_gemini_embed_content` (embedContent path).

Fixes #24190
2026-03-20 22:32:22 +05:30
milan-berri
5372334233
Merge branch 'main' into fix/streaming-metadata-hidden-params 2026-03-20 16:32:36 +00:00
Milan
f36a59d196 fix(logging): merge hidden_params into metadata for streaming completions
Non-streaming paths call _process_hidden_params_and_response_cost; streaming
assembles the full response later and skipped that, so litellm_params.metadata
 lacked hidden_params (e.g. response_cost for OTEL/OpenSearch).

- Add _merge_hidden_params_from_response_into_metadata and call it from
  success_handler and async_success_handler after cost is set, before
  _build_standard_logging_payload.
- Unit tests for merge helper.

Tests: pytest tests/test_litellm/litellm_core_utils/test_litellm_logging.py
Made-with: Cursor
2026-03-20 16:27:41 +00:00
yuneng-jiang
1cd7a48c33 Add tests for edit and delete MCP server manager paths
Addresses Greptile feedback about missing integration tests for PUT/DELETE
when invoked by mcp_server_manager role. Adds tests for edit success/403,
delete success with team cleanup/403, and the _remove_mcp_server_from_team
helper directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 09:19:53 -07:00
Krish Dholakia
523fbed233
Merge pull request #24199 from stias/fix/bedrock-count-tokens-custom-endpoint
fix(bedrock): respect api_base and aws_bedrock_runtime_endpoint in count_tokens endpoint
2026-03-20 09:10:30 -07:00
yuneng-jiang
b8c9bf7d25 refactor: extract _auto_assign and _remove helpers, use team_endpoints helper
- Replace raw prisma_client.db.litellm_teamtable.update with
  handle_update_object_permission from team_endpoints (follows
  established helper-function pattern)
- Extract _auto_assign_mcp_server_to_team and
  _remove_mcp_server_from_team helpers for reuse and testability
- Update tests to mock at the correct boundaries

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 09:05:18 -07:00
Seokjun Yang
d3afaf613d
Update tests/litellm_utils_tests/test_bedrock_token_counter.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-20 22:21:22 +09:00
Seokjun Yang
eb733702fc
Update tests/litellm_utils_tests/test_bedrock_token_counter.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-20 22:21:15 +09:00
Sameer Kankute
8da3efdfbe Fix code qa and mypy lint issues 2026-03-20 18:21:01 +05:30
Sameer Kankute
4088f2b6da
Merge branch 'main' into litellm_oss_staging_03_19_2026 2026-03-20 14:46:58 +05:30
Sameer Kankute
009cbfa799
Merge pull request #24088 from Point72/ephrimstanley/limits
feat: add proxy-wide default api key tpm/rpm limits
2026-03-20 14:46:38 +05:30
Seokjun Yang
72902c39c5
Remove extra newline in common_utils.py 2026-03-20 18:09:52 +09:00
stias
bc4608e718
fix(bedrock): respect api_base and aws_bedrock_runtime_endpoint in count_tokens endpoint
The /v1/messages/count_tokens endpoint was hardcoding the Bedrock runtime
URL, ignoring api_base and aws_bedrock_runtime_endpoint settings. This
aligns it with invoke/converse handlers by using the existing
get_runtime_endpoint() method for consistent endpoint resolution.

Signed-off-by: stias <seokjun.yang@mycraft.kr>
2026-03-20 17:58:20 +09:00
yuneng-jiang
8c396e5ca9
Merge pull request #24172 from BerriAI/litellm_extract_useChatHistory_hook
[Refactor] Extract useChatHistory hook from ChatUI.tsx
2026-03-20 00:17:07 -07:00
yuneng-jiang
bdf24757c0
Merge pull request #24189 from BerriAI/litellm_teams_table_modernize
[Feature] UI - Teams: Modernize Teams Table
2026-03-20 00:16:47 -07:00