Skip to content

FunctionCallResultItem

type FunctionCallResultItem = object;
callId: string;

The ID of the tool call. Required to match up the respective tool call result.

optional id?: string;

An ID to identify the item. This is optional by default. If a model provider absolutely requires this field, it will be validated on the model level.

name: string;

The name of the tool that was called

optional namespace?: string;

Optional namespace preserved from the originating function call.

output:
| string
| {
providerData?: Record<string, any>;
text: string;
type: "text";
}
| {
detail?: "low" | "high" | "auto" | string & object;
image?: | string
| {
data: string | Uint8Array<ArrayBuffer>;
mediaType?: string;
}
| {
url: string;
}
| {
fileId: string;
};
providerData?: Record<string, any>;
type: "image";
}
| {
file: | string
| {
data: string | Uint8Array<ArrayBuffer>;
filename: string;
mediaType: string;
}
| {
filename?: string;
url: string;
}
| {
filename?: string;
id: string;
};
providerData?: Record<string, any>;
type: "file";
}
| (
| {
providerData?: Record<string, any>;
text: string;
type: "input_text";
}
| {
detail?: string;
image?: | string
| {
id: string;
};
providerData?: Record<string, any>;
type: "input_image";
}
| {
file?: | string
| {
id: string;
}
| {
url: string;
};
filename?: string;
providerData?: Record<string, any>;
type: "input_file";
})[];

The output of the tool call.

string


{
providerData?: Record<string, any>;
text: string;
type: "text";
}
Name Type Description

providerData?

Record<string, any>

Additional optional provider specific data. Used for custom functionality or model provider specific fields.

text

string

The text output from the model.

type

"text"


{
detail?: "low" | "high" | "auto" | string & object;
image?: | string
| {
data: string | Uint8Array<ArrayBuffer>;
mediaType?: string;
}
| {
url: string;
}
| {
fileId: string;
};
providerData?: Record<string, any>;
type: "image";
}
Name Type Description

detail?

"low" | "high" | "auto" | string & object

Controls the requested level of detail for vision models. Use a string to avoid constraining future model capabilities.

image?

| string | { data: string | Uint8Array<ArrayBuffer>; mediaType?: string; } | { url: string; } | { fileId: string; }

Inline image content or a reference to an uploaded file. Accepts a URL/data URL string or an object describing the data/url/fileId source.

providerData?

Record<string, any>

Additional optional provider specific data. Used for custom functionality or model provider specific fields.

type

"image"


{
file: | string
| {
data: string | Uint8Array<ArrayBuffer>;
filename: string;
mediaType: string;
}
| {
filename?: string;
url: string;
}
| {
filename?: string;
id: string;
};
providerData?: Record<string, any>;
type: "file";
}
Name Type Default value Description

file

| string | { data: string | Uint8Array<ArrayBuffer>; filename: string; mediaType: string; } | { filename?: string; url: string; } | { filename?: string; id: string; }

FileReferenceSchema

File output reference. Provide either a string (data URL / base64), a data object (requires mediaType + filename), or an object pointing to an uploaded file/URL.

providerData?

Record<string, any>

Additional optional provider specific data. Used for custom functionality or model provider specific fields.

type

"file"


( | { providerData?: Record<string, any>; text: string; type: "input_text"; } | { detail?: string; image?: | string | { id: string; }; providerData?: Record<string, any>; type: "input_image"; } | { file?: | string | { id: string; } | { url: string; }; filename?: string; providerData?: Record<string, any>; type: "input_file"; })[]

optional providerData?: Record<string, any>;

Additional optional provider specific data. Used for custom functionality or model provider specific fields.

status: "in_progress" | "completed" | "incomplete";

The status of the tool call.

type: "function_call_result";