feat(serve): accept reasoning.summary and include:reasoning.encrypted_content - #295
Open
Macasacker wants to merge 1 commit into
Open
Macasacker wants to merge 1 commit into
Macasacker wants to merge 1 commit into
Conversation
…_content Some OpenAI Responses API harnesses (Codex, Zed Agent) send reasoning.summary and include: ["reasoning.encrypted_content"], which NInfer rejected. Accept both: echo the requested summary back and return a fixed placeholder, and mirror the raw reasoning text into the reasoning item's encrypted_content field. Any other include field is still rejected with include_not_supported.
Wallawalla47
pushed a commit
to Wallawalla47/ninfer-custom
that referenced
this pull request
Sep 20, 2026
…easoning.encrypted_content
Wallawalla47
pushed a commit
to Wallawalla47/ninfer-custom
that referenced
this pull request
Sep 20, 2026
The PR Neroued#295 tests assert object equality on RequestJson values, but RequestJson is nlohmann::ordered_json, whose object equality compares key pairs in insertion order. The response encoder serialises with plain nlohmann::json, which dumps object keys sorted, so the wire order (e.g. "text" before "type") never matched the order the tests constructed their expectations in and every object-level comparison failed regardless of platform. Add a recursive json_unordered_eq that treats objects as key sets (arrays still compared in order) and use it for the reasoning summary and Item object comparisons.
Wallawalla47
pushed a commit
to Wallawalla47/ninfer-custom
that referenced
this pull request
Sep 20, 2026
… compatibility) Record the merged PR in the Upstream pull requests list (with the local note that its test assertions were adapted to order-independent JSON comparison) and add Macasacker and Sha1rholder to the Thanks section.
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.
A rebase of #148 onto current master.
Problem
NInfer rejects OpenAI Responses API requests that set
reasoning.summaryor
include: ["reasoning.encrypted_content"], returningreasoning_option_not_supportedorinclude_not_supported. This breaksharnesses that send these fields, such as Codex (which sends
include: ["reasoning.encrypted_content"]on every request) and Zed Agent.Change
reasoning.summaryis now accepted (any string), echoed back in theresponse, alongside a fixed placeholder summary.
include: ["reasoning.encrypted_content"]is now accepted. The rawreasoning text is copied into the reasoning item's
encrypted_contentfield (display-only, not real encryption).
includefield is still rejected withinclude_not_supported.Notes
behind master and conflicting, so I rebased it.
serve/console_log.h, which no longer exists on master.numbers stay contiguous for the new
reasoning_summaryevents, and thetest assertions are updated.