Skip to content

fix: recover reasoning-only model responses - #14

Merged
dmytrogajewski merged 1 commit into
mainfrom
fix/recover-reasoning-only-responses
Oct 26, 2026
Merged

dmytrogajewski merged 1 commit into
mainfrom
fix/recover-reasoning-only-responses

Conversation

@dmytrogajewski

Copy link
Copy Markdown
Contributor

A model can emit its end-of-turn token before closing its reasoning block, leaving a resumed Codex conversation with no answer or tool call. The gateway currently fails that response, and client retries can reproduce the same failure.

Recover translated Responses requests with at most one assistant-prefill continuation. Retain the conversation, generated reasoning, tools and sampling settings, and let the engine's chat template close the thinking block before continuing the answer. Keep one response ID and ordered stream, deduct consumed output tokens from the recovery budget, preserve cancellation and admission permits, and account for both generations. Unsupported continuations and repeated failures remain explicit errors; malformed tool calls and length-limited generations are not retried.

Update the locked rustls, rustls-webpki, Tokio and WebPKI root dependencies to fixed versions required by the security audit.

Validation:

  • make lint, make test, make test-client, and make audit passed on the isolated candidate.
  • 1,078 appliance/workspace tests and 185 client tests passed, including IPC and pinned HTTPS coverage.
  • Added regression coverage for streaming and JSON recovery, preserved history/tools/settings, combined usage, budget exhaustion, bounded retries, and cancellation before and after recovery response headers.
  • Reproduced premature EOS on DGX Spark; native continuation succeeded in three trials.
  • Built, signed and deployed the candidate through the existing upgrade workflow. The first saved-turn replay over pinned HTTPS recovered automatically and returned a valid tool call. Verification executed no returned tools, preserved the original session, and retained the qualified engine generation, context and settings.

@dmytrogajewski
dmytrogajewski merged commit b093816 into main Oct 26, 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.

2 participants