mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-24 08:02:14 +03:00
Some ChatGPT accounts can run Codex but lack entitlement for the specific requested image model — upstream returns a stable 400 for that exact case. Today that fails the whole request; #8307 (fenix007) identified this as a production incident and wrote the original repro/test for it. Its own implementation predates the general credential-fallback mechanism this codebase now has (executeImageWithCredentialFallback + saveImageErrorResult's retryable opt-in, #10494) and duplicated that retry loop inline in route.ts, which now collides with it. This reimplements the same fix through the existing mechanism instead: classify the exact upstream message and mark the failure retryable, letting the already-wired sibling-account fallback do the rest. Co-authored-by: fenix007 <4217955+fenix007@users.noreply.github.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>