litellm/litellm/llms
devin-ai-integration[bot] 6a2d3edce3
fix(bedrock): split the <reasoning> tag for gpt-oss only on native Chat Completions (#44432)
* fix(bedrock): split the <reasoning> tag for gpt-oss only on native Chat Completions

The native Chat Completions route moved a leading <reasoning>...</reasoning>
block into reasoning_content for every model, while only gpt-oss writes its
reasoning inline. A GPT 5.6 or Grok answer that starts with a literal
<reasoning> tag lost that text, streaming and non-streaming alike. Both paths
now split only when the model id is gpt-oss.

* fix(bedrock): drive the inline reasoning split from a cost-map flag

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-10-08 16:32:07 -07:00
..
a2a refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
ai21/chat
aiml refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
aiohttp_openai/chat refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
amazon_nova feat(tokenizer): preserve Python defaults with opt-in Rust dispatch (#42174) 2026-09-22 04:41:11 +00:00
anthropic refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
apiserpent
aws_polly
azure refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
azure_ai fix(anthropic): normalize images for provider token counting (#45185) 2026-10-07 16:36:27 -07:00
base_llm chore(decisions): remove the System One converters and OpenAI spec types left dead by #45214 (#45442) 2026-10-08 14:34:06 -07:00
baseten
bedrock fix(bedrock): split the <reasoning> tag for gpt-oss only on native Chat Completions (#44432) 2026-10-08 16:32:07 -07:00
bedrock_mantle refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
black_forest_labs refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
brave/search feat(tokenizer): preserve Python defaults with opt-in Rust dispatch (#42174) 2026-09-22 04:41:11 +00:00
bytez refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
cerebras
chatgpt refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07: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 refactor(decisions): dispatch /v1/decisions through provider configs and the shared HTTP handler (#45130) 2026-10-07 19:45:45 -07:00
codestral/completion refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
codex refactor(types): replace Any with proven types in 157 files (#44798) 2026-10-06 15:31:54 +00:00
cohere refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
cometapi refactor(types): replace Any with proven types in 157 files (#44798) 2026-10-06 15:31:54 +00:00
compactifai feat(tokenizer): preserve Python defaults with opt-in Rust dispatch (#42174) 2026-09-22 04:41:11 +00:00
custom_httpx feat(decisions): add OpenAI as a Decisions provider behind a shared decisions format (#45214) 2026-10-08 04:57:41 +00:00
dashscope refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
databricks refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
dataforseo/search
datarobot/chat refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
deepagents refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
deepgram refactor: expose public hidden_params accessors (#44668) 2026-10-07 00:01:33 -07:00
deepinfra refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
deepseek refactor(types): replace Any with proven types in 157 files (#44798) 2026-10-06 15:31:54 +00:00
deprecated_providers feat(tokenizer): preserve Python defaults with opt-in Rust dispatch (#42174) 2026-09-22 04:41:11 +00:00
docker_model_runner/chat refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
duckduckgo/search
e2b refactor: expose public hidden_params accessors (#44668) 2026-10-07 00:01:33 -07:00
edenai perf(types): defer pydantic schema builds via shared LiteLLMBaseModel (#44720) 2026-10-05 22:10:08 -07:00
elevenlabs refactor: expose public hidden_params accessors (#44668) 2026-10-07 00:01:33 -07:00
empower/chat
exa_ai/search fix(exa): fall back to highlights/summary when text is missing (#42213) 2026-10-02 14:15:15 -07:00
fal_ai refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
fastcrw
featherless_ai/chat refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
firecrawl
fireworks_ai feat(fireworks_ai): forward the LiteLLM user id as user behind fireworks_forward_user_id (#45265) 2026-10-08 12:48:16 -07:00
friendliai/chat
galadriel/chat
gdc refactor(types): replace Any with real types across 29 more backend files 2026-09-08 10:14:07 +00:00
gemini refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
gigachat refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
github/chat
github_copilot refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
google_pse/search
gradient_ai/chat refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
groq refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
heroku/chat refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
hosted_vllm refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
huggingface refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07: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
jina_ai refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
lambda_ai refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
langflow refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
langgraph refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
laya perf(types): defer pydantic schema builds via shared LiteLLMBaseModel (#44720) 2026-10-05 22:10:08 -07:00
lemonade refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
linkup
litellm_proxy refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07: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 refactor(types): replace Any with proven types in 16 files (#45029) 2026-10-07 04:31:51 -07:00
meta/realtime chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
meta_llama/chat
milvus/vector_stores
minimax refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
mistral refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
modelscope refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
mongodb perf(types): defer pydantic schema builds via shared LiteLLMBaseModel (#44720) 2026-10-05 22:10:08 -07:00
moonshot/chat refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
morph refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
nadir/chat chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
nebius
nimble perf(types): defer pydantic schema builds via shared LiteLLMBaseModel (#44720) 2026-10-05 22:10:08 -07:00
nlp_cloud refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -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 refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
nvidia_riva refactor(types): replace Any with proven types in 157 files (#44798) 2026-10-06 15:31:54 +00:00
oci refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
ollama fix(ollama): one stream id, 400 on non-text tool content, separated tool results, no empty message item (#45177) 2026-10-07 19:08:26 -07:00
oobabooga refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
openai feat(decisions): add OpenAI as a Decisions provider behind a shared decisions format (#45214) 2026-10-08 04:57:41 +00:00
openai_like refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
opencode refactor(types): replace Any with proven types in 157 files (#44798) 2026-10-06 15:31:54 +00:00
openrouter refactor(decisions): dispatch /v1/decisions through provider configs and the shared HTTP handler (#45130) 2026-10-07 19:45:45 -07:00
opensandbox refactor: expose public hidden_params accessors (#44668) 2026-10-07 00:01:33 -07:00
ovhcloud refactor: expose public hidden_params accessors (#44668) 2026-10-07 00:01:33 -07:00
parallel_ai/search perf(types): defer pydantic schema builds via shared LiteLLMBaseModel (#44720) 2026-10-05 22:10:08 -07:00
pass_through feat(guardrails): per-mode stream_scope with bedrock stream and pass-through fixes (#43801) 2026-10-08 13:46:53 -07:00
perplexity refactor(decisions): dispatch /v1/decisions through provider configs and the shared HTTP handler (#45130) 2026-10-07 19:45:45 -07:00
petals refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
pg_vector/vector_stores
predibase refactor: expose public hidden_params accessors (#44668) 2026-10-07 00:01:33 -07:00
ragflow refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
recraft refactor(types): replace Any with proven types in 157 files (#44798) 2026-10-06 15:31:54 +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(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
runwayml refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
s3_vectors fix(s3_vectors): embed registered-store ingests with the store's embedding model 2026-09-19 04:31:15 -07:00
sagemaker refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
sail chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
sambanova refactor(types): replace Any with proven types in 157 files (#44798) 2026-10-06 15:31:54 +00:00
sap refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
scaleway refactor: expose public hidden_params accessors (#44668) 2026-10-07 00:01:33 -07:00
searchapi
searxng
serper/search
snowflake refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
soniox refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
stability refactor: expose public hidden_params accessors (#44668) 2026-10-07 00:01:33 -07:00
strands_decider/decisions refactor(decisions): dispatch /v1/decisions through provider configs and the shared HTTP handler (#45130) 2026-10-07 19:45:45 -07:00
tavily/search
tencent refactor(anthropic): rename experimental_pass_through to pass_through (#43329) 2026-09-26 13:00:50 -07:00
tinyfish/search refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
together_ai refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -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 feat(tokenizer): preserve Python defaults with opt-in Rust dispatch (#42174) 2026-09-22 04:41:11 +00:00
triton feat(tokenizer): preserve Python defaults with opt-in Rust dispatch (#42174) 2026-09-22 04:41:11 +00:00
typesafe/decisions refactor(decisions): dispatch /v1/decisions through provider configs and the shared HTTP handler (#45130) 2026-10-07 19:45:45 -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 refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
vertex_ai feat(gemini): accept file content blocks with video_metadata on multimodal embeddings (#45305) 2026-10-08 13:20:03 -07:00
vllm refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
volcengine refactor: expose public hidden_params accessors (#44668) 2026-10-07 00:01:33 -07:00
voyage feat(voyage): rebrand to VoyageAI by MongoDB and route MongoDB keys to ai.mongodb.com (#41812) 2026-10-08 13:12:47 -07:00
wandb chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
watsonx refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
xai refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
xinference/image_generation
you_com
zai refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
__init__.py
base.py
compaction.py feat(router): native compact-to-fit across conversation APIs (#42074) 2026-09-21 22:52:29 -07:00
custom_llm.py
maritalk.py
oss_decision.py feat: add Bespoke Nimble gateway and OSS classifier support (#44246) 2026-10-02 19:37:08 -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/.