Repository navigation
feat(routing): sticky hold on whichever quota window blocks the request (OpenCode 1, Pi) - #470
Merged
Merged
Conversation
Use the latest known future reset across every exhausted window blocking the requested model. Preserve retain decisions and deterministic jitter, and report the window responsible for each hold or migration. Generalize OC1 and Pi messages and add red-first per-window coverage. Parameterizing the existing OC1 test preserves its original five-hour hold, transient-failure retention, and far-reset migration assertions while adding weekly and model-scoped cases. OC2 remains unchanged pending the common-auth retry-delay contract.
Add seven-day-always-migrate and first-reset-only controls beside the Core routing rows, including full-package broad audit settings. Both exact named tests are CAUGHT through the pinned ckdev-mutate 0.12.5 runner and Bun wrapper.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ufuk ruled the plugin's standalone sticky-balanced hold follows the shared routing rule.
decideStickyQuotaFailurenow looks at every exhausted window that blocks the requested model (5h, 7d, the model's scoped window); the blocking reset is the latest of them. Hold when that reset is known and within 15 minutes (same per-session jittered Retry-After); otherwise, or with any unknown reset, move. OpenCode 1 and Pi use it now, with generalized hold messages. OpenCode 2 does not hold yet: common-auth's retry contract has no same-account delay; OAIAUTH is adding it. Red-first tests per window and host; mutation rows for "7d always moves" and the latest-reset rule.