fix(ai): deduplicate terminal response items
This commit is contained in:
parent
02e8f398b8
commit
d771c22e94
2 changed files with 43 additions and 8 deletions
|
|
@ -1691,7 +1691,20 @@ describe("OpenAI Responses route", () => {
|
|||
type: "response.output_item.done",
|
||||
item: { type: "function_call", id: "item_1", call_id: "call_1", name: "lookup" },
|
||||
},
|
||||
{ type: "response.completed", response: {} },
|
||||
{
|
||||
type: "response.completed",
|
||||
response: {
|
||||
output: [
|
||||
{
|
||||
type: "function_call",
|
||||
id: "item_1",
|
||||
call_id: "call_1",
|
||||
name: "lookup",
|
||||
arguments: '{"query":"authoritative"}',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
@ -1701,6 +1714,7 @@ describe("OpenAI Responses route", () => {
|
|||
id: "call_1",
|
||||
input: { query: "authoritative" },
|
||||
})
|
||||
expect(response.events.filter(LLMEvent.is.toolCall)).toHaveLength(1)
|
||||
}),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue