mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:40:44 +00:00
test(agentic): align OpenAI replay id expectations
This commit is contained in:
@@ -63,12 +63,12 @@ describe("sanitizeSessionHistory openai tool id preservation", () => {
|
||||
{
|
||||
name: "strips fc ids when replayable reasoning metadata is missing",
|
||||
withReasoning: false,
|
||||
expectedToolId: "call123",
|
||||
expectedToolId: "call_123",
|
||||
},
|
||||
{
|
||||
name: "keeps canonical call_id|fc_id pairings when replayable reasoning is present",
|
||||
withReasoning: true,
|
||||
expectedToolId: "call123fc123",
|
||||
expectedToolId: "call_123|fc_123",
|
||||
},
|
||||
])("$name", async ({ withReasoning, expectedToolId }) => {
|
||||
const result = await sanitizeSessionHistory({
|
||||
@@ -121,7 +121,7 @@ describe("sanitizeSessionHistory openai tool id preservation", () => {
|
||||
isError?: boolean;
|
||||
};
|
||||
expect(toolResult.role).toBe("toolResult");
|
||||
expect(toolResult.toolCallId).toBe("call123");
|
||||
expect(toolResult.toolCallId).toBe("call_123");
|
||||
expect(toolResult.content?.[0]?.text).toBe("ok");
|
||||
expect(toolResult.isError).toBe(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user