@@ -593,10 +593,10 @@ function buildParams(
|
||||
|
||||
if (compat.thinkingFormat === "zai" && model.reasoning) {
|
||||
const zaiParams = params as Omit<typeof params, "reasoning_effort"> & {
|
||||
thinking?: { type: "enabled" | "disabled" };
|
||||
thinking?: { type: "enabled" | "disabled"; clear_thinking?: boolean };
|
||||
reasoning_effort?: string;
|
||||
};
|
||||
zaiParams.thinking = { type: options?.reasoningEffort ? "enabled" : "disabled" };
|
||||
zaiParams.thinking = options?.reasoningEffort ? { type: "enabled", clear_thinking: false } : { type: "disabled" };
|
||||
if (options?.reasoningEffort && compat.supportsReasoningEffort) {
|
||||
const mappedEffort = model.thinkingLevelMap?.[options.reasoningEffort];
|
||||
const effort = mappedEffort === undefined ? options.reasoningEffort : mappedEffort;
|
||||
|
||||
Reference in New Issue
Block a user