Skip to content

Commit fc328cd

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

1 file changed

Lines changed: 264 additions & 2 deletions

File tree

.speakeasy/in.openapi.yaml

Lines changed: 264 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,203 @@ components:
9797
required:
9898
- data
9999
type: object
100+
AdvisorNestedTool:
101+
additionalProperties:
102+
nullable: true
103+
description: >-
104+
A tool made available to the advisor sub-agent. Accepts function tools and OpenRouter server tools (e.g.
105+
openrouter:web_search). The advisor tool may not list itself.
106+
example:
107+
type: openrouter:web_search
108+
properties:
109+
function:
110+
additionalProperties:
111+
nullable: true
112+
type: object
113+
parameters:
114+
additionalProperties:
115+
nullable: true
116+
type: object
117+
type:
118+
type: string
119+
required:
120+
- type
121+
type: object
122+
AdvisorProfile:
123+
description: >-
124+
A named advisor profile. The executor model selects it by `name` and the profile's config (model, instructions,
125+
etc.) takes precedence over the request-wide advisor parameters for that call.
126+
example:
127+
instructions: You are a critical code reviewer.
128+
model: ~anthropic/claude-opus-latest
129+
name: reviewer
130+
properties:
131+
forward_transcript:
132+
description: >-
133+
When true, the full parent conversation is forwarded to the advisor so it sees the same context the executor
134+
does (and the tool-call `prompt`, if given, is appended as a final user turn). When false or omitted, the
135+
advisor receives only the `prompt` the executor passes in the tool call.
136+
example: false
137+
type: boolean
138+
instructions:
139+
description: >-
140+
System instructions for the advisor sub-agent. When omitted, the advisor responds with no system prompt of
141+
its own.
142+
example: You are a senior staff engineer. Give a focused, decisive plan.
143+
type: string
144+
max_completion_tokens:
145+
description: >-
146+
Maximum number of output tokens (including reasoning) the advisor may produce. When omitted, the provider's
147+
default applies.
148+
example: 2048
149+
type: integer
150+
max_tool_calls:
151+
description: >-
152+
Maximum number of tool-calling steps the advisor sub-agent may take during its agentic loop. Capped at 25.
153+
Only relevant when the advisor is given tools.
154+
example: 5
155+
maximum: 25
156+
minimum: 1
157+
type: integer
158+
model:
159+
description: >-
160+
Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via
161+
the tool call's `model` argument; if neither is set, the model from the outer API request is used. The
162+
advisor tool itself cannot be the advisor model.
163+
example: ~anthropic/claude-opus-latest
164+
type: string
165+
name:
166+
description: >-
167+
Name of this advisor profile. The executor model passes this `name` to the advisor tool to select the
168+
profile. Must be unique within the `advisors` roster. Letters, digits, underscores, and dashes; 1–64 chars.
169+
example: reviewer
170+
pattern: ^[a-zA-Z0-9_-]{1,64}$
171+
type: string
172+
reasoning:
173+
$ref: '#/components/schemas/AdvisorReasoning'
174+
temperature:
175+
description: Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies.
176+
example: 0.7
177+
format: double
178+
type: number
179+
tools:
180+
description: >-
181+
Tools the advisor sub-agent may use while forming its advice. The advisor runs as an agentic sub-agent over
182+
these tools, then returns its text. Must not include the advisor tool itself.
183+
items:
184+
$ref: '#/components/schemas/AdvisorNestedTool'
185+
type: array
186+
required:
187+
- name
188+
type: object
189+
AdvisorReasoning:
190+
description: >-
191+
Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for
192+
models that support extended thinking.
193+
example:
194+
effort: high
195+
properties:
196+
effort:
197+
description: Reasoning effort level for the advisor call.
198+
enum:
199+
- xhigh
200+
- high
201+
- medium
202+
- low
203+
- minimal
204+
- none
205+
type: string
206+
max_tokens:
207+
description: Maximum number of reasoning tokens the advisor may use.
208+
type: integer
209+
type: object
210+
AdvisorServerTool_OpenRouter:
211+
description: >-
212+
OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for
213+
guidance mid-generation and returns its response. The advisor may run as a sub-agent with its own tools.
214+
example:
215+
parameters:
216+
model: ~anthropic/claude-opus-latest
217+
type: openrouter:advisor
218+
properties:
219+
parameters:
220+
$ref: '#/components/schemas/AdvisorServerToolConfig'
221+
type:
222+
enum:
223+
- openrouter:advisor
224+
type: string
225+
required:
226+
- type
227+
type: object
228+
AdvisorServerToolConfig:
229+
description: Configuration for the openrouter:advisor server tool.
230+
example:
231+
model: ~anthropic/claude-opus-latest
232+
properties:
233+
advisors:
234+
description: >-
235+
Roster of named advisor profiles. When set, the executor model selects one by passing its `name` to the
236+
advisor tool; the chosen profile's config overrides the request-wide advisor parameters. Profile names must
237+
be unique.
238+
example:
239+
- instructions: You are a critical code reviewer.
240+
model: ~anthropic/claude-opus-latest
241+
name: reviewer
242+
- instructions: You are a systems architect.
243+
model: ~openai/gpt-latest
244+
name: architect
245+
items:
246+
$ref: '#/components/schemas/AdvisorProfile'
247+
type: array
248+
forward_transcript:
249+
description: >-
250+
When true, the full parent conversation is forwarded to the advisor so it sees the same context the executor
251+
does (and the tool-call `prompt`, if given, is appended as a final user turn). When false or omitted, the
252+
advisor receives only the `prompt` the executor passes in the tool call.
253+
example: false
254+
type: boolean
255+
instructions:
256+
description: >-
257+
System instructions for the advisor sub-agent. When omitted, the advisor responds with no system prompt of
258+
its own.
259+
example: You are a senior staff engineer. Give a focused, decisive plan.
260+
type: string
261+
max_completion_tokens:
262+
description: >-
263+
Maximum number of output tokens (including reasoning) the advisor may produce. When omitted, the provider's
264+
default applies.
265+
example: 2048
266+
type: integer
267+
max_tool_calls:
268+
description: >-
269+
Maximum number of tool-calling steps the advisor sub-agent may take during its agentic loop. Capped at 25.
270+
Only relevant when the advisor is given tools.
271+
example: 5
272+
maximum: 25
273+
minimum: 1
274+
type: integer
275+
model:
276+
description: >-
277+
Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via
278+
the tool call's `model` argument; if neither is set, the model from the outer API request is used. The
279+
advisor tool itself cannot be the advisor model.
280+
example: ~anthropic/claude-opus-latest
281+
type: string
282+
reasoning:
283+
$ref: '#/components/schemas/AdvisorReasoning'
284+
temperature:
285+
description: Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies.
286+
example: 0.7
287+
format: double
288+
type: number
289+
tools:
290+
description: >-
291+
Tools the advisor sub-agent may use while forming its advice. The advisor runs as an agentic sub-agent over
292+
these tools, then returns its text. Must not include the advisor tool itself.
293+
items:
294+
$ref: '#/components/schemas/AdvisorNestedTool'
295+
type: array
296+
type: object
100297
AnnotationAddedEvent:
101298
allOf:
102299
- $ref: '#/components/schemas/BaseAnnotationAddedEvent'
@@ -4157,6 +4354,7 @@ components:
41574354
- type
41584355
- function
41594356
type: object
4357+
- $ref: '#/components/schemas/AdvisorServerTool_OpenRouter'
41604358
- $ref: '#/components/schemas/DatetimeServerTool'
41614359
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
41624360
- $ref: '#/components/schemas/ChatSearchModelsServerTool'
@@ -5574,6 +5772,27 @@ components:
55745772
type: output_text
55755773
sequence_number: 3
55765774
type: response.content_part.added
5775+
ContentPartAudio:
5776+
example:
5777+
audio_url:
5778+
url: https://example.com/audio.mp3
5779+
type: audio_url
5780+
properties:
5781+
audio_url:
5782+
properties:
5783+
url:
5784+
type: string
5785+
required:
5786+
- url
5787+
type: object
5788+
type:
5789+
enum:
5790+
- audio_url
5791+
type: string
5792+
required:
5793+
- type
5794+
- audio_url
5795+
type: object
55775796
ContentPartDoneEvent:
55785797
allOf:
55795798
- $ref: '#/components/schemas/BaseContentPartDoneEvent'
@@ -5667,6 +5886,27 @@ components:
56675886
- type
56685887
- input_video
56695888
type: object
5889+
ContentPartVideo:
5890+
example:
5891+
type: video_url
5892+
video_url:
5893+
url: https://example.com/clip.mp4
5894+
properties:
5895+
type:
5896+
enum:
5897+
- video_url
5898+
type: string
5899+
video_url:
5900+
properties:
5901+
url:
5902+
type: string
5903+
required:
5904+
- url
5905+
type: object
5906+
required:
5907+
- type
5908+
- video_url
5909+
type: object
56705910
ContextCompressionEngine:
56715911
description: The compression engine to use. Defaults to "middle-out".
56725912
enum:
@@ -8299,6 +8539,24 @@ components:
82998539
- video
83008540
example: text
83018541
type: string
8542+
InputReference:
8543+
description: >-
8544+
A reference asset used to guide video generation. Image references are supported by all providers; audio and
8545+
video references are only honored by providers that support them (currently BytePlus Seedance 2.0).
8546+
discriminator:
8547+
mapping:
8548+
audio_url: '#/components/schemas/ContentPartAudio'
8549+
image_url: '#/components/schemas/ContentPartImage'
8550+
video_url: '#/components/schemas/ContentPartVideo'
8551+
propertyName: type
8552+
example:
8553+
image_url:
8554+
url: https://example.com/image.png
8555+
type: image_url
8556+
oneOf:
8557+
- $ref: '#/components/schemas/ContentPartImage'
8558+
- $ref: '#/components/schemas/ContentPartAudio'
8559+
- $ref: '#/components/schemas/ContentPartVideo'
83028560
Inputs:
83038561
anyOf:
83048562
- type: string
@@ -17452,6 +17710,7 @@ components:
1745217710
- $ref: '#/components/schemas/ShellServerTool'
1745317711
- $ref: '#/components/schemas/ApplyPatchServerTool'
1745417712
- $ref: '#/components/schemas/CustomTool'
17713+
- $ref: '#/components/schemas/AdvisorServerTool_OpenRouter'
1745517714
- $ref: '#/components/schemas/DatetimeServerTool'
1745617715
- $ref: '#/components/schemas/FusionServerTool_OpenRouter'
1745717716
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
@@ -19051,9 +19310,12 @@ components:
1905119310
example: true
1905219311
type: boolean
1905319312
input_references:
19054-
description: Reference images to guide video generation
19313+
description: >-
19314+
Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video
19315+
references are only honored by providers that support them (currently BytePlus Seedance 2.0); other
19316+
providers use image references and ignore the rest.
1905519317
items:
19056-
$ref: '#/components/schemas/ContentPartImage'
19318+
$ref: '#/components/schemas/InputReference'
1905719319
type: array
1905819320
model:
1905919321
type: string

0 commit comments

Comments
 (0)