mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-14 04:28:34 +00:00
fix(agents): cap openai-completions tool call ids to provider-safe format (#31947)
Co-authored-by: bmendonca3 <bmendonca3@users.noreply.github.com>
This commit is contained in:
@@ -44,6 +44,16 @@ describe("resolveTranscriptPolicy", () => {
|
||||
expect(policy.toolCallIdMode).toBeUndefined();
|
||||
});
|
||||
|
||||
it("enables strict tool call id sanitization for openai-completions APIs", () => {
|
||||
const policy = resolveTranscriptPolicy({
|
||||
provider: "openai",
|
||||
modelId: "gpt-5.2",
|
||||
modelApi: "openai-completions",
|
||||
});
|
||||
expect(policy.sanitizeToolCallIds).toBe(true);
|
||||
expect(policy.toolCallIdMode).toBe("strict");
|
||||
});
|
||||
|
||||
it("enables user-turn merge for strict OpenAI-compatible providers", () => {
|
||||
const policy = resolveTranscriptPolicy({
|
||||
provider: "moonshot",
|
||||
|
||||
Reference in New Issue
Block a user