Skip to content

feat(volcengine): add Ark Seedream image generation, editing, and pricing (lts/1.108.x) - #54507

Merged
mateo-berri merged 20 commits into
BerriAI:lts/1.108.xfrom
izzybn:litellm_lts_volcengine_seedream_images
Nov 26, 2026
Merged

mateo-berri merged 20 commits into
BerriAI:lts/1.108.xfrom
izzybn:litellm_lts_volcengine_seedream_images

Conversation

@izzybn

@izzybn izzybn commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Handwritten 1-3 sentence description

This brings Seedream image generation, image edits, and Seedream pricing from #54076 to lts/1.108.x, with every commit of #54076 picked. The line has no shared image fan-out, so n above 1 gets a 400 unless drop_params is set

Details

TLDR

Problem this solves:

  • On lts/1.108.x, Seedream reaches Ark only through the generic OpenAI-compatible fallback, which drops Ark's per-image fields, cannot edit, and has no prices

How it solves it:

  • Add Volcengine image generation and edit configs, async included
  • Forward Ark's fields, map user to safety_identifier, and return per-image fields in provider_specific_fields
  • Bill each image or layer by its output pixel tier from new Seedream cost rows, unless the deployment sets a price
  • Read api_base and the key from the deployment, then the VOLCENGINE_* and ARK_* env vars

User Flow

Before: Ark's fields are lost, edits fail, and nothing is billed

  1. Send POST https://litellm-domain/v1/images/generations to a Seedream deployment
  2. Each image has "provider_specific_fields": null and x-litellm-response-cost is empty
  3. POST https://litellm-domain/v1/images/edits returns HTTP 500, image edit is not supported for volcengine

After: Ark's fields are kept, edits work, and both are billed

  1. Send the same generation request
  2. Each image carries Ark's size, output_format, and background in provider_specific_fields, and x-litellm-response-cost shows the tier price
  3. POST https://litellm-domain/v1/images/edits returns HTTP 200 with the edited image and its price

Relevant issues

LTS twin of #54076

Backport

Picks, every non-merge commit of #54076 through df875eb
Main commit LTS commit On the line
c9fb012 03c155c adapted, refuses n above 1
3900411 e06c5b0 adapted, the line's elif cost routing
fb7707f 7f89232 clean
99e2d06 5c6e06e adapted, the line's endpoint JSON
abf4325 839a069 adapted, tests without fan-out
2b825f0 935e62a adapted, the line's api_base lookup
08b98f8 9a2147f adapted, no fan-out cap or edit stream drop
cf88476 e846d7a clean
07cd763 972a6c9 adapted, the line's helper location
2431e89 8f375d8 context conflict only, same code
c365665 2eb5b28 adapted, the line's AsyncHTTPHandler params
c62cb85 037504e clean
df875eb 9741ace clean

The line has no shared image fan-out, so the first pick answers n above 1 with a 400 unless drop_params drops it, and main's fan-out cap and edit stream drop are left out. Four commits bring narrow parts of main the picks build on

Supporting commits and pick conflicts

cc9fcdf moves the fal_ai image_to_data_url helper into litellm/images/utils.py and fdc4326 routes model-priced image calculators through one table, both as in 8e8f6dc66ed. d071edd splits out the model-independent image edit lookup as in #48998. a3cdf00 carries the 1K and 2K image tier prices through get_model_info as in #50481, without which a 1K Seedream image billed at the 2K price. 2b49588, an ensure_api_route pick, is reverted by 6648cb6, so the pair changes nothing. b41bdce merges lts/1.108.x in cleanly. The 07cd763 pick conflicted only on where the line keeps the image price helper in utils.py and on its single-image transformation test, so the helper change went in place and the line's assertions stayed. The 2431e89 pick conflicted only on context, so its client helper went in unchanged

Tests and make check

make check passes at 9741ace against origin/lts/1.108.x. The picked client test fails on 972a6c9 and passes on 8f375d8, the 3 picked http_client tests fail on 8f375d8 and pass on 2eb5b28, and 5 picked retry tests fail on 037504e and pass on 9741ace. At 972a6c9 the 450 test files the picks reach had 33143 passing and 11 failing, and all 11 pass when rerun alone on this branch, so none fails because of it. Before that pick, the full unit suite at e846d7a had 108005 passing and 40 failing, and the 75 picked Volcengine image tests all pass. Each failing test was rerun alone on this branch and on the line's merge base 5da336d, and none fails because of this branch. 38 pass when rerun alone, since they failed only under load, and 2 fail on the merge base too

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • Every automated review on my PR's latest commit has finished, and I have addressed or replied to each of its findings before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

One live smoke per fix on the line, with real BytePlus ModelArk calls. Before is the line's tip 14ed7dc64d1 on port 29518 and After is this branch's tip e846d7a2e3d on port 27454, each a 2-worker proxy on its own Postgres. The deployments are the ones in #54076's proof, and in.png is a 1024x1024 Seedream 5.5 image

Case Before After After cost
C1, edit, 5.5 500, unsupported 200, fields 0.025714286
C2, generate, 5.5, 1K 200, no fields, unpriced 200, fields 0.018571429
C8, n=2, 5.0 flash 200, 1 image, unpriced 400 from LiteLLM none

Before (14ed7dc)

C1, Seedream 5.5 edit

Steps and output
  1. Send the request
$ curl -s -o lts_before/c1.json -w '\nHTTP %{http_code} x-litellm-response-cost: %header{x-litellm-response-cost}\n' http://127.0.0.1:29518/v1/images/edits -H "Authorization: Bearer $LITELLM_KEY" -F model=seedream-5-5 -F 'prompt=Make the lantern blue, keep everything else' -F image=@in.png -F size=1024x1024 -F watermark=false

HTTP 500 x-litellm-response-cost: 0
  1. Read the response
$ jq -c "{size, output_format, images_returned: ((.data // [])|length), data: [(.data // [])[] | {provider_specific_fields}], usage, error: (.error.message // null)}" lts_before/c1.json
{"size":null,"output_format":null,"images_returned":0,"data":[],"usage":null,"error":"litellm.APIConnectionError: APIConnectionError: VolcengineException - image edit is not supported for volcengine\n\nLiteLLM: model group 'seedream-5-5' failed with the error above. No fallback was attempted."}

C2, Seedream 5.5 generation, 1K

Steps and output
  1. Send the request
$ curl -s -o lts_before/c2.json -w '\nHTTP %{http_code} x-litellm-response-cost: %header{x-litellm-response-cost}\n' http://127.0.0.1:29518/v1/images/generations -H "Authorization: Bearer $LITELLM_KEY" -H 'Content-Type: application/json' -d '{"model":"seedream-5-5","prompt":"A red paper lantern and a green teacup on a wooden table, plain grey wall","size":"1024x1024","response_format":"url","watermark":false}'

HTTP 200 x-litellm-response-cost:
  1. Read the response
$ jq -c "{size, output_format, images_returned: ((.data // [])|length), data: [(.data // [])[] | {provider_specific_fields}], usage, error: (.error.message // null)}" lts_before/c2.json
{"size":null,"output_format":null,"images_returned":1,"data":[{"provider_specific_fields":null}],"usage":{"total_tokens":4096,"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":4096,"output_tokens_details":null,"input_images":0,"generated_images":1},"error":null}

C8, n=2 on 5.0 flash

Steps and output
  1. Send the request
$ curl -s -o lts_before/c8.json -w '\nHTTP %{http_code} x-litellm-response-cost: %header{x-litellm-response-cost}\n' http://127.0.0.1:29518/v1/images/generations -H "Authorization: Bearer $LITELLM_KEY" -H 'Content-Type: application/json' -d '{"model":"seedream-5-0-flash","prompt":"A red paper lantern on a wooden table","size":"1024x1024","n":2,"watermark":false}'

HTTP 200 x-litellm-response-cost:
  1. Read the response
$ jq -c "{size, output_format, images_returned: ((.data // [])|length), data: [(.data // [])[] | {provider_specific_fields}], usage, error: (.error.message // null)}" lts_before/c8.json
{"size":null,"output_format":null,"images_returned":1,"data":[{"provider_specific_fields":null}],"usage":{"total_tokens":4096,"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":4096,"output_tokens_details":null,"input_images":0,"generated_images":1},"error":null}

After (e846d7a)

C1, Seedream 5.5 edit

Steps and output
  1. Send the request
$ curl -s -o lts_after/c1.json -w '\nHTTP %{http_code} x-litellm-response-cost: %header{x-litellm-response-cost}\n' http://127.0.0.1:27454/v1/images/edits -H "Authorization: Bearer $LITELLM_KEY" -F model=seedream-5-5 -F 'prompt=Make the lantern blue, keep everything else' -F image=@in.png -F size=1024x1024 -F watermark=false

HTTP 200 x-litellm-response-cost: 0.025714286
  1. Read the response
$ jq -c "{size, output_format, images_returned: ((.data // [])|length), data: [(.data // [])[] | {provider_specific_fields}], usage, error: (.error.message // null)}" lts_after/c1.json
{"size":"1024x1024","output_format":"png","images_returned":1,"data":[{"provider_specific_fields":{"size":"1024x1024","output_format":"png","background":"opaque"}}],"usage":{"total_tokens":4096,"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":4096,"input_images":1,"generated_images":1},"error":null}

C2, Seedream 5.5 generation, 1K

Steps and output
  1. Send the request
$ curl -s -o lts_after/c2.json -w '\nHTTP %{http_code} x-litellm-response-cost: %header{x-litellm-response-cost}\n' http://127.0.0.1:27454/v1/images/generations -H "Authorization: Bearer $LITELLM_KEY" -H 'Content-Type: application/json' -d '{"model":"seedream-5-5","prompt":"A red paper lantern and a green teacup on a wooden table, plain grey wall","size":"1024x1024","response_format":"url","watermark":false}'

HTTP 200 x-litellm-response-cost: 0.018571429
  1. Read the response
$ jq -c "{size, output_format, images_returned: ((.data // [])|length), data: [(.data // [])[] | {provider_specific_fields}], usage, error: (.error.message // null)}" lts_after/c2.json
{"size":"1024x1024","output_format":"png","images_returned":1,"data":[{"provider_specific_fields":{"size":"1024x1024","output_format":"png","background":"opaque"}}],"usage":{"total_tokens":4096,"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":4096,"input_images":0,"generated_images":1},"error":null}

C8, n=2 on 5.0 flash

Steps and output
  1. Send the request
$ curl -s -o lts_after/c8.json -w '\nHTTP %{http_code} x-litellm-response-cost: %header{x-litellm-response-cost}\n' http://127.0.0.1:27454/v1/images/generations -H "Authorization: Bearer $LITELLM_KEY" -H 'Content-Type: application/json' -d '{"model":"seedream-5-0-flash","prompt":"A red paper lantern on a wooden table","size":"1024x1024","n":2,"watermark":false}'

HTTP 400 x-litellm-response-cost:
  1. Read the response
$ jq -c "{size, output_format, images_returned: ((.data // [])|length), data: [(.data // [])[] | {provider_specific_fields}], usage, error: (.error.message // null)}" lts_after/c8.json
{"size":null,"output_format":null,"images_returned":0,"data":[],"usage":null,"error":"litellm.UnsupportedParamsError: n > 1 is not supported for Volcengine image models (dola-seedream-5-0-flash-260915). Use sequential_image_generation for several images, or set `litellm.drop_params = True` to ignore n.\n\nLiteLLM: model group 'seedream-5-0-flash' failed with the error above. No fallback was attempted."}

Tier prices fix, 972a6c9

Before is e846d7a2e3d and After is 972a6c9085d, on 2-worker proxies with real BytePlus calls. The tier deployment sets 0.01 per input image, 0.02 per 1K image and 0.05 per 2K image

Case Before After
T1, tier deployment, 1K 0.01 0.02
T2, tier deployment, 2K 0.01 0.05
T3, tier deployment, 1K edit 0.01 0.03
U1 to U3, other prices 0.03, 0.03, 0.018571429 same
L1, layers via edit, 5.0 pro 3 layers, 0.064285713 same

L1 matches #54076's C6 price on main. Commands and output are in this gist

Supplied client fix, 8f375d8

No Volcengine or Ark env var is set, so the key and base URL come only from the client passed as client

Case LTS base 5da336d Tip 972a6c9 After 8f375d8
C36, sync OpenAI client 1 image, unpriced AuthenticationError 1 image, 0.02
C36, async AsyncOpenAI client 1 image, unpriced AuthenticationError 1 image, 0.02

Commands and output are in this gist

Supplied client transport fix, 2eb5b28 to 9741ace

The call now goes through the client's own http_client, sync and async, where 8f375d8 bypassed it (C37). 9741ace keeps a refused connection on that client, which 037504e retried around its proxy (C38)

C37 and C38 steps and output

The client has its own httpx.Client, whose request hook prints each request, and max_retries=0. Dotenv loading is off and no Volcengine or Ark env var is set

Case Base 5da336d Tip 8f375d8 After 2eb5b28 After 9741ace
C37, sync OpenAI client hook fired, unpriced no hook, 0.02 hook fired, 0.02 hook fired, 0.02
C37, async AsyncOpenAI client hook fired, unpriced no hook, 0.02 hook fired, 0.02 hook fired, 0.02

In C38 the async client's proxy port refuses every connection, and the call passes no max_retries

Case Base 5da336d Tip 037504e After 9741ace
C38, async, proxy refused 3 tries, APIConnectionError 1 try, then 1 image around it, 0.02 3 tries, InternalServerError

Picked unit tests against a gateway that answers 503 once prove a call's max_retries wins, else litellm retries twice, as on the base. Commands and output are in this gist

Type

🆕 New Feature

Caveats (if any)

Copied from #54076 and re-read against the line

Medium

  • Only BytePlus ran, since no mainland Volcengine key was available, so the author is asked to rerun cn-beijing
  • n above 1, quality, and style get a 400 without drop_params, since the line has no image fan-out. The line's base got a 200 and 1 image from Ark (C8)

Low

  • Direct SDK image edits do not retry a 429 or 5xx, like other providers' edits. A follow-up is filed
  • Volcengine Responses reads ARK_API_KEY before VOLCENGINE_API_KEY, the other order from images. A follow-up is filed
  • Without api_base, BytePlus-only names get a 404 from cn-beijing, as before
  • The Volcengine docs page has no image section yet. A follow-up is filed
  • A Seedream health check now bills one image, like other image models
  • A refused async connection raises InternalServerError, as sync already did, not APIConnectionError (C38). A follow-up is filed
Decisions

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR
Bugbot summary

[!NOTE]
Medium Risk
Touches shared image HTTP paths, retry behavior, and cost routing across providers; billing mistakes would affect proxy spend headers, but scope is mostly additive Volcengine wiring with broad unit test coverage.

Overview
Adds Volcengine (Ark Seedream) as a first-class path for image_generation and image_edit, instead of a generic OpenAI-compatible fallback that dropped Ark fields and could not bill edits.

New VolcEngineImageGenerationConfig / VolcEngineImageEditConfig map Ark params (layer decomposition, safety_identifier from user, etc.), serialize reference images via shared image_to_data_url, and populate provider_specific_fields on responses. Unsupported n > 1 and stream raise UnsupportedParamsError unless drop_params strips them (LTS has no multi-image fan-out).

images/main.py routes Volcengine through the shared HTTP handler with caller OpenAI/AsyncOpenAI clients (key, base URL, injected httpx client), optional max_retries (disabled on router/metadata with model_group), and passthrough edit params like Minimax.

images/retries.py plus max_retries on image_generation_handler add sync/async retries for transient HTTP failures. AsyncHTTPHandler can wrap an external client and skips internal reconnect retries when the caller owns the client.

Billing: catalog rows for Seedream models, output_cost_per_image_1K/_2K, and a Volcengine cost calculator (tiers, layer decomposition, input image allowances). Model-specific image calculators are consolidated via _model_priced_image_cost_calculator. Fal AI image edit now uses the shared data-URL helper.

Reviewed by Cursor Bugbot for commit 9741ace. Bugbot is set up for automated code reviews on this repo. Configure here.

mateo-berri and others added 15 commits November 24, 2026 23:51
Only the ensure_api_route helper of BerriAI#47535, which the Volcengine image configs use to append /api/v3 once.
Partial backport of 66c8f5b (BerriAI#47535) to lts/1.108.x.
Backport to lts/1.108.x. The line has no image fan-out, so n above 1 answers 400 unless drop_params drops it, and the image_to_data_url helper main already had comes with this commit.

(cherry picked from commit c9fb012)

Co-Authored-By: AaronHowell <111272993+AaronHowell@users.noreply.github.com>
Backport to lts/1.108.x. The line routes image costs through an elif chain, so Volcengine gets its own branch there in place of main's provider match table.

(cherry picked from commit 3900411)

Co-Authored-By: AaronHowell <111272993+AaronHowell@users.noreply.github.com>
Co-Authored-By: AaronHowell <111272993+AaronHowell@users.noreply.github.com>
(cherry picked from commit fb7707f)
…nd 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.

Backport to lts/1.108.x. The line's provider_endpoints_support.json keeps its own sparse rows, so only Volcengine's image_generations and image_edits flags are set instead of main's full regeneration.

(cherry picked from commit 99e2d06)
…rl helper

Partial backport of 8e8f6dc to lts/1.108.x, only its move of the fal_ai image data URL helper into litellm.images.utils, which the Volcengine image edit config also reads
…r own helper

Mirrors the _get_model_independent_image_edit_config split from bbc68e2 on main, so adding the Volcengine edit config keeps get_provider_image_edit_config under the line's C901 limit
… table

Mirrors main's _model_priced_image_cost_calculator from 8e8f6dc for the providers the line has, so adding the Volcengine image cost calculator keeps route_image_generation_cost_calculator under the C901 limit
Partial backport of BerriAI#50481 to lts/1.108.x.
Ported from 94861ec (main), only the
output_cost_per_image_1K and output_cost_per_image_2K fields on ModelInfo,
CustomPricingLiteLLMParams, get_model_info and the dashboard API types. Without
them the line dropped the Seedream tier prices before the Volcengine image cost
calculator saw them, so a 1K image billed at the 2K price
…yment 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, 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

On lts/1.108.x the line has no image fan-out, so n above 1 still answers a
400 unless drop_params, and the stream flag is read by a local helper since
the line has no litellm/images/streaming.py

(cherry picked from commit abf4325)
…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.

On lts/1.108.x the line has no _PROVIDERS_RESOLVING_THEIR_OWN_IMAGE_BASE, so it adds that tuple with Volcengine alone and keeps the caller's api_base for it, since get_llm_provider would otherwise fill in the Ark default and hide ARK_API_BASE

(cherry picked from commit 2b825f0)
…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, and forwarded client headers reach Ark

lts/1.108.x has no image fan-out, so the n fan-out cap and the edit stream drop from
main are left out. n above 1 is still refused, or ignored with drop_params, as before

(cherry picked from commit 08b98f8)
…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.

(cherry picked from commit cf88476)
@veria-ai

veria-ai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

All previously flagged issues have been addressed. No open security concerns remain on this pull request.

Fixed/addressed: 1 · PR risk: 0/10

Reviews

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@greptile-apps

greptile-apps Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The latest changes appear safe to merge, with both previous retry defects fixedRetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The latest changes appear safe to merge, with both previous retry defects fixed

Summary

Adds Seedream image generation, edits, provider fields, and per-image pricing to the LTS branch

  • Seedream generation sends Ark requests and returns Ark image details.
  • Seedream edits send images to Ark and return the edited results.
  • Seedream image charges follow output size and image type.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Seedream generation request] --> B[Resolve target and credentials]
    B --> C[Build Ark request]
    C --> D{Supplied HTTP client?}
    D -->|Yes| E[Send through supplied client]
    D -->|No| F[Send through shared client]
    E --> G{Retry allowed?}
    F --> G
    G -->|Yes| H[Retry through the same handler]
    H --> G
    G -->|Success| I[Keep image fields and usage]
    I --> J[Calculate image and input costs]
    G -->|Exhausted| K[Return error]
Loading

Reviews (5) · Last reviewed commit: "fix(volcengine): keep a caller's async c..." · Reviewed by Greptile

Comment on lines +114 to +120
def ark_image_generation_url(api_base: str | None) -> str:
base: Final = (
api_base or get_secret_str("VOLCENGINE_API_BASE") or get_secret_str("ARK_API_BASE") or ARK_DEFAULT_API_BASE
).rstrip("/")
if base.endswith("/images/generations"):
return base
return join_api_base(base, "images/generations")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Required live proof is incomplete

The live proof at e846d7a2e3d covers BytePlus single-image generation, editing, and rejected n. It omits mainland Volcengine and layer billing. The repository requires live proxy/provider proof for the relevant changed paths, even when keys are unavailable. Add those commands and outputs before merging

Rule Used: Apply this rule only to PRs that fix LLM translation bugs or add LLM translation features. LLM translation means converting requests, responses, streaming events, tool calls, and errors between the API a caller uses on LiteLLM (any endpoint or SDK fu... (source)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This backport gets one smoke per fix on the line. Layers ran live in #54076 (C6, C7, C12), and mainland is a Medium caveat

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You’re right that the line has one smoke for each of the main changed paths: generation, editing, and the n > 1 behavior. I don’t think those need to be repeated.

The remaining gap is narrower: the layer runs in #54076 are evidence for that PR, not this backport’s latest product commit (e846d7a2e3d); and the mainland caveat confirms that region was not live-tested here. The QA rule explicitly requires proof on this PR’s revision and says unavailable credentials do not waive it. So I’m keeping the finding, limited to a live layer-billing case and a mainland Volcengine smoke on e846d7a2e3d.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layer billing ran live at 972a6c9 and billed 3 layers 0.064285713, as on main (gist). Mainland stays a Medium caveat without a mainland key

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks—this closes the layer-billing gap: the live run at 972a6c9085d reports three layers billed at 0.064285713. Mainland Volcengine is still unverified at the latest product commit, 972a6c9085d, so that remains the outstanding QA item.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The author ran cn-beijing live on main at 2b825f0, seven calls, all 200 and billed. We have no mainland key to rerun it here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks—that is useful evidence: seven live cn-beijing calls at 2b825f066c7 all returned 200 and billed, so mainland behavior was exercised on the source implementation. I understand there’s no mainland key to repeat that on this LTS branch; I’ll note the source-run evidence and retain the PR’s caveat that the backport itself was smoke-tested only against BytePlus.

@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

… 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

(cherry picked from commit 07cd763)
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

…Seedream image generation

(cherry picked from commit 2431e89)
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

…lient's own http_client and retries

(cherry picked from commit c365665)
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

Comment thread litellm/images/main.py Resolved
Comment thread litellm/images/main.py Resolved
…d let a call max_retries win

(cherry picked from commit df875eb)
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 9741ace. Configure here.

@mateo-berri mateo-berri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mateo-berri
mateo-berri merged commit 28f4d97 into BerriAI:lts/1.108.x Nov 26, 2026
115 of 117 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants