mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-01 12:40:23 +08:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7df4cc0e94 | ||
|
|
f190e3f950 | ||
|
|
d433ce35e8 | ||
|
|
61e5216764 |
@@ -1,7 +1,9 @@
|
|||||||
{
|
{
|
||||||
"permissions": {
|
"permissions": {
|
||||||
"allow": [
|
"allow": [
|
||||||
"Bash(python3:*)"
|
"Bash(python3:*)",
|
||||||
|
"Bash(git push:*)",
|
||||||
|
"Bash(gh pr create:*)"
|
||||||
],
|
],
|
||||||
"deny": [],
|
"deny": [],
|
||||||
"ask": []
|
"ask": []
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
name: Copybara Sync to Monorepo
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request_target:
|
||||||
|
types: [opened, synchronize, reopened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sync:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
|
||||||
|
|
||||||
|
- name: Sync to Monorepo
|
||||||
|
uses: olivr/copybara-action@v1.2.5
|
||||||
|
with:
|
||||||
|
ssh_key: ${{ secrets.COPYBARA_SSH_KEY }}
|
||||||
|
access_token: ${{ secrets.MONOREPO_SYNC_TOKEN }}
|
||||||
|
sot_repo: OpenRouterTeam/python-sdk
|
||||||
|
destination_repo: OpenRouterTeam/openrouter-web
|
||||||
|
workflow: push
|
||||||
|
push_move: '||sdks/python||**'
|
||||||
|
push_exclude: '.github/workflows/copybara-sync.yaml'
|
||||||
|
copybara_options: ${{ github.event_name == 'pull_request_target' && '--force' || '' }}
|
||||||
+58
-19
@@ -1,12 +1,12 @@
|
|||||||
lockVersion: 2.0.0
|
lockVersion: 2.0.0
|
||||||
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
|
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
|
||||||
management:
|
management:
|
||||||
docChecksum: 01481f11e87a18cf1daa583fee2c88fb
|
docChecksum: a5b3a567dd4de3ab77a9f0b23d4a9f10
|
||||||
docVersion: 1.0.0
|
docVersion: 1.0.0
|
||||||
speakeasyVersion: 1.666.0
|
speakeasyVersion: 1.666.0
|
||||||
generationVersion: 2.768.0
|
generationVersion: 2.768.0
|
||||||
releaseVersion: 0.0.21
|
releaseVersion: 0.0.17
|
||||||
configChecksum: 52c13d7fdf159611bf5d900363e322ac
|
configChecksum: 50ef18bf69272fc09c257e3562e1b0df
|
||||||
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
|
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||||
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
|
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||||
published: true
|
published: true
|
||||||
@@ -29,6 +29,7 @@ features:
|
|||||||
globalServerURLs: 3.2.0
|
globalServerURLs: 3.2.0
|
||||||
globals: 3.0.0
|
globals: 3.0.0
|
||||||
groups: 3.0.1
|
groups: 3.0.1
|
||||||
|
ignores: 3.0.1
|
||||||
methodArguments: 1.0.2
|
methodArguments: 1.0.2
|
||||||
methodSecurity: 3.0.1
|
methodSecurity: 3.0.1
|
||||||
nameOverrides: 3.0.1
|
nameOverrides: 3.0.1
|
||||||
@@ -58,6 +59,14 @@ generatedFiles:
|
|||||||
- docs/components/chatcompletionfinishreason.md
|
- docs/components/chatcompletionfinishreason.md
|
||||||
- docs/components/chaterrorerror.md
|
- docs/components/chaterrorerror.md
|
||||||
- docs/components/chatgenerationparams.md
|
- docs/components/chatgenerationparams.md
|
||||||
|
- docs/components/chatgenerationparamsdatacollection.md
|
||||||
|
- docs/components/chatgenerationparamsmaxprice.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/chatgenerationparamsresponseformatjsonobject.md
|
||||||
- docs/components/chatgenerationparamsresponseformatpython.md
|
- docs/components/chatgenerationparamsresponseformatpython.md
|
||||||
- docs/components/chatgenerationparamsresponseformattext.md
|
- docs/components/chatgenerationparamsresponseformattext.md
|
||||||
@@ -121,7 +130,6 @@ generatedFiles:
|
|||||||
- docs/components/idmoderation.md
|
- docs/components/idmoderation.md
|
||||||
- docs/components/idresponsehealing.md
|
- docs/components/idresponsehealing.md
|
||||||
- docs/components/idweb.md
|
- docs/components/idweb.md
|
||||||
- docs/components/ignore.md
|
|
||||||
- docs/components/imagegenerationstatus.md
|
- docs/components/imagegenerationstatus.md
|
||||||
- docs/components/imageurl.md
|
- docs/components/imageurl.md
|
||||||
- docs/components/inputmodality.md
|
- docs/components/inputmodality.md
|
||||||
@@ -130,7 +138,6 @@ generatedFiles:
|
|||||||
- docs/components/internalserverresponseerrordata.md
|
- docs/components/internalserverresponseerrordata.md
|
||||||
- docs/components/jsonschemaconfig.md
|
- docs/components/jsonschemaconfig.md
|
||||||
- docs/components/listendpointsresponse.md
|
- docs/components/listendpointsresponse.md
|
||||||
- docs/components/maxprice.md
|
|
||||||
- docs/components/message.md
|
- docs/components/message.md
|
||||||
- docs/components/messagecontent.md
|
- docs/components/messagecontent.md
|
||||||
- docs/components/messagedeveloper.md
|
- docs/components/messagedeveloper.md
|
||||||
@@ -145,7 +152,6 @@ generatedFiles:
|
|||||||
- docs/components/namedtoolchoicefunction.md
|
- docs/components/namedtoolchoicefunction.md
|
||||||
- docs/components/notfoundresponseerrordata.md
|
- docs/components/notfoundresponseerrordata.md
|
||||||
- docs/components/object.md
|
- docs/components/object.md
|
||||||
- docs/components/only.md
|
|
||||||
- docs/components/openairesponsesannotation.md
|
- docs/components/openairesponsesannotation.md
|
||||||
- docs/components/openairesponsesincludable.md
|
- docs/components/openairesponsesincludable.md
|
||||||
- docs/components/openairesponsesincompletedetails.md
|
- docs/components/openairesponsesincompletedetails.md
|
||||||
@@ -244,6 +250,17 @@ generatedFiles:
|
|||||||
- docs/components/openresponsesreasoningsummarytextdoneeventtype.md
|
- docs/components/openresponsesreasoningsummarytextdoneeventtype.md
|
||||||
- docs/components/openresponsesreasoningtype.md
|
- docs/components/openresponsesreasoningtype.md
|
||||||
- docs/components/openresponsesrequest.md
|
- docs/components/openresponsesrequest.md
|
||||||
|
- docs/components/openresponsesrequestignore.md
|
||||||
|
- docs/components/openresponsesrequestmaxprice.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/openresponsesrequestsort.md
|
||||||
- docs/components/openresponsesrequesttoolfunction.md
|
- docs/components/openresponsesrequesttoolfunction.md
|
||||||
- docs/components/openresponsesrequesttoolunion.md
|
- docs/components/openresponsesrequesttoolunion.md
|
||||||
- docs/components/openresponsesrequesttype.md
|
- docs/components/openresponsesrequesttype.md
|
||||||
@@ -279,7 +296,6 @@ generatedFiles:
|
|||||||
- docs/components/openresponseswebsearchtool.md
|
- docs/components/openresponseswebsearchtool.md
|
||||||
- docs/components/openresponseswebsearchtoolfilters.md
|
- docs/components/openresponseswebsearchtoolfilters.md
|
||||||
- docs/components/openresponseswebsearchtooltype.md
|
- docs/components/openresponseswebsearchtooltype.md
|
||||||
- docs/components/order.md
|
|
||||||
- docs/components/outputitemimagegenerationcall.md
|
- docs/components/outputitemimagegenerationcall.md
|
||||||
- docs/components/outputitemimagegenerationcalltype.md
|
- docs/components/outputitemimagegenerationcalltype.md
|
||||||
- docs/components/outputmessage.md
|
- docs/components/outputmessage.md
|
||||||
@@ -295,27 +311,38 @@ generatedFiles:
|
|||||||
- docs/components/parameter.md
|
- docs/components/parameter.md
|
||||||
- docs/components/part1.md
|
- docs/components/part1.md
|
||||||
- docs/components/part2.md
|
- docs/components/part2.md
|
||||||
|
- docs/components/partition.md
|
||||||
- docs/components/payloadtoolargeresponseerrordata.md
|
- docs/components/payloadtoolargeresponseerrordata.md
|
||||||
- docs/components/paymentrequiredresponseerrordata.md
|
- docs/components/paymentrequiredresponseerrordata.md
|
||||||
- docs/components/pdf.md
|
- docs/components/pdf.md
|
||||||
- docs/components/pdfengine.md
|
- docs/components/pdfengine.md
|
||||||
|
- docs/components/pdfparserengine.md
|
||||||
|
- docs/components/pdfparseroptions.md
|
||||||
- docs/components/perrequestlimits.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/pricing.md
|
||||||
- docs/components/prompt.md
|
- docs/components/prompt.md
|
||||||
- docs/components/prompttokensdetails.md
|
- docs/components/prompttokensdetails.md
|
||||||
- docs/components/provider.md
|
|
||||||
- docs/components/providername.md
|
- docs/components/providername.md
|
||||||
- docs/components/provideroverloadedresponseerrordata.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/providersort.md
|
||||||
|
- docs/components/providersortconfig.md
|
||||||
|
- docs/components/providersortconfigenum.md
|
||||||
|
- docs/components/providersortconfigunion.md
|
||||||
|
- docs/components/providersortunion.md
|
||||||
- docs/components/publicendpoint.md
|
- docs/components/publicendpoint.md
|
||||||
- docs/components/publicendpointquantization.md
|
- docs/components/publicendpointquantization.md
|
||||||
- docs/components/publicpricing.md
|
- docs/components/publicpricing.md
|
||||||
- docs/components/quantization.md
|
- docs/components/quantization.md
|
||||||
|
- docs/components/quantizations.md
|
||||||
- docs/components/reason.md
|
- docs/components/reason.md
|
||||||
- docs/components/reasoning.md
|
- docs/components/reasoning.md
|
||||||
- docs/components/reasoningsummarytext.md
|
- docs/components/reasoningsummarytext.md
|
||||||
@@ -379,9 +406,18 @@ generatedFiles:
|
|||||||
- docs/components/responseswebsearchuserlocationtype.md
|
- docs/components/responseswebsearchuserlocationtype.md
|
||||||
- docs/components/responsetextconfig.md
|
- docs/components/responsetextconfig.md
|
||||||
- docs/components/responsetextconfigverbosity.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/security.md
|
||||||
- docs/components/servicetier.md
|
- docs/components/servicetier.md
|
||||||
- docs/components/serviceunavailableresponseerrordata.md
|
- docs/components/serviceunavailableresponseerrordata.md
|
||||||
|
- docs/components/sortenum.md
|
||||||
- docs/components/streamoptions.md
|
- docs/components/streamoptions.md
|
||||||
- docs/components/systemmessage.md
|
- docs/components/systemmessage.md
|
||||||
- docs/components/systemmessagecontent.md
|
- docs/components/systemmessagecontent.md
|
||||||
@@ -423,6 +459,7 @@ generatedFiles:
|
|||||||
- docs/components/variables.md
|
- docs/components/variables.md
|
||||||
- docs/components/videourl1.md
|
- docs/components/videourl1.md
|
||||||
- docs/components/videourl2.md
|
- docs/components/videourl2.md
|
||||||
|
- docs/components/websearchengine.md
|
||||||
- docs/components/websearchpreviewtooluserlocation.md
|
- docs/components/websearchpreviewtooluserlocation.md
|
||||||
- docs/components/websearchpreviewtooluserlocationtype.md
|
- docs/components/websearchpreviewtooluserlocationtype.md
|
||||||
- docs/components/websearchstatus.md
|
- docs/components/websearchstatus.md
|
||||||
@@ -456,7 +493,6 @@ generatedFiles:
|
|||||||
- docs/operations/createcoinbasechargeresponse.md
|
- docs/operations/createcoinbasechargeresponse.md
|
||||||
- docs/operations/createcoinbasechargesecurity.md
|
- docs/operations/createcoinbasechargesecurity.md
|
||||||
- docs/operations/createembeddingsdata.md
|
- docs/operations/createembeddingsdata.md
|
||||||
- docs/operations/createembeddingsprovider.md
|
|
||||||
- docs/operations/createembeddingsrequest.md
|
- docs/operations/createembeddingsrequest.md
|
||||||
- docs/operations/createembeddingsresponse.md
|
- docs/operations/createembeddingsresponse.md
|
||||||
- docs/operations/createembeddingsresponsebody.md
|
- docs/operations/createembeddingsresponsebody.md
|
||||||
@@ -485,13 +521,11 @@ generatedFiles:
|
|||||||
- docs/operations/getkeyresponse.md
|
- docs/operations/getkeyresponse.md
|
||||||
- docs/operations/getmodelsrequest.md
|
- docs/operations/getmodelsrequest.md
|
||||||
- docs/operations/getparametersdata.md
|
- docs/operations/getparametersdata.md
|
||||||
- docs/operations/getparametersprovider.md
|
|
||||||
- docs/operations/getparametersrequest.md
|
- docs/operations/getparametersrequest.md
|
||||||
- docs/operations/getparametersresponse.md
|
- docs/operations/getparametersresponse.md
|
||||||
- docs/operations/getparameterssecurity.md
|
- docs/operations/getparameterssecurity.md
|
||||||
- docs/operations/getuseractivityrequest.md
|
- docs/operations/getuseractivityrequest.md
|
||||||
- docs/operations/getuseractivityresponse.md
|
- docs/operations/getuseractivityresponse.md
|
||||||
- docs/operations/ignore.md
|
|
||||||
- docs/operations/imageurl.md
|
- docs/operations/imageurl.md
|
||||||
- docs/operations/input.md
|
- docs/operations/input.md
|
||||||
- docs/operations/inputunion.md
|
- docs/operations/inputunion.md
|
||||||
@@ -504,12 +538,9 @@ generatedFiles:
|
|||||||
- docs/operations/listprovidersresponse.md
|
- docs/operations/listprovidersresponse.md
|
||||||
- docs/operations/listrequest.md
|
- docs/operations/listrequest.md
|
||||||
- docs/operations/listresponse.md
|
- docs/operations/listresponse.md
|
||||||
- docs/operations/maxprice.md
|
|
||||||
- docs/operations/metadata.md
|
- docs/operations/metadata.md
|
||||||
- docs/operations/object.md
|
- docs/operations/object.md
|
||||||
- docs/operations/objectembedding.md
|
- docs/operations/objectembedding.md
|
||||||
- docs/operations/only.md
|
|
||||||
- docs/operations/order.md
|
|
||||||
- docs/operations/ratelimit.md
|
- docs/operations/ratelimit.md
|
||||||
- docs/operations/sendchatcompletionrequestresponse.md
|
- docs/operations/sendchatcompletionrequestresponse.md
|
||||||
- docs/operations/supportedparameter.md
|
- docs/operations/supportedparameter.md
|
||||||
@@ -552,6 +583,8 @@ generatedFiles:
|
|||||||
- src/openrouter/chat.py
|
- src/openrouter/chat.py
|
||||||
- src/openrouter/completions.py
|
- src/openrouter/completions.py
|
||||||
- src/openrouter/components/__init__.py
|
- src/openrouter/components/__init__.py
|
||||||
|
- src/openrouter/components/_schema0.py
|
||||||
|
- src/openrouter/components/_schema3.py
|
||||||
- src/openrouter/components/activityitem.py
|
- src/openrouter/components/activityitem.py
|
||||||
- src/openrouter/components/assistantmessage.py
|
- src/openrouter/components/assistantmessage.py
|
||||||
- src/openrouter/components/badgatewayresponseerrordata.py
|
- src/openrouter/components/badgatewayresponseerrordata.py
|
||||||
@@ -649,10 +682,15 @@ generatedFiles:
|
|||||||
- src/openrouter/components/parameter.py
|
- src/openrouter/components/parameter.py
|
||||||
- src/openrouter/components/payloadtoolargeresponseerrordata.py
|
- src/openrouter/components/payloadtoolargeresponseerrordata.py
|
||||||
- src/openrouter/components/paymentrequiredresponseerrordata.py
|
- src/openrouter/components/paymentrequiredresponseerrordata.py
|
||||||
|
- src/openrouter/components/pdfparserengine.py
|
||||||
|
- src/openrouter/components/pdfparseroptions.py
|
||||||
- src/openrouter/components/perrequestlimits.py
|
- src/openrouter/components/perrequestlimits.py
|
||||||
- src/openrouter/components/providername.py
|
- src/openrouter/components/providername.py
|
||||||
- src/openrouter/components/provideroverloadedresponseerrordata.py
|
- src/openrouter/components/provideroverloadedresponseerrordata.py
|
||||||
|
- src/openrouter/components/providerpreferences.py
|
||||||
- src/openrouter/components/providersort.py
|
- src/openrouter/components/providersort.py
|
||||||
|
- src/openrouter/components/providersortconfig.py
|
||||||
|
- src/openrouter/components/providersortunion.py
|
||||||
- src/openrouter/components/publicendpoint.py
|
- src/openrouter/components/publicendpoint.py
|
||||||
- src/openrouter/components/publicpricing.py
|
- src/openrouter/components/publicpricing.py
|
||||||
- src/openrouter/components/quantization.py
|
- src/openrouter/components/quantization.py
|
||||||
@@ -694,6 +732,7 @@ generatedFiles:
|
|||||||
- src/openrouter/components/unprocessableentityresponseerrordata.py
|
- src/openrouter/components/unprocessableentityresponseerrordata.py
|
||||||
- src/openrouter/components/urlcitation.py
|
- src/openrouter/components/urlcitation.py
|
||||||
- src/openrouter/components/usermessage.py
|
- src/openrouter/components/usermessage.py
|
||||||
|
- src/openrouter/components/websearchengine.py
|
||||||
- src/openrouter/components/websearchpreviewtooluserlocation.py
|
- src/openrouter/components/websearchpreviewtooluserlocation.py
|
||||||
- src/openrouter/components/websearchstatus.py
|
- src/openrouter/components/websearchstatus.py
|
||||||
- src/openrouter/credits.py
|
- src/openrouter/credits.py
|
||||||
|
|||||||
+3
-1
@@ -31,7 +31,7 @@ generation:
|
|||||||
skipResponseBodyAssertions: false
|
skipResponseBodyAssertions: false
|
||||||
preApplyUnionDiscriminators: true
|
preApplyUnionDiscriminators: true
|
||||||
python:
|
python:
|
||||||
version: 0.0.21
|
version: 0.0.17
|
||||||
additionalDependencies:
|
additionalDependencies:
|
||||||
dev: {}
|
dev: {}
|
||||||
main: {}
|
main: {}
|
||||||
@@ -39,6 +39,8 @@ python:
|
|||||||
- id
|
- id
|
||||||
- object
|
- object
|
||||||
- input
|
- input
|
||||||
|
- models
|
||||||
|
- hash
|
||||||
asyncMode: both
|
asyncMode: both
|
||||||
authors:
|
authors:
|
||||||
- OpenRouter
|
- OpenRouter
|
||||||
|
|||||||
+609
-195
@@ -1054,6 +1054,7 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
enum:
|
enum:
|
||||||
|
- xhigh
|
||||||
- high
|
- high
|
||||||
- medium
|
- medium
|
||||||
- low
|
- low
|
||||||
@@ -3479,6 +3480,7 @@ components:
|
|||||||
- Infermatic
|
- Infermatic
|
||||||
- Inflection
|
- Inflection
|
||||||
- Liquid
|
- Liquid
|
||||||
|
- Mara
|
||||||
- Mancer 2
|
- Mancer 2
|
||||||
- Minimax
|
- Minimax
|
||||||
- ModelRun
|
- ModelRun
|
||||||
@@ -3507,6 +3509,7 @@ components:
|
|||||||
- Together
|
- Together
|
||||||
- Venice
|
- Venice
|
||||||
- WandB
|
- WandB
|
||||||
|
- Xiaomi
|
||||||
- xAI
|
- xAI
|
||||||
- Z.AI
|
- Z.AI
|
||||||
- FakeProvider
|
- FakeProvider
|
||||||
@@ -3526,23 +3529,47 @@ components:
|
|||||||
example: fp16
|
example: fp16
|
||||||
ProviderSort:
|
ProviderSort:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
|
||||||
enum:
|
enum:
|
||||||
- price
|
- price
|
||||||
- throughput
|
- throughput
|
||||||
- latency
|
- latency
|
||||||
description: >-
|
ProviderSortConfig:
|
||||||
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is
|
type: object
|
||||||
performed.
|
properties:
|
||||||
example: price
|
by:
|
||||||
BigNumberUnion:
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/ProviderSort'
|
||||||
|
- type: 'null'
|
||||||
|
partition:
|
||||||
anyOf:
|
anyOf:
|
||||||
- type: number
|
|
||||||
- type: string
|
- type: string
|
||||||
- type: number
|
enum:
|
||||||
example: 1000
|
- model
|
||||||
description: A value in string or number format that is a large number
|
- none
|
||||||
|
- type: 'null'
|
||||||
|
BigNumberUnion:
|
||||||
|
type: string
|
||||||
|
description: A value in string format that is a large number
|
||||||
example: 1000
|
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:
|
OpenResponsesRequest:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -3722,7 +3749,14 @@ components:
|
|||||||
$ref: '#/components/schemas/Quantization'
|
$ref: '#/components/schemas/Quantization'
|
||||||
description: A list of quantization levels to filter the provider by.
|
description: A list of quantization levels to filter the provider by.
|
||||||
sort:
|
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:
|
max_price:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -3736,10 +3770,41 @@ components:
|
|||||||
$ref: '#/components/schemas/BigNumberUnion'
|
$ref: '#/components/schemas/BigNumberUnion'
|
||||||
request:
|
request:
|
||||||
$ref: '#/components/schemas/BigNumberUnion'
|
$ref: '#/components/schemas/BigNumberUnion'
|
||||||
additionalProperties: false
|
|
||||||
description: >-
|
description: >-
|
||||||
The object specifying the maximum price you want to pay for this request. USD price per million tokens,
|
The object specifying the maximum price you want to pay for this request. USD price per million tokens,
|
||||||
for prompt and completion.
|
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.
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
description: When multiple model providers are available, optionally indicate your routing preference.
|
description: When multiple model providers are available, optionally indicate your routing preference.
|
||||||
plugins:
|
plugins:
|
||||||
@@ -3760,15 +3825,15 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
- web
|
- web
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
description: Set to false to disable the web-search plugin for this request. Defaults to true.
|
||||||
max_results:
|
max_results:
|
||||||
type: number
|
type: number
|
||||||
search_prompt:
|
search_prompt:
|
||||||
type: string
|
type: string
|
||||||
engine:
|
engine:
|
||||||
type: string
|
$ref: '#/components/schemas/WebSearchEngine'
|
||||||
enum:
|
|
||||||
- native
|
|
||||||
- exa
|
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
- type: object
|
- type: object
|
||||||
@@ -3777,17 +3842,11 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
- file-parser
|
- file-parser
|
||||||
max_files:
|
enabled:
|
||||||
type: number
|
type: boolean
|
||||||
|
description: Set to false to disable the file-parser plugin for this request. Defaults to true.
|
||||||
pdf:
|
pdf:
|
||||||
type: object
|
$ref: '#/components/schemas/PDFParserOptions'
|
||||||
properties:
|
|
||||||
engine:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- mistral-ocr
|
|
||||||
- pdf-text
|
|
||||||
- native
|
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
- type: object
|
- type: object
|
||||||
@@ -3796,9 +3855,25 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
- response-healing
|
- response-healing
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
description: Set to false to disable the response-healing plugin for this request. Defaults to true.
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
description: Plugins you want to enable for this request, including their settings.
|
description: Plugins you want to enable for this request, including their settings.
|
||||||
|
route:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
enum:
|
||||||
|
- fallback
|
||||||
|
- sort
|
||||||
|
deprecated: true
|
||||||
|
description: >-
|
||||||
|
**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:
|
user:
|
||||||
type: string
|
type: string
|
||||||
maxLength: 128
|
maxLength: 128
|
||||||
@@ -3958,6 +4033,137 @@ components:
|
|||||||
amount: 100
|
amount: 100
|
||||||
sender: '0x1234567890123456789012345678901234567890'
|
sender: '0x1234567890123456789012345678901234567890'
|
||||||
chain_id: 1
|
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:
|
PublicPricing:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -4165,6 +4371,7 @@ components:
|
|||||||
- parallel_tool_calls
|
- parallel_tool_calls
|
||||||
- include_reasoning
|
- include_reasoning
|
||||||
- reasoning
|
- reasoning
|
||||||
|
- reasoning_effort
|
||||||
- web_search_options
|
- web_search_options
|
||||||
- verbosity
|
- verbosity
|
||||||
example: temperature
|
example: temperature
|
||||||
@@ -4594,9 +4801,162 @@ components:
|
|||||||
uptime_last_30m: 99.5
|
uptime_last_30m: 99.5
|
||||||
supports_implicit_caching: true
|
supports_implicit_caching: true
|
||||||
__schema0:
|
__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:
|
anyOf:
|
||||||
- $ref: '#/components/schemas/ChatCompletionFinishReason'
|
- $ref: '#/components/schemas/ChatCompletionFinishReason'
|
||||||
- type: 'null'
|
- 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:
|
ModelName:
|
||||||
type: string
|
type: string
|
||||||
ChatMessageContentItemText:
|
ChatMessageContentItemText:
|
||||||
@@ -5051,6 +5411,207 @@ components:
|
|||||||
ChatGenerationParams:
|
ChatGenerationParams:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
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:
|
||||||
|
- $ref: '#/components/schemas/ProviderSortUnion'
|
||||||
|
- 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'
|
||||||
|
preferred_min_throughput:
|
||||||
|
anyOf:
|
||||||
|
- type: number
|
||||||
|
- type: 'null'
|
||||||
|
preferred_max_latency:
|
||||||
|
anyOf:
|
||||||
|
- type: number
|
||||||
|
- type: 'null'
|
||||||
|
min_throughput:
|
||||||
|
anyOf:
|
||||||
|
- type: number
|
||||||
|
- type: 'null'
|
||||||
|
max_latency:
|
||||||
|
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
|
||||||
|
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:
|
||||||
|
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:
|
messages:
|
||||||
minItems: 1
|
minItems: 1
|
||||||
type: array
|
type: array
|
||||||
@@ -5115,11 +5676,12 @@ components:
|
|||||||
anyOf:
|
anyOf:
|
||||||
- type: string
|
- type: string
|
||||||
enum:
|
enum:
|
||||||
- none
|
- xhigh
|
||||||
- minimal
|
|
||||||
- low
|
|
||||||
- medium
|
|
||||||
- high
|
- high
|
||||||
|
- medium
|
||||||
|
- low
|
||||||
|
- minimal
|
||||||
|
- none
|
||||||
- type: 'null'
|
- type: 'null'
|
||||||
summary:
|
summary:
|
||||||
anyOf:
|
anyOf:
|
||||||
@@ -5193,8 +5755,6 @@ components:
|
|||||||
minimum: 0
|
minimum: 0
|
||||||
maximum: 1
|
maximum: 1
|
||||||
- type: 'null'
|
- type: 'null'
|
||||||
user:
|
|
||||||
type: string
|
|
||||||
debug:
|
debug:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -5202,15 +5762,23 @@ components:
|
|||||||
type: boolean
|
type: boolean
|
||||||
required:
|
required:
|
||||||
- messages
|
- messages
|
||||||
|
ProviderSortUnion:
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/ProviderSort'
|
||||||
|
- $ref: '#/components/schemas/ProviderSortConfig'
|
||||||
ChatResponseChoice:
|
ChatResponseChoice:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
finish_reason:
|
finish_reason:
|
||||||
$ref: '#/components/schemas/__schema0'
|
$ref: '#/components/schemas/__schema2'
|
||||||
index:
|
index:
|
||||||
type: number
|
type: number
|
||||||
message:
|
message:
|
||||||
$ref: '#/components/schemas/AssistantMessage'
|
$ref: '#/components/schemas/AssistantMessage'
|
||||||
|
reasoning_details:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/__schema3'
|
||||||
logprobs:
|
logprobs:
|
||||||
anyOf:
|
anyOf:
|
||||||
- $ref: '#/components/schemas/ChatMessageTokenLogprobs'
|
- $ref: '#/components/schemas/ChatMessageTokenLogprobs'
|
||||||
@@ -5261,13 +5829,17 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatStreamingMessageToolCall'
|
$ref: '#/components/schemas/ChatStreamingMessageToolCall'
|
||||||
|
reasoning_details:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/__schema3'
|
||||||
ChatStreamingChoice:
|
ChatStreamingChoice:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
delta:
|
delta:
|
||||||
$ref: '#/components/schemas/ChatStreamingMessageChunk'
|
$ref: '#/components/schemas/ChatStreamingMessageChunk'
|
||||||
finish_reason:
|
finish_reason:
|
||||||
$ref: '#/components/schemas/__schema0'
|
$ref: '#/components/schemas/__schema2'
|
||||||
index:
|
index:
|
||||||
type: number
|
type: number
|
||||||
logprobs:
|
logprobs:
|
||||||
@@ -6085,98 +6657,7 @@ paths:
|
|||||||
user:
|
user:
|
||||||
type: string
|
type: string
|
||||||
provider:
|
provider:
|
||||||
type: object
|
$ref: '#/components/schemas/ProviderPreferences'
|
||||||
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'
|
|
||||||
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.
|
|
||||||
input_type:
|
input_type:
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
@@ -6778,75 +7259,7 @@ paths:
|
|||||||
name: slug
|
name: slug
|
||||||
in: path
|
in: path
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
$ref: '#/components/schemas/ProviderName'
|
||||||
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
|
|
||||||
- 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
|
|
||||||
- xAI
|
|
||||||
- Z.AI
|
|
||||||
- FakeProvider
|
|
||||||
required: false
|
required: false
|
||||||
name: provider
|
name: provider
|
||||||
in: query
|
in: query
|
||||||
@@ -6891,6 +7304,7 @@ paths:
|
|||||||
- parallel_tool_calls
|
- parallel_tool_calls
|
||||||
- include_reasoning
|
- include_reasoning
|
||||||
- reasoning
|
- reasoning
|
||||||
|
- reasoning_effort
|
||||||
- web_search_options
|
- web_search_options
|
||||||
- verbosity
|
- verbosity
|
||||||
description: List of parameters supported by this model
|
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"
|
||||||
+588
-187
@@ -1063,6 +1063,7 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
enum:
|
enum:
|
||||||
|
- xhigh
|
||||||
- high
|
- high
|
||||||
- medium
|
- medium
|
||||||
- low
|
- low
|
||||||
@@ -3496,6 +3497,7 @@ components:
|
|||||||
- Infermatic
|
- Infermatic
|
||||||
- Inflection
|
- Inflection
|
||||||
- Liquid
|
- Liquid
|
||||||
|
- Mara
|
||||||
- Mancer 2
|
- Mancer 2
|
||||||
- Minimax
|
- Minimax
|
||||||
- ModelRun
|
- ModelRun
|
||||||
@@ -3524,6 +3526,7 @@ components:
|
|||||||
- Together
|
- Together
|
||||||
- Venice
|
- Venice
|
||||||
- WandB
|
- WandB
|
||||||
|
- Xiaomi
|
||||||
- xAI
|
- xAI
|
||||||
- Z.AI
|
- Z.AI
|
||||||
- FakeProvider
|
- FakeProvider
|
||||||
@@ -3545,23 +3548,51 @@ components:
|
|||||||
x-speakeasy-unknown-values: allow
|
x-speakeasy-unknown-values: allow
|
||||||
ProviderSort:
|
ProviderSort:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
|
||||||
enum:
|
enum:
|
||||||
- price
|
- price
|
||||||
- throughput
|
- throughput
|
||||||
- latency
|
- 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
|
x-speakeasy-unknown-values: allow
|
||||||
BigNumberUnion:
|
ProviderSortConfig:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
by:
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/ProviderSort'
|
||||||
|
- type: 'null'
|
||||||
|
partition:
|
||||||
anyOf:
|
anyOf:
|
||||||
- type: number
|
|
||||||
- type: string
|
- type: string
|
||||||
- type: number
|
enum:
|
||||||
example: 1000
|
- model
|
||||||
description: A value in string or number format that is a large number
|
- none
|
||||||
|
x-speakeasy-unknown-values: allow
|
||||||
|
- type: 'null'
|
||||||
|
BigNumberUnion:
|
||||||
|
type: string
|
||||||
|
description: A value in string format that is a large number
|
||||||
example: 1000
|
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:
|
OpenResponsesRequest:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -3734,7 +3765,13 @@ components:
|
|||||||
$ref: '#/components/schemas/Quantization'
|
$ref: '#/components/schemas/Quantization'
|
||||||
description: A list of quantization levels to filter the provider by.
|
description: A list of quantization levels to filter the provider by.
|
||||||
sort:
|
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:
|
max_price:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -3748,9 +3785,35 @@ components:
|
|||||||
$ref: '#/components/schemas/BigNumberUnion'
|
$ref: '#/components/schemas/BigNumberUnion'
|
||||||
request:
|
request:
|
||||||
$ref: '#/components/schemas/BigNumberUnion'
|
$ref: '#/components/schemas/BigNumberUnion'
|
||||||
additionalProperties: false
|
|
||||||
description: >-
|
description: >-
|
||||||
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
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.
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
description: When multiple model providers are available, optionally indicate your routing preference.
|
description: When multiple model providers are available, optionally indicate your routing preference.
|
||||||
plugins:
|
plugins:
|
||||||
@@ -3771,16 +3834,15 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
- web
|
- web
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
description: Set to false to disable the web-search plugin for this request. Defaults to true.
|
||||||
max_results:
|
max_results:
|
||||||
type: number
|
type: number
|
||||||
search_prompt:
|
search_prompt:
|
||||||
type: string
|
type: string
|
||||||
engine:
|
engine:
|
||||||
type: string
|
$ref: '#/components/schemas/WebSearchEngine'
|
||||||
enum:
|
|
||||||
- native
|
|
||||||
- exa
|
|
||||||
x-speakeasy-unknown-values: allow
|
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
- type: object
|
- type: object
|
||||||
@@ -3789,18 +3851,11 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
- file-parser
|
- file-parser
|
||||||
max_files:
|
enabled:
|
||||||
type: number
|
type: boolean
|
||||||
|
description: Set to false to disable the file-parser plugin for this request. Defaults to true.
|
||||||
pdf:
|
pdf:
|
||||||
type: object
|
$ref: '#/components/schemas/PDFParserOptions'
|
||||||
properties:
|
|
||||||
engine:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- mistral-ocr
|
|
||||||
- pdf-text
|
|
||||||
- native
|
|
||||||
x-speakeasy-unknown-values: allow
|
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
- type: object
|
- type: object
|
||||||
@@ -3809,9 +3864,25 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
- response-healing
|
- response-healing
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
description: Set to false to disable the response-healing plugin for this request. Defaults to true.
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
description: Plugins you want to enable for this request, including their settings.
|
description: Plugins you want to enable for this request, including their settings.
|
||||||
|
route:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
enum:
|
||||||
|
- fallback
|
||||||
|
- sort
|
||||||
|
deprecated: true
|
||||||
|
description: >-
|
||||||
|
**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:
|
user:
|
||||||
type: string
|
type: string
|
||||||
maxLength: 128
|
maxLength: 128
|
||||||
@@ -3968,6 +4039,123 @@ components:
|
|||||||
amount: 100
|
amount: 100
|
||||||
sender: '0x1234567890123456789012345678901234567890'
|
sender: '0x1234567890123456789012345678901234567890'
|
||||||
chain_id: 1
|
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:
|
PublicPricing:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -4179,6 +4367,7 @@ components:
|
|||||||
- parallel_tool_calls
|
- parallel_tool_calls
|
||||||
- include_reasoning
|
- include_reasoning
|
||||||
- reasoning
|
- reasoning
|
||||||
|
- reasoning_effort
|
||||||
- web_search_options
|
- web_search_options
|
||||||
- verbosity
|
- verbosity
|
||||||
example: temperature
|
example: temperature
|
||||||
@@ -4611,9 +4800,164 @@ components:
|
|||||||
uptime_last_30m: 99.5
|
uptime_last_30m: 99.5
|
||||||
supports_implicit_caching: true
|
supports_implicit_caching: true
|
||||||
__schema0:
|
__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:
|
anyOf:
|
||||||
- $ref: '#/components/schemas/ChatCompletionFinishReason'
|
- $ref: '#/components/schemas/ChatCompletionFinishReason'
|
||||||
- type: 'null'
|
- 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:
|
ModelName:
|
||||||
type: string
|
type: string
|
||||||
ChatMessageContentItemText:
|
ChatMessageContentItemText:
|
||||||
@@ -5071,6 +5415,201 @@ components:
|
|||||||
ChatGenerationParams:
|
ChatGenerationParams:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
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:
|
||||||
|
- $ref: '#/components/schemas/ProviderSortUnion'
|
||||||
|
- 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'
|
||||||
|
preferred_min_throughput:
|
||||||
|
anyOf:
|
||||||
|
- type: number
|
||||||
|
- type: 'null'
|
||||||
|
preferred_max_latency:
|
||||||
|
anyOf:
|
||||||
|
- type: number
|
||||||
|
- type: 'null'
|
||||||
|
min_throughput:
|
||||||
|
anyOf:
|
||||||
|
- type: number
|
||||||
|
- type: 'null'
|
||||||
|
max_latency:
|
||||||
|
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
|
||||||
|
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:
|
||||||
|
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:
|
messages:
|
||||||
minItems: 1
|
minItems: 1
|
||||||
type: array
|
type: array
|
||||||
@@ -5135,11 +5674,12 @@ components:
|
|||||||
anyOf:
|
anyOf:
|
||||||
- type: string
|
- type: string
|
||||||
enum:
|
enum:
|
||||||
- none
|
- xhigh
|
||||||
- minimal
|
|
||||||
- low
|
|
||||||
- medium
|
|
||||||
- high
|
- high
|
||||||
|
- medium
|
||||||
|
- low
|
||||||
|
- minimal
|
||||||
|
- none
|
||||||
x-speakeasy-unknown-values: allow
|
x-speakeasy-unknown-values: allow
|
||||||
- type: 'null'
|
- type: 'null'
|
||||||
summary:
|
summary:
|
||||||
@@ -5214,8 +5754,6 @@ components:
|
|||||||
minimum: 0
|
minimum: 0
|
||||||
maximum: 1
|
maximum: 1
|
||||||
- type: 'null'
|
- type: 'null'
|
||||||
user:
|
|
||||||
type: string
|
|
||||||
debug:
|
debug:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -5223,15 +5761,23 @@ components:
|
|||||||
type: boolean
|
type: boolean
|
||||||
required:
|
required:
|
||||||
- messages
|
- messages
|
||||||
|
ProviderSortUnion:
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/ProviderSort'
|
||||||
|
- $ref: '#/components/schemas/ProviderSortConfig'
|
||||||
ChatResponseChoice:
|
ChatResponseChoice:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
finish_reason:
|
finish_reason:
|
||||||
$ref: '#/components/schemas/__schema0'
|
$ref: '#/components/schemas/__schema2'
|
||||||
index:
|
index:
|
||||||
type: number
|
type: number
|
||||||
message:
|
message:
|
||||||
$ref: '#/components/schemas/AssistantMessage'
|
$ref: '#/components/schemas/AssistantMessage'
|
||||||
|
reasoning_details:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/__schema3'
|
||||||
logprobs:
|
logprobs:
|
||||||
anyOf:
|
anyOf:
|
||||||
- $ref: '#/components/schemas/ChatMessageTokenLogprobs'
|
- $ref: '#/components/schemas/ChatMessageTokenLogprobs'
|
||||||
@@ -5282,13 +5828,17 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatStreamingMessageToolCall'
|
$ref: '#/components/schemas/ChatStreamingMessageToolCall'
|
||||||
|
reasoning_details:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/__schema3'
|
||||||
ChatStreamingChoice:
|
ChatStreamingChoice:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
delta:
|
delta:
|
||||||
$ref: '#/components/schemas/ChatStreamingMessageChunk'
|
$ref: '#/components/schemas/ChatStreamingMessageChunk'
|
||||||
finish_reason:
|
finish_reason:
|
||||||
$ref: '#/components/schemas/__schema0'
|
$ref: '#/components/schemas/__schema2'
|
||||||
index:
|
index:
|
||||||
type: number
|
type: number
|
||||||
logprobs:
|
logprobs:
|
||||||
@@ -6108,88 +6658,7 @@ paths:
|
|||||||
user:
|
user:
|
||||||
type: string
|
type: string
|
||||||
provider:
|
provider:
|
||||||
type: object
|
$ref: '#/components/schemas/ProviderPreferences'
|
||||||
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'
|
|
||||||
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.
|
|
||||||
input_type:
|
input_type:
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
@@ -6779,76 +7248,7 @@ paths:
|
|||||||
name: slug
|
name: slug
|
||||||
in: path
|
in: path
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
$ref: '#/components/schemas/ProviderName'
|
||||||
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
|
|
||||||
- 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
|
|
||||||
- xAI
|
|
||||||
- Z.AI
|
|
||||||
- FakeProvider
|
|
||||||
x-speakeasy-unknown-values: allow
|
|
||||||
required: false
|
required: false
|
||||||
name: provider
|
name: provider
|
||||||
in: query
|
in: query
|
||||||
@@ -6893,6 +7293,7 @@ paths:
|
|||||||
- parallel_tool_calls
|
- parallel_tool_calls
|
||||||
- include_reasoning
|
- include_reasoning
|
||||||
- reasoning
|
- reasoning
|
||||||
|
- reasoning_effort
|
||||||
- web_search_options
|
- web_search_options
|
||||||
- verbosity
|
- verbosity
|
||||||
x-speakeasy-unknown-values: allow
|
x-speakeasy-unknown-values: allow
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ speakeasyVersion: 1.666.0
|
|||||||
sources:
|
sources:
|
||||||
-OAS:
|
-OAS:
|
||||||
sourceNamespace: open-router-chat-completions-api
|
sourceNamespace: open-router-chat-completions-api
|
||||||
sourceRevisionDigest: sha256:f1b59b9b643de5e20d6e3299a8274783d8c0854615876f5d7f6f081814842695
|
sourceRevisionDigest: sha256:01256c8494de6bfc13c36d82ae316a6a13d402194f844618bcd4d59e34f325f3
|
||||||
sourceBlobDigest: sha256:ee1f2422281b3ed5b38951c74636ad192c9bb160f216069c1f7931ccc4e52553
|
sourceBlobDigest: sha256:4c80e48fd5e1cd030e68d664eb93984b4d5946867252ff1755a2bd2a05eccd4e
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
OpenRouter API:
|
OpenRouter API:
|
||||||
sourceNamespace: open-router-chat-completions-api
|
sourceNamespace: open-router-chat-completions-api
|
||||||
sourceRevisionDigest: sha256:9b410c8cfafe475dc6d9550f97a1e755b9a02b54513d3a85efe606e9bb05ca57
|
sourceRevisionDigest: sha256:92f6f1568ba089ae8e52bd55d859a97e446ae232c4c9ca9302ea64705313c7a0
|
||||||
sourceBlobDigest: sha256:61a2d897cc5ddd893a5131bfacad7fcc311fe5b2eaaa5641fbb0a5b3321bfde7
|
sourceBlobDigest: sha256:6bbf6ab7123261f7e0604f1c640e32b5fc8fb6bb503b1bc8b12d0d78ed19fefc
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- 1.0.0
|
- 1.0.0
|
||||||
@@ -17,8 +17,10 @@ targets:
|
|||||||
open-router:
|
open-router:
|
||||||
source: OpenRouter API
|
source: OpenRouter API
|
||||||
sourceNamespace: open-router-chat-completions-api
|
sourceNamespace: open-router-chat-completions-api
|
||||||
sourceRevisionDigest: sha256:9b410c8cfafe475dc6d9550f97a1e755b9a02b54513d3a85efe606e9bb05ca57
|
sourceRevisionDigest: sha256:92f6f1568ba089ae8e52bd55d859a97e446ae232c4c9ca9302ea64705313c7a0
|
||||||
sourceBlobDigest: sha256:61a2d897cc5ddd893a5131bfacad7fcc311fe5b2eaaa5641fbb0a5b3321bfde7
|
sourceBlobDigest: sha256:6bbf6ab7123261f7e0604f1c640e32b5fc8fb6bb503b1bc8b12d0d78ed19fefc
|
||||||
|
codeSamplesNamespace: open-router-python-code-samples
|
||||||
|
codeSamplesRevisionDigest: sha256:8340c172a77ca9ffeeea6ca5dce0d69a084a3ba0a4e2e41d098759f546d80da4
|
||||||
workflow:
|
workflow:
|
||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
speakeasyVersion: 1.666.0
|
speakeasyVersion: 1.666.0
|
||||||
@@ -42,7 +44,7 @@ workflow:
|
|||||||
token: $pypi_token
|
token: $pypi_token
|
||||||
codeSamples:
|
codeSamples:
|
||||||
registry:
|
registry:
|
||||||
location: registry.speakeasyapi.dev/openrouter/sdk/-oas-python-code-samples
|
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-python-code-samples
|
||||||
labelOverride:
|
labelOverride:
|
||||||
fixedValue: Python (SDK)
|
fixedValue: Python (SDK)
|
||||||
blocking: false
|
blocking: false
|
||||||
|
|||||||
@@ -4,7 +4,12 @@
|
|||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `provider` | [OptionalNullable[components.ChatGenerationParamsProvider]](../components/chatgenerationparamsprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. |
|
||||||
|
| `plugins` | List[[components.ChatGenerationParamsPluginUnion](../components/chatgenerationparamspluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. |
|
||||||
|
| `route` | [OptionalNullable[components.Route]](../components/route.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `session_id` | *Optional[str]* | :heavy_minus_sign: | 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. |
|
||||||
| `messages` | List[[components.Message](../components/message.md)] | :heavy_check_mark: | N/A |
|
| `messages` | List[[components.Message](../components/message.md)] | :heavy_check_mark: | N/A |
|
||||||
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||||
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
|
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
|
||||||
@@ -26,5 +31,4 @@
|
|||||||
| `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A |
|
| `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A |
|
||||||
| `tools` | List[[components.ToolDefinitionJSON](../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
|
| `tools` | List[[components.ToolDefinitionJSON](../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
|
||||||
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||||
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
|
||||||
| `debug` | [Optional[components.Debug]](../components/debug.md) | :heavy_minus_sign: | N/A |
|
| `debug` | [Optional[components.Debug]](../components/debug.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# ChatGenerationParamsDataCollection
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------- | ------- |
|
||||||
|
| `DENY` | deny |
|
||||||
|
| `ALLOW` | allow |
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# ChatGenerationParamsEngine
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| -------- | -------- |
|
||||||
|
| `NATIVE` | native |
|
||||||
|
| `EXA` | exa |
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# ChatGenerationParamsMaxPrice
|
||||||
|
|
||||||
|
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||||
|
| `prompt` | *Optional[Any]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `completion` | *Optional[Any]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `image` | *Optional[Any]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `audio` | *Optional[Any]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `request` | *Optional[Any]* | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ChatGenerationParamsPdf
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
||||||
|
| `engine` | [Optional[components.ChatGenerationParamsPdfEngine]](../components/chatgenerationparamspdfengine.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# ChatGenerationParamsPdfEngine
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------- | ------------- |
|
||||||
|
| `MISTRAL_OCR` | mistral-ocr |
|
||||||
|
| `PDF_TEXT` | pdf-text |
|
||||||
|
| `NATIVE` | native |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# ChatGenerationParamsPluginFileParser
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||||
|
| `id` | *Literal["file-parser"]* | :heavy_check_mark: | N/A |
|
||||||
|
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `pdf` | [Optional[components.Pdf]](../components/pdf.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ChatGenerationParamsPluginModeration
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ----------------------- | ----------------------- | ----------------------- | ----------------------- |
|
||||||
|
| `id` | *Literal["moderation"]* | :heavy_check_mark: | N/A |
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# ChatGenerationParamsPluginResponseHealing
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- |
|
||||||
|
| `id` | *Literal["response-healing"]* | :heavy_check_mark: | N/A |
|
||||||
|
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# ChatGenerationParamsPluginUnion
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `components.ChatGenerationParamsPluginModeration`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ChatGenerationParamsPluginModeration = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `components.ChatGenerationParamsPluginWeb`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ChatGenerationParamsPluginWeb = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `components.ChatGenerationParamsPluginFileParser`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ChatGenerationParamsPluginFileParser = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `components.ChatGenerationParamsPluginResponseHealing`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ChatGenerationParamsPluginResponseHealing = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
# PluginWeb
|
# ChatGenerationParamsPluginWeb
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description |
|
||||||
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
|
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
|
||||||
| `id` | [components.IDWeb](../components/idweb.md) | :heavy_check_mark: | N/A |
|
| `id` | *Literal["web"]* | :heavy_check_mark: | N/A |
|
||||||
|
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
|
||||||
| `max_results` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
| `max_results` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||||
| `search_prompt` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
| `search_prompt` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||||
| `engine` | [Optional[components.Engine]](../components/engine.md) | :heavy_minus_sign: | N/A |
|
| `engine` | [Optional[components.Engine]](../components/engine.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -1,20 +1,22 @@
|
|||||||
# Provider
|
# ChatGenerationParamsProvider
|
||||||
|
|
||||||
When multiple model providers are available, optionally indicate your routing preference.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> | |
|
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> |
|
||||||
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | 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. | |
|
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | 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` | [OptionalNullable[components.DataCollection]](../components/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/><br/>- deny: use only providers which do not collect user data. | allow |
|
| `data_collection` | [OptionalNullable[components.ChatGenerationParamsDataCollection]](../components/chatgenerationparamsdatacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/><br/>- deny: use only providers which do not collect user data. |
|
||||||
| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true |
|
| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
|
||||||
| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. | true |
|
| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
|
||||||
| `order` | List[[components.Order](../components/order.md)] | :heavy_minus_sign: | 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. | |
|
| `order` | List[[components.Schema0](../components/schema0.md)] | :heavy_minus_sign: | 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` | List[[components.Only](../components/only.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | |
|
| `only` | List[[components.Schema0](../components/schema0.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. |
|
||||||
| `ignore` | List[[components.Ignore](../components/ignore.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | |
|
| `ignore` | List[[components.Schema0](../components/schema0.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. |
|
||||||
| `quantizations` | List[[components.Quantization](../components/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | |
|
| `quantizations` | List[[components.Quantizations](../components/quantizations.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. |
|
||||||
| `sort` | [OptionalNullable[components.ProviderSort]](../components/providersort.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | price |
|
| `sort` | [OptionalNullable[components.ProviderSortUnion]](../components/providersortunion.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. |
|
||||||
| `max_price` | [Optional[components.MaxPrice]](../components/maxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | |
|
| `max_price` | [Optional[components.ChatGenerationParamsMaxPrice]](../components/chatgenerationparamsmaxprice.md) | :heavy_minus_sign: | 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` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `preferred_max_latency` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `min_throughput` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `max_latency` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# ChatGenerationParamsRoute
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------- | ---------- |
|
||||||
|
| `FALLBACK` | fallback |
|
||||||
|
| `SORT` | sort |
|
||||||
@@ -8,4 +8,5 @@
|
|||||||
| `finish_reason` | [Nullable[components.ChatCompletionFinishReason]](../components/chatcompletionfinishreason.md) | :heavy_check_mark: | N/A |
|
| `finish_reason` | [Nullable[components.ChatCompletionFinishReason]](../components/chatcompletionfinishreason.md) | :heavy_check_mark: | N/A |
|
||||||
| `index` | *float* | :heavy_check_mark: | N/A |
|
| `index` | *float* | :heavy_check_mark: | N/A |
|
||||||
| `message` | [components.AssistantMessage](../components/assistantmessage.md) | :heavy_check_mark: | N/A |
|
| `message` | [components.AssistantMessage](../components/assistantmessage.md) | :heavy_check_mark: | N/A |
|
||||||
|
| `reasoning_details` | List[[components.Schema3](../components/schema3.md)] | :heavy_minus_sign: | N/A |
|
||||||
| `logprobs` | [OptionalNullable[components.ChatMessageTokenLogprobs]](../components/chatmessagetokenlogprobs.md) | :heavy_minus_sign: | N/A |
|
| `logprobs` | [OptionalNullable[components.ChatMessageTokenLogprobs]](../components/chatmessagetokenlogprobs.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -10,3 +10,4 @@
|
|||||||
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||||
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||||
| `tool_calls` | List[[components.ChatStreamingMessageToolCall](../components/chatstreamingmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
|
| `tool_calls` | List[[components.ChatStreamingMessageToolCall](../components/chatstreamingmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
|
||||||
|
| `reasoning_details` | List[[components.Schema3](../components/schema3.md)] | :heavy_minus_sign: | N/A |
|
||||||
@@ -5,8 +5,9 @@
|
|||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| --------- | --------- |
|
| --------- | --------- |
|
||||||
| `NONE` | none |
|
| `XHIGH` | xhigh |
|
||||||
| `MINIMAL` | minimal |
|
|
||||||
| `LOW` | low |
|
|
||||||
| `MEDIUM` | medium |
|
|
||||||
| `HIGH` | high |
|
| `HIGH` | high |
|
||||||
|
| `MEDIUM` | medium |
|
||||||
|
| `LOW` | low |
|
||||||
|
| `MINIMAL` | minimal |
|
||||||
|
| `NONE` | none |
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# MaxPrice
|
|
||||||
|
|
||||||
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- |
|
|
||||||
| `prompt` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
|
||||||
| `completion` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
|
||||||
| `image` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
|
||||||
| `audio` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
|
||||||
| `request` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| --------- | --------- |
|
| --------- | --------- |
|
||||||
|
| `XHIGH` | xhigh |
|
||||||
| `HIGH` | high |
|
| `HIGH` | high |
|
||||||
| `MEDIUM` | medium |
|
| `MEDIUM` | medium |
|
||||||
| `LOW` | low |
|
| `LOW` | low |
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ Request schema for Responses endpoint
|
|||||||
| `service_tier` | [Optional[components.ServiceTier]](../components/servicetier.md) | :heavy_minus_sign: | N/A | |
|
| `service_tier` | [Optional[components.ServiceTier]](../components/servicetier.md) | :heavy_minus_sign: | N/A | |
|
||||||
| `truncation` | [OptionalNullable[components.Truncation]](../components/truncation.md) | :heavy_minus_sign: | N/A | auto |
|
| `truncation` | [OptionalNullable[components.Truncation]](../components/truncation.md) | :heavy_minus_sign: | N/A | auto |
|
||||||
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
|
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
|
||||||
| `provider` | [OptionalNullable[components.Provider]](../components/provider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
|
| `provider` | [OptionalNullable[components.OpenResponsesRequestProvider]](../components/openresponsesrequestprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
|
||||||
| `plugins` | List[[components.Plugin](../components/plugin.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
|
| `plugins` | List[[components.OpenResponsesRequestPluginUnion](../components/openresponsesrequestpluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
|
||||||
| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. | |
|
| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. | |
|
||||||
| `session_id` | *Optional[str]* | :heavy_minus_sign: | 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. | |
|
| `session_id` | *Optional[str]* | :heavy_minus_sign: | 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. | |
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# OpenResponsesRequestEngine
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| -------- | -------- |
|
||||||
|
| `NATIVE` | native |
|
||||||
|
| `EXA` | exa |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# OpenResponsesRequestIgnore
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `components.ProviderName`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ProviderName = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# OpenResponsesRequestMaxPrice
|
||||||
|
|
||||||
|
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
|
||||||
|
| `prompt` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
|
| `completion` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
|
| `image` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
|
| `audio` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
|
| `request` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# OpenResponsesRequestOnly
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `components.ProviderName`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ProviderName = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# OpenResponsesRequestOrder
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `components.ProviderName`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ProviderName = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# OpenResponsesRequestPdf
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
||||||
|
| `engine` | [Optional[components.OpenResponsesRequestPdfEngine]](../components/openresponsesrequestpdfengine.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# OpenResponsesRequestPdfEngine
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------- | ------------- |
|
||||||
|
| `MISTRAL_OCR` | mistral-ocr |
|
||||||
|
| `PDF_TEXT` | pdf-text |
|
||||||
|
| `NATIVE` | native |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# OpenResponsesRequestPluginFileParser
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
||||||
|
| `id` | [components.IDFileParser](../components/idfileparser.md) | :heavy_check_mark: | N/A |
|
||||||
|
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the file-parser plugin for this request. Defaults to true. |
|
||||||
|
| `pdf` | [Optional[components.PDFParserOptions]](../components/pdfparseroptions.md) | :heavy_minus_sign: | Options for PDF parsing. |
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
# PluginModeration
|
# OpenResponsesRequestPluginModeration
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# OpenResponsesRequestPluginResponseHealing
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
||||||
|
| `id` | [components.IDResponseHealing](../components/idresponsehealing.md) | :heavy_check_mark: | N/A |
|
||||||
|
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the response-healing plugin for this request. Defaults to true. |
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# OpenResponsesRequestPluginUnion
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `components.OpenResponsesRequestPluginModeration`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.OpenResponsesRequestPluginModeration = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `components.OpenResponsesRequestPluginWeb`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.OpenResponsesRequestPluginWeb = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `components.OpenResponsesRequestPluginFileParser`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.OpenResponsesRequestPluginFileParser = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `components.OpenResponsesRequestPluginResponseHealing`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.OpenResponsesRequestPluginResponseHealing = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# OpenResponsesRequestPluginWeb
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
||||||
|
| `id` | [components.IDWeb](../components/idweb.md) | :heavy_check_mark: | N/A |
|
||||||
|
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the web-search plugin for this request. Defaults to true. |
|
||||||
|
| `max_results` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `search_prompt` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `engine` | [Optional[components.WebSearchEngine]](../components/websearchengine.md) | :heavy_minus_sign: | The search engine to use for web search. |
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# OpenResponsesRequestProvider
|
||||||
|
|
||||||
|
When multiple model providers are available, optionally indicate your routing preference.
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> | |
|
||||||
|
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | 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` | [OptionalNullable[components.DataCollection]](../components/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/><br/>- deny: use only providers which do not collect user data. | allow |
|
||||||
|
| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true |
|
||||||
|
| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. | true |
|
||||||
|
| `order` | List[[components.OpenResponsesRequestOrder](../components/openresponsesrequestorder.md)] | :heavy_minus_sign: | 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` | List[[components.OpenResponsesRequestOnly](../components/openresponsesrequestonly.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | |
|
||||||
|
| `ignore` | List[[components.OpenResponsesRequestIgnore](../components/openresponsesrequestignore.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | |
|
||||||
|
| `quantizations` | List[[components.Quantization](../components/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | |
|
||||||
|
| `sort` | [OptionalNullable[components.OpenResponsesRequestSort]](../components/openresponsesrequestsort.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | price |
|
||||||
|
| `max_price` | [Optional[components.OpenResponsesRequestMaxPrice]](../components/openresponsesrequestmaxprice.md) | :heavy_minus_sign: | 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` | *OptionalNullable[float]* | :heavy_minus_sign: | 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. | 100 |
|
||||||
|
| `preferred_max_latency` | *OptionalNullable[float]* | :heavy_minus_sign: | 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. | 5 |
|
||||||
|
| ~~`min_throughput`~~ | *OptionalNullable[float]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: Use preferred_min_throughput instead..<br/><br/>**DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for preferred_min_throughput. | 100 |
|
||||||
|
| ~~`max_latency`~~ | *OptionalNullable[float]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: Use preferred_max_latency instead..<br/><br/>**DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency. | 5 |
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# OpenResponsesRequestRoute
|
||||||
|
|
||||||
|
Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria.
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------- | ---------- |
|
||||||
|
| `FALLBACK` | fallback |
|
||||||
|
| `SORT` | sort |
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# OpenResponsesRequestSort
|
||||||
|
|
||||||
|
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `components.ProviderSort`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ProviderSort = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `components.ProviderSortConfig`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ProviderSortConfig = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `Any`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: Any = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -26,5 +26,6 @@
|
|||||||
| `PARALLEL_TOOL_CALLS` | parallel_tool_calls |
|
| `PARALLEL_TOOL_CALLS` | parallel_tool_calls |
|
||||||
| `INCLUDE_REASONING` | include_reasoning |
|
| `INCLUDE_REASONING` | include_reasoning |
|
||||||
| `REASONING` | reasoning |
|
| `REASONING` | reasoning |
|
||||||
|
| `REASONING_EFFORT` | reasoning_effort |
|
||||||
| `WEB_SEARCH_OPTIONS` | web_search_options |
|
| `WEB_SEARCH_OPTIONS` | web_search_options |
|
||||||
| `VERBOSITY` | verbosity |
|
| `VERBOSITY` | verbosity |
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Partition
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------- | ------- |
|
||||||
|
| `MODEL` | model |
|
||||||
|
| `NONE` | none |
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# PDFParserEngine
|
||||||
|
|
||||||
|
The engine to use for parsing PDF files.
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------- | ------------- |
|
||||||
|
| `MISTRAL_OCR` | mistral-ocr |
|
||||||
|
| `PDF_TEXT` | pdf-text |
|
||||||
|
| `NATIVE` | native |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# PDFParserOptions
|
||||||
|
|
||||||
|
Options for PDF parsing.
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
||||||
|
| `engine` | [Optional[components.PDFParserEngine]](../components/pdfparserengine.md) | :heavy_minus_sign: | The engine to use for parsing PDF files. |
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
# Plugin
|
|
||||||
|
|
||||||
|
|
||||||
## Supported Types
|
|
||||||
|
|
||||||
### `components.PluginModeration`
|
|
||||||
|
|
||||||
```python
|
|
||||||
value: components.PluginModeration = /* values here */
|
|
||||||
```
|
|
||||||
|
|
||||||
### `components.PluginWeb`
|
|
||||||
|
|
||||||
```python
|
|
||||||
value: components.PluginWeb = /* values here */
|
|
||||||
```
|
|
||||||
|
|
||||||
### `components.PluginFileParser`
|
|
||||||
|
|
||||||
```python
|
|
||||||
value: components.PluginFileParser = /* values here */
|
|
||||||
```
|
|
||||||
|
|
||||||
### `components.PluginResponseHealing`
|
|
||||||
|
|
||||||
```python
|
|
||||||
value: components.PluginResponseHealing = /* values here */
|
|
||||||
```
|
|
||||||
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# PluginFileParser
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
|
|
||||||
| `id` | [components.IDFileParser](../components/idfileparser.md) | :heavy_check_mark: | N/A |
|
|
||||||
| `max_files` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
|
||||||
| `pdf` | [Optional[components.Pdf]](../components/pdf.md) | :heavy_minus_sign: | N/A |
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
# PluginResponseHealing
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
|
||||||
| `id` | [components.IDResponseHealing](../components/idresponsehealing.md) | :heavy_check_mark: | N/A |
|
|
||||||
+15
-15
@@ -3,18 +3,18 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description | Example |
|
||||||
| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- |
|
| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
|
||||||
| `prompt` | *Any* | :heavy_check_mark: | A value in string or number format that is a large number |
|
| `prompt` | *str* | :heavy_check_mark: | A value in string format that is a large number | 1000 |
|
||||||
| `completion` | *Any* | :heavy_check_mark: | A value in string or number format that is a large number |
|
| `completion` | *str* | :heavy_check_mark: | A value in string format that is a large number | 1000 |
|
||||||
| `request` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `request` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `image` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `image` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `image_token` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `image_token` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `image_output` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `image_output` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `audio` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `audio` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `input_audio_cache` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `web_search` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `web_search` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `internal_reasoning` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `input_cache_read` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `input_cache_write` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | |
|
||||||
@@ -41,6 +41,7 @@
|
|||||||
| `INFERMATIC` | Infermatic |
|
| `INFERMATIC` | Infermatic |
|
||||||
| `INFLECTION` | Inflection |
|
| `INFLECTION` | Inflection |
|
||||||
| `LIQUID` | Liquid |
|
| `LIQUID` | Liquid |
|
||||||
|
| `MARA` | Mara |
|
||||||
| `MANCER_2` | Mancer 2 |
|
| `MANCER_2` | Mancer 2 |
|
||||||
| `MINIMAX` | Minimax |
|
| `MINIMAX` | Minimax |
|
||||||
| `MODEL_RUN` | ModelRun |
|
| `MODEL_RUN` | ModelRun |
|
||||||
@@ -69,6 +70,7 @@
|
|||||||
| `TOGETHER` | Together |
|
| `TOGETHER` | Together |
|
||||||
| `VENICE` | Venice |
|
| `VENICE` | Venice |
|
||||||
| `WAND_B` | WandB |
|
| `WAND_B` | WandB |
|
||||||
|
| `XIAOMI` | Xiaomi |
|
||||||
| `X_AI` | xAI |
|
| `X_AI` | xAI |
|
||||||
| `Z_AI` | Z.AI |
|
| `Z_AI` | Z.AI |
|
||||||
| `FAKE_PROVIDER` | FakeProvider |
|
| `FAKE_PROVIDER` | FakeProvider |
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# ProviderPreferences
|
||||||
|
|
||||||
|
Provider routing preferences for the request.
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> | |
|
||||||
|
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | 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` | [OptionalNullable[components.DataCollection]](../components/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/><br/>- deny: use only providers which do not collect user data. | allow |
|
||||||
|
| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true |
|
||||||
|
| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. | true |
|
||||||
|
| `order` | List[[components.ProviderPreferencesOrder](../components/providerpreferencesorder.md)] | :heavy_minus_sign: | 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` | List[[components.ProviderPreferencesOnly](../components/providerpreferencesonly.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | |
|
||||||
|
| `ignore` | List[[components.ProviderPreferencesIgnore](../components/providerpreferencesignore.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | |
|
||||||
|
| `quantizations` | List[[components.Quantization](../components/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | |
|
||||||
|
| `sort` | [OptionalNullable[components.ProviderPreferencesSortUnion]](../components/providerpreferencessortunion.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `max_price` | [Optional[components.ProviderPreferencesMaxPrice]](../components/providerpreferencesmaxprice.md) | :heavy_minus_sign: | 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` | *OptionalNullable[float]* | :heavy_minus_sign: | 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. | 100 |
|
||||||
|
| `preferred_max_latency` | *OptionalNullable[float]* | :heavy_minus_sign: | 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. | 5 |
|
||||||
|
| ~~`min_throughput`~~ | *OptionalNullable[float]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: Use preferred_min_throughput instead..<br/><br/>**DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for preferred_min_throughput. | 100 |
|
||||||
|
| ~~`max_latency`~~ | *OptionalNullable[float]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: Use preferred_max_latency instead..<br/><br/>**DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency. | 5 |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# ProviderPreferencesIgnore
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `components.ProviderName`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ProviderName = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# ProviderPreferencesMaxPrice
|
||||||
|
|
||||||
|
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
|
||||||
|
| `prompt` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
|
| `completion` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
|
| `image` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
|
| `audio` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
|
| `request` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# ProviderPreferencesOnly
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `components.ProviderName`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ProviderName = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# ProviderPreferencesOrder
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `components.ProviderName`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ProviderName = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# ProviderPreferencesPartition
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------- | ------- |
|
||||||
|
| `MODEL` | model |
|
||||||
|
| `NONE` | none |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# ProviderPreferencesProviderSort
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------ | ------------ |
|
||||||
|
| `PRICE` | price |
|
||||||
|
| `THROUGHPUT` | throughput |
|
||||||
|
| `LATENCY` | latency |
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# ProviderPreferencesProviderSortConfig
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `by` | [OptionalNullable[components.ProviderSort]](../components/providersort.md) | :heavy_minus_sign: | N/A | price |
|
||||||
|
| `partition` | [OptionalNullable[components.ProviderPreferencesPartition]](../components/providerpreferencespartition.md) | :heavy_minus_sign: | N/A | |
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# ProviderPreferencesSortUnion
|
||||||
|
|
||||||
|
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `components.ProviderPreferencesProviderSort`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ProviderPreferencesProviderSort = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `components.ProviderSortConfigUnion`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ProviderSortConfigUnion = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `components.SortEnum`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.SortEnum = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
# ProviderSort
|
# ProviderSort
|
||||||
|
|
||||||
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# ProviderSortConfig
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
||||||
|
| `by` | [OptionalNullable[components.ProviderSort]](../components/providersort.md) | :heavy_minus_sign: | N/A | price |
|
||||||
|
| `partition` | [OptionalNullable[components.Partition]](../components/partition.md) | :heavy_minus_sign: | N/A | |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# ProviderSortConfigEnum
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------ | ------------ |
|
||||||
|
| `PRICE` | price |
|
||||||
|
| `THROUGHPUT` | throughput |
|
||||||
|
| `LATENCY` | latency |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# ProviderSortConfigUnion
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `components.ProviderPreferencesProviderSortConfig`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ProviderPreferencesProviderSortConfig = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `components.ProviderSortConfigEnum`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ProviderSortConfigEnum = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# ProviderSortUnion
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `components.ProviderSort`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ProviderSort = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `components.ProviderSortConfig`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.ProviderSortConfig = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -5,18 +5,18 @@ Pricing information for the model
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description | Example |
|
||||||
| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- |
|
| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
|
||||||
| `prompt` | *Any* | :heavy_check_mark: | A value in string or number format that is a large number |
|
| `prompt` | *str* | :heavy_check_mark: | A value in string format that is a large number | 1000 |
|
||||||
| `completion` | *Any* | :heavy_check_mark: | A value in string or number format that is a large number |
|
| `completion` | *str* | :heavy_check_mark: | A value in string format that is a large number | 1000 |
|
||||||
| `request` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `request` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `image` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `image` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `image_token` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `image_token` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `image_output` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `image_output` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `audio` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `audio` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `input_audio_cache` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `web_search` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `web_search` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `internal_reasoning` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `input_cache_read` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `input_cache_write` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | |
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# Quantizations
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| --------- | --------- |
|
||||||
|
| `INT4` | int4 |
|
||||||
|
| `INT8` | int8 |
|
||||||
|
| `FP4` | fp4 |
|
||||||
|
| `FP6` | fp6 |
|
||||||
|
| `FP8` | fp8 |
|
||||||
|
| `FP16` | fp16 |
|
||||||
|
| `BF16` | bf16 |
|
||||||
|
| `FP32` | fp32 |
|
||||||
|
| `UNKNOWN` | unknown |
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Route
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------- | ---------- |
|
||||||
|
| `FALLBACK` | fallback |
|
||||||
|
| `SORT` | sort |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Schema0
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `components.Schema0Enum`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.Schema0Enum = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
# Schema0Enum
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------------- | ------------------- |
|
||||||
|
| `AI21` | AI21 |
|
||||||
|
| `AION_LABS` | AionLabs |
|
||||||
|
| `ALIBABA` | Alibaba |
|
||||||
|
| `AMAZON_BEDROCK` | Amazon Bedrock |
|
||||||
|
| `AMAZON_NOVA` | Amazon Nova |
|
||||||
|
| `ANTHROPIC` | Anthropic |
|
||||||
|
| `ARCEE_AI` | Arcee AI |
|
||||||
|
| `ATLAS_CLOUD` | AtlasCloud |
|
||||||
|
| `AVIAN` | Avian |
|
||||||
|
| `AZURE` | Azure |
|
||||||
|
| `BASE_TEN` | BaseTen |
|
||||||
|
| `BYTE_PLUS` | BytePlus |
|
||||||
|
| `BLACK_FOREST_LABS` | Black Forest Labs |
|
||||||
|
| `CEREBRAS` | Cerebras |
|
||||||
|
| `CHUTES` | Chutes |
|
||||||
|
| `CIRRASCALE` | Cirrascale |
|
||||||
|
| `CLARIFAI` | Clarifai |
|
||||||
|
| `CLOUDFLARE` | Cloudflare |
|
||||||
|
| `COHERE` | Cohere |
|
||||||
|
| `CRUSOE` | Crusoe |
|
||||||
|
| `DEEP_INFRA` | DeepInfra |
|
||||||
|
| `DEEP_SEEK` | DeepSeek |
|
||||||
|
| `FEATHERLESS` | Featherless |
|
||||||
|
| `FIREWORKS` | Fireworks |
|
||||||
|
| `FRIENDLI` | Friendli |
|
||||||
|
| `GMI_CLOUD` | GMICloud |
|
||||||
|
| `GO_POMELO` | GoPomelo |
|
||||||
|
| `GOOGLE` | Google |
|
||||||
|
| `GOOGLE_AI_STUDIO` | Google AI Studio |
|
||||||
|
| `GROQ` | Groq |
|
||||||
|
| `HYPERBOLIC` | Hyperbolic |
|
||||||
|
| `INCEPTION` | Inception |
|
||||||
|
| `INFERENCE_NET` | InferenceNet |
|
||||||
|
| `INFERMATIC` | Infermatic |
|
||||||
|
| `INFLECTION` | Inflection |
|
||||||
|
| `LIQUID` | Liquid |
|
||||||
|
| `MARA` | Mara |
|
||||||
|
| `MANCER_2` | Mancer 2 |
|
||||||
|
| `MINIMAX` | Minimax |
|
||||||
|
| `MODEL_RUN` | ModelRun |
|
||||||
|
| `MISTRAL` | Mistral |
|
||||||
|
| `MODULAR` | Modular |
|
||||||
|
| `MOONSHOT_AI` | Moonshot AI |
|
||||||
|
| `MORPH` | Morph |
|
||||||
|
| `N_COMPASS` | NCompass |
|
||||||
|
| `NEBIUS` | Nebius |
|
||||||
|
| `NEXT_BIT` | NextBit |
|
||||||
|
| `NOVITA` | Novita |
|
||||||
|
| `NVIDIA` | Nvidia |
|
||||||
|
| `OPEN_AI` | OpenAI |
|
||||||
|
| `OPEN_INFERENCE` | OpenInference |
|
||||||
|
| `PARASAIL` | Parasail |
|
||||||
|
| `PERPLEXITY` | Perplexity |
|
||||||
|
| `PHALA` | Phala |
|
||||||
|
| `RELACE` | Relace |
|
||||||
|
| `SAMBA_NOVA` | SambaNova |
|
||||||
|
| `SILICON_FLOW` | SiliconFlow |
|
||||||
|
| `SOURCEFUL` | Sourceful |
|
||||||
|
| `STEALTH` | Stealth |
|
||||||
|
| `STREAM_LAKE` | StreamLake |
|
||||||
|
| `SWITCHPOINT` | Switchpoint |
|
||||||
|
| `TARGON` | Targon |
|
||||||
|
| `TOGETHER` | Together |
|
||||||
|
| `VENICE` | Venice |
|
||||||
|
| `WAND_B` | WandB |
|
||||||
|
| `XIAOMI` | Xiaomi |
|
||||||
|
| `X_AI` | xAI |
|
||||||
|
| `Z_AI` | Z.AI |
|
||||||
|
| `FAKE_PROVIDER` | FakeProvider |
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Schema3
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `components.Schema3ReasoningSummary`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.Schema3ReasoningSummary = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `components.Schema3ReasoningEncrypted`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.Schema3ReasoningEncrypted = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `components.Schema3ReasoningText`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: components.Schema3ReasoningText = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# Schema3ReasoningEncrypted
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
|
||||||
|
| `type` | *Literal["reasoning.encrypted"]* | :heavy_check_mark: | N/A |
|
||||||
|
| `data` | *str* | :heavy_check_mark: | N/A |
|
||||||
|
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `format_` | [OptionalNullable[components.Schema5]](../components/schema5.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# Schema3ReasoningSummary
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
|
||||||
|
| `type` | *Literal["reasoning.summary"]* | :heavy_check_mark: | N/A |
|
||||||
|
| `summary` | *str* | :heavy_check_mark: | N/A |
|
||||||
|
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `format_` | [OptionalNullable[components.Schema5]](../components/schema5.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Schema3ReasoningText
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
|
||||||
|
| `type` | *Literal["reasoning.text"]* | :heavy_check_mark: | N/A |
|
||||||
|
| `text` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `format_` | [OptionalNullable[components.Schema5]](../components/schema5.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# Schema5
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| --------------------- | --------------------- |
|
||||||
|
| `UNKNOWN` | unknown |
|
||||||
|
| `OPENAI_RESPONSES_V1` | openai-responses-v1 |
|
||||||
|
| `XAI_RESPONSES_V1` | xai-responses-v1 |
|
||||||
|
| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
|
||||||
|
| `GOOGLE_GEMINI_V1` | google-gemini-v1 |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Sort
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------ | ------------ |
|
||||||
|
| `PRICE` | price |
|
||||||
|
| `THROUGHPUT` | throughput |
|
||||||
|
| `LATENCY` | latency |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# SortEnum
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------ | ------------ |
|
||||||
|
| `PRICE` | price |
|
||||||
|
| `THROUGHPUT` | throughput |
|
||||||
|
| `LATENCY` | latency |
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# WebSearchEngine
|
||||||
|
|
||||||
|
The search engine to use for web search.
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| -------- | -------- |
|
||||||
|
| `NATIVE` | native |
|
||||||
|
| `EXA` | exa |
|
||||||
@@ -16,3 +16,5 @@
|
|||||||
| `quantizations` | List[[components.Quantization](../components/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | |
|
| `quantizations` | List[[components.Quantization](../components/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | |
|
||||||
| `sort` | [OptionalNullable[components.ProviderSort]](../components/providersort.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | price |
|
| `sort` | [OptionalNullable[components.ProviderSort]](../components/providersort.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | price |
|
||||||
| `max_price` | [Optional[operations.MaxPrice]](../operations/maxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | |
|
| `max_price` | [Optional[operations.MaxPrice]](../operations/maxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | |
|
||||||
|
| `min_throughput` | *OptionalNullable[float]* | :heavy_minus_sign: | The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used. | 100 |
|
||||||
|
| `max_latency` | *OptionalNullable[float]* | :heavy_minus_sign: | The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used. | 5 |
|
||||||
@@ -4,11 +4,11 @@
|
|||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description |
|
||||||
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
|
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||||
| `input` | [operations.InputUnion](../operations/inputunion.md) | :heavy_check_mark: | N/A |
|
| `input` | [operations.InputUnion](../operations/inputunion.md) | :heavy_check_mark: | N/A |
|
||||||
| `model` | *str* | :heavy_check_mark: | N/A |
|
| `model` | *str* | :heavy_check_mark: | N/A |
|
||||||
| `encoding_format` | [Optional[operations.EncodingFormat]](../operations/encodingformat.md) | :heavy_minus_sign: | N/A |
|
| `encoding_format` | [Optional[operations.EncodingFormat]](../operations/encodingformat.md) | :heavy_minus_sign: | N/A |
|
||||||
| `dimensions` | *Optional[int]* | :heavy_minus_sign: | N/A |
|
| `dimensions` | *Optional[int]* | :heavy_minus_sign: | N/A |
|
||||||
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||||
| `provider` | [Optional[operations.CreateEmbeddingsProvider]](../operations/createembeddingsprovider.md) | :heavy_minus_sign: | N/A |
|
| `provider` | [Optional[components.ProviderPreferences]](../components/providerpreferences.md) | :heavy_minus_sign: | Provider routing preferences for the request. |
|
||||||
| `input_type` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
| `input_type` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||||
@@ -41,6 +41,7 @@
|
|||||||
| `INFERMATIC` | Infermatic |
|
| `INFERMATIC` | Infermatic |
|
||||||
| `INFLECTION` | Inflection |
|
| `INFLECTION` | Inflection |
|
||||||
| `LIQUID` | Liquid |
|
| `LIQUID` | Liquid |
|
||||||
|
| `MARA` | Mara |
|
||||||
| `MANCER_2` | Mancer 2 |
|
| `MANCER_2` | Mancer 2 |
|
||||||
| `MINIMAX` | Minimax |
|
| `MINIMAX` | Minimax |
|
||||||
| `MODEL_RUN` | ModelRun |
|
| `MODEL_RUN` | ModelRun |
|
||||||
@@ -69,6 +70,7 @@
|
|||||||
| `TOGETHER` | Together |
|
| `TOGETHER` | Together |
|
||||||
| `VENICE` | Venice |
|
| `VENICE` | Venice |
|
||||||
| `WAND_B` | WandB |
|
| `WAND_B` | WandB |
|
||||||
|
| `XIAOMI` | Xiaomi |
|
||||||
| `X_AI` | xAI |
|
| `X_AI` | xAI |
|
||||||
| `Z_AI` | Z.AI |
|
| `Z_AI` | Z.AI |
|
||||||
| `FAKE_PROVIDER` | FakeProvider |
|
| `FAKE_PROVIDER` | FakeProvider |
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||||
| `author` | *str* | :heavy_check_mark: | N/A |
|
| `author` | *str* | :heavy_check_mark: | N/A | |
|
||||||
| `slug` | *str* | :heavy_check_mark: | N/A |
|
| `slug` | *str* | :heavy_check_mark: | N/A | |
|
||||||
| `provider` | [Optional[operations.GetParametersProvider]](../operations/getparametersprovider.md) | :heavy_minus_sign: | N/A |
|
| `provider` | [Optional[components.ProviderName]](../components/providername.md) | :heavy_minus_sign: | N/A | OpenAI |
|
||||||
@@ -5,10 +5,10 @@ The object specifying the maximum price you want to pay for this request. USD pr
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description | Example |
|
||||||
| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- |
|
| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
|
||||||
| `prompt` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `prompt` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `completion` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `completion` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `image` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `image` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `audio` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `audio` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
| `request` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
| `request` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||||
@@ -26,5 +26,6 @@
|
|||||||
| `PARALLEL_TOOL_CALLS` | parallel_tool_calls |
|
| `PARALLEL_TOOL_CALLS` | parallel_tool_calls |
|
||||||
| `INCLUDE_REASONING` | include_reasoning |
|
| `INCLUDE_REASONING` | include_reasoning |
|
||||||
| `REASONING` | reasoning |
|
| `REASONING` | reasoning |
|
||||||
|
| `REASONING_EFFORT` | reasoning_effort |
|
||||||
| `WEB_SEARCH_OPTIONS` | web_search_options |
|
| `WEB_SEARCH_OPTIONS` | web_search_options |
|
||||||
| `VERBOSITY` | verbosity |
|
| `VERBOSITY` | verbosity |
|
||||||
@@ -35,8 +35,13 @@ with OpenRouter(
|
|||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description |
|
||||||
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `messages` | List[[components.Message](../../components/message.md)] | :heavy_check_mark: | N/A |
|
| `messages` | List[[components.Message](../../components/message.md)] | :heavy_check_mark: | N/A |
|
||||||
|
| `provider` | [OptionalNullable[components.ChatGenerationParamsProvider]](../../components/chatgenerationparamsprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. |
|
||||||
|
| `plugins` | List[[components.ChatGenerationParamsPluginUnion](../../components/chatgenerationparamspluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. |
|
||||||
|
| `route` | [OptionalNullable[components.Route]](../../components/route.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `session_id` | *Optional[str]* | :heavy_minus_sign: | 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. |
|
||||||
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||||
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
|
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
|
||||||
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||||
@@ -57,7 +62,6 @@ with OpenRouter(
|
|||||||
| `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A |
|
| `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A |
|
||||||
| `tools` | List[[components.ToolDefinitionJSON](../../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
|
| `tools` | List[[components.ToolDefinitionJSON](../../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
|
||||||
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||||
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
|
||||||
| `debug` | [Optional[components.Debug]](../../components/debug.md) | :heavy_minus_sign: | N/A |
|
| `debug` | [Optional[components.Debug]](../../components/debug.md) | :heavy_minus_sign: | N/A |
|
||||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||||
|
|
||||||
|
|||||||
@@ -36,13 +36,13 @@ with OpenRouter(
|
|||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description |
|
||||||
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
||||||
| `input` | [operations.InputUnion](../../operations/inputunion.md) | :heavy_check_mark: | N/A |
|
| `input` | [operations.InputUnion](../../operations/inputunion.md) | :heavy_check_mark: | N/A |
|
||||||
| `model` | *str* | :heavy_check_mark: | N/A |
|
| `model` | *str* | :heavy_check_mark: | N/A |
|
||||||
| `encoding_format` | [Optional[operations.EncodingFormat]](../../operations/encodingformat.md) | :heavy_minus_sign: | N/A |
|
| `encoding_format` | [Optional[operations.EncodingFormat]](../../operations/encodingformat.md) | :heavy_minus_sign: | N/A |
|
||||||
| `dimensions` | *Optional[int]* | :heavy_minus_sign: | N/A |
|
| `dimensions` | *Optional[int]* | :heavy_minus_sign: | N/A |
|
||||||
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||||
| `provider` | [Optional[operations.CreateEmbeddingsProvider]](../../operations/createembeddingsprovider.md) | :heavy_minus_sign: | N/A |
|
| `provider` | [Optional[components.ProviderPreferences]](../../components/providerpreferences.md) | :heavy_minus_sign: | Provider routing preferences for the request. |
|
||||||
| `input_type` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
| `input_type` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||||
|
|
||||||
|
|||||||
@@ -34,13 +34,13 @@ with OpenRouter() as open_router:
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
||||||
| `security` | [operations.GetParametersSecurity](../../operations/getparameterssecurity.md) | :heavy_check_mark: | N/A |
|
| `security` | [operations.GetParametersSecurity](../../operations/getparameterssecurity.md) | :heavy_check_mark: | N/A | |
|
||||||
| `author` | *str* | :heavy_check_mark: | N/A |
|
| `author` | *str* | :heavy_check_mark: | N/A | |
|
||||||
| `slug` | *str* | :heavy_check_mark: | N/A |
|
| `slug` | *str* | :heavy_check_mark: | N/A | |
|
||||||
| `provider` | [Optional[operations.GetParametersProvider]](../../operations/getparametersprovider.md) | :heavy_minus_sign: | N/A |
|
| `provider` | [Optional[components.ProviderName]](../../components/providername.md) | :heavy_minus_sign: | N/A | OpenAI |
|
||||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ with OpenRouter(
|
|||||||
| `service_tier` | [Optional[components.ServiceTier]](../../components/servicetier.md) | :heavy_minus_sign: | N/A | |
|
| `service_tier` | [Optional[components.ServiceTier]](../../components/servicetier.md) | :heavy_minus_sign: | N/A | |
|
||||||
| `truncation` | [OptionalNullable[components.Truncation]](../../components/truncation.md) | :heavy_minus_sign: | N/A | auto |
|
| `truncation` | [OptionalNullable[components.Truncation]](../../components/truncation.md) | :heavy_minus_sign: | N/A | auto |
|
||||||
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
|
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
|
||||||
| `provider` | [OptionalNullable[components.Provider]](../../components/provider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
|
| `provider` | [OptionalNullable[components.OpenResponsesRequestProvider]](../../components/openresponsesrequestprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
|
||||||
| `plugins` | List[[components.Plugin](../../components/plugin.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
|
| `plugins` | List[[components.OpenResponsesRequestPluginUnion](../../components/openresponsesrequestpluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
|
||||||
| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. | |
|
| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. | |
|
||||||
| `session_id` | *Optional[str]* | :heavy_minus_sign: | 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. | |
|
| `session_id` | *Optional[str]* | :heavy_minus_sign: | 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. | |
|
||||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "openrouter"
|
name = "openrouter"
|
||||||
version = "0.0.21"
|
version = "0.0.17"
|
||||||
description = "Official Python Client SDK for OpenRouter."
|
description = "Official Python Client SDK for OpenRouter."
|
||||||
authors = [{ name = "OpenRouter" },]
|
authors = [{ name = "OpenRouter" },]
|
||||||
readme = "README-PYPI.md"
|
readme = "README-PYPI.md"
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
import importlib.metadata
|
import importlib.metadata
|
||||||
|
|
||||||
__title__: str = "openrouter"
|
__title__: str = "openrouter"
|
||||||
__version__: str = "0.0.21"
|
__version__: str = "0.0.17"
|
||||||
__openapi_doc_version__: str = "1.0.0"
|
__openapi_doc_version__: str = "1.0.0"
|
||||||
__gen_version__: str = "2.768.0"
|
__gen_version__: str = "2.768.0"
|
||||||
__user_agent__: str = "speakeasy-sdk/python 0.0.21 2.768.0 1.0.0 openrouter"
|
__user_agent__: str = "speakeasy-sdk/python 0.0.17 2.768.0 1.0.0 openrouter"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if __package__ is not None:
|
if __package__ is not None:
|
||||||
|
|||||||
+138
-14
@@ -21,6 +21,21 @@ class Chat(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
||||||
|
provider: OptionalNullable[
|
||||||
|
Union[
|
||||||
|
components.ChatGenerationParamsProvider,
|
||||||
|
components.ChatGenerationParamsProviderTypedDict,
|
||||||
|
]
|
||||||
|
] = UNSET,
|
||||||
|
plugins: Optional[
|
||||||
|
Union[
|
||||||
|
List[components.ChatGenerationParamsPluginUnion],
|
||||||
|
List[components.ChatGenerationParamsPluginUnionTypedDict],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
route: OptionalNullable[components.Route] = UNSET,
|
||||||
|
user: Optional[str] = None,
|
||||||
|
session_id: Optional[str] = None,
|
||||||
model: Optional[str] = None,
|
model: Optional[str] = None,
|
||||||
models: Optional[List[str]] = None,
|
models: Optional[List[str]] = None,
|
||||||
frequency_penalty: OptionalNullable[float] = UNSET,
|
frequency_penalty: OptionalNullable[float] = UNSET,
|
||||||
@@ -60,7 +75,6 @@ class Chat(BaseSDK):
|
|||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
top_p: OptionalNullable[float] = UNSET,
|
top_p: OptionalNullable[float] = UNSET,
|
||||||
user: Optional[str] = None,
|
|
||||||
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
||||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||||
server_url: Optional[str] = None,
|
server_url: Optional[str] = None,
|
||||||
@@ -72,6 +86,11 @@ class Chat(BaseSDK):
|
|||||||
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||||
|
|
||||||
:param messages:
|
:param messages:
|
||||||
|
:param provider: When multiple model providers are available, optionally indicate your routing preference.
|
||||||
|
:param plugins: Plugins you want to enable for this request, including their settings.
|
||||||
|
:param route:
|
||||||
|
:param user:
|
||||||
|
:param session_id: 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.
|
||||||
:param model:
|
:param model:
|
||||||
:param models:
|
:param models:
|
||||||
:param frequency_penalty:
|
:param frequency_penalty:
|
||||||
@@ -92,7 +111,6 @@ class Chat(BaseSDK):
|
|||||||
:param tool_choice:
|
:param tool_choice:
|
||||||
:param tools:
|
:param tools:
|
||||||
:param top_p:
|
:param top_p:
|
||||||
:param user:
|
|
||||||
:param debug:
|
:param debug:
|
||||||
:param retries: Override the default retry configuration for this method
|
:param retries: Override the default retry configuration for this method
|
||||||
:param server_url: Override the default server URL for this method
|
:param server_url: Override the default server URL for this method
|
||||||
@@ -106,6 +124,21 @@ class Chat(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
||||||
|
provider: OptionalNullable[
|
||||||
|
Union[
|
||||||
|
components.ChatGenerationParamsProvider,
|
||||||
|
components.ChatGenerationParamsProviderTypedDict,
|
||||||
|
]
|
||||||
|
] = UNSET,
|
||||||
|
plugins: Optional[
|
||||||
|
Union[
|
||||||
|
List[components.ChatGenerationParamsPluginUnion],
|
||||||
|
List[components.ChatGenerationParamsPluginUnionTypedDict],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
route: OptionalNullable[components.Route] = UNSET,
|
||||||
|
user: Optional[str] = None,
|
||||||
|
session_id: Optional[str] = None,
|
||||||
model: Optional[str] = None,
|
model: Optional[str] = None,
|
||||||
models: Optional[List[str]] = None,
|
models: Optional[List[str]] = None,
|
||||||
frequency_penalty: OptionalNullable[float] = UNSET,
|
frequency_penalty: OptionalNullable[float] = UNSET,
|
||||||
@@ -145,7 +178,6 @@ class Chat(BaseSDK):
|
|||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
top_p: OptionalNullable[float] = UNSET,
|
top_p: OptionalNullable[float] = UNSET,
|
||||||
user: Optional[str] = None,
|
|
||||||
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
||||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||||
server_url: Optional[str] = None,
|
server_url: Optional[str] = None,
|
||||||
@@ -157,6 +189,11 @@ class Chat(BaseSDK):
|
|||||||
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||||
|
|
||||||
:param messages:
|
:param messages:
|
||||||
|
:param provider: When multiple model providers are available, optionally indicate your routing preference.
|
||||||
|
:param plugins: Plugins you want to enable for this request, including their settings.
|
||||||
|
:param route:
|
||||||
|
:param user:
|
||||||
|
:param session_id: 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.
|
||||||
:param model:
|
:param model:
|
||||||
:param models:
|
:param models:
|
||||||
:param frequency_penalty:
|
:param frequency_penalty:
|
||||||
@@ -177,7 +214,6 @@ class Chat(BaseSDK):
|
|||||||
:param tool_choice:
|
:param tool_choice:
|
||||||
:param tools:
|
:param tools:
|
||||||
:param top_p:
|
:param top_p:
|
||||||
:param user:
|
|
||||||
:param debug:
|
:param debug:
|
||||||
:param retries: Override the default retry configuration for this method
|
:param retries: Override the default retry configuration for this method
|
||||||
:param server_url: Override the default server URL for this method
|
:param server_url: Override the default server URL for this method
|
||||||
@@ -190,6 +226,21 @@ class Chat(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
||||||
|
provider: OptionalNullable[
|
||||||
|
Union[
|
||||||
|
components.ChatGenerationParamsProvider,
|
||||||
|
components.ChatGenerationParamsProviderTypedDict,
|
||||||
|
]
|
||||||
|
] = UNSET,
|
||||||
|
plugins: Optional[
|
||||||
|
Union[
|
||||||
|
List[components.ChatGenerationParamsPluginUnion],
|
||||||
|
List[components.ChatGenerationParamsPluginUnionTypedDict],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
route: OptionalNullable[components.Route] = UNSET,
|
||||||
|
user: Optional[str] = None,
|
||||||
|
session_id: Optional[str] = None,
|
||||||
model: Optional[str] = None,
|
model: Optional[str] = None,
|
||||||
models: Optional[List[str]] = None,
|
models: Optional[List[str]] = None,
|
||||||
frequency_penalty: OptionalNullable[float] = UNSET,
|
frequency_penalty: OptionalNullable[float] = UNSET,
|
||||||
@@ -229,7 +280,6 @@ class Chat(BaseSDK):
|
|||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
top_p: OptionalNullable[float] = UNSET,
|
top_p: OptionalNullable[float] = UNSET,
|
||||||
user: Optional[str] = None,
|
|
||||||
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
||||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||||
server_url: Optional[str] = None,
|
server_url: Optional[str] = None,
|
||||||
@@ -241,6 +291,11 @@ class Chat(BaseSDK):
|
|||||||
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||||
|
|
||||||
:param messages:
|
:param messages:
|
||||||
|
:param provider: When multiple model providers are available, optionally indicate your routing preference.
|
||||||
|
:param plugins: Plugins you want to enable for this request, including their settings.
|
||||||
|
:param route:
|
||||||
|
:param user:
|
||||||
|
:param session_id: 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.
|
||||||
:param model:
|
:param model:
|
||||||
:param models:
|
:param models:
|
||||||
:param frequency_penalty:
|
:param frequency_penalty:
|
||||||
@@ -261,7 +316,6 @@ class Chat(BaseSDK):
|
|||||||
:param tool_choice:
|
:param tool_choice:
|
||||||
:param tools:
|
:param tools:
|
||||||
:param top_p:
|
:param top_p:
|
||||||
:param user:
|
|
||||||
:param debug:
|
:param debug:
|
||||||
:param retries: Override the default retry configuration for this method
|
:param retries: Override the default retry configuration for this method
|
||||||
:param server_url: Override the default server URL for this method
|
:param server_url: Override the default server URL for this method
|
||||||
@@ -280,6 +334,15 @@ class Chat(BaseSDK):
|
|||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = components.ChatGenerationParams(
|
request = components.ChatGenerationParams(
|
||||||
|
provider=utils.get_pydantic_model(
|
||||||
|
provider, OptionalNullable[components.ChatGenerationParamsProvider]
|
||||||
|
),
|
||||||
|
plugins=utils.get_pydantic_model(
|
||||||
|
plugins, Optional[List[components.ChatGenerationParamsPluginUnion]]
|
||||||
|
),
|
||||||
|
route=route,
|
||||||
|
user=user,
|
||||||
|
session_id=session_id,
|
||||||
messages=utils.get_pydantic_model(messages, List[components.Message]),
|
messages=utils.get_pydantic_model(messages, List[components.Message]),
|
||||||
model=model,
|
model=model,
|
||||||
models=models,
|
models=models,
|
||||||
@@ -310,7 +373,6 @@ class Chat(BaseSDK):
|
|||||||
tools, Optional[List[components.ToolDefinitionJSON]]
|
tools, Optional[List[components.ToolDefinitionJSON]]
|
||||||
),
|
),
|
||||||
top_p=top_p,
|
top_p=top_p,
|
||||||
user=user,
|
|
||||||
debug=utils.get_pydantic_model(debug, Optional[components.Debug]),
|
debug=utils.get_pydantic_model(debug, Optional[components.Debug]),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -406,6 +468,21 @@ class Chat(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
||||||
|
provider: OptionalNullable[
|
||||||
|
Union[
|
||||||
|
components.ChatGenerationParamsProvider,
|
||||||
|
components.ChatGenerationParamsProviderTypedDict,
|
||||||
|
]
|
||||||
|
] = UNSET,
|
||||||
|
plugins: Optional[
|
||||||
|
Union[
|
||||||
|
List[components.ChatGenerationParamsPluginUnion],
|
||||||
|
List[components.ChatGenerationParamsPluginUnionTypedDict],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
route: OptionalNullable[components.Route] = UNSET,
|
||||||
|
user: Optional[str] = None,
|
||||||
|
session_id: Optional[str] = None,
|
||||||
model: Optional[str] = None,
|
model: Optional[str] = None,
|
||||||
models: Optional[List[str]] = None,
|
models: Optional[List[str]] = None,
|
||||||
frequency_penalty: OptionalNullable[float] = UNSET,
|
frequency_penalty: OptionalNullable[float] = UNSET,
|
||||||
@@ -445,7 +522,6 @@ class Chat(BaseSDK):
|
|||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
top_p: OptionalNullable[float] = UNSET,
|
top_p: OptionalNullable[float] = UNSET,
|
||||||
user: Optional[str] = None,
|
|
||||||
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
||||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||||
server_url: Optional[str] = None,
|
server_url: Optional[str] = None,
|
||||||
@@ -457,6 +533,11 @@ class Chat(BaseSDK):
|
|||||||
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||||
|
|
||||||
:param messages:
|
:param messages:
|
||||||
|
:param provider: When multiple model providers are available, optionally indicate your routing preference.
|
||||||
|
:param plugins: Plugins you want to enable for this request, including their settings.
|
||||||
|
:param route:
|
||||||
|
:param user:
|
||||||
|
:param session_id: 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.
|
||||||
:param model:
|
:param model:
|
||||||
:param models:
|
:param models:
|
||||||
:param frequency_penalty:
|
:param frequency_penalty:
|
||||||
@@ -477,7 +558,6 @@ class Chat(BaseSDK):
|
|||||||
:param tool_choice:
|
:param tool_choice:
|
||||||
:param tools:
|
:param tools:
|
||||||
:param top_p:
|
:param top_p:
|
||||||
:param user:
|
|
||||||
:param debug:
|
:param debug:
|
||||||
:param retries: Override the default retry configuration for this method
|
:param retries: Override the default retry configuration for this method
|
||||||
:param server_url: Override the default server URL for this method
|
:param server_url: Override the default server URL for this method
|
||||||
@@ -491,6 +571,21 @@ class Chat(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
||||||
|
provider: OptionalNullable[
|
||||||
|
Union[
|
||||||
|
components.ChatGenerationParamsProvider,
|
||||||
|
components.ChatGenerationParamsProviderTypedDict,
|
||||||
|
]
|
||||||
|
] = UNSET,
|
||||||
|
plugins: Optional[
|
||||||
|
Union[
|
||||||
|
List[components.ChatGenerationParamsPluginUnion],
|
||||||
|
List[components.ChatGenerationParamsPluginUnionTypedDict],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
route: OptionalNullable[components.Route] = UNSET,
|
||||||
|
user: Optional[str] = None,
|
||||||
|
session_id: Optional[str] = None,
|
||||||
model: Optional[str] = None,
|
model: Optional[str] = None,
|
||||||
models: Optional[List[str]] = None,
|
models: Optional[List[str]] = None,
|
||||||
frequency_penalty: OptionalNullable[float] = UNSET,
|
frequency_penalty: OptionalNullable[float] = UNSET,
|
||||||
@@ -530,7 +625,6 @@ class Chat(BaseSDK):
|
|||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
top_p: OptionalNullable[float] = UNSET,
|
top_p: OptionalNullable[float] = UNSET,
|
||||||
user: Optional[str] = None,
|
|
||||||
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
||||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||||
server_url: Optional[str] = None,
|
server_url: Optional[str] = None,
|
||||||
@@ -542,6 +636,11 @@ class Chat(BaseSDK):
|
|||||||
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||||
|
|
||||||
:param messages:
|
:param messages:
|
||||||
|
:param provider: When multiple model providers are available, optionally indicate your routing preference.
|
||||||
|
:param plugins: Plugins you want to enable for this request, including their settings.
|
||||||
|
:param route:
|
||||||
|
:param user:
|
||||||
|
:param session_id: 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.
|
||||||
:param model:
|
:param model:
|
||||||
:param models:
|
:param models:
|
||||||
:param frequency_penalty:
|
:param frequency_penalty:
|
||||||
@@ -562,7 +661,6 @@ class Chat(BaseSDK):
|
|||||||
:param tool_choice:
|
:param tool_choice:
|
||||||
:param tools:
|
:param tools:
|
||||||
:param top_p:
|
:param top_p:
|
||||||
:param user:
|
|
||||||
:param debug:
|
:param debug:
|
||||||
:param retries: Override the default retry configuration for this method
|
:param retries: Override the default retry configuration for this method
|
||||||
:param server_url: Override the default server URL for this method
|
:param server_url: Override the default server URL for this method
|
||||||
@@ -575,6 +673,21 @@ class Chat(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
||||||
|
provider: OptionalNullable[
|
||||||
|
Union[
|
||||||
|
components.ChatGenerationParamsProvider,
|
||||||
|
components.ChatGenerationParamsProviderTypedDict,
|
||||||
|
]
|
||||||
|
] = UNSET,
|
||||||
|
plugins: Optional[
|
||||||
|
Union[
|
||||||
|
List[components.ChatGenerationParamsPluginUnion],
|
||||||
|
List[components.ChatGenerationParamsPluginUnionTypedDict],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
route: OptionalNullable[components.Route] = UNSET,
|
||||||
|
user: Optional[str] = None,
|
||||||
|
session_id: Optional[str] = None,
|
||||||
model: Optional[str] = None,
|
model: Optional[str] = None,
|
||||||
models: Optional[List[str]] = None,
|
models: Optional[List[str]] = None,
|
||||||
frequency_penalty: OptionalNullable[float] = UNSET,
|
frequency_penalty: OptionalNullable[float] = UNSET,
|
||||||
@@ -614,7 +727,6 @@ class Chat(BaseSDK):
|
|||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
top_p: OptionalNullable[float] = UNSET,
|
top_p: OptionalNullable[float] = UNSET,
|
||||||
user: Optional[str] = None,
|
|
||||||
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
||||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||||
server_url: Optional[str] = None,
|
server_url: Optional[str] = None,
|
||||||
@@ -626,6 +738,11 @@ class Chat(BaseSDK):
|
|||||||
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||||
|
|
||||||
:param messages:
|
:param messages:
|
||||||
|
:param provider: When multiple model providers are available, optionally indicate your routing preference.
|
||||||
|
:param plugins: Plugins you want to enable for this request, including their settings.
|
||||||
|
:param route:
|
||||||
|
:param user:
|
||||||
|
:param session_id: 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.
|
||||||
:param model:
|
:param model:
|
||||||
:param models:
|
:param models:
|
||||||
:param frequency_penalty:
|
:param frequency_penalty:
|
||||||
@@ -646,7 +763,6 @@ class Chat(BaseSDK):
|
|||||||
:param tool_choice:
|
:param tool_choice:
|
||||||
:param tools:
|
:param tools:
|
||||||
:param top_p:
|
:param top_p:
|
||||||
:param user:
|
|
||||||
:param debug:
|
:param debug:
|
||||||
:param retries: Override the default retry configuration for this method
|
:param retries: Override the default retry configuration for this method
|
||||||
:param server_url: Override the default server URL for this method
|
:param server_url: Override the default server URL for this method
|
||||||
@@ -665,6 +781,15 @@ class Chat(BaseSDK):
|
|||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = components.ChatGenerationParams(
|
request = components.ChatGenerationParams(
|
||||||
|
provider=utils.get_pydantic_model(
|
||||||
|
provider, OptionalNullable[components.ChatGenerationParamsProvider]
|
||||||
|
),
|
||||||
|
plugins=utils.get_pydantic_model(
|
||||||
|
plugins, Optional[List[components.ChatGenerationParamsPluginUnion]]
|
||||||
|
),
|
||||||
|
route=route,
|
||||||
|
user=user,
|
||||||
|
session_id=session_id,
|
||||||
messages=utils.get_pydantic_model(messages, List[components.Message]),
|
messages=utils.get_pydantic_model(messages, List[components.Message]),
|
||||||
model=model,
|
model=model,
|
||||||
models=models,
|
models=models,
|
||||||
@@ -695,7 +820,6 @@ class Chat(BaseSDK):
|
|||||||
tools, Optional[List[components.ToolDefinitionJSON]]
|
tools, Optional[List[components.ToolDefinitionJSON]]
|
||||||
),
|
),
|
||||||
top_p=top_p,
|
top_p=top_p,
|
||||||
user=user,
|
|
||||||
debug=utils.get_pydantic_model(debug, Optional[components.Debug]),
|
debug=utils.get_pydantic_model(debug, Optional[components.Debug]),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,18 @@ import builtins
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
|
from ._schema0 import Schema0, Schema0Enum, Schema0TypedDict
|
||||||
|
from ._schema3 import (
|
||||||
|
Schema3,
|
||||||
|
Schema3ReasoningEncrypted,
|
||||||
|
Schema3ReasoningEncryptedTypedDict,
|
||||||
|
Schema3ReasoningSummary,
|
||||||
|
Schema3ReasoningSummaryTypedDict,
|
||||||
|
Schema3ReasoningText,
|
||||||
|
Schema3ReasoningTextTypedDict,
|
||||||
|
Schema3TypedDict,
|
||||||
|
Schema5,
|
||||||
|
)
|
||||||
from .activityitem import ActivityItem, ActivityItemTypedDict
|
from .activityitem import ActivityItem, ActivityItemTypedDict
|
||||||
from .assistantmessage import (
|
from .assistantmessage import (
|
||||||
AssistantMessage,
|
AssistantMessage,
|
||||||
@@ -25,6 +37,21 @@ if TYPE_CHECKING:
|
|||||||
from .chaterror import ChatErrorError, ChatErrorErrorTypedDict, Code, CodeTypedDict
|
from .chaterror import ChatErrorError, ChatErrorErrorTypedDict, Code, CodeTypedDict
|
||||||
from .chatgenerationparams import (
|
from .chatgenerationparams import (
|
||||||
ChatGenerationParams,
|
ChatGenerationParams,
|
||||||
|
ChatGenerationParamsDataCollection,
|
||||||
|
ChatGenerationParamsMaxPrice,
|
||||||
|
ChatGenerationParamsMaxPriceTypedDict,
|
||||||
|
ChatGenerationParamsPluginFileParser,
|
||||||
|
ChatGenerationParamsPluginFileParserTypedDict,
|
||||||
|
ChatGenerationParamsPluginModeration,
|
||||||
|
ChatGenerationParamsPluginModerationTypedDict,
|
||||||
|
ChatGenerationParamsPluginResponseHealing,
|
||||||
|
ChatGenerationParamsPluginResponseHealingTypedDict,
|
||||||
|
ChatGenerationParamsPluginUnion,
|
||||||
|
ChatGenerationParamsPluginUnionTypedDict,
|
||||||
|
ChatGenerationParamsPluginWeb,
|
||||||
|
ChatGenerationParamsPluginWebTypedDict,
|
||||||
|
ChatGenerationParamsProvider,
|
||||||
|
ChatGenerationParamsProviderTypedDict,
|
||||||
ChatGenerationParamsResponseFormatJSONObject,
|
ChatGenerationParamsResponseFormatJSONObject,
|
||||||
ChatGenerationParamsResponseFormatJSONObjectTypedDict,
|
ChatGenerationParamsResponseFormatJSONObjectTypedDict,
|
||||||
ChatGenerationParamsResponseFormatPython,
|
ChatGenerationParamsResponseFormatPython,
|
||||||
@@ -39,8 +66,14 @@ if TYPE_CHECKING:
|
|||||||
Debug,
|
Debug,
|
||||||
DebugTypedDict,
|
DebugTypedDict,
|
||||||
Effort,
|
Effort,
|
||||||
|
Engine,
|
||||||
|
Pdf,
|
||||||
|
PdfEngine,
|
||||||
|
PdfTypedDict,
|
||||||
|
Quantizations,
|
||||||
Reasoning,
|
Reasoning,
|
||||||
ReasoningTypedDict,
|
ReasoningTypedDict,
|
||||||
|
Route,
|
||||||
)
|
)
|
||||||
from .chatgenerationtokenusage import (
|
from .chatgenerationtokenusage import (
|
||||||
ChatGenerationTokenUsage,
|
ChatGenerationTokenUsage,
|
||||||
@@ -421,41 +454,39 @@ if TYPE_CHECKING:
|
|||||||
OpenResponsesReasoningSummaryTextDoneEventTypedDict,
|
OpenResponsesReasoningSummaryTextDoneEventTypedDict,
|
||||||
)
|
)
|
||||||
from .openresponsesrequest import (
|
from .openresponsesrequest import (
|
||||||
Engine,
|
|
||||||
IDFileParser,
|
IDFileParser,
|
||||||
IDModeration,
|
IDModeration,
|
||||||
IDResponseHealing,
|
IDResponseHealing,
|
||||||
IDWeb,
|
IDWeb,
|
||||||
Ignore,
|
|
||||||
IgnoreTypedDict,
|
|
||||||
MaxPrice,
|
|
||||||
MaxPriceTypedDict,
|
|
||||||
Only,
|
|
||||||
OnlyTypedDict,
|
|
||||||
OpenResponsesRequest,
|
OpenResponsesRequest,
|
||||||
|
OpenResponsesRequestIgnore,
|
||||||
|
OpenResponsesRequestIgnoreTypedDict,
|
||||||
|
OpenResponsesRequestMaxPrice,
|
||||||
|
OpenResponsesRequestMaxPriceTypedDict,
|
||||||
|
OpenResponsesRequestOnly,
|
||||||
|
OpenResponsesRequestOnlyTypedDict,
|
||||||
|
OpenResponsesRequestOrder,
|
||||||
|
OpenResponsesRequestOrderTypedDict,
|
||||||
|
OpenResponsesRequestPluginFileParser,
|
||||||
|
OpenResponsesRequestPluginFileParserTypedDict,
|
||||||
|
OpenResponsesRequestPluginModeration,
|
||||||
|
OpenResponsesRequestPluginModerationTypedDict,
|
||||||
|
OpenResponsesRequestPluginResponseHealing,
|
||||||
|
OpenResponsesRequestPluginResponseHealingTypedDict,
|
||||||
|
OpenResponsesRequestPluginUnion,
|
||||||
|
OpenResponsesRequestPluginUnionTypedDict,
|
||||||
|
OpenResponsesRequestPluginWeb,
|
||||||
|
OpenResponsesRequestPluginWebTypedDict,
|
||||||
|
OpenResponsesRequestProvider,
|
||||||
|
OpenResponsesRequestProviderTypedDict,
|
||||||
|
OpenResponsesRequestSort,
|
||||||
|
OpenResponsesRequestSortTypedDict,
|
||||||
OpenResponsesRequestToolFunction,
|
OpenResponsesRequestToolFunction,
|
||||||
OpenResponsesRequestToolFunctionTypedDict,
|
OpenResponsesRequestToolFunctionTypedDict,
|
||||||
OpenResponsesRequestToolUnion,
|
OpenResponsesRequestToolUnion,
|
||||||
OpenResponsesRequestToolUnionTypedDict,
|
OpenResponsesRequestToolUnionTypedDict,
|
||||||
OpenResponsesRequestType,
|
OpenResponsesRequestType,
|
||||||
OpenResponsesRequestTypedDict,
|
OpenResponsesRequestTypedDict,
|
||||||
Order,
|
|
||||||
OrderTypedDict,
|
|
||||||
Pdf,
|
|
||||||
PdfEngine,
|
|
||||||
PdfTypedDict,
|
|
||||||
Plugin,
|
|
||||||
PluginFileParser,
|
|
||||||
PluginFileParserTypedDict,
|
|
||||||
PluginModeration,
|
|
||||||
PluginModerationTypedDict,
|
|
||||||
PluginResponseHealing,
|
|
||||||
PluginResponseHealingTypedDict,
|
|
||||||
PluginTypedDict,
|
|
||||||
PluginWeb,
|
|
||||||
PluginWebTypedDict,
|
|
||||||
Provider,
|
|
||||||
ProviderTypedDict,
|
|
||||||
ServiceTier,
|
ServiceTier,
|
||||||
Truncation,
|
Truncation,
|
||||||
)
|
)
|
||||||
@@ -589,13 +620,43 @@ if TYPE_CHECKING:
|
|||||||
PaymentRequiredResponseErrorData,
|
PaymentRequiredResponseErrorData,
|
||||||
PaymentRequiredResponseErrorDataTypedDict,
|
PaymentRequiredResponseErrorDataTypedDict,
|
||||||
)
|
)
|
||||||
|
from .pdfparserengine import PDFParserEngine
|
||||||
|
from .pdfparseroptions import PDFParserOptions, PDFParserOptionsTypedDict
|
||||||
from .perrequestlimits import PerRequestLimits, PerRequestLimitsTypedDict
|
from .perrequestlimits import PerRequestLimits, PerRequestLimitsTypedDict
|
||||||
from .providername import ProviderName
|
from .providername import ProviderName
|
||||||
from .provideroverloadedresponseerrordata import (
|
from .provideroverloadedresponseerrordata import (
|
||||||
ProviderOverloadedResponseErrorData,
|
ProviderOverloadedResponseErrorData,
|
||||||
ProviderOverloadedResponseErrorDataTypedDict,
|
ProviderOverloadedResponseErrorDataTypedDict,
|
||||||
)
|
)
|
||||||
|
from .providerpreferences import (
|
||||||
|
ProviderPreferences,
|
||||||
|
ProviderPreferencesIgnore,
|
||||||
|
ProviderPreferencesIgnoreTypedDict,
|
||||||
|
ProviderPreferencesMaxPrice,
|
||||||
|
ProviderPreferencesMaxPriceTypedDict,
|
||||||
|
ProviderPreferencesOnly,
|
||||||
|
ProviderPreferencesOnlyTypedDict,
|
||||||
|
ProviderPreferencesOrder,
|
||||||
|
ProviderPreferencesOrderTypedDict,
|
||||||
|
ProviderPreferencesPartition,
|
||||||
|
ProviderPreferencesProviderSort,
|
||||||
|
ProviderPreferencesProviderSortConfig,
|
||||||
|
ProviderPreferencesProviderSortConfigTypedDict,
|
||||||
|
ProviderPreferencesSortUnion,
|
||||||
|
ProviderPreferencesSortUnionTypedDict,
|
||||||
|
ProviderPreferencesTypedDict,
|
||||||
|
ProviderSortConfigEnum,
|
||||||
|
ProviderSortConfigUnion,
|
||||||
|
ProviderSortConfigUnionTypedDict,
|
||||||
|
SortEnum,
|
||||||
|
)
|
||||||
from .providersort import ProviderSort
|
from .providersort import ProviderSort
|
||||||
|
from .providersortconfig import (
|
||||||
|
Partition,
|
||||||
|
ProviderSortConfig,
|
||||||
|
ProviderSortConfigTypedDict,
|
||||||
|
)
|
||||||
|
from .providersortunion import ProviderSortUnion, ProviderSortUnionTypedDict
|
||||||
from .publicendpoint import (
|
from .publicendpoint import (
|
||||||
Pricing,
|
Pricing,
|
||||||
PricingTypedDict,
|
PricingTypedDict,
|
||||||
@@ -785,6 +846,7 @@ if TYPE_CHECKING:
|
|||||||
UserMessageContentTypedDict,
|
UserMessageContentTypedDict,
|
||||||
UserMessageTypedDict,
|
UserMessageTypedDict,
|
||||||
)
|
)
|
||||||
|
from .websearchengine import WebSearchEngine
|
||||||
from .websearchpreviewtooluserlocation import (
|
from .websearchpreviewtooluserlocation import (
|
||||||
WebSearchPreviewToolUserLocation,
|
WebSearchPreviewToolUserLocation,
|
||||||
WebSearchPreviewToolUserLocationType,
|
WebSearchPreviewToolUserLocationType,
|
||||||
@@ -810,6 +872,21 @@ __all__ = [
|
|||||||
"ChatErrorError",
|
"ChatErrorError",
|
||||||
"ChatErrorErrorTypedDict",
|
"ChatErrorErrorTypedDict",
|
||||||
"ChatGenerationParams",
|
"ChatGenerationParams",
|
||||||
|
"ChatGenerationParamsDataCollection",
|
||||||
|
"ChatGenerationParamsMaxPrice",
|
||||||
|
"ChatGenerationParamsMaxPriceTypedDict",
|
||||||
|
"ChatGenerationParamsPluginFileParser",
|
||||||
|
"ChatGenerationParamsPluginFileParserTypedDict",
|
||||||
|
"ChatGenerationParamsPluginModeration",
|
||||||
|
"ChatGenerationParamsPluginModerationTypedDict",
|
||||||
|
"ChatGenerationParamsPluginResponseHealing",
|
||||||
|
"ChatGenerationParamsPluginResponseHealingTypedDict",
|
||||||
|
"ChatGenerationParamsPluginUnion",
|
||||||
|
"ChatGenerationParamsPluginUnionTypedDict",
|
||||||
|
"ChatGenerationParamsPluginWeb",
|
||||||
|
"ChatGenerationParamsPluginWebTypedDict",
|
||||||
|
"ChatGenerationParamsProvider",
|
||||||
|
"ChatGenerationParamsProviderTypedDict",
|
||||||
"ChatGenerationParamsResponseFormatJSONObject",
|
"ChatGenerationParamsResponseFormatJSONObject",
|
||||||
"ChatGenerationParamsResponseFormatJSONObjectTypedDict",
|
"ChatGenerationParamsResponseFormatJSONObjectTypedDict",
|
||||||
"ChatGenerationParamsResponseFormatPython",
|
"ChatGenerationParamsResponseFormatPython",
|
||||||
@@ -923,8 +1000,6 @@ __all__ = [
|
|||||||
"IDModeration",
|
"IDModeration",
|
||||||
"IDResponseHealing",
|
"IDResponseHealing",
|
||||||
"IDWeb",
|
"IDWeb",
|
||||||
"Ignore",
|
|
||||||
"IgnoreTypedDict",
|
|
||||||
"ImageGenerationStatus",
|
"ImageGenerationStatus",
|
||||||
"ImageURL",
|
"ImageURL",
|
||||||
"ImageURLTypedDict",
|
"ImageURLTypedDict",
|
||||||
@@ -938,8 +1013,6 @@ __all__ = [
|
|||||||
"JSONSchemaConfigTypedDict",
|
"JSONSchemaConfigTypedDict",
|
||||||
"ListEndpointsResponse",
|
"ListEndpointsResponse",
|
||||||
"ListEndpointsResponseTypedDict",
|
"ListEndpointsResponseTypedDict",
|
||||||
"MaxPrice",
|
|
||||||
"MaxPriceTypedDict",
|
|
||||||
"Message",
|
"Message",
|
||||||
"MessageContent",
|
"MessageContent",
|
||||||
"MessageContentTypedDict",
|
"MessageContentTypedDict",
|
||||||
@@ -965,8 +1038,6 @@ __all__ = [
|
|||||||
"NotFoundResponseErrorData",
|
"NotFoundResponseErrorData",
|
||||||
"NotFoundResponseErrorDataTypedDict",
|
"NotFoundResponseErrorDataTypedDict",
|
||||||
"Object",
|
"Object",
|
||||||
"Only",
|
|
||||||
"OnlyTypedDict",
|
|
||||||
"OpenAIResponsesAnnotation",
|
"OpenAIResponsesAnnotation",
|
||||||
"OpenAIResponsesAnnotationTypedDict",
|
"OpenAIResponsesAnnotationTypedDict",
|
||||||
"OpenAIResponsesIncludable",
|
"OpenAIResponsesIncludable",
|
||||||
@@ -1112,6 +1183,28 @@ __all__ = [
|
|||||||
"OpenResponsesReasoningType",
|
"OpenResponsesReasoningType",
|
||||||
"OpenResponsesReasoningTypedDict",
|
"OpenResponsesReasoningTypedDict",
|
||||||
"OpenResponsesRequest",
|
"OpenResponsesRequest",
|
||||||
|
"OpenResponsesRequestIgnore",
|
||||||
|
"OpenResponsesRequestIgnoreTypedDict",
|
||||||
|
"OpenResponsesRequestMaxPrice",
|
||||||
|
"OpenResponsesRequestMaxPriceTypedDict",
|
||||||
|
"OpenResponsesRequestOnly",
|
||||||
|
"OpenResponsesRequestOnlyTypedDict",
|
||||||
|
"OpenResponsesRequestOrder",
|
||||||
|
"OpenResponsesRequestOrderTypedDict",
|
||||||
|
"OpenResponsesRequestPluginFileParser",
|
||||||
|
"OpenResponsesRequestPluginFileParserTypedDict",
|
||||||
|
"OpenResponsesRequestPluginModeration",
|
||||||
|
"OpenResponsesRequestPluginModerationTypedDict",
|
||||||
|
"OpenResponsesRequestPluginResponseHealing",
|
||||||
|
"OpenResponsesRequestPluginResponseHealingTypedDict",
|
||||||
|
"OpenResponsesRequestPluginUnion",
|
||||||
|
"OpenResponsesRequestPluginUnionTypedDict",
|
||||||
|
"OpenResponsesRequestPluginWeb",
|
||||||
|
"OpenResponsesRequestPluginWebTypedDict",
|
||||||
|
"OpenResponsesRequestProvider",
|
||||||
|
"OpenResponsesRequestProviderTypedDict",
|
||||||
|
"OpenResponsesRequestSort",
|
||||||
|
"OpenResponsesRequestSortTypedDict",
|
||||||
"OpenResponsesRequestToolFunction",
|
"OpenResponsesRequestToolFunction",
|
||||||
"OpenResponsesRequestToolFunctionTypedDict",
|
"OpenResponsesRequestToolFunctionTypedDict",
|
||||||
"OpenResponsesRequestToolUnion",
|
"OpenResponsesRequestToolUnion",
|
||||||
@@ -1177,8 +1270,6 @@ __all__ = [
|
|||||||
"OpenResponsesWebSearchToolFiltersTypedDict",
|
"OpenResponsesWebSearchToolFiltersTypedDict",
|
||||||
"OpenResponsesWebSearchToolType",
|
"OpenResponsesWebSearchToolType",
|
||||||
"OpenResponsesWebSearchToolTypedDict",
|
"OpenResponsesWebSearchToolTypedDict",
|
||||||
"Order",
|
|
||||||
"OrderTypedDict",
|
|
||||||
"OutputItemImageGenerationCall",
|
"OutputItemImageGenerationCall",
|
||||||
"OutputItemImageGenerationCallType",
|
"OutputItemImageGenerationCallType",
|
||||||
"OutputItemImageGenerationCallTypedDict",
|
"OutputItemImageGenerationCallTypedDict",
|
||||||
@@ -1196,11 +1287,15 @@ __all__ = [
|
|||||||
"OutputModality",
|
"OutputModality",
|
||||||
"OutputTokensDetails",
|
"OutputTokensDetails",
|
||||||
"OutputTokensDetailsTypedDict",
|
"OutputTokensDetailsTypedDict",
|
||||||
|
"PDFParserEngine",
|
||||||
|
"PDFParserOptions",
|
||||||
|
"PDFParserOptionsTypedDict",
|
||||||
"Parameter",
|
"Parameter",
|
||||||
"Part1",
|
"Part1",
|
||||||
"Part1TypedDict",
|
"Part1TypedDict",
|
||||||
"Part2",
|
"Part2",
|
||||||
"Part2TypedDict",
|
"Part2TypedDict",
|
||||||
|
"Partition",
|
||||||
"PayloadTooLargeResponseErrorData",
|
"PayloadTooLargeResponseErrorData",
|
||||||
"PayloadTooLargeResponseErrorDataTypedDict",
|
"PayloadTooLargeResponseErrorDataTypedDict",
|
||||||
"PaymentRequiredResponseErrorData",
|
"PaymentRequiredResponseErrorData",
|
||||||
@@ -1210,34 +1305,46 @@ __all__ = [
|
|||||||
"PdfTypedDict",
|
"PdfTypedDict",
|
||||||
"PerRequestLimits",
|
"PerRequestLimits",
|
||||||
"PerRequestLimitsTypedDict",
|
"PerRequestLimitsTypedDict",
|
||||||
"Plugin",
|
|
||||||
"PluginFileParser",
|
|
||||||
"PluginFileParserTypedDict",
|
|
||||||
"PluginModeration",
|
|
||||||
"PluginModerationTypedDict",
|
|
||||||
"PluginResponseHealing",
|
|
||||||
"PluginResponseHealingTypedDict",
|
|
||||||
"PluginTypedDict",
|
|
||||||
"PluginWeb",
|
|
||||||
"PluginWebTypedDict",
|
|
||||||
"Pricing",
|
"Pricing",
|
||||||
"PricingTypedDict",
|
"PricingTypedDict",
|
||||||
"Prompt",
|
"Prompt",
|
||||||
"PromptTokensDetails",
|
"PromptTokensDetails",
|
||||||
"PromptTokensDetailsTypedDict",
|
"PromptTokensDetailsTypedDict",
|
||||||
"PromptTypedDict",
|
"PromptTypedDict",
|
||||||
"Provider",
|
|
||||||
"ProviderName",
|
"ProviderName",
|
||||||
"ProviderOverloadedResponseErrorData",
|
"ProviderOverloadedResponseErrorData",
|
||||||
"ProviderOverloadedResponseErrorDataTypedDict",
|
"ProviderOverloadedResponseErrorDataTypedDict",
|
||||||
|
"ProviderPreferences",
|
||||||
|
"ProviderPreferencesIgnore",
|
||||||
|
"ProviderPreferencesIgnoreTypedDict",
|
||||||
|
"ProviderPreferencesMaxPrice",
|
||||||
|
"ProviderPreferencesMaxPriceTypedDict",
|
||||||
|
"ProviderPreferencesOnly",
|
||||||
|
"ProviderPreferencesOnlyTypedDict",
|
||||||
|
"ProviderPreferencesOrder",
|
||||||
|
"ProviderPreferencesOrderTypedDict",
|
||||||
|
"ProviderPreferencesPartition",
|
||||||
|
"ProviderPreferencesProviderSort",
|
||||||
|
"ProviderPreferencesProviderSortConfig",
|
||||||
|
"ProviderPreferencesProviderSortConfigTypedDict",
|
||||||
|
"ProviderPreferencesSortUnion",
|
||||||
|
"ProviderPreferencesSortUnionTypedDict",
|
||||||
|
"ProviderPreferencesTypedDict",
|
||||||
"ProviderSort",
|
"ProviderSort",
|
||||||
"ProviderTypedDict",
|
"ProviderSortConfig",
|
||||||
|
"ProviderSortConfigEnum",
|
||||||
|
"ProviderSortConfigTypedDict",
|
||||||
|
"ProviderSortConfigUnion",
|
||||||
|
"ProviderSortConfigUnionTypedDict",
|
||||||
|
"ProviderSortUnion",
|
||||||
|
"ProviderSortUnionTypedDict",
|
||||||
"PublicEndpoint",
|
"PublicEndpoint",
|
||||||
"PublicEndpointQuantization",
|
"PublicEndpointQuantization",
|
||||||
"PublicEndpointTypedDict",
|
"PublicEndpointTypedDict",
|
||||||
"PublicPricing",
|
"PublicPricing",
|
||||||
"PublicPricingTypedDict",
|
"PublicPricingTypedDict",
|
||||||
"Quantization",
|
"Quantization",
|
||||||
|
"Quantizations",
|
||||||
"Reason",
|
"Reason",
|
||||||
"Reasoning",
|
"Reasoning",
|
||||||
"ReasoningSummaryText",
|
"ReasoningSummaryText",
|
||||||
@@ -1331,11 +1438,25 @@ __all__ = [
|
|||||||
"ResponsesWebSearchUserLocation",
|
"ResponsesWebSearchUserLocation",
|
||||||
"ResponsesWebSearchUserLocationType",
|
"ResponsesWebSearchUserLocationType",
|
||||||
"ResponsesWebSearchUserLocationTypedDict",
|
"ResponsesWebSearchUserLocationTypedDict",
|
||||||
|
"Route",
|
||||||
|
"Schema0",
|
||||||
|
"Schema0Enum",
|
||||||
|
"Schema0TypedDict",
|
||||||
|
"Schema3",
|
||||||
|
"Schema3ReasoningEncrypted",
|
||||||
|
"Schema3ReasoningEncryptedTypedDict",
|
||||||
|
"Schema3ReasoningSummary",
|
||||||
|
"Schema3ReasoningSummaryTypedDict",
|
||||||
|
"Schema3ReasoningText",
|
||||||
|
"Schema3ReasoningTextTypedDict",
|
||||||
|
"Schema3TypedDict",
|
||||||
|
"Schema5",
|
||||||
"Security",
|
"Security",
|
||||||
"SecurityTypedDict",
|
"SecurityTypedDict",
|
||||||
"ServiceTier",
|
"ServiceTier",
|
||||||
"ServiceUnavailableResponseErrorData",
|
"ServiceUnavailableResponseErrorData",
|
||||||
"ServiceUnavailableResponseErrorDataTypedDict",
|
"ServiceUnavailableResponseErrorDataTypedDict",
|
||||||
|
"SortEnum",
|
||||||
"StreamOptions",
|
"StreamOptions",
|
||||||
"StreamOptionsTypedDict",
|
"StreamOptionsTypedDict",
|
||||||
"SystemMessage",
|
"SystemMessage",
|
||||||
@@ -1396,6 +1517,7 @@ __all__ = [
|
|||||||
"VideoURL1TypedDict",
|
"VideoURL1TypedDict",
|
||||||
"VideoURL2",
|
"VideoURL2",
|
||||||
"VideoURL2TypedDict",
|
"VideoURL2TypedDict",
|
||||||
|
"WebSearchEngine",
|
||||||
"WebSearchPreviewToolUserLocation",
|
"WebSearchPreviewToolUserLocation",
|
||||||
"WebSearchPreviewToolUserLocationType",
|
"WebSearchPreviewToolUserLocationType",
|
||||||
"WebSearchPreviewToolUserLocationTypedDict",
|
"WebSearchPreviewToolUserLocationTypedDict",
|
||||||
@@ -1403,6 +1525,18 @@ __all__ = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
_dynamic_imports: dict[str, str] = {
|
_dynamic_imports: dict[str, str] = {
|
||||||
|
"Schema0": "._schema0",
|
||||||
|
"Schema0Enum": "._schema0",
|
||||||
|
"Schema0TypedDict": "._schema0",
|
||||||
|
"Schema3": "._schema3",
|
||||||
|
"Schema3ReasoningEncrypted": "._schema3",
|
||||||
|
"Schema3ReasoningEncryptedTypedDict": "._schema3",
|
||||||
|
"Schema3ReasoningSummary": "._schema3",
|
||||||
|
"Schema3ReasoningSummaryTypedDict": "._schema3",
|
||||||
|
"Schema3ReasoningText": "._schema3",
|
||||||
|
"Schema3ReasoningTextTypedDict": "._schema3",
|
||||||
|
"Schema3TypedDict": "._schema3",
|
||||||
|
"Schema5": "._schema3",
|
||||||
"ActivityItem": ".activityitem",
|
"ActivityItem": ".activityitem",
|
||||||
"ActivityItemTypedDict": ".activityitem",
|
"ActivityItemTypedDict": ".activityitem",
|
||||||
"AssistantMessage": ".assistantmessage",
|
"AssistantMessage": ".assistantmessage",
|
||||||
@@ -1419,6 +1553,21 @@ _dynamic_imports: dict[str, str] = {
|
|||||||
"Code": ".chaterror",
|
"Code": ".chaterror",
|
||||||
"CodeTypedDict": ".chaterror",
|
"CodeTypedDict": ".chaterror",
|
||||||
"ChatGenerationParams": ".chatgenerationparams",
|
"ChatGenerationParams": ".chatgenerationparams",
|
||||||
|
"ChatGenerationParamsDataCollection": ".chatgenerationparams",
|
||||||
|
"ChatGenerationParamsMaxPrice": ".chatgenerationparams",
|
||||||
|
"ChatGenerationParamsMaxPriceTypedDict": ".chatgenerationparams",
|
||||||
|
"ChatGenerationParamsPluginFileParser": ".chatgenerationparams",
|
||||||
|
"ChatGenerationParamsPluginFileParserTypedDict": ".chatgenerationparams",
|
||||||
|
"ChatGenerationParamsPluginModeration": ".chatgenerationparams",
|
||||||
|
"ChatGenerationParamsPluginModerationTypedDict": ".chatgenerationparams",
|
||||||
|
"ChatGenerationParamsPluginResponseHealing": ".chatgenerationparams",
|
||||||
|
"ChatGenerationParamsPluginResponseHealingTypedDict": ".chatgenerationparams",
|
||||||
|
"ChatGenerationParamsPluginUnion": ".chatgenerationparams",
|
||||||
|
"ChatGenerationParamsPluginUnionTypedDict": ".chatgenerationparams",
|
||||||
|
"ChatGenerationParamsPluginWeb": ".chatgenerationparams",
|
||||||
|
"ChatGenerationParamsPluginWebTypedDict": ".chatgenerationparams",
|
||||||
|
"ChatGenerationParamsProvider": ".chatgenerationparams",
|
||||||
|
"ChatGenerationParamsProviderTypedDict": ".chatgenerationparams",
|
||||||
"ChatGenerationParamsResponseFormatJSONObject": ".chatgenerationparams",
|
"ChatGenerationParamsResponseFormatJSONObject": ".chatgenerationparams",
|
||||||
"ChatGenerationParamsResponseFormatJSONObjectTypedDict": ".chatgenerationparams",
|
"ChatGenerationParamsResponseFormatJSONObjectTypedDict": ".chatgenerationparams",
|
||||||
"ChatGenerationParamsResponseFormatPython": ".chatgenerationparams",
|
"ChatGenerationParamsResponseFormatPython": ".chatgenerationparams",
|
||||||
@@ -1433,8 +1582,14 @@ _dynamic_imports: dict[str, str] = {
|
|||||||
"Debug": ".chatgenerationparams",
|
"Debug": ".chatgenerationparams",
|
||||||
"DebugTypedDict": ".chatgenerationparams",
|
"DebugTypedDict": ".chatgenerationparams",
|
||||||
"Effort": ".chatgenerationparams",
|
"Effort": ".chatgenerationparams",
|
||||||
|
"Engine": ".chatgenerationparams",
|
||||||
|
"Pdf": ".chatgenerationparams",
|
||||||
|
"PdfEngine": ".chatgenerationparams",
|
||||||
|
"PdfTypedDict": ".chatgenerationparams",
|
||||||
|
"Quantizations": ".chatgenerationparams",
|
||||||
"Reasoning": ".chatgenerationparams",
|
"Reasoning": ".chatgenerationparams",
|
||||||
"ReasoningTypedDict": ".chatgenerationparams",
|
"ReasoningTypedDict": ".chatgenerationparams",
|
||||||
|
"Route": ".chatgenerationparams",
|
||||||
"ChatGenerationTokenUsage": ".chatgenerationtokenusage",
|
"ChatGenerationTokenUsage": ".chatgenerationtokenusage",
|
||||||
"ChatGenerationTokenUsageTypedDict": ".chatgenerationtokenusage",
|
"ChatGenerationTokenUsageTypedDict": ".chatgenerationtokenusage",
|
||||||
"CompletionTokensDetails": ".chatgenerationtokenusage",
|
"CompletionTokensDetails": ".chatgenerationtokenusage",
|
||||||
@@ -1726,41 +1881,39 @@ _dynamic_imports: dict[str, str] = {
|
|||||||
"OpenResponsesReasoningSummaryTextDoneEvent": ".openresponsesreasoningsummarytextdoneevent",
|
"OpenResponsesReasoningSummaryTextDoneEvent": ".openresponsesreasoningsummarytextdoneevent",
|
||||||
"OpenResponsesReasoningSummaryTextDoneEventType": ".openresponsesreasoningsummarytextdoneevent",
|
"OpenResponsesReasoningSummaryTextDoneEventType": ".openresponsesreasoningsummarytextdoneevent",
|
||||||
"OpenResponsesReasoningSummaryTextDoneEventTypedDict": ".openresponsesreasoningsummarytextdoneevent",
|
"OpenResponsesReasoningSummaryTextDoneEventTypedDict": ".openresponsesreasoningsummarytextdoneevent",
|
||||||
"Engine": ".openresponsesrequest",
|
|
||||||
"IDFileParser": ".openresponsesrequest",
|
"IDFileParser": ".openresponsesrequest",
|
||||||
"IDModeration": ".openresponsesrequest",
|
"IDModeration": ".openresponsesrequest",
|
||||||
"IDResponseHealing": ".openresponsesrequest",
|
"IDResponseHealing": ".openresponsesrequest",
|
||||||
"IDWeb": ".openresponsesrequest",
|
"IDWeb": ".openresponsesrequest",
|
||||||
"Ignore": ".openresponsesrequest",
|
|
||||||
"IgnoreTypedDict": ".openresponsesrequest",
|
|
||||||
"MaxPrice": ".openresponsesrequest",
|
|
||||||
"MaxPriceTypedDict": ".openresponsesrequest",
|
|
||||||
"Only": ".openresponsesrequest",
|
|
||||||
"OnlyTypedDict": ".openresponsesrequest",
|
|
||||||
"OpenResponsesRequest": ".openresponsesrequest",
|
"OpenResponsesRequest": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestIgnore": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestIgnoreTypedDict": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestMaxPrice": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestMaxPriceTypedDict": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestOnly": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestOnlyTypedDict": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestOrder": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestOrderTypedDict": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestPluginFileParser": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestPluginFileParserTypedDict": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestPluginModeration": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestPluginModerationTypedDict": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestPluginResponseHealing": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestPluginResponseHealingTypedDict": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestPluginUnion": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestPluginUnionTypedDict": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestPluginWeb": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestPluginWebTypedDict": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestProvider": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestProviderTypedDict": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestSort": ".openresponsesrequest",
|
||||||
|
"OpenResponsesRequestSortTypedDict": ".openresponsesrequest",
|
||||||
"OpenResponsesRequestToolFunction": ".openresponsesrequest",
|
"OpenResponsesRequestToolFunction": ".openresponsesrequest",
|
||||||
"OpenResponsesRequestToolFunctionTypedDict": ".openresponsesrequest",
|
"OpenResponsesRequestToolFunctionTypedDict": ".openresponsesrequest",
|
||||||
"OpenResponsesRequestToolUnion": ".openresponsesrequest",
|
"OpenResponsesRequestToolUnion": ".openresponsesrequest",
|
||||||
"OpenResponsesRequestToolUnionTypedDict": ".openresponsesrequest",
|
"OpenResponsesRequestToolUnionTypedDict": ".openresponsesrequest",
|
||||||
"OpenResponsesRequestType": ".openresponsesrequest",
|
"OpenResponsesRequestType": ".openresponsesrequest",
|
||||||
"OpenResponsesRequestTypedDict": ".openresponsesrequest",
|
"OpenResponsesRequestTypedDict": ".openresponsesrequest",
|
||||||
"Order": ".openresponsesrequest",
|
|
||||||
"OrderTypedDict": ".openresponsesrequest",
|
|
||||||
"Pdf": ".openresponsesrequest",
|
|
||||||
"PdfEngine": ".openresponsesrequest",
|
|
||||||
"PdfTypedDict": ".openresponsesrequest",
|
|
||||||
"Plugin": ".openresponsesrequest",
|
|
||||||
"PluginFileParser": ".openresponsesrequest",
|
|
||||||
"PluginFileParserTypedDict": ".openresponsesrequest",
|
|
||||||
"PluginModeration": ".openresponsesrequest",
|
|
||||||
"PluginModerationTypedDict": ".openresponsesrequest",
|
|
||||||
"PluginResponseHealing": ".openresponsesrequest",
|
|
||||||
"PluginResponseHealingTypedDict": ".openresponsesrequest",
|
|
||||||
"PluginTypedDict": ".openresponsesrequest",
|
|
||||||
"PluginWeb": ".openresponsesrequest",
|
|
||||||
"PluginWebTypedDict": ".openresponsesrequest",
|
|
||||||
"Provider": ".openresponsesrequest",
|
|
||||||
"ProviderTypedDict": ".openresponsesrequest",
|
|
||||||
"ServiceTier": ".openresponsesrequest",
|
"ServiceTier": ".openresponsesrequest",
|
||||||
"Truncation": ".openresponsesrequest",
|
"Truncation": ".openresponsesrequest",
|
||||||
"OpenResponsesResponseText": ".openresponsesresponsetext",
|
"OpenResponsesResponseText": ".openresponsesresponsetext",
|
||||||
@@ -1869,12 +2022,40 @@ _dynamic_imports: dict[str, str] = {
|
|||||||
"PayloadTooLargeResponseErrorDataTypedDict": ".payloadtoolargeresponseerrordata",
|
"PayloadTooLargeResponseErrorDataTypedDict": ".payloadtoolargeresponseerrordata",
|
||||||
"PaymentRequiredResponseErrorData": ".paymentrequiredresponseerrordata",
|
"PaymentRequiredResponseErrorData": ".paymentrequiredresponseerrordata",
|
||||||
"PaymentRequiredResponseErrorDataTypedDict": ".paymentrequiredresponseerrordata",
|
"PaymentRequiredResponseErrorDataTypedDict": ".paymentrequiredresponseerrordata",
|
||||||
|
"PDFParserEngine": ".pdfparserengine",
|
||||||
|
"PDFParserOptions": ".pdfparseroptions",
|
||||||
|
"PDFParserOptionsTypedDict": ".pdfparseroptions",
|
||||||
"PerRequestLimits": ".perrequestlimits",
|
"PerRequestLimits": ".perrequestlimits",
|
||||||
"PerRequestLimitsTypedDict": ".perrequestlimits",
|
"PerRequestLimitsTypedDict": ".perrequestlimits",
|
||||||
"ProviderName": ".providername",
|
"ProviderName": ".providername",
|
||||||
"ProviderOverloadedResponseErrorData": ".provideroverloadedresponseerrordata",
|
"ProviderOverloadedResponseErrorData": ".provideroverloadedresponseerrordata",
|
||||||
"ProviderOverloadedResponseErrorDataTypedDict": ".provideroverloadedresponseerrordata",
|
"ProviderOverloadedResponseErrorDataTypedDict": ".provideroverloadedresponseerrordata",
|
||||||
|
"ProviderPreferences": ".providerpreferences",
|
||||||
|
"ProviderPreferencesIgnore": ".providerpreferences",
|
||||||
|
"ProviderPreferencesIgnoreTypedDict": ".providerpreferences",
|
||||||
|
"ProviderPreferencesMaxPrice": ".providerpreferences",
|
||||||
|
"ProviderPreferencesMaxPriceTypedDict": ".providerpreferences",
|
||||||
|
"ProviderPreferencesOnly": ".providerpreferences",
|
||||||
|
"ProviderPreferencesOnlyTypedDict": ".providerpreferences",
|
||||||
|
"ProviderPreferencesOrder": ".providerpreferences",
|
||||||
|
"ProviderPreferencesOrderTypedDict": ".providerpreferences",
|
||||||
|
"ProviderPreferencesPartition": ".providerpreferences",
|
||||||
|
"ProviderPreferencesProviderSort": ".providerpreferences",
|
||||||
|
"ProviderPreferencesProviderSortConfig": ".providerpreferences",
|
||||||
|
"ProviderPreferencesProviderSortConfigTypedDict": ".providerpreferences",
|
||||||
|
"ProviderPreferencesSortUnion": ".providerpreferences",
|
||||||
|
"ProviderPreferencesSortUnionTypedDict": ".providerpreferences",
|
||||||
|
"ProviderPreferencesTypedDict": ".providerpreferences",
|
||||||
|
"ProviderSortConfigEnum": ".providerpreferences",
|
||||||
|
"ProviderSortConfigUnion": ".providerpreferences",
|
||||||
|
"ProviderSortConfigUnionTypedDict": ".providerpreferences",
|
||||||
|
"SortEnum": ".providerpreferences",
|
||||||
"ProviderSort": ".providersort",
|
"ProviderSort": ".providersort",
|
||||||
|
"Partition": ".providersortconfig",
|
||||||
|
"ProviderSortConfig": ".providersortconfig",
|
||||||
|
"ProviderSortConfigTypedDict": ".providersortconfig",
|
||||||
|
"ProviderSortUnion": ".providersortunion",
|
||||||
|
"ProviderSortUnionTypedDict": ".providersortunion",
|
||||||
"Pricing": ".publicendpoint",
|
"Pricing": ".publicendpoint",
|
||||||
"PricingTypedDict": ".publicendpoint",
|
"PricingTypedDict": ".publicendpoint",
|
||||||
"PublicEndpoint": ".publicendpoint",
|
"PublicEndpoint": ".publicendpoint",
|
||||||
@@ -2006,6 +2187,7 @@ _dynamic_imports: dict[str, str] = {
|
|||||||
"UserMessageContent": ".usermessage",
|
"UserMessageContent": ".usermessage",
|
||||||
"UserMessageContentTypedDict": ".usermessage",
|
"UserMessageContentTypedDict": ".usermessage",
|
||||||
"UserMessageTypedDict": ".usermessage",
|
"UserMessageTypedDict": ".usermessage",
|
||||||
|
"WebSearchEngine": ".websearchengine",
|
||||||
"WebSearchPreviewToolUserLocation": ".websearchpreviewtooluserlocation",
|
"WebSearchPreviewToolUserLocation": ".websearchpreviewtooluserlocation",
|
||||||
"WebSearchPreviewToolUserLocationType": ".websearchpreviewtooluserlocation",
|
"WebSearchPreviewToolUserLocationType": ".websearchpreviewtooluserlocation",
|
||||||
"WebSearchPreviewToolUserLocationTypedDict": ".websearchpreviewtooluserlocation",
|
"WebSearchPreviewToolUserLocationTypedDict": ".websearchpreviewtooluserlocation",
|
||||||
|
|||||||
@@ -0,0 +1,93 @@
|
|||||||
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
from openrouter.types import UnrecognizedStr
|
||||||
|
from openrouter.utils import validate_open_enum
|
||||||
|
from pydantic.functional_validators import PlainValidator
|
||||||
|
from typing import Literal, Union
|
||||||
|
from typing_extensions import Annotated, TypeAliasType
|
||||||
|
|
||||||
|
|
||||||
|
Schema0Enum = Union[
|
||||||
|
Literal[
|
||||||
|
"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",
|
||||||
|
],
|
||||||
|
UnrecognizedStr,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
Schema0TypedDict = TypeAliasType("Schema0TypedDict", Union[Schema0Enum, str])
|
||||||
|
|
||||||
|
|
||||||
|
Schema0 = TypeAliasType(
|
||||||
|
"Schema0",
|
||||||
|
Union[Annotated[Schema0Enum, PlainValidator(validate_open_enum(False))], str],
|
||||||
|
)
|
||||||
@@ -0,0 +1,228 @@
|
|||||||
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
from openrouter.types import (
|
||||||
|
BaseModel,
|
||||||
|
Nullable,
|
||||||
|
OptionalNullable,
|
||||||
|
UNSET,
|
||||||
|
UNSET_SENTINEL,
|
||||||
|
UnrecognizedStr,
|
||||||
|
)
|
||||||
|
from openrouter.utils import get_discriminator, validate_const, validate_open_enum
|
||||||
|
import pydantic
|
||||||
|
from pydantic import Discriminator, Tag, model_serializer
|
||||||
|
from pydantic.functional_validators import AfterValidator, PlainValidator
|
||||||
|
from typing import Literal, Optional, Union
|
||||||
|
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
||||||
|
|
||||||
|
|
||||||
|
Schema5 = Union[
|
||||||
|
Literal[
|
||||||
|
"unknown",
|
||||||
|
"openai-responses-v1",
|
||||||
|
"xai-responses-v1",
|
||||||
|
"anthropic-claude-v1",
|
||||||
|
"google-gemini-v1",
|
||||||
|
],
|
||||||
|
UnrecognizedStr,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
class Schema3ReasoningTextTypedDict(TypedDict):
|
||||||
|
type: Literal["reasoning.text"]
|
||||||
|
text: NotRequired[Nullable[str]]
|
||||||
|
signature: NotRequired[Nullable[str]]
|
||||||
|
id: NotRequired[Nullable[str]]
|
||||||
|
format_: NotRequired[Nullable[Schema5]]
|
||||||
|
index: NotRequired[float]
|
||||||
|
|
||||||
|
|
||||||
|
class Schema3ReasoningText(BaseModel):
|
||||||
|
TYPE: Annotated[
|
||||||
|
Annotated[
|
||||||
|
Literal["reasoning.text"], AfterValidator(validate_const("reasoning.text"))
|
||||||
|
],
|
||||||
|
pydantic.Field(alias="type"),
|
||||||
|
] = "reasoning.text"
|
||||||
|
|
||||||
|
text: OptionalNullable[str] = UNSET
|
||||||
|
|
||||||
|
signature: OptionalNullable[str] = UNSET
|
||||||
|
|
||||||
|
id: OptionalNullable[str] = UNSET
|
||||||
|
|
||||||
|
format_: Annotated[
|
||||||
|
Annotated[OptionalNullable[Schema5], PlainValidator(validate_open_enum(False))],
|
||||||
|
pydantic.Field(alias="format"),
|
||||||
|
] = UNSET
|
||||||
|
|
||||||
|
index: Optional[float] = None
|
||||||
|
|
||||||
|
@model_serializer(mode="wrap")
|
||||||
|
def serialize_model(self, handler):
|
||||||
|
optional_fields = ["text", "signature", "id", "format", "index"]
|
||||||
|
nullable_fields = ["text", "signature", "id", "format"]
|
||||||
|
null_default_fields = []
|
||||||
|
|
||||||
|
serialized = handler(self)
|
||||||
|
|
||||||
|
m = {}
|
||||||
|
|
||||||
|
for n, f in type(self).model_fields.items():
|
||||||
|
k = f.alias or n
|
||||||
|
val = serialized.get(k)
|
||||||
|
serialized.pop(k, None)
|
||||||
|
|
||||||
|
optional_nullable = k in optional_fields and k in nullable_fields
|
||||||
|
is_set = (
|
||||||
|
self.__pydantic_fields_set__.intersection({n})
|
||||||
|
or k in null_default_fields
|
||||||
|
) # pylint: disable=no-member
|
||||||
|
|
||||||
|
if val is not None and val != UNSET_SENTINEL:
|
||||||
|
m[k] = val
|
||||||
|
elif val != UNSET_SENTINEL and (
|
||||||
|
not k in optional_fields or (optional_nullable and is_set)
|
||||||
|
):
|
||||||
|
m[k] = val
|
||||||
|
|
||||||
|
return m
|
||||||
|
|
||||||
|
|
||||||
|
class Schema3ReasoningEncryptedTypedDict(TypedDict):
|
||||||
|
data: str
|
||||||
|
type: Literal["reasoning.encrypted"]
|
||||||
|
id: NotRequired[Nullable[str]]
|
||||||
|
format_: NotRequired[Nullable[Schema5]]
|
||||||
|
index: NotRequired[float]
|
||||||
|
|
||||||
|
|
||||||
|
class Schema3ReasoningEncrypted(BaseModel):
|
||||||
|
data: str
|
||||||
|
|
||||||
|
TYPE: Annotated[
|
||||||
|
Annotated[
|
||||||
|
Literal["reasoning.encrypted"],
|
||||||
|
AfterValidator(validate_const("reasoning.encrypted")),
|
||||||
|
],
|
||||||
|
pydantic.Field(alias="type"),
|
||||||
|
] = "reasoning.encrypted"
|
||||||
|
|
||||||
|
id: OptionalNullable[str] = UNSET
|
||||||
|
|
||||||
|
format_: Annotated[
|
||||||
|
Annotated[OptionalNullable[Schema5], PlainValidator(validate_open_enum(False))],
|
||||||
|
pydantic.Field(alias="format"),
|
||||||
|
] = UNSET
|
||||||
|
|
||||||
|
index: Optional[float] = None
|
||||||
|
|
||||||
|
@model_serializer(mode="wrap")
|
||||||
|
def serialize_model(self, handler):
|
||||||
|
optional_fields = ["id", "format", "index"]
|
||||||
|
nullable_fields = ["id", "format"]
|
||||||
|
null_default_fields = []
|
||||||
|
|
||||||
|
serialized = handler(self)
|
||||||
|
|
||||||
|
m = {}
|
||||||
|
|
||||||
|
for n, f in type(self).model_fields.items():
|
||||||
|
k = f.alias or n
|
||||||
|
val = serialized.get(k)
|
||||||
|
serialized.pop(k, None)
|
||||||
|
|
||||||
|
optional_nullable = k in optional_fields and k in nullable_fields
|
||||||
|
is_set = (
|
||||||
|
self.__pydantic_fields_set__.intersection({n})
|
||||||
|
or k in null_default_fields
|
||||||
|
) # pylint: disable=no-member
|
||||||
|
|
||||||
|
if val is not None and val != UNSET_SENTINEL:
|
||||||
|
m[k] = val
|
||||||
|
elif val != UNSET_SENTINEL and (
|
||||||
|
not k in optional_fields or (optional_nullable and is_set)
|
||||||
|
):
|
||||||
|
m[k] = val
|
||||||
|
|
||||||
|
return m
|
||||||
|
|
||||||
|
|
||||||
|
class Schema3ReasoningSummaryTypedDict(TypedDict):
|
||||||
|
summary: str
|
||||||
|
type: Literal["reasoning.summary"]
|
||||||
|
id: NotRequired[Nullable[str]]
|
||||||
|
format_: NotRequired[Nullable[Schema5]]
|
||||||
|
index: NotRequired[float]
|
||||||
|
|
||||||
|
|
||||||
|
class Schema3ReasoningSummary(BaseModel):
|
||||||
|
summary: str
|
||||||
|
|
||||||
|
TYPE: Annotated[
|
||||||
|
Annotated[
|
||||||
|
Literal["reasoning.summary"],
|
||||||
|
AfterValidator(validate_const("reasoning.summary")),
|
||||||
|
],
|
||||||
|
pydantic.Field(alias="type"),
|
||||||
|
] = "reasoning.summary"
|
||||||
|
|
||||||
|
id: OptionalNullable[str] = UNSET
|
||||||
|
|
||||||
|
format_: Annotated[
|
||||||
|
Annotated[OptionalNullable[Schema5], PlainValidator(validate_open_enum(False))],
|
||||||
|
pydantic.Field(alias="format"),
|
||||||
|
] = UNSET
|
||||||
|
|
||||||
|
index: Optional[float] = None
|
||||||
|
|
||||||
|
@model_serializer(mode="wrap")
|
||||||
|
def serialize_model(self, handler):
|
||||||
|
optional_fields = ["id", "format", "index"]
|
||||||
|
nullable_fields = ["id", "format"]
|
||||||
|
null_default_fields = []
|
||||||
|
|
||||||
|
serialized = handler(self)
|
||||||
|
|
||||||
|
m = {}
|
||||||
|
|
||||||
|
for n, f in type(self).model_fields.items():
|
||||||
|
k = f.alias or n
|
||||||
|
val = serialized.get(k)
|
||||||
|
serialized.pop(k, None)
|
||||||
|
|
||||||
|
optional_nullable = k in optional_fields and k in nullable_fields
|
||||||
|
is_set = (
|
||||||
|
self.__pydantic_fields_set__.intersection({n})
|
||||||
|
or k in null_default_fields
|
||||||
|
) # pylint: disable=no-member
|
||||||
|
|
||||||
|
if val is not None and val != UNSET_SENTINEL:
|
||||||
|
m[k] = val
|
||||||
|
elif val != UNSET_SENTINEL and (
|
||||||
|
not k in optional_fields or (optional_nullable and is_set)
|
||||||
|
):
|
||||||
|
m[k] = val
|
||||||
|
|
||||||
|
return m
|
||||||
|
|
||||||
|
|
||||||
|
Schema3TypedDict = TypeAliasType(
|
||||||
|
"Schema3TypedDict",
|
||||||
|
Union[
|
||||||
|
Schema3ReasoningSummaryTypedDict,
|
||||||
|
Schema3ReasoningEncryptedTypedDict,
|
||||||
|
Schema3ReasoningTextTypedDict,
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Schema3 = Annotated[
|
||||||
|
Union[
|
||||||
|
Annotated[Schema3ReasoningSummary, Tag("reasoning.summary")],
|
||||||
|
Annotated[Schema3ReasoningEncrypted, Tag("reasoning.encrypted")],
|
||||||
|
Annotated[Schema3ReasoningText, Tag("reasoning.text")],
|
||||||
|
],
|
||||||
|
Discriminator(lambda m: get_discriminator(m, "type", "type")),
|
||||||
|
]
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
from ._schema0 import Schema0, Schema0TypedDict
|
||||||
from .chatstreamoptions import ChatStreamOptions, ChatStreamOptionsTypedDict
|
from .chatstreamoptions import ChatStreamOptions, ChatStreamOptionsTypedDict
|
||||||
from .message import Message, MessageTypedDict
|
from .message import Message, MessageTypedDict
|
||||||
|
from .providersortunion import ProviderSortUnion, ProviderSortUnionTypedDict
|
||||||
from .reasoningsummaryverbosity import ReasoningSummaryVerbosity
|
from .reasoningsummaryverbosity import ReasoningSummaryVerbosity
|
||||||
from .responseformatjsonschema import (
|
from .responseformatjsonschema import (
|
||||||
ResponseFormatJSONSchema,
|
ResponseFormatJSONSchema,
|
||||||
@@ -29,13 +31,345 @@ from typing import Any, Dict, List, Literal, Optional, Union
|
|||||||
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
||||||
|
|
||||||
|
|
||||||
|
ChatGenerationParamsDataCollection = Union[
|
||||||
|
Literal[
|
||||||
|
"deny",
|
||||||
|
"allow",
|
||||||
|
],
|
||||||
|
UnrecognizedStr,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
Quantizations = Union[
|
||||||
|
Literal[
|
||||||
|
"int4",
|
||||||
|
"int8",
|
||||||
|
"fp4",
|
||||||
|
"fp6",
|
||||||
|
"fp8",
|
||||||
|
"fp16",
|
||||||
|
"bf16",
|
||||||
|
"fp32",
|
||||||
|
"unknown",
|
||||||
|
],
|
||||||
|
UnrecognizedStr,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
class ChatGenerationParamsMaxPriceTypedDict(TypedDict):
|
||||||
|
r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
|
||||||
|
|
||||||
|
prompt: NotRequired[Any]
|
||||||
|
completion: NotRequired[Any]
|
||||||
|
image: NotRequired[Any]
|
||||||
|
audio: NotRequired[Any]
|
||||||
|
request: NotRequired[Any]
|
||||||
|
|
||||||
|
|
||||||
|
class ChatGenerationParamsMaxPrice(BaseModel):
|
||||||
|
r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
|
||||||
|
|
||||||
|
prompt: Optional[Any] = None
|
||||||
|
|
||||||
|
completion: Optional[Any] = None
|
||||||
|
|
||||||
|
image: Optional[Any] = None
|
||||||
|
|
||||||
|
audio: Optional[Any] = None
|
||||||
|
|
||||||
|
request: Optional[Any] = None
|
||||||
|
|
||||||
|
|
||||||
|
class ChatGenerationParamsProviderTypedDict(TypedDict):
|
||||||
|
allow_fallbacks: NotRequired[Nullable[bool]]
|
||||||
|
r"""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: NotRequired[Nullable[bool]]
|
||||||
|
r"""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: NotRequired[Nullable[ChatGenerationParamsDataCollection]]
|
||||||
|
r"""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.
|
||||||
|
"""
|
||||||
|
zdr: NotRequired[Nullable[bool]]
|
||||||
|
enforce_distillable_text: NotRequired[Nullable[bool]]
|
||||||
|
order: NotRequired[Nullable[List[Schema0TypedDict]]]
|
||||||
|
r"""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: NotRequired[Nullable[List[Schema0TypedDict]]]
|
||||||
|
r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."""
|
||||||
|
ignore: NotRequired[Nullable[List[Schema0TypedDict]]]
|
||||||
|
r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."""
|
||||||
|
quantizations: NotRequired[Nullable[List[Quantizations]]]
|
||||||
|
r"""A list of quantization levels to filter the provider by."""
|
||||||
|
sort: NotRequired[Nullable[ProviderSortUnionTypedDict]]
|
||||||
|
r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
|
||||||
|
max_price: NotRequired[ChatGenerationParamsMaxPriceTypedDict]
|
||||||
|
r"""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: NotRequired[Nullable[float]]
|
||||||
|
preferred_max_latency: NotRequired[Nullable[float]]
|
||||||
|
min_throughput: NotRequired[Nullable[float]]
|
||||||
|
max_latency: NotRequired[Nullable[float]]
|
||||||
|
|
||||||
|
|
||||||
|
class ChatGenerationParamsProvider(BaseModel):
|
||||||
|
allow_fallbacks: OptionalNullable[bool] = UNSET
|
||||||
|
r"""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: OptionalNullable[bool] = UNSET
|
||||||
|
r"""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: Annotated[
|
||||||
|
OptionalNullable[ChatGenerationParamsDataCollection],
|
||||||
|
PlainValidator(validate_open_enum(False)),
|
||||||
|
] = UNSET
|
||||||
|
r"""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.
|
||||||
|
"""
|
||||||
|
|
||||||
|
zdr: OptionalNullable[bool] = UNSET
|
||||||
|
|
||||||
|
enforce_distillable_text: OptionalNullable[bool] = UNSET
|
||||||
|
|
||||||
|
order: OptionalNullable[List[Schema0]] = UNSET
|
||||||
|
r"""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: OptionalNullable[List[Schema0]] = UNSET
|
||||||
|
r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."""
|
||||||
|
|
||||||
|
ignore: OptionalNullable[List[Schema0]] = UNSET
|
||||||
|
r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."""
|
||||||
|
|
||||||
|
quantizations: OptionalNullable[
|
||||||
|
List[Annotated[Quantizations, PlainValidator(validate_open_enum(False))]]
|
||||||
|
] = UNSET
|
||||||
|
r"""A list of quantization levels to filter the provider by."""
|
||||||
|
|
||||||
|
sort: OptionalNullable[ProviderSortUnion] = UNSET
|
||||||
|
r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
|
||||||
|
|
||||||
|
max_price: Optional[ChatGenerationParamsMaxPrice] = None
|
||||||
|
r"""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: OptionalNullable[float] = UNSET
|
||||||
|
|
||||||
|
preferred_max_latency: OptionalNullable[float] = UNSET
|
||||||
|
|
||||||
|
min_throughput: OptionalNullable[float] = UNSET
|
||||||
|
|
||||||
|
max_latency: OptionalNullable[float] = UNSET
|
||||||
|
|
||||||
|
@model_serializer(mode="wrap")
|
||||||
|
def serialize_model(self, handler):
|
||||||
|
optional_fields = [
|
||||||
|
"allow_fallbacks",
|
||||||
|
"require_parameters",
|
||||||
|
"data_collection",
|
||||||
|
"zdr",
|
||||||
|
"enforce_distillable_text",
|
||||||
|
"order",
|
||||||
|
"only",
|
||||||
|
"ignore",
|
||||||
|
"quantizations",
|
||||||
|
"sort",
|
||||||
|
"max_price",
|
||||||
|
"preferred_min_throughput",
|
||||||
|
"preferred_max_latency",
|
||||||
|
"min_throughput",
|
||||||
|
"max_latency",
|
||||||
|
]
|
||||||
|
nullable_fields = [
|
||||||
|
"allow_fallbacks",
|
||||||
|
"require_parameters",
|
||||||
|
"data_collection",
|
||||||
|
"zdr",
|
||||||
|
"enforce_distillable_text",
|
||||||
|
"order",
|
||||||
|
"only",
|
||||||
|
"ignore",
|
||||||
|
"quantizations",
|
||||||
|
"sort",
|
||||||
|
"preferred_min_throughput",
|
||||||
|
"preferred_max_latency",
|
||||||
|
"min_throughput",
|
||||||
|
"max_latency",
|
||||||
|
]
|
||||||
|
null_default_fields = []
|
||||||
|
|
||||||
|
serialized = handler(self)
|
||||||
|
|
||||||
|
m = {}
|
||||||
|
|
||||||
|
for n, f in type(self).model_fields.items():
|
||||||
|
k = f.alias or n
|
||||||
|
val = serialized.get(k)
|
||||||
|
serialized.pop(k, None)
|
||||||
|
|
||||||
|
optional_nullable = k in optional_fields and k in nullable_fields
|
||||||
|
is_set = (
|
||||||
|
self.__pydantic_fields_set__.intersection({n})
|
||||||
|
or k in null_default_fields
|
||||||
|
) # pylint: disable=no-member
|
||||||
|
|
||||||
|
if val is not None and val != UNSET_SENTINEL:
|
||||||
|
m[k] = val
|
||||||
|
elif val != UNSET_SENTINEL and (
|
||||||
|
not k in optional_fields or (optional_nullable and is_set)
|
||||||
|
):
|
||||||
|
m[k] = val
|
||||||
|
|
||||||
|
return m
|
||||||
|
|
||||||
|
|
||||||
|
class ChatGenerationParamsPluginResponseHealingTypedDict(TypedDict):
|
||||||
|
id: Literal["response-healing"]
|
||||||
|
enabled: NotRequired[bool]
|
||||||
|
|
||||||
|
|
||||||
|
class ChatGenerationParamsPluginResponseHealing(BaseModel):
|
||||||
|
ID: Annotated[
|
||||||
|
Annotated[
|
||||||
|
Literal["response-healing"],
|
||||||
|
AfterValidator(validate_const("response-healing")),
|
||||||
|
],
|
||||||
|
pydantic.Field(alias="id"),
|
||||||
|
] = "response-healing"
|
||||||
|
|
||||||
|
enabled: Optional[bool] = None
|
||||||
|
|
||||||
|
|
||||||
|
PdfEngine = Union[
|
||||||
|
Literal[
|
||||||
|
"mistral-ocr",
|
||||||
|
"pdf-text",
|
||||||
|
"native",
|
||||||
|
],
|
||||||
|
UnrecognizedStr,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
class PdfTypedDict(TypedDict):
|
||||||
|
engine: NotRequired[PdfEngine]
|
||||||
|
|
||||||
|
|
||||||
|
class Pdf(BaseModel):
|
||||||
|
engine: Annotated[
|
||||||
|
Optional[PdfEngine], PlainValidator(validate_open_enum(False))
|
||||||
|
] = None
|
||||||
|
|
||||||
|
|
||||||
|
class ChatGenerationParamsPluginFileParserTypedDict(TypedDict):
|
||||||
|
id: Literal["file-parser"]
|
||||||
|
enabled: NotRequired[bool]
|
||||||
|
pdf: NotRequired[PdfTypedDict]
|
||||||
|
|
||||||
|
|
||||||
|
class ChatGenerationParamsPluginFileParser(BaseModel):
|
||||||
|
ID: Annotated[
|
||||||
|
Annotated[
|
||||||
|
Literal["file-parser"], AfterValidator(validate_const("file-parser"))
|
||||||
|
],
|
||||||
|
pydantic.Field(alias="id"),
|
||||||
|
] = "file-parser"
|
||||||
|
|
||||||
|
enabled: Optional[bool] = None
|
||||||
|
|
||||||
|
pdf: Optional[Pdf] = None
|
||||||
|
|
||||||
|
|
||||||
|
Engine = Union[
|
||||||
|
Literal[
|
||||||
|
"native",
|
||||||
|
"exa",
|
||||||
|
],
|
||||||
|
UnrecognizedStr,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
class ChatGenerationParamsPluginWebTypedDict(TypedDict):
|
||||||
|
id: Literal["web"]
|
||||||
|
enabled: NotRequired[bool]
|
||||||
|
max_results: NotRequired[float]
|
||||||
|
search_prompt: NotRequired[str]
|
||||||
|
engine: NotRequired[Engine]
|
||||||
|
|
||||||
|
|
||||||
|
class ChatGenerationParamsPluginWeb(BaseModel):
|
||||||
|
ID: Annotated[
|
||||||
|
Annotated[Literal["web"], AfterValidator(validate_const("web"))],
|
||||||
|
pydantic.Field(alias="id"),
|
||||||
|
] = "web"
|
||||||
|
|
||||||
|
enabled: Optional[bool] = None
|
||||||
|
|
||||||
|
max_results: Optional[float] = None
|
||||||
|
|
||||||
|
search_prompt: Optional[str] = None
|
||||||
|
|
||||||
|
engine: Annotated[Optional[Engine], PlainValidator(validate_open_enum(False))] = (
|
||||||
|
None
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class ChatGenerationParamsPluginModerationTypedDict(TypedDict):
|
||||||
|
id: Literal["moderation"]
|
||||||
|
|
||||||
|
|
||||||
|
class ChatGenerationParamsPluginModeration(BaseModel):
|
||||||
|
ID: Annotated[
|
||||||
|
Annotated[Literal["moderation"], AfterValidator(validate_const("moderation"))],
|
||||||
|
pydantic.Field(alias="id"),
|
||||||
|
] = "moderation"
|
||||||
|
|
||||||
|
|
||||||
|
ChatGenerationParamsPluginUnionTypedDict = TypeAliasType(
|
||||||
|
"ChatGenerationParamsPluginUnionTypedDict",
|
||||||
|
Union[
|
||||||
|
ChatGenerationParamsPluginModerationTypedDict,
|
||||||
|
ChatGenerationParamsPluginResponseHealingTypedDict,
|
||||||
|
ChatGenerationParamsPluginFileParserTypedDict,
|
||||||
|
ChatGenerationParamsPluginWebTypedDict,
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
ChatGenerationParamsPluginUnion = Annotated[
|
||||||
|
Union[
|
||||||
|
Annotated[ChatGenerationParamsPluginModeration, Tag("moderation")],
|
||||||
|
Annotated[ChatGenerationParamsPluginWeb, Tag("web")],
|
||||||
|
Annotated[ChatGenerationParamsPluginFileParser, Tag("file-parser")],
|
||||||
|
Annotated[ChatGenerationParamsPluginResponseHealing, Tag("response-healing")],
|
||||||
|
],
|
||||||
|
Discriminator(lambda m: get_discriminator(m, "id", "id")),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
Route = Union[
|
||||||
|
Literal[
|
||||||
|
"fallback",
|
||||||
|
"sort",
|
||||||
|
],
|
||||||
|
UnrecognizedStr,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
Effort = Union[
|
Effort = Union[
|
||||||
Literal[
|
Literal[
|
||||||
"none",
|
"xhigh",
|
||||||
"minimal",
|
|
||||||
"low",
|
|
||||||
"medium",
|
|
||||||
"high",
|
"high",
|
||||||
|
"medium",
|
||||||
|
"low",
|
||||||
|
"minimal",
|
||||||
|
"none",
|
||||||
],
|
],
|
||||||
UnrecognizedStr,
|
UnrecognizedStr,
|
||||||
]
|
]
|
||||||
@@ -166,6 +500,14 @@ class Debug(BaseModel):
|
|||||||
|
|
||||||
class ChatGenerationParamsTypedDict(TypedDict):
|
class ChatGenerationParamsTypedDict(TypedDict):
|
||||||
messages: List[MessageTypedDict]
|
messages: List[MessageTypedDict]
|
||||||
|
provider: NotRequired[Nullable[ChatGenerationParamsProviderTypedDict]]
|
||||||
|
r"""When multiple model providers are available, optionally indicate your routing preference."""
|
||||||
|
plugins: NotRequired[List[ChatGenerationParamsPluginUnionTypedDict]]
|
||||||
|
r"""Plugins you want to enable for this request, including their settings."""
|
||||||
|
route: NotRequired[Nullable[Route]]
|
||||||
|
user: NotRequired[str]
|
||||||
|
session_id: NotRequired[str]
|
||||||
|
r"""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."""
|
||||||
model: NotRequired[str]
|
model: NotRequired[str]
|
||||||
models: NotRequired[List[str]]
|
models: NotRequired[List[str]]
|
||||||
frequency_penalty: NotRequired[Nullable[float]]
|
frequency_penalty: NotRequired[Nullable[float]]
|
||||||
@@ -186,13 +528,27 @@ class ChatGenerationParamsTypedDict(TypedDict):
|
|||||||
tool_choice: NotRequired[Any]
|
tool_choice: NotRequired[Any]
|
||||||
tools: NotRequired[List[ToolDefinitionJSONTypedDict]]
|
tools: NotRequired[List[ToolDefinitionJSONTypedDict]]
|
||||||
top_p: NotRequired[Nullable[float]]
|
top_p: NotRequired[Nullable[float]]
|
||||||
user: NotRequired[str]
|
|
||||||
debug: NotRequired[DebugTypedDict]
|
debug: NotRequired[DebugTypedDict]
|
||||||
|
|
||||||
|
|
||||||
class ChatGenerationParams(BaseModel):
|
class ChatGenerationParams(BaseModel):
|
||||||
messages: List[Message]
|
messages: List[Message]
|
||||||
|
|
||||||
|
provider: OptionalNullable[ChatGenerationParamsProvider] = UNSET
|
||||||
|
r"""When multiple model providers are available, optionally indicate your routing preference."""
|
||||||
|
|
||||||
|
plugins: Optional[List[ChatGenerationParamsPluginUnion]] = None
|
||||||
|
r"""Plugins you want to enable for this request, including their settings."""
|
||||||
|
|
||||||
|
route: Annotated[
|
||||||
|
OptionalNullable[Route], PlainValidator(validate_open_enum(False))
|
||||||
|
] = UNSET
|
||||||
|
|
||||||
|
user: Optional[str] = None
|
||||||
|
|
||||||
|
session_id: Optional[str] = None
|
||||||
|
r"""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."""
|
||||||
|
|
||||||
model: Optional[str] = None
|
model: Optional[str] = None
|
||||||
|
|
||||||
models: Optional[List[str]] = None
|
models: Optional[List[str]] = None
|
||||||
@@ -233,13 +589,16 @@ class ChatGenerationParams(BaseModel):
|
|||||||
|
|
||||||
top_p: OptionalNullable[float] = UNSET
|
top_p: OptionalNullable[float] = UNSET
|
||||||
|
|
||||||
user: Optional[str] = None
|
|
||||||
|
|
||||||
debug: Optional[Debug] = None
|
debug: Optional[Debug] = None
|
||||||
|
|
||||||
@model_serializer(mode="wrap")
|
@model_serializer(mode="wrap")
|
||||||
def serialize_model(self, handler):
|
def serialize_model(self, handler):
|
||||||
optional_fields = [
|
optional_fields = [
|
||||||
|
"provider",
|
||||||
|
"plugins",
|
||||||
|
"route",
|
||||||
|
"user",
|
||||||
|
"session_id",
|
||||||
"model",
|
"model",
|
||||||
"models",
|
"models",
|
||||||
"frequency_penalty",
|
"frequency_penalty",
|
||||||
@@ -260,10 +619,11 @@ class ChatGenerationParams(BaseModel):
|
|||||||
"tool_choice",
|
"tool_choice",
|
||||||
"tools",
|
"tools",
|
||||||
"top_p",
|
"top_p",
|
||||||
"user",
|
|
||||||
"debug",
|
"debug",
|
||||||
]
|
]
|
||||||
nullable_fields = [
|
nullable_fields = [
|
||||||
|
"provider",
|
||||||
|
"route",
|
||||||
"frequency_penalty",
|
"frequency_penalty",
|
||||||
"logit_bias",
|
"logit_bias",
|
||||||
"logprobs",
|
"logprobs",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
from ._schema3 import Schema3, Schema3TypedDict
|
||||||
from .assistantmessage import AssistantMessage, AssistantMessageTypedDict
|
from .assistantmessage import AssistantMessage, AssistantMessageTypedDict
|
||||||
from .chatcompletionfinishreason import ChatCompletionFinishReason
|
from .chatcompletionfinishreason import ChatCompletionFinishReason
|
||||||
from .chatmessagetokenlogprobs import (
|
from .chatmessagetokenlogprobs import (
|
||||||
@@ -17,6 +18,7 @@ from openrouter.types import (
|
|||||||
from openrouter.utils import validate_open_enum
|
from openrouter.utils import validate_open_enum
|
||||||
from pydantic import model_serializer
|
from pydantic import model_serializer
|
||||||
from pydantic.functional_validators import PlainValidator
|
from pydantic.functional_validators import PlainValidator
|
||||||
|
from typing import List, Optional
|
||||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||||
|
|
||||||
|
|
||||||
@@ -24,6 +26,7 @@ class ChatResponseChoiceTypedDict(TypedDict):
|
|||||||
finish_reason: Nullable[ChatCompletionFinishReason]
|
finish_reason: Nullable[ChatCompletionFinishReason]
|
||||||
index: float
|
index: float
|
||||||
message: AssistantMessageTypedDict
|
message: AssistantMessageTypedDict
|
||||||
|
reasoning_details: NotRequired[List[Schema3TypedDict]]
|
||||||
logprobs: NotRequired[Nullable[ChatMessageTokenLogprobsTypedDict]]
|
logprobs: NotRequired[Nullable[ChatMessageTokenLogprobsTypedDict]]
|
||||||
|
|
||||||
|
|
||||||
@@ -36,11 +39,13 @@ class ChatResponseChoice(BaseModel):
|
|||||||
|
|
||||||
message: AssistantMessage
|
message: AssistantMessage
|
||||||
|
|
||||||
|
reasoning_details: Optional[List[Schema3]] = None
|
||||||
|
|
||||||
logprobs: OptionalNullable[ChatMessageTokenLogprobs] = UNSET
|
logprobs: OptionalNullable[ChatMessageTokenLogprobs] = UNSET
|
||||||
|
|
||||||
@model_serializer(mode="wrap")
|
@model_serializer(mode="wrap")
|
||||||
def serialize_model(self, handler):
|
def serialize_model(self, handler):
|
||||||
optional_fields = ["logprobs"]
|
optional_fields = ["reasoning_details", "logprobs"]
|
||||||
nullable_fields = ["finish_reason", "logprobs"]
|
nullable_fields = ["finish_reason", "logprobs"]
|
||||||
null_default_fields = []
|
null_default_fields = []
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
from ._schema3 import Schema3, Schema3TypedDict
|
||||||
from .chatstreamingmessagetoolcall import (
|
from .chatstreamingmessagetoolcall import (
|
||||||
ChatStreamingMessageToolCall,
|
ChatStreamingMessageToolCall,
|
||||||
ChatStreamingMessageToolCallTypedDict,
|
ChatStreamingMessageToolCallTypedDict,
|
||||||
@@ -26,6 +27,7 @@ class ChatStreamingMessageChunkTypedDict(TypedDict):
|
|||||||
reasoning: NotRequired[Nullable[str]]
|
reasoning: NotRequired[Nullable[str]]
|
||||||
refusal: NotRequired[Nullable[str]]
|
refusal: NotRequired[Nullable[str]]
|
||||||
tool_calls: NotRequired[List[ChatStreamingMessageToolCallTypedDict]]
|
tool_calls: NotRequired[List[ChatStreamingMessageToolCallTypedDict]]
|
||||||
|
reasoning_details: NotRequired[List[Schema3TypedDict]]
|
||||||
|
|
||||||
|
|
||||||
class ChatStreamingMessageChunk(BaseModel):
|
class ChatStreamingMessageChunk(BaseModel):
|
||||||
@@ -39,9 +41,18 @@ class ChatStreamingMessageChunk(BaseModel):
|
|||||||
|
|
||||||
tool_calls: Optional[List[ChatStreamingMessageToolCall]] = None
|
tool_calls: Optional[List[ChatStreamingMessageToolCall]] = None
|
||||||
|
|
||||||
|
reasoning_details: Optional[List[Schema3]] = None
|
||||||
|
|
||||||
@model_serializer(mode="wrap")
|
@model_serializer(mode="wrap")
|
||||||
def serialize_model(self, handler):
|
def serialize_model(self, handler):
|
||||||
optional_fields = ["role", "content", "reasoning", "refusal", "tool_calls"]
|
optional_fields = [
|
||||||
|
"role",
|
||||||
|
"content",
|
||||||
|
"reasoning",
|
||||||
|
"refusal",
|
||||||
|
"tool_calls",
|
||||||
|
"reasoning_details",
|
||||||
|
]
|
||||||
nullable_fields = ["content", "reasoning", "refusal"]
|
nullable_fields = ["content", "reasoning", "refusal"]
|
||||||
null_default_fields = []
|
null_default_fields = []
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ from typing import Literal, Union
|
|||||||
|
|
||||||
OpenAIResponsesReasoningEffort = Union[
|
OpenAIResponsesReasoningEffort = Union[
|
||||||
Literal[
|
Literal[
|
||||||
|
"xhigh",
|
||||||
"high",
|
"high",
|
||||||
"medium",
|
"medium",
|
||||||
"low",
|
"low",
|
||||||
|
|||||||
@@ -33,9 +33,12 @@ from .openresponseswebsearchtool import (
|
|||||||
OpenResponsesWebSearchTool,
|
OpenResponsesWebSearchTool,
|
||||||
OpenResponsesWebSearchToolTypedDict,
|
OpenResponsesWebSearchToolTypedDict,
|
||||||
)
|
)
|
||||||
|
from .pdfparseroptions import PDFParserOptions, PDFParserOptionsTypedDict
|
||||||
from .providername import ProviderName
|
from .providername import ProviderName
|
||||||
from .providersort import ProviderSort
|
from .providersort import ProviderSort
|
||||||
|
from .providersortconfig import ProviderSortConfig, ProviderSortConfigTypedDict
|
||||||
from .quantization import Quantization
|
from .quantization import Quantization
|
||||||
|
from .websearchengine import WebSearchEngine
|
||||||
from openrouter.types import (
|
from openrouter.types import (
|
||||||
BaseModel,
|
BaseModel,
|
||||||
Nullable,
|
Nullable,
|
||||||
@@ -148,68 +151,92 @@ Truncation = Union[
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
OrderTypedDict = TypeAliasType("OrderTypedDict", Union[ProviderName, str])
|
OpenResponsesRequestOrderTypedDict = TypeAliasType(
|
||||||
|
"OpenResponsesRequestOrderTypedDict", Union[ProviderName, str]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
Order = TypeAliasType(
|
OpenResponsesRequestOrder = TypeAliasType(
|
||||||
"Order",
|
"OpenResponsesRequestOrder",
|
||||||
Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str],
|
Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
OnlyTypedDict = TypeAliasType("OnlyTypedDict", Union[ProviderName, str])
|
OpenResponsesRequestOnlyTypedDict = TypeAliasType(
|
||||||
|
"OpenResponsesRequestOnlyTypedDict", Union[ProviderName, str]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
Only = TypeAliasType(
|
OpenResponsesRequestOnly = TypeAliasType(
|
||||||
"Only",
|
"OpenResponsesRequestOnly",
|
||||||
Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str],
|
Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
IgnoreTypedDict = TypeAliasType("IgnoreTypedDict", Union[ProviderName, str])
|
OpenResponsesRequestIgnoreTypedDict = TypeAliasType(
|
||||||
|
"OpenResponsesRequestIgnoreTypedDict", Union[ProviderName, str]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
Ignore = TypeAliasType(
|
OpenResponsesRequestIgnore = TypeAliasType(
|
||||||
"Ignore",
|
"OpenResponsesRequestIgnore",
|
||||||
Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str],
|
Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class MaxPriceTypedDict(TypedDict):
|
OpenResponsesRequestSortTypedDict = TypeAliasType(
|
||||||
|
"OpenResponsesRequestSortTypedDict",
|
||||||
|
Union[ProviderSortConfigTypedDict, ProviderSort, Any],
|
||||||
|
)
|
||||||
|
r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
|
||||||
|
|
||||||
|
|
||||||
|
OpenResponsesRequestSort = TypeAliasType(
|
||||||
|
"OpenResponsesRequestSort",
|
||||||
|
Union[
|
||||||
|
ProviderSortConfig,
|
||||||
|
Annotated[ProviderSort, PlainValidator(validate_open_enum(False))],
|
||||||
|
Any,
|
||||||
|
],
|
||||||
|
)
|
||||||
|
r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
|
||||||
|
|
||||||
|
|
||||||
|
class OpenResponsesRequestMaxPriceTypedDict(TypedDict):
|
||||||
r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
|
r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
|
||||||
|
|
||||||
prompt: NotRequired[Any]
|
prompt: NotRequired[str]
|
||||||
r"""A value in string or number format that is a large number"""
|
r"""A value in string format that is a large number"""
|
||||||
completion: NotRequired[Any]
|
completion: NotRequired[str]
|
||||||
r"""A value in string or number format that is a large number"""
|
r"""A value in string format that is a large number"""
|
||||||
image: NotRequired[Any]
|
image: NotRequired[str]
|
||||||
r"""A value in string or number format that is a large number"""
|
r"""A value in string format that is a large number"""
|
||||||
audio: NotRequired[Any]
|
audio: NotRequired[str]
|
||||||
r"""A value in string or number format that is a large number"""
|
r"""A value in string format that is a large number"""
|
||||||
request: NotRequired[Any]
|
request: NotRequired[str]
|
||||||
r"""A value in string or number format that is a large number"""
|
r"""A value in string format that is a large number"""
|
||||||
|
|
||||||
|
|
||||||
class MaxPrice(BaseModel):
|
class OpenResponsesRequestMaxPrice(BaseModel):
|
||||||
r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
|
r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
|
||||||
|
|
||||||
prompt: Optional[Any] = None
|
prompt: Optional[str] = None
|
||||||
r"""A value in string or number format that is a large number"""
|
r"""A value in string format that is a large number"""
|
||||||
|
|
||||||
completion: Optional[Any] = None
|
completion: Optional[str] = None
|
||||||
r"""A value in string or number format that is a large number"""
|
r"""A value in string format that is a large number"""
|
||||||
|
|
||||||
image: Optional[Any] = None
|
image: Optional[str] = None
|
||||||
r"""A value in string or number format that is a large number"""
|
r"""A value in string format that is a large number"""
|
||||||
|
|
||||||
audio: Optional[Any] = None
|
audio: Optional[str] = None
|
||||||
r"""A value in string or number format that is a large number"""
|
r"""A value in string format that is a large number"""
|
||||||
|
|
||||||
request: Optional[Any] = None
|
request: Optional[str] = None
|
||||||
r"""A value in string or number format that is a large number"""
|
r"""A value in string format that is a large number"""
|
||||||
|
|
||||||
|
|
||||||
class ProviderTypedDict(TypedDict):
|
class OpenResponsesRequestProviderTypedDict(TypedDict):
|
||||||
r"""When multiple model providers are available, optionally indicate your routing preference."""
|
r"""When multiple model providers are available, optionally indicate your routing preference."""
|
||||||
|
|
||||||
allow_fallbacks: NotRequired[Nullable[bool]]
|
allow_fallbacks: NotRequired[Nullable[bool]]
|
||||||
@@ -230,21 +257,29 @@ class ProviderTypedDict(TypedDict):
|
|||||||
r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used."""
|
r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used."""
|
||||||
enforce_distillable_text: NotRequired[Nullable[bool]]
|
enforce_distillable_text: NotRequired[Nullable[bool]]
|
||||||
r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used."""
|
r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used."""
|
||||||
order: NotRequired[Nullable[List[OrderTypedDict]]]
|
order: NotRequired[Nullable[List[OpenResponsesRequestOrderTypedDict]]]
|
||||||
r"""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."""
|
r"""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: NotRequired[Nullable[List[OnlyTypedDict]]]
|
only: NotRequired[Nullable[List[OpenResponsesRequestOnlyTypedDict]]]
|
||||||
r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."""
|
r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."""
|
||||||
ignore: NotRequired[Nullable[List[IgnoreTypedDict]]]
|
ignore: NotRequired[Nullable[List[OpenResponsesRequestIgnoreTypedDict]]]
|
||||||
r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."""
|
r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."""
|
||||||
quantizations: NotRequired[Nullable[List[Quantization]]]
|
quantizations: NotRequired[Nullable[List[Quantization]]]
|
||||||
r"""A list of quantization levels to filter the provider by."""
|
r"""A list of quantization levels to filter the provider by."""
|
||||||
sort: NotRequired[Nullable[ProviderSort]]
|
sort: NotRequired[Nullable[OpenResponsesRequestSortTypedDict]]
|
||||||
r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
|
r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
|
||||||
max_price: NotRequired[MaxPriceTypedDict]
|
max_price: NotRequired[OpenResponsesRequestMaxPriceTypedDict]
|
||||||
r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
|
r"""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: NotRequired[Nullable[float]]
|
||||||
|
r"""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."""
|
||||||
|
preferred_max_latency: NotRequired[Nullable[float]]
|
||||||
|
r"""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."""
|
||||||
|
min_throughput: NotRequired[Nullable[float]]
|
||||||
|
r"""**DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for preferred_min_throughput."""
|
||||||
|
max_latency: NotRequired[Nullable[float]]
|
||||||
|
r"""**DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency."""
|
||||||
|
|
||||||
|
|
||||||
class Provider(BaseModel):
|
class OpenResponsesRequestProvider(BaseModel):
|
||||||
r"""When multiple model providers are available, optionally indicate your routing preference."""
|
r"""When multiple model providers are available, optionally indicate your routing preference."""
|
||||||
|
|
||||||
allow_fallbacks: OptionalNullable[bool] = UNSET
|
allow_fallbacks: OptionalNullable[bool] = UNSET
|
||||||
@@ -272,13 +307,13 @@ class Provider(BaseModel):
|
|||||||
enforce_distillable_text: OptionalNullable[bool] = UNSET
|
enforce_distillable_text: OptionalNullable[bool] = UNSET
|
||||||
r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used."""
|
r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used."""
|
||||||
|
|
||||||
order: OptionalNullable[List[Order]] = UNSET
|
order: OptionalNullable[List[OpenResponsesRequestOrder]] = UNSET
|
||||||
r"""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."""
|
r"""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: OptionalNullable[List[Only]] = UNSET
|
only: OptionalNullable[List[OpenResponsesRequestOnly]] = UNSET
|
||||||
r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."""
|
r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."""
|
||||||
|
|
||||||
ignore: OptionalNullable[List[Ignore]] = UNSET
|
ignore: OptionalNullable[List[OpenResponsesRequestIgnore]] = UNSET
|
||||||
r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."""
|
r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."""
|
||||||
|
|
||||||
quantizations: OptionalNullable[
|
quantizations: OptionalNullable[
|
||||||
@@ -286,14 +321,34 @@ class Provider(BaseModel):
|
|||||||
] = UNSET
|
] = UNSET
|
||||||
r"""A list of quantization levels to filter the provider by."""
|
r"""A list of quantization levels to filter the provider by."""
|
||||||
|
|
||||||
sort: Annotated[
|
sort: OptionalNullable[OpenResponsesRequestSort] = UNSET
|
||||||
OptionalNullable[ProviderSort], PlainValidator(validate_open_enum(False))
|
|
||||||
] = UNSET
|
|
||||||
r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
|
r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
|
||||||
|
|
||||||
max_price: Optional[MaxPrice] = None
|
max_price: Optional[OpenResponsesRequestMaxPrice] = None
|
||||||
r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
|
r"""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: OptionalNullable[float] = UNSET
|
||||||
|
r"""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."""
|
||||||
|
|
||||||
|
preferred_max_latency: OptionalNullable[float] = UNSET
|
||||||
|
r"""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."""
|
||||||
|
|
||||||
|
min_throughput: Annotated[
|
||||||
|
OptionalNullable[float],
|
||||||
|
pydantic.Field(
|
||||||
|
deprecated="warning: ** DEPRECATED ** - Use preferred_min_throughput instead.."
|
||||||
|
),
|
||||||
|
] = UNSET
|
||||||
|
r"""**DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for preferred_min_throughput."""
|
||||||
|
|
||||||
|
max_latency: Annotated[
|
||||||
|
OptionalNullable[float],
|
||||||
|
pydantic.Field(
|
||||||
|
deprecated="warning: ** DEPRECATED ** - Use preferred_max_latency instead.."
|
||||||
|
),
|
||||||
|
] = UNSET
|
||||||
|
r"""**DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency."""
|
||||||
|
|
||||||
@model_serializer(mode="wrap")
|
@model_serializer(mode="wrap")
|
||||||
def serialize_model(self, handler):
|
def serialize_model(self, handler):
|
||||||
optional_fields = [
|
optional_fields = [
|
||||||
@@ -308,6 +363,10 @@ class Provider(BaseModel):
|
|||||||
"quantizations",
|
"quantizations",
|
||||||
"sort",
|
"sort",
|
||||||
"max_price",
|
"max_price",
|
||||||
|
"preferred_min_throughput",
|
||||||
|
"preferred_max_latency",
|
||||||
|
"min_throughput",
|
||||||
|
"max_latency",
|
||||||
]
|
]
|
||||||
nullable_fields = [
|
nullable_fields = [
|
||||||
"allow_fallbacks",
|
"allow_fallbacks",
|
||||||
@@ -320,6 +379,10 @@ class Provider(BaseModel):
|
|||||||
"ignore",
|
"ignore",
|
||||||
"quantizations",
|
"quantizations",
|
||||||
"sort",
|
"sort",
|
||||||
|
"preferred_min_throughput",
|
||||||
|
"preferred_max_latency",
|
||||||
|
"min_throughput",
|
||||||
|
"max_latency",
|
||||||
]
|
]
|
||||||
null_default_fields = []
|
null_default_fields = []
|
||||||
|
|
||||||
@@ -351,110 +414,97 @@ class Provider(BaseModel):
|
|||||||
IDResponseHealing = Literal["response-healing",]
|
IDResponseHealing = Literal["response-healing",]
|
||||||
|
|
||||||
|
|
||||||
class PluginResponseHealingTypedDict(TypedDict):
|
class OpenResponsesRequestPluginResponseHealingTypedDict(TypedDict):
|
||||||
id: IDResponseHealing
|
id: IDResponseHealing
|
||||||
|
enabled: NotRequired[bool]
|
||||||
|
r"""Set to false to disable the response-healing plugin for this request. Defaults to true."""
|
||||||
|
|
||||||
|
|
||||||
class PluginResponseHealing(BaseModel):
|
class OpenResponsesRequestPluginResponseHealing(BaseModel):
|
||||||
id: IDResponseHealing
|
id: IDResponseHealing
|
||||||
|
|
||||||
|
enabled: Optional[bool] = None
|
||||||
|
r"""Set to false to disable the response-healing plugin for this request. Defaults to true."""
|
||||||
|
|
||||||
|
|
||||||
IDFileParser = Literal["file-parser",]
|
IDFileParser = Literal["file-parser",]
|
||||||
|
|
||||||
|
|
||||||
PdfEngine = Union[
|
class OpenResponsesRequestPluginFileParserTypedDict(TypedDict):
|
||||||
Literal[
|
|
||||||
"mistral-ocr",
|
|
||||||
"pdf-text",
|
|
||||||
"native",
|
|
||||||
],
|
|
||||||
UnrecognizedStr,
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
class PdfTypedDict(TypedDict):
|
|
||||||
engine: NotRequired[PdfEngine]
|
|
||||||
|
|
||||||
|
|
||||||
class Pdf(BaseModel):
|
|
||||||
engine: Annotated[
|
|
||||||
Optional[PdfEngine], PlainValidator(validate_open_enum(False))
|
|
||||||
] = None
|
|
||||||
|
|
||||||
|
|
||||||
class PluginFileParserTypedDict(TypedDict):
|
|
||||||
id: IDFileParser
|
id: IDFileParser
|
||||||
max_files: NotRequired[float]
|
enabled: NotRequired[bool]
|
||||||
pdf: NotRequired[PdfTypedDict]
|
r"""Set to false to disable the file-parser plugin for this request. Defaults to true."""
|
||||||
|
pdf: NotRequired[PDFParserOptionsTypedDict]
|
||||||
|
r"""Options for PDF parsing."""
|
||||||
|
|
||||||
|
|
||||||
class PluginFileParser(BaseModel):
|
class OpenResponsesRequestPluginFileParser(BaseModel):
|
||||||
id: IDFileParser
|
id: IDFileParser
|
||||||
|
|
||||||
max_files: Optional[float] = None
|
enabled: Optional[bool] = None
|
||||||
|
r"""Set to false to disable the file-parser plugin for this request. Defaults to true."""
|
||||||
|
|
||||||
pdf: Optional[Pdf] = None
|
pdf: Optional[PDFParserOptions] = None
|
||||||
|
r"""Options for PDF parsing."""
|
||||||
|
|
||||||
|
|
||||||
IDWeb = Literal["web",]
|
IDWeb = Literal["web",]
|
||||||
|
|
||||||
|
|
||||||
Engine = Union[
|
class OpenResponsesRequestPluginWebTypedDict(TypedDict):
|
||||||
Literal[
|
|
||||||
"native",
|
|
||||||
"exa",
|
|
||||||
],
|
|
||||||
UnrecognizedStr,
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
class PluginWebTypedDict(TypedDict):
|
|
||||||
id: IDWeb
|
id: IDWeb
|
||||||
|
enabled: NotRequired[bool]
|
||||||
|
r"""Set to false to disable the web-search plugin for this request. Defaults to true."""
|
||||||
max_results: NotRequired[float]
|
max_results: NotRequired[float]
|
||||||
search_prompt: NotRequired[str]
|
search_prompt: NotRequired[str]
|
||||||
engine: NotRequired[Engine]
|
engine: NotRequired[WebSearchEngine]
|
||||||
|
r"""The search engine to use for web search."""
|
||||||
|
|
||||||
|
|
||||||
class PluginWeb(BaseModel):
|
class OpenResponsesRequestPluginWeb(BaseModel):
|
||||||
id: IDWeb
|
id: IDWeb
|
||||||
|
|
||||||
|
enabled: Optional[bool] = None
|
||||||
|
r"""Set to false to disable the web-search plugin for this request. Defaults to true."""
|
||||||
|
|
||||||
max_results: Optional[float] = None
|
max_results: Optional[float] = None
|
||||||
|
|
||||||
search_prompt: Optional[str] = None
|
search_prompt: Optional[str] = None
|
||||||
|
|
||||||
engine: Annotated[Optional[Engine], PlainValidator(validate_open_enum(False))] = (
|
engine: Annotated[
|
||||||
None
|
Optional[WebSearchEngine], PlainValidator(validate_open_enum(False))
|
||||||
)
|
] = None
|
||||||
|
r"""The search engine to use for web search."""
|
||||||
|
|
||||||
|
|
||||||
IDModeration = Literal["moderation",]
|
IDModeration = Literal["moderation",]
|
||||||
|
|
||||||
|
|
||||||
class PluginModerationTypedDict(TypedDict):
|
class OpenResponsesRequestPluginModerationTypedDict(TypedDict):
|
||||||
id: IDModeration
|
id: IDModeration
|
||||||
|
|
||||||
|
|
||||||
class PluginModeration(BaseModel):
|
class OpenResponsesRequestPluginModeration(BaseModel):
|
||||||
id: IDModeration
|
id: IDModeration
|
||||||
|
|
||||||
|
|
||||||
PluginTypedDict = TypeAliasType(
|
OpenResponsesRequestPluginUnionTypedDict = TypeAliasType(
|
||||||
"PluginTypedDict",
|
"OpenResponsesRequestPluginUnionTypedDict",
|
||||||
Union[
|
Union[
|
||||||
PluginModerationTypedDict,
|
OpenResponsesRequestPluginModerationTypedDict,
|
||||||
PluginResponseHealingTypedDict,
|
OpenResponsesRequestPluginResponseHealingTypedDict,
|
||||||
PluginFileParserTypedDict,
|
OpenResponsesRequestPluginFileParserTypedDict,
|
||||||
PluginWebTypedDict,
|
OpenResponsesRequestPluginWebTypedDict,
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
Plugin = Annotated[
|
OpenResponsesRequestPluginUnion = Annotated[
|
||||||
Union[
|
Union[
|
||||||
Annotated[PluginModeration, Tag("moderation")],
|
Annotated[OpenResponsesRequestPluginModeration, Tag("moderation")],
|
||||||
Annotated[PluginWeb, Tag("web")],
|
Annotated[OpenResponsesRequestPluginWeb, Tag("web")],
|
||||||
Annotated[PluginFileParser, Tag("file-parser")],
|
Annotated[OpenResponsesRequestPluginFileParser, Tag("file-parser")],
|
||||||
Annotated[PluginResponseHealing, Tag("response-healing")],
|
Annotated[OpenResponsesRequestPluginResponseHealing, Tag("response-healing")],
|
||||||
],
|
],
|
||||||
Discriminator(lambda m: get_discriminator(m, "id", "id")),
|
Discriminator(lambda m: get_discriminator(m, "id", "id")),
|
||||||
]
|
]
|
||||||
@@ -491,9 +541,9 @@ class OpenResponsesRequestTypedDict(TypedDict):
|
|||||||
service_tier: NotRequired[ServiceTier]
|
service_tier: NotRequired[ServiceTier]
|
||||||
truncation: NotRequired[Nullable[Truncation]]
|
truncation: NotRequired[Nullable[Truncation]]
|
||||||
stream: NotRequired[bool]
|
stream: NotRequired[bool]
|
||||||
provider: NotRequired[Nullable[ProviderTypedDict]]
|
provider: NotRequired[Nullable[OpenResponsesRequestProviderTypedDict]]
|
||||||
r"""When multiple model providers are available, optionally indicate your routing preference."""
|
r"""When multiple model providers are available, optionally indicate your routing preference."""
|
||||||
plugins: NotRequired[List[PluginTypedDict]]
|
plugins: NotRequired[List[OpenResponsesRequestPluginUnionTypedDict]]
|
||||||
r"""Plugins you want to enable for this request, including their settings."""
|
r"""Plugins you want to enable for this request, including their settings."""
|
||||||
user: NotRequired[str]
|
user: NotRequired[str]
|
||||||
r"""A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters."""
|
r"""A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters."""
|
||||||
@@ -567,10 +617,10 @@ class OpenResponsesRequest(BaseModel):
|
|||||||
|
|
||||||
stream: Optional[bool] = False
|
stream: Optional[bool] = False
|
||||||
|
|
||||||
provider: OptionalNullable[Provider] = UNSET
|
provider: OptionalNullable[OpenResponsesRequestProvider] = UNSET
|
||||||
r"""When multiple model providers are available, optionally indicate your routing preference."""
|
r"""When multiple model providers are available, optionally indicate your routing preference."""
|
||||||
|
|
||||||
plugins: Optional[List[Plugin]] = None
|
plugins: Optional[List[OpenResponsesRequestPluginUnion]] = None
|
||||||
r"""Plugins you want to enable for this request, including their settings."""
|
r"""Plugins you want to enable for this request, including their settings."""
|
||||||
|
|
||||||
user: Optional[str] = None
|
user: Optional[str] = None
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ Parameter = Union[
|
|||||||
"parallel_tool_calls",
|
"parallel_tool_calls",
|
||||||
"include_reasoning",
|
"include_reasoning",
|
||||||
"reasoning",
|
"reasoning",
|
||||||
|
"reasoning_effort",
|
||||||
"web_search_options",
|
"web_search_options",
|
||||||
"verbosity",
|
"verbosity",
|
||||||
],
|
],
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user