From b453d73e7b5faa9f4819ddde2ec9053b1a333b44 Mon Sep 17 00:00:00 2001 From: OpenRouter SDK Bot Date: Fri, 24 Jul 2026 17:53:41 +0000 Subject: [PATCH] chore: update OpenAPI spec [sdk-bot] --- .speakeasy/in.openapi.yaml | 60 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index dba1858b..eb8400be 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -12369,6 +12369,8 @@ components: - 'content' type: 'object' - $ref: '#/components/schemas/MessagesAdvisorToolResultBlock' + - $ref: '#/components/schemas/MessagesToolAdditionBlock' + - $ref: '#/components/schemas/MessagesToolRemovalBlock' type: 'array' role: enum: @@ -12726,6 +12728,8 @@ components: - properties: cache_control: $ref: '#/components/schemas/AnthropicCacheControlDirective' + defer_loading: + type: 'boolean' description: type: 'string' input_schema: @@ -13289,6 +13293,62 @@ components: - 'event' - 'data' type: 'object' + MessagesToolAdditionBlock: + description: 'Loads a previously deferred tool (declared in `tools` with `defer_loading: true`) mid-conversation without invalidating the prompt cache. Only valid in `role: "system"` messages. Not supported on Claude Sonnet 5 or models older than Claude Opus 4.8.' + example: + tool: + name: 'get_forecast' + type: 'tool_reference' + type: 'tool_addition' + properties: + tool: + properties: + name: + type: 'string' + type: + enum: + - 'tool_reference' + type: 'string' + required: + - 'type' + - 'name' + type: 'object' + type: + enum: + - 'tool_addition' + type: 'string' + required: + - 'type' + - 'tool' + type: 'object' + MessagesToolRemovalBlock: + description: 'Removes a tool from the conversation mid-conversation without invalidating the prompt cache. Only valid in `role: "system"` messages. Not supported on Claude Sonnet 5 or models older than Claude Opus 4.8.' + example: + tool: + name: 'get_weather' + type: 'tool_reference' + type: 'tool_removal' + properties: + tool: + properties: + name: + type: 'string' + type: + enum: + - 'tool_reference' + type: 'string' + required: + - 'type' + - 'name' + type: 'object' + type: + enum: + - 'tool_removal' + type: 'string' + required: + - 'type' + - 'tool' + type: 'object' MetadataLevel: description: 'Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.' enum: