fix(llm, openai): Stop a redeemed usage reset locking the account out - #1171
Open
JeanMertz wants to merge 2 commits into
Open
fix(llm, openai): Stop a redeemed usage reset locking the account out#1171JeanMertz wants to merge 2 commits into
JeanMertz wants to merge 2 commits into
Conversation
JeanMertz
force-pushed
the
pr6-retry-on-reset
branch
from
September 13, 2026 05:46
3f94dab to
1555339
Compare
JeanMertz
force-pushed
the
pr5-auth-flag
branch
from
September 13, 2026 05:48
f8673aa to
16657bb
Compare
JeanMertz
force-pushed
the
pr6-retry-on-reset
branch
from
September 13, 2026 05:49
1555339 to
d55f5e4
Compare
JeanMertz
force-pushed
the
pr5-auth-flag
branch
from
September 13, 2026 06:15
16657bb to
42c0c8e
Compare
Redeeming a usage reset no longer leaves the subscription profile unusable for a week. A turn that spends a reset credit and is still refused now records the short 30-minute cooldown instead of the reset timing the rejection reports, so the next `jp query` asks the provider again rather than refusing locally with `no usable credential`. The rejection that follows a redemption describes a usage state JP itself just changed, and the window its headers name need not be the one the credit reopened. Reading that timing as gospel recorded a cooldown at the seven-day cap against an account the user could still reach through Codex, and only a re-login cleared it. A reset credit also reopens a single window, so one is no longer spent when the limit reports more than one window already spent: the request stays refused either way, and the plan holds few credits. Signed-off-by: Jean Mertz <git@jeanmertz.com>
A turn that spends a reset credit now keeps trying for up to a minute while the redemption reaches the responses host, instead of retrying once and abandoning the turn. The account confirms a redemption before the host honours it, so that single immediate retry almost always landed in the gap: the credit was spent, the reset applied, and the turn ended anyway with `Rate limited`. Attempts go out every five seconds until the request is admitted. The credit is spent by then and the turn is unfinished, so waiting is what the user paid for; each attempt is an admission-stage rejection that bills nothing. Exactly one credit is spent however long the wait runs. The wait is bounded because the other explanation for the refusal — a usage window the credit does not cover — looks identical from here and never resolves. When the budget runs out the turn falls through to the rest of the chain as before. Signed-off-by: Jean Mertz <git@jeanmertz.com>
JeanMertz
force-pushed
the
pr6-retry-on-reset
branch
from
September 13, 2026 06:15
d55f5e4 to
e5617a5
Compare
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.
A turn that spends a reset credit now keeps trying for up to a minute
while the redemption reaches the responses host, instead of retrying
once and abandoning the turn. The account confirms a redemption before
the host honours it, so that single immediate retry almost always
landed in the gap: the credit was spent, the reset applied, and the
turn ended anyway with
Rate limited.Attempts go out every five seconds until the request is admitted. The
credit is spent by then and the turn is unfinished, so waiting is what
the user paid for; each attempt is an admission-stage rejection that
bills nothing. Exactly one credit is spent however long the wait runs.
The wait is bounded because the other explanation for the refusal — a
usage window the credit does not cover — looks identical from here and
never resolves. When the budget runs out the turn falls through to the
rest of the chain as before.