Commit Graph
27076 Commits
Author SHA1 Message Date
Alexsander HamirandGitHub 8ee9b1bc93 feat: Add configurable mount name and path prefix for HashiCorp Vault (#16253)
- Add HCP_VAULT_MOUNT_NAME env var to override default 'secret' mount
- Add HCP_VAULT_PATH_PREFIX env var to add prefix to secret paths
- Update get_url() method to construct URLs with configurable mount and prefix
- Add test coverage for custom mount names and path prefixes
- Maintain backward compatibility with existing configurations

This allows users to configure Vault paths like:
- Custom mount: {VAULT_ADDR}/v1/{MOUNT_NAME}/data/{SECRET}
- With prefix: {VAULT_ADDR}/v1/secret/data/{PREFIX}/{SECRET}
- Both: {VAULT_ADDR}/v1/{MOUNT_NAME}/data/{PREFIX}/{SECRET}

Resolves issue where mount name was hardcoded and path prefixes weren't supported.
2025-11-05 16:06:07 -08:00
yuneng-jiangandGitHub f1191578ae [Fix] UI - Fixed Label for vLLM in Model Create Flow (#16285)
* Fixed Label for vLLM

* Make vLLM api key not required
2025-11-05 16:03:01 -08:00
Ishaan JaffandGitHub 2541a54023 [Feat] Email Notifications - Ensure Users get Key Rotated Email (#16292)
* add virtual_key_rotated

* add KEY_ROTATED_EMAIL_TEMPLATE

* fix base email

* add _send_key_rotated_email

* fix _send_key_rotated_email

* key rotated email fix

* fix: async_key_generated_hook ensure behavior matches regenerate

* test_send_key_rotated_email

* expose EMAIL_INCLUDE_API_KEY

* docs mask api keys

* add email regen

* docs key regen

* docs email

* docs email

* docs fix

* fix code qa check
2025-11-05 15:56:49 -08:00
Ishaan Jaffer 3fc262e92a fix QA checks 2025-11-05 15:54:38 -08:00
Alexsander HamirandGitHub e06d1d623f Add: benchmark comparison with other AI gateways (#16248)
* fix: benchmark comparison location & content

* add: pros and cons

* remove
2025-11-05 15:44:30 -08:00
3ef210e5f4 Add allowing Key based prefix to s3 path (#16237)
* add Key based prefix

* add Key based prefix

* update documentation

* correct doc

---------

Co-authored-by: deepanshu <deepanshu.lulla@hq.bill.com>
2025-11-05 14:43:21 -08:00
Ishaan JaffandGitHub 466e7d178c [Feat] Cyber Ark - Add Key Rotations support (#16289)
* KeyManagementSystem add cyberark

* add CyberArkSecretManager

* add CyberArkSecretManager

* add CyberArkSecretManager

* docs add CyberArkSecretManager

* docs

* refactor to use get_secret_from_manager

* fix async roate for cyber ark, re-use base class

* fixes

* cyber ark

* docs fix

* docs fix

* docs cyberark

* fix linting

* fix get_secret_from_manager
2025-11-05 14:03:43 -08:00
Ishaan JaffGitHubCopilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
9a372bfad6 [Feat] Add CyberArk Secrets Manager Integration (#16278)
* KeyManagementSystem add cyberark

* add CyberArkSecretManager

* add CyberArkSecretManager

* add CyberArkSecretManager

* docs add CyberArkSecretManager

* docs

* refactor to use get_secret_from_manager

* Potential fix for code scanning alert no. 3645: Clear-text logging of sensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Potential fix for code scanning alert no. 3650: Clear-text logging of sensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Potential fix for code scanning alert no. 3649: Clear-text logging of sensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Potential fix for code scanning alert no. 3646: Clear-text logging of sensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-11-05 14:00:45 -08:00
dean-zavadandGitHub f19356db60 Litellm noma guardrail support images (#16199)
* noma support v2 api and images with during call

* supporting streams and images with texts

* Supporting text now

* annonymization works

* removing function

* fixing noma.py

* all old tests pass

* adding new tests

* removing changes

* Fixing application id headers

* fix whitespace

* deleting unused imports
2025-11-05 11:23:39 -08:00
Krrish Dholakia 9b925c7e47 docs: remove old doc
causing search issues
2025-11-05 08:23:35 -08:00
Sameer KankuteandGitHub c45fad3855 Fix: Send Gemini API key via x-goog-api-key header with custom api_base (#16085)
* Add gemini api key in the custom api url

* Update tests

* Use api key n the header

* Use api key n the header

* fix mypy error

* fix mypy error

* fix test gemini auth
2025-11-05 07:12:13 -08:00
Sameer KankuteandGitHub 781f9df883 Add gpt-image-1 pricing for azure (#16182) 2025-11-04 19:21:44 -08:00
Fabrício CeschinandGitHub 387982fcbf Fix langfuse input tokens logic for cached tokens (#16203)
* Update langfuse.py

Fixing issue with input_tokens and cache_read_tokens

* Clarify input token calculation in langfuse.py

Add comment to clarify input token calculation based on Langfuse documentation.
2025-11-04 19:20:35 -08:00
Alexsander HamirandGitHub 727fe504bb fix(redis): handle float redis_version from AWS ElastiCache Valkey (#16207)
* fix(redis): handle float redis_version from AWS ElastiCache Valkey

AWS ElastiCache Valkey returns redis_version as a float (7.0) instead
of a string ('7.0.0'), causing AttributeError: 'float' object has no
attribute 'split' in async_lpop when parsing version for LPOP count.

Changes:
- Extract version parsing into _parse_redis_major_version() helper
- Add DEFAULT_REDIS_MAJOR_VERSION constant (replaces magic number)
- Support multiple version formats: string, float, int, malformed
- Add comprehensive test coverage for all version format edge cases

Fixes: 'LiteLLM Redis Cache LPOP: - Got exception from REDIS' error
during db_spend_update_job cronjobs

* refactor: move DEFAULT_REDIS_MAJOR_VERSION to constants.py
2025-11-04 19:20:00 -08:00
44a928b631 fix(openai): Remove automatic summary from reasoning_effort transformation (#16210)
* Fix: Remove automatic summary field from reasoning_effort transformation

Problem:
The _map_reasoning_effort() function was automatically adding
reasoning.summary field when users specified reasoning_effort parameter,
causing 400 errors for users with unverified OpenAI organizations.

Root Cause:
According to OpenAI's official documentation, the summary field is opt-in
and requires organization verification:

"Reasoning summary output [...] will not be included unless you explicitly
opt in to including reasoning summaries."

"Before using summarizers with our latest reasoning models, you may need
to complete organization verification"

Source: https://platform.openai.com/docs/guides/reasoning#reasoning-summaries

Solution:
Remove the automatic inclusion of summary field from all reasoning_effort
levels (high, medium, low, minimal). Users who want reasoning summaries
can explicitly pass reasoning={"effort": "high", "summary": "auto"} in
their requests.

Impact:
- Fixes #16032
- Works for all organizations (verified and unverified)
- Maintains backward compatibility for users passing reasoning object directly
- Follows OpenAI's recommended opt-in approach

Testing:
- All existing tests pass (4/4 tests in transformation suite)
- Manual verification confirms only effort field is included

* test: Fix MockResponse missing headers attribute in test_openai_responses_api

The MockResponse class was missing the 'headers' attribute which caused
APIConnectionError when processing the mock response. Added headers={}
to fix the test.

* feat: Add dict support to reasoning_effort parameter

Allow users to pass reasoning_effort as either:
- String: reasoning_effort="high" (no summary, safe default)
- Dict: reasoning_effort={"effort": "high", "summary": "detailed"} (opt-in)

This preserves backward compatibility while giving users flexibility
to explicitly opt-in to the summary field when needed (for verified
OpenAI organizations).

---------

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
2025-11-04 19:05:17 -08:00
Bowen LiangandGitHub 4e12e3f90d fix typo of orginal (#16255) 2025-11-04 18:55:44 -08:00
Alexsander HamirandGitHub b4def8899f add: shared_session support to responses API (#16260)
This change enables HTTP client session reuse by:
- Adding shared_session parameter to all responses API methods (responses, delete_responses, get_responses, list_input_items, cancel_responses)
- Passing shared_session to get_async_httpx_client() for connection pooling
- Adding debug logging to track shared session usage

This helps reduce memory overhead by reusing HTTP connections instead of creating new clients for each request, which is particularly important for high-throughput proxy scenarios.
2025-11-04 18:53:54 -08:00
Alan PonnachanandGitHub b564ed81f5 add reasoning effort and test (#16261) 2025-11-04 18:53:02 -08:00
Ishaan Jaffer 4a83ae0695 test_aresponses_service_tier_and_safety_identifier 2025-11-04 18:05:30 -08:00
Ishaan Jaffer ede8944e49 fix _handle_callback_failure 2025-11-04 18:00:12 -08:00
Ishaan Jaffer 5b658ce1eb ui fix 2025-11-04 17:58:51 -08:00
Ishaan JaffandGitHub 60f3a3b0ad [Feat] add serxng search API provider (#16259)
* TestFirecrawlSearch

* add SearchProviders

* add to get_provider_search_config

* add FirecrawlSearchConfig

* add FirecrawlSearchRequest

* add firecrawl API docs

* add pricing firecrawl/search

* add new search APIs

* add SearXNGSearchConfig

* add searxng/search

* add serxng params

* TestSearXNGSearch

* docs serxng

* docs fix

* docs fix

* docs serxng
2025-11-04 17:56:07 -08:00
Ishaan JaffandGitHub af78a93ecf [Feat] /search API - add firecrawl search API support (#16257)
* TestFirecrawlSearch

* add SearchProviders

* add to get_provider_search_config

* add FirecrawlSearchConfig

* add FirecrawlSearchRequest

* add firecrawl API docs

* add pricing firecrawl/search

* add new search APIs
2025-11-04 17:52:12 -08:00
Krrish Dholakia a3810a5f3a docs(openai_passthrough.md): document how to make openai passthrough route work 2025-11-04 17:12:33 -08:00
Ishaan JaffandGitHub c1ac6e25aa [Feat] Add Bedrock Agentcore as a provider on LiteLLM Python SDK and LiteLLM AI Gateway (#16252)
* add agentcore in get_bedrock_route

* add AmazonAgentCoreConfig

* fix get_runtime_endpoint

* init AmazonAgentCoreConfig

* add get_bedrock_chat_config

* get_bedrock_chat_config

* add AmazonAgentCoreConfig

* fix get_complete_url

* refactor transform response

* test agentcore

* test_bedrock_agentcore_with_streaming

* fix _parse_json_response

* fix _calculate_usage

* test_bedrock_agentcore_basic

* add AgentCoreSSEStreamIterator

* add native streaming for agentcore

* test_bedrock_agentcore_with_streaming

* test_bedrock_agentcore_basic

* add agentcore

* _calculate_usage

* fix linting
2025-11-04 16:35:12 -08:00
812ea03d28 Add tags and descriptions support to aws secrets manager (#16224)
* Add tags and descriptions support to aws secrets manager

* add tags

---------

Co-authored-by: deepanshu <deepanshu.lulla@hq.bill.com>
2025-11-04 16:11:51 -08:00
yuneng-jiangandGitHub 2b0aea87c0 [Feature] UI - Initial changes for supporting prompts to multiple models (#16223)
* Initial changes for supporting prompts to multiple models

* Additional tests to prevent regressions

* Resolve merge conflicts

* Fixing E2E build issues
2025-11-04 16:02:19 -08:00
Cesar GarciaandGitHub 78ed5126a5 fix: Fix Responses API streaming tests usage field names and cost (#16236)
This commit fixes two bugs in Responses API streaming tests:

1. **Usage field naming bug**: Tests were using `input_tokens` and
   `output_tokens` but the Usage object uses `prompt_tokens` and
   `completion_tokens`.

2. **Missing cost in streaming usage**: When `include_cost_in_streaming_usage`
   was enabled, the cost was calculated and added to ResponseAPIUsage, but was
   lost during the transformation to the Usage object.

Changes:
- Updated test assertions to use correct field names (prompt_tokens, completion_tokens)
- Added cost preservation logic in FakeStreamerResponsesAPIIterator
- Modified _transform_response_api_usage_to_chat_usage() to preserve cost attribute

All streaming tests now pass successfully.
2025-11-04 15:57:59 -08:00
Alexsander HamirandGitHub 7878ebd2a2 fix(proxy): handle None values in daily spend sort key (#16245)
Fixes TypeError when sorting daily spend transactions with missing entity IDs (e.g., null tags).
Changed x[1].get(entity_id_field) to x[1].get(entity_id_field) or "" to provide a sortable
default value when the field is None, preventing comparison errors between NoneType and str.
2025-11-04 15:56:48 -08:00
yuneng-jiangandGitHub 2ed95e216c [Feature] UI - Tag Usage Top Model Table View and Label Fix (#16249)
* Tag Usage Top Model Table View and Label Fix

* Removed unused state
2025-11-04 14:24:43 -08:00
yuneng-jiangandGitHub 4d756a62d9 Prevent trailing slash in sso proxy base url input (#16244) 2025-11-04 14:22:50 -08:00
yuneng-jiangandGitHub 615f76de88 [Feature] UI - Litellm test key audio (#16251)
* Add audio/transcriptions and audio/speech to Test key UI

* Removed unused import in test

* Fixed voice parameter not being passed in
2025-11-04 14:21:26 -08:00
Krish DholakiaandGitHub 726452dfe8 Revert "add: comparison with portkey (#16145)" (#16247)
This reverts commit 844ace1283.
2025-11-04 10:37:56 -08:00
Alexsander HamirandGitHub 844ace1283 add: comparison with portkey (#16145) 2025-11-04 10:37:17 -08:00
YutaSaitoandGitHub 8e27b6c0b4 [MCP] configure static mcp header (#16179)
* feat: configure extra mcp headers in ui

* doc: static header

* build: add new migration file

* chore: add missing image file

* fix: test
2025-11-03 21:06:36 -08:00
Alan PonnachanandGitHub 45cf6fc289 feat: support dashscope tiered pricing
* add helper functions

* update generic_cost_per_token function

* add test

* formatting

* add examples in docstring for _calculate_tiered_cost

* Restore files to upstream/main version

* dashscope specific calculation

* improve for different costs

* remove _calculate_flat_cost function
2025-11-03 20:27:25 -08:00
pablobgarandGitHub 5ddc5410bf fix: cumulative index (#16194) 2025-11-03 20:25:05 -08:00
Sameer KankuteandGitHub 8a904a5481 Add gemini live audio model cost in model map (#16183)
* Add gemini live audio model cost in model map

* add gemini models
2025-11-03 19:01:00 -08:00
Anthony IvanandGitHub e5e9523958 init commit (#16200) 2025-11-03 18:58:03 -08:00
Niv GoldenbergandGitHub 232d1558dd fix(anthropic-adapter): properly translate Anthropic image format to OpenAI (#16202)
* fix(anthropic-adapter): properly translate Anthropic image format to OpenAI

Fixed bug where images were stripped during Anthropic Messages API to Azure
OpenAI translation. Image source data was being stringified instead of having
fields properly extracted.

- Added _translate_anthropic_image_to_openai() helper method
- Support both base64 and URL image formats per Anthropic API spec
- Refactored user message and tool result image handling

* test(anthropic-adapter): add comprehensive image translation tests

Add 5 unit tests covering image translation from Anthropic to OpenAI format:
- User messages with base64 images
- User messages with URL images
- Tool results with base64 images
- Tool results with URL images
- Mixed content with multiple images
2025-11-03 18:53:44 -08:00
bb86c94df4 Add Prometheus metric to track callback logging failures in S3 (#16209)
* Add v1 cut of container api

* fix lint errors

* Add proxy support to container apis & logging support (#16049)

* Add proxy support to container apis

* Add logging support

* Add cost tracking support for containers and documentation

* Add new constant documentation

* Add container cost in model map

* fix failing azure tests

* Update tests based on model map changes

* fix model map tests

* fix model map tests

* Container modeshould be container

* Container tests fix

* Merge branch 'main' into litellm_sameer_oct_staging_2

* Add Prometheus metric to track callback logging failures in S3 (#16102)

* Add proxy support to container apis

* Add logging support

* prometheus metric  measures how often s3_v2 is failing

* remove not needed files

* remove not needed files

* remove not needed files

* fix mypy errors

* Use logging_callback_manager to get all the callbacks

---------

Co-authored-by: Ishaan Jaffer <ishaanjaffer0324@gmail.com>
2025-11-03 18:46:52 -08:00
Krrish Dholakia db1b38381a fix(llm_passthrough_endpoints.py): merge query params correctly for gemini 2025-11-03 18:30:37 -08:00
Ishaan Jaffer 4365fc57ee fix SpendLogsMetadata 2025-11-03 18:08:35 -08:00
Ishaan Jaffer f09736ceb9 fix mypy lint 2025-11-03 18:02:19 -08:00
Ishaan Jaffer 9b4b846af9 refactor 2025-11-03 17:31:55 -08:00
Ishaan Jaffer ed8235ea07 fix typing 2025-11-03 17:25:49 -08:00
Ishaan JaffandGitHub 57295cedef [Feat] Add Azure AI Doc Intelligence OCR (#16219)
* TestAzureDocumentIntelligenceOCR

* add AZURE_DOCUMENT_INTELLIGENCE_API_VERSION

* add AzureDocumentIntelligenceOCRConfig

* add async_transform_ocr_response

* use async transform

* add AzureDocumentIntelligenceOCRConfig

* add AzureDocumentIntelligenceOCRConfig

* add AzureDocumentIntelligenceOCRConfig

* add get_azure_ai_ocr_config

* add azure_ai/doc-intelligence

* add azure_ai/doc-intelligence

* docs fix

* docs fix

* add azure doc intel

* fix lint error
2025-11-03 17:22:19 -08:00
Alexsander HamirandGitHub a73e890d8f fix: broken link on model_management.md (#16217) 2025-11-03 17:00:03 -08:00
Ishaan JaffGitHubCopilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
71c61c274f [Feat] /ocr - Add VertexAI OCR provider support + cost tracking (#16216)
* add VertexAIOCRConfig

* __all__ = ["VertexAIOCRConfig"]
add

* add get_provider_ocr_config

* use GenericLiteLLMParams for litellm params

* fix _async_prepare_ocr_request

* fix _prepare_ocr_request

* fix get_complete_url

* fix validate_environment

* add safe_get_vertex_ai_project

* add VertexAIOCRConfig

* fix get_complete_url

* add TestVertexAIOCR

* add mistral-ocr-2505 cost

* add OCR to provider info

* docs vertex ai ocr

* fix _handle_rate_limits

* Potential fix for code scanning alert no. 3632: Clear-text logging of sensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-11-03 15:56:49 -08:00
Ishaan JaffandGitHub 40e96657ce revert noma apply guard (#16214) 2025-11-03 14:57:40 -08:00