Commit graph

32892 commits

Author SHA1 Message Date
Sameer Kankute
8305bbee21 Add mapping for medium thinking level for gemini-3.1-pro-preview 2026-02-19 22:14:19 +05:30
jquinter
ec28395054
Merge pull request #21564 from BerriAI/fix/competitor-constants-env-override
fix(constants): add env var override support for COMPETITOR_LLM_TEMPERATURE and MAX_COMPETITOR_NAMES
2026-02-19 11:51:57 -03:00
michelligabriele
053ee4826f
fix(websearch_interception): fix pre_call_deployment_hook not triggering via proxy router (#21433)
* fix(websearch_interception): fix pre_call_deployment_hook not triggering via proxy router

Fix provider lookup (check top-level kwargs + fallback to get_llm_provider),
return full kwargs dict instead of partial, and use OpenAI-format tool definition.

* remove unnecessary inline import
2026-02-19 06:38:45 -08:00
Julio Quinteros Pro
4227690025 fix(constants): add env var override support for COMPETITOR_LLM_TEMPERATURE and MAX_COMPETITOR_NAMES
These constants were added as hardcoded values in #21533 without environment
variable support, causing test_all_numeric_constants_can_be_overridden to fail.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 11:28:49 -03:00
Sameer Kankute
ca34e9a3f9
Merge pull request #21543 from BerriAI/litellm_passthrough_endpoint_method
Add method based routing for passthrough endpoints
2026-02-19 19:34:04 +05:30
Sameer Kankute
ca91814b85 rrevert changes 2026-02-19 19:33:34 +05:30
Sameer Kankute
f2393fc9cb Merge main into litellm_passthrough_endpoint_method
Resolved conflicts in pass_through_endpoints.py by:
- Accepting main's formatting and mypy fixes
- Preserving branch's method support feature
- Preserving branch's default_query_params feature

Combined changes include:
- Method filtering for passthrough endpoints
- Default query parameters support
- Updated route key format to include methods
- Code formatting improvements from main
- Fixed type annotations

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-19 19:22:41 +05:30
Sameer Kankute
647e5237a7
Merge pull request #21555 from BerriAI/litellm_server_side_compaction_trans
[Feat] Add server side compaction translation from openai to anthropic
2026-02-19 19:14:37 +05:30
Sameer Kankute
8bcca905a7
Merge pull request #21539 from BerriAI/litellm_fix_azure_store_param
Fix: add stop param as supported for openai and azure
2026-02-19 19:12:43 +05:30
Sameer Kankute
36e21830db
Merge pull request #21550 from BerriAI/litellm_add_global_usage
[Feat] Add Default usage data configuration
2026-02-19 19:10:35 +05:30
Sameer Kankute
1ad9d26c6f
Merge pull request #21559 from BerriAI/fix_openai/bge-multilingual-gemma2
Fix usage in xai
2026-02-19 19:07:09 +05:30
Sameer Kankute
308cdb2720
Merge pull request #21557 from SherifWaly/sherif.waly/add-reasoning-multi-turn-hosted-vllm
Convert thinking_blocks to content blocks for hosted_vllm multi-turn
2026-02-19 18:56:09 +05:30
Sameer Kankute
fc7fa73b6f Fix usage in xai 2026-02-19 18:48:30 +05:30
Sameer Kankute
8432d3488e
Merge pull request #20841 from themavik/fix/license-check-debug-log-spam-17953
fix(proxy): prevent is_premium() debug log spam on every request
2026-02-19 18:33:41 +05:30
Sameer Kankute
0bea9c1dbc
Merge pull request #21497 from SolitudePy/fix/github-provider-match-openai-metadata
fix: allow github aliases to reuse upstream model metadata
2026-02-19 18:30:33 +05:30
Sameer Kankute
0617afef30
Merge pull request #17430 from richardmcsong/patch-1
Uncomment response_model in user_info endpoint
2026-02-19 18:28:49 +05:30
Sameer Kankute
ea8c8ebc05
Merge pull request #21547 from ZeroAurora/remove-dashscope-str-transformation
fix: remove list-to-str transformation from dashscope
2026-02-19 18:20:06 +05:30
sherif.waly
5774c845d8 Convert thinking_blocks to content blocks for hosted_vllm multi-turn
For multi-turn conversations, convert thinking_blocks on assistant
messages into content blocks prepended before the rest of the content,
so reasoning context is passed back to the hosted_vllm API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-19 12:25:18 +00:00
Sameer Kankute
f86b195f88 rrevert changes 2026-02-19 16:47:29 +05:30
Sameer Kankute
02e10c9a74
Merge branch 'main' into litellm_server_side_compaction_trans 2026-02-19 16:45:53 +05:30
Sameer Kankute
a52fc738af Add server side compaction translation from openai to anthropic 2026-02-19 16:44:35 +05:30
Harshit Jain
9a71ba3505
Merge pull request #21078 from Harshit28j/litellm_project_management_apis
Litellm project management apis
2026-02-19 14:26:11 +05:30
Sameer Kankute
0eb2a0c014 Add Default usage data configuration 2026-02-19 14:04:07 +05:30
Harshit Jain
bdf01fa283
fix mypy error 2026-02-19 14:04:00 +05:30
Sameer Kankute
0771ea8d42 fix log 2026-02-19 13:27:50 +05:30
ZeroAurora
64c916b37b fix: remove list-to-str transformation from dashscope 2026-02-19 07:30:13 +00:00
Sameer Kankute
1ceb7d8e29 Add default query param in UI 2026-02-19 12:48:27 +05:30
Sameer Kankute
4a50c55d84 Add allow defining default query params for a pass through 2026-02-19 12:48:03 +05:30
Sameer Kankute
26c3d7debc Update Ui for adding method to passthrough endpoints 2026-02-19 11:59:36 +05:30
Sameer Kankute
5bd7bf1b3e Add documentation for adding method 2026-02-19 11:59:09 +05:30
Sameer Kankute
4e111d4372 Add test got method speicifc routing 2026-02-19 11:58:48 +05:30
Sameer Kankute
32bfbbfbe1 Add method support for passthrough endpoints 2026-02-19 11:58:25 +05:30
yuneng-jiang
70d5281b52
Merge pull request #21537 from BerriAI/litellm_team_member_usage_permission
[Feature] Allow team members to view entire team usage
2026-02-18 22:01:13 -08:00
Sameer Kankute
44a68cf1c6 Fix: add stop param as supported for openai and azure 2026-02-19 11:26:38 +05:30
Harshit Jain
31752c7b78
fix: mypy issues from auth_checks 2026-02-19 11:11:52 +05:30
Ishaan Jaff
1a5133f229
Competitor guardrails: streaming discovery, variations, pre/post split (#21533)
* fix aviation safety topic filter: remove overly broad exceptions, add cockpit access block words

* fix airline brand protection filter: add identifier words, competitor/ops block words, tighten exceptions

* update policy templates with competitor pre/post guardrails and streaming enrichment

* sync policy_templates_backup.json with policy_templates.json

* add streaming enrichment endpoint, competitor variations, and model selection

* add streaming enrichPolicyTemplate networking function

* rewrite template parameter modal with streaming tags, AI/manual toggle, model selector

* update policies panel to pass enrichment options and show discovered competitors

* show discovered competitors as tags in guardrail selection modal

* use llm_router instead of litellm.acompletion, extract helpers, move constants

* validate competitors list size, cap variation prompt input

* add refinement instruction support for competitor discovery

* add instruction and existingCompetitors params to streaming enrichment

* add refinement input for iterating on competitor list with AI

* emit status events during variation generation so UI shows progress

* add onStatus callback to streaming enrichment

* show status spinner during variation generation, widen modal to 700px

* add tests for competitor enrichment helper functions
2026-02-18 21:39:19 -08:00
yuneng-jiang
528b21ad1d [Feature] Allow team members to view entire team usage
Add a new team member permission `/team/daily/activity` that allows
non-admin team members to see all team usage data, not just their own.

## Changes
- Add `TEAM_DAILY_ACTIVITY` to `KeyManagementRoutes` enum and available
  team member permissions
- Add `_team_member_has_permission` helper in `common_utils.py`
- Modify `/team/daily/activity` endpoint to skip API key filtering when
  the member has this permission
- Add permission description and method detection in the UI
- Add backend and frontend tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-18 21:38:40 -08:00
jquinter
1e372ebc82
Merge pull request #20909 from jquinter/fix/ui-tagsSpendLogsCall-double-url
fix(ui): remove duplicate URL in tagsSpendLogsCall query string
2026-02-19 02:22:33 -03:00
jquinter
abc4603675
Merge pull request #21476 from BerriAI/fix/test-log-record-message-attr
fix(tests): use record.getMessage() instead of record.message for LogRecord
2026-02-19 02:21:54 -03:00
jquinter
2c1d2fa948
Merge pull request #21439 from BerriAI/fix/restore-default-internal-user-params
fix(test): restore default_internal_user_params to None instead of delattr
2026-02-19 02:19:10 -03:00
jquinter
ed79d435a4
Merge pull request #21535 from BerriAI/fix/mypy-mcp-user-permissions-type-errors
fix(mypy): resolve type errors from MCP user permissions commit
2026-02-19 02:18:58 -03:00
jquinter
53cfb93a06
Merge pull request #21536 from BerriAI/fix/mcp-test-failures-from-user-permissions
fix(tests): update MCP tests broken by user permissions commit (#21462)
2026-02-19 02:17:49 -03:00
Julio Quinteros Pro
a9d3c49572 fix(tests): update MCP tests broken by user permissions commit (#21462)
Four tests were broken by commit e00c181f0c (Mcp user permissions #21462):

1. test_list_tools_single_server_unprefixed_names: The commit changed
   _get_tools_from_mcp_servers to always add server prefixes (add_prefix=True),
   removing the conditional that skipped prefixing for single servers.
   Updated assertion from "toolA" → "zapier-toolA".

2. test_mcp_get_prompt_success: mcp_get_prompt now extracts the server name
   from a prefixed prompt name via split_server_prefix_from_name(). Passing
   unprefixed "hello" returns server_name="" which matches no server → 403.
   Updated call to use "server_a-hello" so the server lookup succeeds.

3. test_e2e_jwt_team_mcp_permissions_enforced &
4. test_e2e_jwt_team_mcp_key_intersection:
   The commit replaced `from typing import List` with
   `from litellm.proxy.proxy_server import general_settings` in
   MCPRequestHandler.get_allowed_mcp_servers(). Both tests mock
   litellm.proxy.proxy_server with a types.ModuleType that lacked
   general_settings, causing ImportError. Added general_settings={} to
   both mock modules.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 02:09:11 -03:00
jquinter
d106393394
Merge pull request #21505 from BerriAI/fix/spend-test-model-cost-contamination
fix(tests): restore litellm.model_cost after TestPriceDataReloadIntegration tests
2026-02-19 02:06:13 -03:00
yuneng-jiang
a717f3624d
Merge pull request #21516 from BerriAI/litellm_model_settings_modal
[Feature] UI - Models & Endpoints: Add Model Settings Modal
2026-02-18 21:02:31 -08:00
Julio Quinteros Pro
fdcb2ca37d fix(mypy): resolve type errors introduced by MCP user permissions (#21462)
- Cast `guardrail` to `Dict[str, Any]` in `mcp_end_user_permission/__init__.py`
  to fix "No overload variant of 'get' matches argument type 'str'" — the
  `Guardrail` TypedDict's `.get()` overloads resolve the key type to `Never`
  when chained with a `{}` default, making further `.get()` calls fail.
- Cast `fn` to `Dict[str, Any]` in `transformation.py`
  `transform_chat_completion_tool_params_to_responses_api_tools` to fix
  '"object" has no attribute "get"' — `tool.get("function")` on
  `Union[ChatCompletionFunctionToolParam, OpenAIMcpServerTool]` returns
  `object` because `"function"` is not a key in `OpenAIMcpServerTool`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 02:02:17 -03:00
jquinter
803a1f003e
Merge pull request #21500 from BerriAI/fix/managed-file-table-optional-defaults
fix(types): add = None defaults to Optional[str] fields in managed table models
2026-02-19 01:47:33 -03:00
jquinter
01ff53822c
Merge pull request #21440 from BerriAI/fix/langfuse-test-sys-modules-mock
fix: prevent sys.modules["langfuse"] import failures in langfuse unit tests
2026-02-19 01:47:07 -03:00
Julio Quinteros Pro
063238a789 chore: resolve merge conflict with main
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 01:46:13 -03:00
Julio Quinteros Pro
68b83b1376 fix(tests): restore litellm.model_cost after TestPriceDataReloadIntegration tests
test_complete_reload_flow and test_distributed_reload_check_function both
trigger code paths that assign a minimal stub dict to litellm.model_cost
(via the /reload/model_cost_map endpoint and _check_and_reload_model_cost_map).
Without restoring, subsequent tests in the same worker can't find gpt-4o
pricing and calculate spend=0.0 instead of the expected value.

Added try/finally save-and-restore of litellm.model_cost in both tests,
matching the pattern used in test_reload_model_cost_map_admin_access.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 01:42:48 -03:00