litellm/litellm/llms
Mateo Wang 9d8fe1ddb5
refactor(types): replace Any with proven types in 50 files (#47818)
* refactor(types): replace Any with proven types in 100 files

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

* refactor(types): keep untyped parsing where strict validation changed accepted shapes

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

* refactor(types): keep the OpenAI-compatible response parse untyped

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

* refactor(types): keep only annotation changes, drop new runtime validation

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

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-21 11:58:31 +00:00
..
a2a chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
ai21/chat feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
aiml fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
aiohttp_openai/chat fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
amazon_nova feat(tokenizer): preserve Python defaults with opt-in Rust dispatch (#42174) 2026-09-22 04:41:11 +00:00
anthropic fix(responses)!: round-trip Anthropic compaction blocks as compaction items (#46754) 2026-10-21 08:50:19 +00:00
apiserpent fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
aws_polly refactor(sdk): separate core AWS and tokenizer dependencies (#44447) 2026-10-08 19:07:57 -07:00
azure fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
azure_ai fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
base_llm refactor(types): replace Any with proven types in 50 files (#47818) 2026-10-21 11:58:31 +00:00
baseten fix(baseten): list current Model APIs instead of retired 2023 deployment IDs (#46945) 2026-10-19 16:40:13 +00:00
bedrock fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
bedrock_mantle fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
bespoke/decisions feat(decisions): add Laya and Bespoke providers to the Add Model form (#45260) 2026-10-14 08:11:11 -07:00
black_forest_labs fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
brave/search chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
bytez refactor(typing): clear 1143 basedpyright Any errors across 273 files (#46574) 2026-10-15 21:08:47 +00:00
cerebras fix(cerebras): add max_retries and extra_headers to get_supported_openai_params (#36601) 2026-08-25 14:10:56 -07:00
chatgpt fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
clarifai/chat refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
claude_code refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
cloudflare fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
codestral/completion fix(prompt-templates): treat initial_prompt_value and final_prompt_value as optional (#39762) 2026-10-16 10:30:59 +00:00
codex refactor(types): replace Any with proven types in 157 files (#44798) 2026-10-06 15:31:54 +00:00
cohere fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
cometapi fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
compactifai feat(tokenizer): preserve Python defaults with opt-in Rust dispatch (#42174) 2026-09-22 04:41:11 +00:00
custom_httpx fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
dashscope fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
databricks fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
dataforseo/search chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
datarobot/chat refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
deepagents refactor(typing): clear 1143 basedpyright Any errors across 273 files (#46574) 2026-10-15 21:08:47 +00:00
deepgram fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
deepinfra refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
deepseek fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
deprecated_providers refactor(typing): clear 1143 basedpyright Any errors across 273 files (#46574) 2026-10-15 21:08:47 +00:00
docker_model_runner/chat fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
duckduckgo/search fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
e2b fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
edenai fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
elevenlabs fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
empower/chat
exa_ai/search fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
fal_ai fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
fastcrw fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
featherless_ai/chat refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
firecrawl fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
fireworks_ai fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
friendliai/chat fix(friendliai): drop litellm-internal message fields before sending (#45092) 2026-10-20 01:22:07 +00:00
galadriel/chat
gdc fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
gemini fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
gigachat fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
github/chat
github_copilot refactor(types): replace Any with proven types in 50 files (#47818) 2026-10-21 11:58:31 +00:00
google_pse/search chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
gradient_ai/chat fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
groq refactor(typing): clear 1143 basedpyright Any errors across 273 files (#46574) 2026-10-15 21:08:47 +00:00
heroku/chat fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
hosted_vllm fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
huggingface fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
hyperbolic refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
inception refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
infinity fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
jina_ai fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
lambda_ai refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
langflow fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
langgraph fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
laya feat(decisions): add Laya and Bespoke providers to the Add Model form (#45260) 2026-10-14 08:11:11 -07:00
lemonade fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
linkup fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
litellm_proxy fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
llamafile/chat refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
lm_studio refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
manus fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
meta/realtime fix(realtime)!: keep turn_detection.type when a transcript guardrail disables auto-response (#44939) 2026-10-16 15:24:40 +00:00
meta_llama/chat feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
microsoft_365_copilot fix(router)!: bound fake-streamed calls by the request timeout, not stream_timeout (#47162) 2026-10-17 22:08:02 +00:00
milvus/vector_stores fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
minimax fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
mistral fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
modelscope fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
mongodb fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
moonshot/chat fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
morph refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
nace/decisions feat: add Nace Drex decisions provider (#46523) 2026-10-16 18:07:50 -07:00
nadir/chat chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
nebius feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
nimble fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
nlp_cloud chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
novita/chat fix(openai-compat): send provider attribution headers on the default SDK path (+ Perplexity) (#44291) 2026-10-07 13:21:27 -07:00
nscale/chat refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
nvidia_nim fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
nvidia_riva feat(nvidia_riva)!: add riva_offline mode for offline-only ASR models (#41021) 2026-10-20 23:03:56 +00:00
oci fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
ollama refactor(types): replace Any with proven types in 50 files (#47818) 2026-10-21 11:58:31 +00:00
oobabooga fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
openai fix(responses)!: round-trip Anthropic compaction blocks as compaction items (#46754) 2026-10-21 08:50:19 +00:00
openai_like fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
opencode fix(harness): set PWD to the working directory of local sandbox commands (#47530) 2026-10-20 20:06:11 +00:00
openrouter fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
opensandbox fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
ovhcloud fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
parallel_ai/search perf(types): defer pydantic schema builds via shared LiteLLMBaseModel (#44720) 2026-10-05 22:10:08 -07:00
pass_through fix(bedrock)!: scan Claude invoke-with-response-stream passthrough output with post_call guardrails (#46524) 2026-10-17 01:17:19 -07:00
perplexity fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
petals fix(prompt-templates): treat initial_prompt_value and final_prompt_value as optional (#39762) 2026-10-16 10:30:59 +00:00
pg_vector/vector_stores fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
pi feat(harness): add pi harness for litellm.agent() (#45467) 2026-10-20 09:01:40 +00:00
predibase fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
ragflow fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
recraft fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
reducto refactor(ocr): remove the Python OCR execution path and require the Rust route (#43081) 2026-09-24 18:18:50 -07:00
replicate refactor(typing): clear 1143 basedpyright Any errors across 273 files (#46574) 2026-10-15 21:08:47 +00:00
runwayml fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
s3_vectors fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
sagemaker fix(sagemaker)!: parse every streamed record however SageMaker cuts the payload parts (#47495) 2026-10-20 09:36:49 +00:00
sail chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
sambanova fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
sap fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
scaledown fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
scaleway fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
searchapi chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
searxng fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
serper/search fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
snowflake fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
soniox fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
stability fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
strands_decider/decisions feat(strands_decider): call a Strands Decider on an AgentCore runtime ARN (#45678) 2026-10-09 22:51:19 -07:00
tavily/search fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
tencent fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
tinyfish/search refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
together_ai fix(responses bridge): round-trip tool_search_call and tool_search_output items between turns (#46444) 2026-10-14 21:40:14 -07:00
tool_loop feat(harness): add Harness.TOOL_LOOP, a minimal in-process tool-calling loop (#44391) 2026-10-03 17:33:01 +00:00
topaz fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
triton feat(tokenizer): preserve Python defaults with opt-in Rust dispatch (#42174) 2026-09-22 04:41:11 +00:00
typesafe/decisions fix(decisions): read a deployment's own supports_box_questions flag before the cost map (#46696) 2026-10-15 12:34:36 -07:00
v0 refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
valkey perf(types): defer pydantic schema builds via shared LiteLLMBaseModel (#44720) 2026-10-05 22:10:08 -07:00
vercel_ai_gateway fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
vertex_ai fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
vllm fix(prompt-templates): treat initial_prompt_value and final_prompt_value as optional (#39762) 2026-10-16 10:30:59 +00:00
volcengine fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
voyage fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
wandb chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
watsonx fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
xai fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
xinference/image_generation feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
you_com fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
zai refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
__init__.py fix(cost): bill azure_ai claude web searches under deployment-owned pricing ids (#46135) 2026-10-12 19:40:53 -07:00
base.py refactor(types): replace Any with proven types in 24 files (#46663) 2026-10-15 06:10:12 -07:00
compaction.py feat(router): native compact-to-fit across conversation APIs (#42074) 2026-09-21 22:52:29 -07:00
custom_llm.py refactor(types): replace Any with proven types in 24 files (#46663) 2026-10-15 06:10:12 -07:00
maritalk.py feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
oss_decision.py feat(decisions): add Laya and Bespoke providers to the Add Model form (#45260) 2026-10-14 08:11:11 -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/.