Commit graph

3 commits

Author SHA1 Message Date
Ishaan Jaffer
e8461b5b97
style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
Shivaang
7c4e576400 fix: add API key validation in OpenRouter image edit config
Raise ValueError when OPENROUTER_API_KEY is not set instead of
sending "Bearer None" and getting a confusing 401 from the API.
2026-02-28 11:44:32 -05:00
Shivaang
3775ba3eaa feat(openrouter): add image edit support for OpenRouter models
OpenRouter supports image editing through its chat completions endpoint
for models like google/gemini-2.5-flash-image, but LiteLLM raised
ValueError("image edit is not supported for openrouter") because
OpenRouter was not registered as an image edit provider.

Add OpenRouterImageEditConfig that routes image edit requests through
the chat completions endpoint with the source image as a base64 data
URL in the message content array.

Fixes https://github.com/BerriAI/litellm/issues/22305
2026-02-28 11:22:54 -05:00