Files
oh-my-pi/packages
Burke T 0300a9d01d fix(ai): resolve DeepSeek V4 reasoning_content 400 errors from three root causes
Three independent failure modes observed in HTTP 400 logs:

1. reasoningEffortMap only mapped xhigh→max for the deepseek provider,
   not for DeepSeek-family models on NVIDIA/OpenCode-Go/etc. Sending
   reasoning_effort: "xhigh" to these endpoints caused 400 errors.

2. convertMessages filtered thinking blocks by nonEmptyThinkingBlocks,
   excluding blocks with valid thinkingSignature but empty text. These
   signatures identify the correct field name for reasoning_content
   replay but were lost in the filter.

3. When a proxy (OpenCode-Go, NVIDIA) returns a tool-call response
   without any reasoning_content at all, no thinking blocks exist to
   recover from. Added empty-string fallback so the required field is
   present even when no reasoning was captured.

Adds allowsSyntheticReasoningContentForToolCalls compat flag to
distinguish DeepSeek (rejects synthetic "." placeholder) from Kimi
and OpenRouter (accept it).

Credit: builds on the approach from PR #902 by @edmand46.
2026-05-01 11:56:55 -03:00
..
2026-05-01 16:11:15 +02:00
2026-05-01 16:11:15 +02:00
2026-05-01 16:11:15 +02:00
2026-05-01 16:11:15 +02:00
2026-05-01 16:11:15 +02:00