Project import generated by Copybara.

GitOrigin-RevId: 849282a42d3b2948d0ca0f7fd1427c31af709bbd
This commit is contained in:
OpenRouter Team
2026-01-09 19:20:21 +00:00
parent a35486030a
commit 9073d38dc1
123 changed files with 3734 additions and 1226 deletions
+3 -1
View File
@@ -1,7 +1,9 @@
{ {
"permissions": { "permissions": {
"allow": [ "allow": [
"Bash(python3:*)" "Bash(python3:*)",
"Bash(git push:*)",
"Bash(gh pr create:*)"
], ],
"deny": [], "deny": [],
"ask": [] "ask": []
+67 -23
View File
@@ -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: 775966841832e95cb8d37401c576b4b6 docChecksum: 772a7ec8092cfd6437e71806e7b19e28
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.16 releaseVersion: 0.0.17
configChecksum: cd00e781b0ef78cfcb3fe812f51e93ff 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
@@ -59,21 +60,23 @@ generatedFiles:
- docs/components/chaterrorerror.md - docs/components/chaterrorerror.md
- docs/components/chatgenerationparams.md - docs/components/chatgenerationparams.md
- docs/components/chatgenerationparamsdatacollection.md - docs/components/chatgenerationparamsdatacollection.md
- docs/components/chatgenerationparamsengine.md - docs/components/chatgenerationparamsimageconfig.md
- docs/components/chatgenerationparamsmaxprice.md - docs/components/chatgenerationparamsmaxprice.md
- docs/components/chatgenerationparamspdf.md - docs/components/chatgenerationparamspluginautorouter.md
- docs/components/chatgenerationparamspdfengine.md
- docs/components/chatgenerationparamspluginfileparser.md - docs/components/chatgenerationparamspluginfileparser.md
- docs/components/chatgenerationparamspluginmoderation.md - docs/components/chatgenerationparamspluginmoderation.md
- docs/components/chatgenerationparamspluginresponsehealing.md - docs/components/chatgenerationparamspluginresponsehealing.md
- docs/components/chatgenerationparamspluginunion.md - docs/components/chatgenerationparamspluginunion.md
- docs/components/chatgenerationparamspluginweb.md - docs/components/chatgenerationparamspluginweb.md
- docs/components/chatgenerationparamspreferredmaxlatency.md
- docs/components/chatgenerationparamspreferredmaxlatencyunion.md
- docs/components/chatgenerationparamspreferredminthroughput.md
- docs/components/chatgenerationparamspreferredminthroughputunion.md
- docs/components/chatgenerationparamsprovider.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
- docs/components/chatgenerationparamsresponseformatunion.md - docs/components/chatgenerationparamsresponseformatunion.md
- docs/components/chatgenerationparamsroute.md
- docs/components/chatgenerationparamsstop.md - docs/components/chatgenerationparamsstop.md
- docs/components/chatgenerationtokenusage.md - docs/components/chatgenerationtokenusage.md
- docs/components/chatmessagecontentitem.md - docs/components/chatmessagecontentitem.md
@@ -123,16 +126,17 @@ generatedFiles:
- docs/components/edgenetworktimeoutresponseerrordata.md - docs/components/edgenetworktimeoutresponseerrordata.md
- docs/components/effort.md - docs/components/effort.md
- docs/components/endpointstatus.md - docs/components/endpointstatus.md
- docs/components/engine.md
- docs/components/filecitation.md - docs/components/filecitation.md
- docs/components/filecitationtype.md - docs/components/filecitationtype.md
- docs/components/filepath.md - docs/components/filepath.md
- docs/components/filepathtype.md - docs/components/filepathtype.md
- docs/components/forbiddenresponseerrordata.md - docs/components/forbiddenresponseerrordata.md
- docs/components/idautorouter.md
- docs/components/idfileparser.md - docs/components/idfileparser.md
- 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
@@ -144,6 +148,7 @@ generatedFiles:
- docs/components/message.md - docs/components/message.md
- docs/components/messagecontent.md - docs/components/messagecontent.md
- docs/components/messagedeveloper.md - docs/components/messagedeveloper.md
- docs/components/modality.md
- docs/components/model.md - docs/components/model.md
- docs/components/modelarchitecture.md - docs/components/modelarchitecture.md
- docs/components/modelarchitectureinstructtype.md - docs/components/modelarchitectureinstructtype.md
@@ -155,7 +160,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
@@ -254,17 +258,19 @@ 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/openresponsesrequestengine.md - docs/components/openresponsesrequestignore.md
- docs/components/openresponsesrequestimageconfig.md
- docs/components/openresponsesrequestmaxprice.md - docs/components/openresponsesrequestmaxprice.md
- docs/components/openresponsesrequestpdf.md - docs/components/openresponsesrequestonly.md
- docs/components/openresponsesrequestpdfengine.md - docs/components/openresponsesrequestorder.md
- docs/components/openresponsesrequestpluginautorouter.md
- docs/components/openresponsesrequestpluginfileparser.md - docs/components/openresponsesrequestpluginfileparser.md
- docs/components/openresponsesrequestpluginmoderation.md - docs/components/openresponsesrequestpluginmoderation.md
- docs/components/openresponsesrequestpluginresponsehealing.md - docs/components/openresponsesrequestpluginresponsehealing.md
- docs/components/openresponsesrequestpluginunion.md - docs/components/openresponsesrequestpluginunion.md
- docs/components/openresponsesrequestpluginweb.md - docs/components/openresponsesrequestpluginweb.md
- docs/components/openresponsesrequestprovider.md - docs/components/openresponsesrequestprovider.md
- docs/components/openresponsesrequestroute.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
@@ -300,7 +306,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
@@ -316,15 +321,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/pdfengine.md
- docs/components/pdfparserengine.md
- docs/components/pdfparseroptions.md
- docs/components/percentilelatencycutoffs.md
- docs/components/percentilestats.md
- docs/components/percentilethroughputcutoffs.md
- docs/components/perrequestlimits.md - docs/components/perrequestlimits.md
- docs/components/preferredmaxlatency.md
- docs/components/preferredminthroughput.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/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
@@ -373,6 +401,7 @@ generatedFiles:
- docs/components/responsesoutputitemfunctioncallstatusunion.md - docs/components/responsesoutputitemfunctioncallstatusunion.md
- docs/components/responsesoutputitemfunctioncalltype.md - docs/components/responsesoutputitemfunctioncalltype.md
- docs/components/responsesoutputitemreasoning.md - docs/components/responsesoutputitemreasoning.md
- docs/components/responsesoutputitemreasoningformat.md
- docs/components/responsesoutputitemreasoningstatuscompleted.md - docs/components/responsesoutputitemreasoningstatuscompleted.md
- docs/components/responsesoutputitemreasoningstatusincomplete.md - docs/components/responsesoutputitemreasoningstatusincomplete.md
- docs/components/responsesoutputitemreasoningstatusinprogress.md - docs/components/responsesoutputitemreasoningstatusinprogress.md
@@ -386,6 +415,7 @@ generatedFiles:
- docs/components/responsesoutputmessagestatusinprogress.md - docs/components/responsesoutputmessagestatusinprogress.md
- docs/components/responsesoutputmessagestatusunion.md - docs/components/responsesoutputmessagestatusunion.md
- docs/components/responsesoutputmessagetype.md - docs/components/responsesoutputmessagetype.md
- docs/components/responsesoutputmodality.md
- docs/components/responsessearchcontextsize.md - docs/components/responsessearchcontextsize.md
- docs/components/responseswebsearchcalloutput.md - docs/components/responseswebsearchcalloutput.md
- docs/components/responseswebsearchcalloutputtype.md - docs/components/responseswebsearchcalloutputtype.md
@@ -393,12 +423,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/schema0.md
- docs/components/schema0enum.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/sort.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
@@ -440,6 +476,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
@@ -473,7 +510,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
@@ -502,13 +538,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
@@ -521,12 +555,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
@@ -570,6 +601,7 @@ generatedFiles:
- 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/_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
@@ -667,10 +699,20 @@ 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/percentilelatencycutoffs.py
- src/openrouter/components/percentilestats.py
- src/openrouter/components/percentilethroughputcutoffs.py
- src/openrouter/components/perrequestlimits.py - src/openrouter/components/perrequestlimits.py
- src/openrouter/components/preferredmaxlatency.py
- src/openrouter/components/preferredminthroughput.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
@@ -696,6 +738,7 @@ generatedFiles:
- src/openrouter/components/responsesoutputitemfunctioncall.py - src/openrouter/components/responsesoutputitemfunctioncall.py
- src/openrouter/components/responsesoutputitemreasoning.py - src/openrouter/components/responsesoutputitemreasoning.py
- src/openrouter/components/responsesoutputmessage.py - src/openrouter/components/responsesoutputmessage.py
- src/openrouter/components/responsesoutputmodality.py
- src/openrouter/components/responsessearchcontextsize.py - src/openrouter/components/responsessearchcontextsize.py
- src/openrouter/components/responseswebsearchcalloutput.py - src/openrouter/components/responseswebsearchcalloutput.py
- src/openrouter/components/responseswebsearchuserlocation.py - src/openrouter/components/responseswebsearchuserlocation.py
@@ -712,6 +755,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
@@ -961,7 +1005,7 @@ examples:
slug: "<value>" slug: "<value>"
responses: responses:
"200": "200":
application/json: {"data": {"id": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", "architecture": {"tokenizer": "GPT", "instruct_type": "chatml", "modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "endpoints": [{"name": "OpenAI: GPT-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "uptime_last_30m": 99.5, "supports_implicit_caching": true}]}} application/json: {"data": {"id": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", "architecture": {"tokenizer": "GPT", "instruct_type": "chatml", "modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "endpoints": [{"name": "OpenAI: GPT-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "uptime_last_30m": 99.5, "supports_implicit_caching": true, "latency_last_30m": {"p50": 0.25, "p75": 0.35, "p90": 0.48, "p99": 0.85}, "throughput_last_30m": {"p50": 45.2, "p75": 38.5, "p90": 28.3, "p99": 15.1}}]}}
"404": "404":
application/json: {"error": {"code": 404, "message": "Resource not found"}} application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500": "500":
@@ -970,7 +1014,7 @@ examples:
speakeasy-default-list-endpoints-zdr: speakeasy-default-list-endpoints-zdr:
responses: responses:
"200": "200":
application/json: {"data": [{"name": "OpenAI: GPT-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens"], "uptime_last_30m": 99.5, "supports_implicit_caching": true}]} application/json: {"data": [{"name": "OpenAI: GPT-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens"], "uptime_last_30m": 99.5, "supports_implicit_caching": true, "latency_last_30m": {"p50": 25.5, "p75": 35.2, "p90": 48.7, "p99": 85.3}, "throughput_last_30m": {"p50": 25.5, "p75": 35.2, "p90": 48.7, "p99": 85.3}}]}
"500": "500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}} application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
getParameters: getParameters:
+3 -1
View File
@@ -31,7 +31,7 @@ generation:
skipResponseBodyAssertions: false skipResponseBodyAssertions: false
preApplyUnionDiscriminators: true preApplyUnionDiscriminators: true
python: python:
version: 0.0.16 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
+527 -236
View File
File diff suppressed because it is too large Load Diff
+10
View File
@@ -0,0 +1,10 @@
lintVersion: 1.0.0
defaultRuleset: openrouter
rulesets:
openrouter:
rulesets:
- speakeasy-recommended
- speakeasy-generation
rules:
oas3-missing-example:
severity: "off"
+507 -221
View File
@@ -269,7 +269,25 @@ components:
allOf: allOf:
- $ref: '#/components/schemas/OutputItemReasoning' - $ref: '#/components/schemas/OutputItemReasoning'
- type: object - type: object
properties: {} properties:
signature:
type: string
nullable: true
description: A signature for the reasoning content, used for verification
example: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj...
format:
type: string
nullable: true
enum:
- unknown
- openai-responses-v1
- azure-openai-responses-v1
- xai-responses-v1
- anthropic-claude-v1
- google-gemini-v1
description: The format of the reasoning content
example: anthropic-claude-v1
x-speakeasy-unknown-values: allow
example: example:
id: reasoning-123 id: reasoning-123
type: reasoning type: reasoning
@@ -280,6 +298,8 @@ components:
content: content:
- type: reasoning_text - type: reasoning_text
text: First, we analyze the problem... text: First, we analyze the problem...
signature: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj...
format: anthropic-claude-v1
description: An output item containing reasoning description: An output item containing reasoning
OutputItemFunctionCall: OutputItemFunctionCall:
type: object type: object
@@ -3239,6 +3259,7 @@ components:
enum: enum:
- unknown - unknown
- openai-responses-v1 - openai-responses-v1
- azure-openai-responses-v1
- xai-responses-v1 - xai-responses-v1
- anthropic-claude-v1 - anthropic-claude-v1
- google-gemini-v1 - google-gemini-v1
@@ -3434,6 +3455,12 @@ components:
example: example:
summary: auto summary: auto
enabled: true enabled: true
ResponsesOutputModality:
type: string
enum:
- text
- image
x-speakeasy-unknown-values: allow
OpenAIResponsesIncludable: OpenAIResponsesIncludable:
type: string type: string
enum: enum:
@@ -3487,7 +3514,6 @@ components:
- Fireworks - Fireworks
- Friendli - Friendli
- GMICloud - GMICloud
- GoPomelo
- Google - Google
- Google AI Studio - Google AI Studio
- Groq - Groq
@@ -3517,13 +3543,14 @@ components:
- Phala - Phala
- Relace - Relace
- SambaNova - SambaNova
- Seed
- SiliconFlow - SiliconFlow
- Sourceful - Sourceful
- Stealth - Stealth
- StreamLake - StreamLake
- Switchpoint - Switchpoint
- Targon
- Together - Together
- Upstage
- Venice - Venice
- WandB - WandB
- Xiaomi - Xiaomi
@@ -3548,19 +3575,113 @@ 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
ProviderSortConfig:
type: object
properties:
by:
anyOf:
- $ref: '#/components/schemas/ProviderSort'
- type: 'null'
partition:
anyOf:
- type: string
enum:
- model
- none
x-speakeasy-unknown-values: allow
- type: 'null'
BigNumberUnion: BigNumberUnion:
type: string type: string
description: A value in string format that is a large number description: A value in string format that is a large number
example: 1000 example: 1000
PercentileThroughputCutoffs:
type: object
properties:
p50:
type: number
nullable: true
description: Minimum p50 throughput (tokens/sec)
p75:
type: number
nullable: true
description: Minimum p75 throughput (tokens/sec)
p90:
type: number
nullable: true
description: Minimum p90 throughput (tokens/sec)
p99:
type: number
nullable: true
description: Minimum p99 throughput (tokens/sec)
description: Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
example:
p50: 100
p90: 50
PreferredMinThroughput:
anyOf:
- type: number
- $ref: '#/components/schemas/PercentileThroughputCutoffs'
- nullable: true
description: >-
Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) 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
PercentileLatencyCutoffs:
type: object
properties:
p50:
type: number
nullable: true
description: Maximum p50 latency (seconds)
p75:
type: number
nullable: true
description: Maximum p75 latency (seconds)
p90:
type: number
nullable: true
description: Maximum p90 latency (seconds)
p99:
type: number
nullable: true
description: Maximum p99 latency (seconds)
description: Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
example:
p50: 5
p90: 10
PreferredMaxLatency:
anyOf:
- type: number
- $ref: '#/components/schemas/PercentileLatencyCutoffs'
- nullable: true
description: >-
Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) 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
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:
@@ -3631,6 +3752,24 @@ components:
minimum: 0 minimum: 0
top_k: top_k:
type: number type: number
image_config:
type: object
additionalProperties:
anyOf:
- type: string
- type: number
description: >-
Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
example:
aspect_ratio: '16:9'
modalities:
type: array
items:
$ref: '#/components/schemas/ResponsesOutputModality'
description: Output modalities for the response. Supported values are "text" and "image".
example:
- text
- image
prompt_cache_key: prompt_cache_key:
type: string type: string
nullable: true nullable: true
@@ -3733,7 +3872,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:
@@ -3749,24 +3894,37 @@ components:
$ref: '#/components/schemas/BigNumberUnion' $ref: '#/components/schemas/BigNumberUnion'
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.
min_throughput: preferred_min_throughput:
type: number $ref: '#/components/schemas/PreferredMinThroughput'
nullable: true preferred_max_latency:
example: 100 $ref: '#/components/schemas/PreferredMaxLatency'
description: >-
The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used.
max_latency:
type: number
nullable: true
example: 5
description: >-
The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used.
additionalProperties: false 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:
type: array type: array
items: items:
oneOf: oneOf:
- type: object
properties:
id:
type: string
enum:
- auto-router
enabled:
type: boolean
description: Set to false to disable the auto-router plugin for this request. Defaults to true.
allowed_models:
type: array
items:
type: string
description: >-
List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list.
example:
- anthropic/*
- openai/gpt-4o
- google/*
required:
- id
- type: object - type: object
properties: properties:
id: id:
@@ -3789,11 +3947,7 @@ components:
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
@@ -3806,15 +3960,7 @@ components:
type: boolean type: boolean
description: Set to false to disable the file-parser plugin for this request. Defaults to true. 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
@@ -3835,8 +3981,12 @@ components:
enum: enum:
- fallback - fallback
- sort - sort
deprecated: true
description: >- description: >-
Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria. **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").
x-speakeasy-deprecation-message: Use providers.sort.partition instead.
x-speakeasy-ignore: true
x-fern-ignore: true
x-speakeasy-unknown-values: allow x-speakeasy-unknown-values: allow
user: user:
type: string type: string
@@ -3994,6 +4144,100 @@ 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:
$ref: '#/components/schemas/PreferredMinThroughput'
preferred_max_latency:
$ref: '#/components/schemas/PreferredMaxLatency'
description: Provider routing preferences for the request.
PublicPricing: PublicPricing:
type: object type: object
properties: properties:
@@ -4205,6 +4449,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
@@ -4431,6 +4676,32 @@ components:
- -10 - -10
example: 0 example: 0
x-speakeasy-unknown-values: allow x-speakeasy-unknown-values: allow
PercentileStats:
type: object
nullable: true
properties:
p50:
type: number
description: Median (50th percentile)
example: 25.5
p75:
type: number
description: 75th percentile
example: 35.2
p90:
type: number
description: 90th percentile
example: 48.7
p99:
type: number
description: 99th percentile
example: 85.3
required:
- p50
- p75
- p90
- p99
description: Latency percentiles in seconds over the last 30 minutes. Latency measures time to first token.
PublicEndpoint: PublicEndpoint:
type: object type: object
properties: properties:
@@ -4498,6 +4769,13 @@ components:
nullable: true nullable: true
supports_implicit_caching: supports_implicit_caching:
type: boolean type: boolean
latency_last_30m:
$ref: '#/components/schemas/PercentileStats'
throughput_last_30m:
allOf:
- $ref: '#/components/schemas/PercentileStats'
- description: >-
Throughput percentiles in tokens per second over the last 30 minutes. Throughput measures output token generation speed.
required: required:
- name - name
- model_name - model_name
@@ -4511,6 +4789,8 @@ components:
- supported_parameters - supported_parameters
- uptime_last_30m - uptime_last_30m
- supports_implicit_caching - supports_implicit_caching
- latency_last_30m
- throughput_last_30m
description: Information about a specific model endpoint description: Information about a specific model endpoint
example: example:
name: 'OpenAI: GPT-4' name: 'OpenAI: GPT-4'
@@ -4533,6 +4813,16 @@ components:
status: 0 status: 0
uptime_last_30m: 99.5 uptime_last_30m: 99.5
supports_implicit_caching: true supports_implicit_caching: true
latency_last_30m:
p50: 0.25
p75: 0.35
p90: 0.48
p99: 0.85
throughput_last_30m:
p50: 45.2
p75: 38.5
p90: 28.3
p99: 15.1
ListEndpointsResponse: ListEndpointsResponse:
type: object type: object
properties: properties:
@@ -4636,6 +4926,16 @@ components:
status: default status: default
uptime_last_30m: 99.5 uptime_last_30m: 99.5
supports_implicit_caching: true supports_implicit_caching: true
latency_last_30m:
p50: 0.25
p75: 0.35
p90: 0.48
p99: 0.85
throughput_last_30m:
p50: 45.2
p75: 38.5
p90: 28.3
p99: 15.1
__schema0: __schema0:
type: array type: array
items: items:
@@ -4668,7 +4968,6 @@ components:
- Fireworks - Fireworks
- Friendli - Friendli
- GMICloud - GMICloud
- GoPomelo
- Google - Google
- Google AI Studio - Google AI Studio
- Groq - Groq
@@ -4698,13 +4997,14 @@ components:
- Phala - Phala
- Relace - Relace
- SambaNova - SambaNova
- Seed
- SiliconFlow - SiliconFlow
- Sourceful - Sourceful
- Stealth - Stealth
- StreamLake - StreamLake
- Switchpoint - Switchpoint
- Targon
- Together - Together
- Upstage
- Venice - Venice
- WandB - WandB
- Xiaomi - Xiaomi
@@ -4722,6 +5022,80 @@ components:
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
- azure-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:
@@ -4940,6 +5314,8 @@ components:
properties: properties:
cached_tokens: cached_tokens:
type: number type: number
cache_write_tokens:
type: number
audio_tokens: audio_tokens:
type: number type: number
video_tokens: video_tokens:
@@ -5264,12 +5640,7 @@ components:
description: >- description: >-
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
anyOf: anyOf:
- type: string - $ref: '#/components/schemas/ProviderSortUnion'
enum:
- price
- throughput
- latency
x-speakeasy-unknown-values: allow
- type: 'null' - type: 'null'
max_price: max_price:
description: >- description: >-
@@ -5286,17 +5657,55 @@ components:
$ref: '#/components/schemas/__schema1' $ref: '#/components/schemas/__schema1'
request: request:
$ref: '#/components/schemas/__schema1' $ref: '#/components/schemas/__schema1'
min_throughput: preferred_min_throughput:
description: >- description: >-
The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used. Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) 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.
anyOf: anyOf:
- type: number - anyOf:
- type: number
- type: object
properties:
p50:
anyOf:
- type: number
- type: 'null'
p75:
anyOf:
- type: number
- type: 'null'
p90:
anyOf:
- type: number
- type: 'null'
p99:
anyOf:
- type: number
- type: 'null'
- type: 'null' - type: 'null'
max_latency: preferred_max_latency:
description: >- description: >-
The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used. Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) 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.
anyOf: anyOf:
- type: number - anyOf:
- type: number
- type: object
properties:
p50:
anyOf:
- type: number
- type: 'null'
p75:
anyOf:
- type: number
- type: 'null'
p90:
anyOf:
- type: number
- type: 'null'
p99:
anyOf:
- type: number
- type: 'null'
- type: 'null' - type: 'null'
additionalProperties: false additionalProperties: false
- type: 'null' - type: 'null'
@@ -5305,6 +5714,19 @@ components:
type: array type: array
items: items:
oneOf: oneOf:
- type: object
properties:
id:
type: string
const: auto-router
enabled:
type: boolean
allowed_models:
type: array
items:
type: string
required:
- id
- type: object - type: object
properties: properties:
id: id:
@@ -5361,8 +5783,6 @@ components:
- id - id
type: object type: object
route: route:
description: >-
Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria.
anyOf: anyOf:
- type: string - type: string
enum: enum:
@@ -5441,12 +5861,12 @@ components:
anyOf: anyOf:
- type: string - type: string
enum: enum:
- none
- minimal
- low
- medium
- high
- xhigh - xhigh
- high
- medium
- low
- minimal
- none
x-speakeasy-unknown-values: allow x-speakeasy-unknown-values: allow
- type: 'null' - type: 'null'
summary: summary:
@@ -5526,8 +5946,28 @@ components:
properties: properties:
echo_upstream_body: echo_upstream_body:
type: boolean type: boolean
image_config:
type: object
propertyNames:
type: string
additionalProperties:
anyOf:
- type: string
- type: number
modalities:
type: array
items:
type: string
enum:
- text
- image
x-speakeasy-unknown-values: allow
required: required:
- messages - messages
ProviderSortUnion:
anyOf:
- $ref: '#/components/schemas/ProviderSort'
- $ref: '#/components/schemas/ProviderSortConfig'
ChatResponseChoice: ChatResponseChoice:
type: object type: object
properties: properties:
@@ -5537,6 +5977,10 @@ components:
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'
@@ -5587,6 +6031,10 @@ 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:
@@ -6413,99 +6861,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'
description: >-
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
min_throughput:
type: number
nullable: true
example: 100
description: >-
The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used.
max_latency:
type: number
nullable: true
example: 5
description: >-
The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used.
input_type: input_type:
type: string type: string
required: required:
@@ -7095,78 +7451,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
- 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
required: false required: false
name: provider name: provider
in: query in: query
@@ -7211,6 +7496,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
+6 -5
View File
@@ -8,19 +8,20 @@ sources:
- latest - latest
OpenRouter API: OpenRouter API:
sourceNamespace: open-router-chat-completions-api sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:cfb565b0217763fa566062e31b6f01db05dfec6bdd0746b429f03b8600588989 sourceRevisionDigest: sha256:fcc289022d99776aaf9434e14ccc3c9878a847384b300158c84391c9f4aed6ce
sourceBlobDigest: sha256:b985c3342982a1c6e2163e6bb1ebc6066117f1d4c3dfc6fa219768cf6f7fc8d1 sourceBlobDigest: sha256:40c2ad7a48417d63a674f078aa75768dc7266885f38003ab3e5c00067d444fbe
tags: tags:
- latest - latest
- subtree-sync-import-python-sdk
- 1.0.0 - 1.0.0
targets: 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:cfb565b0217763fa566062e31b6f01db05dfec6bdd0746b429f03b8600588989 sourceRevisionDigest: sha256:fcc289022d99776aaf9434e14ccc3c9878a847384b300158c84391c9f4aed6ce
sourceBlobDigest: sha256:b985c3342982a1c6e2163e6bb1ebc6066117f1d4c3dfc6fa219768cf6f7fc8d1 sourceBlobDigest: sha256:40c2ad7a48417d63a674f078aa75768dc7266885f38003ab3e5c00067d444fbe
codeSamplesNamespace: open-router-python-code-samples codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:badb3333f4862c5024a05b0b8456c4491edca4c2e3511c10da240942fc5e5397 codeSamplesRevisionDigest: sha256:567674342c32a59ace54f464472abd2784897dbbe9e4bb6f953480ea84e03cf9
workflow: workflow:
workflowVersion: 1.0.0 workflowVersion: 1.0.0
speakeasyVersion: 1.666.0 speakeasyVersion: 1.666.0
+3 -1
View File
@@ -7,7 +7,7 @@
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `provider` | [OptionalNullable[components.ChatGenerationParamsProvider]](../components/chatgenerationparamsprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | | `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. | | `plugins` | List[[components.ChatGenerationParamsPluginUnion](../components/chatgenerationparamspluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. |
| `route` | [OptionalNullable[components.ChatGenerationParamsRoute]](../components/chatgenerationparamsroute.md) | :heavy_minus_sign: | Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria. | | `route` | [OptionalNullable[components.Route]](../components/route.md) | :heavy_minus_sign: | N/A |
| `user` | *Optional[str]* | :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. | | `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 |
@@ -32,3 +32,5 @@
| `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 |
| `debug` | [Optional[components.Debug]](../components/debug.md) | :heavy_minus_sign: | N/A | | `debug` | [Optional[components.Debug]](../components/debug.md) | :heavy_minus_sign: | N/A |
| `image_config` | Dict[str, [components.ChatGenerationParamsImageConfig](../components/chatgenerationparamsimageconfig.md)] | :heavy_minus_sign: | N/A |
| `modalities` | List[[components.Modality](../components/modality.md)] | :heavy_minus_sign: | N/A |
@@ -0,0 +1,17 @@
# ChatGenerationParamsImageConfig
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `float`
```python
value: float = /* values here */
```
@@ -0,0 +1,10 @@
# ChatGenerationParamsPluginAutoRouter
## Fields
| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `id` | *Literal["auto-router"]* | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `allowed_models` | List[*str*] | :heavy_minus_sign: | N/A |
@@ -3,8 +3,8 @@
## Fields ## Fields
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `id` | *Literal["file-parser"]* | :heavy_check_mark: | N/A | | `id` | *Literal["file-parser"]* | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `pdf` | [Optional[components.ChatGenerationParamsPdf]](../components/chatgenerationparamspdf.md) | :heavy_minus_sign: | N/A | | `pdf` | [Optional[components.Pdf]](../components/pdf.md) | :heavy_minus_sign: | N/A |
@@ -3,6 +3,12 @@
## Supported Types ## Supported Types
### `components.ChatGenerationParamsPluginAutoRouter`
```python
value: components.ChatGenerationParamsPluginAutoRouter = /* values here */
```
### `components.ChatGenerationParamsPluginModeration` ### `components.ChatGenerationParamsPluginModeration`
```python ```python
@@ -3,10 +3,10 @@
## Fields ## Fields
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
| `id` | *Literal["web"]* | :heavy_check_mark: | N/A | | `id` | *Literal["web"]* | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | 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.ChatGenerationParamsEngine]](../components/chatgenerationparamsengine.md) | :heavy_minus_sign: | N/A | | `engine` | [Optional[components.Engine]](../components/engine.md) | :heavy_minus_sign: | N/A |
@@ -0,0 +1,11 @@
# ChatGenerationParamsPreferredMaxLatency
## Fields
| Field | Type | Required | Description |
| ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| `p50` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p75` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p90` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p99` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,17 @@
# ChatGenerationParamsPreferredMaxLatencyUnion
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `components.ChatGenerationParamsPreferredMaxLatency`
```python
value: components.ChatGenerationParamsPreferredMaxLatency = /* values here */
```
@@ -0,0 +1,11 @@
# ChatGenerationParamsPreferredMinThroughput
## Fields
| Field | Type | Required | Description |
| ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| `p50` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p75` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p90` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p99` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,17 @@
# ChatGenerationParamsPreferredMinThroughputUnion
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `components.ChatGenerationParamsPreferredMinThroughput`
```python
value: components.ChatGenerationParamsPreferredMinThroughput = /* values here */
```
+15 -15
View File
@@ -3,18 +3,18 @@
## Fields ## Fields
| Field | Type | Required | Description | | 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.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. | | `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: | N/A | | `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `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. | | `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.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. | | `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.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. | | `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.Quantizations](../components/quantizations.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.Sort]](../components/sort.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | | `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.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. | | `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. |
| `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. | | `preferred_min_throughput` | [OptionalNullable[components.ChatGenerationParamsPreferredMinThroughputUnion]](../components/chatgenerationparamspreferredminthroughputunion.md) | :heavy_minus_sign: | Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) 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. |
| `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. | | `preferred_max_latency` | [OptionalNullable[components.ChatGenerationParamsPreferredMaxLatencyUnion]](../components/chatgenerationparamspreferredmaxlatencyunion.md) | :heavy_minus_sign: | Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) 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. |
+1
View File
@@ -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 -5
View File
@@ -5,9 +5,9 @@
| Name | Value | | Name | Value |
| --------- | --------- | | --------- | --------- |
| `NONE` | none |
| `MINIMAL` | minimal |
| `LOW` | low |
| `MEDIUM` | medium |
| `HIGH` | high |
| `XHIGH` | xhigh | | `XHIGH` | xhigh |
| `HIGH` | high |
| `MEDIUM` | medium |
| `LOW` | low |
| `MINIMAL` | minimal |
| `NONE` | none |
+9
View File
@@ -0,0 +1,9 @@
# Engine
## Values
| Name | Value |
| -------- | -------- |
| `NATIVE` | native |
| `EXA` | exa |
+8
View File
@@ -0,0 +1,8 @@
# IDAutoRouter
## Values
| Name | Value |
| ------------- | ------------- |
| `AUTO_ROUTER` | auto-router |
+9
View File
@@ -0,0 +1,9 @@
# Modality
## Values
| Name | Value |
| ------- | ------- |
| `TEXT` | text |
| `IMAGE` | image |
@@ -3,10 +3,11 @@
## Values ## Values
| Name | Value | | Name | Value |
| --------------------- | --------------------- | | --------------------------- | --------------------------- |
| `UNKNOWN` | unknown | | `UNKNOWN` | unknown |
| `OPENAI_RESPONSES_V1` | openai-responses-v1 | | `OPENAI_RESPONSES_V1` | openai-responses-v1 |
| `XAI_RESPONSES_V1` | xai-responses-v1 | | `AZURE_OPENAI_RESPONSES_V1` | azure-openai-responses-v1 |
| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 | | `XAI_RESPONSES_V1` | xai-responses-v1 |
| `GOOGLE_GEMINI_V1` | google-gemini-v1 | | `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
| `GOOGLE_GEMINI_V1` | google-gemini-v1 |
+2 -1
View File
@@ -21,6 +21,8 @@ Request schema for Responses endpoint
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | | `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `top_k` | *Optional[float]* | :heavy_minus_sign: | N/A | | | `top_k` | *Optional[float]* | :heavy_minus_sign: | N/A | |
| `image_config` | Dict[str, [components.OpenResponsesRequestImageConfig](../components/openresponsesrequestimageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. | {<br/>"aspect_ratio": "16:9"<br/>} |
| `modalities` | List[[components.ResponsesOutputModality](../components/responsesoutputmodality.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [<br/>"text",<br/>"image"<br/>] |
| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `previous_response_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `previous_response_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `prompt` | [OptionalNullable[components.OpenAIResponsesPrompt]](../components/openairesponsesprompt.md) | :heavy_minus_sign: | N/A | | | `prompt` | [OptionalNullable[components.OpenAIResponsesPrompt]](../components/openairesponsesprompt.md) | :heavy_minus_sign: | N/A | |
@@ -33,6 +35,5 @@ Request schema for Responses endpoint
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
| `provider` | [OptionalNullable[components.OpenResponsesRequestProvider]](../components/openresponsesrequestprovider.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.OpenResponsesRequestPluginUnion](../components/openresponsesrequestpluginunion.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. | |
| `route` | [OptionalNullable[components.OpenResponsesRequestRoute]](../components/openresponsesrequestroute.md) | :heavy_minus_sign: | Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria. | |
| `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,17 @@
# OpenResponsesRequestIgnore
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,17 @@
# OpenResponsesRequestImageConfig
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `float`
```python
value: float = /* values here */
```
@@ -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,10 @@
# OpenResponsesRequestPluginAutoRouter
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id` | [components.IDAutoRouter](../components/idautorouter.md) | :heavy_check_mark: | N/A | |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the auto-router plugin for this request. Defaults to true. | |
| `allowed_models` | List[*str*] | :heavy_minus_sign: | List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list. | [<br/>"anthropic/*",<br/>"openai/gpt-4o",<br/>"google/*"<br/>] |
@@ -3,8 +3,8 @@
## Fields ## Fields
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `id` | [components.IDFileParser](../components/idfileparser.md) | :heavy_check_mark: | N/A | | `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. | | `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the file-parser plugin for this request. Defaults to true. |
| `pdf` | [Optional[components.OpenResponsesRequestPdf]](../components/openresponsesrequestpdf.md) | :heavy_minus_sign: | N/A | | `pdf` | [Optional[components.PDFParserOptions]](../components/pdfparseroptions.md) | :heavy_minus_sign: | Options for PDF parsing. |
@@ -3,6 +3,12 @@
## Supported Types ## Supported Types
### `components.OpenResponsesRequestPluginAutoRouter`
```python
value: components.OpenResponsesRequestPluginAutoRouter = /* values here */
```
### `components.OpenResponsesRequestPluginModeration` ### `components.OpenResponsesRequestPluginModeration`
```python ```python
@@ -3,10 +3,10 @@
## Fields ## Fields
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `id` | [components.IDWeb](../components/idweb.md) | :heavy_check_mark: | N/A | | `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. | | `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 | | `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.OpenResponsesRequestEngine]](../components/openresponsesrequestengine.md) | :heavy_minus_sign: | N/A | | `engine` | [Optional[components.WebSearchEngine]](../components/websearchengine.md) | :heavy_minus_sign: | The search engine to use for web search. |
+15 -15
View File
@@ -5,18 +5,18 @@ When multiple model providers are available, optionally indicate your routing pr
## Fields ## Fields
| Field | Type | Required | Description | Example | | 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/> | | | `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.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 | | `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 | | `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.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.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.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.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.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.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. | | | `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.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. | | | `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. | |
| `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 | | `preferred_min_throughput` | [OptionalNullable[components.PreferredMinThroughput]](../components/preferredminthroughput.md) | :heavy_minus_sign: | Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) 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 |
| `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 | | `preferred_max_latency` | [OptionalNullable[components.PreferredMaxLatency]](../components/preferredmaxlatency.md) | :heavy_minus_sign: | Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) 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 |
@@ -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 */
```
+1
View File
@@ -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 |
+9
View File
@@ -0,0 +1,9 @@
# Partition
## Values
| Name | Value |
| ------- | ------- |
| `MODEL` | model |
| `NONE` | none |
+8
View File
@@ -0,0 +1,8 @@
# Pdf
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| `engine` | [Optional[components.PdfEngine]](../components/pdfengine.md) | :heavy_minus_sign: | N/A |
+10
View File
@@ -0,0 +1,10 @@
# PdfEngine
## Values
| Name | Value |
| ------------- | ------------- |
| `MISTRAL_OCR` | mistral-ocr |
| `PDF_TEXT` | pdf-text |
| `NATIVE` | native |
+12
View File
@@ -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 |
+10
View File
@@ -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. |
@@ -0,0 +1,13 @@
# PercentileLatencyCutoffs
Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
## Fields
| Field | Type | Required | Description |
| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- |
| `p50` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p50 latency (seconds) |
| `p75` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p75 latency (seconds) |
| `p90` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p90 latency (seconds) |
| `p99` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p99 latency (seconds) |
+13
View File
@@ -0,0 +1,13 @@
# PercentileStats
Latency percentiles in seconds over the last 30 minutes. Latency measures time to first token.
## Fields
| Field | Type | Required | Description | Example |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `p50` | *float* | :heavy_check_mark: | Median (50th percentile) | 25.5 |
| `p75` | *float* | :heavy_check_mark: | 75th percentile | 35.2 |
| `p90` | *float* | :heavy_check_mark: | 90th percentile | 48.7 |
| `p99` | *float* | :heavy_check_mark: | 99th percentile | 85.3 |
@@ -0,0 +1,13 @@
# PercentileThroughputCutoffs
Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
## Fields
| Field | Type | Required | Description |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `p50` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p50 throughput (tokens/sec) |
| `p75` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p75 throughput (tokens/sec) |
| `p90` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p90 throughput (tokens/sec) |
| `p99` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p99 throughput (tokens/sec) |
+25
View File
@@ -0,0 +1,25 @@
# PreferredMaxLatency
Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) 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.
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `components.PercentileLatencyCutoffs`
```python
value: components.PercentileLatencyCutoffs = /* values here */
```
### `Any`
```python
value: Any = /* values here */
```
+25
View File
@@ -0,0 +1,25 @@
# PreferredMinThroughput
Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) 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.
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `components.PercentileThroughputCutoffs`
```python
value: components.PercentileThroughputCutoffs = /* values here */
```
### `Any`
```python
value: Any = /* values here */
```
+6 -5
View File
@@ -3,8 +3,9 @@
## Fields ## Fields
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ | | -------------------- | -------------------- | -------------------- | -------------------- |
| `cached_tokens` | *Optional[float]* | :heavy_minus_sign: | N/A | | `cached_tokens` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `audio_tokens` | *Optional[float]* | :heavy_minus_sign: | N/A | | `cache_write_tokens` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `video_tokens` | *Optional[float]* | :heavy_minus_sign: | N/A | | `audio_tokens` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `video_tokens` | *Optional[float]* | :heavy_minus_sign: | N/A |
+2 -2
View File
@@ -31,7 +31,6 @@
| `FIREWORKS` | Fireworks | | `FIREWORKS` | Fireworks |
| `FRIENDLI` | Friendli | | `FRIENDLI` | Friendli |
| `GMI_CLOUD` | GMICloud | | `GMI_CLOUD` | GMICloud |
| `GO_POMELO` | GoPomelo |
| `GOOGLE` | Google | | `GOOGLE` | Google |
| `GOOGLE_AI_STUDIO` | Google AI Studio | | `GOOGLE_AI_STUDIO` | Google AI Studio |
| `GROQ` | Groq | | `GROQ` | Groq |
@@ -61,13 +60,14 @@
| `PHALA` | Phala | | `PHALA` | Phala |
| `RELACE` | Relace | | `RELACE` | Relace |
| `SAMBA_NOVA` | SambaNova | | `SAMBA_NOVA` | SambaNova |
| `SEED` | Seed |
| `SILICON_FLOW` | SiliconFlow | | `SILICON_FLOW` | SiliconFlow |
| `SOURCEFUL` | Sourceful | | `SOURCEFUL` | Sourceful |
| `STEALTH` | Stealth | | `STEALTH` | Stealth |
| `STREAM_LAKE` | StreamLake | | `STREAM_LAKE` | StreamLake |
| `SWITCHPOINT` | Switchpoint | | `SWITCHPOINT` | Switchpoint |
| `TARGON` | Targon |
| `TOGETHER` | Together | | `TOGETHER` | Together |
| `UPSTAGE` | Upstage |
| `VENICE` | Venice | | `VENICE` | Venice |
| `WAND_B` | WandB | | `WAND_B` | WandB |
| `XIAOMI` | Xiaomi | | `XIAOMI` | Xiaomi |
+22
View File
@@ -0,0 +1,22 @@
# 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[components.PreferredMinThroughput]](../components/preferredminthroughput.md) | :heavy_minus_sign: | Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) 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[components.PreferredMaxLatency]](../components/preferredmaxlatency.md) | :heavy_minus_sign: | Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) 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 |
@@ -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 */
```
-2
View File
@@ -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
+9
View File
@@ -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 | |
+10
View File
@@ -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 */
```
+17
View File
@@ -0,0 +1,17 @@
# ProviderSortUnion
## Supported Types
### `components.ProviderSort`
```python
value: components.ProviderSort = /* values here */
```
### `components.ProviderSortConfig`
```python
value: components.ProviderSortConfig = /* values here */
```
+2
View File
@@ -20,3 +20,5 @@ Information about a specific model endpoint
| `status` | [Optional[components.EndpointStatus]](../components/endpointstatus.md) | :heavy_minus_sign: | N/A | 0 | | `status` | [Optional[components.EndpointStatus]](../components/endpointstatus.md) | :heavy_minus_sign: | N/A | 0 |
| `uptime_last_30m` | *Nullable[float]* | :heavy_check_mark: | N/A | | | `uptime_last_30m` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `supports_implicit_caching` | *bool* | :heavy_check_mark: | N/A | | | `supports_implicit_caching` | *bool* | :heavy_check_mark: | N/A | |
| `latency_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | Latency percentiles in seconds over the last 30 minutes. Latency measures time to first token. | |
| `throughput_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | N/A | |
@@ -5,11 +5,13 @@ An output item containing reasoning
## Fields ## Fields
| Field | Type | Required | Description | | Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| `type` | [components.ResponsesOutputItemReasoningType](../components/responsesoutputitemreasoningtype.md) | :heavy_check_mark: | N/A | | `type` | [components.ResponsesOutputItemReasoningType](../components/responsesoutputitemreasoningtype.md) | :heavy_check_mark: | N/A | |
| `id` | *str* | :heavy_check_mark: | N/A | | `id` | *str* | :heavy_check_mark: | N/A | |
| `content` | List[[components.ReasoningTextContent](../components/reasoningtextcontent.md)] | :heavy_minus_sign: | N/A | | `content` | List[[components.ReasoningTextContent](../components/reasoningtextcontent.md)] | :heavy_minus_sign: | N/A | |
| `summary` | List[[components.ReasoningSummaryText](../components/reasoningsummarytext.md)] | :heavy_check_mark: | N/A | | `summary` | List[[components.ReasoningSummaryText](../components/reasoningsummarytext.md)] | :heavy_check_mark: | N/A | |
| `encrypted_content` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `encrypted_content` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `status` | [Optional[components.ResponsesOutputItemReasoningStatusUnion]](../components/responsesoutputitemreasoningstatusunion.md) | :heavy_minus_sign: | N/A | | `status` | [Optional[components.ResponsesOutputItemReasoningStatusUnion]](../components/responsesoutputitemreasoningstatusunion.md) | :heavy_minus_sign: | N/A | |
| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | A signature for the reasoning content, used for verification | EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... |
| `format_` | [OptionalNullable[components.ResponsesOutputItemReasoningFormat]](../components/responsesoutputitemreasoningformat.md) | :heavy_minus_sign: | The format of the reasoning content | anthropic-claude-v1 |
@@ -0,0 +1,15 @@
# ResponsesOutputItemReasoningFormat
The format of the reasoning content
## Values
| Name | Value |
| --------------------------- | --------------------------- |
| `UNKNOWN` | unknown |
| `OPENAI_RESPONSES_V1` | openai-responses-v1 |
| `AZURE_OPENAI_RESPONSES_V1` | azure-openai-responses-v1 |
| `XAI_RESPONSES_V1` | xai-responses-v1 |
| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
| `GOOGLE_GEMINI_V1` | google-gemini-v1 |
@@ -0,0 +1,9 @@
# ResponsesOutputModality
## Values
| Name | Value |
| ------- | ------- |
| `TEXT` | text |
| `IMAGE` | image |
+9
View File
@@ -0,0 +1,9 @@
# Route
## Values
| Name | Value |
| ---------- | ---------- |
| `FALLBACK` | fallback |
| `SORT` | sort |
+2 -2
View File
@@ -31,7 +31,6 @@
| `FIREWORKS` | Fireworks | | `FIREWORKS` | Fireworks |
| `FRIENDLI` | Friendli | | `FRIENDLI` | Friendli |
| `GMI_CLOUD` | GMICloud | | `GMI_CLOUD` | GMICloud |
| `GO_POMELO` | GoPomelo |
| `GOOGLE` | Google | | `GOOGLE` | Google |
| `GOOGLE_AI_STUDIO` | Google AI Studio | | `GOOGLE_AI_STUDIO` | Google AI Studio |
| `GROQ` | Groq | | `GROQ` | Groq |
@@ -61,13 +60,14 @@
| `PHALA` | Phala | | `PHALA` | Phala |
| `RELACE` | Relace | | `RELACE` | Relace |
| `SAMBA_NOVA` | SambaNova | | `SAMBA_NOVA` | SambaNova |
| `SEED` | Seed |
| `SILICON_FLOW` | SiliconFlow | | `SILICON_FLOW` | SiliconFlow |
| `SOURCEFUL` | Sourceful | | `SOURCEFUL` | Sourceful |
| `STEALTH` | Stealth | | `STEALTH` | Stealth |
| `STREAM_LAKE` | StreamLake | | `STREAM_LAKE` | StreamLake |
| `SWITCHPOINT` | Switchpoint | | `SWITCHPOINT` | Switchpoint |
| `TARGON` | Targon |
| `TOGETHER` | Together | | `TOGETHER` | Together |
| `UPSTAGE` | Upstage |
| `VENICE` | Venice | | `VENICE` | Venice |
| `WAND_B` | WandB | | `WAND_B` | WandB |
| `XIAOMI` | Xiaomi | | `XIAOMI` | Xiaomi |
+23
View File
@@ -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 |
+13
View File
@@ -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 |
+13
View File
@@ -0,0 +1,13 @@
# Schema5
## Values
| Name | Value |
| --------------------------- | --------------------------- |
| `UNKNOWN` | unknown |
| `OPENAI_RESPONSES_V1` | openai-responses-v1 |
| `AZURE_OPENAI_RESPONSES_V1` | azure-openai-responses-v1 |
| `XAI_RESPONSES_V1` | xai-responses-v1 |
| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
| `GOOGLE_GEMINI_V1` | google-gemini-v1 |
+10
View File
@@ -0,0 +1,10 @@
# SortEnum
## Values
| Name | Value |
| ------------ | ------------ |
| `PRICE` | price |
| `THROUGHPUT` | throughput |
| `LATENCY` | latency |
+11
View File
@@ -0,0 +1,11 @@
# WebSearchEngine
The search engine to use for web search.
## Values
| Name | Value |
| -------- | -------- |
| `NATIVE` | native |
| `EXA` | exa |
+9 -9
View File
@@ -3,12 +3,12 @@
## 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 |
+5 -5
View File
@@ -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 |
File diff suppressed because one or more lines are too long
+1
View File
@@ -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 |
+3 -1
View File
@@ -39,7 +39,7 @@ with OpenRouter(
| `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. | | `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. | | `plugins` | List[[components.ChatGenerationParamsPluginUnion](../../components/chatgenerationparamspluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. |
| `route` | [OptionalNullable[components.ChatGenerationParamsRoute]](../../components/chatgenerationparamsroute.md) | :heavy_minus_sign: | Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria. | | `route` | [OptionalNullable[components.Route]](../../components/route.md) | :heavy_minus_sign: | N/A |
| `user` | *Optional[str]* | :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. | | `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 |
@@ -63,6 +63,8 @@ with OpenRouter(
| `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 |
| `debug` | [Optional[components.Debug]](../../components/debug.md) | :heavy_minus_sign: | N/A | | `debug` | [Optional[components.Debug]](../../components/debug.md) | :heavy_minus_sign: | N/A |
| `image_config` | Dict[str, [components.ChatGenerationParamsImageConfig](../../components/chatgenerationparamsimageconfig.md)] | :heavy_minus_sign: | N/A |
| `modalities` | List[[components.Modality](../../components/modality.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. |
### Response ### Response
+10 -10
View File
@@ -35,16 +35,16 @@ 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. |
### Response ### Response
+7 -7
View File
@@ -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
+2 -1
View File
@@ -52,6 +52,8 @@ with OpenRouter(
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | | `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `top_k` | *Optional[float]* | :heavy_minus_sign: | N/A | | | `top_k` | *Optional[float]* | :heavy_minus_sign: | N/A | |
| `image_config` | Dict[str, [components.OpenResponsesRequestImageConfig](../../components/openresponsesrequestimageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. | {<br/>"aspect_ratio": "16:9"<br/>} |
| `modalities` | List[[components.ResponsesOutputModality](../../components/responsesoutputmodality.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [<br/>"text",<br/>"image"<br/>] |
| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `previous_response_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `previous_response_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `prompt` | [OptionalNullable[components.OpenAIResponsesPrompt]](../../components/openairesponsesprompt.md) | :heavy_minus_sign: | N/A | | | `prompt` | [OptionalNullable[components.OpenAIResponsesPrompt]](../../components/openairesponsesprompt.md) | :heavy_minus_sign: | N/A | |
@@ -63,7 +65,6 @@ with OpenRouter(
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
| `provider` | [OptionalNullable[components.OpenResponsesRequestProvider]](../../components/openresponsesrequestprovider.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.OpenResponsesRequestPluginUnion](../../components/openresponsesrequestpluginunion.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. | |
| `route` | [OptionalNullable[components.OpenResponsesRequestRoute]](../../components/openresponsesrequestroute.md) | :heavy_minus_sign: | Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria. | |
| `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. | |
+2 -4
View File
@@ -7,12 +7,10 @@ This example demonstrates how to:
""" """
from openrouter import OpenRouter from openrouter import OpenRouter
from openrouter.utils.oauth_create_sha256_code_challenge import ( from openrouter.utils import (
oauth_create_sha256_code_challenge, oauth_create_sha256_code_challenge,
CreateSHA256CodeChallengeRequest,
)
from openrouter.utils.oauth_create_authorization_url import (
oauth_create_authorization_url, oauth_create_authorization_url,
CreateSHA256CodeChallengeRequest,
CreateAuthorizationUrlRequestWithPKCE, CreateAuthorizationUrlRequestWithPKCE,
) )
+1 -1
View File
@@ -1,6 +1,6 @@
[project] [project]
name = "openrouter" name = "openrouter"
version = "0.0.16" 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"
+2 -2
View File
@@ -3,10 +3,10 @@
import importlib.metadata import importlib.metadata
__title__: str = "openrouter" __title__: str = "openrouter"
__version__: str = "0.0.16" __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.16 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:
+70 -12
View File
@@ -33,7 +33,7 @@ class Chat(BaseSDK):
List[components.ChatGenerationParamsPluginUnionTypedDict], List[components.ChatGenerationParamsPluginUnionTypedDict],
] ]
] = None, ] = None,
route: OptionalNullable[components.ChatGenerationParamsRoute] = UNSET, route: OptionalNullable[components.Route] = UNSET,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
model: Optional[str] = None, model: Optional[str] = None,
@@ -76,6 +76,13 @@ class Chat(BaseSDK):
] = None, ] = None,
top_p: OptionalNullable[float] = UNSET, top_p: OptionalNullable[float] = UNSET,
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None, debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
image_config: Optional[
Union[
Dict[str, components.ChatGenerationParamsImageConfig],
Dict[str, components.ChatGenerationParamsImageConfigTypedDict],
]
] = None,
modalities: Optional[List[components.Modality]] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None, server_url: Optional[str] = None,
timeout_ms: Optional[int] = None, timeout_ms: Optional[int] = None,
@@ -88,7 +95,7 @@ class Chat(BaseSDK):
:param messages: :param messages:
:param provider: When multiple model providers are available, optionally indicate your routing preference. :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 plugins: Plugins you want to enable for this request, including their settings.
:param route: Routing strategy for multiple models: \"fallback\" (default) uses secondary models as backups, \"sort\" sorts all endpoints together by routing criteria. :param route:
:param user: :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 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:
@@ -112,6 +119,8 @@ class Chat(BaseSDK):
:param tools: :param tools:
:param top_p: :param top_p:
:param debug: :param debug:
:param image_config:
:param modalities:
: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
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -136,7 +145,7 @@ class Chat(BaseSDK):
List[components.ChatGenerationParamsPluginUnionTypedDict], List[components.ChatGenerationParamsPluginUnionTypedDict],
] ]
] = None, ] = None,
route: OptionalNullable[components.ChatGenerationParamsRoute] = UNSET, route: OptionalNullable[components.Route] = UNSET,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
model: Optional[str] = None, model: Optional[str] = None,
@@ -179,6 +188,13 @@ class Chat(BaseSDK):
] = None, ] = None,
top_p: OptionalNullable[float] = UNSET, top_p: OptionalNullable[float] = UNSET,
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None, debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
image_config: Optional[
Union[
Dict[str, components.ChatGenerationParamsImageConfig],
Dict[str, components.ChatGenerationParamsImageConfigTypedDict],
]
] = None,
modalities: Optional[List[components.Modality]] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None, server_url: Optional[str] = None,
timeout_ms: Optional[int] = None, timeout_ms: Optional[int] = None,
@@ -191,7 +207,7 @@ class Chat(BaseSDK):
:param messages: :param messages:
:param provider: When multiple model providers are available, optionally indicate your routing preference. :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 plugins: Plugins you want to enable for this request, including their settings.
:param route: Routing strategy for multiple models: \"fallback\" (default) uses secondary models as backups, \"sort\" sorts all endpoints together by routing criteria. :param route:
:param user: :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 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:
@@ -215,6 +231,8 @@ class Chat(BaseSDK):
:param tools: :param tools:
:param top_p: :param top_p:
:param debug: :param debug:
:param image_config:
:param modalities:
: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
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -238,7 +256,7 @@ class Chat(BaseSDK):
List[components.ChatGenerationParamsPluginUnionTypedDict], List[components.ChatGenerationParamsPluginUnionTypedDict],
] ]
] = None, ] = None,
route: OptionalNullable[components.ChatGenerationParamsRoute] = UNSET, route: OptionalNullable[components.Route] = UNSET,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
model: Optional[str] = None, model: Optional[str] = None,
@@ -281,6 +299,13 @@ class Chat(BaseSDK):
] = None, ] = None,
top_p: OptionalNullable[float] = UNSET, top_p: OptionalNullable[float] = UNSET,
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None, debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
image_config: Optional[
Union[
Dict[str, components.ChatGenerationParamsImageConfig],
Dict[str, components.ChatGenerationParamsImageConfigTypedDict],
]
] = None,
modalities: Optional[List[components.Modality]] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None, server_url: Optional[str] = None,
timeout_ms: Optional[int] = None, timeout_ms: Optional[int] = None,
@@ -293,7 +318,7 @@ class Chat(BaseSDK):
:param messages: :param messages:
:param provider: When multiple model providers are available, optionally indicate your routing preference. :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 plugins: Plugins you want to enable for this request, including their settings.
:param route: Routing strategy for multiple models: \"fallback\" (default) uses secondary models as backups, \"sort\" sorts all endpoints together by routing criteria. :param route:
:param user: :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 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:
@@ -317,6 +342,8 @@ class Chat(BaseSDK):
:param tools: :param tools:
:param top_p: :param top_p:
:param debug: :param debug:
:param image_config:
:param modalities:
: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
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -374,6 +401,8 @@ class Chat(BaseSDK):
), ),
top_p=top_p, top_p=top_p,
debug=utils.get_pydantic_model(debug, Optional[components.Debug]), debug=utils.get_pydantic_model(debug, Optional[components.Debug]),
image_config=image_config,
modalities=modalities,
) )
req = self._build_request( req = self._build_request(
@@ -480,7 +509,7 @@ class Chat(BaseSDK):
List[components.ChatGenerationParamsPluginUnionTypedDict], List[components.ChatGenerationParamsPluginUnionTypedDict],
] ]
] = None, ] = None,
route: OptionalNullable[components.ChatGenerationParamsRoute] = UNSET, route: OptionalNullable[components.Route] = UNSET,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
model: Optional[str] = None, model: Optional[str] = None,
@@ -523,6 +552,13 @@ class Chat(BaseSDK):
] = None, ] = None,
top_p: OptionalNullable[float] = UNSET, top_p: OptionalNullable[float] = UNSET,
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None, debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
image_config: Optional[
Union[
Dict[str, components.ChatGenerationParamsImageConfig],
Dict[str, components.ChatGenerationParamsImageConfigTypedDict],
]
] = None,
modalities: Optional[List[components.Modality]] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None, server_url: Optional[str] = None,
timeout_ms: Optional[int] = None, timeout_ms: Optional[int] = None,
@@ -535,7 +571,7 @@ class Chat(BaseSDK):
:param messages: :param messages:
:param provider: When multiple model providers are available, optionally indicate your routing preference. :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 plugins: Plugins you want to enable for this request, including their settings.
:param route: Routing strategy for multiple models: \"fallback\" (default) uses secondary models as backups, \"sort\" sorts all endpoints together by routing criteria. :param route:
:param user: :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 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:
@@ -559,6 +595,8 @@ class Chat(BaseSDK):
:param tools: :param tools:
:param top_p: :param top_p:
:param debug: :param debug:
:param image_config:
:param modalities:
: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
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -583,7 +621,7 @@ class Chat(BaseSDK):
List[components.ChatGenerationParamsPluginUnionTypedDict], List[components.ChatGenerationParamsPluginUnionTypedDict],
] ]
] = None, ] = None,
route: OptionalNullable[components.ChatGenerationParamsRoute] = UNSET, route: OptionalNullable[components.Route] = UNSET,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
model: Optional[str] = None, model: Optional[str] = None,
@@ -626,6 +664,13 @@ class Chat(BaseSDK):
] = None, ] = None,
top_p: OptionalNullable[float] = UNSET, top_p: OptionalNullable[float] = UNSET,
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None, debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
image_config: Optional[
Union[
Dict[str, components.ChatGenerationParamsImageConfig],
Dict[str, components.ChatGenerationParamsImageConfigTypedDict],
]
] = None,
modalities: Optional[List[components.Modality]] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None, server_url: Optional[str] = None,
timeout_ms: Optional[int] = None, timeout_ms: Optional[int] = None,
@@ -638,7 +683,7 @@ class Chat(BaseSDK):
:param messages: :param messages:
:param provider: When multiple model providers are available, optionally indicate your routing preference. :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 plugins: Plugins you want to enable for this request, including their settings.
:param route: Routing strategy for multiple models: \"fallback\" (default) uses secondary models as backups, \"sort\" sorts all endpoints together by routing criteria. :param route:
:param user: :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 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:
@@ -662,6 +707,8 @@ class Chat(BaseSDK):
:param tools: :param tools:
:param top_p: :param top_p:
:param debug: :param debug:
:param image_config:
:param modalities:
: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
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -685,7 +732,7 @@ class Chat(BaseSDK):
List[components.ChatGenerationParamsPluginUnionTypedDict], List[components.ChatGenerationParamsPluginUnionTypedDict],
] ]
] = None, ] = None,
route: OptionalNullable[components.ChatGenerationParamsRoute] = UNSET, route: OptionalNullable[components.Route] = UNSET,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
model: Optional[str] = None, model: Optional[str] = None,
@@ -728,6 +775,13 @@ class Chat(BaseSDK):
] = None, ] = None,
top_p: OptionalNullable[float] = UNSET, top_p: OptionalNullable[float] = UNSET,
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None, debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
image_config: Optional[
Union[
Dict[str, components.ChatGenerationParamsImageConfig],
Dict[str, components.ChatGenerationParamsImageConfigTypedDict],
]
] = None,
modalities: Optional[List[components.Modality]] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None, server_url: Optional[str] = None,
timeout_ms: Optional[int] = None, timeout_ms: Optional[int] = None,
@@ -740,7 +794,7 @@ class Chat(BaseSDK):
:param messages: :param messages:
:param provider: When multiple model providers are available, optionally indicate your routing preference. :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 plugins: Plugins you want to enable for this request, including their settings.
:param route: Routing strategy for multiple models: \"fallback\" (default) uses secondary models as backups, \"sort\" sorts all endpoints together by routing criteria. :param route:
:param user: :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 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:
@@ -764,6 +818,8 @@ class Chat(BaseSDK):
:param tools: :param tools:
:param top_p: :param top_p:
:param debug: :param debug:
:param image_config:
:param modalities:
: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
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -821,6 +877,8 @@ class Chat(BaseSDK):
), ),
top_p=top_p, top_p=top_p,
debug=utils.get_pydantic_model(debug, Optional[components.Debug]), debug=utils.get_pydantic_model(debug, Optional[components.Debug]),
image_config=image_config,
modalities=modalities,
) )
req = self._build_request_async( req = self._build_request_async(
+251 -51
View File
@@ -7,6 +7,17 @@ import sys
if TYPE_CHECKING: if TYPE_CHECKING:
from ._schema0 import Schema0, Schema0Enum, Schema0TypedDict 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,
@@ -27,12 +38,12 @@ if TYPE_CHECKING:
from .chatgenerationparams import ( from .chatgenerationparams import (
ChatGenerationParams, ChatGenerationParams,
ChatGenerationParamsDataCollection, ChatGenerationParamsDataCollection,
ChatGenerationParamsEngine, ChatGenerationParamsImageConfig,
ChatGenerationParamsImageConfigTypedDict,
ChatGenerationParamsMaxPrice, ChatGenerationParamsMaxPrice,
ChatGenerationParamsMaxPriceTypedDict, ChatGenerationParamsMaxPriceTypedDict,
ChatGenerationParamsPdf, ChatGenerationParamsPluginAutoRouter,
ChatGenerationParamsPdfEngine, ChatGenerationParamsPluginAutoRouterTypedDict,
ChatGenerationParamsPdfTypedDict,
ChatGenerationParamsPluginFileParser, ChatGenerationParamsPluginFileParser,
ChatGenerationParamsPluginFileParserTypedDict, ChatGenerationParamsPluginFileParserTypedDict,
ChatGenerationParamsPluginModeration, ChatGenerationParamsPluginModeration,
@@ -43,6 +54,14 @@ if TYPE_CHECKING:
ChatGenerationParamsPluginUnionTypedDict, ChatGenerationParamsPluginUnionTypedDict,
ChatGenerationParamsPluginWeb, ChatGenerationParamsPluginWeb,
ChatGenerationParamsPluginWebTypedDict, ChatGenerationParamsPluginWebTypedDict,
ChatGenerationParamsPreferredMaxLatency,
ChatGenerationParamsPreferredMaxLatencyTypedDict,
ChatGenerationParamsPreferredMaxLatencyUnion,
ChatGenerationParamsPreferredMaxLatencyUnionTypedDict,
ChatGenerationParamsPreferredMinThroughput,
ChatGenerationParamsPreferredMinThroughputTypedDict,
ChatGenerationParamsPreferredMinThroughputUnion,
ChatGenerationParamsPreferredMinThroughputUnionTypedDict,
ChatGenerationParamsProvider, ChatGenerationParamsProvider,
ChatGenerationParamsProviderTypedDict, ChatGenerationParamsProviderTypedDict,
ChatGenerationParamsResponseFormatJSONObject, ChatGenerationParamsResponseFormatJSONObject,
@@ -53,17 +72,21 @@ if TYPE_CHECKING:
ChatGenerationParamsResponseFormatTextTypedDict, ChatGenerationParamsResponseFormatTextTypedDict,
ChatGenerationParamsResponseFormatUnion, ChatGenerationParamsResponseFormatUnion,
ChatGenerationParamsResponseFormatUnionTypedDict, ChatGenerationParamsResponseFormatUnionTypedDict,
ChatGenerationParamsRoute,
ChatGenerationParamsStop, ChatGenerationParamsStop,
ChatGenerationParamsStopTypedDict, ChatGenerationParamsStopTypedDict,
ChatGenerationParamsTypedDict, ChatGenerationParamsTypedDict,
Debug, Debug,
DebugTypedDict, DebugTypedDict,
Effort, Effort,
Engine,
Modality,
Pdf,
PdfEngine,
PdfTypedDict,
Quantizations, Quantizations,
Reasoning, Reasoning,
ReasoningTypedDict, ReasoningTypedDict,
Sort, Route,
) )
from .chatgenerationtokenusage import ( from .chatgenerationtokenusage import (
ChatGenerationTokenUsage, ChatGenerationTokenUsage,
@@ -444,21 +467,24 @@ if TYPE_CHECKING:
OpenResponsesReasoningSummaryTextDoneEventTypedDict, OpenResponsesReasoningSummaryTextDoneEventTypedDict,
) )
from .openresponsesrequest import ( from .openresponsesrequest import (
IDAutoRouter,
IDFileParser, IDFileParser,
IDModeration, IDModeration,
IDResponseHealing, IDResponseHealing,
IDWeb, IDWeb,
Ignore,
IgnoreTypedDict,
Only,
OnlyTypedDict,
OpenResponsesRequest, OpenResponsesRequest,
OpenResponsesRequestEngine, OpenResponsesRequestIgnore,
OpenResponsesRequestIgnoreTypedDict,
OpenResponsesRequestImageConfig,
OpenResponsesRequestImageConfigTypedDict,
OpenResponsesRequestMaxPrice, OpenResponsesRequestMaxPrice,
OpenResponsesRequestMaxPriceTypedDict, OpenResponsesRequestMaxPriceTypedDict,
OpenResponsesRequestPdf, OpenResponsesRequestOnly,
OpenResponsesRequestPdfEngine, OpenResponsesRequestOnlyTypedDict,
OpenResponsesRequestPdfTypedDict, OpenResponsesRequestOrder,
OpenResponsesRequestOrderTypedDict,
OpenResponsesRequestPluginAutoRouter,
OpenResponsesRequestPluginAutoRouterTypedDict,
OpenResponsesRequestPluginFileParser, OpenResponsesRequestPluginFileParser,
OpenResponsesRequestPluginFileParserTypedDict, OpenResponsesRequestPluginFileParserTypedDict,
OpenResponsesRequestPluginModeration, OpenResponsesRequestPluginModeration,
@@ -471,15 +497,14 @@ if TYPE_CHECKING:
OpenResponsesRequestPluginWebTypedDict, OpenResponsesRequestPluginWebTypedDict,
OpenResponsesRequestProvider, OpenResponsesRequestProvider,
OpenResponsesRequestProviderTypedDict, OpenResponsesRequestProviderTypedDict,
OpenResponsesRequestRoute, OpenResponsesRequestSort,
OpenResponsesRequestSortTypedDict,
OpenResponsesRequestToolFunction, OpenResponsesRequestToolFunction,
OpenResponsesRequestToolFunctionTypedDict, OpenResponsesRequestToolFunctionTypedDict,
OpenResponsesRequestToolUnion, OpenResponsesRequestToolUnion,
OpenResponsesRequestToolUnionTypedDict, OpenResponsesRequestToolUnionTypedDict,
OpenResponsesRequestType, OpenResponsesRequestType,
OpenResponsesRequestTypedDict, OpenResponsesRequestTypedDict,
Order,
OrderTypedDict,
ServiceTier, ServiceTier,
Truncation, Truncation,
) )
@@ -613,13 +638,57 @@ if TYPE_CHECKING:
PaymentRequiredResponseErrorData, PaymentRequiredResponseErrorData,
PaymentRequiredResponseErrorDataTypedDict, PaymentRequiredResponseErrorDataTypedDict,
) )
from .pdfparserengine import PDFParserEngine
from .pdfparseroptions import PDFParserOptions, PDFParserOptionsTypedDict
from .percentilelatencycutoffs import (
PercentileLatencyCutoffs,
PercentileLatencyCutoffsTypedDict,
)
from .percentilestats import PercentileStats, PercentileStatsTypedDict
from .percentilethroughputcutoffs import (
PercentileThroughputCutoffs,
PercentileThroughputCutoffsTypedDict,
)
from .perrequestlimits import PerRequestLimits, PerRequestLimitsTypedDict from .perrequestlimits import PerRequestLimits, PerRequestLimitsTypedDict
from .preferredmaxlatency import PreferredMaxLatency, PreferredMaxLatencyTypedDict
from .preferredminthroughput import (
PreferredMinThroughput,
PreferredMinThroughputTypedDict,
)
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,
@@ -728,6 +797,7 @@ if TYPE_CHECKING:
) )
from .responsesoutputitemreasoning import ( from .responsesoutputitemreasoning import (
ResponsesOutputItemReasoning, ResponsesOutputItemReasoning,
ResponsesOutputItemReasoningFormat,
ResponsesOutputItemReasoningStatusCompleted, ResponsesOutputItemReasoningStatusCompleted,
ResponsesOutputItemReasoningStatusInProgress, ResponsesOutputItemReasoningStatusInProgress,
ResponsesOutputItemReasoningStatusIncomplete, ResponsesOutputItemReasoningStatusIncomplete,
@@ -749,6 +819,7 @@ if TYPE_CHECKING:
ResponsesOutputMessageType, ResponsesOutputMessageType,
ResponsesOutputMessageTypedDict, ResponsesOutputMessageTypedDict,
) )
from .responsesoutputmodality import ResponsesOutputModality
from .responsessearchcontextsize import ResponsesSearchContextSize from .responsessearchcontextsize import ResponsesSearchContextSize
from .responseswebsearchcalloutput import ( from .responseswebsearchcalloutput import (
ResponsesWebSearchCallOutput, ResponsesWebSearchCallOutput,
@@ -809,6 +880,7 @@ if TYPE_CHECKING:
UserMessageContentTypedDict, UserMessageContentTypedDict,
UserMessageTypedDict, UserMessageTypedDict,
) )
from .websearchengine import WebSearchEngine
from .websearchpreviewtooluserlocation import ( from .websearchpreviewtooluserlocation import (
WebSearchPreviewToolUserLocation, WebSearchPreviewToolUserLocation,
WebSearchPreviewToolUserLocationType, WebSearchPreviewToolUserLocationType,
@@ -835,12 +907,12 @@ __all__ = [
"ChatErrorErrorTypedDict", "ChatErrorErrorTypedDict",
"ChatGenerationParams", "ChatGenerationParams",
"ChatGenerationParamsDataCollection", "ChatGenerationParamsDataCollection",
"ChatGenerationParamsEngine", "ChatGenerationParamsImageConfig",
"ChatGenerationParamsImageConfigTypedDict",
"ChatGenerationParamsMaxPrice", "ChatGenerationParamsMaxPrice",
"ChatGenerationParamsMaxPriceTypedDict", "ChatGenerationParamsMaxPriceTypedDict",
"ChatGenerationParamsPdf", "ChatGenerationParamsPluginAutoRouter",
"ChatGenerationParamsPdfEngine", "ChatGenerationParamsPluginAutoRouterTypedDict",
"ChatGenerationParamsPdfTypedDict",
"ChatGenerationParamsPluginFileParser", "ChatGenerationParamsPluginFileParser",
"ChatGenerationParamsPluginFileParserTypedDict", "ChatGenerationParamsPluginFileParserTypedDict",
"ChatGenerationParamsPluginModeration", "ChatGenerationParamsPluginModeration",
@@ -851,6 +923,14 @@ __all__ = [
"ChatGenerationParamsPluginUnionTypedDict", "ChatGenerationParamsPluginUnionTypedDict",
"ChatGenerationParamsPluginWeb", "ChatGenerationParamsPluginWeb",
"ChatGenerationParamsPluginWebTypedDict", "ChatGenerationParamsPluginWebTypedDict",
"ChatGenerationParamsPreferredMaxLatency",
"ChatGenerationParamsPreferredMaxLatencyTypedDict",
"ChatGenerationParamsPreferredMaxLatencyUnion",
"ChatGenerationParamsPreferredMaxLatencyUnionTypedDict",
"ChatGenerationParamsPreferredMinThroughput",
"ChatGenerationParamsPreferredMinThroughputTypedDict",
"ChatGenerationParamsPreferredMinThroughputUnion",
"ChatGenerationParamsPreferredMinThroughputUnionTypedDict",
"ChatGenerationParamsProvider", "ChatGenerationParamsProvider",
"ChatGenerationParamsProviderTypedDict", "ChatGenerationParamsProviderTypedDict",
"ChatGenerationParamsResponseFormatJSONObject", "ChatGenerationParamsResponseFormatJSONObject",
@@ -861,7 +941,6 @@ __all__ = [
"ChatGenerationParamsResponseFormatTextTypedDict", "ChatGenerationParamsResponseFormatTextTypedDict",
"ChatGenerationParamsResponseFormatUnion", "ChatGenerationParamsResponseFormatUnion",
"ChatGenerationParamsResponseFormatUnionTypedDict", "ChatGenerationParamsResponseFormatUnionTypedDict",
"ChatGenerationParamsRoute",
"ChatGenerationParamsStop", "ChatGenerationParamsStop",
"ChatGenerationParamsStopTypedDict", "ChatGenerationParamsStopTypedDict",
"ChatGenerationParamsTypedDict", "ChatGenerationParamsTypedDict",
@@ -954,6 +1033,7 @@ __all__ = [
"EdgeNetworkTimeoutResponseErrorDataTypedDict", "EdgeNetworkTimeoutResponseErrorDataTypedDict",
"Effort", "Effort",
"EndpointStatus", "EndpointStatus",
"Engine",
"FileCitation", "FileCitation",
"FileCitationType", "FileCitationType",
"FileCitationTypedDict", "FileCitationTypedDict",
@@ -962,12 +1042,11 @@ __all__ = [
"FilePathTypedDict", "FilePathTypedDict",
"ForbiddenResponseErrorData", "ForbiddenResponseErrorData",
"ForbiddenResponseErrorDataTypedDict", "ForbiddenResponseErrorDataTypedDict",
"IDAutoRouter",
"IDFileParser", "IDFileParser",
"IDModeration", "IDModeration",
"IDResponseHealing", "IDResponseHealing",
"IDWeb", "IDWeb",
"Ignore",
"IgnoreTypedDict",
"ImageGenerationStatus", "ImageGenerationStatus",
"ImageURL", "ImageURL",
"ImageURLTypedDict", "ImageURLTypedDict",
@@ -987,6 +1066,7 @@ __all__ = [
"MessageDeveloper", "MessageDeveloper",
"MessageDeveloperTypedDict", "MessageDeveloperTypedDict",
"MessageTypedDict", "MessageTypedDict",
"Modality",
"Model", "Model",
"ModelArchitecture", "ModelArchitecture",
"ModelArchitectureInstructType", "ModelArchitectureInstructType",
@@ -1006,8 +1086,6 @@ __all__ = [
"NotFoundResponseErrorData", "NotFoundResponseErrorData",
"NotFoundResponseErrorDataTypedDict", "NotFoundResponseErrorDataTypedDict",
"Object", "Object",
"Only",
"OnlyTypedDict",
"OpenAIResponsesAnnotation", "OpenAIResponsesAnnotation",
"OpenAIResponsesAnnotationTypedDict", "OpenAIResponsesAnnotationTypedDict",
"OpenAIResponsesIncludable", "OpenAIResponsesIncludable",
@@ -1153,12 +1231,18 @@ __all__ = [
"OpenResponsesReasoningType", "OpenResponsesReasoningType",
"OpenResponsesReasoningTypedDict", "OpenResponsesReasoningTypedDict",
"OpenResponsesRequest", "OpenResponsesRequest",
"OpenResponsesRequestEngine", "OpenResponsesRequestIgnore",
"OpenResponsesRequestIgnoreTypedDict",
"OpenResponsesRequestImageConfig",
"OpenResponsesRequestImageConfigTypedDict",
"OpenResponsesRequestMaxPrice", "OpenResponsesRequestMaxPrice",
"OpenResponsesRequestMaxPriceTypedDict", "OpenResponsesRequestMaxPriceTypedDict",
"OpenResponsesRequestPdf", "OpenResponsesRequestOnly",
"OpenResponsesRequestPdfEngine", "OpenResponsesRequestOnlyTypedDict",
"OpenResponsesRequestPdfTypedDict", "OpenResponsesRequestOrder",
"OpenResponsesRequestOrderTypedDict",
"OpenResponsesRequestPluginAutoRouter",
"OpenResponsesRequestPluginAutoRouterTypedDict",
"OpenResponsesRequestPluginFileParser", "OpenResponsesRequestPluginFileParser",
"OpenResponsesRequestPluginFileParserTypedDict", "OpenResponsesRequestPluginFileParserTypedDict",
"OpenResponsesRequestPluginModeration", "OpenResponsesRequestPluginModeration",
@@ -1171,7 +1255,8 @@ __all__ = [
"OpenResponsesRequestPluginWebTypedDict", "OpenResponsesRequestPluginWebTypedDict",
"OpenResponsesRequestProvider", "OpenResponsesRequestProvider",
"OpenResponsesRequestProviderTypedDict", "OpenResponsesRequestProviderTypedDict",
"OpenResponsesRequestRoute", "OpenResponsesRequestSort",
"OpenResponsesRequestSortTypedDict",
"OpenResponsesRequestToolFunction", "OpenResponsesRequestToolFunction",
"OpenResponsesRequestToolFunctionTypedDict", "OpenResponsesRequestToolFunctionTypedDict",
"OpenResponsesRequestToolUnion", "OpenResponsesRequestToolUnion",
@@ -1237,8 +1322,6 @@ __all__ = [
"OpenResponsesWebSearchToolFiltersTypedDict", "OpenResponsesWebSearchToolFiltersTypedDict",
"OpenResponsesWebSearchToolType", "OpenResponsesWebSearchToolType",
"OpenResponsesWebSearchToolTypedDict", "OpenResponsesWebSearchToolTypedDict",
"Order",
"OrderTypedDict",
"OutputItemImageGenerationCall", "OutputItemImageGenerationCall",
"OutputItemImageGenerationCallType", "OutputItemImageGenerationCallType",
"OutputItemImageGenerationCallTypedDict", "OutputItemImageGenerationCallTypedDict",
@@ -1256,17 +1339,34 @@ __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",
"PaymentRequiredResponseErrorDataTypedDict", "PaymentRequiredResponseErrorDataTypedDict",
"Pdf",
"PdfEngine",
"PdfTypedDict",
"PerRequestLimits", "PerRequestLimits",
"PerRequestLimitsTypedDict", "PerRequestLimitsTypedDict",
"PercentileLatencyCutoffs",
"PercentileLatencyCutoffsTypedDict",
"PercentileStats",
"PercentileStatsTypedDict",
"PercentileThroughputCutoffs",
"PercentileThroughputCutoffsTypedDict",
"PreferredMaxLatency",
"PreferredMaxLatencyTypedDict",
"PreferredMinThroughput",
"PreferredMinThroughputTypedDict",
"Pricing", "Pricing",
"PricingTypedDict", "PricingTypedDict",
"Prompt", "Prompt",
@@ -1276,7 +1376,30 @@ __all__ = [
"ProviderName", "ProviderName",
"ProviderOverloadedResponseErrorData", "ProviderOverloadedResponseErrorData",
"ProviderOverloadedResponseErrorDataTypedDict", "ProviderOverloadedResponseErrorDataTypedDict",
"ProviderPreferences",
"ProviderPreferencesIgnore",
"ProviderPreferencesIgnoreTypedDict",
"ProviderPreferencesMaxPrice",
"ProviderPreferencesMaxPriceTypedDict",
"ProviderPreferencesOnly",
"ProviderPreferencesOnlyTypedDict",
"ProviderPreferencesOrder",
"ProviderPreferencesOrderTypedDict",
"ProviderPreferencesPartition",
"ProviderPreferencesProviderSort",
"ProviderPreferencesProviderSortConfig",
"ProviderPreferencesProviderSortConfigTypedDict",
"ProviderPreferencesSortUnion",
"ProviderPreferencesSortUnionTypedDict",
"ProviderPreferencesTypedDict",
"ProviderSort", "ProviderSort",
"ProviderSortConfig",
"ProviderSortConfigEnum",
"ProviderSortConfigTypedDict",
"ProviderSortConfigUnion",
"ProviderSortConfigUnionTypedDict",
"ProviderSortUnion",
"ProviderSortUnionTypedDict",
"PublicEndpoint", "PublicEndpoint",
"PublicEndpointQuantization", "PublicEndpointQuantization",
"PublicEndpointTypedDict", "PublicEndpointTypedDict",
@@ -1351,6 +1474,7 @@ __all__ = [
"ResponsesOutputItemFunctionCallType", "ResponsesOutputItemFunctionCallType",
"ResponsesOutputItemFunctionCallTypedDict", "ResponsesOutputItemFunctionCallTypedDict",
"ResponsesOutputItemReasoning", "ResponsesOutputItemReasoning",
"ResponsesOutputItemReasoningFormat",
"ResponsesOutputItemReasoningStatusCompleted", "ResponsesOutputItemReasoningStatusCompleted",
"ResponsesOutputItemReasoningStatusInProgress", "ResponsesOutputItemReasoningStatusInProgress",
"ResponsesOutputItemReasoningStatusIncomplete", "ResponsesOutputItemReasoningStatusIncomplete",
@@ -1370,6 +1494,7 @@ __all__ = [
"ResponsesOutputMessageStatusUnionTypedDict", "ResponsesOutputMessageStatusUnionTypedDict",
"ResponsesOutputMessageType", "ResponsesOutputMessageType",
"ResponsesOutputMessageTypedDict", "ResponsesOutputMessageTypedDict",
"ResponsesOutputModality",
"ResponsesSearchContextSize", "ResponsesSearchContextSize",
"ResponsesWebSearchCallOutput", "ResponsesWebSearchCallOutput",
"ResponsesWebSearchCallOutputType", "ResponsesWebSearchCallOutputType",
@@ -1377,15 +1502,25 @@ __all__ = [
"ResponsesWebSearchUserLocation", "ResponsesWebSearchUserLocation",
"ResponsesWebSearchUserLocationType", "ResponsesWebSearchUserLocationType",
"ResponsesWebSearchUserLocationTypedDict", "ResponsesWebSearchUserLocationTypedDict",
"Route",
"Schema0", "Schema0",
"Schema0Enum", "Schema0Enum",
"Schema0TypedDict", "Schema0TypedDict",
"Schema3",
"Schema3ReasoningEncrypted",
"Schema3ReasoningEncryptedTypedDict",
"Schema3ReasoningSummary",
"Schema3ReasoningSummaryTypedDict",
"Schema3ReasoningText",
"Schema3ReasoningTextTypedDict",
"Schema3TypedDict",
"Schema5",
"Security", "Security",
"SecurityTypedDict", "SecurityTypedDict",
"ServiceTier", "ServiceTier",
"ServiceUnavailableResponseErrorData", "ServiceUnavailableResponseErrorData",
"ServiceUnavailableResponseErrorDataTypedDict", "ServiceUnavailableResponseErrorDataTypedDict",
"Sort", "SortEnum",
"StreamOptions", "StreamOptions",
"StreamOptionsTypedDict", "StreamOptionsTypedDict",
"SystemMessage", "SystemMessage",
@@ -1446,6 +1581,7 @@ __all__ = [
"VideoURL1TypedDict", "VideoURL1TypedDict",
"VideoURL2", "VideoURL2",
"VideoURL2TypedDict", "VideoURL2TypedDict",
"WebSearchEngine",
"WebSearchPreviewToolUserLocation", "WebSearchPreviewToolUserLocation",
"WebSearchPreviewToolUserLocationType", "WebSearchPreviewToolUserLocationType",
"WebSearchPreviewToolUserLocationTypedDict", "WebSearchPreviewToolUserLocationTypedDict",
@@ -1456,6 +1592,15 @@ _dynamic_imports: dict[str, str] = {
"Schema0": "._schema0", "Schema0": "._schema0",
"Schema0Enum": "._schema0", "Schema0Enum": "._schema0",
"Schema0TypedDict": "._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",
@@ -1473,12 +1618,12 @@ _dynamic_imports: dict[str, str] = {
"CodeTypedDict": ".chaterror", "CodeTypedDict": ".chaterror",
"ChatGenerationParams": ".chatgenerationparams", "ChatGenerationParams": ".chatgenerationparams",
"ChatGenerationParamsDataCollection": ".chatgenerationparams", "ChatGenerationParamsDataCollection": ".chatgenerationparams",
"ChatGenerationParamsEngine": ".chatgenerationparams", "ChatGenerationParamsImageConfig": ".chatgenerationparams",
"ChatGenerationParamsImageConfigTypedDict": ".chatgenerationparams",
"ChatGenerationParamsMaxPrice": ".chatgenerationparams", "ChatGenerationParamsMaxPrice": ".chatgenerationparams",
"ChatGenerationParamsMaxPriceTypedDict": ".chatgenerationparams", "ChatGenerationParamsMaxPriceTypedDict": ".chatgenerationparams",
"ChatGenerationParamsPdf": ".chatgenerationparams", "ChatGenerationParamsPluginAutoRouter": ".chatgenerationparams",
"ChatGenerationParamsPdfEngine": ".chatgenerationparams", "ChatGenerationParamsPluginAutoRouterTypedDict": ".chatgenerationparams",
"ChatGenerationParamsPdfTypedDict": ".chatgenerationparams",
"ChatGenerationParamsPluginFileParser": ".chatgenerationparams", "ChatGenerationParamsPluginFileParser": ".chatgenerationparams",
"ChatGenerationParamsPluginFileParserTypedDict": ".chatgenerationparams", "ChatGenerationParamsPluginFileParserTypedDict": ".chatgenerationparams",
"ChatGenerationParamsPluginModeration": ".chatgenerationparams", "ChatGenerationParamsPluginModeration": ".chatgenerationparams",
@@ -1489,6 +1634,14 @@ _dynamic_imports: dict[str, str] = {
"ChatGenerationParamsPluginUnionTypedDict": ".chatgenerationparams", "ChatGenerationParamsPluginUnionTypedDict": ".chatgenerationparams",
"ChatGenerationParamsPluginWeb": ".chatgenerationparams", "ChatGenerationParamsPluginWeb": ".chatgenerationparams",
"ChatGenerationParamsPluginWebTypedDict": ".chatgenerationparams", "ChatGenerationParamsPluginWebTypedDict": ".chatgenerationparams",
"ChatGenerationParamsPreferredMaxLatency": ".chatgenerationparams",
"ChatGenerationParamsPreferredMaxLatencyTypedDict": ".chatgenerationparams",
"ChatGenerationParamsPreferredMaxLatencyUnion": ".chatgenerationparams",
"ChatGenerationParamsPreferredMaxLatencyUnionTypedDict": ".chatgenerationparams",
"ChatGenerationParamsPreferredMinThroughput": ".chatgenerationparams",
"ChatGenerationParamsPreferredMinThroughputTypedDict": ".chatgenerationparams",
"ChatGenerationParamsPreferredMinThroughputUnion": ".chatgenerationparams",
"ChatGenerationParamsPreferredMinThroughputUnionTypedDict": ".chatgenerationparams",
"ChatGenerationParamsProvider": ".chatgenerationparams", "ChatGenerationParamsProvider": ".chatgenerationparams",
"ChatGenerationParamsProviderTypedDict": ".chatgenerationparams", "ChatGenerationParamsProviderTypedDict": ".chatgenerationparams",
"ChatGenerationParamsResponseFormatJSONObject": ".chatgenerationparams", "ChatGenerationParamsResponseFormatJSONObject": ".chatgenerationparams",
@@ -1499,17 +1652,21 @@ _dynamic_imports: dict[str, str] = {
"ChatGenerationParamsResponseFormatTextTypedDict": ".chatgenerationparams", "ChatGenerationParamsResponseFormatTextTypedDict": ".chatgenerationparams",
"ChatGenerationParamsResponseFormatUnion": ".chatgenerationparams", "ChatGenerationParamsResponseFormatUnion": ".chatgenerationparams",
"ChatGenerationParamsResponseFormatUnionTypedDict": ".chatgenerationparams", "ChatGenerationParamsResponseFormatUnionTypedDict": ".chatgenerationparams",
"ChatGenerationParamsRoute": ".chatgenerationparams",
"ChatGenerationParamsStop": ".chatgenerationparams", "ChatGenerationParamsStop": ".chatgenerationparams",
"ChatGenerationParamsStopTypedDict": ".chatgenerationparams", "ChatGenerationParamsStopTypedDict": ".chatgenerationparams",
"ChatGenerationParamsTypedDict": ".chatgenerationparams", "ChatGenerationParamsTypedDict": ".chatgenerationparams",
"Debug": ".chatgenerationparams", "Debug": ".chatgenerationparams",
"DebugTypedDict": ".chatgenerationparams", "DebugTypedDict": ".chatgenerationparams",
"Effort": ".chatgenerationparams", "Effort": ".chatgenerationparams",
"Engine": ".chatgenerationparams",
"Modality": ".chatgenerationparams",
"Pdf": ".chatgenerationparams",
"PdfEngine": ".chatgenerationparams",
"PdfTypedDict": ".chatgenerationparams",
"Quantizations": ".chatgenerationparams", "Quantizations": ".chatgenerationparams",
"Reasoning": ".chatgenerationparams", "Reasoning": ".chatgenerationparams",
"ReasoningTypedDict": ".chatgenerationparams", "ReasoningTypedDict": ".chatgenerationparams",
"Sort": ".chatgenerationparams", "Route": ".chatgenerationparams",
"ChatGenerationTokenUsage": ".chatgenerationtokenusage", "ChatGenerationTokenUsage": ".chatgenerationtokenusage",
"ChatGenerationTokenUsageTypedDict": ".chatgenerationtokenusage", "ChatGenerationTokenUsageTypedDict": ".chatgenerationtokenusage",
"CompletionTokensDetails": ".chatgenerationtokenusage", "CompletionTokensDetails": ".chatgenerationtokenusage",
@@ -1801,21 +1958,24 @@ _dynamic_imports: dict[str, str] = {
"OpenResponsesReasoningSummaryTextDoneEvent": ".openresponsesreasoningsummarytextdoneevent", "OpenResponsesReasoningSummaryTextDoneEvent": ".openresponsesreasoningsummarytextdoneevent",
"OpenResponsesReasoningSummaryTextDoneEventType": ".openresponsesreasoningsummarytextdoneevent", "OpenResponsesReasoningSummaryTextDoneEventType": ".openresponsesreasoningsummarytextdoneevent",
"OpenResponsesReasoningSummaryTextDoneEventTypedDict": ".openresponsesreasoningsummarytextdoneevent", "OpenResponsesReasoningSummaryTextDoneEventTypedDict": ".openresponsesreasoningsummarytextdoneevent",
"IDAutoRouter": ".openresponsesrequest",
"IDFileParser": ".openresponsesrequest", "IDFileParser": ".openresponsesrequest",
"IDModeration": ".openresponsesrequest", "IDModeration": ".openresponsesrequest",
"IDResponseHealing": ".openresponsesrequest", "IDResponseHealing": ".openresponsesrequest",
"IDWeb": ".openresponsesrequest", "IDWeb": ".openresponsesrequest",
"Ignore": ".openresponsesrequest",
"IgnoreTypedDict": ".openresponsesrequest",
"Only": ".openresponsesrequest",
"OnlyTypedDict": ".openresponsesrequest",
"OpenResponsesRequest": ".openresponsesrequest", "OpenResponsesRequest": ".openresponsesrequest",
"OpenResponsesRequestEngine": ".openresponsesrequest", "OpenResponsesRequestIgnore": ".openresponsesrequest",
"OpenResponsesRequestIgnoreTypedDict": ".openresponsesrequest",
"OpenResponsesRequestImageConfig": ".openresponsesrequest",
"OpenResponsesRequestImageConfigTypedDict": ".openresponsesrequest",
"OpenResponsesRequestMaxPrice": ".openresponsesrequest", "OpenResponsesRequestMaxPrice": ".openresponsesrequest",
"OpenResponsesRequestMaxPriceTypedDict": ".openresponsesrequest", "OpenResponsesRequestMaxPriceTypedDict": ".openresponsesrequest",
"OpenResponsesRequestPdf": ".openresponsesrequest", "OpenResponsesRequestOnly": ".openresponsesrequest",
"OpenResponsesRequestPdfEngine": ".openresponsesrequest", "OpenResponsesRequestOnlyTypedDict": ".openresponsesrequest",
"OpenResponsesRequestPdfTypedDict": ".openresponsesrequest", "OpenResponsesRequestOrder": ".openresponsesrequest",
"OpenResponsesRequestOrderTypedDict": ".openresponsesrequest",
"OpenResponsesRequestPluginAutoRouter": ".openresponsesrequest",
"OpenResponsesRequestPluginAutoRouterTypedDict": ".openresponsesrequest",
"OpenResponsesRequestPluginFileParser": ".openresponsesrequest", "OpenResponsesRequestPluginFileParser": ".openresponsesrequest",
"OpenResponsesRequestPluginFileParserTypedDict": ".openresponsesrequest", "OpenResponsesRequestPluginFileParserTypedDict": ".openresponsesrequest",
"OpenResponsesRequestPluginModeration": ".openresponsesrequest", "OpenResponsesRequestPluginModeration": ".openresponsesrequest",
@@ -1828,15 +1988,14 @@ _dynamic_imports: dict[str, str] = {
"OpenResponsesRequestPluginWebTypedDict": ".openresponsesrequest", "OpenResponsesRequestPluginWebTypedDict": ".openresponsesrequest",
"OpenResponsesRequestProvider": ".openresponsesrequest", "OpenResponsesRequestProvider": ".openresponsesrequest",
"OpenResponsesRequestProviderTypedDict": ".openresponsesrequest", "OpenResponsesRequestProviderTypedDict": ".openresponsesrequest",
"OpenResponsesRequestRoute": ".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",
"ServiceTier": ".openresponsesrequest", "ServiceTier": ".openresponsesrequest",
"Truncation": ".openresponsesrequest", "Truncation": ".openresponsesrequest",
"OpenResponsesResponseText": ".openresponsesresponsetext", "OpenResponsesResponseText": ".openresponsesresponsetext",
@@ -1945,12 +2104,50 @@ _dynamic_imports: dict[str, str] = {
"PayloadTooLargeResponseErrorDataTypedDict": ".payloadtoolargeresponseerrordata", "PayloadTooLargeResponseErrorDataTypedDict": ".payloadtoolargeresponseerrordata",
"PaymentRequiredResponseErrorData": ".paymentrequiredresponseerrordata", "PaymentRequiredResponseErrorData": ".paymentrequiredresponseerrordata",
"PaymentRequiredResponseErrorDataTypedDict": ".paymentrequiredresponseerrordata", "PaymentRequiredResponseErrorDataTypedDict": ".paymentrequiredresponseerrordata",
"PDFParserEngine": ".pdfparserengine",
"PDFParserOptions": ".pdfparseroptions",
"PDFParserOptionsTypedDict": ".pdfparseroptions",
"PercentileLatencyCutoffs": ".percentilelatencycutoffs",
"PercentileLatencyCutoffsTypedDict": ".percentilelatencycutoffs",
"PercentileStats": ".percentilestats",
"PercentileStatsTypedDict": ".percentilestats",
"PercentileThroughputCutoffs": ".percentilethroughputcutoffs",
"PercentileThroughputCutoffsTypedDict": ".percentilethroughputcutoffs",
"PerRequestLimits": ".perrequestlimits", "PerRequestLimits": ".perrequestlimits",
"PerRequestLimitsTypedDict": ".perrequestlimits", "PerRequestLimitsTypedDict": ".perrequestlimits",
"PreferredMaxLatency": ".preferredmaxlatency",
"PreferredMaxLatencyTypedDict": ".preferredmaxlatency",
"PreferredMinThroughput": ".preferredminthroughput",
"PreferredMinThroughputTypedDict": ".preferredminthroughput",
"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",
@@ -2022,6 +2219,7 @@ _dynamic_imports: dict[str, str] = {
"ResponsesOutputItemFunctionCallType": ".responsesoutputitemfunctioncall", "ResponsesOutputItemFunctionCallType": ".responsesoutputitemfunctioncall",
"ResponsesOutputItemFunctionCallTypedDict": ".responsesoutputitemfunctioncall", "ResponsesOutputItemFunctionCallTypedDict": ".responsesoutputitemfunctioncall",
"ResponsesOutputItemReasoning": ".responsesoutputitemreasoning", "ResponsesOutputItemReasoning": ".responsesoutputitemreasoning",
"ResponsesOutputItemReasoningFormat": ".responsesoutputitemreasoning",
"ResponsesOutputItemReasoningStatusCompleted": ".responsesoutputitemreasoning", "ResponsesOutputItemReasoningStatusCompleted": ".responsesoutputitemreasoning",
"ResponsesOutputItemReasoningStatusInProgress": ".responsesoutputitemreasoning", "ResponsesOutputItemReasoningStatusInProgress": ".responsesoutputitemreasoning",
"ResponsesOutputItemReasoningStatusIncomplete": ".responsesoutputitemreasoning", "ResponsesOutputItemReasoningStatusIncomplete": ".responsesoutputitemreasoning",
@@ -2040,6 +2238,7 @@ _dynamic_imports: dict[str, str] = {
"ResponsesOutputMessageStatusUnionTypedDict": ".responsesoutputmessage", "ResponsesOutputMessageStatusUnionTypedDict": ".responsesoutputmessage",
"ResponsesOutputMessageType": ".responsesoutputmessage", "ResponsesOutputMessageType": ".responsesoutputmessage",
"ResponsesOutputMessageTypedDict": ".responsesoutputmessage", "ResponsesOutputMessageTypedDict": ".responsesoutputmessage",
"ResponsesOutputModality": ".responsesoutputmodality",
"ResponsesSearchContextSize": ".responsessearchcontextsize", "ResponsesSearchContextSize": ".responsessearchcontextsize",
"ResponsesWebSearchCallOutput": ".responseswebsearchcalloutput", "ResponsesWebSearchCallOutput": ".responseswebsearchcalloutput",
"ResponsesWebSearchCallOutputType": ".responseswebsearchcalloutput", "ResponsesWebSearchCallOutputType": ".responseswebsearchcalloutput",
@@ -2082,6 +2281,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",
+2 -2
View File
@@ -36,7 +36,6 @@ Schema0Enum = Union[
"Fireworks", "Fireworks",
"Friendli", "Friendli",
"GMICloud", "GMICloud",
"GoPomelo",
"Google", "Google",
"Google AI Studio", "Google AI Studio",
"Groq", "Groq",
@@ -66,13 +65,14 @@ Schema0Enum = Union[
"Phala", "Phala",
"Relace", "Relace",
"SambaNova", "SambaNova",
"Seed",
"SiliconFlow", "SiliconFlow",
"Sourceful", "Sourceful",
"Stealth", "Stealth",
"StreamLake", "StreamLake",
"Switchpoint", "Switchpoint",
"Targon",
"Together", "Together",
"Upstage",
"Venice", "Venice",
"WandB", "WandB",
"Xiaomi", "Xiaomi",
+229
View File
@@ -0,0 +1,229 @@
"""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",
"azure-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")),
]
+211 -50
View File
@@ -4,6 +4,7 @@ from __future__ import annotations
from ._schema0 import Schema0, Schema0TypedDict 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,
@@ -55,16 +56,6 @@ Quantizations = Union[
] ]
Sort = Union[
Literal[
"price",
"throughput",
"latency",
],
UnrecognizedStr,
]
class ChatGenerationParamsMaxPriceTypedDict(TypedDict): 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.""" r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
@@ -89,6 +80,124 @@ class ChatGenerationParamsMaxPrice(BaseModel):
request: Optional[Any] = None request: Optional[Any] = None
class ChatGenerationParamsPreferredMinThroughputTypedDict(TypedDict):
p50: NotRequired[Nullable[float]]
p75: NotRequired[Nullable[float]]
p90: NotRequired[Nullable[float]]
p99: NotRequired[Nullable[float]]
class ChatGenerationParamsPreferredMinThroughput(BaseModel):
p50: OptionalNullable[float] = UNSET
p75: OptionalNullable[float] = UNSET
p90: OptionalNullable[float] = UNSET
p99: OptionalNullable[float] = UNSET
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["p50", "p75", "p90", "p99"]
nullable_fields = ["p50", "p75", "p90", "p99"]
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
ChatGenerationParamsPreferredMinThroughputUnionTypedDict = TypeAliasType(
"ChatGenerationParamsPreferredMinThroughputUnionTypedDict",
Union[ChatGenerationParamsPreferredMinThroughputTypedDict, float],
)
ChatGenerationParamsPreferredMinThroughputUnion = TypeAliasType(
"ChatGenerationParamsPreferredMinThroughputUnion",
Union[ChatGenerationParamsPreferredMinThroughput, float],
)
class ChatGenerationParamsPreferredMaxLatencyTypedDict(TypedDict):
p50: NotRequired[Nullable[float]]
p75: NotRequired[Nullable[float]]
p90: NotRequired[Nullable[float]]
p99: NotRequired[Nullable[float]]
class ChatGenerationParamsPreferredMaxLatency(BaseModel):
p50: OptionalNullable[float] = UNSET
p75: OptionalNullable[float] = UNSET
p90: OptionalNullable[float] = UNSET
p99: OptionalNullable[float] = UNSET
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["p50", "p75", "p90", "p99"]
nullable_fields = ["p50", "p75", "p90", "p99"]
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
ChatGenerationParamsPreferredMaxLatencyUnionTypedDict = TypeAliasType(
"ChatGenerationParamsPreferredMaxLatencyUnionTypedDict",
Union[ChatGenerationParamsPreferredMaxLatencyTypedDict, float],
)
ChatGenerationParamsPreferredMaxLatencyUnion = TypeAliasType(
"ChatGenerationParamsPreferredMaxLatencyUnion",
Union[ChatGenerationParamsPreferredMaxLatency, float],
)
class ChatGenerationParamsProviderTypedDict(TypedDict): class ChatGenerationParamsProviderTypedDict(TypedDict):
allow_fallbacks: NotRequired[Nullable[bool]] allow_fallbacks: NotRequired[Nullable[bool]]
r"""Whether to allow backup providers to serve requests r"""Whether to allow backup providers to serve requests
@@ -114,14 +223,18 @@ class ChatGenerationParamsProviderTypedDict(TypedDict):
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[Quantizations]]] quantizations: NotRequired[Nullable[List[Quantizations]]]
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[Sort]] 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.""" 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] 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.""" r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
min_throughput: NotRequired[Nullable[float]] preferred_min_throughput: NotRequired[
r"""The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used.""" Nullable[ChatGenerationParamsPreferredMinThroughputUnionTypedDict]
max_latency: NotRequired[Nullable[float]] ]
r"""The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used.""" r"""Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) 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[ChatGenerationParamsPreferredMaxLatencyUnionTypedDict]
]
r"""Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) 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."""
class ChatGenerationParamsProvider(BaseModel): class ChatGenerationParamsProvider(BaseModel):
@@ -163,19 +276,21 @@ class ChatGenerationParamsProvider(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[ProviderSortUnion] = UNSET
OptionalNullable[Sort], 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[ChatGenerationParamsMaxPrice] = None 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.""" r"""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] = UNSET preferred_min_throughput: OptionalNullable[
r"""The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used.""" ChatGenerationParamsPreferredMinThroughputUnion
] = UNSET
r"""Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) 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."""
max_latency: OptionalNullable[float] = UNSET preferred_max_latency: OptionalNullable[
r"""The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used.""" ChatGenerationParamsPreferredMaxLatencyUnion
] = UNSET
r"""Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) 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."""
@model_serializer(mode="wrap") @model_serializer(mode="wrap")
def serialize_model(self, handler): def serialize_model(self, handler):
@@ -191,8 +306,8 @@ class ChatGenerationParamsProvider(BaseModel):
"quantizations", "quantizations",
"sort", "sort",
"max_price", "max_price",
"min_throughput", "preferred_min_throughput",
"max_latency", "preferred_max_latency",
] ]
nullable_fields = [ nullable_fields = [
"allow_fallbacks", "allow_fallbacks",
@@ -205,8 +320,8 @@ class ChatGenerationParamsProvider(BaseModel):
"ignore", "ignore",
"quantizations", "quantizations",
"sort", "sort",
"min_throughput", "preferred_min_throughput",
"max_latency", "preferred_max_latency",
] ]
null_default_fields = [] null_default_fields = []
@@ -252,7 +367,7 @@ class ChatGenerationParamsPluginResponseHealing(BaseModel):
enabled: Optional[bool] = None enabled: Optional[bool] = None
ChatGenerationParamsPdfEngine = Union[ PdfEngine = Union[
Literal[ Literal[
"mistral-ocr", "mistral-ocr",
"pdf-text", "pdf-text",
@@ -262,21 +377,20 @@ ChatGenerationParamsPdfEngine = Union[
] ]
class ChatGenerationParamsPdfTypedDict(TypedDict): class PdfTypedDict(TypedDict):
engine: NotRequired[ChatGenerationParamsPdfEngine] engine: NotRequired[PdfEngine]
class ChatGenerationParamsPdf(BaseModel): class Pdf(BaseModel):
engine: Annotated[ engine: Annotated[
Optional[ChatGenerationParamsPdfEngine], Optional[PdfEngine], PlainValidator(validate_open_enum(False))
PlainValidator(validate_open_enum(False)),
] = None ] = None
class ChatGenerationParamsPluginFileParserTypedDict(TypedDict): class ChatGenerationParamsPluginFileParserTypedDict(TypedDict):
id: Literal["file-parser"] id: Literal["file-parser"]
enabled: NotRequired[bool] enabled: NotRequired[bool]
pdf: NotRequired[ChatGenerationParamsPdfTypedDict] pdf: NotRequired[PdfTypedDict]
class ChatGenerationParamsPluginFileParser(BaseModel): class ChatGenerationParamsPluginFileParser(BaseModel):
@@ -289,10 +403,10 @@ class ChatGenerationParamsPluginFileParser(BaseModel):
enabled: Optional[bool] = None enabled: Optional[bool] = None
pdf: Optional[ChatGenerationParamsPdf] = None pdf: Optional[Pdf] = None
ChatGenerationParamsEngine = Union[ Engine = Union[
Literal[ Literal[
"native", "native",
"exa", "exa",
@@ -306,7 +420,7 @@ class ChatGenerationParamsPluginWebTypedDict(TypedDict):
enabled: NotRequired[bool] enabled: NotRequired[bool]
max_results: NotRequired[float] max_results: NotRequired[float]
search_prompt: NotRequired[str] search_prompt: NotRequired[str]
engine: NotRequired[ChatGenerationParamsEngine] engine: NotRequired[Engine]
class ChatGenerationParamsPluginWeb(BaseModel): class ChatGenerationParamsPluginWeb(BaseModel):
@@ -321,9 +435,9 @@ class ChatGenerationParamsPluginWeb(BaseModel):
search_prompt: Optional[str] = None search_prompt: Optional[str] = None
engine: Annotated[ engine: Annotated[Optional[Engine], PlainValidator(validate_open_enum(False))] = (
Optional[ChatGenerationParamsEngine], PlainValidator(validate_open_enum(False)) None
] = None )
class ChatGenerationParamsPluginModerationTypedDict(TypedDict): class ChatGenerationParamsPluginModerationTypedDict(TypedDict):
@@ -337,11 +451,31 @@ class ChatGenerationParamsPluginModeration(BaseModel):
] = "moderation" ] = "moderation"
class ChatGenerationParamsPluginAutoRouterTypedDict(TypedDict):
id: Literal["auto-router"]
enabled: NotRequired[bool]
allowed_models: NotRequired[List[str]]
class ChatGenerationParamsPluginAutoRouter(BaseModel):
ID: Annotated[
Annotated[
Literal["auto-router"], AfterValidator(validate_const("auto-router"))
],
pydantic.Field(alias="id"),
] = "auto-router"
enabled: Optional[bool] = None
allowed_models: Optional[List[str]] = None
ChatGenerationParamsPluginUnionTypedDict = TypeAliasType( ChatGenerationParamsPluginUnionTypedDict = TypeAliasType(
"ChatGenerationParamsPluginUnionTypedDict", "ChatGenerationParamsPluginUnionTypedDict",
Union[ Union[
ChatGenerationParamsPluginModerationTypedDict, ChatGenerationParamsPluginModerationTypedDict,
ChatGenerationParamsPluginResponseHealingTypedDict, ChatGenerationParamsPluginResponseHealingTypedDict,
ChatGenerationParamsPluginAutoRouterTypedDict,
ChatGenerationParamsPluginFileParserTypedDict, ChatGenerationParamsPluginFileParserTypedDict,
ChatGenerationParamsPluginWebTypedDict, ChatGenerationParamsPluginWebTypedDict,
], ],
@@ -350,6 +484,7 @@ ChatGenerationParamsPluginUnionTypedDict = TypeAliasType(
ChatGenerationParamsPluginUnion = Annotated[ ChatGenerationParamsPluginUnion = Annotated[
Union[ Union[
Annotated[ChatGenerationParamsPluginAutoRouter, Tag("auto-router")],
Annotated[ChatGenerationParamsPluginModeration, Tag("moderation")], Annotated[ChatGenerationParamsPluginModeration, Tag("moderation")],
Annotated[ChatGenerationParamsPluginWeb, Tag("web")], Annotated[ChatGenerationParamsPluginWeb, Tag("web")],
Annotated[ChatGenerationParamsPluginFileParser, Tag("file-parser")], Annotated[ChatGenerationParamsPluginFileParser, Tag("file-parser")],
@@ -359,7 +494,7 @@ ChatGenerationParamsPluginUnion = Annotated[
] ]
ChatGenerationParamsRoute = Union[ Route = Union[
Literal[ Literal[
"fallback", "fallback",
"sort", "sort",
@@ -370,12 +505,12 @@ ChatGenerationParamsRoute = Union[
Effort = Union[ Effort = Union[
Literal[ Literal[
"none",
"minimal",
"low",
"medium",
"high",
"xhigh", "xhigh",
"high",
"medium",
"low",
"minimal",
"none",
], ],
UnrecognizedStr, UnrecognizedStr,
] ]
@@ -504,14 +639,32 @@ class Debug(BaseModel):
echo_upstream_body: Optional[bool] = None echo_upstream_body: Optional[bool] = None
ChatGenerationParamsImageConfigTypedDict = TypeAliasType(
"ChatGenerationParamsImageConfigTypedDict", Union[str, float]
)
ChatGenerationParamsImageConfig = TypeAliasType(
"ChatGenerationParamsImageConfig", Union[str, float]
)
Modality = Union[
Literal[
"text",
"image",
],
UnrecognizedStr,
]
class ChatGenerationParamsTypedDict(TypedDict): class ChatGenerationParamsTypedDict(TypedDict):
messages: List[MessageTypedDict] messages: List[MessageTypedDict]
provider: NotRequired[Nullable[ChatGenerationParamsProviderTypedDict]] provider: NotRequired[Nullable[ChatGenerationParamsProviderTypedDict]]
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[ChatGenerationParamsPluginUnionTypedDict]] plugins: NotRequired[List[ChatGenerationParamsPluginUnionTypedDict]]
r"""Plugins you want to enable for this request, including their settings.""" r"""Plugins you want to enable for this request, including their settings."""
route: NotRequired[Nullable[ChatGenerationParamsRoute]] route: NotRequired[Nullable[Route]]
r"""Routing strategy for multiple models: \"fallback\" (default) uses secondary models as backups, \"sort\" sorts all endpoints together by routing criteria."""
user: NotRequired[str] user: NotRequired[str]
session_id: 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.""" 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."""
@@ -536,6 +689,8 @@ class ChatGenerationParamsTypedDict(TypedDict):
tools: NotRequired[List[ToolDefinitionJSONTypedDict]] tools: NotRequired[List[ToolDefinitionJSONTypedDict]]
top_p: NotRequired[Nullable[float]] top_p: NotRequired[Nullable[float]]
debug: NotRequired[DebugTypedDict] debug: NotRequired[DebugTypedDict]
image_config: NotRequired[Dict[str, ChatGenerationParamsImageConfigTypedDict]]
modalities: NotRequired[List[Modality]]
class ChatGenerationParams(BaseModel): class ChatGenerationParams(BaseModel):
@@ -548,10 +703,8 @@ class ChatGenerationParams(BaseModel):
r"""Plugins you want to enable for this request, including their settings.""" r"""Plugins you want to enable for this request, including their settings."""
route: Annotated[ route: Annotated[
OptionalNullable[ChatGenerationParamsRoute], OptionalNullable[Route], PlainValidator(validate_open_enum(False))
PlainValidator(validate_open_enum(False)),
] = UNSET ] = UNSET
r"""Routing strategy for multiple models: \"fallback\" (default) uses secondary models as backups, \"sort\" sorts all endpoints together by routing criteria."""
user: Optional[str] = None user: Optional[str] = None
@@ -600,6 +753,12 @@ class ChatGenerationParams(BaseModel):
debug: Optional[Debug] = None debug: Optional[Debug] = None
image_config: Optional[Dict[str, ChatGenerationParamsImageConfig]] = None
modalities: Optional[
List[Annotated[Modality, PlainValidator(validate_open_enum(False))]]
] = None
@model_serializer(mode="wrap") @model_serializer(mode="wrap")
def serialize_model(self, handler): def serialize_model(self, handler):
optional_fields = [ optional_fields = [
@@ -629,6 +788,8 @@ class ChatGenerationParams(BaseModel):
"tools", "tools",
"top_p", "top_p",
"debug", "debug",
"image_config",
"modalities",
] ]
nullable_fields = [ nullable_fields = [
"provider", "provider",
@@ -72,6 +72,7 @@ class CompletionTokensDetails(BaseModel):
class PromptTokensDetailsTypedDict(TypedDict): class PromptTokensDetailsTypedDict(TypedDict):
cached_tokens: NotRequired[float] cached_tokens: NotRequired[float]
cache_write_tokens: NotRequired[float]
audio_tokens: NotRequired[float] audio_tokens: NotRequired[float]
video_tokens: NotRequired[float] video_tokens: NotRequired[float]
@@ -79,6 +80,8 @@ class PromptTokensDetailsTypedDict(TypedDict):
class PromptTokensDetails(BaseModel): class PromptTokensDetails(BaseModel):
cached_tokens: Optional[float] = None cached_tokens: Optional[float] = None
cache_write_tokens: Optional[float] = None
audio_tokens: Optional[float] = None audio_tokens: Optional[float] = None
video_tokens: Optional[float] = None video_tokens: Optional[float] = None
@@ -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 = []
@@ -60,9 +60,9 @@ OpenResponsesInput1TypedDict = TypeAliasType(
OpenResponsesFunctionCallOutputTypedDict, OpenResponsesFunctionCallOutputTypedDict,
ResponsesOutputMessageTypedDict, ResponsesOutputMessageTypedDict,
OpenResponsesFunctionToolCallTypedDict, OpenResponsesFunctionToolCallTypedDict,
ResponsesOutputItemReasoningTypedDict,
ResponsesOutputItemFunctionCallTypedDict, ResponsesOutputItemFunctionCallTypedDict,
OpenResponsesReasoningTypedDict, OpenResponsesReasoningTypedDict,
ResponsesOutputItemReasoningTypedDict,
], ],
) )
@@ -78,9 +78,9 @@ OpenResponsesInput1 = TypeAliasType(
OpenResponsesFunctionCallOutput, OpenResponsesFunctionCallOutput,
ResponsesOutputMessage, ResponsesOutputMessage,
OpenResponsesFunctionToolCall, OpenResponsesFunctionToolCall,
ResponsesOutputItemReasoning,
ResponsesOutputItemFunctionCall, ResponsesOutputItemFunctionCall,
OpenResponsesReasoning, OpenResponsesReasoning,
ResponsesOutputItemReasoning,
], ],
) )
@@ -55,6 +55,7 @@ OpenResponsesReasoningFormat = Union[
Literal[ Literal[
"unknown", "unknown",
"openai-responses-v1", "openai-responses-v1",
"azure-openai-responses-v1",
"xai-responses-v1", "xai-responses-v1",
"anthropic-claude-v1", "anthropic-claude-v1",
"google-gemini-v1", "google-gemini-v1",
+121 -85
View File
@@ -33,9 +33,18 @@ from .openresponseswebsearchtool import (
OpenResponsesWebSearchTool, OpenResponsesWebSearchTool,
OpenResponsesWebSearchToolTypedDict, OpenResponsesWebSearchToolTypedDict,
) )
from .pdfparseroptions import PDFParserOptions, PDFParserOptionsTypedDict
from .preferredmaxlatency import PreferredMaxLatency, PreferredMaxLatencyTypedDict
from .preferredminthroughput import (
PreferredMinThroughput,
PreferredMinThroughputTypedDict,
)
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 .responsesoutputmodality import ResponsesOutputModality
from .websearchengine import WebSearchEngine
from openrouter.types import ( from openrouter.types import (
BaseModel, BaseModel,
Nullable, Nullable,
@@ -136,6 +145,16 @@ OpenResponsesRequestToolUnion = Annotated[
] ]
OpenResponsesRequestImageConfigTypedDict = TypeAliasType(
"OpenResponsesRequestImageConfigTypedDict", Union[str, float]
)
OpenResponsesRequestImageConfig = TypeAliasType(
"OpenResponsesRequestImageConfig", Union[str, float]
)
ServiceTier = Literal["auto",] ServiceTier = Literal["auto",]
@@ -148,33 +167,57 @@ 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],
) )
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): 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."""
@@ -230,22 +273,22 @@ class OpenResponsesRequestProviderTypedDict(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[OpenResponsesRequestMaxPriceTypedDict] 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."""
min_throughput: NotRequired[Nullable[float]] preferred_min_throughput: NotRequired[Nullable[PreferredMinThroughputTypedDict]]
r"""The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used.""" r"""Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) 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."""
max_latency: NotRequired[Nullable[float]] preferred_max_latency: NotRequired[Nullable[PreferredMaxLatencyTypedDict]]
r"""The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used.""" r"""Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) 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."""
class OpenResponsesRequestProvider(BaseModel): class OpenResponsesRequestProvider(BaseModel):
@@ -276,13 +319,13 @@ class OpenResponsesRequestProvider(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[
@@ -290,19 +333,17 @@ class OpenResponsesRequestProvider(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[OpenResponsesRequestMaxPrice] = 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."""
min_throughput: OptionalNullable[float] = UNSET preferred_min_throughput: OptionalNullable[PreferredMinThroughput] = UNSET
r"""The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used.""" r"""Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) 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."""
max_latency: OptionalNullable[float] = UNSET preferred_max_latency: OptionalNullable[PreferredMaxLatency] = UNSET
r"""The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used.""" r"""Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) 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."""
@model_serializer(mode="wrap") @model_serializer(mode="wrap")
def serialize_model(self, handler): def serialize_model(self, handler):
@@ -318,8 +359,8 @@ class OpenResponsesRequestProvider(BaseModel):
"quantizations", "quantizations",
"sort", "sort",
"max_price", "max_price",
"min_throughput", "preferred_min_throughput",
"max_latency", "preferred_max_latency",
] ]
nullable_fields = [ nullable_fields = [
"allow_fallbacks", "allow_fallbacks",
@@ -332,8 +373,8 @@ class OpenResponsesRequestProvider(BaseModel):
"ignore", "ignore",
"quantizations", "quantizations",
"sort", "sort",
"min_throughput", "preferred_min_throughput",
"max_latency", "preferred_max_latency",
] ]
null_default_fields = [] null_default_fields = []
@@ -381,32 +422,12 @@ class OpenResponsesRequestPluginResponseHealing(BaseModel):
IDFileParser = Literal["file-parser",] IDFileParser = Literal["file-parser",]
OpenResponsesRequestPdfEngine = Union[
Literal[
"mistral-ocr",
"pdf-text",
"native",
],
UnrecognizedStr,
]
class OpenResponsesRequestPdfTypedDict(TypedDict):
engine: NotRequired[OpenResponsesRequestPdfEngine]
class OpenResponsesRequestPdf(BaseModel):
engine: Annotated[
Optional[OpenResponsesRequestPdfEngine],
PlainValidator(validate_open_enum(False)),
] = None
class OpenResponsesRequestPluginFileParserTypedDict(TypedDict): class OpenResponsesRequestPluginFileParserTypedDict(TypedDict):
id: IDFileParser id: IDFileParser
enabled: NotRequired[bool] enabled: NotRequired[bool]
r"""Set to false to disable the file-parser plugin for this request. Defaults to true.""" r"""Set to false to disable the file-parser plugin for this request. Defaults to true."""
pdf: NotRequired[OpenResponsesRequestPdfTypedDict] pdf: NotRequired[PDFParserOptionsTypedDict]
r"""Options for PDF parsing."""
class OpenResponsesRequestPluginFileParser(BaseModel): class OpenResponsesRequestPluginFileParser(BaseModel):
@@ -415,28 +436,21 @@ class OpenResponsesRequestPluginFileParser(BaseModel):
enabled: Optional[bool] = None enabled: Optional[bool] = None
r"""Set to false to disable the file-parser plugin for this request. Defaults to true.""" r"""Set to false to disable the file-parser plugin for this request. Defaults to true."""
pdf: Optional[OpenResponsesRequestPdf] = None pdf: Optional[PDFParserOptions] = None
r"""Options for PDF parsing."""
IDWeb = Literal["web",] IDWeb = Literal["web",]
OpenResponsesRequestEngine = Union[
Literal[
"native",
"exa",
],
UnrecognizedStr,
]
class OpenResponsesRequestPluginWebTypedDict(TypedDict): class OpenResponsesRequestPluginWebTypedDict(TypedDict):
id: IDWeb id: IDWeb
enabled: NotRequired[bool] enabled: NotRequired[bool]
r"""Set to false to disable the web-search plugin for this request. Defaults to true.""" 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[OpenResponsesRequestEngine] engine: NotRequired[WebSearchEngine]
r"""The search engine to use for web search."""
class OpenResponsesRequestPluginWeb(BaseModel): class OpenResponsesRequestPluginWeb(BaseModel):
@@ -450,8 +464,9 @@ class OpenResponsesRequestPluginWeb(BaseModel):
search_prompt: Optional[str] = None search_prompt: Optional[str] = None
engine: Annotated[ engine: Annotated[
Optional[OpenResponsesRequestEngine], PlainValidator(validate_open_enum(False)) Optional[WebSearchEngine], PlainValidator(validate_open_enum(False))
] = None ] = None
r"""The search engine to use for web search."""
IDModeration = Literal["moderation",] IDModeration = Literal["moderation",]
@@ -465,11 +480,33 @@ class OpenResponsesRequestPluginModeration(BaseModel):
id: IDModeration id: IDModeration
IDAutoRouter = Literal["auto-router",]
class OpenResponsesRequestPluginAutoRouterTypedDict(TypedDict):
id: IDAutoRouter
enabled: NotRequired[bool]
r"""Set to false to disable the auto-router plugin for this request. Defaults to true."""
allowed_models: NotRequired[List[str]]
r"""List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., \"anthropic/*\" matches all Anthropic models). When not specified, uses the default supported models list."""
class OpenResponsesRequestPluginAutoRouter(BaseModel):
id: IDAutoRouter
enabled: Optional[bool] = None
r"""Set to false to disable the auto-router plugin for this request. Defaults to true."""
allowed_models: Optional[List[str]] = None
r"""List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., \"anthropic/*\" matches all Anthropic models). When not specified, uses the default supported models list."""
OpenResponsesRequestPluginUnionTypedDict = TypeAliasType( OpenResponsesRequestPluginUnionTypedDict = TypeAliasType(
"OpenResponsesRequestPluginUnionTypedDict", "OpenResponsesRequestPluginUnionTypedDict",
Union[ Union[
OpenResponsesRequestPluginModerationTypedDict, OpenResponsesRequestPluginModerationTypedDict,
OpenResponsesRequestPluginResponseHealingTypedDict, OpenResponsesRequestPluginResponseHealingTypedDict,
OpenResponsesRequestPluginAutoRouterTypedDict,
OpenResponsesRequestPluginFileParserTypedDict, OpenResponsesRequestPluginFileParserTypedDict,
OpenResponsesRequestPluginWebTypedDict, OpenResponsesRequestPluginWebTypedDict,
], ],
@@ -478,6 +515,7 @@ OpenResponsesRequestPluginUnionTypedDict = TypeAliasType(
OpenResponsesRequestPluginUnion = Annotated[ OpenResponsesRequestPluginUnion = Annotated[
Union[ Union[
Annotated[OpenResponsesRequestPluginAutoRouter, Tag("auto-router")],
Annotated[OpenResponsesRequestPluginModeration, Tag("moderation")], Annotated[OpenResponsesRequestPluginModeration, Tag("moderation")],
Annotated[OpenResponsesRequestPluginWeb, Tag("web")], Annotated[OpenResponsesRequestPluginWeb, Tag("web")],
Annotated[OpenResponsesRequestPluginFileParser, Tag("file-parser")], Annotated[OpenResponsesRequestPluginFileParser, Tag("file-parser")],
@@ -487,16 +525,6 @@ OpenResponsesRequestPluginUnion = Annotated[
] ]
OpenResponsesRequestRoute = Union[
Literal[
"fallback",
"sort",
],
UnrecognizedStr,
]
r"""Routing strategy for multiple models: \"fallback\" (default) uses secondary models as backups, \"sort\" sorts all endpoints together by routing criteria."""
class OpenResponsesRequestTypedDict(TypedDict): class OpenResponsesRequestTypedDict(TypedDict):
r"""Request schema for Responses endpoint""" r"""Request schema for Responses endpoint"""
@@ -518,6 +546,10 @@ class OpenResponsesRequestTypedDict(TypedDict):
temperature: NotRequired[Nullable[float]] temperature: NotRequired[Nullable[float]]
top_p: NotRequired[Nullable[float]] top_p: NotRequired[Nullable[float]]
top_k: NotRequired[float] top_k: NotRequired[float]
image_config: NotRequired[Dict[str, OpenResponsesRequestImageConfigTypedDict]]
r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details."""
modalities: NotRequired[List[ResponsesOutputModality]]
r"""Output modalities for the response. Supported values are \"text\" and \"image\"."""
prompt_cache_key: NotRequired[Nullable[str]] prompt_cache_key: NotRequired[Nullable[str]]
previous_response_id: NotRequired[Nullable[str]] previous_response_id: NotRequired[Nullable[str]]
prompt: NotRequired[Nullable[OpenAIResponsesPromptTypedDict]] prompt: NotRequired[Nullable[OpenAIResponsesPromptTypedDict]]
@@ -532,8 +564,6 @@ class OpenResponsesRequestTypedDict(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."""
plugins: NotRequired[List[OpenResponsesRequestPluginUnionTypedDict]] 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."""
route: NotRequired[Nullable[OpenResponsesRequestRoute]]
r"""Routing strategy for multiple models: \"fallback\" (default) uses secondary models as backups, \"sort\" sorts all endpoints together by routing criteria."""
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."""
session_id: NotRequired[str] session_id: NotRequired[str]
@@ -575,6 +605,18 @@ class OpenResponsesRequest(BaseModel):
top_k: Optional[float] = None top_k: Optional[float] = None
image_config: Optional[Dict[str, OpenResponsesRequestImageConfig]] = None
r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details."""
modalities: Optional[
List[
Annotated[
ResponsesOutputModality, PlainValidator(validate_open_enum(False))
]
]
] = None
r"""Output modalities for the response. Supported values are \"text\" and \"image\"."""
prompt_cache_key: OptionalNullable[str] = UNSET prompt_cache_key: OptionalNullable[str] = UNSET
previous_response_id: OptionalNullable[str] = UNSET previous_response_id: OptionalNullable[str] = UNSET
@@ -612,12 +654,6 @@ class OpenResponsesRequest(BaseModel):
plugins: Optional[List[OpenResponsesRequestPluginUnion]] = 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."""
route: Annotated[
OptionalNullable[OpenResponsesRequestRoute],
PlainValidator(validate_open_enum(False)),
] = UNSET
r"""Routing strategy for multiple models: \"fallback\" (default) uses secondary models as backups, \"sort\" sorts all endpoints together by routing criteria."""
user: Optional[str] = None user: Optional[str] = None
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."""
@@ -641,6 +677,8 @@ class OpenResponsesRequest(BaseModel):
"temperature", "temperature",
"top_p", "top_p",
"top_k", "top_k",
"image_config",
"modalities",
"prompt_cache_key", "prompt_cache_key",
"previous_response_id", "previous_response_id",
"prompt", "prompt",
@@ -653,7 +691,6 @@ class OpenResponsesRequest(BaseModel):
"stream", "stream",
"provider", "provider",
"plugins", "plugins",
"route",
"user", "user",
"session_id", "session_id",
] ]
@@ -673,7 +710,6 @@ class OpenResponsesRequest(BaseModel):
"safety_identifier", "safety_identifier",
"truncation", "truncation",
"provider", "provider",
"route",
] ]
null_default_fields = [] null_default_fields = []
+1
View File
@@ -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",
], ],
@@ -0,0 +1,16 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from openrouter.types import UnrecognizedStr
from typing import Literal, Union
PDFParserEngine = Union[
Literal[
"mistral-ocr",
"pdf-text",
"native",
],
UnrecognizedStr,
]
r"""The engine to use for parsing PDF files."""

Some files were not shown because too many files have changed in this diff Show More