mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-05 06:42:12 +03:00
Train 1D: merge via --admin on .113 validation
Squash merge from local merge-train (Hard Rule owner-approved). Tip 029cdf4215cf465f0e1716ac9f84a84692b1e881 validated on 192.168.0.113: 26631/26653 pass.
This commit is contained in:
@@ -130,6 +130,7 @@ export function isTextualReasoningTagNativeRoute(providerId: string, modelId: st
|
||||
/deepseek[-_/]?r1\b/.test(routeId) ||
|
||||
/r1[-_/]?distill\b/.test(routeId) ||
|
||||
/(?:^|[/:_-])qwq(?:[/._:-]|$)/.test(routeId) ||
|
||||
(providerId === "kimi-coding" && /(?:^|[/_-])k3(?:[/._:-]|$)/.test(modelId)) ||
|
||||
// 9router#2231: MiniMax M3 leaks raw <think>...</think> into `content` on its
|
||||
// OpenAI-format provider tiers (trae, huggingchat, bazaarlink, ollama-cloud,
|
||||
// opencode, cline, opencode-zen, codebuddy-cn). The direct minimax/minimax-cn
|
||||
|
||||
@@ -52,6 +52,21 @@ describe("responseSanitizer/reasoning — shouldParseTextualReasoningTags", () =
|
||||
});
|
||||
});
|
||||
|
||||
describe("responseSanitizer/reasoning — Kimi Code K3 textual reasoning-tag route", () => {
|
||||
it("extracts <think> blocks from the Kimi Code K3 route", () => {
|
||||
const chunk = {
|
||||
choices: [{ index: 0, delta: { content: "<think>reasoning here</think>final answer" } }],
|
||||
};
|
||||
const sanitized = sanitizeOpenAIResponse(chunk, {
|
||||
parseTextualReasoningTags: shouldParseTextualReasoningTags("kimi-coding", "k3"),
|
||||
}) as { choices: Array<{ delta: { content: string; reasoning_content?: string } }> };
|
||||
|
||||
const delta = sanitized.choices[0].delta;
|
||||
assert.equal(delta.content, "final answer");
|
||||
assert.equal(delta.reasoning_content, "reasoning here");
|
||||
});
|
||||
});
|
||||
|
||||
// ── MiniMax M3 textual reasoning-tag route (9router#2231) ──────────────────────
|
||||
//
|
||||
// MiniMax M3 leaks raw <think>...</think> into `content` instead of a separate
|
||||
|
||||
Reference in New Issue
Block a user