OutputItems - TypeScript SDK
OutputItems type definition
An output item from the response
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
OutputItems type definition
models.OutputApplyPatchCallItemconst value: models.OutputApplyPatchCallItem = {
callId: "<id>",
id: "msg-abc123",
operation: {
diff: "@@ function main() {\n+ console.log(\"hi\");\n }",
path: "/src/main.ts",
type: "update_file",
},
status: "completed",
type: "apply_patch_call",
};
models.OutputCodeInterpreterCallItemconst value: models.OutputCodeInterpreterCallItem = {
code: "print(\"hello\")",
containerId: "ctr-xyz789",
id: "ci-abc123",
outputs: [
{
logs: "hello\n",
type: "logs",
},
],
status: "completed",
type: "code_interpreter_call",
};
models.OutputComputerCallItemconst value: models.OutputComputerCallItem = {
callId: "call-abc123",
pendingSafetyChecks: [],
status: "completed",
type: "computer_call",
};
models.OutputCustomToolCallItemconst value: models.OutputCustomToolCallItem = {
callId: "call-abc123",
input: "*** Begin Patch\n*** End Patch",
name: "apply_patch",
type: "custom_tool_call",
};
models.OutputFileSearchCallItemconst value: models.OutputFileSearchCallItem = {
id: "fs-abc123",
queries: [
"search term",
],
status: "completed",
type: "file_search_call",
};
models.OutputFunctionCallItemconst value: models.OutputFunctionCallItem = {
arguments: "{\"location\":\"San Francisco\"}",
callId: "call-abc123",
name: "get_weather",
type: "function_call",
};
models.OutputImageGenerationCallItemconst value: models.OutputImageGenerationCallItem = {
id: "img-abc123",
status: "completed",
type: "image_generation_call",
};
models.OutputMessageItemconst value: models.OutputMessageItem = {
content: [
{
text: "Hello! How can I help you today?",
type: "output_text",
},
],
id: "msg-abc123",
role: "assistant",
type: "message",
};
models.OutputApplyPatchServerToolItemconst value: models.OutputApplyPatchServerToolItem = {
status: "completed",
type: "openrouter:apply_patch",
};
models.OutputBashServerToolItemconst value: models.OutputBashServerToolItem = {
status: "completed",
type: "openrouter:bash",
};
models.OutputBrowserUseServerToolItemconst value: models.OutputBrowserUseServerToolItem = {
status: "completed",
type: "openrouter:browser_use",
};
models.OutputCodeInterpreterServerToolItemconst value: models.OutputCodeInterpreterServerToolItem = {
status: "completed",
type: "openrouter:code_interpreter",
};
models.OutputDatetimeItemconst value: models.OutputDatetimeItem = {
datetime: "2026-03-12T14:30:00.000Z",
status: "completed",
timezone: "UTC",
type: "openrouter:datetime",
};
models.OutputSearchModelsServerToolItemconst value: models.OutputSearchModelsServerToolItem = {
status: "completed",
type: "openrouter:experimental__search_models",
};
models.OutputFileSearchServerToolItemconst value: models.OutputFileSearchServerToolItem = {
status: "completed",
type: "openrouter:file_search",
};
models.OutputFusionServerToolItemconst value: models.OutputFusionServerToolItem = {
status: "completed",
type: "openrouter:fusion",
};
models.OutputImageGenerationServerToolItemconst value: models.OutputImageGenerationServerToolItem = {
status: "completed",
type: "openrouter:image_generation",
};
models.OutputMcpServerToolItemconst value: models.OutputMcpServerToolItem = {
status: "completed",
type: "openrouter:mcp",
};
models.OutputMemoryServerToolItemconst value: models.OutputMemoryServerToolItem = {
status: "completed",
type: "openrouter:memory",
};
models.OutputTextEditorServerToolItemconst value: models.OutputTextEditorServerToolItem = {
status: "completed",
type: "openrouter:text_editor",
};
models.OutputToolSearchServerToolItemconst value: models.OutputToolSearchServerToolItem = {
status: "completed",
type: "openrouter:tool_search",
};
models.OutputWebFetchServerToolItemconst value: models.OutputWebFetchServerToolItem = {
status: "completed",
type: "openrouter:web_fetch",
};
models.OutputWebSearchServerToolItemconst value: models.OutputWebSearchServerToolItem = {
status: "completed",
type: "openrouter:web_search",
};
models.OutputReasoningItemconst value: models.OutputReasoningItem = {
id: "msg-abc123",
summary: [
{
text: "Analyzed the problem using first principles",
type: "summary_text",
},
],
type: "reasoning",
};
models.OutputWebSearchCallItemconst value: models.OutputWebSearchCallItem = {
action: {
pattern: "<value>",
type: "find_in_page",
url: "https://tragic-requirement.com/",
},
id: "ws-abc123",
status: "completed",
type: "web_search_call",
};