fix: type 'reasoning' was provided without its required following item (#2633)
This commit is contained in:
parent
2564801bde
commit
8c2aec43b8
2 changed files with 9 additions and 1 deletions
|
|
@ -109,6 +109,7 @@ export namespace MessageV2 {
|
|||
type: z.literal("text"),
|
||||
text: z.string(),
|
||||
synthetic: z.boolean().optional(),
|
||||
metadata: z.record(z.string(), z.any()).optional(),
|
||||
time: z
|
||||
.object({
|
||||
start: z.number(),
|
||||
|
|
@ -138,6 +139,7 @@ export namespace MessageV2 {
|
|||
callID: z.string(),
|
||||
tool: z.string(),
|
||||
state: ToolState,
|
||||
metadata: z.record(z.string(), z.any()).optional(),
|
||||
}).meta({
|
||||
ref: "ToolPart",
|
||||
})
|
||||
|
|
@ -519,6 +521,7 @@ export namespace MessageV2 {
|
|||
{
|
||||
type: "text",
|
||||
text: part.text,
|
||||
providerMetadata: part.metadata,
|
||||
},
|
||||
]
|
||||
if (part.type === "step-start")
|
||||
|
|
@ -536,6 +539,7 @@ export namespace MessageV2 {
|
|||
toolCallId: part.callID,
|
||||
input: part.state.input,
|
||||
output: part.state.time.compacted ? "[Old tool result content cleared]" : part.state.output,
|
||||
callProviderMetadata: part.metadata,
|
||||
},
|
||||
]
|
||||
if (part.state.status === "error")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue