Skip to content

ToolCallRepairError

Namespace: Vercel.AI.Util

public sealed class ToolCallRepairError : AiSdkError, ISerializable, IErrorMarkers

The repair of a tool call failed. Maps to ToolCallRepairError.

Inheritance: object → Exception → AiSdkError

Implements: ISerializable, IErrorMarkers

View source

ToolCallRepairError(Exception, AiSdkError, string?)

Section titled “ToolCallRepairError(Exception, AiSdkError, string?)”
public ToolCallRepairError(Exception cause, AiSdkError originalError, string? message = null)

Creates the error. <code class=“paramref”>cause</code> is the failure of the repair function and <code class=“paramref”>originalError</code> the NoSuchToolError or InvalidToolInputError that started the repair.

Parameters

Name Type Description
cause Exception
originalError AiSdkError
message string

View source

public const string ErrorMarker = "vercel.ai.error.AI_ToolCallRepairError"

Marker for IsInstance(object).

Value: string

View source

public AiSdkError OriginalError { get; }

The error that started the repair.

Value: AiSdkError

View source

public static bool IsInstance(object? error)

Returns whether <code class=“paramref”>error</code> carries this error’s marker.

Parameters

Name Type Description
error object

Returns: bool

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product