Skip to content

fix(stream): retain fallback for invalid queue wait hints - #46

Merged
simonsmh merged 1 commit into
simonsmh:mainfrom
summer-tt:main
Nov 2, 2026
Merged

simonsmh merged 1 commit into
simonsmh:mainfrom
summer-tt:main

Conversation

@summer-tt

Copy link
Copy Markdown
Contributor

A queued 10605 response with a finite but oversized waitTime can hide a valid retryAfterSeconds fallback. For example, waitTime: 1e300 and retryAfterSeconds: 30 currently produce an unusable wait duration instead of the available 30-second hint; larger values can overflow to Infinity during conversion to milliseconds.

Validate the converted milliseconds as a positive safe integer before selecting the wait hint. Invalid waitTime values then fall back to retryAfterSeconds, while valid hints keep their existing precedence. Add parser regression cases for 1e300, Number.MAX_VALUE, and Number.MAX_SAFE_INTEGER.

Validation: npm run check, npm run lint, npm test (409 tests), and npm run build pass. The model-busy regression suite (37 tests) also passes against the installed Pi 1.4.0-editor-completion.1 SDK with real network access disabled.

@simonsmh
simonsmh merged commit 30b571a into simonsmh:main Nov 2, 2026
1 check passed
@simonsmh

simonsmh commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Merged — thank you! Squash-merged as 30b571a and shipped in v0.6.9: https://github.com/simonsmh/pi-provider-qoder/releases/tag/v0.6.9

Verified before merging against current main (v0.6.8): it applied cleanly despite the older base, and the merged tree passes the full suite at 440/440 with lint, typecheck, and build green. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants