fix(core): preserve the first terminal failure (#37705)
This commit is contained in:
parent
a288cb5a0c
commit
ba0bbdafaa
11 changed files with 35 additions and 39 deletions
|
|
@ -84,8 +84,6 @@ const toolCall = (route: string, tool: PendingTool, inputOverride?: string) => {
|
|||
id: tool.id,
|
||||
name: tool.name,
|
||||
raw,
|
||||
message: error.reason.message,
|
||||
providerMetadata: tool.providerMetadata,
|
||||
}),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -150,14 +150,12 @@ export const ToolInputEnd = Schema.Struct({
|
|||
}).annotate({ identifier: "LLM.Event.ToolInputEnd" })
|
||||
export type ToolInputEnd = Schema.Schema.Type<typeof ToolInputEnd>
|
||||
|
||||
/** A local tool call that could not be decoded. `raw` is diagnostic-only. */
|
||||
/** A local tool call whose final input could not be decoded. */
|
||||
export const ToolInputError = Schema.Struct({
|
||||
type: Schema.tag("tool-input-error"),
|
||||
id: ToolCallID,
|
||||
name: Schema.String,
|
||||
raw: Schema.String,
|
||||
message: Schema.String,
|
||||
providerMetadata: Schema.optional(ProviderMetadata),
|
||||
}).annotate({ identifier: "LLM.Event.ToolInputError" })
|
||||
export type ToolInputError = Schema.Schema.Type<typeof ToolInputError>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue