Repository navigation
fix(server): align OpenAI completion response shapes - #1213
Open
Allegro-ma-non-troppo wants to merge 2 commits into
Open
Allegro-ma-non-troppo wants to merge 2 commits into
Allegro-ma-non-troppo wants to merge 2 commits into
Conversation
Allegro-ma-non-troppo
requested a deployment
to
npu-approval
December 1, 2026 11:06 — with
GitHub Actions
Waiting
Security scan found no critical or high findings on lines changed by this pull requestView the security scan run for complete reports. “New” means the finding is located in a changed file on an added or modified line; it is not a base-versus-head findings delta. |
This branch is waiting to be deployed
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.
Why. WP-01 fixes two SDK failures. Repeating
delta.rolecorrupts the assembled assistant message, and the legacy completion finish choice lackedtextandindex.What changed. Send the Chat role once and supply an opener for an empty successful stream. Use endpoint-specific IDs in both modes and a full legacy finish choice. Route generation failures to the existing error writers. A failed Chat turn does not flush text still buffered by the parser. Responses, Ollama, and reasoning-token accounting are unchanged.
delta.rolechatcmpl-andcmpl-, andtext,index,logprobs,finish_reasonon the finish choice.stopif sent; generation faults use existing error writers.Tests and acceptance. On Windows NPU, the response-shape suite went from 0 passed and 6 failed on
qwen3:0.6bto 6 passed and 0 failed, with 4 capability skips in both runs. On the PR head,qwen3.5:4bpassed 7 shape checks with 3 OGA skips, both usage modes, and 12 Responses checks. A scripted engine passed all six handler failure and Responses control cases. The Windows Release build and strict host protocol checks passed. Pi completed the tool-result round trip 3/3 on both the base and the first fix commit. The request reference documents the new shape.Not verified. Linux, HRX, OGA runtime, live reference endpoints, or physical cancellation and device faults.
WP corrections and follow-ups. The Chat writer moved into
protocol_openai_chat.hppin WP-37. WP-00 was waived; upstream suites replace its xfails. Real reasoning-token accounting is separate, and cancelled non-streaming prefill still belongs to WP-46.