WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit db525af

Browse files
fix(xai): add custom_tool_call_input delta and done response stream events
1 parent 9138be4 commit db525af

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/xai/src/responses/xai-responses-api.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,18 @@ export const xaiResponsesChunkSchema = z.union([
347347
item_id: z.string(),
348348
output_index: z.number(),
349349
}),
350+
z.object({
351+
type: z.literal('response.custom_tool_call_input.delta'),
352+
item_id: z.string(),
353+
output_index: z.number(),
354+
delta: z.string(),
355+
}),
356+
z.object({
357+
type: z.literal('response.custom_tool_call_input.done'),
358+
item_id: z.string(),
359+
output_index: z.number(),
360+
input: z.string(),
361+
}),
350362
z.object({
351363
type: z.literal('response.done'),
352364
response: xaiResponsesResponseSchema,

0 commit comments

Comments
 (0)