Skip to main content
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

import { OutputApplyPatchServerToolItem } from "@openrouter/sdk/models";

let value: OutputApplyPatchServerToolItem = {
  status: "completed",
  type: "openrouter:apply_patch",
};

Fields

FieldTypeRequiredDescriptionExample
callIdstring:heavy_minus_sign:N/A
idstring:heavy_minus_sign:N/A
operationmodels.ApplyPatchCallOperation:heavy_minus_sign:The 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:heavy_check_mark:N/Acompleted
typemodels.OutputApplyPatchServerToolItemType:heavy_check_mark:N/A