litellm/litellm/llms
devin-ai-integration[bot] 23af78465c
feat: add cache control injection support for v1/messages endpoint (#31778)
* feat: add cache control injection support for v1/messages endpoint

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix: normalize string content to list for Anthropic-native cache_control injection

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* refactor: simplify cache control injection, fix system=[] bug, fix handler system type

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* refactor: extract cache control logic into static helper on AnthropicCacheControlHook

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-06-30 19:31:51 -07:00
..
a2a style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
ai21/chat (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
aiml style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
aiohttp_openai/chat style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
amazon_nova style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
anthropic feat: add cache control injection support for v1/messages endpoint (#31778) 2026-06-30 19:31:51 -07:00
apiserpent style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
aws_polly style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
azure style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
azure_ai style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
base_llm feat(messages): passthrough /v1/messages to native endpoints via supported_endpoints (#31685) 2026-06-30 12:17:33 -07:00
baseten style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
bedrock style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
bedrock_mantle style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
black_forest_labs style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
brave/search style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
bytez style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
cerebras fix: add reasoning param support for GPT OSS cerebras 2026-02-02 17:20:04 +05:30
chatgpt style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
clarifai/chat style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
cloudflare/chat style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
codestral/completion style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
cohere style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
cometapi style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
compactifai style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
custom_httpx fix(websearch): websearch_interception agentic loop fixes for chat completions and anthropic messages (#31669) 2026-07-01 09:36:40 +08:00
dashscope style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
databricks fix(databricks): split parallel tool calls so each tool message follows tool_calls (#31633) 2026-06-29 13:46:53 -07:00
dataforseo/search style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
datarobot/chat style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
deepgram style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
deepinfra style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
deepseek style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
deprecated_providers style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
docker_model_runner/chat style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
duckduckgo/search style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
e2b style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
elevenlabs style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
empower/chat LiteLLM Common Base LLM Config (pt.3): Move all OAI compatible providers to base llm config (#7148) 2024-12-10 17:12:42 -08:00
exa_ai/search style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
fal_ai style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
fastcrw style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
featherless_ai/chat style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
firecrawl style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
fireworks_ai style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
friendliai/chat (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
galadriel/chat (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
gemini fix(realtime): stop second Gemini Live setup, retry hung handshake, close guardrail bypass (#31519) 2026-06-28 08:52:20 +05:30
gigachat style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
github/chat (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
github_copilot style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
google_pse/search style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
gradient_ai/chat style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
groq style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
heroku/chat style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
hosted_vllm style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
huggingface style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
hyperbolic Revert "Litellm dev 07 21 2025 p1 (#12848)" 2025-07-22 18:28:36 -07:00
inception style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
infinity style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
jina_ai style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
lambda_ai style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
langflow style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
langgraph style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
lemonade style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
linkup style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
litellm_proxy style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
llamafile/chat style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
lm_studio style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
manus style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
meta_llama/chat style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
milvus/vector_stores style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
minimax style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
mistral style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
modelscope style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
moonshot/chat style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
morph style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
nebius Integration with Nebius AI Studio added (#11143) 2025-05-27 11:05:22 -07:00
nlp_cloud style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
novita/chat build(deps-dev): bump black to 26.3.1 and apply formatting (#28525) 2026-05-21 17:24:18 -07:00
nscale/chat style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
nvidia_nim style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
nvidia_riva style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
oci style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
ollama style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
oobabooga style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
openai style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
openai_like feat(messages): passthrough /v1/messages to native endpoints via supported_endpoints (#31685) 2026-06-30 12:17:33 -07:00
openrouter style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
opensandbox style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
ovhcloud style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
parallel_ai/search style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
pass_through style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
perplexity style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
petals style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
pg_vector/vector_stores style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
predibase style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
ragflow style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
recraft style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
reducto style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
replicate style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
runwayml style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
s3_vectors style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
sagemaker style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
sambanova style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
sap style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
scaleway/audio_transcription style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
searchapi style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
searxng style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
serper/search style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
snowflake style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
soniox style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
stability style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
tavily/search style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
tinyfish/search style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
together_ai style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
topaz style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
triton style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
v0 style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
vercel_ai_gateway style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
vertex_ai fix(vertex_ai/files): single media upload for batch files to fix 499s on large uploads (#31653) 2026-06-29 17:31:32 -07:00
vllm style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
volcengine style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
voyage style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
wandb (feat): Add W&B Inference to LiteLLM 2025-09-11 00:07:30 +05:30
watsonx style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
xai style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
xinference/image_generation style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
you_com style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
zai style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
__init__.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
base.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
custom_llm.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
maritalk.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
README.md LiteLLM Minor Fixes and Improvements (09/13/2024) (#5689) 2024-09-14 10:02:55 -07:00

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/.