mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-14 12:30:14 +08:00
chore: regenerate Python SDK with updated OpenAPI spec
Updates include: - Updated OpenAPI spec with new component schemas - Restructured component documentation with nested parameter types - Added new components for plugin and provider configurations - Updated chat generation params and response request structures - Version bump and dependency updates
This commit is contained in:
+31
-13
@@ -1,12 +1,12 @@
|
||||
lockVersion: 2.0.0
|
||||
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
|
||||
management:
|
||||
docChecksum: 01481f11e87a18cf1daa583fee2c88fb
|
||||
docChecksum: e929ecf569d79ab96a315332a4855566
|
||||
docVersion: 1.0.0
|
||||
speakeasyVersion: 1.666.0
|
||||
generationVersion: 2.768.0
|
||||
releaseVersion: 0.0.21
|
||||
configChecksum: 52c13d7fdf159611bf5d900363e322ac
|
||||
releaseVersion: 0.0.22
|
||||
configChecksum: 0afda3910a58a8d797ac6674fa858711
|
||||
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||
published: true
|
||||
@@ -58,10 +58,22 @@ generatedFiles:
|
||||
- docs/components/chatcompletionfinishreason.md
|
||||
- docs/components/chaterrorerror.md
|
||||
- docs/components/chatgenerationparams.md
|
||||
- docs/components/chatgenerationparamsdatacollection.md
|
||||
- docs/components/chatgenerationparamsengine.md
|
||||
- docs/components/chatgenerationparamsmaxprice.md
|
||||
- docs/components/chatgenerationparamspdf.md
|
||||
- docs/components/chatgenerationparamspdfengine.md
|
||||
- docs/components/chatgenerationparamspluginfileparser.md
|
||||
- docs/components/chatgenerationparamspluginmoderation.md
|
||||
- docs/components/chatgenerationparamspluginresponsehealing.md
|
||||
- docs/components/chatgenerationparamspluginunion.md
|
||||
- docs/components/chatgenerationparamspluginweb.md
|
||||
- docs/components/chatgenerationparamsprovider.md
|
||||
- docs/components/chatgenerationparamsresponseformatjsonobject.md
|
||||
- docs/components/chatgenerationparamsresponseformatpython.md
|
||||
- docs/components/chatgenerationparamsresponseformattext.md
|
||||
- docs/components/chatgenerationparamsresponseformatunion.md
|
||||
- docs/components/chatgenerationparamsroute.md
|
||||
- docs/components/chatgenerationparamsstop.md
|
||||
- docs/components/chatgenerationtokenusage.md
|
||||
- docs/components/chatmessagecontentitem.md
|
||||
@@ -111,7 +123,6 @@ generatedFiles:
|
||||
- docs/components/edgenetworktimeoutresponseerrordata.md
|
||||
- docs/components/effort.md
|
||||
- docs/components/endpointstatus.md
|
||||
- docs/components/engine.md
|
||||
- docs/components/filecitation.md
|
||||
- docs/components/filecitationtype.md
|
||||
- docs/components/filepath.md
|
||||
@@ -130,7 +141,6 @@ generatedFiles:
|
||||
- docs/components/internalserverresponseerrordata.md
|
||||
- docs/components/jsonschemaconfig.md
|
||||
- docs/components/listendpointsresponse.md
|
||||
- docs/components/maxprice.md
|
||||
- docs/components/message.md
|
||||
- docs/components/messagecontent.md
|
||||
- docs/components/messagedeveloper.md
|
||||
@@ -244,6 +254,17 @@ generatedFiles:
|
||||
- docs/components/openresponsesreasoningsummarytextdoneeventtype.md
|
||||
- docs/components/openresponsesreasoningtype.md
|
||||
- docs/components/openresponsesrequest.md
|
||||
- docs/components/openresponsesrequestengine.md
|
||||
- docs/components/openresponsesrequestmaxprice.md
|
||||
- docs/components/openresponsesrequestpdf.md
|
||||
- docs/components/openresponsesrequestpdfengine.md
|
||||
- docs/components/openresponsesrequestpluginfileparser.md
|
||||
- docs/components/openresponsesrequestpluginmoderation.md
|
||||
- docs/components/openresponsesrequestpluginresponsehealing.md
|
||||
- docs/components/openresponsesrequestpluginunion.md
|
||||
- docs/components/openresponsesrequestpluginweb.md
|
||||
- docs/components/openresponsesrequestprovider.md
|
||||
- docs/components/openresponsesrequestroute.md
|
||||
- docs/components/openresponsesrequesttoolfunction.md
|
||||
- docs/components/openresponsesrequesttoolunion.md
|
||||
- docs/components/openresponsesrequesttype.md
|
||||
@@ -297,18 +318,10 @@ generatedFiles:
|
||||
- docs/components/part2.md
|
||||
- docs/components/payloadtoolargeresponseerrordata.md
|
||||
- docs/components/paymentrequiredresponseerrordata.md
|
||||
- docs/components/pdf.md
|
||||
- docs/components/pdfengine.md
|
||||
- docs/components/perrequestlimits.md
|
||||
- docs/components/plugin.md
|
||||
- docs/components/pluginfileparser.md
|
||||
- docs/components/pluginmoderation.md
|
||||
- docs/components/pluginresponsehealing.md
|
||||
- docs/components/pluginweb.md
|
||||
- docs/components/pricing.md
|
||||
- docs/components/prompt.md
|
||||
- docs/components/prompttokensdetails.md
|
||||
- docs/components/provider.md
|
||||
- docs/components/providername.md
|
||||
- docs/components/provideroverloadedresponseerrordata.md
|
||||
- docs/components/providersort.md
|
||||
@@ -316,6 +329,7 @@ generatedFiles:
|
||||
- docs/components/publicendpointquantization.md
|
||||
- docs/components/publicpricing.md
|
||||
- docs/components/quantization.md
|
||||
- docs/components/quantizations.md
|
||||
- docs/components/reason.md
|
||||
- docs/components/reasoning.md
|
||||
- docs/components/reasoningsummarytext.md
|
||||
@@ -379,9 +393,12 @@ generatedFiles:
|
||||
- docs/components/responseswebsearchuserlocationtype.md
|
||||
- docs/components/responsetextconfig.md
|
||||
- docs/components/responsetextconfigverbosity.md
|
||||
- docs/components/schema0.md
|
||||
- docs/components/schema0enum.md
|
||||
- docs/components/security.md
|
||||
- docs/components/servicetier.md
|
||||
- docs/components/serviceunavailableresponseerrordata.md
|
||||
- docs/components/sort.md
|
||||
- docs/components/streamoptions.md
|
||||
- docs/components/systemmessage.md
|
||||
- docs/components/systemmessagecontent.md
|
||||
@@ -552,6 +569,7 @@ generatedFiles:
|
||||
- src/openrouter/chat.py
|
||||
- src/openrouter/completions.py
|
||||
- src/openrouter/components/__init__.py
|
||||
- src/openrouter/components/_schema0.py
|
||||
- src/openrouter/components/activityitem.py
|
||||
- src/openrouter/components/assistantmessage.py
|
||||
- src/openrouter/components/badgatewayresponseerrordata.py
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ generation:
|
||||
skipResponseBodyAssertions: false
|
||||
preApplyUnionDiscriminators: true
|
||||
python:
|
||||
version: 0.0.21
|
||||
version: 0.0.22
|
||||
additionalDependencies:
|
||||
dev: {}
|
||||
main: {}
|
||||
|
||||
+345
-12
@@ -1054,6 +1054,7 @@ components:
|
||||
type: string
|
||||
nullable: true
|
||||
enum:
|
||||
- xhigh
|
||||
- high
|
||||
- medium
|
||||
- low
|
||||
@@ -3479,6 +3480,7 @@ components:
|
||||
- Infermatic
|
||||
- Inflection
|
||||
- Liquid
|
||||
- Mara
|
||||
- Mancer 2
|
||||
- Minimax
|
||||
- ModelRun
|
||||
@@ -3507,6 +3509,7 @@ components:
|
||||
- Together
|
||||
- Venice
|
||||
- WandB
|
||||
- Xiaomi
|
||||
- xAI
|
||||
- Z.AI
|
||||
- FakeProvider
|
||||
@@ -3536,12 +3539,8 @@ components:
|
||||
performed.
|
||||
example: price
|
||||
BigNumberUnion:
|
||||
anyOf:
|
||||
- type: number
|
||||
- type: string
|
||||
- type: number
|
||||
example: 1000
|
||||
description: A value in string or number format that is a large number
|
||||
type: string
|
||||
description: A value in string format that is a large number
|
||||
example: 1000
|
||||
OpenResponsesRequest:
|
||||
type: object
|
||||
@@ -3736,10 +3735,23 @@ components:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
request:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
additionalProperties: false
|
||||
description: >-
|
||||
The object specifying the maximum price you want to pay for this request. USD price per million tokens,
|
||||
for prompt and completion.
|
||||
min_throughput:
|
||||
type: number
|
||||
nullable: true
|
||||
example: 100
|
||||
description: >-
|
||||
The minimum throughput (in tokens per second) required for this request. Only providers serving the
|
||||
model with at least this throughput will be used.
|
||||
max_latency:
|
||||
type: number
|
||||
nullable: true
|
||||
example: 5
|
||||
description: >-
|
||||
The maximum latency (in seconds) allowed for this request. Only providers serving the model with better
|
||||
than this latency will be used.
|
||||
additionalProperties: false
|
||||
description: When multiple model providers are available, optionally indicate your routing preference.
|
||||
plugins:
|
||||
@@ -3760,6 +3772,9 @@ components:
|
||||
type: string
|
||||
enum:
|
||||
- web
|
||||
enabled:
|
||||
type: boolean
|
||||
description: Set to false to disable the web-search plugin for this request. Defaults to true.
|
||||
max_results:
|
||||
type: number
|
||||
search_prompt:
|
||||
@@ -3777,6 +3792,9 @@ components:
|
||||
type: string
|
||||
enum:
|
||||
- file-parser
|
||||
enabled:
|
||||
type: boolean
|
||||
description: Set to false to disable the file-parser plugin for this request. Defaults to true.
|
||||
max_files:
|
||||
type: number
|
||||
pdf:
|
||||
@@ -3796,9 +3814,21 @@ components:
|
||||
type: string
|
||||
enum:
|
||||
- response-healing
|
||||
enabled:
|
||||
type: boolean
|
||||
description: Set to false to disable the response-healing plugin for this request. Defaults to true.
|
||||
required:
|
||||
- id
|
||||
description: Plugins you want to enable for this request, including their settings.
|
||||
route:
|
||||
type: string
|
||||
nullable: true
|
||||
enum:
|
||||
- fallback
|
||||
- sort
|
||||
description: >-
|
||||
Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts
|
||||
all endpoints together by routing criteria.
|
||||
user:
|
||||
type: string
|
||||
maxLength: 128
|
||||
@@ -4594,6 +4624,87 @@ components:
|
||||
uptime_last_30m: 99.5
|
||||
supports_implicit_caching: true
|
||||
__schema0:
|
||||
type: array
|
||||
items:
|
||||
anyOf:
|
||||
- type: string
|
||||
enum:
|
||||
- AI21
|
||||
- AionLabs
|
||||
- Alibaba
|
||||
- Amazon Bedrock
|
||||
- Amazon Nova
|
||||
- Anthropic
|
||||
- Arcee AI
|
||||
- AtlasCloud
|
||||
- Avian
|
||||
- Azure
|
||||
- BaseTen
|
||||
- BytePlus
|
||||
- Black Forest Labs
|
||||
- Cerebras
|
||||
- Chutes
|
||||
- Cirrascale
|
||||
- Clarifai
|
||||
- Cloudflare
|
||||
- Cohere
|
||||
- Crusoe
|
||||
- DeepInfra
|
||||
- DeepSeek
|
||||
- Featherless
|
||||
- Fireworks
|
||||
- Friendli
|
||||
- GMICloud
|
||||
- GoPomelo
|
||||
- Google
|
||||
- Google AI Studio
|
||||
- Groq
|
||||
- Hyperbolic
|
||||
- Inception
|
||||
- InferenceNet
|
||||
- Infermatic
|
||||
- Inflection
|
||||
- Liquid
|
||||
- Mara
|
||||
- Mancer 2
|
||||
- Minimax
|
||||
- ModelRun
|
||||
- Mistral
|
||||
- Modular
|
||||
- Moonshot AI
|
||||
- Morph
|
||||
- NCompass
|
||||
- Nebius
|
||||
- NextBit
|
||||
- Novita
|
||||
- Nvidia
|
||||
- OpenAI
|
||||
- OpenInference
|
||||
- Parasail
|
||||
- Perplexity
|
||||
- Phala
|
||||
- Relace
|
||||
- SambaNova
|
||||
- SiliconFlow
|
||||
- Sourceful
|
||||
- Stealth
|
||||
- StreamLake
|
||||
- Switchpoint
|
||||
- Targon
|
||||
- Together
|
||||
- Venice
|
||||
- WandB
|
||||
- Xiaomi
|
||||
- xAI
|
||||
- Z.AI
|
||||
- FakeProvider
|
||||
- type: string
|
||||
__schema1:
|
||||
anyOf:
|
||||
- type: number
|
||||
- type: string
|
||||
- type: number
|
||||
__schema2:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ChatCompletionFinishReason'
|
||||
- type: 'null'
|
||||
@@ -5051,6 +5162,214 @@ components:
|
||||
ChatGenerationParams:
|
||||
type: object
|
||||
properties:
|
||||
provider:
|
||||
description: When multiple model providers are available, optionally indicate your routing preference.
|
||||
anyOf:
|
||||
- type: object
|
||||
properties:
|
||||
allow_fallbacks:
|
||||
description: >
|
||||
Whether to allow backup providers to serve requests
|
||||
|
||||
- true: (default) when the primary provider (or your custom providers in "order") is unavailable,
|
||||
use the next best provider.
|
||||
|
||||
- false: use only the primary/custom provider, and return the upstream error if it's unavailable.
|
||||
anyOf:
|
||||
- type: boolean
|
||||
- type: 'null'
|
||||
require_parameters:
|
||||
description: >-
|
||||
Whether to filter providers to only those that support the parameters you've provided. If this
|
||||
setting is omitted or set to false, then providers will receive only the parameters they support,
|
||||
and ignore the rest.
|
||||
anyOf:
|
||||
- type: boolean
|
||||
- type: 'null'
|
||||
data_collection:
|
||||
description: >-
|
||||
Data collection setting. If no available model provider meets the requirement, your request will
|
||||
return an error.
|
||||
|
||||
- allow: (default) allow providers which store user data non-transiently and may train on it
|
||||
|
||||
|
||||
- deny: use only providers which do not collect user data.
|
||||
anyOf:
|
||||
- type: string
|
||||
enum:
|
||||
- deny
|
||||
- allow
|
||||
- type: 'null'
|
||||
zdr:
|
||||
anyOf:
|
||||
- type: boolean
|
||||
- type: 'null'
|
||||
enforce_distillable_text:
|
||||
anyOf:
|
||||
- type: boolean
|
||||
- type: 'null'
|
||||
order:
|
||||
description: >-
|
||||
An ordered list of provider slugs. The router will attempt to use the first provider in the subset
|
||||
of this list that supports your requested model, and fall back to the next if it is unavailable. If
|
||||
no providers are available, the request will fail with an error message.
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/__schema0'
|
||||
- type: 'null'
|
||||
only:
|
||||
description: >-
|
||||
List of provider slugs to allow. If provided, this list is merged with your account-wide allowed
|
||||
provider settings for this request.
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/__schema0'
|
||||
- type: 'null'
|
||||
ignore:
|
||||
description: >-
|
||||
List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored
|
||||
provider settings for this request.
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/__schema0'
|
||||
- type: 'null'
|
||||
quantizations:
|
||||
description: A list of quantization levels to filter the provider by.
|
||||
anyOf:
|
||||
- type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- int4
|
||||
- int8
|
||||
- fp4
|
||||
- fp6
|
||||
- fp8
|
||||
- fp16
|
||||
- bf16
|
||||
- fp32
|
||||
- unknown
|
||||
- type: 'null'
|
||||
sort:
|
||||
description: >-
|
||||
The sorting strategy to use for this request, if "order" is not specified. When set, no load
|
||||
balancing is performed.
|
||||
anyOf:
|
||||
- type: string
|
||||
enum:
|
||||
- price
|
||||
- throughput
|
||||
- latency
|
||||
- type: 'null'
|
||||
max_price:
|
||||
description: >-
|
||||
The object specifying the maximum price you want to pay for this request. USD price per million
|
||||
tokens, for prompt and completion.
|
||||
type: object
|
||||
properties:
|
||||
prompt:
|
||||
$ref: '#/components/schemas/__schema1'
|
||||
completion:
|
||||
$ref: '#/components/schemas/__schema1'
|
||||
image:
|
||||
$ref: '#/components/schemas/__schema1'
|
||||
audio:
|
||||
$ref: '#/components/schemas/__schema1'
|
||||
request:
|
||||
$ref: '#/components/schemas/__schema1'
|
||||
min_throughput:
|
||||
description: >-
|
||||
The minimum throughput (in tokens per second) required for this request. Only providers serving the
|
||||
model with at least this throughput will be used.
|
||||
anyOf:
|
||||
- type: number
|
||||
- type: 'null'
|
||||
max_latency:
|
||||
description: >-
|
||||
The maximum latency (in seconds) allowed for this request. Only providers serving the model with
|
||||
better than this latency will be used.
|
||||
anyOf:
|
||||
- type: number
|
||||
- type: 'null'
|
||||
additionalProperties: false
|
||||
- type: 'null'
|
||||
plugins:
|
||||
description: Plugins you want to enable for this request, including their settings.
|
||||
type: array
|
||||
items:
|
||||
oneOf:
|
||||
- type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
const: moderation
|
||||
required:
|
||||
- id
|
||||
- type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
const: web
|
||||
enabled:
|
||||
type: boolean
|
||||
max_results:
|
||||
type: number
|
||||
search_prompt:
|
||||
type: string
|
||||
engine:
|
||||
type: string
|
||||
enum:
|
||||
- native
|
||||
- exa
|
||||
required:
|
||||
- id
|
||||
- type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
const: file-parser
|
||||
enabled:
|
||||
type: boolean
|
||||
max_files:
|
||||
type: number
|
||||
pdf:
|
||||
type: object
|
||||
properties:
|
||||
engine:
|
||||
type: string
|
||||
enum:
|
||||
- mistral-ocr
|
||||
- pdf-text
|
||||
- native
|
||||
required:
|
||||
- id
|
||||
- type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
const: response-healing
|
||||
enabled:
|
||||
type: boolean
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
route:
|
||||
description: >-
|
||||
Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts
|
||||
all endpoints together by routing criteria.
|
||||
anyOf:
|
||||
- type: string
|
||||
enum:
|
||||
- fallback
|
||||
- sort
|
||||
- type: 'null'
|
||||
user:
|
||||
type: string
|
||||
session_id:
|
||||
description: >-
|
||||
A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for
|
||||
observability. If provided in both the request body and the x-session-id header, the body value takes
|
||||
precedence. Maximum of 128 characters.
|
||||
type: string
|
||||
maxLength: 128
|
||||
messages:
|
||||
minItems: 1
|
||||
type: array
|
||||
@@ -5120,6 +5439,7 @@ components:
|
||||
- low
|
||||
- medium
|
||||
- high
|
||||
- xhigh
|
||||
- type: 'null'
|
||||
summary:
|
||||
anyOf:
|
||||
@@ -5193,8 +5513,6 @@ components:
|
||||
minimum: 0
|
||||
maximum: 1
|
||||
- type: 'null'
|
||||
user:
|
||||
type: string
|
||||
debug:
|
||||
type: object
|
||||
properties:
|
||||
@@ -5206,7 +5524,7 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
finish_reason:
|
||||
$ref: '#/components/schemas/__schema0'
|
||||
$ref: '#/components/schemas/__schema2'
|
||||
index:
|
||||
type: number
|
||||
message:
|
||||
@@ -5267,7 +5585,7 @@ components:
|
||||
delta:
|
||||
$ref: '#/components/schemas/ChatStreamingMessageChunk'
|
||||
finish_reason:
|
||||
$ref: '#/components/schemas/__schema0'
|
||||
$ref: '#/components/schemas/__schema2'
|
||||
index:
|
||||
type: number
|
||||
logprobs:
|
||||
@@ -6173,10 +6491,23 @@ paths:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
request:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
additionalProperties: false
|
||||
description: >-
|
||||
The object specifying the maximum price you want to pay for this request. USD price per million
|
||||
tokens, for prompt and completion.
|
||||
min_throughput:
|
||||
type: number
|
||||
nullable: true
|
||||
example: 100
|
||||
description: >-
|
||||
The minimum throughput (in tokens per second) required for this request. Only providers serving
|
||||
the model with at least this throughput will be used.
|
||||
max_latency:
|
||||
type: number
|
||||
nullable: true
|
||||
example: 5
|
||||
description: >-
|
||||
The maximum latency (in seconds) allowed for this request. Only providers serving the model with
|
||||
better than this latency will be used.
|
||||
input_type:
|
||||
type: string
|
||||
required:
|
||||
@@ -6816,6 +7147,7 @@ paths:
|
||||
- Infermatic
|
||||
- Inflection
|
||||
- Liquid
|
||||
- Mara
|
||||
- Mancer 2
|
||||
- Minimax
|
||||
- ModelRun
|
||||
@@ -6844,6 +7176,7 @@ paths:
|
||||
- Together
|
||||
- Venice
|
||||
- WandB
|
||||
- Xiaomi
|
||||
- xAI
|
||||
- Z.AI
|
||||
- FakeProvider
|
||||
|
||||
+334
-12
@@ -1063,6 +1063,7 @@ components:
|
||||
type: string
|
||||
nullable: true
|
||||
enum:
|
||||
- xhigh
|
||||
- high
|
||||
- medium
|
||||
- low
|
||||
@@ -3496,6 +3497,7 @@ components:
|
||||
- Infermatic
|
||||
- Inflection
|
||||
- Liquid
|
||||
- Mara
|
||||
- Mancer 2
|
||||
- Minimax
|
||||
- ModelRun
|
||||
@@ -3524,6 +3526,7 @@ components:
|
||||
- Together
|
||||
- Venice
|
||||
- WandB
|
||||
- Xiaomi
|
||||
- xAI
|
||||
- Z.AI
|
||||
- FakeProvider
|
||||
@@ -3555,12 +3558,8 @@ components:
|
||||
example: price
|
||||
x-speakeasy-unknown-values: allow
|
||||
BigNumberUnion:
|
||||
anyOf:
|
||||
- type: number
|
||||
- type: string
|
||||
- type: number
|
||||
example: 1000
|
||||
description: A value in string or number format that is a large number
|
||||
type: string
|
||||
description: A value in string format that is a large number
|
||||
example: 1000
|
||||
OpenResponsesRequest:
|
||||
type: object
|
||||
@@ -3748,9 +3747,20 @@ components:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
request:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
additionalProperties: false
|
||||
description: >-
|
||||
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
||||
min_throughput:
|
||||
type: number
|
||||
nullable: true
|
||||
example: 100
|
||||
description: >-
|
||||
The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used.
|
||||
max_latency:
|
||||
type: number
|
||||
nullable: true
|
||||
example: 5
|
||||
description: >-
|
||||
The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used.
|
||||
additionalProperties: false
|
||||
description: When multiple model providers are available, optionally indicate your routing preference.
|
||||
plugins:
|
||||
@@ -3771,6 +3781,9 @@ components:
|
||||
type: string
|
||||
enum:
|
||||
- web
|
||||
enabled:
|
||||
type: boolean
|
||||
description: Set to false to disable the web-search plugin for this request. Defaults to true.
|
||||
max_results:
|
||||
type: number
|
||||
search_prompt:
|
||||
@@ -3789,6 +3802,9 @@ components:
|
||||
type: string
|
||||
enum:
|
||||
- file-parser
|
||||
enabled:
|
||||
type: boolean
|
||||
description: Set to false to disable the file-parser plugin for this request. Defaults to true.
|
||||
max_files:
|
||||
type: number
|
||||
pdf:
|
||||
@@ -3809,9 +3825,21 @@ components:
|
||||
type: string
|
||||
enum:
|
||||
- response-healing
|
||||
enabled:
|
||||
type: boolean
|
||||
description: Set to false to disable the response-healing plugin for this request. Defaults to true.
|
||||
required:
|
||||
- id
|
||||
description: Plugins you want to enable for this request, including their settings.
|
||||
route:
|
||||
type: string
|
||||
nullable: true
|
||||
enum:
|
||||
- fallback
|
||||
- sort
|
||||
description: >-
|
||||
Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria.
|
||||
x-speakeasy-unknown-values: allow
|
||||
user:
|
||||
type: string
|
||||
maxLength: 128
|
||||
@@ -4611,6 +4639,88 @@ components:
|
||||
uptime_last_30m: 99.5
|
||||
supports_implicit_caching: true
|
||||
__schema0:
|
||||
type: array
|
||||
items:
|
||||
anyOf:
|
||||
- type: string
|
||||
enum:
|
||||
- AI21
|
||||
- AionLabs
|
||||
- Alibaba
|
||||
- Amazon Bedrock
|
||||
- Amazon Nova
|
||||
- Anthropic
|
||||
- Arcee AI
|
||||
- AtlasCloud
|
||||
- Avian
|
||||
- Azure
|
||||
- BaseTen
|
||||
- BytePlus
|
||||
- Black Forest Labs
|
||||
- Cerebras
|
||||
- Chutes
|
||||
- Cirrascale
|
||||
- Clarifai
|
||||
- Cloudflare
|
||||
- Cohere
|
||||
- Crusoe
|
||||
- DeepInfra
|
||||
- DeepSeek
|
||||
- Featherless
|
||||
- Fireworks
|
||||
- Friendli
|
||||
- GMICloud
|
||||
- GoPomelo
|
||||
- Google
|
||||
- Google AI Studio
|
||||
- Groq
|
||||
- Hyperbolic
|
||||
- Inception
|
||||
- InferenceNet
|
||||
- Infermatic
|
||||
- Inflection
|
||||
- Liquid
|
||||
- Mara
|
||||
- Mancer 2
|
||||
- Minimax
|
||||
- ModelRun
|
||||
- Mistral
|
||||
- Modular
|
||||
- Moonshot AI
|
||||
- Morph
|
||||
- NCompass
|
||||
- Nebius
|
||||
- NextBit
|
||||
- Novita
|
||||
- Nvidia
|
||||
- OpenAI
|
||||
- OpenInference
|
||||
- Parasail
|
||||
- Perplexity
|
||||
- Phala
|
||||
- Relace
|
||||
- SambaNova
|
||||
- SiliconFlow
|
||||
- Sourceful
|
||||
- Stealth
|
||||
- StreamLake
|
||||
- Switchpoint
|
||||
- Targon
|
||||
- Together
|
||||
- Venice
|
||||
- WandB
|
||||
- Xiaomi
|
||||
- xAI
|
||||
- Z.AI
|
||||
- FakeProvider
|
||||
x-speakeasy-unknown-values: allow
|
||||
- type: string
|
||||
__schema1:
|
||||
anyOf:
|
||||
- type: number
|
||||
- type: string
|
||||
- type: number
|
||||
__schema2:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ChatCompletionFinishReason'
|
||||
- type: 'null'
|
||||
@@ -5071,6 +5181,206 @@ components:
|
||||
ChatGenerationParams:
|
||||
type: object
|
||||
properties:
|
||||
provider:
|
||||
description: When multiple model providers are available, optionally indicate your routing preference.
|
||||
anyOf:
|
||||
- type: object
|
||||
properties:
|
||||
allow_fallbacks:
|
||||
description: >
|
||||
Whether to allow backup providers to serve requests
|
||||
|
||||
- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
|
||||
|
||||
- false: use only the primary/custom provider, and return the upstream error if it's unavailable.
|
||||
|
||||
anyOf:
|
||||
- type: boolean
|
||||
- type: 'null'
|
||||
require_parameters:
|
||||
description: >-
|
||||
Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.
|
||||
anyOf:
|
||||
- type: boolean
|
||||
- type: 'null'
|
||||
data_collection:
|
||||
description: >-
|
||||
Data collection setting. If no available model provider meets the requirement, your request will return an error.
|
||||
|
||||
- allow: (default) allow providers which store user data non-transiently and may train on it
|
||||
|
||||
|
||||
- deny: use only providers which do not collect user data.
|
||||
anyOf:
|
||||
- type: string
|
||||
enum:
|
||||
- deny
|
||||
- allow
|
||||
x-speakeasy-unknown-values: allow
|
||||
- type: 'null'
|
||||
zdr:
|
||||
anyOf:
|
||||
- type: boolean
|
||||
- type: 'null'
|
||||
enforce_distillable_text:
|
||||
anyOf:
|
||||
- type: boolean
|
||||
- type: 'null'
|
||||
order:
|
||||
description: >-
|
||||
An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/__schema0'
|
||||
- type: 'null'
|
||||
only:
|
||||
description: >-
|
||||
List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/__schema0'
|
||||
- type: 'null'
|
||||
ignore:
|
||||
description: >-
|
||||
List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/__schema0'
|
||||
- type: 'null'
|
||||
quantizations:
|
||||
description: A list of quantization levels to filter the provider by.
|
||||
anyOf:
|
||||
- type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- int4
|
||||
- int8
|
||||
- fp4
|
||||
- fp6
|
||||
- fp8
|
||||
- fp16
|
||||
- bf16
|
||||
- fp32
|
||||
- unknown
|
||||
x-speakeasy-unknown-values: allow
|
||||
- type: 'null'
|
||||
sort:
|
||||
description: >-
|
||||
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
||||
anyOf:
|
||||
- type: string
|
||||
enum:
|
||||
- price
|
||||
- throughput
|
||||
- latency
|
||||
x-speakeasy-unknown-values: allow
|
||||
- type: 'null'
|
||||
max_price:
|
||||
description: >-
|
||||
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
||||
type: object
|
||||
properties:
|
||||
prompt:
|
||||
$ref: '#/components/schemas/__schema1'
|
||||
completion:
|
||||
$ref: '#/components/schemas/__schema1'
|
||||
image:
|
||||
$ref: '#/components/schemas/__schema1'
|
||||
audio:
|
||||
$ref: '#/components/schemas/__schema1'
|
||||
request:
|
||||
$ref: '#/components/schemas/__schema1'
|
||||
min_throughput:
|
||||
description: >-
|
||||
The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used.
|
||||
anyOf:
|
||||
- type: number
|
||||
- type: 'null'
|
||||
max_latency:
|
||||
description: >-
|
||||
The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used.
|
||||
anyOf:
|
||||
- type: number
|
||||
- type: 'null'
|
||||
additionalProperties: false
|
||||
- type: 'null'
|
||||
plugins:
|
||||
description: Plugins you want to enable for this request, including their settings.
|
||||
type: array
|
||||
items:
|
||||
oneOf:
|
||||
- type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
const: moderation
|
||||
required:
|
||||
- id
|
||||
- type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
const: web
|
||||
enabled:
|
||||
type: boolean
|
||||
max_results:
|
||||
type: number
|
||||
search_prompt:
|
||||
type: string
|
||||
engine:
|
||||
type: string
|
||||
enum:
|
||||
- native
|
||||
- exa
|
||||
x-speakeasy-unknown-values: allow
|
||||
required:
|
||||
- id
|
||||
- type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
const: file-parser
|
||||
enabled:
|
||||
type: boolean
|
||||
max_files:
|
||||
type: number
|
||||
pdf:
|
||||
type: object
|
||||
properties:
|
||||
engine:
|
||||
type: string
|
||||
enum:
|
||||
- mistral-ocr
|
||||
- pdf-text
|
||||
- native
|
||||
x-speakeasy-unknown-values: allow
|
||||
required:
|
||||
- id
|
||||
- type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
const: response-healing
|
||||
enabled:
|
||||
type: boolean
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
route:
|
||||
description: >-
|
||||
Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria.
|
||||
anyOf:
|
||||
- type: string
|
||||
enum:
|
||||
- fallback
|
||||
- sort
|
||||
x-speakeasy-unknown-values: allow
|
||||
- type: 'null'
|
||||
user:
|
||||
type: string
|
||||
session_id:
|
||||
description: >-
|
||||
A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
|
||||
type: string
|
||||
maxLength: 128
|
||||
messages:
|
||||
minItems: 1
|
||||
type: array
|
||||
@@ -5140,6 +5450,7 @@ components:
|
||||
- low
|
||||
- medium
|
||||
- high
|
||||
- xhigh
|
||||
x-speakeasy-unknown-values: allow
|
||||
- type: 'null'
|
||||
summary:
|
||||
@@ -5214,8 +5525,6 @@ components:
|
||||
minimum: 0
|
||||
maximum: 1
|
||||
- type: 'null'
|
||||
user:
|
||||
type: string
|
||||
debug:
|
||||
type: object
|
||||
properties:
|
||||
@@ -5227,7 +5536,7 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
finish_reason:
|
||||
$ref: '#/components/schemas/__schema0'
|
||||
$ref: '#/components/schemas/__schema2'
|
||||
index:
|
||||
type: number
|
||||
message:
|
||||
@@ -5288,7 +5597,7 @@ components:
|
||||
delta:
|
||||
$ref: '#/components/schemas/ChatStreamingMessageChunk'
|
||||
finish_reason:
|
||||
$ref: '#/components/schemas/__schema0'
|
||||
$ref: '#/components/schemas/__schema2'
|
||||
index:
|
||||
type: number
|
||||
logprobs:
|
||||
@@ -6187,9 +6496,20 @@ paths:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
request:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
additionalProperties: false
|
||||
description: >-
|
||||
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
||||
min_throughput:
|
||||
type: number
|
||||
nullable: true
|
||||
example: 100
|
||||
description: >-
|
||||
The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used.
|
||||
max_latency:
|
||||
type: number
|
||||
nullable: true
|
||||
example: 5
|
||||
description: >-
|
||||
The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used.
|
||||
input_type:
|
||||
type: string
|
||||
required:
|
||||
@@ -6817,6 +7137,7 @@ paths:
|
||||
- Infermatic
|
||||
- Inflection
|
||||
- Liquid
|
||||
- Mara
|
||||
- Mancer 2
|
||||
- Minimax
|
||||
- ModelRun
|
||||
@@ -6845,6 +7166,7 @@ paths:
|
||||
- Together
|
||||
- Venice
|
||||
- WandB
|
||||
- Xiaomi
|
||||
- xAI
|
||||
- Z.AI
|
||||
- FakeProvider
|
||||
|
||||
@@ -8,8 +8,8 @@ sources:
|
||||
- latest
|
||||
OpenRouter API:
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:9b410c8cfafe475dc6d9550f97a1e755b9a02b54513d3a85efe606e9bb05ca57
|
||||
sourceBlobDigest: sha256:61a2d897cc5ddd893a5131bfacad7fcc311fe5b2eaaa5641fbb0a5b3321bfde7
|
||||
sourceRevisionDigest: sha256:b128cdb6be96021e55feea5e2dcb6e7438de706138fcde4f871b14877885445b
|
||||
sourceBlobDigest: sha256:8b15f72eaabbd77f4642be28a2861fd1cfd5d8cfe96e72fb8a76832387c64fab
|
||||
tags:
|
||||
- latest
|
||||
- 1.0.0
|
||||
@@ -17,8 +17,10 @@ targets:
|
||||
open-router:
|
||||
source: OpenRouter API
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:9b410c8cfafe475dc6d9550f97a1e755b9a02b54513d3a85efe606e9bb05ca57
|
||||
sourceBlobDigest: sha256:61a2d897cc5ddd893a5131bfacad7fcc311fe5b2eaaa5641fbb0a5b3321bfde7
|
||||
sourceRevisionDigest: sha256:b128cdb6be96021e55feea5e2dcb6e7438de706138fcde4f871b14877885445b
|
||||
sourceBlobDigest: sha256:8b15f72eaabbd77f4642be28a2861fd1cfd5d8cfe96e72fb8a76832387c64fab
|
||||
codeSamplesNamespace: open-router-python-code-samples
|
||||
codeSamplesRevisionDigest: sha256:92747cd4c744e6671784b73c124d89adc662799d11caf5e6573880f6bfb52405
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: 1.666.0
|
||||
@@ -42,7 +44,7 @@ workflow:
|
||||
token: $pypi_token
|
||||
codeSamples:
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/openrouter/sdk/-oas-python-code-samples
|
||||
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-python-code-samples
|
||||
labelOverride:
|
||||
fixedValue: Python (SDK)
|
||||
blocking: false
|
||||
|
||||
Reference in New Issue
Block a user