Summary
Even without image_config, occasional requests through generate_image_openrouter against google/gemini-2.5-flash-image 404 with:
litellm.NotFoundError: NotFoundError: OpenrouterException -
{"error":{"message":"No endpoints found that support the requested
output modalities: image, text","code":404}}
Sequential CLI tests and 7-way concurrent CLI tests succeed 100% of the time, but during long pipeline runs we see ~1-3% of frame generations fail with this error. Likely cause: OpenRouter routing momentarily lands on an upstream replica that does not expose image modality.
Suggested fix
Retry on NotFoundError from generate_image_openrouter when the error message matches the "No endpoints found that support the requested output modalities" shape. 3 retries with exponential backoff would mask the routing blip transparently.
This is conceptually similar to the existing MAX_POLL_RETRIES logic in generate_video for 502/503/504 — same idea, different error class.
Consumer workaround
reel-af wraps provider.generate_image(...) in a 4-retry loop with exponential backoff in video_gen._gen_first_frame, plus a placeholder-frame fallback so a permanently-failing shot does not take down the whole reel. That logic belongs in the SDK so every consumer benefits.
Found by the Python SDK consumer reel-af (an AgentField example pipeline).
Summary
Even without
image_config, occasional requests throughgenerate_image_openrouteragainstgoogle/gemini-2.5-flash-image404 with:Sequential CLI tests and 7-way concurrent CLI tests succeed 100% of the time, but during long pipeline runs we see ~1-3% of frame generations fail with this error. Likely cause: OpenRouter routing momentarily lands on an upstream replica that does not expose image modality.
Suggested fix
Retry on
NotFoundErrorfromgenerate_image_openrouterwhen the error message matches the "No endpoints found that support the requested output modalities" shape. 3 retries with exponential backoff would mask the routing blip transparently.This is conceptually similar to the existing
MAX_POLL_RETRIESlogic ingenerate_videofor 502/503/504 — same idea, different error class.Consumer workaround
reel-af wraps
provider.generate_image(...)in a 4-retry loop with exponential backoff invideo_gen._gen_first_frame, plus a placeholder-frame fallback so a permanently-failing shot does not take down the whole reel. That logic belongs in the SDK so every consumer benefits.Found by the Python SDK consumer
reel-af(an AgentField example pipeline).