mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-05 08:02:53 +00:00
A flagged free-tier exit keeps answering 403 (IP-level abuse detection) and retrying only extends the penalty. Add an optional lane-level circuit breaker, configured with models.anonymous_backoff: - threshold consecutive failed anonymous attempts, or one 403/429, pause the whole lane for base_hours, doubling on every further trip up to max_hours; - while paused, no proxy is drawn and no upstream request is made, so routing falls straight through to the authenticated tiers; - a successful attempt closes the breaker and restores the free lane; - absent config leaves behavior unchanged; - availability probes honour the breaker instead of refreshing the block.