chore: update OpenAPI spec from monorepo (#249)

Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
This commit is contained in:
robert-j-y
2026-05-15 06:27:29 -07:00
committed by GitHub
co-authored by OpenRouter SDK Bot
parent 0aa6eabffd
commit c5e2532cc4
+239 -72
View File
@@ -1991,14 +1991,18 @@ components:
- type - type
type: object type: object
ApplyPatchCallItem: ApplyPatchCallItem:
description: A file create/update/delete via diff patch description: >-
A tool call emitted by the model requesting a V4A patch operation. The client applies the patch and echoes an
`apply_patch_call_output` on the next turn.
example: example:
call_id: call-abc123 call_id: call_abc123
id: apc_abc123
operation: operation:
diff: | diff: |-
--- a @@ function main() {
+++ b + console.log("hi");
path: src/main.ts }
path: /src/main.ts
type: update_file type: update_file
status: completed status: completed
type: apply_patch_call type: apply_patch_call
@@ -2009,54 +2013,9 @@ components:
nullable: true nullable: true
type: string type: string
operation: operation:
oneOf: $ref: '#/components/schemas/ApplyPatchCallOperation'
- properties:
diff:
type: string
path:
type: string
type:
enum:
- create_file
type: string
required:
- type
- path
- diff
type: object
- properties:
path:
type: string
type:
enum:
- delete_file
type: string
required:
- type
- path
type: object
- properties:
diff:
type: string
path:
type: string
type:
enum:
- update_file
type: string
required:
- type
- path
- diff
type: object
status: status:
anyOf: $ref: '#/components/schemas/ApplyPatchCallStatus'
- enum:
- in_progress
type: string
- enum:
- completed
type: string
type: type:
enum: enum:
- apply_patch_call - apply_patch_call
@@ -2064,13 +2023,126 @@ components:
required: required:
- type - type
- call_id - call_id
- operation
- status - status
- operation
type: object
ApplyPatchCallOperation:
description: >-
The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff;
`delete_file` omits it.
example:
diff: |-
@@ function main() {
+ console.log("hi");
}
path: /src/main.ts
type: update_file
oneOf:
- properties:
diff:
type: string
path:
type: string
type:
enum:
- create_file
type: string
required:
- type
- path
- diff
type: object
- properties:
diff:
type: string
path:
type: string
type:
enum:
- update_file
type: string
required:
- type
- path
- diff
type: object
- properties:
path:
type: string
type:
enum:
- delete_file
type: string
required:
- type
- path
type: object
ApplyPatchCallOperationDiffDeltaEvent:
description: Incremental chunk of `operation.diff` for an `apply_patch_call`. Matches OpenAI's streaming shape.
example:
delta: |
+console.log("hi");
item_id: apc_abc123
output_index: 0
sequence_number: 5
type: response.apply_patch_call_operation_diff.delta
properties:
delta:
type: string
item_id:
type: string
output_index:
type: integer
sequence_number:
type: integer
type:
enum:
- response.apply_patch_call_operation_diff.delta
type: string
required:
- type
- item_id
- output_index
- delta
- sequence_number
type: object
ApplyPatchCallOperationDiffDoneEvent:
description: Emitted when `operation.diff` streaming completes for an `apply_patch_call`.
example:
diff: |
@@
+console.log("hi");
item_id: apc_abc123
output_index: 0
sequence_number: 12
type: response.apply_patch_call_operation_diff.done
properties:
diff:
type: string
item_id:
type: string
output_index:
type: integer
sequence_number:
type: integer
type:
enum:
- response.apply_patch_call_operation_diff.done
type: string
required:
- type
- item_id
- output_index
- diff
- sequence_number
type: object type: object
ApplyPatchCallOutputItem: ApplyPatchCallOutputItem:
description: Output from an apply patch operation description: >-
The client's echo of an `apply_patch_call` after applying the patch. `output` is an optional human-readable log;
`status` is `completed` when the patch was applied successfully, `failed` otherwise.
example: example:
call_id: call-abc123 call_id: call_abc123
output: Applied patch to /src/main.ts
status: completed status: completed
type: apply_patch_call_output type: apply_patch_call_output
properties: properties:
@@ -2083,13 +2155,10 @@ components:
nullable: true nullable: true
type: string type: string
status: status:
anyOf: enum:
- enum: - completed
- completed - failed
type: string type: string
- enum:
- failed
type: string
type: type:
enum: enum:
- apply_patch_call_output - apply_patch_call_output
@@ -2099,6 +2168,13 @@ components:
- call_id - call_id
- status - status
type: object type: object
ApplyPatchCallStatus:
description: Lifecycle state of an `apply_patch_call` output item.
enum:
- in_progress
- completed
example: completed
type: string
ApplyPatchServerTool: ApplyPatchServerTool:
description: Apply patch tool configuration description: Apply patch tool configuration
example: example:
@@ -2111,6 +2187,27 @@ components:
required: required:
- type - type
type: object type: object
ApplyPatchServerTool_OpenRouter:
description: >-
OpenRouter built-in server tool: validates V4A diff patches for file operations (create, update, delete).
Restricted to the Responses API.
example:
type: openrouter:apply_patch
properties:
parameters:
$ref: '#/components/schemas/ApplyPatchServerToolConfig'
type:
enum:
- openrouter:apply_patch
type: string
required:
- type
type: object
ApplyPatchServerToolConfig:
description: Configuration for the openrouter:apply_patch server tool
example: {}
properties: {}
type: object
AutoRouterPlugin: AutoRouterPlugin:
example: example:
allowed_models: allowed_models:
@@ -2547,6 +2644,8 @@ components:
- $ref: '#/components/schemas/OutputMessage' - $ref: '#/components/schemas/OutputMessage'
- $ref: '#/components/schemas/OpenAIResponseCustomToolCall' - $ref: '#/components/schemas/OpenAIResponseCustomToolCall'
- $ref: '#/components/schemas/OpenAIResponseCustomToolCallOutput' - $ref: '#/components/schemas/OpenAIResponseCustomToolCallOutput'
- $ref: '#/components/schemas/ApplyPatchCallItem'
- $ref: '#/components/schemas/ApplyPatchCallOutputItem'
type: array type: array
- nullable: true - nullable: true
example: example:
@@ -7518,6 +7617,8 @@ components:
- $ref: '#/components/schemas/InputMessageItem' - $ref: '#/components/schemas/InputMessageItem'
- $ref: '#/components/schemas/FunctionCallItem' - $ref: '#/components/schemas/FunctionCallItem'
- $ref: '#/components/schemas/FunctionCallOutputItem' - $ref: '#/components/schemas/FunctionCallOutputItem'
- $ref: '#/components/schemas/ApplyPatchCallItem'
- $ref: '#/components/schemas/ApplyPatchCallOutputItem'
- allOf: - allOf:
- $ref: '#/components/schemas/OutputMessageItem' - $ref: '#/components/schemas/OutputMessageItem'
- properties: - properties:
@@ -7588,8 +7689,6 @@ components:
- $ref: '#/components/schemas/LocalShellCallOutputItem' - $ref: '#/components/schemas/LocalShellCallOutputItem'
- $ref: '#/components/schemas/ShellCallItem' - $ref: '#/components/schemas/ShellCallItem'
- $ref: '#/components/schemas/ShellCallOutputItem' - $ref: '#/components/schemas/ShellCallOutputItem'
- $ref: '#/components/schemas/ApplyPatchCallItem'
- $ref: '#/components/schemas/ApplyPatchCallOutputItem'
- $ref: '#/components/schemas/McpListToolsItem' - $ref: '#/components/schemas/McpListToolsItem'
- $ref: '#/components/schemas/McpApprovalRequestItem' - $ref: '#/components/schemas/McpApprovalRequestItem'
- $ref: '#/components/schemas/McpApprovalResponseItem' - $ref: '#/components/schemas/McpApprovalResponseItem'
@@ -10510,6 +10609,22 @@ components:
- type - type
type: object type: object
- $ref: '#/components/schemas/ToolChoiceAllowed' - $ref: '#/components/schemas/ToolChoiceAllowed'
- properties:
type:
enum:
- apply_patch
type: string
required:
- type
type: object
- properties:
type:
enum:
- shell
type: string
required:
- type
type: object
example: auto example: auto
OpenAIResponsesTruncation: OpenAIResponsesTruncation:
enum: enum:
@@ -10905,20 +11020,65 @@ components:
example: end_turn example: end_turn
nullable: true nullable: true
type: string type: string
OutputApplyPatchServerToolItem: OutputApplyPatchCallItem:
description: An openrouter:apply_patch server tool output item description: >-
A native `apply_patch_call` output item matching OpenAI's Responses API shape. Emitted when the client requested
the `apply_patch` shorthand.
example: example:
filePath: /src/main.ts call_id: call_abc123
id: ap_tmp_abc123 id: apc_abc123
operation:
diff: |-
@@ function main() {
+ console.log("hi");
}
path: /src/main.ts
type: update_file
status: completed status: completed
type: openrouter:apply_patch type: apply_patch_call
properties: properties:
filePath: call_id:
type: string type: string
id: id:
type: string type: string
patch: operation:
$ref: '#/components/schemas/ApplyPatchCallOperation'
status:
$ref: '#/components/schemas/ApplyPatchCallStatus'
type:
enum:
- apply_patch_call
type: string type: string
required:
- type
- id
- call_id
- status
- operation
type: object
OutputApplyPatchServerToolItem:
description: >-
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:
call_id: call_abc123
id: apc_abc123
operation:
diff: |-
@@ function main() {
+ console.log("hi");
}
path: /src/main.ts
type: update_file
status: completed
type: openrouter:apply_patch
properties:
call_id:
type: string
id:
type: string
operation:
$ref: '#/components/schemas/ApplyPatchCallOperation'
status: status:
$ref: '#/components/schemas/ToolCallStatus' $ref: '#/components/schemas/ToolCallStatus'
type: type:
@@ -11593,6 +11753,7 @@ components:
description: An output item from the response description: An output item from the response
discriminator: discriminator:
mapping: mapping:
apply_patch_call: '#/components/schemas/OutputApplyPatchCallItem'
code_interpreter_call: '#/components/schemas/OutputCodeInterpreterCallItem' code_interpreter_call: '#/components/schemas/OutputCodeInterpreterCallItem'
computer_call: '#/components/schemas/OutputComputerCallItem' computer_call: '#/components/schemas/OutputComputerCallItem'
custom_tool_call: '#/components/schemas/OutputCustomToolCallItem' custom_tool_call: '#/components/schemas/OutputCustomToolCallItem'
@@ -11644,6 +11805,7 @@ components:
- $ref: '#/components/schemas/OutputBashServerToolItem' - $ref: '#/components/schemas/OutputBashServerToolItem'
- $ref: '#/components/schemas/OutputTextEditorServerToolItem' - $ref: '#/components/schemas/OutputTextEditorServerToolItem'
- $ref: '#/components/schemas/OutputApplyPatchServerToolItem' - $ref: '#/components/schemas/OutputApplyPatchServerToolItem'
- $ref: '#/components/schemas/OutputApplyPatchCallItem'
- $ref: '#/components/schemas/OutputWebFetchServerToolItem' - $ref: '#/components/schemas/OutputWebFetchServerToolItem'
- $ref: '#/components/schemas/OutputToolSearchServerToolItem' - $ref: '#/components/schemas/OutputToolSearchServerToolItem'
- $ref: '#/components/schemas/OutputMemoryServerToolItem' - $ref: '#/components/schemas/OutputMemoryServerToolItem'
@@ -14303,6 +14465,7 @@ components:
- $ref: '#/components/schemas/ChatSearchModelsServerTool' - $ref: '#/components/schemas/ChatSearchModelsServerTool'
- $ref: '#/components/schemas/WebFetchServerTool' - $ref: '#/components/schemas/WebFetchServerTool'
- $ref: '#/components/schemas/WebSearchServerTool_OpenRouter' - $ref: '#/components/schemas/WebSearchServerTool_OpenRouter'
- $ref: '#/components/schemas/ApplyPatchServerTool_OpenRouter'
type: array type: array
top_k: top_k:
type: integer type: integer
@@ -14643,6 +14806,8 @@ components:
discriminator: discriminator:
mapping: mapping:
error: '#/components/schemas/ErrorEvent' error: '#/components/schemas/ErrorEvent'
response.apply_patch_call_operation_diff.delta: '#/components/schemas/ApplyPatchCallOperationDiffDeltaEvent'
response.apply_patch_call_operation_diff.done: '#/components/schemas/ApplyPatchCallOperationDiffDoneEvent'
response.completed: '#/components/schemas/StreamEventsResponseCompleted' response.completed: '#/components/schemas/StreamEventsResponseCompleted'
response.content_part.added: '#/components/schemas/ContentPartAddedEvent' response.content_part.added: '#/components/schemas/ContentPartAddedEvent'
response.content_part.done: '#/components/schemas/ContentPartDoneEvent' response.content_part.done: '#/components/schemas/ContentPartDoneEvent'
@@ -14728,6 +14893,8 @@ components:
- $ref: '#/components/schemas/WebSearchCallCompletedEvent' - $ref: '#/components/schemas/WebSearchCallCompletedEvent'
- $ref: '#/components/schemas/CustomToolCallInputDeltaEvent' - $ref: '#/components/schemas/CustomToolCallInputDeltaEvent'
- $ref: '#/components/schemas/CustomToolCallInputDoneEvent' - $ref: '#/components/schemas/CustomToolCallInputDoneEvent'
- $ref: '#/components/schemas/ApplyPatchCallOperationDiffDeltaEvent'
- $ref: '#/components/schemas/ApplyPatchCallOperationDiffDoneEvent'
StreamEventsResponseCompleted: StreamEventsResponseCompleted:
allOf: allOf:
- $ref: '#/components/schemas/CompletedEvent' - $ref: '#/components/schemas/CompletedEvent'