Matrix: restore ordered progress delivery with explicit streaming modes (#59266)

Merged via squash.

Prepared head SHA: 523623b7e1
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
Gustavo Madeira Santana
2026-04-01 19:35:03 -04:00
committed by GitHub
parent 91a7505af6
commit 560ea25294
26 changed files with 704 additions and 179 deletions

View File

@@ -46,6 +46,9 @@ export function resolveReasoningOutputMode(params: {
// handles reasoning natively via the `reasoning` field in streaming chunks,
// so tag-based enforcement is unnecessary and causes all output to be
// discarded as "(no output)" (#2279).
// Note: MiniMax is also intentionally excluded. In production it does not
// reliably wrap user-visible output in <final> tags, so forcing tag
// enforcement suppresses normal assistant replies.
if (
normalized === "google" ||
normalized === "google-gemini-cli" ||
@@ -54,11 +57,6 @@ export function resolveReasoningOutputMode(params: {
return "tagged";
}
// Handle Minimax (M2.5 is chatty/reasoning-like)
if (normalized.includes("minimax")) {
return "tagged";
}
return "native";
}

View File

@@ -70,8 +70,16 @@ describe("isReasoningTagProvider", () => {
value: "google-generative-ai",
expected: true,
},
{ name: "returns true for minimax", value: "minimax", expected: true },
{ name: "returns true for minimax-cn", value: "minimax-cn", expected: true },
{
name: "returns false for minimax - does not reliably honor <final> wrappers in production",
value: "minimax",
expected: false,
},
{
name: "returns false for minimax-cn",
value: "minimax-cn",
expected: false,
},
{ name: "returns false for null", value: null, expected: false },
{ name: "returns false for undefined", value: undefined, expected: false },
{ name: "returns false for empty", value: "", expected: false },
@@ -83,7 +91,7 @@ describe("isReasoningTagProvider", () => {
value: string | null | undefined;
expected: boolean;
}>)("$name", ({ value, expected }) => {
expect(isReasoningTagProvider(value)).toBe(expected);
expect(isReasoningTagProvider(value, { workspaceDir: process.cwd() })).toBe(expected);
});
});