mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:40:44 +00:00
fix(agents): keep tool-call repair scoped by transport
This commit is contained in:
committed by
Peter Steinberger
parent
49c7319ea5
commit
2ba43f5d27
@@ -28,4 +28,13 @@ describe("shouldRepairMalformedToolCallArguments", () => {
|
||||
}),
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps kimi providers off on non-anthropic non-openai-completions transports", () => {
|
||||
expect(
|
||||
shouldRepairMalformedToolCallArguments({
|
||||
provider: "kimi-coding",
|
||||
modelApi: "openai-responses",
|
||||
}),
|
||||
).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -299,7 +299,8 @@ export function shouldRepairMalformedToolCallArguments(params: {
|
||||
modelApi?: string | null;
|
||||
}): boolean {
|
||||
return (
|
||||
normalizeProviderId(params.provider ?? "") === "kimi" ||
|
||||
(normalizeProviderId(params.provider ?? "") === "kimi" &&
|
||||
params.modelApi === "anthropic-messages") ||
|
||||
params.modelApi === "openai-completions"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user