Skip to content

fix: handle remaining response and stream boundary failures - #14

Merged
vdeng-ai merged 2 commits into
mainfrom
codex/modelping-boundary-fixes
Oct 18, 2026
Merged

vdeng-ai merged 2 commits into
mainfrom
codex/modelping-boundary-fixes

Conversation

@vdeng-ai

@vdeng-ai vdeng-ai commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Fix three boundary cases that could report failed requests as successful or leave error responses waiting past their deadline.

  • Reject HTTP 200 non-stream Responses with explicit errors or any supplied status other than completed, including cancelled, queued, in_progress, and unknown states. Preserve partial text, usage, and failure diagnostics; retain compatibility with providers that omit status.
  • Recognize Chat Completions stream error payloads so a later [DONE] cannot turn them into success.
  • Keep timeout and external cancellation active while reading stream HTTP error bodies; preserve timely HTTP errors and report stalled reads as 408.

Validation: npm run verify passes (typecheck, lint, 220 tests, production build). Added 29 regression cases, including status checks with text only, usage only, and both; malformed statuses; and explicit errors overriding completed.

Scope is limited to these three boundary fixes and their regression tests.

vdeng-ai and others added 2 commits October 7, 2026 19:13
Reject failed or incomplete non-stream Responses while retaining partial text and usage. Recognize explicit Chat stream errors before [DONE]. Keep stream HTTP error body reads under timeout and cancellation protection.

Add 14 regression cases; npm run verify passes with 205 tests.
@vdeng-ai
vdeng-ai merged commit feb3461 into main Oct 18, 2026
1 check passed
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.

1 participant