litellm/litellm/llms
Sameer Kankute fd7ff0f269
fix(hosted_vllm): normalize custom tools for chat completions (#25763)
* fix(hosted_vllm): normalize custom tools for chat completions

Convert custom tool definitions into OpenAI function tools before forwarding hosted_vllm chat requests to avoid provider-side validation failures. Add a regression test and include a local curl verification screenshot.

Made-with: Cursor

* Fix black issue

* Fix hosted vllm custom tool schema fallback

* fix black

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-05-05 17:27:02 -07:00
..
a2a style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
ai21/chat
aiml style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
aiohttp_openai/chat
amazon_nova style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
anthropic fix(anthropic, mcp): sanitize tool names to match Anthropic's [a-zA-Z0-9_-]{1,128} pattern (#26788) 2026-05-06 00:00:36 +00:00
aws_polly style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
azure feat(realtime): OpenAI Realtime GA support and beta compatibility (#27110) 2026-05-05 16:49:20 -07:00
azure_ai refactor: remove unnecessary comments from #27074 2026-05-04 19:34:56 +00:00
base_llm Merge pull request #27160 from BerriAI/litellm_/peaceful-gates-6e46e7 2026-05-04 21:11:53 -07:00
baseten style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
bedrock refactor(BaseAWSLLM): implement shared IAM cache and static credentia… (#27125) 2026-05-05 16:47:47 -07:00
bedrock_mantle/chat feat(provider): add Amazon Bedrock Mantle as a first-class provider 2026-03-05 00:03:40 -05:00
black_forest_labs chore(security): close two unaddressed SSRF cases 2026-05-01 18:43:47 +00:00
brave/search fix(mypy): fix scattered 1-off type errors across 14 files 2026-03-13 00:08:57 +00:00
bytez fix: preserve safe provider model path segments 2026-04-29 22:09:54 -07:00
cerebras fix: add reasoning param support for GPT OSS cerebras 2026-02-02 17:20:04 +05:30
chatgpt style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
clarifai/chat style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
cloudflare/chat Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_oss_staging_04_25_2026 2026-05-02 06:04:39 +00:00
codestral/completion fix(types): remove StreamingChoices from ModelResponse, use ModelResponseStream 2026-02-20 17:47:42 -03:00
cohere feat(vertex_ai): propagate metadata labels to embedding, Imagen, rerank 2026-04-02 09:56:56 +05:30
cometapi style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
compactifai style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
custom_httpx feat(realtime): OpenAI Realtime GA support and beta compatibility (#27110) 2026-05-05 16:49:20 -07:00
dashscope fix(dashscope): fail fast on image generation API errors 2026-04-23 18:41:01 +05:30
databricks fix: remove unused import 2026-05-04 14:29:12 -07:00
dataforseo/search style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
datarobot/chat Updated URL handling for DataRobot provider base 2025-08-21 19:42:46 -06:00
deepgram fix mypy lint 2025-11-03 18:02:19 -08:00
deepinfra Merge branch 'litellm_internal_staging' into litellm_vertex_request_metadata_labels 2026-04-21 09:10:51 +05:30
deepseek style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
deprecated_providers style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
docker_model_runner/chat style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
duckduckgo/search style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
elevenlabs fix: encode additional provider path identifiers 2026-04-29 22:18:20 -07:00
empower/chat
exa_ai/search style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
fal_ai style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
featherless_ai/chat fix(featherless_ai): use correct FEATHERLESS_AI_API_KEY env var name 2026-03-01 17:11:58 +01:00
firecrawl style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
fireworks_ai Merge branch 'litellm_internal_staging' into litellm_vertex_request_metadata_labels 2026-04-21 09:10:51 +05:30
friendliai/chat
galadriel/chat
gemini fix: encode additional provider path identifiers 2026-04-29 22:18:20 -07:00
gigachat style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
github/chat
github_copilot [Fix] Apply black formatting to fix CI lint failures 2026-04-20 15:53:12 -07:00
google_pse/search style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
gradient_ai/chat style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
groq style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
heroku/chat style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
hosted_vllm fix(hosted_vllm): normalize custom tools for chat completions (#25763) 2026-05-05 17:27:02 -07:00
huggingface Merge branch 'litellm_internal_staging' into litellm_vertex_request_metadata_labels 2026-04-21 09:10:51 +05:30
hyperbolic Revert "Litellm dev 07 21 2025 p1 (#12848)" 2025-07-22 18:28:36 -07:00
infinity style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
jina_ai feat(vertex_ai): propagate metadata labels to embedding, Imagen, rerank 2026-04-02 09:56:56 +05:30
lambda_ai style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
langgraph style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
lemonade style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
linkup style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
litellm_proxy chore: simplify ownership tracking — drop thin stores, in-memory fallback, hand-rolled cache 2026-05-05 00:23:32 +00:00
llamafile/chat style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
lm_studio style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
manus fix: encode upstream URL path identifiers 2026-04-29 22:02:39 -07:00
meta_llama/chat
milvus/vector_stores fix: drop milvus dbName and partitionNames from MILVUS_OPTIONAL_PARAMS 2026-04-30 11:51:32 -07:00
minimax style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
mistral Merge pull request #25256 from BerriAI/litellm_ishaan_april6 2026-04-17 16:26:45 -07:00
moonshot/chat style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
morph fix morph api tests 2025-07-22 18:44:44 -07:00
nebius
nlp_cloud
novita/chat
nscale/chat
nvidia_nim Merge branch 'litellm_internal_staging' into litellm_vertex_request_metadata_labels 2026-04-21 09:10:51 +05:30
nvidia_riva feat(audio_transcription): add NVIDIA Riva STT provider (#27185) 2026-05-05 17:17:51 -07:00
oci style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
ollama fix(ollama): forward tool_calls and tool_call_id in transform_request (#26122) 2026-04-27 08:58:41 +05:30
oobabooga
openai feat(realtime): OpenAI Realtime GA support and beta compatibility (#27110) 2026-05-05 16:49:20 -07:00
openai_like fix(crusoe): add param_mappings for max_completion_tokens → max_tokens 2026-05-01 17:27:52 +05:30
openrouter fix(image_edit): forward litellm_params to validate_environment for Vertex AI credentials 2026-04-21 14:54:18 +05:30
ovhcloud fix(ovhcloud): Fix tool calling not working (#25948) 2026-04-22 19:33:58 -07:00
parallel_ai/search style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
pass_through fix(proxy): OpenAI Moderation post-call guardrail response not captured for logging 2026-03-23 15:39:22 +01:00
perplexity style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
petals style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
pg_vector/vector_stores fix: encode upstream URL path identifiers 2026-04-29 22:02:39 -07:00
predibase fix black issues 2026-04-27 10:13:52 +05:30
ragflow fix: encode upstream URL path identifiers 2026-04-29 22:02:39 -07:00
recraft fix(image_edit): forward litellm_params to validate_environment for Vertex AI credentials 2026-04-21 14:54:18 +05:30
replicate style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
runwayml fix: encode upstream URL path identifiers 2026-04-29 22:02:39 -07:00
s3_vectors Fix extra body error 2026-04-29 08:34:31 +05:30
sagemaker style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
sambanova style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
sap style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
scaleway/audio_transcription Feature/add audio support for scaleway (#26110) 2026-04-20 14:49:41 -07:00
searchapi style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
searxng style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
serper/search style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
snowflake fix: enforce format constraints on provider-specific URL parameters 2026-04-22 16:28:51 -07:00
stability fix(image_edit): forward litellm_params to validate_environment for Vertex AI credentials 2026-04-21 14:54:18 +05:30
tavily/search style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
together_ai [Fix] TogetherAIConfig.get_supported_openai_params recursion 2026-04-16 17:20:58 -07:00
topaz
triton feat(triton): add embedding usage estimation for self-hosted responses (#25345) 2026-04-08 21:14:27 -07:00
v0 style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
vercel_ai_gateway style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
vertex_ai Merge pull request #27019 from stuxf/codex/cloud-storage-file-guard 2026-05-04 14:59:47 -07:00
vllm fix vllm passthrough 2025-09-22 10:09:02 -03:00
volcengine fix: encode upstream URL path identifiers 2026-04-29 22:02:39 -07:00
voyage Merge branch 'litellm_internal_staging' into litellm_vertex_request_metadata_labels 2026-04-21 09:10:51 +05:30
wandb (feat): Add W&B Inference to LiteLLM 2025-09-11 00:07:30 +05:30
watsonx feat(vertex_ai): propagate metadata labels to embedding, Imagen, rerank 2026-04-02 09:56:56 +05:30
xai feat(realtime): OpenAI Realtime GA support and beta compatibility (#27110) 2026-05-05 16:49:20 -07:00
xinference/image_generation [Feat] Add XInference Image Generation API Provider (#12439) 2025-07-08 21:17:38 -07:00
zai style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
__init__.py Litellm oss staging 04 02 2026 p1 (#25055) 2026-04-08 21:37:10 -07:00
base.py
custom_llm.py Fix mypy issues 2026-01-16 14:47:56 +05:30
maritalk.py
README.md

File Structure

August 27th, 2024

To make it easy to see how calls are transformed for each model/provider:

we are working on moving all supported litellm providers to a folder structure, where folder name is the supported litellm provider name.

Each folder will contain a *_transformation.py file, which has all the request/response transformation logic, making it easy to see how calls are modified.

E.g. cohere/, bedrock/.