Skip to content

Commit 1725aba

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

1 file changed

Lines changed: 36 additions & 84 deletions

File tree

‎.speakeasy/in.openapi.yaml‎

Lines changed: 36 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -119,73 +119,6 @@ components:
119119
required:
120120
- type
121121
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
189122
AdvisorReasoning:
190123
description: >-
191124
Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for
@@ -210,10 +143,13 @@ components:
210143
AdvisorServerTool_OpenRouter:
211144
description: >-
212145
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.
146+
guidance mid-generation and returns its response. The advisor may run as a sub-agent with its own tools. Include
147+
multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default
148+
advisor.
214149
example:
215150
parameters:
216151
model: ~anthropic/claude-opus-latest
152+
name: reviewer
217153
type: openrouter:advisor
218154
properties:
219155
parameters:
@@ -226,25 +162,11 @@ components:
226162
- type
227163
type: object
228164
AdvisorServerToolConfig:
229-
description: Configuration for the openrouter:advisor server tool.
165+
description: Configuration for one openrouter:advisor server tool entry.
230166
example:
231167
model: ~anthropic/claude-opus-latest
168+
name: reviewer
232169
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
248170
forward_transcript:
249171
description: >-
250172
When true, the full parent conversation is forwarded to the advisor so it sees the same context the executor
@@ -279,8 +201,26 @@ components:
279201
advisor tool itself cannot be the advisor model.
280202
example: ~anthropic/claude-opus-latest
281203
type: string
204+
name:
205+
description: >-
206+
Optional name for this advisor. The model sees one tool per named advisor (and one default for an unnamed
207+
entry). Names must be unique across advisor entries. Letters, digits, spaces, underscores, and dashes;
208+
trimmed; 1–64 chars.
209+
example: reviewer
210+
maxLength: 64
211+
minLength: 1
212+
pattern: ^[a-zA-Z0-9 _-]+$
213+
type: string
282214
reasoning:
283215
$ref: '#/components/schemas/AdvisorReasoning'
216+
stream:
217+
description: >-
218+
When true, the advisor's advice streams incrementally as it is produced. In the Responses API this emits
219+
`response.output_text.delta` events targeting the advisor output item; the final `advice` field is still set
220+
on the completed item. Has no effect on the Chat Completions API (where the advice arrives only as the final
221+
tool result). When false or omitted, the advice arrives only as the final result.
222+
example: false
223+
type: boolean
284224
temperature:
285225
description: Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies.
286226
example: 0.7
@@ -9163,6 +9103,7 @@ components:
91639103
- $ref: '#/components/schemas/OutputMemoryServerToolItem'
91649104
- $ref: '#/components/schemas/OutputMcpServerToolItem'
91659105
- $ref: '#/components/schemas/OutputSearchModelsServerToolItem'
9106+
- $ref: '#/components/schemas/OutputAdvisorServerToolItem'
91669107
- $ref: '#/components/schemas/LocalShellCallItem'
91679108
- $ref: '#/components/schemas/LocalShellCallOutputItem'
91689109
- $ref: '#/components/schemas/ShellCallItem'
@@ -14505,6 +14446,17 @@ components:
1450514446
type: string
1450614447
id:
1450714448
type: string
14449+
instance_name:
14450+
description: >-
14451+
Provider-safe function name of the specific advisor instance that produced this item (e.g.
14452+
`openrouter_advisor__1`). Present only when more than one advisor tool is configured; omitted for the
14453+
default single advisor. Echo this field back unchanged so the advisor's cross-request memory stays
14454+
namespaced to the correct instance. This identity is positional: it is derived from the index of the advisor
14455+
entry in the request `tools` array, so clients must keep the order of advisor tool entries stable across
14456+
requests in a conversation. Reordering or inserting advisor entries shifts these names and causes each
14457+
advisor's cross-request memory to be attributed to the wrong instance.
14458+
example: openrouter_advisor__1
14459+
type: string
1450814460
model:
1450914461
description: Slug of the advisor model that was consulted.
1451014462
type: string

0 commit comments

Comments
 (0)