caelum0x 28c50618a8 feat(relay): production provider routing — per-provider retry+backoff, Retry-After, health recording, SLO config
- per-provider RetryConfig on ModelConfig (default 1 retry; 0=legacy immediate failover); all 4 dispatch loops
  (infer_hedged/stream + both sequential) wrap the network call in retry_collecting_errors (exp backoff+jitter, is_retryable)
- parse_retry_after() (delay-seconds + HTTP-date) threaded through openai/anthropic/gemini(+13 sites) error handlers;
  honored as the retry sleep via Error.retry_after (serde-skip field, no construction-site churn)
- health recording decoupled from hedge.enabled (HEALTH_RECORDING_ENABLED) so EWMA/circuit-breaker updates on sequential path
- [gateway.relay.slo] TOML -> SloConfig (was hardcoded with_defaults); installed before router build
- cargo check green (gateway, tensorzero-core, relay-hedge, tensorzero-error). NOTE: vendored #[cfg(test)] literals
  need mechanical retries/None/slo bumps before cargo test compiles (lib/bin gate is green; deferred per no-tests rule)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-09-23 12:57:20 +03:00
..