Skip to content

Commit bf8a2c6

Browse files
robert-j-yOpenRouter SDK Bot
andauthored
chore: update OpenAPI spec from monorepo (#246)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
1 parent 9312cab commit bf8a2c6

1 file changed

Lines changed: 157 additions & 50 deletions

File tree

.speakeasy/in.openapi.yaml

Lines changed: 157 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,61 @@ components:
116116
output_index: 0
117117
sequence_number: 5
118118
type: response.output_text.annotation.added
119+
AnthropicAdvisorMessageUsageIteration:
120+
allOf:
121+
- $ref: '#/components/schemas/AnthropicBaseUsageIteration'
122+
- properties:
123+
model:
124+
type: string
125+
type:
126+
enum:
127+
- advisor_message
128+
type: string
129+
required:
130+
- type
131+
- model
132+
type: object
133+
example:
134+
cache_creation: null
135+
cache_creation_input_tokens: 0
136+
cache_read_input_tokens: 0
137+
input_tokens: 823
138+
model: claude-opus-4-6
139+
output_tokens: 1612
140+
type: advisor_message
141+
AnthropicAdvisorToolResult:
142+
example:
143+
content:
144+
text: Advisor response text
145+
type: advisor_result
146+
tool_use_id: srvtoolu_01abc
147+
type: advisor_tool_result
148+
properties:
149+
content:
150+
additionalProperties:
151+
nullable: true
152+
type: object
153+
tool_use_id:
154+
type: string
155+
type:
156+
enum:
157+
- advisor_tool_result
158+
type: string
159+
required:
160+
- type
161+
- tool_use_id
162+
- content
163+
type: object
164+
AnthropicAllowedCallers:
165+
example:
166+
- direct
167+
items:
168+
enum:
169+
- direct
170+
- code_execution_20250825
171+
- code_execution_20260120
172+
type: string
173+
type: array
119174
AnthropicBase64ImageSource:
120175
example:
121176
data: /9j/4AAQ...
@@ -1129,17 +1184,6 @@ components:
11291184
- execution_time_exceeded
11301185
example: unavailable
11311186
type: string
1132-
AnthropicServerToolName:
1133-
enum:
1134-
- web_search
1135-
- web_fetch
1136-
- code_execution
1137-
- bash_code_execution
1138-
- text_editor_code_execution
1139-
- tool_search_tool_regex
1140-
- tool_search_tool_bm25
1141-
example: web_search
1142-
type: string
11431187
AnthropicServerToolUsage:
11441188
example:
11451189
web_fetch_requests: 0
@@ -1154,34 +1198,6 @@ components:
11541198
- web_search_requests
11551199
- web_fetch_requests
11561200
type: object
1157-
AnthropicServerToolUseBlock:
1158-
example:
1159-
caller:
1160-
type: direct
1161-
id: srvtoolu_01abc
1162-
input:
1163-
query: latest news
1164-
name: web_search
1165-
type: server_tool_use
1166-
properties:
1167-
caller:
1168-
$ref: '#/components/schemas/AnthropicCaller'
1169-
id:
1170-
type: string
1171-
input:
1172-
nullable: true
1173-
name:
1174-
$ref: '#/components/schemas/AnthropicServerToolName'
1175-
type:
1176-
enum:
1177-
- server_tool_use
1178-
type: string
1179-
required:
1180-
- type
1181-
- id
1182-
- caller
1183-
- name
1184-
type: object
11851201
AnthropicServiceTier:
11861202
enum:
11871203
- standard
@@ -1722,6 +1738,7 @@ components:
17221738
anyOf:
17231739
- $ref: '#/components/schemas/AnthropicCompactionUsageIteration'
17241740
- $ref: '#/components/schemas/AnthropicMessageUsageIteration'
1741+
- $ref: '#/components/schemas/AnthropicAdvisorMessageUsageIteration'
17251742
- $ref: '#/components/schemas/AnthropicUnknownUsageIteration'
17261743
example:
17271744
cache_creation: null
@@ -8373,6 +8390,32 @@ components:
83738390
- assigned_by
83748391
- created_at
83758392
type: object
8393+
MessagesAdvisorToolResultBlock:
8394+
description: >-
8395+
Advisor tool result from a prior assistant turn, replayed back to the model on the next turn. Mirrors the block
8396+
Anthropic returns in assistant content when the `advisor_20260301` tool runs.
8397+
example:
8398+
content:
8399+
text: Advisor response text
8400+
type: advisor_result
8401+
tool_use_id: srvtoolu_01abc
8402+
type: advisor_tool_result
8403+
properties:
8404+
content:
8405+
additionalProperties:
8406+
nullable: true
8407+
type: object
8408+
tool_use_id:
8409+
type: string
8410+
type:
8411+
enum:
8412+
- advisor_tool_result
8413+
type: string
8414+
required:
8415+
- type
8416+
- tool_use_id
8417+
- content
8418+
type: object
83768419
MessagesContentBlockDeltaEvent:
83778420
description: Event sent when content is added to a content block
83788421
example:
@@ -8490,7 +8533,7 @@ components:
84908533
- $ref: '#/components/schemas/AnthropicToolUseBlock'
84918534
- $ref: '#/components/schemas/AnthropicThinkingBlock'
84928535
- $ref: '#/components/schemas/AnthropicRedactedThinkingBlock'
8493-
- $ref: '#/components/schemas/AnthropicServerToolUseBlock'
8536+
- $ref: '#/components/schemas/ORAnthropicServerToolUseBlock'
84948537
- $ref: '#/components/schemas/AnthropicWebSearchToolResult'
84958538
- $ref: '#/components/schemas/AnthropicWebFetchToolResult'
84968539
- $ref: '#/components/schemas/AnthropicCodeExecutionToolResult'
@@ -8499,6 +8542,7 @@ components:
84998542
- $ref: '#/components/schemas/AnthropicToolSearchToolResult'
85008543
- $ref: '#/components/schemas/AnthropicContainerUpload'
85018544
- $ref: '#/components/schemas/AnthropicCompactionBlock'
8545+
- $ref: '#/components/schemas/AnthropicAdvisorToolResult'
85028546
- properties:
85038547
content:
85048548
nullable: true
@@ -8767,7 +8811,7 @@ components:
87678811
input:
87688812
nullable: true
87698813
name:
8770-
$ref: '#/components/schemas/AnthropicServerToolName'
8814+
type: string
87718815
type:
87728816
enum:
87738817
- server_tool_use
@@ -8828,6 +8872,7 @@ components:
88288872
- type
88298873
- content
88308874
type: object
8875+
- $ref: '#/components/schemas/MessagesAdvisorToolResultBlock'
88318876
type: array
88328877
role:
88338878
enum:
@@ -9260,13 +9305,7 @@ components:
92609305
type: object
92619306
- properties:
92629307
allowed_callers:
9263-
items:
9264-
enum:
9265-
- direct
9266-
- code_execution_20250825
9267-
- code_execution_20260120
9268-
type: string
9269-
type: array
9308+
$ref: '#/components/schemas/AnthropicAllowedCallers'
92709309
allowed_domains:
92719310
items:
92729311
type: string
@@ -9296,6 +9335,34 @@ components:
92969335
- type
92979336
- name
92989337
type: object
9338+
- properties:
9339+
allowed_callers:
9340+
$ref: '#/components/schemas/AnthropicAllowedCallers'
9341+
cache_control:
9342+
$ref: '#/components/schemas/AnthropicCacheControlDirective'
9343+
caching:
9344+
allOf:
9345+
- $ref: '#/components/schemas/AnthropicCacheControlDirective'
9346+
- nullable: true
9347+
defer_loading:
9348+
type: boolean
9349+
max_uses:
9350+
type: integer
9351+
model:
9352+
type: string
9353+
name:
9354+
enum:
9355+
- advisor
9356+
type: string
9357+
type:
9358+
enum:
9359+
- advisor_20260301
9360+
type: string
9361+
required:
9362+
- type
9363+
- name
9364+
- model
9365+
type: object
92999366
- $ref: '#/components/schemas/DatetimeServerTool'
93009367
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
93019368
- $ref: '#/components/schemas/ChatSearchModelsServerTool'
@@ -10734,12 +10801,13 @@ components:
1073410801
ORAnthropicContentBlock:
1073510802
discriminator:
1073610803
mapping:
10804+
advisor_tool_result: '#/components/schemas/AnthropicAdvisorToolResult'
1073710805
bash_code_execution_tool_result: '#/components/schemas/AnthropicBashCodeExecutionToolResult'
1073810806
code_execution_tool_result: '#/components/schemas/AnthropicCodeExecutionToolResult'
1073910807
compaction: '#/components/schemas/AnthropicCompactionBlock'
1074010808
container_upload: '#/components/schemas/AnthropicContainerUpload'
1074110809
redacted_thinking: '#/components/schemas/AnthropicRedactedThinkingBlock'
10742-
server_tool_use: '#/components/schemas/AnthropicServerToolUseBlock'
10810+
server_tool_use: '#/components/schemas/ORAnthropicServerToolUseBlock'
1074310811
text: '#/components/schemas/AnthropicTextBlock'
1074410812
text_editor_code_execution_tool_result: '#/components/schemas/AnthropicTextEditorCodeExecutionToolResult'
1074510813
thinking: '#/components/schemas/AnthropicThinkingBlock'
@@ -10757,7 +10825,7 @@ components:
1075710825
- $ref: '#/components/schemas/AnthropicToolUseBlock'
1075810826
- $ref: '#/components/schemas/AnthropicThinkingBlock'
1075910827
- $ref: '#/components/schemas/AnthropicRedactedThinkingBlock'
10760-
- $ref: '#/components/schemas/AnthropicServerToolUseBlock'
10828+
- $ref: '#/components/schemas/ORAnthropicServerToolUseBlock'
1076110829
- $ref: '#/components/schemas/AnthropicWebSearchToolResult'
1076210830
- $ref: '#/components/schemas/AnthropicWebFetchToolResult'
1076310831
- $ref: '#/components/schemas/AnthropicCodeExecutionToolResult'
@@ -10766,6 +10834,45 @@ components:
1076610834
- $ref: '#/components/schemas/AnthropicToolSearchToolResult'
1076710835
- $ref: '#/components/schemas/AnthropicContainerUpload'
1076810836
- $ref: '#/components/schemas/AnthropicCompactionBlock'
10837+
- $ref: '#/components/schemas/AnthropicAdvisorToolResult'
10838+
ORAnthropicNullableCaller:
10839+
discriminator:
10840+
mapping:
10841+
code_execution_20250825: '#/components/schemas/AnthropicCodeExecution20250825Caller'
10842+
code_execution_20260120: '#/components/schemas/AnthropicCodeExecution20260120Caller'
10843+
direct: '#/components/schemas/AnthropicDirectCaller'
10844+
propertyName: type
10845+
example: null
10846+
oneOf:
10847+
- $ref: '#/components/schemas/AnthropicDirectCaller'
10848+
- $ref: '#/components/schemas/AnthropicCodeExecution20250825Caller'
10849+
- $ref: '#/components/schemas/AnthropicCodeExecution20260120Caller'
10850+
- nullable: true
10851+
ORAnthropicServerToolUseBlock:
10852+
example:
10853+
caller: null
10854+
id: srvtoolu_01abc
10855+
input: {}
10856+
name: advisor
10857+
type: server_tool_use
10858+
properties:
10859+
caller:
10860+
$ref: '#/components/schemas/ORAnthropicNullableCaller'
10861+
id:
10862+
type: string
10863+
input:
10864+
nullable: true
10865+
name:
10866+
type: string
10867+
type:
10868+
enum:
10869+
- server_tool_use
10870+
type: string
10871+
required:
10872+
- type
10873+
- id
10874+
- name
10875+
type: object
1076910876
ORAnthropicStopReason:
1077010877
enum:
1077110878
- end_turn

0 commit comments

Comments
 (0)