Files
OmniRoute/tests
diegosouzapw 229eef2670 fix(providers): echo reasoning_content for bai DeepSeek thinking-mode follow-ups (#13599)
DefaultExecutor only invoked the reasoning_content injector
(open-sse/utils/reasoningContentInjector.ts, ported from 9router#1480) for
provider === "kimi"/"moonshot". The `bai` gateway resells DeepSeek's
deepseek-reasoner thinking-mode models but was never added to that
allowlist, so a follow-up turn was forwarded upstream with no
reasoning_content on the prior assistant message, triggering DeepSeek's
400 "reasoning_content in the thinking mode must be passed back".

Adds a `requiresReasoningContentEcho` capability flag on RegistryEntry so
this is driven by the registry instead of a second provider-id allowlist,
sets it on `bai`, and widens DefaultExecutor's gate + the injector helper's
signature accordingly.

Regression test: tests/unit/issue-13599-bai-deepseek-reasoning-content-echo.test.ts
2026-09-15 19:07:29 -03:00
..