Commit Graph
261 Commits
Author SHA1 Message Date
Sameer KankuteandGitHub 394da34a0b Add all gemini image models support in image generation (#16526) 2025-11-12 18:26:44 -08:00
Cesar GarciaandGitHub d65a29b88d docs: fix image generation response format from 'image' to 'images' (#16378)
Update documentation to reflect actual API response format:
- Change singular 'image' field to plural 'images' array
- Add complete ImageURLListItem structure with index and type fields
- Update all code examples to use message.images instead of message.image
- Fix streaming examples to access images[0]["image_url"]["url"]

The documentation was incorrectly showing 'image' (singular object)
but the actual implementation returns 'images' (array of ImageURLListItem).

Related to issue #16227
2025-11-07 19:06:03 -08:00
Boxuan LiandGitHub 297c2a0bf4 prompt_caching.md: Fix wrong prompt_tokens definition (#16044) 2025-10-30 20:13:13 -07:00
Sameer KankuteandGitHub 3955a3de5d fix the wrong request body in json mode doc (#15729) 2025-10-20 08:44:14 -07:00
Ishaan JaffandGitHub 6ab9b0af9f [Fix] Anthropic cache_control incorrectly applied to all content items instead of last item only (#15699)
* fix: _safe_insert_cache_control_in_message

* test_anthropic_cache_control_hook_system_message

* docs prompt cache injection

* docs fix
2025-10-18 15:18:08 -07:00
Krish DholakiaandGitHub 302f55c7db Bedrock + MCP - working MCP calls to bedrock via Responses API + Log hidden params for OTEL calls (#15677)
* fix: minor fixes to mcp streaming with bedrock

* fix(bedrock/): working bedrock with mcp tools

handle empty description

* test: add unit test

* test: test fixes

* fix(vector_store_registry.py): load vector store with litellm params from config.yaml

fixes minor issue where litellm params weren't being loaded in from config.yaml

* docs(knowledgebase.md): document azure vector store current limitation

* fix(opentelemetry.py): add hidden params to otel logs

Fixes LIT-1274

* fix: fix test
2025-10-18 10:39:28 -07:00
3852fc96c1 [Oct Staging Branch] (#15460)
* Implement fix for thinking_blocks and converse API calls

This fixes Claude's models via the Converse API, which should also fix
Claude Code.

* Add thinking literal

* Fix mypy issues

* Type fix for redacted thinking

* Add voyage model integration in sagemaker

* Add config file logic

* Use already exiting voyage transformation

* refactor code as per comments

* fix merge error

* refactor code as per comments

* refactor code as per comments

* UI new build

* [Fix] router - regression when adding/removing models  (#15451)

* fix(router): update model_name_to_deployment_indices on deployment removal

When a deployment is deleted, the model_name_to_deployment_indices map
was not being updated, causing stale index references. This could lead
to incorrect routing behavior when deployments with the same model_name
were dynamically removed.

Changes:
- Update _update_deployment_indices_after_removal to maintain
  model_name_to_deployment_indices mapping
- Remove deleted indices and decrement indices greater than removed index
- Clean up empty entries when no deployments remain for a model name
- Update test to verify proper index shifting and cleanup behavior

* fix(router): remove redundant index building during initialization

Remove duplicate index building operations that were causing unnecessary
work during router initialization:

1. Removed redundant `_build_model_id_to_deployment_index_map` call in
   __init__ - `set_model_list` already builds all indices from scratch

2. Removed redundant `_build_model_name_index` call at end of
   `set_model_list` - the index is already built incrementally via
   `_create_deployment` -> `_add_model_to_list_and_index_map`

Both indices (model_id_to_deployment_index_map and
model_name_to_deployment_indices) are properly maintained as lookup
indexes through existing helper methods. This change eliminates O(N)
duplicate work during initialization without any behavioral changes.

The indices continue to be correctly synchronized with model_list on
all operations (add/remove/upsert).

* fix(prometheus): Fix Prometheus metric collection in a multi-workers environment (#14929)

Co-authored-by: sotazhang <sotazhang@tencent.com>

* Add tiered pricing and cost calculation for xai

* Use generic cost calculator

* Resolve conflicts in generated HTML files

* Remove penalty params as supported params for gemini preview model (#15503)

* fix conversion of thinking block

* add application level encryption in SQS (#15512)

* docs: fix doc

* docs(index.md): bump rc

* [Fix] GEMINI - CLI -  add google_routes to llm_api_routes (#15500)

* fix: add google_routes to llm_api_routes

* test: test_virtual_key_llm_api_routes_allows_google_routes

* build: bump version

* bump: version 1.78.0 → 1.78.1

* add application level encryption in SQS

* add application level encryption in SQS

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>
Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
Co-authored-by: deepanshu <deepanshu.lulla@hq.bill.com>

* [Feat] Bedrock Knowledgebase - return search_response when using /chat/completions API with LiteLLM (#15509)

* docs: fix doc

* docs(index.md): bump rc

* [Fix] GEMINI - CLI -  add google_routes to llm_api_routes (#15500)

* fix: add google_routes to llm_api_routes

* test: test_virtual_key_llm_api_routes_allows_google_routes

* add AnthropicCitation

* fix async_post_call_success_deployment_hook

* fix add vector_store_custom_logger to global callbacks

* test_e2e_bedrock_knowledgebase_retrieval_with_llm_api_call

* async_post_call_success_deployment_hook

* add async_post_call_streaming_deployment_hook

* async def test_e2e_bedrock_knowledgebase_retrieval_with_llm_api_call_streaming(setup_vector_store_registry):

* fix _call_post_streaming_deployment_hook

* fix async_post_call_streaming_deployment_hook

* test update

* docs: Accessing Search Results

* docs KB

* fix chatUI

* fix searchResults

* fix onSearchResults

* fix kb

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>

* [Feat] Add dynamic rate limits on LiteLLM Gateway  (#15518)

* docs: fix doc

* docs(index.md): bump rc

* [Fix] GEMINI - CLI -  add google_routes to llm_api_routes (#15500)

* fix: add google_routes to llm_api_routes

* test: test_virtual_key_llm_api_routes_allows_google_routes

* build: bump version

* bump: version 1.78.0 → 1.78.1

* fix: KeyRequestBase

* fix rpm_limit_type

* fix dynamic rate limits

* fix use dynamic limits here

* fix _should_enforce_rate_limit

* fix _should_enforce_rate_limit

* fix counter

* test_dynamic_rate_limiting_v3

* use _create_rate_limit_descriptors

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>

* Add google rerank endpoint

* Add docs

* fix mypy error

* fix mypy and lint errors

* Add haiku 4.5 integration

* Add haiku 4.5 integration for other regions as well

* Handle citation field correctly

* Fix filtering headers for signature calcs

* Add haiku 4.5 integration (#15650)

---------

Co-authored-by: Leslie Cheng <leslie.cheng5@gmail.com>
Co-authored-by: Sameer Kankute <sameer@berri.ai>
Co-authored-by: Alexsander Hamir <alexsanderhamirgomesbaptista@gmail.com>
Co-authored-by: Lucas <10226902+LoadingZhang@users.noreply.github.com>
Co-authored-by: sotazhang <sotazhang@tencent.com>
Co-authored-by: Deepanshu Lulla <deepanshu.lulla@gmail.com>
Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>
Co-authored-by: deepanshu <deepanshu.lulla@hq.bill.com>
2025-10-17 17:52:25 -07:00
Imad SaddikandGitHub 133189e191 Fixed a few typos (#15267) 2025-10-11 17:53:42 -07:00
Ishaan JaffandGitHub d04c6d4eea [Feat] Add new anthropic web fetch tool support (#14951)
* add web_fetch tool for ANTHROPIC_HOSTED_TOOLS

* add ANTHROPIC_BETA_HEADER_VALUES, ANTHROPIC_HOSTED_TOOLS

* feat: add web fetch tool anthropic

* test_anthropic_tool_use

* docs web fetch

* docs fix

* docs fix
2025-09-26 11:04:11 -07:00
dcbccd1fea Corrected docs updates sept 2025 (#14916)
* docs: Corrected documentation updates from Sept 2025

This PR contains the actual intended documentation changes, properly synced with main:

 Real changes applied:
- Added AWS authentication link to bedrock guardrails documentation
- Updated Vertex AI with Gemini API alternative configuration
- Added async_post_call_success_hook code snippet to custom callback docs
- Added SSO free for up to 5 users information to enterprise and custom_sso docs
- Added SSO free information block to security.md
- Added cancel response API usage and curl example to response_api.md
- Added image for modifying default user budget via admin UI
- Re-ordered sidebars in documentation

 Sync issues resolved:
- Kept all upstream changes that were added to main after branch diverged
- Preserved Provider-Specific Metadata Parameters section that was added upstream
- Maintained proper curl parameter formatting (-d instead of -D)

This corrects the sync issues from the original PR #14769.

* docs: Restore missing files from original PR

Added back ~16 missing documentation files that were part of the original PR:

 Restored files:
- docs/my-website/docs/completion/usage.md
- docs/my-website/docs/fine_tuning.md
- docs/my-website/docs/getting_started.md
- docs/my-website/docs/image_edits.md
- docs/my-website/docs/image_generation.md
- docs/my-website/docs/index.md
- docs/my-website/docs/moderation.md
- docs/my-website/docs/observability/callbacks.md
- docs/my-website/docs/providers/bedrock.md
- docs/my-website/docs/proxy/caching.md
- docs/my-website/docs/proxy/config_settings.md
- docs/my-website/docs/proxy/db_deadlocks.md
- docs/my-website/docs/proxy/load_balancing.md
- docs/my-website/docs/proxy_api.md
- docs/my-website/docs/rerank.md

 Fixed context-caching issue:
- Restored provider_specific_params.md to main version (preserving Provider-Specific Metadata Parameters section)
- Your original PR didn't intend to modify this file - it was just a sync issue

Now includes all ~26 documentation files from the original PR #14769.

* docs: Remove files that were deleted in original PR

- Removed docs/my-website/docs/providers/azure_ai_img_edit.md (was deleted in original PR)
- sdk/headers.md was already not present

Now matches the complete intended changes from original PR #14769.

* docs: Restore azure_ai_img_edit.md from main

- Restored docs/my-website/docs/providers/azure_ai_img_edit.md from main branch
- This file should not have been deleted as it was a newer commit
- SDK headers file doesn't exist in main (was reverted) and wasn't part of your original changes

Fixes the file restoration issues.

* docs: Fix vertex.md - preserve context caching from newer commit

- Restored vertex.md to main version to preserve context caching content (lines 817-887)
- Added back only your intended change: alternative gemini config example
- Context caching content from newer commit is now preserved

Fixes the vertex.md sync issue where newer content was incorrectly deleted.

* docs: Fix providers/bedrock.md - restore deleted content from newer commit

- Restored providers/bedrock.md to main version
- Preserves 'Usage - Request Metadata' section that was added in newer commit
- Your actual intended change was to proxy/guardrails/bedrock.md (authentication tip) which is preserved
- Now only has additions, no subtractions as intended

Fixes the bedrock.md sync issue.

* docs: Restore missing IAM policy section in bedrock.md

Added back your intended IAM policy documentation that was lost when restoring main version:

 Added IAM AssumeRole Policy section:
- Explains requirement for sts:AssumeRole permission
- Shows error message example when permission missing
- Provides complete IAM policy JSON example
- Links to AWS AssumeRole documentation
- Clarifies trust policy requirements

Now bedrock.md has both:
- All newer content preserved (Request Metadata section)
- Your intended IAM policy addition restored

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-09-25 15:49:19 -07:00
Krish DholakiaandGitHub 64a305f9dd Merge pull request #14721 from dharamendrak/reuse-aiohttp-session-http-handler
feat: Add shared_session parameter for aiohttp ClientSession reuse
2025-09-23 18:07:32 -07:00
Ishaan Jaffer 45f835227b Revert "Merge pull request #14769 from TeddyAmkie/doc-updates-sept-2025"
This reverts commit 666bcac2af, reversing
changes made to b7803bcbb0.
2025-09-23 14:14:58 -07:00
Dharamendra Kumar 34f51a20eb Merge branch 'main' into reuse-aiohttp-session-http-handler 2025-09-23 10:36:35 -07:00
Krish DholakiaandGitHub af151e6ba8 Merge branch 'main' into doc-updates-sept-2025 2025-09-22 22:41:02 -07:00
Krrish Dholakia 4c66e1f6bf docs(provider_specific_params.md): fix docs 2025-09-22 17:18:57 -07:00
berri-teddy 27a755eb84 Update docs to explainb bridging between endpoints and mode 2025-09-21 15:08:44 -07:00
Dharamendra Kumar 77a39e7ca9 feat: Add shared_session parameter for aiohttp ClientSession reuse
Allow passing aiohttp.ClientSession to acompletion() calls for better
performance and resource management. Includes debug logging, tests,
and documentation. Backward compatible.
2025-09-19 01:46:53 -07:00
Tim Elfrink 27a37ce57e Use requestMetadata parameter name for consistency with other Bedrock params
- Change parameter from request_metadata to requestMetadata to match camelCase convention
- Consistent with guardrailConfig and performanceConfig naming pattern
- Update all references in transformation code and error messages
- Update tests and documentation to use correct parameter name
- Fix type checking for parameter validation
2025-09-18 09:21:45 +02:00
Elias TOURNEUX 54f49b430d fix: edit readme to add OVHCloud 2025-09-12 14:29:33 +02:00
Krish DholakiaandGitHub d72081113e Merge pull request #14111 from dharamendrak/feature/aiohttp-dependency-injection
feat: Add dependency injection support to BaseLLMAIOHTTPHandler
2025-09-09 22:35:30 -07:00
Dharamendra Kumar 92596e48fe Merge branch 'main' into feature/aiohttp-dependency-injection 2025-09-07 17:54:55 -07:00
Dharamendra Kumar 009106def0 docs for custom aiohttp session 2025-09-07 17:42:26 -07:00
Mubashir OsmaniandGitHub cb117647fc [docs]: added loom for claude code (#14223)
* added loom for claude code

* docs: add web search models

* added new loom
2025-09-06 09:09:22 -07:00
Sameer KankuteandGitHub 4adfd18bc6 [Feat]Add support for safety_identifier parameter in chat.completions.create (#14174)
* Add support for safety_identifier parameter in chat.completions.create

* make sure param is getting actually passed to the raw api
2025-09-02 09:37:08 -07:00
Ishaan JaffandGitHub 04dc1a5351 [Feat] Add support for returning images with gemini/gemini-2.5-flash-image-preview with /chat/completions (#13983)
* add gemini-2.5-flash-image-preview

* add gemini-2.5-flash-image-preview

* add image in ChatCompletionResponseMessage

* test_gemini_image_generation_async

* Revert "Merge pull request #13394 from Deviad/feature/enhance_logging_for_containers"

This reverts commit 539b94ad4e, reversing
changes made to 71af7bcf9c.

* include `image` in Delta

* fix _process_candidates should show the image response

* fix: _handle_special_delta_attributes

* test_gemini_image_generation_async_stream

* image_generation_chat

* UI - allow looking at generated images from /chat/completions

* _create_streaming_choice

* fix import StreamingChoices

* fix ChatCompletionResponseMessage

* test_gemini_image_generation

* add gemini img migration

* fix _extract_candidate_metadata

* ui fix

* fix batch endpoint test
2025-08-27 16:16:19 -07:00
jinskjoy d8a33e137d [Enhancement] Add support for Mistral model file handling and update documentation 2025-08-21 20:35:07 +02:00
Ishaan Jaff 8d6b333909 docs computer use 2025-08-02 15:00:48 -07:00
Ishaan JaffandGitHub 2cf4d164fc docs - vector stores (#12781)
* docs vertex vector store

* guide for using other non openai providers

* docs polish

* docs KBs

* docs search endpoint

* docs vector stores
2025-07-19 17:07:44 -07:00
Ishaan JaffandGitHub 5a1746879d [Feat] Vector Stores - Add Vertex RAG Engine API as a provider (#12595)
* add Vertex VertexVectorStoreConfig

* add VertexVectorStoreConfig

* docs add Vertex Vector Store

* add initial VertexVectorStoreConfig

* test TestVertexAIVectorStore

* test - update test

* test update test

* fix vertex vector search

* fix transform_search_vector_store_response

* add transform_search_vector_store_response

* fix test

* transform_search_vector_store_response

* ruff fix

* transform_search_vector_store_request

* fix linting
2025-07-14 18:10:33 -07:00
Aaron VoglerandGitHub 4c466ef157 Integration: Bytez as a model provider (#12121)
* Get the basics of the integration working.

* Cleanup bytez integration.

* Update user agent for Bytez integration.

* Use the config class directly. Create the start of the docs.

* Finish up bytez documentation. Include a provider integration guide.

* Fix typing bug in custom_logger_utils. Add tests for bytez integration.

* Add token tracking for model usage for Bytez integration.

* Create a units test for the Bytez config.

* Make changes to Bytez transformation code per PR feedback.

* Cleanup coment in Bytez transformation test.

* Remove LRU usage for bytez integration.

* Consolidate Bytez tests into a single file. Conform to project structure for tests.

* Fix linting error with Bytez impl.
2025-07-12 10:50:39 -07:00
Ishaan JaffandGitHub d6cc384780 [Feat] OpenAI/Azure OpenAI - Add support for creating vector stores on LiteLLM (#12021)
* add create/acreate vector store

* add azure config

* add _base_validate_azure_environment

* fix base test

* add get_base_create_vector_store_args

* use base llm for headers responses api

* add _get_base_azure_url

* fix AzureOpenAIVectorStoreConfig

* TestAzureOpenAIVectorStore

* fix azure openai vector store

* fix test comment

* fix unused imports

* test_validate_environment_azure_api_key_within_secret_str

* test_azure_transformation.py
2025-06-24 20:46:48 -07:00
Ishaan JaffandGitHub 2bb8048864 [Feat] Add OpenAI Search Vector Store Operation (#12018)
* add BaseVectorStoreTransformation

* fix BaseVectorStoreTransformation

* add OpenAIVectorStoreTransformation

* fix transform

* add search, asearch vector stores

* add skeleton for vector store searching

* fix VectorStoreSearchOptionalRequestParams

* fix VectorStoreRequestUtils

* fix litellm.asearch/litellm.search

* fix BaseVectorStoreConfig

* add vector_store_search_handler to llm http handler

* use llm http handler for searching vector stores

* fix base vector store config

* fix vector_store_search_handler

* async_vector_store_search_handler

* add conftest

* add BaseVectorStoreTest

* move litellm.integrations.vector_store_integrations

* fix working OAI OpenAIVectorStoreConfig

* add Search vector store

* add OpenAI Vector Stores
2025-06-24 15:52:43 -07:00
Ishaan Jaff eec0e4d2be docs - web search 2025-06-23 21:25:35 -07:00
Mukesh Sai KumarandGitHub a44ff7c486 Fix markdown table not rendering properly (#11969) 2025-06-23 09:28:51 -07:00
Krrish Dholakia 3c7399e7ec docs(document_understanding.md): clarify support for openai models 2025-06-17 17:40:49 -07:00
Cole McIntoshandGitHub 322aefb97d Update documentation for configuring web search options in config.yaml (#11537)
* Update web_search.md to include new supported providers and models, enhance web search options, and improve documentation for using web search with various AI models.

* Update LiteLLM version in web_search.md to reflect the latest stable release.

* Fix formatting in web_search.md for model declaration consistency.

* docs(web_search.md): add configuration options for web search in config.yaml

This update introduces sections for setting default and custom web search options in the proxy config file, including examples for different models and context sizes. A note clarifies that users can override these settings in API requests.
2025-06-09 15:19:57 -07:00
Cole McIntoshandGitHub 1d86fc84fe Update web search documentation for new provider support (xAI, VertexAI, Google AI Studio) (#11515)
* Update web_search.md to include new supported providers and models, enhance web search options, and improve documentation for using web search with various AI models.

* Update LiteLLM version in web_search.md to reflect the latest stable release.

* Fix formatting in web_search.md for model declaration consistency.
2025-06-07 09:13:03 -07:00
k10andGitHub 9a35c41462 added logprobs (#11161) 2025-05-26 11:21:47 -07:00
Jorge Piedrahita OrtizandGitHub fd40bc6ddd update sambanova models and parameters (#10900)
* add sambanova to completion input params table

* update sambanova supported args

* update sambanova supported models

* minor changes

* fix sambanova model list

* update sambanova models

* update sambanova models

* update sambanova docs

* minor chnage sambanova url

* update type to match OpenAIGPTConfig

* minor change
2025-05-18 20:45:20 -07:00
d37cc63250 Add new model provider Novita AI (#7582) (#9527)
* Add new model provider Novita AI (#7582)

* feat: add new model provider Novita AI

* feat: use deepseek r1 model for examples in Novita AI docs

* fix: fix tests

* fix: fix tests for novita

* fix: fix novita transformation

* ci: fix ci yaml

* fix: fix novita transformation and test (#10056)

---------

Co-authored-by: Jason <ggbbddjm@gmail.com>
2025-05-12 21:49:30 -07:00
Ishaan Jaff ee8aa23c19 docs VectorStoreRegistry 2025-05-03 12:05:49 -07:00
Ishaan JaffandGitHub 071c8a2e26 [Docs] Using LiteLLM with vector stores / knowledge bases (#10534)
* docs vector store registry

* img for kbs

* docs kb with litellm

* fix code qa
2025-05-03 11:28:33 -07:00
Krrish Dholakia c5b2d4a529 docs(document_understanding.md): clarify 'format' param usage 2025-05-01 14:34:16 -07:00
Ishaan JaffandGitHub be885e4a17 [Feat] Vector Stores/KnowledgeBases - Allow defining Vector Store Configs (#10448)
* init vector store configs

* working kb init

* add vector store endpoints

* use litellm_credential_name

* working CRUD vector stores litellm

* working creds with vector DB

* ui cleanup

* clean up vector store id

* fix delete button

* refactored vector store component

* working selector for KBs

* ui vector stores

* add vector store tool calls usage on chat ui

* fixes for vector stores litellm

* test fix

* docs Knowledge Bases

* fixes for vector stores litellm

* fix linting

* add managed vectorstores

* fix orjson ci/cd test

* fix linting

* add types.tsx file
2025-04-30 21:49:59 -07:00
Ishaan JaffandGitHub f30871ef13 [Feat] Add support for using Bedrock Knowledge Bases with LiteLLM /chat/completions requests (#10413)
* add make_bedrock_kb_retrieve_request

* working bedrock KB hook

* working bedrock KB hook

* test_openai_with_knowledge_base_mock_openai

* fix linting

* fix BedrockKnowledgeBaseHook

* docs using bedrock kb with litellm

* docs kb with litellm

* fix bedrock kb test

* DynamicPromptManagementParamLiteral

* fix _should_run_prompt_management_hooks_without_prompt_id

* test_init_custom_logger_compatible_class_as_callback
2025-04-29 17:29:02 -07:00
Dimitri Papadopoulos OrfanosandGitHub 5e2fd49dd3 Fix typos (#10232) 2025-04-23 20:59:25 -07:00
Krrish Dholakia f4c9dce211 docs: cleanup docs 2025-04-06 09:40:17 -07:00
Krrish Dholakia bdad9961e3 docs: cleanup 2025-04-03 22:12:51 -07:00
Krrish Dholakia abea69352a docs(document_understanding.md): Fix https://github.com/BerriAI/litellm/issues/9704 2025-04-03 22:12:31 -07:00
Ishaan Jaff 3f52a4df32 docs allowed openai params 2025-04-02 09:08:11 -07:00