OutputApplyPatchServerToolItem - TypeScript SDK

OutputApplyPatchServerToolItem type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

An openrouter:apply_patch server tool output item. The turn halts when validation succeeds so the client can apply the patch and echo an apply_patch_call_output on the next turn.

Example Usage

1import { OutputApplyPatchServerToolItem } from "@openrouter/sdk/models";
2
3let value: OutputApplyPatchServerToolItem = {
4 status: "completed",
5 type: "openrouter:apply_patch",
6};

Fields

FieldTypeRequiredDescriptionExample
callIdstringN/A
idstringN/A
operationmodels.ApplyPatchCallOperationThe patch operation requested by an apply_patch_call. create_file and update_file carry a V4A diff; delete_file omits it.{"diff": "@@ function main() {\n+ console.log(\"hi\");\n }”,
“path”: “/src/main.ts”,
“type”: “update_file”
}
statusmodels.ToolCallStatus✔️N/Acompleted
typemodels.OutputApplyPatchServerToolItemType✔️N/A