mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-19 12:20:17 +08:00
feat: fix types and add reasoning_details to chat responses (#27)
This commit is contained in:
+42
-21
@@ -1,12 +1,12 @@
|
||||
lockVersion: 2.0.0
|
||||
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
|
||||
management:
|
||||
docChecksum: e929ecf569d79ab96a315332a4855566
|
||||
docChecksum: a5b3a567dd4de3ab77a9f0b23d4a9f10
|
||||
docVersion: 1.0.0
|
||||
speakeasyVersion: 1.666.0
|
||||
generationVersion: 2.768.0
|
||||
releaseVersion: 0.0.22
|
||||
configChecksum: 0afda3910a58a8d797ac6674fa858711
|
||||
releaseVersion: 0.0.17
|
||||
configChecksum: 50ef18bf69272fc09c257e3562e1b0df
|
||||
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||
published: true
|
||||
@@ -29,6 +29,7 @@ features:
|
||||
globalServerURLs: 3.2.0
|
||||
globals: 3.0.0
|
||||
groups: 3.0.1
|
||||
ignores: 3.0.1
|
||||
methodArguments: 1.0.2
|
||||
methodSecurity: 3.0.1
|
||||
nameOverrides: 3.0.1
|
||||
@@ -59,10 +60,7 @@ generatedFiles:
|
||||
- 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
|
||||
@@ -73,7 +71,6 @@ generatedFiles:
|
||||
- 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
|
||||
@@ -123,6 +120,7 @@ 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
|
||||
@@ -132,7 +130,6 @@ generatedFiles:
|
||||
- docs/components/idmoderation.md
|
||||
- docs/components/idresponsehealing.md
|
||||
- docs/components/idweb.md
|
||||
- docs/components/ignore.md
|
||||
- docs/components/imagegenerationstatus.md
|
||||
- docs/components/imageurl.md
|
||||
- docs/components/inputmodality.md
|
||||
@@ -155,7 +152,6 @@ generatedFiles:
|
||||
- docs/components/namedtoolchoicefunction.md
|
||||
- docs/components/notfoundresponseerrordata.md
|
||||
- docs/components/object.md
|
||||
- docs/components/only.md
|
||||
- docs/components/openairesponsesannotation.md
|
||||
- docs/components/openairesponsesincludable.md
|
||||
- docs/components/openairesponsesincompletedetails.md
|
||||
@@ -254,17 +250,17 @@ generatedFiles:
|
||||
- docs/components/openresponsesreasoningsummarytextdoneeventtype.md
|
||||
- docs/components/openresponsesreasoningtype.md
|
||||
- docs/components/openresponsesrequest.md
|
||||
- docs/components/openresponsesrequestengine.md
|
||||
- docs/components/openresponsesrequestignore.md
|
||||
- docs/components/openresponsesrequestmaxprice.md
|
||||
- docs/components/openresponsesrequestpdf.md
|
||||
- docs/components/openresponsesrequestpdfengine.md
|
||||
- docs/components/openresponsesrequestonly.md
|
||||
- docs/components/openresponsesrequestorder.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/openresponsesrequestsort.md
|
||||
- docs/components/openresponsesrequesttoolfunction.md
|
||||
- docs/components/openresponsesrequesttoolunion.md
|
||||
- docs/components/openresponsesrequesttype.md
|
||||
@@ -300,7 +296,6 @@ generatedFiles:
|
||||
- docs/components/openresponseswebsearchtool.md
|
||||
- docs/components/openresponseswebsearchtoolfilters.md
|
||||
- docs/components/openresponseswebsearchtooltype.md
|
||||
- docs/components/order.md
|
||||
- docs/components/outputitemimagegenerationcall.md
|
||||
- docs/components/outputitemimagegenerationcalltype.md
|
||||
- docs/components/outputmessage.md
|
||||
@@ -316,15 +311,33 @@ generatedFiles:
|
||||
- docs/components/parameter.md
|
||||
- docs/components/part1.md
|
||||
- docs/components/part2.md
|
||||
- docs/components/partition.md
|
||||
- docs/components/payloadtoolargeresponseerrordata.md
|
||||
- docs/components/paymentrequiredresponseerrordata.md
|
||||
- docs/components/pdf.md
|
||||
- docs/components/pdfengine.md
|
||||
- docs/components/pdfparserengine.md
|
||||
- docs/components/pdfparseroptions.md
|
||||
- docs/components/perrequestlimits.md
|
||||
- docs/components/pricing.md
|
||||
- docs/components/prompt.md
|
||||
- docs/components/prompttokensdetails.md
|
||||
- docs/components/providername.md
|
||||
- docs/components/provideroverloadedresponseerrordata.md
|
||||
- docs/components/providerpreferences.md
|
||||
- docs/components/providerpreferencesignore.md
|
||||
- docs/components/providerpreferencesmaxprice.md
|
||||
- docs/components/providerpreferencesonly.md
|
||||
- docs/components/providerpreferencesorder.md
|
||||
- docs/components/providerpreferencespartition.md
|
||||
- docs/components/providerpreferencesprovidersort.md
|
||||
- docs/components/providerpreferencesprovidersortconfig.md
|
||||
- docs/components/providerpreferencessortunion.md
|
||||
- docs/components/providersort.md
|
||||
- docs/components/providersortconfig.md
|
||||
- docs/components/providersortconfigenum.md
|
||||
- docs/components/providersortconfigunion.md
|
||||
- docs/components/providersortunion.md
|
||||
- docs/components/publicendpoint.md
|
||||
- docs/components/publicendpointquantization.md
|
||||
- docs/components/publicpricing.md
|
||||
@@ -393,12 +406,18 @@ generatedFiles:
|
||||
- docs/components/responseswebsearchuserlocationtype.md
|
||||
- docs/components/responsetextconfig.md
|
||||
- docs/components/responsetextconfigverbosity.md
|
||||
- docs/components/route.md
|
||||
- docs/components/schema0.md
|
||||
- docs/components/schema0enum.md
|
||||
- docs/components/schema3.md
|
||||
- docs/components/schema3reasoningencrypted.md
|
||||
- docs/components/schema3reasoningsummary.md
|
||||
- docs/components/schema3reasoningtext.md
|
||||
- docs/components/schema5.md
|
||||
- docs/components/security.md
|
||||
- docs/components/servicetier.md
|
||||
- docs/components/serviceunavailableresponseerrordata.md
|
||||
- docs/components/sort.md
|
||||
- docs/components/sortenum.md
|
||||
- docs/components/streamoptions.md
|
||||
- docs/components/systemmessage.md
|
||||
- docs/components/systemmessagecontent.md
|
||||
@@ -440,6 +459,7 @@ generatedFiles:
|
||||
- docs/components/variables.md
|
||||
- docs/components/videourl1.md
|
||||
- docs/components/videourl2.md
|
||||
- docs/components/websearchengine.md
|
||||
- docs/components/websearchpreviewtooluserlocation.md
|
||||
- docs/components/websearchpreviewtooluserlocationtype.md
|
||||
- docs/components/websearchstatus.md
|
||||
@@ -473,7 +493,6 @@ generatedFiles:
|
||||
- docs/operations/createcoinbasechargeresponse.md
|
||||
- docs/operations/createcoinbasechargesecurity.md
|
||||
- docs/operations/createembeddingsdata.md
|
||||
- docs/operations/createembeddingsprovider.md
|
||||
- docs/operations/createembeddingsrequest.md
|
||||
- docs/operations/createembeddingsresponse.md
|
||||
- docs/operations/createembeddingsresponsebody.md
|
||||
@@ -502,13 +521,11 @@ generatedFiles:
|
||||
- docs/operations/getkeyresponse.md
|
||||
- docs/operations/getmodelsrequest.md
|
||||
- docs/operations/getparametersdata.md
|
||||
- docs/operations/getparametersprovider.md
|
||||
- docs/operations/getparametersrequest.md
|
||||
- docs/operations/getparametersresponse.md
|
||||
- docs/operations/getparameterssecurity.md
|
||||
- docs/operations/getuseractivityrequest.md
|
||||
- docs/operations/getuseractivityresponse.md
|
||||
- docs/operations/ignore.md
|
||||
- docs/operations/imageurl.md
|
||||
- docs/operations/input.md
|
||||
- docs/operations/inputunion.md
|
||||
@@ -521,12 +538,9 @@ generatedFiles:
|
||||
- docs/operations/listprovidersresponse.md
|
||||
- docs/operations/listrequest.md
|
||||
- docs/operations/listresponse.md
|
||||
- docs/operations/maxprice.md
|
||||
- docs/operations/metadata.md
|
||||
- docs/operations/object.md
|
||||
- docs/operations/objectembedding.md
|
||||
- docs/operations/only.md
|
||||
- docs/operations/order.md
|
||||
- docs/operations/ratelimit.md
|
||||
- docs/operations/sendchatcompletionrequestresponse.md
|
||||
- docs/operations/supportedparameter.md
|
||||
@@ -570,6 +584,7 @@ generatedFiles:
|
||||
- src/openrouter/completions.py
|
||||
- src/openrouter/components/__init__.py
|
||||
- src/openrouter/components/_schema0.py
|
||||
- src/openrouter/components/_schema3.py
|
||||
- src/openrouter/components/activityitem.py
|
||||
- src/openrouter/components/assistantmessage.py
|
||||
- src/openrouter/components/badgatewayresponseerrordata.py
|
||||
@@ -667,10 +682,15 @@ generatedFiles:
|
||||
- src/openrouter/components/parameter.py
|
||||
- src/openrouter/components/payloadtoolargeresponseerrordata.py
|
||||
- src/openrouter/components/paymentrequiredresponseerrordata.py
|
||||
- src/openrouter/components/pdfparserengine.py
|
||||
- src/openrouter/components/pdfparseroptions.py
|
||||
- src/openrouter/components/perrequestlimits.py
|
||||
- src/openrouter/components/providername.py
|
||||
- src/openrouter/components/provideroverloadedresponseerrordata.py
|
||||
- src/openrouter/components/providerpreferences.py
|
||||
- src/openrouter/components/providersort.py
|
||||
- src/openrouter/components/providersortconfig.py
|
||||
- src/openrouter/components/providersortunion.py
|
||||
- src/openrouter/components/publicendpoint.py
|
||||
- src/openrouter/components/publicpricing.py
|
||||
- src/openrouter/components/quantization.py
|
||||
@@ -712,6 +732,7 @@ generatedFiles:
|
||||
- src/openrouter/components/unprocessableentityresponseerrordata.py
|
||||
- src/openrouter/components/urlcitation.py
|
||||
- src/openrouter/components/usermessage.py
|
||||
- src/openrouter/components/websearchengine.py
|
||||
- src/openrouter/components/websearchpreviewtooluserlocation.py
|
||||
- src/openrouter/components/websearchstatus.py
|
||||
- src/openrouter/credits.py
|
||||
|
||||
+3
-1
@@ -31,7 +31,7 @@ generation:
|
||||
skipResponseBodyAssertions: false
|
||||
preApplyUnionDiscriminators: true
|
||||
python:
|
||||
version: 0.0.22
|
||||
version: 0.0.17
|
||||
additionalDependencies:
|
||||
dev: {}
|
||||
main: {}
|
||||
@@ -39,6 +39,8 @@ python:
|
||||
- id
|
||||
- object
|
||||
- input
|
||||
- models
|
||||
- hash
|
||||
asyncMode: both
|
||||
authors:
|
||||
- OpenRouter
|
||||
|
||||
+306
-225
@@ -3529,19 +3529,47 @@ components:
|
||||
example: fp16
|
||||
ProviderSort:
|
||||
type: string
|
||||
nullable: true
|
||||
enum:
|
||||
- price
|
||||
- throughput
|
||||
- latency
|
||||
description: >-
|
||||
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is
|
||||
performed.
|
||||
example: price
|
||||
ProviderSortConfig:
|
||||
type: object
|
||||
properties:
|
||||
by:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderSort'
|
||||
- type: 'null'
|
||||
partition:
|
||||
anyOf:
|
||||
- type: string
|
||||
enum:
|
||||
- model
|
||||
- none
|
||||
- type: 'null'
|
||||
BigNumberUnion:
|
||||
type: string
|
||||
description: A value in string format that is a large number
|
||||
example: 1000
|
||||
WebSearchEngine:
|
||||
type: string
|
||||
enum:
|
||||
- native
|
||||
- exa
|
||||
description: The search engine to use for web search.
|
||||
PDFParserEngine:
|
||||
type: string
|
||||
enum:
|
||||
- mistral-ocr
|
||||
- pdf-text
|
||||
- native
|
||||
description: The engine to use for parsing PDF files.
|
||||
PDFParserOptions:
|
||||
type: object
|
||||
properties:
|
||||
engine:
|
||||
$ref: '#/components/schemas/PDFParserEngine'
|
||||
description: Options for PDF parsing.
|
||||
OpenResponsesRequest:
|
||||
type: object
|
||||
properties:
|
||||
@@ -3721,7 +3749,14 @@ components:
|
||||
$ref: '#/components/schemas/Quantization'
|
||||
description: A list of quantization levels to filter the provider by.
|
||||
sort:
|
||||
$ref: '#/components/schemas/ProviderSort'
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderSort'
|
||||
- $ref: '#/components/schemas/ProviderSortConfig'
|
||||
- nullable: true
|
||||
description: >-
|
||||
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing
|
||||
is performed.
|
||||
example: price
|
||||
max_price:
|
||||
type: object
|
||||
properties:
|
||||
@@ -3738,20 +3773,38 @@ components:
|
||||
description: >-
|
||||
The object specifying the maximum price you want to pay for this request. USD price per million tokens,
|
||||
for prompt and completion.
|
||||
preferred_min_throughput:
|
||||
type: number
|
||||
nullable: true
|
||||
description: >-
|
||||
Preferred minimum throughput (in tokens per second). Endpoints below this threshold may still be used,
|
||||
but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used
|
||||
instead of the primary model if it meets the threshold.
|
||||
example: 100
|
||||
preferred_max_latency:
|
||||
type: number
|
||||
nullable: true
|
||||
description: >-
|
||||
Preferred maximum latency (in seconds). Endpoints above this threshold may still be used, but are
|
||||
deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead
|
||||
of the primary model if it meets the threshold.
|
||||
example: 5
|
||||
min_throughput:
|
||||
type: number
|
||||
nullable: true
|
||||
example: 100
|
||||
deprecated: true
|
||||
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.
|
||||
**DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for
|
||||
preferred_min_throughput.
|
||||
example: 100
|
||||
x-speakeasy-deprecation-message: Use preferred_min_throughput instead.
|
||||
max_latency:
|
||||
type: number
|
||||
nullable: true
|
||||
deprecated: true
|
||||
description: '**DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency.'
|
||||
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.
|
||||
x-speakeasy-deprecation-message: Use preferred_max_latency instead.
|
||||
additionalProperties: false
|
||||
description: When multiple model providers are available, optionally indicate your routing preference.
|
||||
plugins:
|
||||
@@ -3780,10 +3833,7 @@ components:
|
||||
search_prompt:
|
||||
type: string
|
||||
engine:
|
||||
type: string
|
||||
enum:
|
||||
- native
|
||||
- exa
|
||||
$ref: '#/components/schemas/WebSearchEngine'
|
||||
required:
|
||||
- id
|
||||
- type: object
|
||||
@@ -3795,17 +3845,8 @@ components:
|
||||
enabled:
|
||||
type: boolean
|
||||
description: Set to false to disable the file-parser plugin for this request. Defaults to true.
|
||||
max_files:
|
||||
type: number
|
||||
pdf:
|
||||
type: object
|
||||
properties:
|
||||
engine:
|
||||
type: string
|
||||
enum:
|
||||
- mistral-ocr
|
||||
- pdf-text
|
||||
- native
|
||||
$ref: '#/components/schemas/PDFParserOptions'
|
||||
required:
|
||||
- id
|
||||
- type: object
|
||||
@@ -3826,9 +3867,13 @@ components:
|
||||
enum:
|
||||
- fallback
|
||||
- sort
|
||||
deprecated: true
|
||||
description: >-
|
||||
Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts
|
||||
all endpoints together by routing criteria.
|
||||
**DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for
|
||||
providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").
|
||||
x-speakeasy-deprecation-message: Use providers.sort.partition instead.
|
||||
x-speakeasy-ignore: true
|
||||
x-fern-ignore: true
|
||||
user:
|
||||
type: string
|
||||
maxLength: 128
|
||||
@@ -3988,6 +4033,137 @@ components:
|
||||
amount: 100
|
||||
sender: '0x1234567890123456789012345678901234567890'
|
||||
chain_id: 1
|
||||
ProviderPreferences:
|
||||
type: object
|
||||
properties:
|
||||
allow_fallbacks:
|
||||
type: boolean
|
||||
nullable: true
|
||||
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.
|
||||
require_parameters:
|
||||
type: boolean
|
||||
nullable: true
|
||||
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.
|
||||
data_collection:
|
||||
$ref: '#/components/schemas/DataCollection'
|
||||
zdr:
|
||||
type: boolean
|
||||
nullable: true
|
||||
description: >-
|
||||
Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do
|
||||
not retain prompts will be used.
|
||||
example: true
|
||||
enforce_distillable_text:
|
||||
type: boolean
|
||||
nullable: true
|
||||
description: >-
|
||||
Whether to restrict routing to only models that allow text distillation. When true, only models where the
|
||||
author has allowed distillation will be used.
|
||||
example: true
|
||||
order:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderName'
|
||||
- type: string
|
||||
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.
|
||||
only:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderName'
|
||||
- type: string
|
||||
description: >-
|
||||
List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider
|
||||
settings for this request.
|
||||
ignore:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderName'
|
||||
- type: string
|
||||
description: >-
|
||||
List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider
|
||||
settings for this request.
|
||||
quantizations:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
$ref: '#/components/schemas/Quantization'
|
||||
description: A list of quantization levels to filter the provider by.
|
||||
sort:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ProviderSort'
|
||||
- anyOf:
|
||||
- $ref: '#/components/schemas/ProviderSort'
|
||||
- $ref: '#/components/schemas/ProviderSortConfig'
|
||||
- nullable: true
|
||||
description: >-
|
||||
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing
|
||||
is performed.
|
||||
max_price:
|
||||
type: object
|
||||
properties:
|
||||
prompt:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
completion:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
image:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
audio:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
request:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
description: >-
|
||||
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for
|
||||
prompt and completion.
|
||||
preferred_min_throughput:
|
||||
type: number
|
||||
nullable: true
|
||||
description: >-
|
||||
Preferred minimum throughput (in tokens per second). Endpoints below this threshold may still be used, but
|
||||
are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead
|
||||
of the primary model if it meets the threshold.
|
||||
example: 100
|
||||
preferred_max_latency:
|
||||
type: number
|
||||
nullable: true
|
||||
description: >-
|
||||
Preferred maximum latency (in seconds). Endpoints above this threshold may still be used, but are
|
||||
deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of
|
||||
the primary model if it meets the threshold.
|
||||
example: 5
|
||||
min_throughput:
|
||||
type: number
|
||||
nullable: true
|
||||
deprecated: true
|
||||
description: >-
|
||||
**DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for
|
||||
preferred_min_throughput.
|
||||
example: 100
|
||||
x-speakeasy-deprecation-message: Use preferred_min_throughput instead.
|
||||
max_latency:
|
||||
type: number
|
||||
nullable: true
|
||||
deprecated: true
|
||||
description: '**DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency.'
|
||||
example: 5
|
||||
x-speakeasy-deprecation-message: Use preferred_max_latency instead.
|
||||
description: Provider routing preferences for the request.
|
||||
PublicPricing:
|
||||
type: object
|
||||
properties:
|
||||
@@ -4195,6 +4371,7 @@ components:
|
||||
- parallel_tool_calls
|
||||
- include_reasoning
|
||||
- reasoning
|
||||
- reasoning_effort
|
||||
- web_search_options
|
||||
- verbosity
|
||||
example: temperature
|
||||
@@ -4708,6 +4885,78 @@ components:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ChatCompletionFinishReason'
|
||||
- type: 'null'
|
||||
__schema3:
|
||||
oneOf:
|
||||
- type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
const: reasoning.summary
|
||||
summary:
|
||||
type: string
|
||||
id:
|
||||
$ref: '#/components/schemas/__schema4'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema5'
|
||||
index:
|
||||
$ref: '#/components/schemas/__schema6'
|
||||
required:
|
||||
- type
|
||||
- summary
|
||||
- type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
const: reasoning.encrypted
|
||||
data:
|
||||
type: string
|
||||
id:
|
||||
$ref: '#/components/schemas/__schema4'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema5'
|
||||
index:
|
||||
$ref: '#/components/schemas/__schema6'
|
||||
required:
|
||||
- type
|
||||
- data
|
||||
- type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
const: reasoning.text
|
||||
text:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
signature:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
id:
|
||||
$ref: '#/components/schemas/__schema4'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema5'
|
||||
index:
|
||||
$ref: '#/components/schemas/__schema6'
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
__schema4:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
__schema5:
|
||||
anyOf:
|
||||
- type: string
|
||||
enum:
|
||||
- unknown
|
||||
- openai-responses-v1
|
||||
- xai-responses-v1
|
||||
- anthropic-claude-v1
|
||||
- google-gemini-v1
|
||||
- type: 'null'
|
||||
__schema6:
|
||||
type: number
|
||||
ModelName:
|
||||
type: string
|
||||
ChatMessageContentItemText:
|
||||
@@ -5253,11 +5502,7 @@ components:
|
||||
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
|
||||
- $ref: '#/components/schemas/ProviderSortUnion'
|
||||
- type: 'null'
|
||||
max_price:
|
||||
description: >-
|
||||
@@ -5275,17 +5520,19 @@ components:
|
||||
$ref: '#/components/schemas/__schema1'
|
||||
request:
|
||||
$ref: '#/components/schemas/__schema1'
|
||||
preferred_min_throughput:
|
||||
anyOf:
|
||||
- type: number
|
||||
- type: 'null'
|
||||
preferred_max_latency:
|
||||
anyOf:
|
||||
- type: number
|
||||
- type: 'null'
|
||||
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'
|
||||
@@ -5328,8 +5575,6 @@ components:
|
||||
const: file-parser
|
||||
enabled:
|
||||
type: boolean
|
||||
max_files:
|
||||
type: number
|
||||
pdf:
|
||||
type: object
|
||||
properties:
|
||||
@@ -5352,9 +5597,6 @@ components:
|
||||
- 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:
|
||||
@@ -5434,12 +5676,12 @@ components:
|
||||
anyOf:
|
||||
- type: string
|
||||
enum:
|
||||
- none
|
||||
- minimal
|
||||
- low
|
||||
- medium
|
||||
- high
|
||||
- xhigh
|
||||
- high
|
||||
- medium
|
||||
- low
|
||||
- minimal
|
||||
- none
|
||||
- type: 'null'
|
||||
summary:
|
||||
anyOf:
|
||||
@@ -5520,6 +5762,10 @@ components:
|
||||
type: boolean
|
||||
required:
|
||||
- messages
|
||||
ProviderSortUnion:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderSort'
|
||||
- $ref: '#/components/schemas/ProviderSortConfig'
|
||||
ChatResponseChoice:
|
||||
type: object
|
||||
properties:
|
||||
@@ -5529,6 +5775,10 @@ components:
|
||||
type: number
|
||||
message:
|
||||
$ref: '#/components/schemas/AssistantMessage'
|
||||
reasoning_details:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/__schema3'
|
||||
logprobs:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ChatMessageTokenLogprobs'
|
||||
@@ -5579,6 +5829,10 @@ components:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatStreamingMessageToolCall'
|
||||
reasoning_details:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/__schema3'
|
||||
ChatStreamingChoice:
|
||||
type: object
|
||||
properties:
|
||||
@@ -6403,111 +6657,7 @@ paths:
|
||||
user:
|
||||
type: string
|
||||
provider:
|
||||
type: object
|
||||
properties:
|
||||
allow_fallbacks:
|
||||
type: boolean
|
||||
nullable: true
|
||||
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.
|
||||
require_parameters:
|
||||
type: boolean
|
||||
nullable: true
|
||||
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.
|
||||
data_collection:
|
||||
$ref: '#/components/schemas/DataCollection'
|
||||
zdr:
|
||||
type: boolean
|
||||
nullable: true
|
||||
description: >-
|
||||
Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only
|
||||
endpoints that do not retain prompts will be used.
|
||||
example: true
|
||||
enforce_distillable_text:
|
||||
type: boolean
|
||||
nullable: true
|
||||
description: >-
|
||||
Whether to restrict routing to only models that allow text distillation. When true, only models
|
||||
where the author has allowed distillation will be used.
|
||||
example: true
|
||||
order:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderName'
|
||||
- type: string
|
||||
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.
|
||||
only:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderName'
|
||||
- type: string
|
||||
description: >-
|
||||
List of provider slugs to allow. If provided, this list is merged with your account-wide allowed
|
||||
provider settings for this request.
|
||||
ignore:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderName'
|
||||
- type: string
|
||||
description: >-
|
||||
List of provider slugs to ignore. If provided, this list is merged with your account-wide
|
||||
ignored provider settings for this request.
|
||||
quantizations:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
$ref: '#/components/schemas/Quantization'
|
||||
description: A list of quantization levels to filter the provider by.
|
||||
sort:
|
||||
$ref: '#/components/schemas/ProviderSort'
|
||||
max_price:
|
||||
type: object
|
||||
properties:
|
||||
prompt:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
completion:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
image:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
audio:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
request:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
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.
|
||||
$ref: '#/components/schemas/ProviderPreferences'
|
||||
input_type:
|
||||
type: string
|
||||
required:
|
||||
@@ -7109,77 +7259,7 @@ paths:
|
||||
name: slug
|
||||
in: path
|
||||
- schema:
|
||||
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
|
||||
$ref: '#/components/schemas/ProviderName'
|
||||
required: false
|
||||
name: provider
|
||||
in: query
|
||||
@@ -7224,6 +7304,7 @@ paths:
|
||||
- parallel_tool_calls
|
||||
- include_reasoning
|
||||
- reasoning
|
||||
- reasoning_effort
|
||||
- web_search_options
|
||||
- verbosity
|
||||
description: List of parameters supported by this model
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
lintVersion: 1.0.0
|
||||
defaultRuleset: openrouter
|
||||
rulesets:
|
||||
openrouter:
|
||||
rulesets:
|
||||
- speakeasy-recommended
|
||||
- speakeasy-generation
|
||||
rules:
|
||||
oas3-missing-example:
|
||||
severity: "off"
|
||||
+289
-210
@@ -3548,19 +3548,51 @@ components:
|
||||
x-speakeasy-unknown-values: allow
|
||||
ProviderSort:
|
||||
type: string
|
||||
nullable: true
|
||||
enum:
|
||||
- price
|
||||
- throughput
|
||||
- latency
|
||||
description: >-
|
||||
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
||||
example: price
|
||||
x-speakeasy-unknown-values: allow
|
||||
ProviderSortConfig:
|
||||
type: object
|
||||
properties:
|
||||
by:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderSort'
|
||||
- type: 'null'
|
||||
partition:
|
||||
anyOf:
|
||||
- type: string
|
||||
enum:
|
||||
- model
|
||||
- none
|
||||
x-speakeasy-unknown-values: allow
|
||||
- type: 'null'
|
||||
BigNumberUnion:
|
||||
type: string
|
||||
description: A value in string format that is a large number
|
||||
example: 1000
|
||||
WebSearchEngine:
|
||||
type: string
|
||||
enum:
|
||||
- native
|
||||
- exa
|
||||
description: The search engine to use for web search.
|
||||
x-speakeasy-unknown-values: allow
|
||||
PDFParserEngine:
|
||||
type: string
|
||||
enum:
|
||||
- mistral-ocr
|
||||
- pdf-text
|
||||
- native
|
||||
description: The engine to use for parsing PDF files.
|
||||
x-speakeasy-unknown-values: allow
|
||||
PDFParserOptions:
|
||||
type: object
|
||||
properties:
|
||||
engine:
|
||||
$ref: '#/components/schemas/PDFParserEngine'
|
||||
description: Options for PDF parsing.
|
||||
OpenResponsesRequest:
|
||||
type: object
|
||||
properties:
|
||||
@@ -3733,7 +3765,13 @@ components:
|
||||
$ref: '#/components/schemas/Quantization'
|
||||
description: A list of quantization levels to filter the provider by.
|
||||
sort:
|
||||
$ref: '#/components/schemas/ProviderSort'
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderSort'
|
||||
- $ref: '#/components/schemas/ProviderSortConfig'
|
||||
- nullable: true
|
||||
description: >-
|
||||
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
||||
example: price
|
||||
max_price:
|
||||
type: object
|
||||
properties:
|
||||
@@ -3749,18 +3787,33 @@ components:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
description: >-
|
||||
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
||||
preferred_min_throughput:
|
||||
type: number
|
||||
nullable: true
|
||||
description: >-
|
||||
Preferred minimum throughput (in tokens per second). Endpoints below this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
|
||||
example: 100
|
||||
preferred_max_latency:
|
||||
type: number
|
||||
nullable: true
|
||||
description: >-
|
||||
Preferred maximum latency (in seconds). Endpoints above this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
|
||||
example: 5
|
||||
min_throughput:
|
||||
type: number
|
||||
nullable: true
|
||||
example: 100
|
||||
deprecated: true
|
||||
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.
|
||||
**DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for preferred_min_throughput.
|
||||
example: 100
|
||||
x-speakeasy-deprecation-message: Use preferred_min_throughput instead.
|
||||
max_latency:
|
||||
type: number
|
||||
nullable: true
|
||||
deprecated: true
|
||||
description: '**DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency.'
|
||||
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.
|
||||
x-speakeasy-deprecation-message: Use preferred_max_latency instead.
|
||||
additionalProperties: false
|
||||
description: When multiple model providers are available, optionally indicate your routing preference.
|
||||
plugins:
|
||||
@@ -3789,11 +3842,7 @@ components:
|
||||
search_prompt:
|
||||
type: string
|
||||
engine:
|
||||
type: string
|
||||
enum:
|
||||
- native
|
||||
- exa
|
||||
x-speakeasy-unknown-values: allow
|
||||
$ref: '#/components/schemas/WebSearchEngine'
|
||||
required:
|
||||
- id
|
||||
- type: object
|
||||
@@ -3805,18 +3854,8 @@ components:
|
||||
enabled:
|
||||
type: boolean
|
||||
description: Set to false to disable the file-parser plugin for this request. Defaults to true.
|
||||
max_files:
|
||||
type: number
|
||||
pdf:
|
||||
type: object
|
||||
properties:
|
||||
engine:
|
||||
type: string
|
||||
enum:
|
||||
- mistral-ocr
|
||||
- pdf-text
|
||||
- native
|
||||
x-speakeasy-unknown-values: allow
|
||||
$ref: '#/components/schemas/PDFParserOptions'
|
||||
required:
|
||||
- id
|
||||
- type: object
|
||||
@@ -3837,8 +3876,12 @@ components:
|
||||
enum:
|
||||
- fallback
|
||||
- sort
|
||||
deprecated: true
|
||||
description: >-
|
||||
Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria.
|
||||
**DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").
|
||||
x-speakeasy-deprecation-message: Use providers.sort.partition instead.
|
||||
x-speakeasy-ignore: true
|
||||
x-fern-ignore: true
|
||||
x-speakeasy-unknown-values: allow
|
||||
user:
|
||||
type: string
|
||||
@@ -3996,6 +4039,123 @@ components:
|
||||
amount: 100
|
||||
sender: '0x1234567890123456789012345678901234567890'
|
||||
chain_id: 1
|
||||
ProviderPreferences:
|
||||
type: object
|
||||
properties:
|
||||
allow_fallbacks:
|
||||
type: boolean
|
||||
nullable: true
|
||||
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.
|
||||
|
||||
require_parameters:
|
||||
type: boolean
|
||||
nullable: true
|
||||
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.
|
||||
data_collection:
|
||||
$ref: '#/components/schemas/DataCollection'
|
||||
zdr:
|
||||
type: boolean
|
||||
nullable: true
|
||||
description: >-
|
||||
Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
|
||||
example: true
|
||||
enforce_distillable_text:
|
||||
type: boolean
|
||||
nullable: true
|
||||
description: >-
|
||||
Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
|
||||
example: true
|
||||
order:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderName'
|
||||
- type: string
|
||||
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.
|
||||
only:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderName'
|
||||
- type: string
|
||||
description: >-
|
||||
List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
|
||||
ignore:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderName'
|
||||
- type: string
|
||||
description: >-
|
||||
List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
|
||||
quantizations:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
$ref: '#/components/schemas/Quantization'
|
||||
description: A list of quantization levels to filter the provider by.
|
||||
sort:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ProviderSort'
|
||||
- anyOf:
|
||||
- $ref: '#/components/schemas/ProviderSort'
|
||||
- $ref: '#/components/schemas/ProviderSortConfig'
|
||||
- nullable: true
|
||||
description: >-
|
||||
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
||||
max_price:
|
||||
type: object
|
||||
properties:
|
||||
prompt:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
completion:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
image:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
audio:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
request:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
description: >-
|
||||
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
||||
preferred_min_throughput:
|
||||
type: number
|
||||
nullable: true
|
||||
description: >-
|
||||
Preferred minimum throughput (in tokens per second). Endpoints below this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
|
||||
example: 100
|
||||
preferred_max_latency:
|
||||
type: number
|
||||
nullable: true
|
||||
description: >-
|
||||
Preferred maximum latency (in seconds). Endpoints above this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
|
||||
example: 5
|
||||
min_throughput:
|
||||
type: number
|
||||
nullable: true
|
||||
deprecated: true
|
||||
description: >-
|
||||
**DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for preferred_min_throughput.
|
||||
example: 100
|
||||
x-speakeasy-deprecation-message: Use preferred_min_throughput instead.
|
||||
max_latency:
|
||||
type: number
|
||||
nullable: true
|
||||
deprecated: true
|
||||
description: '**DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency.'
|
||||
example: 5
|
||||
x-speakeasy-deprecation-message: Use preferred_max_latency instead.
|
||||
description: Provider routing preferences for the request.
|
||||
PublicPricing:
|
||||
type: object
|
||||
properties:
|
||||
@@ -4207,6 +4367,7 @@ components:
|
||||
- parallel_tool_calls
|
||||
- include_reasoning
|
||||
- reasoning
|
||||
- reasoning_effort
|
||||
- web_search_options
|
||||
- verbosity
|
||||
example: temperature
|
||||
@@ -4724,6 +4885,79 @@ components:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ChatCompletionFinishReason'
|
||||
- type: 'null'
|
||||
__schema3:
|
||||
oneOf:
|
||||
- type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
const: reasoning.summary
|
||||
summary:
|
||||
type: string
|
||||
id:
|
||||
$ref: '#/components/schemas/__schema4'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema5'
|
||||
index:
|
||||
$ref: '#/components/schemas/__schema6'
|
||||
required:
|
||||
- type
|
||||
- summary
|
||||
- type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
const: reasoning.encrypted
|
||||
data:
|
||||
type: string
|
||||
id:
|
||||
$ref: '#/components/schemas/__schema4'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema5'
|
||||
index:
|
||||
$ref: '#/components/schemas/__schema6'
|
||||
required:
|
||||
- type
|
||||
- data
|
||||
- type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
const: reasoning.text
|
||||
text:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
signature:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
id:
|
||||
$ref: '#/components/schemas/__schema4'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema5'
|
||||
index:
|
||||
$ref: '#/components/schemas/__schema6'
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
__schema4:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
__schema5:
|
||||
anyOf:
|
||||
- type: string
|
||||
enum:
|
||||
- unknown
|
||||
- openai-responses-v1
|
||||
- xai-responses-v1
|
||||
- anthropic-claude-v1
|
||||
- google-gemini-v1
|
||||
x-speakeasy-unknown-values: allow
|
||||
- type: 'null'
|
||||
__schema6:
|
||||
type: number
|
||||
ModelName:
|
||||
type: string
|
||||
ChatMessageContentItemText:
|
||||
@@ -5266,12 +5500,7 @@ components:
|
||||
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
|
||||
- $ref: '#/components/schemas/ProviderSortUnion'
|
||||
- type: 'null'
|
||||
max_price:
|
||||
description: >-
|
||||
@@ -5288,15 +5517,19 @@ components:
|
||||
$ref: '#/components/schemas/__schema1'
|
||||
request:
|
||||
$ref: '#/components/schemas/__schema1'
|
||||
preferred_min_throughput:
|
||||
anyOf:
|
||||
- type: number
|
||||
- type: 'null'
|
||||
preferred_max_latency:
|
||||
anyOf:
|
||||
- type: number
|
||||
- type: 'null'
|
||||
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'
|
||||
@@ -5340,8 +5573,6 @@ components:
|
||||
const: file-parser
|
||||
enabled:
|
||||
type: boolean
|
||||
max_files:
|
||||
type: number
|
||||
pdf:
|
||||
type: object
|
||||
properties:
|
||||
@@ -5365,8 +5596,6 @@ components:
|
||||
- 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:
|
||||
@@ -5445,12 +5674,12 @@ components:
|
||||
anyOf:
|
||||
- type: string
|
||||
enum:
|
||||
- none
|
||||
- minimal
|
||||
- low
|
||||
- medium
|
||||
- high
|
||||
- xhigh
|
||||
- high
|
||||
- medium
|
||||
- low
|
||||
- minimal
|
||||
- none
|
||||
x-speakeasy-unknown-values: allow
|
||||
- type: 'null'
|
||||
summary:
|
||||
@@ -5532,6 +5761,10 @@ components:
|
||||
type: boolean
|
||||
required:
|
||||
- messages
|
||||
ProviderSortUnion:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderSort'
|
||||
- $ref: '#/components/schemas/ProviderSortConfig'
|
||||
ChatResponseChoice:
|
||||
type: object
|
||||
properties:
|
||||
@@ -5541,6 +5774,10 @@ components:
|
||||
type: number
|
||||
message:
|
||||
$ref: '#/components/schemas/AssistantMessage'
|
||||
reasoning_details:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/__schema3'
|
||||
logprobs:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ChatMessageTokenLogprobs'
|
||||
@@ -5591,6 +5828,10 @@ components:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatStreamingMessageToolCall'
|
||||
reasoning_details:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/__schema3'
|
||||
ChatStreamingChoice:
|
||||
type: object
|
||||
properties:
|
||||
@@ -6417,99 +6658,7 @@ paths:
|
||||
user:
|
||||
type: string
|
||||
provider:
|
||||
type: object
|
||||
properties:
|
||||
allow_fallbacks:
|
||||
type: boolean
|
||||
nullable: true
|
||||
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.
|
||||
|
||||
require_parameters:
|
||||
type: boolean
|
||||
nullable: true
|
||||
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.
|
||||
data_collection:
|
||||
$ref: '#/components/schemas/DataCollection'
|
||||
zdr:
|
||||
type: boolean
|
||||
nullable: true
|
||||
description: >-
|
||||
Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
|
||||
example: true
|
||||
enforce_distillable_text:
|
||||
type: boolean
|
||||
nullable: true
|
||||
description: >-
|
||||
Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
|
||||
example: true
|
||||
order:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderName'
|
||||
- type: string
|
||||
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.
|
||||
only:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderName'
|
||||
- type: string
|
||||
description: >-
|
||||
List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
|
||||
ignore:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ProviderName'
|
||||
- type: string
|
||||
description: >-
|
||||
List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
|
||||
quantizations:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
$ref: '#/components/schemas/Quantization'
|
||||
description: A list of quantization levels to filter the provider by.
|
||||
sort:
|
||||
$ref: '#/components/schemas/ProviderSort'
|
||||
max_price:
|
||||
type: object
|
||||
properties:
|
||||
prompt:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
completion:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
image:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
audio:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
request:
|
||||
$ref: '#/components/schemas/BigNumberUnion'
|
||||
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.
|
||||
$ref: '#/components/schemas/ProviderPreferences'
|
||||
input_type:
|
||||
type: string
|
||||
required:
|
||||
@@ -7099,78 +7248,7 @@ paths:
|
||||
name: slug
|
||||
in: path
|
||||
- schema:
|
||||
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
|
||||
$ref: '#/components/schemas/ProviderName'
|
||||
required: false
|
||||
name: provider
|
||||
in: query
|
||||
@@ -7215,6 +7293,7 @@ paths:
|
||||
- parallel_tool_calls
|
||||
- include_reasoning
|
||||
- reasoning
|
||||
- reasoning_effort
|
||||
- web_search_options
|
||||
- verbosity
|
||||
x-speakeasy-unknown-values: allow
|
||||
|
||||
@@ -2,14 +2,14 @@ speakeasyVersion: 1.666.0
|
||||
sources:
|
||||
-OAS:
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:f1b59b9b643de5e20d6e3299a8274783d8c0854615876f5d7f6f081814842695
|
||||
sourceBlobDigest: sha256:ee1f2422281b3ed5b38951c74636ad192c9bb160f216069c1f7931ccc4e52553
|
||||
sourceRevisionDigest: sha256:01256c8494de6bfc13c36d82ae316a6a13d402194f844618bcd4d59e34f325f3
|
||||
sourceBlobDigest: sha256:4c80e48fd5e1cd030e68d664eb93984b4d5946867252ff1755a2bd2a05eccd4e
|
||||
tags:
|
||||
- latest
|
||||
OpenRouter API:
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:b128cdb6be96021e55feea5e2dcb6e7438de706138fcde4f871b14877885445b
|
||||
sourceBlobDigest: sha256:8b15f72eaabbd77f4642be28a2861fd1cfd5d8cfe96e72fb8a76832387c64fab
|
||||
sourceRevisionDigest: sha256:92f6f1568ba089ae8e52bd55d859a97e446ae232c4c9ca9302ea64705313c7a0
|
||||
sourceBlobDigest: sha256:6bbf6ab7123261f7e0604f1c640e32b5fc8fb6bb503b1bc8b12d0d78ed19fefc
|
||||
tags:
|
||||
- latest
|
||||
- 1.0.0
|
||||
@@ -17,10 +17,10 @@ targets:
|
||||
open-router:
|
||||
source: OpenRouter API
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:b128cdb6be96021e55feea5e2dcb6e7438de706138fcde4f871b14877885445b
|
||||
sourceBlobDigest: sha256:8b15f72eaabbd77f4642be28a2861fd1cfd5d8cfe96e72fb8a76832387c64fab
|
||||
sourceRevisionDigest: sha256:92f6f1568ba089ae8e52bd55d859a97e446ae232c4c9ca9302ea64705313c7a0
|
||||
sourceBlobDigest: sha256:6bbf6ab7123261f7e0604f1c640e32b5fc8fb6bb503b1bc8b12d0d78ed19fefc
|
||||
codeSamplesNamespace: open-router-python-code-samples
|
||||
codeSamplesRevisionDigest: sha256:92747cd4c744e6671784b73c124d89adc662799d11caf5e6573880f6bfb52405
|
||||
codeSamplesRevisionDigest: sha256:8340c172a77ca9ffeeea6ca5dce0d69a084a3ba0a4e2e41d098759f546d80da4
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: 1.666.0
|
||||
|
||||
Reference in New Issue
Block a user