litellm/litellm/llms
Rick 1a1b924a6f
feat(volcengine): add Ark Seedream image generation, editing, and pricing (#54076)
* feat(volcengine): add Seedream image generation and editing

Co-Authored-By: AaronHowell <111272993+AaronHowell@users.noreply.github.com>

* feat(volcengine): price the Ark Seedream image models

Co-Authored-By: AaronHowell <111272993+AaronHowell@users.noreply.github.com>

* fix(volcengine): let a deployment image price override shared tiers

Co-Authored-By: AaronHowell <111272993+AaronHowell@users.noreply.github.com>

* fix(volcengine): bill only output images, price layer splits whole, and drop retired Seedream rows

Ark does not bill images it failed to output, so the cost calculator now skips data items with no url or b64_json. In a layer decomposition every output, the z_index 0 base included, bills at the layer rate.

Seedream 4.5, 5.0 lite and the 4.0 250828 snapshot were shut down on 2026-11-24 per Ark's deprecation notice, so their rows are removed and 4.0 is priced under its replacement IDs 260415 and 20260415.

Also regenerates provider_endpoints_support.json and clears the new type-discipline violations.

* fix(volcengine): resolve image api_base and key like chat, bill deployment prices first, and keep stream away from Ark

Image generation and edits now use api_base as given with the same default
and key order as Volcengine chat, and no longer read ARK_API_BASE. A user
longer than Ark's 64-character safety_identifier limit is sent as its sha256.
stream is rejected (or dropped with drop_params) whether it arrives top-level
or inside extra_body, edits keep fanning out n after a dropped stream, and a
multipart stream="false" is not a stream request. Edits forward extra_body
fields to Ark. A deployment's own per-image and tier prices now win over the
shared layer and tier rows

* fix(volcengine): send extra_headers to Ark, read ARK_API_BASE, price BytePlus Seedream names

Image generation sends deployment and caller extra_headers as HTTP headers again, so a caller Authorization header replaces the Ark key, and keeps them out of the JSON body. The endpoint falls back to VOLCENGINE_API_BASE, then ARK_API_BASE. BytePlus dola-* and seedream-* names get rows at BytePlus's USD list price, and the 2K tier starts past 1536^2 x 1.05^2 pixels as Ark's price page states.

* fix(volcengine): keep deployment prices, SDK retries and async calls on Seedream images

A deployment priced per pixel or per input image is billed by its own price again.
Direct SDK generation retries a 429 or 5xx twice by default, honors max_retries and
leaves retries to the router on proxy calls. Async generation runs on the async
handler, forwarded client headers reach Ark, n above the fan-out cap is dropped
with drop_params, and stream in extra_body no longer skips the edit fan-out

* fix(volcengine): read the Volcengine env keys before litellm.api_key on Seedream images

A global litellm.api_key set for another provider no longer reaches Ark when VOLCENGINE_API_KEY or ARK_API_KEY is set, matching Volcengine chat. Adds a test for a deployment that sets both image prices.

* fix(volcengine): bill a deployment's own Seedream tier prices when it also prices input images

A deployment that set input_cost_per_image with output_cost_per_image_1K or _2K fell back to the default image calculator, which billed only the input price. Tier prices now count as an output price for Volcengine, so the provider calculator bills each image at its tier. Also drops a test that only checked config classes

* fix(volcengine): keep a supplied OpenAI client's key and base URL on Seedream image generation

* fix(volcengine): send Seedream generation through a supplied OpenAI client's own http_client and retries

* fix(volcengine): wrap a supplied OpenAI client's http_client through http_handler

* fix(volcengine): keep a caller's async client on connection errors and let a call max_retries win

---------

Co-authored-by: AaronHowell <111272993+AaronHowell@users.noreply.github.com>
Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-11-26 07:52:44 +00:00
..
a2a refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
ai21/chat refactor(types): replace Unknown with proven types in 245 files (#53774) 2026-11-23 10:05:26 -08:00
aiml refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
aiohttp_openai/chat refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
amazon_nova refactor(types): replace Unknown with proven types in 245 files (#53774) 2026-11-23 10:05:26 -08:00
anthropic fix(anthropic): keep caller tool_use ids unless the upstream rejects them (#54468) 2026-11-26 05:55:01 +00:00
apiserpent refactor(types): replace Unknown with proven types in 162 more files (#54089) 2026-11-23 22:58:19 -08:00
aws_polly chore(types): type optional_params and litellm_params as dict[str, object] across provider method families (#54175) 2026-11-24 14:40:37 +00:00
azure refactor(types): type the params models' get and read keys and base URLs through a str-or-None helper (#54589) 2026-11-26 04:13:56 +00:00
azure_ai refactor(typing): clear 102 basedpyright Any errors across 21 files (#54586) 2026-11-25 19:03:46 -08:00
base_llm fix(anthropic): keep caller tool_use ids unless the upstream rejects them (#54468) 2026-11-26 05:55:01 +00:00
baseten refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
bedrock fix(bedrock): send pass-through calls the model id chat completions sends (#53836) 2026-11-25 18:42:28 -08:00
bedrock_mantle fix(bedrock_mantle): drop the JSON Schema keywords gemma-4 rejects from tool and response schemas (#54214) 2026-11-25 07:04:08 +00:00
bespoke/decisions
bigmodel fix(zai): accept reasoning_effort so /v1/messages thinking reaches GLM models (#54279) 2026-11-25 04:56:45 +00:00
black_forest_labs refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
brave/search refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
bytez refactor(types): replace Unknown with proven types in 131 more files (#54045) 2026-11-24 04:55:42 +00:00
cerebras refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
chatgpt fix(openai): drop or refuse an o-series reasoning_effort level the model map turns off (#54066) 2026-11-24 06:42:03 -08:00
clarifai/chat refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
claude_code refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
clf_ai_gateway/chat
cloudflare refactor(types): give bare dict headers parameters proven types in 118 files (#54154) 2026-11-24 12:22:34 +00:00
codestral/completion refactor(types): replace Unknown with proven types in 86 files (#53803) 2026-11-24 12:45:20 +00:00
codex refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
cohere refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
cometapi chore(types): type optional_params and litellm_params as dict[str, object] across provider method families (#54175) 2026-11-24 14:40:37 +00:00
compactifai
custom_httpx feat(volcengine): add Ark Seedream image generation, editing, and pricing (#54076) 2026-11-26 07:52:44 +00:00
dashscope refactor(types): replace Unknown with proven types in 86 files (#53803) 2026-11-24 12:45:20 +00:00
databricks fix(openai_like): end an async stream cleanly when the connection drops after the finish (#54565) 2026-11-26 07:48:41 +00:00
dataforseo/search refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
datarobot/chat refactor(types): replace Unknown with proven types in 245 files (#53774) 2026-11-23 10:05:26 -08:00
deepagents refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
deepgram refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
deepinfra refactor(types): give bare dict headers parameters proven types in 118 files (#54154) 2026-11-24 12:22:34 +00:00
deepseek refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
deprecated_providers refactor(types): replace Unknown with proven types in 131 more files (#54045) 2026-11-24 04:55:42 +00:00
docker_model_runner/chat refactor(types): replace Unknown with proven types in 162 more files (#54089) 2026-11-23 22:58:19 -08:00
duckduckgo/search refactor(types): replace Unknown with proven types in 225 files (#53687) 2026-11-24 00:11:50 +00:00
e2b refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
edenai refactor(typing): clear 1146 basedpyright Any errors across 365 files (#52768) 2026-11-21 04:25:33 +00:00
elevenlabs refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
empiriolabs/decisions
empower/chat
eu_jev
exa_ai/search refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
fal_ai refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
fastcrw refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
featherless_ai/chat refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
firecrawl refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
fireworks_ai fix(llms): send later system messages as user turns for models declared system-first (#54347) 2026-11-25 11:48:27 +00:00
friendliai/chat
galadriel/chat
gdc chore(types): type optional_params and litellm_params as dict[str, object] across provider method families (#54175) 2026-11-24 14:40:37 +00:00
gemini refactor(types): type the params models' get and read keys and base URLs through a str-or-None helper (#54589) 2026-11-26 04:13:56 +00:00
gigachat refactor(types): give bare dict headers parameters proven types in 118 files (#54154) 2026-11-24 12:22:34 +00:00
github/chat
github_copilot fix(github_copilot): look up a GHE.com shared login's Copilot API on its own tenant (#54366) 2026-11-25 08:30:23 +00:00
gnani feat(gnani): add Prisma v2.5 and v3.0 realtime transcription (#53828) 2026-11-25 10:51:59 +00:00
google_pse/search refactor(types): replace Unknown with proven types in 162 more files (#54089) 2026-11-23 22:58:19 -08:00
gradient_ai/chat chore(types): type optional_params and litellm_params as dict[str, object] across provider method families (#54175) 2026-11-24 14:40:37 +00:00
gradium feat(gradium): add text-to-speech support for /v1/audio/speech (#46427) 2026-11-21 23:51:27 +00:00
groq refactor(types): annotate repeated bare-container parameters across method families (#54268) 2026-11-24 14:13:19 -08:00
heroku/chat refactor(types): replace Unknown with proven types in 245 files (#53774) 2026-11-23 10:05:26 -08:00
hosted_vllm fix(hosted_vllm): keep vLLM's prompt_token_ids on the first streamed chat chunk (#51087) 2026-11-25 19:54:45 -08:00
huggingface refactor(types): give bare dict, list and tuple returns proven types in 133 files (#54321) 2026-11-25 01:30:02 +00:00
hyperbolic refactor(types): replace Unknown with proven types in 245 files (#53774) 2026-11-23 10:05:26 -08:00
inception refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
infinity refactor(types): replace Unknown with proven types in 162 more files (#54089) 2026-11-23 22:58:19 -08:00
jina_ai refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
lambda_ai
langflow refactor(types): replace Unknown with proven types in 131 more files (#54045) 2026-11-24 04:55:42 +00:00
langgraph refactor(types): replace Unknown with proven types in 162 more files (#54089) 2026-11-23 22:58:19 -08:00
laya
lemonade refactor(types): give bare dict, list and tuple returns proven types in 133 files (#54321) 2026-11-25 01:30:02 +00:00
linkup refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
litellm_proxy refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
llamafile/chat
lm_studio refactor(types): replace Unknown with proven types in 86 files (#53803) 2026-11-24 12:45:20 +00:00
manus refactor(types): replace Unknown with proven types in 162 more files (#54089) 2026-11-23 22:58:19 -08:00
meta/realtime feat(elevenlabs): add scribe_v2_realtime realtime transcription (#48984) 2026-11-25 03:15:34 +00:00
meta_llama/chat refactor(types): replace Unknown with proven types in 131 more files (#54119) 2026-11-24 02:26:51 -08:00
microsoft_365_copilot
milvus/vector_stores refactor(types): replace Unknown with proven types in 162 more files (#54089) 2026-11-23 22:58:19 -08:00
minimax refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
mistral refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
modelscope refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
mongodb refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
moonshot/chat chore(types): type optional_params and litellm_params as dict[str, object] across provider method families (#54175) 2026-11-24 14:40:37 +00:00
morph
nace/decisions
nadir/chat refactor(types): replace Unknown with proven types in 86 files (#53803) 2026-11-24 12:45:20 +00:00
nebius refactor(types): replace Unknown with proven types in 245 files (#53774) 2026-11-23 10:05:26 -08:00
nimble
nlp_cloud refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
novita/chat refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
nscale/chat refactor(types): replace Unknown with proven types in 245 files (#53774) 2026-11-23 10:05:26 -08:00
nvidia_nim chore(types): type optional_params and litellm_params as dict[str, object] across provider method families (#54175) 2026-11-24 14:40:37 +00:00
nvidia_riva refactor(types): give bare dict headers parameters proven types in 118 files (#54154) 2026-11-24 12:22:34 +00:00
oci refactor(types): type bare dict data and request_data parameters across method families (#54192) 2026-11-24 08:39:27 -08:00
ollama fix(ollama): send model-info lookups to the call's api_base with its key and retry failed ones (#53830) 2026-11-24 08:51:25 -08:00
oobabooga refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
openai fix(hosted_vllm): keep vLLM's prompt_token_ids on the first streamed chat chunk (#51087) 2026-11-25 19:54:45 -08:00
openai_like refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
opencode refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
openrouter fix(openrouter): report the context window and output cap from OpenRouter's catalog (#54046) 2026-11-24 04:37:30 -08:00
opensandbox refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
opensearch feat(opensearch): map vector store search filters to k-NN filters and add hybrid search (#51131) 2026-11-14 03:30:55 +00:00
ovhcloud refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
parallel_ai refactor(types): replace Unknown with proven types in 82 more files (#53918) 2026-11-23 17:36:22 -08:00
pass_through refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
perplexity refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
petals refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
pg_vector/vector_stores refactor(types): give bare dict, list and tuple returns proven types in 133 files (#54321) 2026-11-25 01:30:02 +00:00
pi refactor(types): replace Unknown with proven types in 245 files (#53774) 2026-11-23 10:05:26 -08:00
predibase chore(types): type optional_params and litellm_params as dict[str, object] across provider method families (#54175) 2026-11-24 14:40:37 +00:00
ragflow refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
recraft refactor(types): replace Unknown with proven types in 131 more files (#54119) 2026-11-24 02:26:51 -08:00
reducto
replicate refactor(types): replace Unknown with proven types in 131 more files (#54119) 2026-11-24 02:26:51 -08:00
runwayml refactor(types): give bare dict headers parameters proven types in 118 files (#54154) 2026-11-24 12:22:34 +00:00
s3_vectors chore(types): type optional_params and litellm_params as dict[str, object] across provider method families (#54175) 2026-11-24 14:40:37 +00:00
sagemaker fix(embeddings): send request-shaped extra_body fields at the provider's documented path (#54273) 2026-11-25 13:29:52 -08:00
sail refactor(types): replace Unknown with proven types in 131 more files (#54045) 2026-11-24 04:55:42 +00:00
sambanova refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
sap refactor(typing): clear 102 basedpyright Any errors across 21 files (#54586) 2026-11-25 19:03:46 -08:00
scaledown
scaleway refactor(types): replace Unknown with proven types in 162 more files (#54089) 2026-11-23 22:58:19 -08:00
searchapi refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
searxng refactor(types): replace Unknown with proven types in 162 more files (#54089) 2026-11-23 22:58:19 -08:00
serper/search refactor(types): replace Unknown with proven types in 162 more files (#54089) 2026-11-23 22:58:19 -08:00
snowflake refactor(types): give bare dict, list and tuple returns proven types in 133 files (#54321) 2026-11-25 01:30:02 +00:00
soniox feat(gnani): add Prisma v2.5 and v3.0 realtime transcription (#53828) 2026-11-25 10:51:59 +00:00
stability refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
strands_decider/decisions
tavily/search refactor(types): replace Unknown with proven types in 162 more files (#54089) 2026-11-23 22:58:19 -08:00
tencent fix: log image generation and edit cost breakdowns (#54470) 2026-11-25 15:01:59 -05:00
tinyfish/search refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
together_ai refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
tool_loop
topaz refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
triton refactor(types): replace Unknown with proven types in 162 more files (#54089) 2026-11-23 22:58:19 -08:00
typesafe/decisions fix(decisions): accept OpenAI input_json content parts on /v1/decisions (#52805) 2026-11-20 13:33:36 -08:00
v0 refactor(types): replace Unknown with proven types in 245 files (#53774) 2026-11-23 10:05:26 -08:00
valkey refactor(types): replace Unknown with proven types in 131 more files (#54119) 2026-11-24 02:26:51 -08:00
vercel_ai_gateway refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
vertex_ai fix(vertex-ai): raise BadRequestError instead of ValueError in VertexAIImagenImageEditConfig (#52538) 2026-11-25 21:15:29 -08:00
vllm refactor(types): give bare dict headers parameters proven types in 118 files (#54154) 2026-11-24 12:22:34 +00:00
volcengine feat(volcengine): add Ark Seedream image generation, editing, and pricing (#54076) 2026-11-26 07:52:44 +00:00
voyage chore(types): type optional_params and litellm_params as dict[str, object] across provider method families (#54175) 2026-11-24 14:40:37 +00:00
wandb refactor(types): replace Unknown with proven types in 162 more files (#54089) 2026-11-23 22:58:19 -08:00
watsonx refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
webiq
xai refactor(types): replace Unknown with proven types in 86 files (#53803) 2026-11-24 12:45:20 +00:00
xinference/image_generation refactor(types): replace Unknown with proven types in 131 more files (#54045) 2026-11-24 04:55:42 +00:00
you_com refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
zai fix(zai): accept reasoning_effort so /v1/messages thinking reaches GLM models (#54279) 2026-11-25 04:56:45 +00:00
__init__.py
base.py refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
compaction.py
custom_llm.py refactor(types): replace Unknown with proven types in 225 files (#53687) 2026-11-24 00:11:50 +00:00
maritalk.py refactor(types): replace Unknown with proven types in 86 files (#53803) 2026-11-24 12:45:20 +00:00
oss_decision.py
README.md
subscription_accounts.py

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