mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 11:42:51 +00:00
fix(microsoft-foundry): skip DeepSeek V4 thinking params on Foundry fallback
This commit is contained in:
@@ -733,6 +733,26 @@ describe("applyExtraParamsToAgent", () => {
|
||||
expect(messages[2]).not.toHaveProperty("reasoning_content");
|
||||
});
|
||||
|
||||
it("does not add DeepSeek V4 thinking params on the Foundry fallback path", () => {
|
||||
const payload = runResponsesPayloadMutationCase({
|
||||
applyProvider: "microsoft-foundry",
|
||||
applyModelId: "deepseek-v4-pro",
|
||||
thinkingLevel: "high",
|
||||
model: {
|
||||
api: "openai-completions",
|
||||
provider: "microsoft-foundry",
|
||||
id: "deepseek-v4-pro",
|
||||
} as Model<"openai-completions">,
|
||||
payload: {
|
||||
reasoning_effort: "high",
|
||||
messages: [{ role: "user", content: "hello" }],
|
||||
},
|
||||
});
|
||||
|
||||
expect(payload.reasoning_effort).toBe("high");
|
||||
expect(payload).not.toHaveProperty("thinking");
|
||||
});
|
||||
|
||||
it("fills MiMo V2.6 reasoning_content for unowned OpenAI-compatible proxy models", () => {
|
||||
const payload = runResponsesPayloadMutationCase({
|
||||
applyProvider: "opencode",
|
||||
|
||||
@@ -901,6 +901,7 @@ function isDeepSeekV4OpenAICompatibleModel(model: Parameters<StreamFn>[0]): bool
|
||||
const normalizedModelId = normalizeDeepSeekV4CandidateId(model.id);
|
||||
return (
|
||||
model.api === "openai-completions" &&
|
||||
model.provider !== "microsoft-foundry" &&
|
||||
(normalizedModelId === "deepseek-v4-flash" || normalizedModelId === "deepseek-v4-pro")
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user