Uh oh!
There was an error while loading. Please reload this page.
fix(health): mark cooldown on completions/embeddings/images/passthrough failures - #705
Conversation
…gh failures mark_cooldown/note_failure fired on chat, messages, responses, audio, rerank and count_tokens — but not on completions, embeddings, images or passthrough, so a flapping upstream reached only via those endpoints kept a Healthy runtime status and never tripped the circuit breaker. Wire the shared cooldown::note_failure into each bridge-dispatch Err arm (a no-op for Config errors, so the 501 not-implemented branches stay uncooled), mark healthy + record_success on the Ok arms (recovery parity with rerank/audio), and cover passthrough's transport/decode failure sites against the borrowed model (forwarded HTTP statuses stay the caller's business in a raw tunnel). Fixes#701
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in:22 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Uh oh!
There was an error while loading. Please reload this page.
Problem
Audit finding #701 (parent: api7/AISIX-Cloud#950).
mark_cooldown/note_failurefired on chat, messages, responses, audio, rerank and count_tokens — but not on completions, embeddings, images or passthrough. A flapping upstream reached only via those endpoints kept a Healthy runtime status and never tripped the cooldown/circuit-breaker, while the same upstream failing via rerank (also single-target) did.Fix
cooldown::note_failureinto each bridge-dispatchErrarm. It is a no-op forBridgeError::Config, so the 501 not-implemented branches stay uncooled (config mismatches aren't upstream health). TheOkarms nowrecord_success+mark_healthy(recovery parity with rerank/audio).Tests
One per handler: upstream 500 → response maps to 502 AND
state.runtime_status.status(model)reports a cooldown. Verified fail-before/pass-after (wiring removed → all three fail).Fixes#701