Repository navigation
fix(opencode): only a refusal naming the model clears borrowed tools - #15475
Merged
diegosouzapw merged 3 commits intoOct 6, 2026
Merged
diegosouzapw merged 3 commits into
diegosouzapw merged 3 commits into
Conversation
maxmad64bis
force-pushed
the
fix/free-tier-429-not-tool-refusal
branch
from
October 3, 2026 20:00
32fde2f to
cc43ed0
Compare
maxmad64bis
marked this pull request as ready for review
October 3, 2026 20:04
A 429 no longer counts as a tool refusal; a 200 on borrowed tools confirms the shape.
maxmad64bis
force-pushed
the
fix/free-tier-429-not-tool-refusal
branch
from
October 4, 2026 15:37
cc43ed0 to
81cc3ea
Compare
4 of 5 tasks
diegosouzapw
merged commit Oct 6, 2026
3d43b67
into
diegosouzapw:release/v3.8.52
6 of 9 checks passed
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.
Summary
Requests that reuse stored tool names lost them after three failures of any kind, so a busy model answered with 429 and the next request went out bare, then drew a 403.
This change counts a refusal only when a 403 or 451 response names the model — every notation site passes such a verdict — and a 200 on reused names clears the refusal streak while the stored entry stays in place.
The stored names now survive 429 answers, and the request after them still carries the working tool shape.
Related Issues
Validation
npm run lintTests Added Or Updated
tests/unit/opencode-free-tier-request-contract.test.ts: three 429 answers on reused names keep the stored names, three 403 answers carrying the refusal still clear them after the third, a 200 on reused names resets the streak to one, unrelated refusals never touch the stored names, notes without a verdict never count, and a deferred 403 verdict still countsCoverage Notes
open-sse/executors/opencodeFreeTierContract.ts: covered by the request-contract suite (discriminant guard and streak confirmation cases)open-sse/executors/opencode.ts: covered by the request-contract, shape-retry, refusal-rotation, and balance shard suites (notification sites)open-sse/executors/opencodeRequestShape.ts: covered by the shape-retry suite (verdict read once, replayed note)open-sse/executors/opencodeToolObservation.ts: covered by the request-contract suite (confirmation and threshold cases)Reviewer Notes