Commit Graph
29071 Commits
Author SHA1 Message Date
Sameer KankuteandGitHub 9edde2ffdb Merge pull request #18239 from BerriAI/litellm_fix_sdk_import_error
fix:No module named 'fastapi'
2025-12-19 23:27:23 +05:30
yuneng-jiangandGitHub e1d25670cd Merge pull request #18214 from BerriAI/litellm_key_management_fix
[Fix] Key Delete and Regenerate Permissions Fix
2025-12-19 08:48:21 -08:00
Ishaan Jaffer 388535003e docs fix 2025-12-19 20:06:56 +05:30
Anil KodaliandGitHub afba676b2e Add Amazon Nova to sidebar and under supported models in README (#18220) 2025-12-19 19:07:34 +05:30
Ishaan JaffandGitHub deb8d16967 [Feat] Add new Rag Search API / Query API with rerankers (#18217)
* init RAGQueryRequest

* init RAGQuery

* fix query

* fix _execute_query_pipeline

* TestRAGOpenAI
2025-12-19 19:05:07 +05:30
Ishaan Jaffer b0db9d6bb7 code qa check 2025-12-19 19:00:44 +05:30
Ishaan JaffandGitHub 09b5ee9428 [Feat] Unified Skills API - works across Anthropic, Vertex, Azure, Bedrock (#18232)
* init LiteLLM_SkillsTable

* init LiteLLMSkillsTransformationHandler

* init LiteLLMSkillsTransformationHandler

* init skills

* init SkillsInjectionHook

* init litellm skills handler

* _fetch_skill_from_db

* LiteLLMSkillsTransformationHandler

* add _prisma_skill_to_litellm

* use SkillPromptInjectionHandler

* refactor skills handler

* add slack GIF

* test_skill_code_execution_via_deployment_hook

* init readme

* test_get_skill_sdk

* test skills in DB

* fix code qa

* init with containers param

* SkillsInjectionHook

* fix type

* convert_skill_to_anthropic_tool, get_litellm_code_execution_tool_anthropic

* fix messages skills handler

* test_slack_gif_skill_creates_gif

* init SkillsInjectionHook

* clean async_pre_call_hook

* fixes

* working unified skills API! yeet

* fix mypy linting

* LiteLLM_SkillsTable

* llm-sandbox==0.3.31

* fix
2025-12-19 18:55:59 +05:30
Sameer Kankute 568fa73c5d fix:No module named 'fastapi' 2025-12-19 15:20:01 +05:30
YutaSaitoandGitHub 3c380086b6 Merge pull request #18234 from BerriAI/litellm_fix_not_working_failure_logging
fix: not working log_failure_event in langfuse
2025-12-19 17:32:05 +09:00
Sameer KankuteandGitHub 84e4fc3fab Merge pull request #18226 from Chesars/fix/responses-api-tool-calls-transformation
fix(responses-api): fix tool calls transformation in completion bridge
2025-12-19 13:41:55 +05:30
YutaSaitoandGitHub 369111d186 Merge pull request #18235 from uc4w6c/doc/improve_secret_manager
doc: improve secret manager settings
2025-12-19 17:03:29 +09:00
Yuta Saito 20bbfdd7cb fix: not working log_failure_event in langfuse 2025-12-19 16:54:57 +09:00
yuneng-jiang 887aa62ac7 Ruff check 2025-12-18 21:09:11 -08:00
Sameer KankuteandGitHub d1d008fb7e Merge pull request #18194 from BerriAI/litellm_fix_cli_bugs
Fix: Claude code responses api bridge errors
2025-12-19 08:38:55 +05:30
Sameer KankuteandGitHub 1fd4f1ba52 Merge pull request #18109 from BerriAI/litellm_fix_custom_gaurdrail_fix
Fix guardrails for passthrough endpoint
2025-12-19 08:36:58 +05:30
Chesars 5a1cc51d0d docs: add function calling example for Responses API 2025-12-18 22:07:04 -03:00
Chesars bd36b1261f test: add tests for tool calls transformation fixes
- test_tool_message_output_is_string_not_list: verifies function_call_output.output is a string
- test_multiple_tool_calls_in_single_choice: verifies multiple tool calls are grouped in one choice
2025-12-18 22:01:29 -03:00
Chesars c60b2dd987 fix(responses-api): fix tool calls transformation in completion bridge
Fixes two bugs in the openai/responses/... completion bridge:

1. function_call_output.output must be a string, not a list
   - When sending tool results back to the model, the content was being
     transformed to [{type: "output_text", text: "..."}] instead of a plain string
   - This caused OpenAI to reject with "Invalid value: 'output_text'"

2. Multiple tool calls must be in a single choice, not separate choices
   - When the model returned multiple tool calls, each was put in its own
     Choice with index 0, 1, 2... instead of all together in one Choice
   - This broke the standard Chat Completions API format where all tool_calls
     belong in a single message

Fixes #18201
2025-12-18 21:59:30 -03:00
yuneng-jiang 085d07db46 Fixing tests 2025-12-18 16:12:06 -08:00
Alexsander HamirandGitHub 0c48826cdc Revert "[Fix] CI/CD - local_testing & mapped tests (#18222)" (#18223)
This reverts commit dc7f500c47.
2025-12-18 14:46:09 -08:00
Alexsander HamirandGitHub dc7f500c47 [Fix] CI/CD - local_testing & mapped tests (#18222) 2025-12-18 14:34:48 -08:00
Yuta Saito 854d5a8d66 doc: improve secret manager settings 2025-12-19 07:06:26 +09:00
yuneng-jiang 41732696c6 replicate delete checks for regenerate 2025-12-18 13:25:11 -08:00
Alexsander HamirandGitHub 5230e97448 [Fix] CI/CD - Add missing documentation for ENVs & Clean Functionality (#18211) 2025-12-18 13:16:15 -08:00
Ishaan JaffandGitHub 5bffa30cb9 Update README.md 2025-12-19 01:35:48 +05:30
Ishaan JaffandGitHub 06d688abc9 Update README.md 2025-12-19 01:35:08 +05:30
Ishaan JaffandGitHub 36f28dbbb7 [Readme] fixes (#18206)
* v1

* fix

* docs fix

* Update README.md

* docs fix

* docs fix

* docs fix

* docs fix

* docs fix

* docs fix

* docs

* docs
2025-12-19 01:30:48 +05:30
Will ChenandGitHub 3f686521ed Fix Gemini 3 Flash pricing for Vertex AI (#18202) 2025-12-19 01:13:04 +05:30
yuneng-jiang 0a1fb204cd Tests for /key/delete 2025-12-18 11:40:41 -08:00
yuneng-jiang 7a1e180573 Working /key/delete permission changes 2025-12-18 11:32:58 -08:00
yuneng-jiang e0ef4fa8f2 Base commit 2025-12-18 11:31:26 -08:00
yuneng-jiangandGitHub bfb38a21eb Merge pull request #18203 from BerriAI/litellm_ui_usage_permission
[Fix] UI - Usage Page Top Key View Button Visibility
2025-12-18 11:07:16 -08:00
Alexsander HamirandGitHub 2e7b554747 3[Fix] CI/CD - logging_testing (#18204)
* fix: enforce team member budget check in common_checks

- Add missing team member budget validation in common_checks() function
  - Checks team membership budget when team key is used
  - Raises BudgetExceededError when team member spend exceeds max_budget_in_team
  - Follows same pattern as other budget checks (team, user, end_user)
  - Uses cached get_team_membership() for performance

- Fix AttributeError in lowest_tpm_rpm.py
  - Add null check for model_info before accessing .get() method
  - Prevents 'NoneType' object has no attribute 'get' error

- Add unit tests for team member budget enforcement
  - Test budget exceeded scenario
  - Test within budget scenario
  - Test edge cases (no budget, no membership, personal keys)
  - Tests run without requiring proxy server

Fixes failing test: test_users_in_team_budget

* fix: mock get_async_httpx_client in test_langsmith_key_based_logging

- Mock get_async_httpx_client to return a mock AsyncHTTPHandler instance
- Fixes test failure where mock_post was never called
- LangsmithLogger creates its own httpx client instance via get_async_httpx_client,
  so we need to mock the factory function rather than the class method
- Use MagicMock for response.raise_for_status (sync method) instead of AsyncMock

* fix: resolve linting errors (PLR0915, F401)

- Remove unused imports (datetime, ServiceLoggerPayload) from arize_phoenix.py
- Extract health ping setup logic from RedisCache.__init__ to reduce statement count
- Extract team member budget check from common_checks to reduce statement count

* fix: resolve type errors in ChatCompletionToolCallChunk construction

- Cast type field to Literal['function'] to satisfy TypedDict requirements
- Ensure arguments field is explicitly str type to match TypedDict signature
- Fixes pyright errors for incompatible types in transformation.py
2025-12-18 10:52:24 -08:00
yuneng-jiang 3bc5de125a Usage top key view conditional rendering 2025-12-18 10:43:40 -08:00
Ishaan JaffandGitHub 5ea0854eda [Feat] Guardrails Load Balancing - Allow Platform admins to load balance between guardrails (#18181)
* add _aguardrail_helper for LB

* add _aguardrail_helper on router.py

* test_proxy_logging_pre_call_hook_load_balancing

* add _execute_guardrail_with_load_balancing

* add LB TEsting

* docs guard lb

* fix linting

* fix lint
2025-12-19 00:08:03 +05:30
mubashir1osmaniandGitHub fcd524ca0f Merge pull request #18102 from mubashir1osmani/fix_arize_traces v1.80.10.dev.1 2025-12-18 11:51:01 -05:00
Alexsander HamirandGitHub f353bb6dba [Fix] CI/CD - litellm_mapped_tests_llms | litellm_mapped_tests_core | caching_unit_tests (#18197) 2025-12-18 08:49:23 -08:00
Sameer Kankute 8f573518ac Fix mypy error 2025-12-18 20:06:04 +05:30
Sameer Kankute 6571b6e73a Fix mypy error 2025-12-18 20:04:34 +05:30
Alexsander HamirandGitHub 28821427ce [Fix] CI/CD #1 - mypy | check_code_and_doc_quality | guardrails_testing (#18195) 2025-12-18 06:31:01 -08:00
c94f61b1da Feature/lakera monitor mode (#18084)
* Add monitor mode support to Lakera guardrail

- Add on_flagged parameter to LakeraV2GuardrailConfigModel (default: 'block')
- Support 'monitor' mode that logs violations without blocking requests
- Support 'block' mode (default) that raises HTTPException on violations
- Update async_pre_call_hook and async_moderation_hook to check on_flagged
- Update guardrail initializer to pass on_flagged from config
- Add documentation with monitor mode examples

This allows users to tune Lakera security policies by monitoring violations
without blocking legitimate requests, similar to Pillar's on_flagged_action.

* Add tests for Lakera guardrail monitor mode

- Test monitor mode allows flagged content through (pre_call hook)
- Test block mode raises HTTPException for violations (pre_call hook)
- Test monitor mode works with during_call (moderation_hook)

These tests verify the on_flagged parameter functionality for both
monitor and block modes across different guardrail hooks.

---------

Co-authored-by: Steve <steve.giguere@lakera.ai>
2025-12-18 19:57:43 +05:30
Sameer Kankute dafd123756 Fix : tool calling with response api bridge 2025-12-18 19:54:15 +05:30
Krish DholakiaandGitHub 365762596b Guardrails - LiteLLM Content Filter - add support for running content filters on images (#18044)
* feat(litellm_content_filter.py): add support for content filtering categories

make it easy for proxy admin to prevent messages about violence, self harm or illegal weapons going through litellm

* feat: initial commit adding bias detection

allows admin to block inappropriate content about sexual orientation, etc.

* refactor: simplify content_filter.py

use a more exhaustive set of keywords, instead of guessing at potential phrases user can use

* feat(content_filter.py): add new denied topics for in-built content filter guardrails

allow user to automatically block content relating to certain categories from being sent to the LLML

* refactor(content-filter): document new params to litellm content filter

* feat(ui/): litellm content filter - select content categories on ui

* docs: update documentation

* docs(litellm_content_filter.md): document new content filters

* feat: initial commit adding support for inappropriate images via litellm content filter

* feat(content_filter.py): support blocking images containing blocked content

prevent images which contain disallowed content from being sent to the llm api

* docs(litellm_content_filter.md): document new image capabilities of litellm_content_filter

* fix: fix expected error code
2025-12-18 16:46:14 +05:30
Krish DholakiaandGitHub 26cd2c4473 Guardrails - add built in guardrails for harmful content, bias, etc. (#18029)
* feat(litellm_content_filter.py): add support for content filtering categories

make it easy for proxy admin to prevent messages about violence, self harm or illegal weapons going through litellm

* feat: initial commit adding bias detection

allows admin to block inappropriate content about sexual orientation, etc.

* refactor: simplify content_filter.py

use a more exhaustive set of keywords, instead of guessing at potential phrases user can use

* feat(content_filter.py): add new denied topics for in-built content filter guardrails

allow user to automatically block content relating to certain categories from being sent to the LLML

* refactor(content-filter): document new params to litellm content filter

* feat(ui/): litellm content filter - select content categories on ui

* docs: update documentation

* docs(litellm_content_filter.md): document new content filters
2025-12-18 16:28:58 +05:30
Sameer Kankute d764b7405d Add thinking to reasoning_effort mapping in v1/messages 2025-12-18 15:29:54 +05:30
YutaSaitoandGitHub 630f3d828e Merge pull request #18161 from BerriAI/litellm_fix_mcp_list_tool_not_working_without_db
Litellm fix mcp list tool not working without db
2025-12-18 18:27:19 +09:00
LeonandGitHub 1c401ecf71 Add reasoning support for vertex_ai/gemini-3-flash-preview in model prices and context window (#18175) 2025-12-18 14:53:36 +05:30
Ishaan JaffandGitHub 274d996a87 [Feat] New Search API Provider - LinkUp Search (#18174)
* add linkup search provider

* add Linkup Search docs

* add get_provider_search_config

* get_provider_search_config

* add linkup/search provider

* fix mypy linting
2025-12-18 14:27:36 +05:30
Cesar GarciaandGitHub d131b7138d feat(pricing): add output_cost_per_image_token for gemini-2.5-flash-image models (#18156)
Add output_cost_per_image_token ($30/1M = 3e-05) to enable correct
image output cost calculation for gemini-2.5-flash-image models.

Affected models:
- gemini-2.5-flash-image
- gemini-2.5-flash-image-preview
- gemini/gemini-2.5-flash-image
- gemini/gemini-2.5-flash-image-preview
- vertex_ai/gemini-2.5-flash-image
2025-12-18 14:08:45 +05:30
Ishaan JaffandGitHub 17403967ab [Bug fix] Vertex Multimodal embeddings - Support text + base64 image combinations (#18172)
* TestVertexMultimodalEmbedding

* fix _try_merge_text_with_media

* ruff fix
2025-12-18 13:22:43 +05:30