mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
chore: update OpenAPI spec from monorepo (#286)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
This commit is contained in:
co-authored by
OpenRouter SDK Bot
parent
234901509f
commit
fc328cd45d
+264
-2
@@ -97,6 +97,203 @@ components:
|
|||||||
required:
|
required:
|
||||||
- data
|
- data
|
||||||
type: object
|
type: object
|
||||||
|
AdvisorNestedTool:
|
||||||
|
additionalProperties:
|
||||||
|
nullable: true
|
||||||
|
description: >-
|
||||||
|
A tool made available to the advisor sub-agent. Accepts function tools and OpenRouter server tools (e.g.
|
||||||
|
openrouter:web_search). The advisor tool may not list itself.
|
||||||
|
example:
|
||||||
|
type: openrouter:web_search
|
||||||
|
properties:
|
||||||
|
function:
|
||||||
|
additionalProperties:
|
||||||
|
nullable: true
|
||||||
|
type: object
|
||||||
|
parameters:
|
||||||
|
additionalProperties:
|
||||||
|
nullable: true
|
||||||
|
type: object
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
type: object
|
||||||
|
AdvisorProfile:
|
||||||
|
description: >-
|
||||||
|
A named advisor profile. The executor model selects it by `name` and the profile's config (model, instructions,
|
||||||
|
etc.) takes precedence over the request-wide advisor parameters for that call.
|
||||||
|
example:
|
||||||
|
instructions: You are a critical code reviewer.
|
||||||
|
model: ~anthropic/claude-opus-latest
|
||||||
|
name: reviewer
|
||||||
|
properties:
|
||||||
|
forward_transcript:
|
||||||
|
description: >-
|
||||||
|
When true, the full parent conversation is forwarded to the advisor so it sees the same context the executor
|
||||||
|
does (and the tool-call `prompt`, if given, is appended as a final user turn). When false or omitted, the
|
||||||
|
advisor receives only the `prompt` the executor passes in the tool call.
|
||||||
|
example: false
|
||||||
|
type: boolean
|
||||||
|
instructions:
|
||||||
|
description: >-
|
||||||
|
System instructions for the advisor sub-agent. When omitted, the advisor responds with no system prompt of
|
||||||
|
its own.
|
||||||
|
example: You are a senior staff engineer. Give a focused, decisive plan.
|
||||||
|
type: string
|
||||||
|
max_completion_tokens:
|
||||||
|
description: >-
|
||||||
|
Maximum number of output tokens (including reasoning) the advisor may produce. When omitted, the provider's
|
||||||
|
default applies.
|
||||||
|
example: 2048
|
||||||
|
type: integer
|
||||||
|
max_tool_calls:
|
||||||
|
description: >-
|
||||||
|
Maximum number of tool-calling steps the advisor sub-agent may take during its agentic loop. Capped at 25.
|
||||||
|
Only relevant when the advisor is given tools.
|
||||||
|
example: 5
|
||||||
|
maximum: 25
|
||||||
|
minimum: 1
|
||||||
|
type: integer
|
||||||
|
model:
|
||||||
|
description: >-
|
||||||
|
Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via
|
||||||
|
the tool call's `model` argument; if neither is set, the model from the outer API request is used. The
|
||||||
|
advisor tool itself cannot be the advisor model.
|
||||||
|
example: ~anthropic/claude-opus-latest
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
description: >-
|
||||||
|
Name of this advisor profile. The executor model passes this `name` to the advisor tool to select the
|
||||||
|
profile. Must be unique within the `advisors` roster. Letters, digits, underscores, and dashes; 1–64 chars.
|
||||||
|
example: reviewer
|
||||||
|
pattern: ^[a-zA-Z0-9_-]{1,64}$
|
||||||
|
type: string
|
||||||
|
reasoning:
|
||||||
|
$ref: '#/components/schemas/AdvisorReasoning'
|
||||||
|
temperature:
|
||||||
|
description: Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies.
|
||||||
|
example: 0.7
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
tools:
|
||||||
|
description: >-
|
||||||
|
Tools the advisor sub-agent may use while forming its advice. The advisor runs as an agentic sub-agent over
|
||||||
|
these tools, then returns its text. Must not include the advisor tool itself.
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/AdvisorNestedTool'
|
||||||
|
type: array
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
type: object
|
||||||
|
AdvisorReasoning:
|
||||||
|
description: >-
|
||||||
|
Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for
|
||||||
|
models that support extended thinking.
|
||||||
|
example:
|
||||||
|
effort: high
|
||||||
|
properties:
|
||||||
|
effort:
|
||||||
|
description: Reasoning effort level for the advisor call.
|
||||||
|
enum:
|
||||||
|
- xhigh
|
||||||
|
- high
|
||||||
|
- medium
|
||||||
|
- low
|
||||||
|
- minimal
|
||||||
|
- none
|
||||||
|
type: string
|
||||||
|
max_tokens:
|
||||||
|
description: Maximum number of reasoning tokens the advisor may use.
|
||||||
|
type: integer
|
||||||
|
type: object
|
||||||
|
AdvisorServerTool_OpenRouter:
|
||||||
|
description: >-
|
||||||
|
OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for
|
||||||
|
guidance mid-generation and returns its response. The advisor may run as a sub-agent with its own tools.
|
||||||
|
example:
|
||||||
|
parameters:
|
||||||
|
model: ~anthropic/claude-opus-latest
|
||||||
|
type: openrouter:advisor
|
||||||
|
properties:
|
||||||
|
parameters:
|
||||||
|
$ref: '#/components/schemas/AdvisorServerToolConfig'
|
||||||
|
type:
|
||||||
|
enum:
|
||||||
|
- openrouter:advisor
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
type: object
|
||||||
|
AdvisorServerToolConfig:
|
||||||
|
description: Configuration for the openrouter:advisor server tool.
|
||||||
|
example:
|
||||||
|
model: ~anthropic/claude-opus-latest
|
||||||
|
properties:
|
||||||
|
advisors:
|
||||||
|
description: >-
|
||||||
|
Roster of named advisor profiles. When set, the executor model selects one by passing its `name` to the
|
||||||
|
advisor tool; the chosen profile's config overrides the request-wide advisor parameters. Profile names must
|
||||||
|
be unique.
|
||||||
|
example:
|
||||||
|
- instructions: You are a critical code reviewer.
|
||||||
|
model: ~anthropic/claude-opus-latest
|
||||||
|
name: reviewer
|
||||||
|
- instructions: You are a systems architect.
|
||||||
|
model: ~openai/gpt-latest
|
||||||
|
name: architect
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/AdvisorProfile'
|
||||||
|
type: array
|
||||||
|
forward_transcript:
|
||||||
|
description: >-
|
||||||
|
When true, the full parent conversation is forwarded to the advisor so it sees the same context the executor
|
||||||
|
does (and the tool-call `prompt`, if given, is appended as a final user turn). When false or omitted, the
|
||||||
|
advisor receives only the `prompt` the executor passes in the tool call.
|
||||||
|
example: false
|
||||||
|
type: boolean
|
||||||
|
instructions:
|
||||||
|
description: >-
|
||||||
|
System instructions for the advisor sub-agent. When omitted, the advisor responds with no system prompt of
|
||||||
|
its own.
|
||||||
|
example: You are a senior staff engineer. Give a focused, decisive plan.
|
||||||
|
type: string
|
||||||
|
max_completion_tokens:
|
||||||
|
description: >-
|
||||||
|
Maximum number of output tokens (including reasoning) the advisor may produce. When omitted, the provider's
|
||||||
|
default applies.
|
||||||
|
example: 2048
|
||||||
|
type: integer
|
||||||
|
max_tool_calls:
|
||||||
|
description: >-
|
||||||
|
Maximum number of tool-calling steps the advisor sub-agent may take during its agentic loop. Capped at 25.
|
||||||
|
Only relevant when the advisor is given tools.
|
||||||
|
example: 5
|
||||||
|
maximum: 25
|
||||||
|
minimum: 1
|
||||||
|
type: integer
|
||||||
|
model:
|
||||||
|
description: >-
|
||||||
|
Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via
|
||||||
|
the tool call's `model` argument; if neither is set, the model from the outer API request is used. The
|
||||||
|
advisor tool itself cannot be the advisor model.
|
||||||
|
example: ~anthropic/claude-opus-latest
|
||||||
|
type: string
|
||||||
|
reasoning:
|
||||||
|
$ref: '#/components/schemas/AdvisorReasoning'
|
||||||
|
temperature:
|
||||||
|
description: Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies.
|
||||||
|
example: 0.7
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
tools:
|
||||||
|
description: >-
|
||||||
|
Tools the advisor sub-agent may use while forming its advice. The advisor runs as an agentic sub-agent over
|
||||||
|
these tools, then returns its text. Must not include the advisor tool itself.
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/AdvisorNestedTool'
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
AnnotationAddedEvent:
|
AnnotationAddedEvent:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/BaseAnnotationAddedEvent'
|
- $ref: '#/components/schemas/BaseAnnotationAddedEvent'
|
||||||
@@ -4157,6 +4354,7 @@ components:
|
|||||||
- type
|
- type
|
||||||
- function
|
- function
|
||||||
type: object
|
type: object
|
||||||
|
- $ref: '#/components/schemas/AdvisorServerTool_OpenRouter'
|
||||||
- $ref: '#/components/schemas/DatetimeServerTool'
|
- $ref: '#/components/schemas/DatetimeServerTool'
|
||||||
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
|
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
|
||||||
- $ref: '#/components/schemas/ChatSearchModelsServerTool'
|
- $ref: '#/components/schemas/ChatSearchModelsServerTool'
|
||||||
@@ -5574,6 +5772,27 @@ components:
|
|||||||
type: output_text
|
type: output_text
|
||||||
sequence_number: 3
|
sequence_number: 3
|
||||||
type: response.content_part.added
|
type: response.content_part.added
|
||||||
|
ContentPartAudio:
|
||||||
|
example:
|
||||||
|
audio_url:
|
||||||
|
url: https://example.com/audio.mp3
|
||||||
|
type: audio_url
|
||||||
|
properties:
|
||||||
|
audio_url:
|
||||||
|
properties:
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- url
|
||||||
|
type: object
|
||||||
|
type:
|
||||||
|
enum:
|
||||||
|
- audio_url
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- audio_url
|
||||||
|
type: object
|
||||||
ContentPartDoneEvent:
|
ContentPartDoneEvent:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/BaseContentPartDoneEvent'
|
- $ref: '#/components/schemas/BaseContentPartDoneEvent'
|
||||||
@@ -5667,6 +5886,27 @@ components:
|
|||||||
- type
|
- type
|
||||||
- input_video
|
- input_video
|
||||||
type: object
|
type: object
|
||||||
|
ContentPartVideo:
|
||||||
|
example:
|
||||||
|
type: video_url
|
||||||
|
video_url:
|
||||||
|
url: https://example.com/clip.mp4
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
enum:
|
||||||
|
- video_url
|
||||||
|
type: string
|
||||||
|
video_url:
|
||||||
|
properties:
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- url
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- video_url
|
||||||
|
type: object
|
||||||
ContextCompressionEngine:
|
ContextCompressionEngine:
|
||||||
description: The compression engine to use. Defaults to "middle-out".
|
description: The compression engine to use. Defaults to "middle-out".
|
||||||
enum:
|
enum:
|
||||||
@@ -8299,6 +8539,24 @@ components:
|
|||||||
- video
|
- video
|
||||||
example: text
|
example: text
|
||||||
type: string
|
type: string
|
||||||
|
InputReference:
|
||||||
|
description: >-
|
||||||
|
A reference asset used to guide video generation. Image references are supported by all providers; audio and
|
||||||
|
video references are only honored by providers that support them (currently BytePlus Seedance 2.0).
|
||||||
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
audio_url: '#/components/schemas/ContentPartAudio'
|
||||||
|
image_url: '#/components/schemas/ContentPartImage'
|
||||||
|
video_url: '#/components/schemas/ContentPartVideo'
|
||||||
|
propertyName: type
|
||||||
|
example:
|
||||||
|
image_url:
|
||||||
|
url: https://example.com/image.png
|
||||||
|
type: image_url
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/ContentPartImage'
|
||||||
|
- $ref: '#/components/schemas/ContentPartAudio'
|
||||||
|
- $ref: '#/components/schemas/ContentPartVideo'
|
||||||
Inputs:
|
Inputs:
|
||||||
anyOf:
|
anyOf:
|
||||||
- type: string
|
- type: string
|
||||||
@@ -17452,6 +17710,7 @@ components:
|
|||||||
- $ref: '#/components/schemas/ShellServerTool'
|
- $ref: '#/components/schemas/ShellServerTool'
|
||||||
- $ref: '#/components/schemas/ApplyPatchServerTool'
|
- $ref: '#/components/schemas/ApplyPatchServerTool'
|
||||||
- $ref: '#/components/schemas/CustomTool'
|
- $ref: '#/components/schemas/CustomTool'
|
||||||
|
- $ref: '#/components/schemas/AdvisorServerTool_OpenRouter'
|
||||||
- $ref: '#/components/schemas/DatetimeServerTool'
|
- $ref: '#/components/schemas/DatetimeServerTool'
|
||||||
- $ref: '#/components/schemas/FusionServerTool_OpenRouter'
|
- $ref: '#/components/schemas/FusionServerTool_OpenRouter'
|
||||||
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
|
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
|
||||||
@@ -19051,9 +19310,12 @@ components:
|
|||||||
example: true
|
example: true
|
||||||
type: boolean
|
type: boolean
|
||||||
input_references:
|
input_references:
|
||||||
description: Reference images to guide video generation
|
description: >-
|
||||||
|
Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video
|
||||||
|
references are only honored by providers that support them (currently BytePlus Seedance 2.0); other
|
||||||
|
providers use image references and ignore the rest.
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ContentPartImage'
|
$ref: '#/components/schemas/InputReference'
|
||||||
type: array
|
type: array
|
||||||
model:
|
model:
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
Reference in New Issue
Block a user