mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-09-10 12:22:13 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13ef14abce | ||
|
|
a0a7edecfa | ||
|
|
4e84bb736b | ||
|
|
947e92e68d | ||
|
|
bdbd8becc2 | ||
|
|
6ef088e7c7 | ||
|
|
e4e5cc259a |
+139
-2
@@ -1057,6 +1057,33 @@ components:
|
|||||||
- type
|
- type
|
||||||
- data
|
- data
|
||||||
type: object
|
type: object
|
||||||
|
AnthropicRefusalStopDetails:
|
||||||
|
description: Structured information about a refusal
|
||||||
|
example:
|
||||||
|
category: cyber
|
||||||
|
explanation: The request was refused due to policy.
|
||||||
|
type: refusal
|
||||||
|
nullable: true
|
||||||
|
properties:
|
||||||
|
category:
|
||||||
|
enum:
|
||||||
|
- cyber
|
||||||
|
- bio
|
||||||
|
- null
|
||||||
|
nullable: true
|
||||||
|
type: string
|
||||||
|
explanation:
|
||||||
|
nullable: true
|
||||||
|
type: string
|
||||||
|
type:
|
||||||
|
enum:
|
||||||
|
- refusal
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- category
|
||||||
|
- explanation
|
||||||
|
type: object
|
||||||
AnthropicSearchResultBlockParam:
|
AnthropicSearchResultBlockParam:
|
||||||
example:
|
example:
|
||||||
content:
|
content:
|
||||||
@@ -2315,6 +2342,7 @@ components:
|
|||||||
id: msg_01XFDUDYJgAACzvnptvVoYEL
|
id: msg_01XFDUDYJgAACzvnptvVoYEL
|
||||||
model: claude-sonnet-4-5-20250929
|
model: claude-sonnet-4-5-20250929
|
||||||
role: assistant
|
role: assistant
|
||||||
|
stop_details: null
|
||||||
stop_reason: end_turn
|
stop_reason: end_turn
|
||||||
stop_sequence: null
|
stop_sequence: null
|
||||||
type: message
|
type: message
|
||||||
@@ -2338,6 +2366,8 @@ components:
|
|||||||
enum:
|
enum:
|
||||||
- assistant
|
- assistant
|
||||||
type: string
|
type: string
|
||||||
|
stop_details:
|
||||||
|
$ref: '#/components/schemas/AnthropicRefusalStopDetails'
|
||||||
stop_reason:
|
stop_reason:
|
||||||
$ref: '#/components/schemas/ORAnthropicStopReason'
|
$ref: '#/components/schemas/ORAnthropicStopReason'
|
||||||
stop_sequence:
|
stop_sequence:
|
||||||
@@ -2375,6 +2405,7 @@ components:
|
|||||||
- content
|
- content
|
||||||
- model
|
- model
|
||||||
- stop_reason
|
- stop_reason
|
||||||
|
- stop_details
|
||||||
- stop_sequence
|
- stop_sequence
|
||||||
- usage
|
- usage
|
||||||
type: object
|
type: object
|
||||||
@@ -4787,6 +4818,7 @@ components:
|
|||||||
- deepseek
|
- deepseek
|
||||||
description: A guardrail for limiting API usage
|
description: A guardrail for limiting API usage
|
||||||
enforce_zdr: false
|
enforce_zdr: false
|
||||||
|
ignored_models: null
|
||||||
ignored_providers: null
|
ignored_providers: null
|
||||||
limit_usd: 50
|
limit_usd: 50
|
||||||
name: My New Guardrail
|
name: My New Guardrail
|
||||||
@@ -4825,6 +4857,15 @@ components:
|
|||||||
example: false
|
example: false
|
||||||
nullable: true
|
nullable: true
|
||||||
type: boolean
|
type: boolean
|
||||||
|
ignored_models:
|
||||||
|
description: Array of model identifiers to exclude from routing (slug or canonical_slug accepted)
|
||||||
|
example:
|
||||||
|
- openai/gpt-4o-mini
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
minItems: 1
|
||||||
|
nullable: true
|
||||||
|
type: array
|
||||||
ignored_providers:
|
ignored_providers:
|
||||||
description: List of provider IDs to exclude from routing
|
description: List of provider IDs to exclude from routing
|
||||||
example:
|
example:
|
||||||
@@ -4862,6 +4903,7 @@ components:
|
|||||||
description: A guardrail for limiting API usage
|
description: A guardrail for limiting API usage
|
||||||
enforce_zdr: false
|
enforce_zdr: false
|
||||||
id: 550e8400-e29b-41d4-a716-446655440000
|
id: 550e8400-e29b-41d4-a716-446655440000
|
||||||
|
ignored_models: null
|
||||||
ignored_providers: null
|
ignored_providers: null
|
||||||
limit_usd: 50
|
limit_usd: 50
|
||||||
name: My New Guardrail
|
name: My New Guardrail
|
||||||
@@ -5385,6 +5427,24 @@ components:
|
|||||||
required:
|
required:
|
||||||
- type
|
- type
|
||||||
type: object
|
type: object
|
||||||
|
FrameImage:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/ContentPartImage'
|
||||||
|
- properties:
|
||||||
|
frame_type:
|
||||||
|
description: Whether this image represents the first or last frame of the video
|
||||||
|
enum:
|
||||||
|
- first_frame
|
||||||
|
- last_frame
|
||||||
|
example: first_frame
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- frame_type
|
||||||
|
type: object
|
||||||
|
example:
|
||||||
|
image_url:
|
||||||
|
url: https://example.com/image.png
|
||||||
|
type: image_url
|
||||||
FunctionCallArgsDeltaEvent:
|
FunctionCallArgsDeltaEvent:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/BaseFunctionCallArgsDeltaEvent'
|
- $ref: '#/components/schemas/BaseFunctionCallArgsDeltaEvent'
|
||||||
@@ -5508,6 +5568,7 @@ components:
|
|||||||
description: Guardrail for production environment
|
description: Guardrail for production environment
|
||||||
enforce_zdr: false
|
enforce_zdr: false
|
||||||
id: 550e8400-e29b-41d4-a716-446655440000
|
id: 550e8400-e29b-41d4-a716-446655440000
|
||||||
|
ignored_models: null
|
||||||
ignored_providers: null
|
ignored_providers: null
|
||||||
limit_usd: 100
|
limit_usd: 100
|
||||||
name: Production Guardrail
|
name: Production Guardrail
|
||||||
@@ -5570,6 +5631,7 @@ components:
|
|||||||
description: Guardrail for production environment
|
description: Guardrail for production environment
|
||||||
enforce_zdr: false
|
enforce_zdr: false
|
||||||
id: 550e8400-e29b-41d4-a716-446655440000
|
id: 550e8400-e29b-41d4-a716-446655440000
|
||||||
|
ignored_models: null
|
||||||
ignored_providers: null
|
ignored_providers: null
|
||||||
limit_usd: 100
|
limit_usd: 100
|
||||||
name: Production Guardrail
|
name: Production Guardrail
|
||||||
@@ -5615,6 +5677,14 @@ components:
|
|||||||
example: 550e8400-e29b-41d4-a716-446655440000
|
example: 550e8400-e29b-41d4-a716-446655440000
|
||||||
format: uuid
|
format: uuid
|
||||||
type: string
|
type: string
|
||||||
|
ignored_models:
|
||||||
|
description: Array of model canonical_slugs to exclude from routing
|
||||||
|
example:
|
||||||
|
- openai/gpt-4o-mini-2024-07-18
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
type: array
|
||||||
ignored_providers:
|
ignored_providers:
|
||||||
description: List of provider IDs to exclude from routing
|
description: List of provider IDs to exclude from routing
|
||||||
example:
|
example:
|
||||||
@@ -6377,6 +6447,7 @@ components:
|
|||||||
description: Guardrail for production environment
|
description: Guardrail for production environment
|
||||||
enforce_zdr: false
|
enforce_zdr: false
|
||||||
id: 550e8400-e29b-41d4-a716-446655440000
|
id: 550e8400-e29b-41d4-a716-446655440000
|
||||||
|
ignored_models: null
|
||||||
ignored_providers: null
|
ignored_providers: null
|
||||||
limit_usd: 100
|
limit_usd: 100
|
||||||
name: Production Guardrail
|
name: Production Guardrail
|
||||||
@@ -6737,6 +6808,7 @@ components:
|
|||||||
description: Event sent when the message metadata changes (e.g., stop_reason)
|
description: Event sent when the message metadata changes (e.g., stop_reason)
|
||||||
example:
|
example:
|
||||||
delta:
|
delta:
|
||||||
|
stop_details: null
|
||||||
stop_reason: end_turn
|
stop_reason: end_turn
|
||||||
stop_sequence: null
|
stop_sequence: null
|
||||||
type: message_delta
|
type: message_delta
|
||||||
@@ -6747,6 +6819,8 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
container:
|
container:
|
||||||
$ref: '#/components/schemas/AnthropicContainer'
|
$ref: '#/components/schemas/AnthropicContainer'
|
||||||
|
stop_details:
|
||||||
|
$ref: '#/components/schemas/AnthropicRefusalStopDetails'
|
||||||
stop_reason:
|
stop_reason:
|
||||||
$ref: '#/components/schemas/ORAnthropicStopReason'
|
$ref: '#/components/schemas/ORAnthropicStopReason'
|
||||||
stop_sequence:
|
stop_sequence:
|
||||||
@@ -6754,6 +6828,7 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- container
|
- container
|
||||||
|
- stop_details
|
||||||
- stop_reason
|
- stop_reason
|
||||||
- stop_sequence
|
- stop_sequence
|
||||||
type: object
|
type: object
|
||||||
@@ -7537,6 +7612,7 @@ components:
|
|||||||
id: msg_01XFDUDYJgAACzvnptvVoYEL
|
id: msg_01XFDUDYJgAACzvnptvVoYEL
|
||||||
model: claude-sonnet-4-5-20250929
|
model: claude-sonnet-4-5-20250929
|
||||||
role: assistant
|
role: assistant
|
||||||
|
stop_details: null
|
||||||
stop_reason: end_turn
|
stop_reason: end_turn
|
||||||
stop_sequence: null
|
stop_sequence: null
|
||||||
type: message
|
type: message
|
||||||
@@ -7557,6 +7633,7 @@ components:
|
|||||||
id: msg_01XFDUDYJgAACzvnptvVoYEL
|
id: msg_01XFDUDYJgAACzvnptvVoYEL
|
||||||
model: claude-sonnet-4-5-20250929
|
model: claude-sonnet-4-5-20250929
|
||||||
role: assistant
|
role: assistant
|
||||||
|
stop_details: null
|
||||||
stop_reason: null
|
stop_reason: null
|
||||||
stop_sequence: null
|
stop_sequence: null
|
||||||
type: message
|
type: message
|
||||||
@@ -7688,6 +7765,8 @@ components:
|
|||||||
enum:
|
enum:
|
||||||
- assistant
|
- assistant
|
||||||
type: string
|
type: string
|
||||||
|
stop_details:
|
||||||
|
$ref: '#/components/schemas/AnthropicRefusalStopDetails'
|
||||||
stop_reason:
|
stop_reason:
|
||||||
nullable: true
|
nullable: true
|
||||||
stop_sequence:
|
stop_sequence:
|
||||||
@@ -7724,6 +7803,7 @@ components:
|
|||||||
- content
|
- content
|
||||||
- model
|
- model
|
||||||
- stop_reason
|
- stop_reason
|
||||||
|
- stop_details
|
||||||
- stop_sequence
|
- stop_sequence
|
||||||
- usage
|
- usage
|
||||||
type: object
|
type: object
|
||||||
@@ -11968,6 +12048,15 @@ components:
|
|||||||
example: true
|
example: true
|
||||||
nullable: true
|
nullable: true
|
||||||
type: boolean
|
type: boolean
|
||||||
|
ignored_models:
|
||||||
|
description: Array of model identifiers to exclude from routing (slug or canonical_slug accepted)
|
||||||
|
example:
|
||||||
|
- openai/gpt-4o-mini
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
minItems: 1
|
||||||
|
nullable: true
|
||||||
|
type: array
|
||||||
ignored_providers:
|
ignored_providers:
|
||||||
description: List of provider IDs to exclude from routing
|
description: List of provider IDs to exclude from routing
|
||||||
example:
|
example:
|
||||||
@@ -12001,6 +12090,7 @@ components:
|
|||||||
description: Updated description
|
description: Updated description
|
||||||
enforce_zdr: true
|
enforce_zdr: true
|
||||||
id: 550e8400-e29b-41d4-a716-446655440000
|
id: 550e8400-e29b-41d4-a716-446655440000
|
||||||
|
ignored_models: null
|
||||||
ignored_providers: null
|
ignored_providers: null
|
||||||
limit_usd: 75
|
limit_usd: 75
|
||||||
name: Updated Guardrail Name
|
name: Updated Guardrail Name
|
||||||
@@ -12109,10 +12199,17 @@ components:
|
|||||||
exclusiveMinimum: true
|
exclusiveMinimum: true
|
||||||
minimum: 0
|
minimum: 0
|
||||||
type: integer
|
type: integer
|
||||||
|
frame_images:
|
||||||
|
description: >-
|
||||||
|
Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of
|
||||||
|
first_frame or last_frame.
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/FrameImage'
|
||||||
|
type: array
|
||||||
generate_audio:
|
generate_audio:
|
||||||
description: >-
|
description: >-
|
||||||
Whether to generate audio alongside the video. Defaults to true for models that support audio output, false
|
Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag,
|
||||||
otherwise.
|
false if not set.
|
||||||
example: true
|
example: true
|
||||||
type: boolean
|
type: boolean
|
||||||
input_references:
|
input_references:
|
||||||
@@ -12636,15 +12733,20 @@ components:
|
|||||||
canonical_slug: google/veo-3.1
|
canonical_slug: google/veo-3.1
|
||||||
created: 1700000000
|
created: 1700000000
|
||||||
description: Google video generation model
|
description: Google video generation model
|
||||||
|
generate_audio: true
|
||||||
id: google/veo-3.1
|
id: google/veo-3.1
|
||||||
name: Veo 3.1
|
name: Veo 3.1
|
||||||
pricing_skus:
|
pricing_skus:
|
||||||
generate: '0.50'
|
generate: '0.50'
|
||||||
|
seed: null
|
||||||
supported_aspect_ratios:
|
supported_aspect_ratios:
|
||||||
- '16:9'
|
- '16:9'
|
||||||
supported_durations:
|
supported_durations:
|
||||||
- 5
|
- 5
|
||||||
- 8
|
- 8
|
||||||
|
supported_frame_images:
|
||||||
|
- first_frame
|
||||||
|
- last_frame
|
||||||
supported_resolutions:
|
supported_resolutions:
|
||||||
- 720p
|
- 720p
|
||||||
supported_sizes: null
|
supported_sizes: null
|
||||||
@@ -12666,6 +12768,10 @@ components:
|
|||||||
description: Description of the model
|
description: Description of the model
|
||||||
example: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.
|
example: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.
|
||||||
type: string
|
type: string
|
||||||
|
generate_audio:
|
||||||
|
description: Whether the model supports generating audio alongside video
|
||||||
|
nullable: true
|
||||||
|
type: boolean
|
||||||
hugging_face_id:
|
hugging_face_id:
|
||||||
description: Hugging Face model identifier, if applicable
|
description: Hugging Face model identifier, if applicable
|
||||||
example: microsoft/DialoGPT-medium
|
example: microsoft/DialoGPT-medium
|
||||||
@@ -12685,6 +12791,10 @@ components:
|
|||||||
description: Pricing SKUs with provider prefix stripped, values as strings
|
description: Pricing SKUs with provider prefix stripped, values as strings
|
||||||
nullable: true
|
nullable: true
|
||||||
type: object
|
type: object
|
||||||
|
seed:
|
||||||
|
description: Whether the model supports deterministic generation via seed parameter
|
||||||
|
nullable: true
|
||||||
|
type: boolean
|
||||||
supported_aspect_ratios:
|
supported_aspect_ratios:
|
||||||
description: Supported output aspect ratios
|
description: Supported output aspect ratios
|
||||||
items:
|
items:
|
||||||
@@ -12705,6 +12815,15 @@ components:
|
|||||||
type: integer
|
type: integer
|
||||||
nullable: true
|
nullable: true
|
||||||
type: array
|
type: array
|
||||||
|
supported_frame_images:
|
||||||
|
description: Supported frame image types (e.g. first_frame, last_frame)
|
||||||
|
items:
|
||||||
|
enum:
|
||||||
|
- first_frame
|
||||||
|
- last_frame
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
type: array
|
||||||
supported_resolutions:
|
supported_resolutions:
|
||||||
description: Supported output resolutions
|
description: Supported output resolutions
|
||||||
items:
|
items:
|
||||||
@@ -12762,6 +12881,9 @@ components:
|
|||||||
- supported_aspect_ratios
|
- supported_aspect_ratios
|
||||||
- supported_sizes
|
- supported_sizes
|
||||||
- supported_durations
|
- supported_durations
|
||||||
|
- supported_frame_images
|
||||||
|
- generate_audio
|
||||||
|
- seed
|
||||||
- allowed_passthrough_parameters
|
- allowed_passthrough_parameters
|
||||||
type: object
|
type: object
|
||||||
VideoModelsListResponse:
|
VideoModelsListResponse:
|
||||||
@@ -12771,15 +12893,20 @@ components:
|
|||||||
canonical_slug: google/veo-3.1
|
canonical_slug: google/veo-3.1
|
||||||
created: 1700000000
|
created: 1700000000
|
||||||
description: Google video generation model
|
description: Google video generation model
|
||||||
|
generate_audio: true
|
||||||
id: google/veo-3.1
|
id: google/veo-3.1
|
||||||
name: Veo 3.1
|
name: Veo 3.1
|
||||||
pricing_skus:
|
pricing_skus:
|
||||||
generate: '0.50'
|
generate: '0.50'
|
||||||
|
seed: null
|
||||||
supported_aspect_ratios:
|
supported_aspect_ratios:
|
||||||
- '16:9'
|
- '16:9'
|
||||||
supported_durations:
|
supported_durations:
|
||||||
- 5
|
- 5
|
||||||
- 8
|
- 8
|
||||||
|
supported_frame_images:
|
||||||
|
- first_frame
|
||||||
|
- last_frame
|
||||||
supported_resolutions:
|
supported_resolutions:
|
||||||
- 720p
|
- 720p
|
||||||
supported_sizes: null
|
supported_sizes: null
|
||||||
@@ -14662,6 +14789,7 @@ paths:
|
|||||||
description: Guardrail for production environment
|
description: Guardrail for production environment
|
||||||
enforce_zdr: false
|
enforce_zdr: false
|
||||||
id: 550e8400-e29b-41d4-a716-446655440000
|
id: 550e8400-e29b-41d4-a716-446655440000
|
||||||
|
ignored_models: null
|
||||||
ignored_providers: null
|
ignored_providers: null
|
||||||
limit_usd: 100
|
limit_usd: 100
|
||||||
name: Production Guardrail
|
name: Production Guardrail
|
||||||
@@ -14722,6 +14850,7 @@ paths:
|
|||||||
- deepseek
|
- deepseek
|
||||||
description: A guardrail for limiting API usage
|
description: A guardrail for limiting API usage
|
||||||
enforce_zdr: false
|
enforce_zdr: false
|
||||||
|
ignored_models: null
|
||||||
ignored_providers: null
|
ignored_providers: null
|
||||||
limit_usd: 50
|
limit_usd: 50
|
||||||
name: My New Guardrail
|
name: My New Guardrail
|
||||||
@@ -14744,6 +14873,7 @@ paths:
|
|||||||
description: A guardrail for limiting API usage
|
description: A guardrail for limiting API usage
|
||||||
enforce_zdr: false
|
enforce_zdr: false
|
||||||
id: 550e8400-e29b-41d4-a716-446655440000
|
id: 550e8400-e29b-41d4-a716-446655440000
|
||||||
|
ignored_models: null
|
||||||
ignored_providers: null
|
ignored_providers: null
|
||||||
limit_usd: 50
|
limit_usd: 50
|
||||||
name: My New Guardrail
|
name: My New Guardrail
|
||||||
@@ -14871,6 +15001,7 @@ paths:
|
|||||||
description: Guardrail for production environment
|
description: Guardrail for production environment
|
||||||
enforce_zdr: false
|
enforce_zdr: false
|
||||||
id: 550e8400-e29b-41d4-a716-446655440000
|
id: 550e8400-e29b-41d4-a716-446655440000
|
||||||
|
ignored_models: null
|
||||||
ignored_providers: null
|
ignored_providers: null
|
||||||
limit_usd: 100
|
limit_usd: 100
|
||||||
name: Production Guardrail
|
name: Production Guardrail
|
||||||
@@ -14950,6 +15081,7 @@ paths:
|
|||||||
description: Updated description
|
description: Updated description
|
||||||
enforce_zdr: true
|
enforce_zdr: true
|
||||||
id: 550e8400-e29b-41d4-a716-446655440000
|
id: 550e8400-e29b-41d4-a716-446655440000
|
||||||
|
ignored_models: null
|
||||||
ignored_providers: null
|
ignored_providers: null
|
||||||
limit_usd: 75
|
limit_usd: 75
|
||||||
name: Updated Guardrail Name
|
name: Updated Guardrail Name
|
||||||
@@ -19085,15 +19217,20 @@ paths:
|
|||||||
canonical_slug: google/veo-3.1
|
canonical_slug: google/veo-3.1
|
||||||
created: 1700000000
|
created: 1700000000
|
||||||
description: Google video generation model
|
description: Google video generation model
|
||||||
|
generate_audio: true
|
||||||
id: google/veo-3.1
|
id: google/veo-3.1
|
||||||
name: Veo 3.1
|
name: Veo 3.1
|
||||||
pricing_skus:
|
pricing_skus:
|
||||||
generate: '0.50'
|
generate: '0.50'
|
||||||
|
seed: null
|
||||||
supported_aspect_ratios:
|
supported_aspect_ratios:
|
||||||
- '16:9'
|
- '16:9'
|
||||||
supported_durations:
|
supported_durations:
|
||||||
- 5
|
- 5
|
||||||
- 8
|
- 8
|
||||||
|
supported_frame_images:
|
||||||
|
- first_frame
|
||||||
|
- last_frame
|
||||||
supported_resolutions:
|
supported_resolutions:
|
||||||
- 720p
|
- 720p
|
||||||
supported_sizes: null
|
supported_sizes: null
|
||||||
|
|||||||
Reference in New Issue
Block a user