You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 865ae0d
Browse filesBrowse the repository at this point in the historyBrowse files
f0-1528
committed
fix(openai-native): gate the readiness waits, keep the status when the error body read fails
Thread 4509766237 - the five readiness gates at spec 522/550/569/1271/2050 did
not gate. vitest 4.1.12 keeps vi.waitFor live beside vi.waitUntil, but in
dist/chunks/test.DNmyFkvJ.js waitFor hands a non-thenable result straight to
onResolve and returns, so a predicate that evaluates false resolves the wait on
the first check; waitUntil's onResolve starts with if (!result) return and
polls until the timeout. The five sites now use vi.waitUntil with the
predicates, timeouts and intervals unchanged, so the abort on the following line
is placed mid-request as the comments already claimed.
Thread 4509766269 - a body read that fails after the 429/503 headers arrived
lost the numeric status, because the read at :765 sat outside the guarded parse
and the outer catch had no status to recover. The read is guarded now: a
cancelled read still surfaces as the contract AbortError, and a failed read
carries the reason as the body text so the friendly status message and the
status-carrying throw at the end of the block still apply. Control: the new 429
test is red without the guard (Tests 1 failed | 129 passed) and green with it
(130 passed).
Thread 4509766254 - spec 1542 now asserts the captured ApiProviderError's
operation. Mutating the SDK-path operation literal to another value fails that
assertion and nothing else (Tests 1 failed | 129 passed at :1542:53), which is
what the old expect.any(ApiProviderError) could not do.
0 commit comments