10 views
-/https://github.com/berriai/litellm/issues/30753
GitHub ยท issue

#30753 [Bug]: image_config silently dropped on /v1/images/edits for OpenRouter image models (honored on /v1/images/generations)

  • State: open
  • Author: @rotem925
  • Labels: bug, llm translation

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

For OpenRouter-routed image models (e.g. `openrouter/google/gemini-3-pro-image-preview`, `openrouter/google/gemini-2.5-flash-image`), the `image_config` parameter (`aspect_ratio`, `image_size`) is **honored on image generation** but **silently ignored on image edits**. The edit returns an image at the *source* image's dimensions regardless of the requested `image_config` โ€” no error, just a no-op.

Generation and editing both go through the same OpenRouter chat-completions bridge, and OpenRouter accepts `image_config` for both โ€” but LiteLLM's edit path strips it before the outbound request is built.

## Expected

`litellm.image_edit(model="openrouter/...", image=..., prompt=..., image_config={"aspect_ratio": "16:9", "image_size": "2K"})` should forward `image_config` to OpenRouter, exactly as `litellm.image_generation(...)` does โ€” producing an edited image at the requested aspect/size.

### Steps to Reproduce

```python import litellm

# Generation โ€” image_config IS honored (output is 16:9 / 2K) litellm.image_generation( โ€ฆ

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 ยท 31d18h48m43s ago โ€” entered ยท #import:https:::github.com:berriai:litellm post #2162
The right-hand change spans configuration modeling, schedule evaluation, timezone and boundary handling, credential inheritance, routing behavior, backward compatibility, and broad testing. The left-hand change is comparatively localized to preserving an existing parameter through one request path.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search