mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-11 05:48:37 +08:00
chore: update OpenAPI spec from monorepo (#258)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
This commit is contained in:
co-authored by
OpenRouter SDK Bot
parent
59a8775ed7
commit
32c6c506cf
@@ -4414,6 +4414,8 @@ components:
|
|||||||
example:
|
example:
|
||||||
- |+
|
- |+
|
||||||
|
|
||||||
|
stop_server_tools_when:
|
||||||
|
$ref: '#/components/schemas/StopServerToolsWhen'
|
||||||
stream:
|
stream:
|
||||||
default: false
|
default: false
|
||||||
description: Enable streaming response
|
description: Enable streaming response
|
||||||
@@ -9831,6 +9833,8 @@ components:
|
|||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
type: array
|
type: array
|
||||||
|
stop_server_tools_when:
|
||||||
|
$ref: '#/components/schemas/StopServerToolsWhen'
|
||||||
stream:
|
stream:
|
||||||
type: boolean
|
type: boolean
|
||||||
system:
|
system:
|
||||||
@@ -16931,6 +16935,8 @@ components:
|
|||||||
precedence. Maximum of 256 characters.
|
precedence. Maximum of 256 characters.
|
||||||
maxLength: 256
|
maxLength: 256
|
||||||
type: string
|
type: string
|
||||||
|
stop_server_tools_when:
|
||||||
|
$ref: '#/components/schemas/StopServerToolsWhen'
|
||||||
store:
|
store:
|
||||||
const: false
|
const: false
|
||||||
default: false
|
default: false
|
||||||
@@ -17305,6 +17311,121 @@ components:
|
|||||||
- input
|
- input
|
||||||
- voice
|
- voice
|
||||||
type: object
|
type: object
|
||||||
|
StopServerToolsWhen:
|
||||||
|
description: >-
|
||||||
|
Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this
|
||||||
|
overrides `max_tool_calls`.
|
||||||
|
example:
|
||||||
|
- step_count: 5
|
||||||
|
type: step_count_is
|
||||||
|
- max_cost_in_dollars: 0.5
|
||||||
|
type: max_cost
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/StopServerToolsWhenCondition'
|
||||||
|
minItems: 1
|
||||||
|
type: array
|
||||||
|
StopServerToolsWhenCondition:
|
||||||
|
description: A single condition that, when met, halts the server-tool agent loop.
|
||||||
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
finish_reason_is: '#/components/schemas/StopServerToolsWhenFinishReasonIs'
|
||||||
|
has_tool_call: '#/components/schemas/StopServerToolsWhenHasToolCall'
|
||||||
|
max_cost: '#/components/schemas/StopServerToolsWhenMaxCost'
|
||||||
|
max_tokens_used: '#/components/schemas/StopServerToolsWhenMaxTokensUsed'
|
||||||
|
step_count_is: '#/components/schemas/StopServerToolsWhenStepCountIs'
|
||||||
|
propertyName: type
|
||||||
|
example:
|
||||||
|
step_count: 5
|
||||||
|
type: step_count_is
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/StopServerToolsWhenStepCountIs'
|
||||||
|
- $ref: '#/components/schemas/StopServerToolsWhenHasToolCall'
|
||||||
|
- $ref: '#/components/schemas/StopServerToolsWhenMaxTokensUsed'
|
||||||
|
- $ref: '#/components/schemas/StopServerToolsWhenMaxCost'
|
||||||
|
- $ref: '#/components/schemas/StopServerToolsWhenFinishReasonIs'
|
||||||
|
StopServerToolsWhenFinishReasonIs:
|
||||||
|
description: Stop when the upstream model emits this finish reason (e.g. `length`).
|
||||||
|
example:
|
||||||
|
reason: length
|
||||||
|
type: finish_reason_is
|
||||||
|
properties:
|
||||||
|
reason:
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
type:
|
||||||
|
enum:
|
||||||
|
- finish_reason_is
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- reason
|
||||||
|
type: object
|
||||||
|
StopServerToolsWhenHasToolCall:
|
||||||
|
description: Stop after a tool with this name has been called.
|
||||||
|
example:
|
||||||
|
tool_name: finalize
|
||||||
|
type: has_tool_call
|
||||||
|
properties:
|
||||||
|
tool_name:
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
type:
|
||||||
|
enum:
|
||||||
|
- has_tool_call
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- tool_name
|
||||||
|
type: object
|
||||||
|
StopServerToolsWhenMaxCost:
|
||||||
|
description: Stop once cumulative cost across the loop exceeds this dollar threshold.
|
||||||
|
example:
|
||||||
|
max_cost_in_dollars: 0.5
|
||||||
|
type: max_cost
|
||||||
|
properties:
|
||||||
|
max_cost_in_dollars:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type:
|
||||||
|
enum:
|
||||||
|
- max_cost
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- max_cost_in_dollars
|
||||||
|
type: object
|
||||||
|
StopServerToolsWhenMaxTokensUsed:
|
||||||
|
description: Stop once cumulative token usage across the loop exceeds this threshold.
|
||||||
|
example:
|
||||||
|
max_tokens: 10000
|
||||||
|
type: max_tokens_used
|
||||||
|
properties:
|
||||||
|
max_tokens:
|
||||||
|
type: integer
|
||||||
|
type:
|
||||||
|
enum:
|
||||||
|
- max_tokens_used
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- max_tokens
|
||||||
|
type: object
|
||||||
|
StopServerToolsWhenStepCountIs:
|
||||||
|
description: Stop after the agent loop has executed this many steps.
|
||||||
|
example:
|
||||||
|
step_count: 5
|
||||||
|
type: step_count_is
|
||||||
|
properties:
|
||||||
|
step_count:
|
||||||
|
type: integer
|
||||||
|
type:
|
||||||
|
enum:
|
||||||
|
- step_count_is
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- step_count
|
||||||
|
type: object
|
||||||
StoredPromptTemplate:
|
StoredPromptTemplate:
|
||||||
example:
|
example:
|
||||||
id: prompt-abc123
|
id: prompt-abc123
|
||||||
|
|||||||
Reference in New Issue
Block a user