Say why a provider request is rejected with 503
Every codex_think request was returning 503 within a millisecond with
nothing in debug.log to explain it. The provider had simply been toggled
off from the dashboard, but the six 503 sites in the request path all
collapsed three distinct states -- the manual dashboard toggle, the
failure cooldown and the usage-limit cooldown -- into a bare
"Provider temporarily unavailable" with no log line, making a disabled
provider indistinguishable from an upstream outage.
Route all six through _raise_if_provider_unavailable(), which logs a
WARNING and puts the actual reason (and remaining cooldown, where there
is one) in the response detail.
Co-Authored-By:
Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Showing
Please
register
or
sign in
to comment