litellm/litellm/llms
Mateo Wang c8b78d49dd
fix(bedrock): stop stale SigV4 headers clobbering fresh signature on strip-and-retry re-sign (#32371)
* fix(bedrock): stop stale SigV4 headers clobbering fresh signature on re-sign

When the Anthropic /v1/messages strip-thinking-and-retry path re-signs a
Bedrock request, _sign_request received attempt 1's already-signed headers
and copied the old Authorization and X-Amz-Date back over the freshly
computed SigV4 signature, so the retry POSTed the stripped body with a
signature for the original body and AWS returned 403 SignatureDoesNotMatch.

Skip SigV4-computed headers (authorization, x-amz-date,
x-amz-security-token, date) when restoring caller headers after signing,
and only preserve a caller-supplied Authorization that is not itself a
SigV4 header so bearer-token setups keep working.

* fix(bedrock): apply the same stale-header guard to get_request_headers
2026-07-07 16:01:46 -07:00
..
a2a fix(a2a): populate response usage in a2a chat transformation (#31980) 2026-07-03 09:28:36 +05:30
ai21/chat
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 fix(batches): price anthropic passthrough message batches correctly in batch cost job (#32307) 2026-07-06 20:33:57 -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 fix(azure): build responses input_items url with path before query string (#32270) 2026-07-06 14:02:44 -07:00
azure_ai fix(azure_ai): preserve content, tables, and keyValuePairs in doc-intelligence /v1/ocr (#32018) 2026-07-02 22:38:36 -07:00
base_llm fix(azure_ai): preserve content, tables, and keyValuePairs in doc-intelligence /v1/ocr (#32018) 2026-07-02 22:38:36 -07:00
baseten style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
bedrock fix(bedrock): stop stale SigV4 headers clobbering fresh signature on strip-and-retry re-sign (#32371) 2026-07-07 16:01:46 -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(responses): surface upstream error status on get instead of 500 (#32287) 2026-07-06 22:45:25 -07: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
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
galadriel/chat
gdc feat(gdc): implement Google Distributed Cloud (GDC) Gemini provider (#31895) 2026-07-01 17:31:07 -07: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
github_copilot feat(github_copilot): route /v1/messages to Copilot native Anthropic endpoint (#31802) 2026-07-01 17:16:21 -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
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
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 chore(lint): zero out crash-class pyright rules and ban new type: ignore comments (#32152) 2026-07-04 16:56:12 -07:00
ollama chore(lint): zero out crash-class pyright rules and ban new type: ignore comments (#32152) 2026-07-04 16:56:12 -07:00
oobabooga style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
openai fix(responses-bridge): custom tool round-trip and allowlist preservation for Codex CLI (#32258) 2026-07-06 17:34:27 -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 chore(lint): zero out crash-class pyright rules and ban new type: ignore comments (#32152) 2026-07-04 16:56:12 -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
tencent feat(tencent): add Tencent TokenHub as a provider (#31903) 2026-07-02 18:31:59 -07:00
tinyfish/search feat(tinyfish): make search provider permissive, attribute errors (#31997) 2026-07-03 10:17:11 -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): return create_vertex_url result directly for openai-path partner models with custom api_base (#32380) 2026-07-07 14:49:21 -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
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

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