fix(proxy): carry reasoning content through the response-repair path #700

Merged
coilyco-ops merged 1 commit from fix/repair-path-reasoning-content into main 2026-08-13 19:49:50 +00:00
Member

The tool-call path copies ReasoningContent onto the assistant message it builds. The repair path builds its own and had no field for it at all, so a repair round against a thinking-mode model could only ever send the zero value, and DeepSeek refuses the next request as malformed.

Quail located this on #678 as a mechanism independent of the trace that issue was filed from, and landed a characterization test asserting the drop as it shipped. That test is inverted here rather than deleted, which is what it asked for.

Verification

ward exec gate PASS on all six steps.

Mutation: forcing the field to the empty string fails TestTheRepairPathKeepsReasoningContent in a run where every other package still reports ok, so the failure is the assertion rather than a build error. That distinction has bitten this repo before (#653).

Scope

This does not close #678. The other half is whether DeepSeek accepts "reasoning_content": "" — under omitempty an empty string and an absent key are the same bytes, so a model that genuinely returns no reasoning still produces a request the API refuses. Settling it needs one live request to evaluation/deepseek-v4-flash, which is an Ops action. #678 stays open on it and #699 carries the half that lands here.

closes #699

The tool-call path copies `ReasoningContent` onto the assistant message it builds. The repair path builds its own and had no field for it at all, so a repair round against a thinking-mode model could only ever send the zero value, and DeepSeek refuses the next request as malformed. Quail located this on #678 as a mechanism independent of the trace that issue was filed from, and landed a characterization test asserting the drop as it shipped. That test is inverted here rather than deleted, which is what it asked for. ## Verification `ward exec gate` PASS on all six steps. Mutation: forcing the field to the empty string fails `TestTheRepairPathKeepsReasoningContent` in a run where every other package still reports `ok`, so the failure is the assertion rather than a build error. That distinction has bitten this repo before (#653). ## Scope This does **not** close #678. The other half is whether DeepSeek accepts `"reasoning_content": ""` — under `omitempty` an empty string and an absent key are the same bytes, so a model that genuinely returns no reasoning still produces a request the API refuses. Settling it needs one live request to `evaluation/deepseek-v4-flash`, which is an Ops action. #678 stays open on it and #699 carries the half that lands here. closes #699
fix(proxy): carry reasoning content through the response-repair path
All checks were successful
ci / image-build (pull_request) Successful in 22s
ci / test (pull_request) Successful in 37s
ci / publish-echo-image (pull_request) Has been skipped
ci / publish-observed (pull_request) Has been skipped
6ecea312a5
The tool-call path copies ReasoningContent onto the assistant message it
builds. The repair path builds its own and had no field for it, so a repair
round against a thinking-mode model could only ever send the zero value and
DeepSeek refuses the next request.

Quail's characterization test asserted the drop as it shipped and named what
to change. Inverted rather than deleted, and confirmed by mutation: forcing
the field to the empty string fails the test in a run where the package still
compiles.

Does not address the other half of #678, where the model genuinely returns no
reasoning and omitempty makes that indistinguishable from a harness drop. That
needs one live request to settle and stays open there.

closes #699

Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-gaming/sirens-echo!700
No description provided.