mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 21:21:10 +00:00
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:
committed by
GitHub
parent
91a7505af6
commit
560ea25294
@@ -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";
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user