CoderAI: warm-up wait-and-retry on all paths + multi-hour request timeout
Move the CoderAI broker warm-up handling into the provider so it applies on
every request path (rotation, autoselect and direct), and only for the
broker-session "cooling down" error:
- coderai.py: handle_request now wraps the broker decision in a warm-up retry
loop — on "No active CoderAI broker session" it waits CODERAI_WARMUP_WAIT_
SECONDS (10s) and retries the same provider up to CODERAI_MAX_WARMUP_WAITS
(3) times, then surfaces the error WITHOUT recording a failure. Streaming
and native-proxy paths get the same treatment via _broker_request_with_warmup
(lazy generators retry on first broker contact). Other errors still record a
failure as before.
- handlers.py: every place that could disable a provider on a caught error now
skips record_failure() for the CoderAI warm-up condition (direct chat, direct
streaming, rotation streaming, audio/TTS/image/embeddings, and the rotation
retry loop), via the shared _is_coderai_warmup_error() helper. The rotation
loop no longer sleeps itself (the provider already waited) — it just fails
over without recording a failure.
- Default CoderAI request timeout raised from 5 min to 3 hours
(CODERAI_DEFAULT_REQUEST_TIMEOUT, overridable via coderai_config.request_
timeout); the timeout is also applied to the direct OpenAI client.
Bump version to 0.99.77.
Co-Authored-By:
Claude Opus 4.8 <noreply@anthropic.com>
Showing
This diff is collapsed.
Please
register
or
sign in
to comment