• Edric Li's avatar
    feat: same-account retry before failover for transient errors · d6c2921f
    Edric Li authored
    For retryable transient errors (Google 400 "invalid project resource name"
    and empty stream responses), retry on the same account up to 2 times
    (with 500ms delay) before switching to another account.
    
    - Add RetryableOnSameAccount field to UpstreamFailoverError
    - Add same-account retry loop in both Gemini and Claude/OpenAI handler paths
    - Move temp-unschedule from service layer to handler layer (only after
      all same-account retries exhausted)
    - Reduce temp-unschedule cooldown from 30 minutes to 1 minute
    d6c2921f
gateway_handler.go 46.4 KB