Commit graph

4609 commits

Author SHA1 Message Date
Krrish Dholakia
a3810a5f3a docs(openai_passthrough.md): document how to make openai passthrough route work 2025-11-04 17:12:33 -08:00
Ishaan Jaff
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
Deepanshu Lulla
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
Krish Dholakia
726452dfe8
Revert "add: comparison with portkey (#16145)" (#16247)
This reverts commit 844ace1283.
2025-11-04 10:37:56 -08:00
Alexsander Hamir
844ace1283
add: comparison with portkey (#16145) 2025-11-04 10:37:17 -08:00
YutaSaito
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
Ishaan Jaff
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 Hamir
a73e890d8f
fix: broken link on model_management.md (#16217) 2025-11-03 17:00:03 -08:00
Ishaan Jaff
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
Krish Dholakia
07d2a27f14
Milvus - Passthrough API support - adds create + read vector store support via passthrough API's (#16170)
* feat(llm_passthrough_endpoints.py): support milvus passthrough api

* fix(llm_passthrough_endpoints.py): move streaming request value to the top of the function

* docs: document new milvus vector store passthrough flow
2025-11-02 09:47:58 -08:00
YutaSaito
6ed76ff809
feat: change guardrail_information to list type (#16127)
* feat: change guardrail_information to list type to support displaying multiple guardrails

* fix: add missing commit and revert auto-format changes in utils.py

---------

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
2025-11-02 09:47:49 -08:00
Deepanshu Lulla
20b95e9a80
strip base64 in s3 (#16157)
* strip base64

* strip base64

* s3 use key prefix

* s3 use key prefix

* strip base64 doc

---------

Co-authored-by: deepanshu <deepanshu.lulla@hq.bill.com>
2025-11-02 09:06:53 -08:00
yuneng-jiang
48822c2fa2
[Feature] UI - Add Model Existing Credentials Improvement (#16166)
* Model Settings UI Improvement

* Doc changes from Anthropic SDK to Passthrough

* Tests
2025-11-02 09:04:36 -08:00
Ishaan Jaffer
b111bcd910 docs fix 2025-11-01 16:56:44 -07:00
Ishaan Jaff
61b6ee0cf8
docs - v1.79.1 (#16163)
* v1

* fixes

* docs update

* doc fix

* docs fix

* docs fix

* Dependency Upgrades

* docs fix

* docs fix

* docs fix
2025-11-01 16:53:46 -07:00
Sameer Kankute
0c743e1adc
Add E2E Container API Support (#16136)
* 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

---------

Co-authored-by: Ishaan Jaffer <ishaanjaffer0324@gmail.com>
2025-11-01 14:03:51 -07:00
Ishaan Jaffer
571f94777c docs fix 2025-11-01 13:51:21 -07:00
Krrish Dholakia
bb0caee896 docs: document vector store usage with chat completions api 2025-11-01 13:47:24 -07:00
Alexsander Hamir
542378e604
add: minimum resource requirement (#16146) 2025-11-01 13:17:37 -07:00
Krrish Dholakia
ef7d81865b build: update dependencies 2025-11-01 12:58:39 -07:00
Sameer Kankute
058b6a66eb
Add custom_llm_provider support for video endpoints (non-generation) (#16121)
* fix model error for apis which don't need model

* fix print statments:

* fix mypy lint errors

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
2025-11-01 12:09:11 -07:00
Krish Dholakia
43aacf2dc0
(feat) Azure AI Vector Stores - support "virtual" indexes + create vector store on passthrough API (#16160)
* feat(vector_store_endpoints/endpoints.py): add new index_create endpoint

allows admin to create a virtual index, to do permission management for

* feat(key_management_endpoints.py): enable setting allowed_vector_store_indexes on keys

proxy admin can enable dev to create an index on a vector stor

* feat: initial commit adding vector store index passthrough logic to litellm

* feat: add vector store table

* fix(azure_ai/transformation.py): fix headers

* feat: track read/write endpoints by vector store integration

enables permissions by index to work

* fix: azure_ai/vector_stores/search

document the vector store endpoints correctly

 ensures permission management works as expected

* fix(proxy/utils.py): improve error message

* docs(azure_ai_vector_stores_passthrough.md): document azure ai passthrough vector store support

* docs(create.md): document azure ai support via passthrough for vector store create

* fix: fix code qa errors

* fix: document new allowed_vector_store_indexes endpoint
2025-11-01 12:01:32 -07:00
Krish Dholakia
b02be1ba70
(feat) Milvus - search vector store support + (fix) Passthrough Endpoints - support multi-part form data on passthrough (#16035)
* feat(milvus/): initial commit adding milvus vector store support to LiteLLM

allows querying milvus vector store through litellm

* feat(bedrock/vector_stores): support translating openai filters param to aws kb

adds filtering to aws kb

* feat(milvus/): add milvus vector store unified search support

allows calling milvus vector store in through chat completions

* docs(milvus_vector_stores.md): document new milvus vector search integration

* feat(pass_through_endpoints.py): support passing form data through to a passthrough endpoint

Closes LIT-1147

* fix: fix linting errors
2025-11-01 12:00:29 -07:00
Ishaan Jaffer
22d35e2552 docs fix 2025-11-01 11:13:25 -07:00
Boxuan Li
297c2a0bf4
prompt_caching.md: Fix wrong prompt_tokens definition (#16044) 2025-10-30 20:13:13 -07:00
John Lathouwers
a6f740f28b
Add OCI Signer Authentication. Closes #16048, Closes #15654 (#16064)
* Add OCI Signer Authentication. Closes #16048,  Closes #15654

* Fix linting error

* Remove Recommended, Catch None, Trim Whitespace

* Make method clear re Proxy vs SDK
2025-10-30 19:59:01 -07:00
Krrish Dholakia
30f343c3cb docs(deploy.md): document new terraform module 2025-10-30 17:11:55 -07:00
Ishaan Jaff
fd073ee682
Litellm docs readme fixes (#16107)
* add provider test

* docs readme.md

* docs providers

* order providers

* test_providers_alphabetically_ordered

* docs endpoint

* fix config
2025-10-30 17:05:32 -07:00
Thomas Mildner
6fc33add9a
Opik user auth key metadata Documentation (#16004)
* fix(opik): enhance requester metadata retrieval from API key auth

* docs(opik): add automatic metadata association from API keys in documentation
2025-10-29 19:13:19 -07:00
Timothée Lecomte
eb0e4f34dc
docs: use custom-llm-provider header in examples (#16055) 2025-10-29 19:06:48 -07:00
Jason Roberts
6672250769
feat(guardrails): Add per-request profile overrides to PANW Prisma AIRS (#16069)
- Per-request metadata: profile_name, profile_id, user_ip, app_name
- Full litellm_call_id for traceability
- Optional profile_name (supports API keys with linked profiles)
- Backward compatible
2025-10-29 19:05:59 -07:00
Ishaan Jaffer
a10b0b829e docs fix rbac improvements 2025-10-29 17:42:24 -07:00
Ishaan Jaff
99feefd614
[Feat] Add FAL AI Image Generations on LiteLLM (#16067)
* add fal-ai provider

* fix image_generation_handler

* init FalAIImageGenerationConfig

* init cost_calculator

* init FAL AI

* TestFAL_AI_ImageGeneration

* fix load_custom_provider_entrypoints

* TestFAL_AI_ImageGeneration

* add imagen4 transform FAL AI

* add FAL AI imagen 4 transform

* BaseImageGenTest

* test_fal_ai_image_generation_basic

* add BRIA + Recraft img gen

* add recraft + BRIA

* test_fal_ai_image_generation_basic

* tests for flux PRO v11

* Add FAL AI SD

* test FAL AI SD

* docs FAL AI

* docs fal ai

* Using Model-Specific Parameters

* add fal ai model prices

* add fall_ai JPG logo

* ui fixes FAL AI

* fix linting

* fix linting

* fix bedrock test_get_request_body_stability3

* test_custom_llm_provider_entrypoint
2025-10-29 13:10:51 -07:00
Javier de la Torre
e6a7cae7e1
fix(apscheduler): prevent memory leaks from jitter and frequent job intervals (#15846)
* fix(apscheduler): prevent memory leaks from jitter and frequent job intervals

Fixes critical memory leak in APScheduler that causes 35GB+ memory allocations
during proxy startup and operation. The leak was identified through Memray
analysis showing massive allocations in normalize() and _apply_jitter()
functions.

Key changes:
1. Remove jitter parameters from all scheduled jobs - jitter was causing
   expensive normalize() calculations leading to memory explosion
2. Configure AsyncIOScheduler with optimized job_defaults:
   - misfire_grace_time: 3600s (increased from 120s) to prevent backlog
     calculations that trigger memory leaks
   - coalesce: true to collapse missed runs
   - max_instances: 1 to prevent concurrent job execution
   - replace_existing: true to avoid duplicate jobs on restart
3. Increase minimum job intervals:
   - PROXY_BATCH_WRITE_AT: 30s (was 10s)
   - add_deployment/get_credentials jobs: 30s (was 10s)
4. Use fixed intervals with small random offsets instead of jitter for
   job distribution across workers
5. Explicitly configure jobstores and executors to minimize overhead
6. Disable timezone awareness to reduce computation

Memory impact:
- Before: 35GB with 483M allocations during startup
- After: <1GB with normal allocation patterns

Performance notes:
- Minimum job intervals increased from 10s to 30s (configurable via env vars)
- Jobs can still be distributed across workers using random start offsets
- No functional changes to job behavior, only timing and memory optimization

Testing:
- Added comprehensive test suite for scheduler configuration
- Verified no job execution backlog on startup
- Tested duplicate job prevention with replace_existing

Related issue: Memory leak in production proxy servers with APScheduler

\ud83e\udd16 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: update PROXY_BATCH_WRITE_AT default value from 10s to 30s

Update documentation to reflect the new default value for PROXY_BATCH_WRITE_AT
changed in PR #15846. The default was increased from 10 seconds to 30 seconds
to prevent memory leaks in APScheduler.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: Move APScheduler config to constants.py

Address code review feedback from ishaan-jaff:
- Move scheduler configuration variables (coalesce, misfire_grace_time,
  max_instances, replace_existing) to litellm/constants.py
- Update all references in proxy_server.py to use the constants
- Improves maintainability and makes configuration values centralized

Requested-by: @ishaan-jaff
Related: #15846

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-28 19:30:17 -07:00
Teddy Amkie
e8e91ac707
docs: improve Grayswan guardrail documentation (#15875)
Co-authored-by: berri-teddy <teddy@berri.ai>
2025-10-28 19:29:40 -07:00
Ishaan Jaff
ab8a3a5d9e
[Fix] SQS Logger - Add Base64 handling (#16028)
* Enable base64 stripping from sqs (#15927)

* Add sqs logger

* Add sqs logger

* Add sqs strp base64

* Add sqs strp base64

* Add sqs strp base64

* strip base64

* Add sqs strp base64

* strip base64

* Add sqs strp base64

* Add max depth recursion

* Add max depth recursion

---------

Co-authored-by: deepanshu <deepanshu.lulla@hq.bill.com>

* refactor _strip_base64_from_messages

* test fixes SQS logger

* fix SQS linting

---------

Co-authored-by: Deepanshu Lulla <deepanshu.lulla@gmail.com>
Co-authored-by: deepanshu <deepanshu.lulla@hq.bill.com>
2025-10-28 16:41:32 -07:00
Sameer Kankute
59189c0579
fix errors in videos documentation (#15996) 2025-10-28 14:48:04 -07:00
Ariel
647f2f5d86
[feat]: graceful degradation for pillar service when using litellm (#15857)
* graceful degradation for pillar service when using litellm

* remove unnecessary mode

* simplify docs

* final fixes

* lint fixes

* fix linting
2025-10-27 19:51:29 -07:00
Mac Misiura
5ad108bc9b
📝 updated ibm_guardrails.md to better indicate how detectors could be configured (#15971) 2025-10-27 19:41:10 -07:00
Shanto Mathew
4535b5847d
docs(openrouter): add base_url config with environment variables (#15946)
Added a new "Configuration with Environment Variables" section demonstrating:
- Using os.getenv() to dynamically retrieve OpenRouter configuration
- Explicitly passing base_url parameter with environment variables
- Benefits of this approach for managing configs across environments

This helps users implement production-ready configuration patterns.
2025-10-27 13:35:52 -07:00
Krrish Dholakia
e1f54ef02c docs: refactor placement of adding guardrails to endpoints doc 2025-10-27 10:26:00 -07:00
YutaSaito
c0890e7d33
[Feat] add support for dynamic client registration (#15921) (enables Atlassian MCP to work via Oauth on LiteLLM)
* feat: add support for dynamic client registration #13856

* fix: test

* feat: return 401 when oauth2_header is missing for OAuth2-based MCP servers
2025-10-26 10:13:46 -07:00
Sameer Kankute
70650a044c
Add all sora models (#15937) 2025-10-26 10:10:57 -07:00
oroxenberg
a75e75ae1a
feat(lasso): Upgrade to Lasso API v3 and fix ULID generation (#15941)
* 1. add v3 classify
2. add new classifix for masking
3. support same id for the conversation for pre and post
working with duplicates

* clean code, remove some debug and run tests

* update liter errors

* improvment for Code Organization, httpx Error Handling Specificity, Logging Improvements and Type

* transfer test test_lasso_guard_config to the new location

* Fix type hints and linting errors in lasso.py

- Add type: ignore for httpx module when None
- Fix return type issues in _handle_classification and _handle_masking
- Ensure masked_messages is not None before passing to _apply_masking_to_model_response
- Convert LassoResponse to dict for _log_masking_applied call

* feat(lasso): Upgrade to Lasso API v3 and fix ULID generation

- Update Lasso API endpoints from v2 to v3 (/gateway/v3/classify)
- Update masking endpoints from v1 to v3 (/gateway/v3/classifix)
- Fix ULID generation: use ulid.new() instead of ULID() constructor
- Resolve MemoryView error that occurred with incorrect ULID usage

Tested with real proxy server and verified:
- Malicious content (jailbreak) properly blocked
- Safe content passes through guardrail
- PII detection and masking works correctly
- No ULID generation errors

* docs(lasso): Add ulid-py>=1.1.0 dependency prerequisite

Add Prerequisites section documenting the required ulid-py package
(version 1.1.0 or higher) for Lasso guardrail conversation tracking.

* update docs with the right api_key format
2025-10-26 10:08:52 -07:00
Ishaan Jaff
06a17ac1af
1-79-0 docs (#15936)
* draft v1-79-0

* docs fix

* docs fix

* 1.78.5-stable

* docs fix

* docs fix

* docs video gen
2025-10-25 18:04:04 -07:00
Krish Dholakia
346e036399
fix(opentelemetry.py): fix issue where headers were not being split correctly + feat(bedrock): add titan image generations w/ cost tracking (#15916)
* fix(opentelemetry.py): fix issue where headers were not being split correctly

* feat(bedrock/image): Support bedrock titan image generation

Closes https://github.com/BerriAI/litellm/issues/361

* build(model_prices_and_context_window.json): track titan image gen pricing

enables cost tracking per request

* feat(amazon_titan_transformation.py): support titan image generation cost tracking

* docs: document new model

* docs: update docs to indicate cost tracking + refactor rerank into separate doc

* fix: fix mypy linting error

* fix: fix type ignore
2025-10-25 13:45:13 -07:00
Krish Dholakia
72bbdfd3f3
(security) Responses API - prevent User A from retrieving User B's response, if response.id is leaked (#15757)
* feat(responses_id_security.py): encrypt response.id - prevent user A from retrieving user B's response

additional security for retrievals on shared accounts

Closes LIT-1307

* feat(responses_id_security.py): allow admin to disable responses id security check

* test: add initial unit testing

* feat(responses_id_security.py): add streaming support

* docs: document new param

* docs: document new param

* feat(responses_id_security.py): add team id checks - ensure it works for service accounts

prevent service accounts keys from different teams from accessing each other's responses

more secure

* test: add unit testing

* fix: fix linting error
2025-10-25 13:41:59 -07:00
Krish Dholakia
2bd41dc034
Guardrails - Responses API, Image Gen, Text completions, Audio transcriptions, Audio Speech, Rerank, Anthropic Messages API support via the unified apply_guardrails function (#15706)
* fix(presidio.py): handle content as a list of texts

covers openai + anthropic messages api

* fix(presidio.py): safe get messages

* test: add unit testing for presidio guardrails

* fix(unified_guardrail.py): initial commit

* fix(enkryptai.py): implement apply_guardrail to enkrypt guardrail

* fix(unified_guardrail.py): support unified guardrail on input

* feat(unified_guardrail.py): add post call success hook implementation

allows us to just have 1 place to handle llm translation to guardrail api spec

* refactor: refactor initial unified guardrail component

* refactor: more refactoring

* feat(responses/): add guardrails to responses api

allows existing guardrails to work for new llm endpoints

* docs(adding_guardrail_support.md): document new guardrail endpoint support

* test: add unit tests

* feat(image_generation/): add guardrail support for image generation endpoint

* feat(openai/text_completion): support guardrails on `/v1/completions` API

* docs: document guardrails support on new endpoints

* docs: clarify when guardrails run

* feat(openai/speech): add guardrail support for input

* docs(rerank/): add guardrail support on input query

* fix: fix ruff check
2025-10-25 13:38:57 -07:00
Krrish Dholakia
eb67cef167 docs(mcp.md): add docs 2025-10-25 13:30:47 -07:00
Krish Dholakia
86524fcaf5
VertexAI Search Vector Store - Passthrough endpoint support + Vector store search Cost tracking support (#15824)
* feat(vector_stores/): initial commit adding Vertex AI Search API support for litellm

new vector store provider

* feat(vector_store/): use vector store id for vertex ai search api

* fix: transformation.py

cleanup

* fix: implement abstract function

* fix: fix linting error

* fix: main.py

fix check

* feat: initial commit with working passthrough support for vertex ai search api through litellm

* feat(llm_passthrough_endpoints.py): fix passing correct project on datastore passthrough

* feat(vertex_ai/): support passthrough call for vertex ai search vector store

* docs(vertex_ai_search_datastore.md): document new vertex ai passthrough endpoint

* docs(sidebars.js): document new endpoint

* feat: initial commit adding logging for vertex ai passthrough api

 allows vertex ai vector search api to work with cost calculation

* feat(vertex_ai/): search vector store cost tracking

* fix(vertex_passthrough_logging_handler.py): log the cost

* fix: improve logged response

* fix(vertex_passthrough_logging_handler.py): logging

* feat(litellm_logging): main.py

add cost tracking for vertex ai search api via unified api

* refactor: fix ruff checks

* fix(llm_passthrough_endpoints.py): fix linting
2025-10-25 13:17:15 -07:00