mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-26 20:35:39 -06:00
test(zai): enable GLM 5.3 reasoning in live probe (#126202)
* test(zai): enable GLM 5.3 reasoning in live probe Punchcard-Session: frost-orchard-lantern-ze * test(ai): cover Z.AI simple reasoning payload Punchcard-Session: frost-orchard-lantern-ze
This commit is contained in:
@@ -898,7 +898,7 @@ describe("OpenAI-compatible completions params", () => {
|
||||
});
|
||||
|
||||
it("enables Z.AI thinking with the documented payload when requested", async () => {
|
||||
const stream = streamOpenAICompletions(
|
||||
const stream = streamSimpleOpenAICompletions(
|
||||
{
|
||||
...createModel(32_000),
|
||||
provider: "zai",
|
||||
@@ -908,15 +908,16 @@ describe("OpenAI-compatible completions params", () => {
|
||||
context,
|
||||
{
|
||||
apiKey: "sk-test",
|
||||
reasoningEffort: "high",
|
||||
reasoning: "max",
|
||||
},
|
||||
);
|
||||
|
||||
await stream.result();
|
||||
|
||||
expect(mockOpenAIOptionsRef.payloads[0]).toMatchObject({
|
||||
thinking: { type: "enabled" },
|
||||
thinking: { type: "enabled", clear_thinking: false },
|
||||
});
|
||||
expect(mockOpenAIOptionsRef.payloads[0]).not.toHaveProperty("reasoning_effort");
|
||||
expect(mockOpenAIOptionsRef.payloads[0]).not.toHaveProperty("enable_thinking");
|
||||
});
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ async function expectModelReturnsAssistantText(
|
||||
{
|
||||
messages: createSingleUserPromptMessage(),
|
||||
},
|
||||
{ apiKey: ZAI_KEY, maxTokens },
|
||||
{ apiKey: ZAI_KEY, maxTokens, reasoning: modelId === "glm-5.3" ? "max" : undefined },
|
||||
);
|
||||
|
||||
// A small probe cap can occasionally yield only hidden reasoning even though
|
||||
|
||||
Reference in New Issue
Block a user