Files
gbrain/test
spiky02plateau 89af5e3c09 fix(ai): promote DeepSeek reasoning_content when content is empty
DeepSeek-style reasoning models (deepseek-reasoner, GLM et al behind the
openai-compatible recipe) can return the substantive answer in
message.reasoning_content with content empty. The AI SDK adapter reads
only content, so gateway.chat() yielded text:'' and callers classified
the response as empty (observed: ~54% of per-chunk synopsis calls on one
such model collapsed to title-only fallback, 1,030 pages).

Add a recipe-scoped compat fetch (mirroring the voyage/zeroEntropy
inbound-rewrite precedent) that promotes reasoning_content into content
only when content is empty/whitespace; non-streaming JSON responses only.
New recipe-level compat.fetch hook preserves the base_urls override
chain.
2026-07-05 17:30:08 +02:00
..