From 83ab66cf4ee24da237bd5effec2a58a279d9e25c Mon Sep 17 00:00:00 2001 From: Matt Apperson Date: Wed, 8 Apr 2026 12:04:59 -0400 Subject: [PATCH] chore: regenerate SDK with consolidated OpenAPI schemas Regenerated from openrouter-web PR #17664 which consolidates duplicate Zod schemas to reduce redundant SDK types. Key changes: - Removed duplicate DatetimeServerTool/WebSearchServerTool schemas - Consolidated AnthropicBase64PdfSource/PlainTextSource schemas - Added flattenRedundantAllOf to eliminate inline enum duplication - Version bumped to 0.12.0 by Speakeasy --- .speakeasy/gen.lock | 2708 +- .speakeasy/gen.yaml | 4 +- .speakeasy/in.openapi.yaml | 105 +- .speakeasy/out.openapi.yaml | 23230 +++++++--------- .speakeasy/workflow.lock | 12 +- FUNCTIONS.md | 5 +- README.md | 35 + USAGE.md | 5 +- docs/models/architecture.md | 2 +- docs/models/chainid.md | 17 - docs/models/createchargerequest.md | 23 - docs/models/filepath.md | 2 +- docs/models/inputtokensdetails.md | 2 +- docs/models/instructtype.md | 2 +- docs/models/listendpointsresponse.md | 2 + docs/models/model.md | 6 +- docs/models/modelgroup.md | 2 +- docs/models/modelslistresponse.md | 9 +- docs/models/openairesponsesannotation.md | 10 +- docs/models/openairesponsesresponsestatus.md | 2 +- docs/models/openairesponsestoolchoiceunion.md | 15 + docs/models/operations/apitype.md | 4 +- .../bulkassignkeystoguardrailrequest.md | 4 +- .../bulkassignkeystoguardrailrequestbody.md | 19 - .../bulkassignkeystoguardrailresponse.md | 19 - .../bulkassignmemberstoguardrailrequest.md | 4 +- ...bulkassignmemberstoguardrailrequestbody.md | 20 - .../bulkassignmemberstoguardrailresponse.md | 19 - .../bulkunassignkeysfromguardrailrequest.md | 4 +- ...ulkunassignkeysfromguardrailrequestbody.md | 19 - .../bulkunassignkeysfromguardrailresponse.md | 19 - ...bulkunassignmembersfromguardrailrequest.md | 4 +- ...unassignmembersfromguardrailrequestbody.md | 20 - ...ulkunassignmembersfromguardrailresponse.md | 19 - docs/models/operations/calldata.md | 35 - .../createauthkeyscoderequestbody.md | 2 +- .../operations/createcoinbasechargedata.md | 43 - .../operations/createcoinbasechargeglobals.md | 17 - .../operations/createcoinbasechargerequest.md | 24 - .../createcoinbasechargeresponse.md | 44 - .../createcoinbasechargesecurity.md | 17 - .../models/operations/createembeddingsdata.md | 18 +- .../operations/createembeddingsrequest.md | 22 +- .../operations/createembeddingsrequestbody.md | 24 +- .../operations/createembeddingsresponse.md | 13 +- .../createembeddingsresponsebody.md | 29 +- docs/models/operations/createguardraildata.md | 31 - .../operations/createguardrailrequest.md | 4 +- .../operations/createguardrailrequestbody.md | 24 - .../createguardrailresetintervalrequest.md | 19 - .../createguardrailresetintervalresponse.md | 19 - .../operations/createguardrailresponse.md | 23 - .../operations/createkeysrequestbody.md | 3 +- .../operations/createresponsesresponse.md | 8 +- .../operations/createresponsesresponsebody.md | 8 +- .../operations/deleteguardrailresponse.md | 19 - docs/models/operations/embedding.md | 8 +- docs/models/operations/encodingformat.md | 2 + docs/models/operations/getgenerationdata.md | 82 +- .../models/operations/getgenerationrequest.md | 14 +- docs/models/operations/getguardraildata.md | 31 - .../operations/getguardrailresetinterval.md | 19 - .../models/operations/getguardrailresponse.md | 23 - docs/models/operations/getmodelsrequest.md | 2 +- .../operations/getuseractivityrequest.md | 4 +- .../operations/getuseractivityresponse.md | 33 - docs/models/operations/inputunion.md | 4 +- .../models/operations/listendpointsrequest.md | 18 +- .../operations/listendpointsresponse.md | 10 +- .../operations/listendpointszdrresponse.md | 2 + .../listguardrailkeyassignmentsdata.md | 29 - .../listguardrailkeyassignmentsrequest.md | 4 +- .../listguardrailkeyassignmentsresponse.md | 37 +- .../listguardrailmemberassignmentsdata.md | 27 - .../listguardrailmemberassignmentsrequest.md | 4 +- .../listguardrailmemberassignmentsresponse.md | 33 +- docs/models/operations/listguardrailsdata.md | 29 - .../operations/listguardrailsrequest.md | 4 +- .../operations/listguardrailsresetinterval.md | 19 - .../operations/listguardrailsresponse.md | 27 +- .../operations/listkeyassignmentsdata.md | 29 - .../operations/listkeyassignmentsrequest.md | 4 +- .../operations/listkeyassignmentsresponse.md | 37 +- .../operations/listmemberassignmentsdata.md | 27 - .../listmemberassignmentsrequest.md | 4 +- .../listmemberassignmentsresponse.md | 24 +- docs/models/operations/listrequest.md | 2 +- docs/models/operations/metadata.md | 21 - docs/models/operations/providername.md | 17 - docs/models/operations/providerresponse.md | 23 - .../sendchatcompletionrequestrequest.md | 1 - docs/models/operations/transferintent.md | 34 - docs/models/operations/updateguardraildata.md | 31 - .../operations/updateguardrailrequest.md | 4 +- .../operations/updateguardrailrequestbody.md | 22 - .../updateguardrailresetintervalrequest.md | 19 - .../updateguardrailresetintervalresponse.md | 19 - .../operations/updateguardrailresponse.md | 23 - docs/models/operations/usage.md | 20 - docs/models/operations/web3data.md | 35 - docs/models/outputmodality.md | 2 +- docs/models/outputtokensdetails.md | 2 +- docs/models/pdfparserengine.md | 2 +- docs/models/pdfparseroptions.md | 6 +- docs/models/providerpreferences.md | 12 +- docs/models/providerpreferencesby.md | 19 - docs/models/providerpreferencesignore.md | 17 - docs/models/providerpreferencesmaxprice.md | 21 - docs/models/providerpreferencesonly.md | 17 - docs/models/providerpreferencesorder.md | 17 - docs/models/providerpreferencespartition.md | 19 - .../models/providerpreferencesprovidersort.md | 19 - .../providerpreferencesprovidersortconfig.md | 16 - ...oviderpreferencesprovidersortconfigenum.md | 15 - ...viderpreferencesprovidersortconfigunion.md | 19 - docs/models/providerpreferencessortenum.md | 17 - docs/models/providerpreferencessortunion.md | 25 - docs/models/publicendpoint.md | 8 +- docs/models/reasoning.md | 8 +- docs/models/reasoningdetailencrypted.md | 14 +- docs/models/reasoningdetailencryptedformat.md | 17 - docs/models/reasoningdetailsummary.md | 14 +- docs/models/reasoningdetailsummaryformat.md | 17 - docs/models/reasoningdetailtext.md | 16 +- docs/models/reasoningdetailtextformat.md | 17 - docs/models/responseoutputtext.md | 12 +- docs/models/responseoutputtexttoplogprob.md | 4 +- docs/models/tokenizer.md | 2 +- docs/models/urlcitation.md | 8 +- docs/models/websearchengine.md | 2 +- docs/sdks/analytics/README.md | 3 +- docs/sdks/apikeys/README.md | 24 +- docs/sdks/chat/README.md | 4 + docs/sdks/credits/README.md | 97 +- docs/sdks/embeddings/README.md | 8 +- docs/sdks/guardrails/README.md | 112 +- docs/sdks/oauth/README.md | 10 + docs/sdks/responses/README.md | 10 +- examples/betaResponsesSend.example.ts | 5 +- jsr.json | 2 +- package.json | 10 +- src/funcs/analyticsGetUserActivity.ts | 29 +- src/funcs/apiKeysCreate.ts | 12 +- src/funcs/apiKeysDelete.ts | 12 +- src/funcs/apiKeysGet.ts | 12 +- src/funcs/apiKeysGetCurrentKeyMetadata.ts | 12 +- src/funcs/apiKeysList.ts | 12 +- src/funcs/apiKeysUpdate.ts | 12 +- src/funcs/betaResponsesSend.ts | 12 +- src/funcs/chatSend.ts | 12 +- src/funcs/creditsGetCredits.ts | 12 +- src/funcs/embeddingsGenerate.ts | 12 +- src/funcs/embeddingsListModels.ts | 12 +- src/funcs/endpointsList.ts | 12 +- src/funcs/endpointsListZdrEndpoints.ts | 12 +- src/funcs/generationsGetGeneration.ts | 12 +- src/funcs/guardrailsBulkAssignKeys.ts | 25 +- src/funcs/guardrailsBulkAssignMembers.ts | 25 +- src/funcs/guardrailsBulkUnassignKeys.ts | 25 +- src/funcs/guardrailsBulkUnassignMembers.ts | 28 +- src/funcs/guardrailsCreate.ts | 25 +- src/funcs/guardrailsDelete.ts | 21 +- src/funcs/guardrailsGet.ts | 21 +- src/funcs/guardrailsList.ts | 146 +- .../guardrailsListGuardrailKeyAssignments.ts | 151 +- ...uardrailsListGuardrailMemberAssignments.ts | 148 +- src/funcs/guardrailsListKeyAssignments.ts | 146 +- src/funcs/guardrailsListMemberAssignments.ts | 146 +- src/funcs/guardrailsUpdate.ts | 25 +- src/funcs/modelsCount.ts | 12 +- src/funcs/modelsList.ts | 12 +- src/funcs/modelsListForUser.ts | 12 +- src/funcs/oAuthCreateAuthCode.ts | 12 +- src/funcs/oAuthExchangeAuthCodeForAPIKey.ts | 12 +- src/funcs/organizationListMembers.ts | 284 + src/funcs/providersList.ts | 12 +- ...reateCoinbaseCharge.ts => rerankRerank.ts} | 106 +- src/lib/config.ts | 4 +- src/models/activityitem.ts | 8 +- src/models/activityresponse.ts | 35 + src/models/annotationaddedevent.ts | 8 +- src/models/anthropiccachecontroldirective.ts | 56 + src/models/anthropiccachecontrolttl.ts | 27 + src/models/autorouterplugin.ts | 48 + src/models/baseinputsunion.ts | 518 +- src/models/basereasoningconfig.ts | 20 +- src/models/bulkassignkeysrequest.ts | 39 + src/models/bulkassignkeysresponse.ts | 39 + src/models/bulkassignmembersrequest.ts | 39 + src/models/bulkassignmembersresponse.ts | 39 + src/models/bulkunassignkeysrequest.ts | 39 + src/models/bulkunassignkeysresponse.ts | 39 + src/models/bulkunassignmembersrequest.ts | 39 + src/models/bulkunassignmembersresponse.ts | 39 + src/models/chataudiooutput.ts | 4 +- src/models/chatchoice.ts | 10 +- src/models/chatcontentaudio.ts | 23 +- src/models/chatcontentcachecontrol.ts | 33 +- src/models/chatcontentfile.ts | 23 +- src/models/chatcontentimage.ts | 24 +- src/models/chatcontentitems.ts | 84 +- src/models/chatfunctiontool.ts | 16 +- src/models/chatrequest.ts | 1015 +- src/models/chatresult.ts | 2 +- src/models/chatstreamchoice.ts | 10 +- src/models/chatstreamchunk.ts | 4 +- src/models/chatstreamtoolcall.ts | 2 +- src/models/chattokenlogprob.ts | 4 +- src/models/chatusage.ts | 30 +- src/models/chatwebsearchservertool.ts | 229 - src/models/chatwebsearchshorthand.ts | 330 +- src/models/computeruseservertool.ts | 8 +- src/models/contentpartaddedevent.ts | 34 +- src/models/contentpartdoneevent.ts | 34 +- src/models/contextcompressionplugin.ts | 47 + src/models/createchargerequest.ts | 58 - src/models/createguardrailrequest.ts | 90 + src/models/createguardrailresponse.ts | 32 + src/models/customtool.ts | 30 +- src/models/datacollection.ts | 34 - src/models/defaultparameters.ts | 20 +- src/models/deleteguardrailresponse.ts | 34 + src/models/errorevent.ts | 2 +- src/models/filecitation.ts | 4 +- src/models/fileparserplugin.ts | 48 + src/models/filepath.ts | 4 +- src/models/filesearchservertool.ts | 112 +- src/models/formats.ts | 16 +- src/models/functioncallargsdeltaevent.ts | 4 +- src/models/functioncallargsdoneevent.ts | 4 +- src/models/functioncallitem.ts | 12 +- src/models/functioncalloutputitem.ts | 23 +- src/models/getguardrailresponse.ts | 32 + src/models/guardrail.ts | 97 + src/models/guardrailinterval.ts | 32 + src/models/imagegencallcompletedevent.ts | 4 +- src/models/imagegencallgeneratingevent.ts | 4 +- src/models/imagegencallinprogressevent.ts | 4 +- src/models/imagegencallpartialimageevent.ts | 6 +- src/models/imagegenerationservertool.ts | 8 +- src/models/index.ts | 65 +- src/models/inputaudio.ts | 22 +- src/models/inputsunion.ts | 34 +- src/models/keyassignment.ts | 72 + src/models/legacywebsearchservertool.ts | 120 +- src/models/listendpointsresponse.ts | 3 +- src/models/listguardrailsresponse.ts | 45 + src/models/listkeyassignmentsresponse.ts | 45 + src/models/listmemberassignmentsresponse.ts | 48 + src/models/mcpservertool.ts | 154 +- src/models/memberassignment.ts | 68 + src/models/model.ts | 12 +- src/models/modelgroup.ts | 1 + src/models/modellinks.ts | 35 + src/models/modelscountresponse.ts | 2 +- src/models/moderationplugin.ts | 31 + src/models/openairesponsefunctiontoolcall.ts | 63 + .../openairesponsefunctiontoolcalloutput.ts | 170 + src/models/openairesponseinputmessageitem.ts | 175 + src/models/openairesponsesannotation.ts | 18 +- src/models/openairesponsestoolchoiceunion.ts | 10 + src/models/openresponsescreatedevent.ts | 50 + src/models/openresponsesinprogressevent.ts | 50 + src/models/openresponsesresult.ts | 113 +- src/models/openrouterwebsearchservertool.ts | 57 + .../operations/bulkassignkeystoguardrail.ts | 80 +- .../bulkassignmemberstoguardrail.ts | 82 +- .../bulkunassignkeysfromguardrail.ts | 82 +- .../bulkunassignmembersfromguardrail.ts | 88 +- src/models/operations/createauthkeyscode.ts | 2 +- src/models/operations/createcoinbasecharge.ts | 297 - src/models/operations/createembeddings.ts | 98 +- src/models/operations/createguardrail.ts | 254 +- src/models/operations/createkeys.ts | 21 +- src/models/operations/creatererank.ts | 317 + src/models/operations/deleteguardrail.ts | 31 - src/models/operations/getcurrentkey.ts | 10 +- src/models/operations/getgeneration.ts | 242 +- src/models/operations/getguardrail.ts | 144 - src/models/operations/getkey.ts | 8 +- src/models/operations/getmodels.ts | 3 + src/models/operations/getuseractivity.ts | 42 +- src/models/operations/index.ts | 3 +- src/models/operations/list.ts | 14 +- src/models/operations/listendpoints.ts | 6 + .../operations/listguardrailkeyassignments.ts | 94 +- .../listguardrailmemberassignments.ts | 89 +- src/models/operations/listguardrails.ts | 140 +- src/models/operations/listkeyassignments.ts | 94 +- .../operations/listmemberassignments.ts | 88 +- .../operations/listorganizationmembers.ts | 229 + src/models/operations/updateguardrail.ts | 254 +- src/models/operations/updatekeys.ts | 14 +- src/models/outputdatetimeitem.ts | 26 +- src/models/outputmessage.ts | 27 +- src/models/outputmessageitem.ts | 27 +- src/models/outputmodality.ts | 1 + src/models/outputreasoningitem.ts | 38 +- src/models/outputservertoolitem.ts | 33 +- src/models/outputwebsearchcallitem.ts | 96 +- src/models/percentilelatencycutoffs.ts | 24 +- src/models/percentilethroughputcutoffs.ts | 24 +- .../preview20250311websearchservertool.ts | 131 +- src/models/previewwebsearchservertool.ts | 120 +- src/models/providerpreferences.ts | 347 +- src/models/providerresponse.ts | 199 + src/models/publicendpoint.ts | 26 +- src/models/reasoningconfig.ts | 26 +- src/models/reasoningdeltaevent.ts | 6 +- src/models/reasoningdetailencrypted.ts | 40 +- src/models/reasoningdetailsummary.ts | 40 +- src/models/reasoningdetailtext.ts | 40 +- src/models/reasoningdetailunion.ts | 15 +- src/models/reasoningdoneevent.ts | 6 +- src/models/reasoningeffort.ts | 29 + src/models/reasoningeffortenum.ts | 29 - src/models/reasoningformat.ts | 29 + src/models/reasoningitem.ts | 27 +- src/models/reasoningsummarypartaddedevent.ts | 6 +- src/models/reasoningsummarypartdoneevent.ts | 6 +- src/models/reasoningsummarytextdeltaevent.ts | 6 +- src/models/reasoningsummarytextdoneevent.ts | 6 +- src/models/reasoningsummaryverbosity.ts | 28 + src/models/reasoningsummaryverbosityenum.ts | 28 - src/models/refusaldeltaevent.ts | 6 +- src/models/refusaldoneevent.ts | 6 +- src/models/responsehealingplugin.ts | 37 + src/models/responseoutputtext.ts | 67 +- src/models/responsesrequest.ts | 778 +- src/models/searchqualitylevel.ts | 27 + src/models/streamevents.ts | 381 +- src/models/streameventsresponsecompleted.ts | 50 + src/models/streameventsresponsefailed.ts | 50 + src/models/streameventsresponseincomplete.ts | 50 + .../streameventsresponseoutputitemadded.ts | 51 + .../streameventsresponseoutputitemdone.ts | 51 + src/models/streamlogprob.ts | 47 + src/models/streamlogprobtoplogprob.ts | 38 + src/models/textdeltaevent.ts | 76 +- src/models/textdoneevent.ts | 76 +- src/models/toolcallstatus.ts | 22 + src/models/toolcallstatusenum.ts | 26 - src/models/toolchoiceallowed.ts | 130 + src/models/topproviderinfo.ts | 8 +- src/models/traceconfig.ts | 58 + .../{truncationenum.ts => truncation.ts} | 10 +- src/models/updateguardrailrequest.ts | 90 + src/models/updateguardrailresponse.ts | 32 + src/models/urlcitation.ts | 8 +- src/models/usage.ts | 18 +- src/models/websearchcallcompletedevent.ts | 4 +- src/models/websearchcallinprogressevent.ts | 4 +- src/models/websearchcallsearchingevent.ts | 4 +- src/models/websearchconfig.ts | 91 + src/models/websearchdomainfilter.ts | 65 + src/models/websearchengineenum.ts | 34 + src/models/websearchplugin.ts | 71 + src/models/websearchservertool.ts | 116 +- src/models/websearchservertoolopenrouter.ts | 4 +- src/models/websearchsource.ts | 67 + src/models/websearchuserlocationservertool.ts | 61 + src/sdk/analytics.ts | 3 +- src/sdk/credits.ts | 20 - src/sdk/guardrails.ts | 54 +- src/sdk/organization.ts | 30 + src/sdk/rerank.ts | 28 + src/sdk/sdk.ts | 22 +- 367 files changed, 19669 insertions(+), 22632 deletions(-) delete mode 100644 docs/models/chainid.md delete mode 100644 docs/models/createchargerequest.md delete mode 100644 docs/models/operations/bulkassignkeystoguardrailrequestbody.md delete mode 100644 docs/models/operations/bulkassignkeystoguardrailresponse.md delete mode 100644 docs/models/operations/bulkassignmemberstoguardrailrequestbody.md delete mode 100644 docs/models/operations/bulkassignmemberstoguardrailresponse.md delete mode 100644 docs/models/operations/bulkunassignkeysfromguardrailrequestbody.md delete mode 100644 docs/models/operations/bulkunassignkeysfromguardrailresponse.md delete mode 100644 docs/models/operations/bulkunassignmembersfromguardrailrequestbody.md delete mode 100644 docs/models/operations/bulkunassignmembersfromguardrailresponse.md delete mode 100644 docs/models/operations/calldata.md delete mode 100644 docs/models/operations/createcoinbasechargedata.md delete mode 100644 docs/models/operations/createcoinbasechargeglobals.md delete mode 100644 docs/models/operations/createcoinbasechargerequest.md delete mode 100644 docs/models/operations/createcoinbasechargeresponse.md delete mode 100644 docs/models/operations/createcoinbasechargesecurity.md delete mode 100644 docs/models/operations/createguardraildata.md delete mode 100644 docs/models/operations/createguardrailrequestbody.md delete mode 100644 docs/models/operations/createguardrailresetintervalrequest.md delete mode 100644 docs/models/operations/createguardrailresetintervalresponse.md delete mode 100644 docs/models/operations/createguardrailresponse.md delete mode 100644 docs/models/operations/deleteguardrailresponse.md delete mode 100644 docs/models/operations/getguardraildata.md delete mode 100644 docs/models/operations/getguardrailresetinterval.md delete mode 100644 docs/models/operations/getguardrailresponse.md delete mode 100644 docs/models/operations/getuseractivityresponse.md delete mode 100644 docs/models/operations/listguardrailkeyassignmentsdata.md delete mode 100644 docs/models/operations/listguardrailmemberassignmentsdata.md delete mode 100644 docs/models/operations/listguardrailsdata.md delete mode 100644 docs/models/operations/listguardrailsresetinterval.md delete mode 100644 docs/models/operations/listkeyassignmentsdata.md delete mode 100644 docs/models/operations/listmemberassignmentsdata.md delete mode 100644 docs/models/operations/metadata.md delete mode 100644 docs/models/operations/providername.md delete mode 100644 docs/models/operations/providerresponse.md delete mode 100644 docs/models/operations/transferintent.md delete mode 100644 docs/models/operations/updateguardraildata.md delete mode 100644 docs/models/operations/updateguardrailrequestbody.md delete mode 100644 docs/models/operations/updateguardrailresetintervalrequest.md delete mode 100644 docs/models/operations/updateguardrailresetintervalresponse.md delete mode 100644 docs/models/operations/updateguardrailresponse.md delete mode 100644 docs/models/operations/usage.md delete mode 100644 docs/models/operations/web3data.md delete mode 100644 docs/models/providerpreferencesby.md delete mode 100644 docs/models/providerpreferencesignore.md delete mode 100644 docs/models/providerpreferencesmaxprice.md delete mode 100644 docs/models/providerpreferencesonly.md delete mode 100644 docs/models/providerpreferencesorder.md delete mode 100644 docs/models/providerpreferencespartition.md delete mode 100644 docs/models/providerpreferencesprovidersort.md delete mode 100644 docs/models/providerpreferencesprovidersortconfig.md delete mode 100644 docs/models/providerpreferencesprovidersortconfigenum.md delete mode 100644 docs/models/providerpreferencesprovidersortconfigunion.md delete mode 100644 docs/models/providerpreferencessortenum.md delete mode 100644 docs/models/providerpreferencessortunion.md delete mode 100644 docs/models/reasoningdetailencryptedformat.md delete mode 100644 docs/models/reasoningdetailsummaryformat.md delete mode 100644 docs/models/reasoningdetailtextformat.md create mode 100644 src/funcs/organizationListMembers.ts rename src/funcs/{creditsCreateCoinbaseCharge.ts => rerankRerank.ts} (64%) create mode 100644 src/models/activityresponse.ts create mode 100644 src/models/anthropiccachecontroldirective.ts create mode 100644 src/models/anthropiccachecontrolttl.ts create mode 100644 src/models/autorouterplugin.ts create mode 100644 src/models/bulkassignkeysrequest.ts create mode 100644 src/models/bulkassignkeysresponse.ts create mode 100644 src/models/bulkassignmembersrequest.ts create mode 100644 src/models/bulkassignmembersresponse.ts create mode 100644 src/models/bulkunassignkeysrequest.ts create mode 100644 src/models/bulkunassignkeysresponse.ts create mode 100644 src/models/bulkunassignmembersrequest.ts create mode 100644 src/models/bulkunassignmembersresponse.ts delete mode 100644 src/models/chatwebsearchservertool.ts create mode 100644 src/models/contextcompressionplugin.ts delete mode 100644 src/models/createchargerequest.ts create mode 100644 src/models/createguardrailrequest.ts create mode 100644 src/models/createguardrailresponse.ts delete mode 100644 src/models/datacollection.ts create mode 100644 src/models/deleteguardrailresponse.ts create mode 100644 src/models/fileparserplugin.ts create mode 100644 src/models/getguardrailresponse.ts create mode 100644 src/models/guardrail.ts create mode 100644 src/models/guardrailinterval.ts create mode 100644 src/models/keyassignment.ts create mode 100644 src/models/listguardrailsresponse.ts create mode 100644 src/models/listkeyassignmentsresponse.ts create mode 100644 src/models/listmemberassignmentsresponse.ts create mode 100644 src/models/memberassignment.ts create mode 100644 src/models/modellinks.ts create mode 100644 src/models/moderationplugin.ts create mode 100644 src/models/openairesponsefunctiontoolcall.ts create mode 100644 src/models/openairesponsefunctiontoolcalloutput.ts create mode 100644 src/models/openairesponseinputmessageitem.ts create mode 100644 src/models/openresponsescreatedevent.ts create mode 100644 src/models/openresponsesinprogressevent.ts create mode 100644 src/models/openrouterwebsearchservertool.ts delete mode 100644 src/models/operations/createcoinbasecharge.ts create mode 100644 src/models/operations/creatererank.ts create mode 100644 src/models/operations/listorganizationmembers.ts create mode 100644 src/models/providerresponse.ts create mode 100644 src/models/reasoningeffort.ts delete mode 100644 src/models/reasoningeffortenum.ts create mode 100644 src/models/reasoningformat.ts create mode 100644 src/models/reasoningsummaryverbosity.ts delete mode 100644 src/models/reasoningsummaryverbosityenum.ts create mode 100644 src/models/responsehealingplugin.ts create mode 100644 src/models/searchqualitylevel.ts create mode 100644 src/models/streameventsresponsecompleted.ts create mode 100644 src/models/streameventsresponsefailed.ts create mode 100644 src/models/streameventsresponseincomplete.ts create mode 100644 src/models/streameventsresponseoutputitemadded.ts create mode 100644 src/models/streameventsresponseoutputitemdone.ts create mode 100644 src/models/streamlogprob.ts create mode 100644 src/models/streamlogprobtoplogprob.ts create mode 100644 src/models/toolcallstatus.ts delete mode 100644 src/models/toolcallstatusenum.ts create mode 100644 src/models/toolchoiceallowed.ts create mode 100644 src/models/traceconfig.ts rename src/models/{truncationenum.ts => truncation.ts} (52%) create mode 100644 src/models/updateguardrailrequest.ts create mode 100644 src/models/updateguardrailresponse.ts create mode 100644 src/models/websearchconfig.ts create mode 100644 src/models/websearchdomainfilter.ts create mode 100644 src/models/websearchengineenum.ts create mode 100644 src/models/websearchplugin.ts create mode 100644 src/models/websearchsource.ts create mode 100644 src/models/websearchuserlocationservertool.ts create mode 100644 src/sdk/organization.ts create mode 100644 src/sdk/rerank.ts diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 7818b9cf..cbe4c329 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,17 +1,17 @@ lockVersion: "" id: "" management: - docChecksum: 53338db6c6ec6141b5611b5c49b639ca + docChecksum: e17c70bd30e5f50c22a5f65fc1a942f9 docVersion: 1.0.0 speakeasyVersion: 1.761.0 generationVersion: 2.879.1 - releaseVersion: 0.11.2 - configChecksum: cb6df38c79eadf6eb9d3ee86f03356f9 + releaseVersion: 0.12.0 + configChecksum: ce2fbc0fd8b350e2f4fda9614965fb5d published: true persistentEdits: - generation_id: 8139616c-a235-4a61-8d59-af8e498676d5 - pristine_commit_hash: 21d00ec860fd35e2e7499eeedc5a5c82c17b493e - pristine_tree_hash: 7b816c6b21456f9ec642272b908f0c3ce0ff9f5b + generation_id: fa0796d6-c0ea-4eb2-b0f3-8a853707c2cf + pristine_commit_hash: 6fd2b1b17791153a7534ab195dc3290fea02d2e7 + pristine_tree_hash: 970aeb3946db434aaafc5078e94be68646d2146f features: typescript: acceptHeaders: 2.81.2 @@ -37,6 +37,7 @@ features: nameOverrides: 2.81.4 nullables: 0.1.1 openEnums: 0.1.2 + pagination: 2.83.2 responseFormat: 0.3.0 retries: 2.83.0 sdkHooks: 0.4.0 @@ -63,16 +64,16 @@ trackedFiles: pristine_git_object: 113eead5093c17d43a46159132885318f281a68a FUNCTIONS.md: id: 21b9df02aaeb - last_write_checksum: sha1:9da5c4523c38a1e3d66595438bc0dcf71d9473b2 - pristine_git_object: 567e560be67fa8292b39edbf8e456b86de2e53df + last_write_checksum: sha1:8015200b841ed29f42a16e6995bd9eccf1d47f31 + pristine_git_object: a4ada74e85c01b97088e3c261146d83763d74e78 RUNTIMES.md: id: 620c490847b6 last_write_checksum: sha1:e45b854f02c357cbcfdb8c3663000e8339e16505 pristine_git_object: 27731c3b5ace66bedc454ed5acbe15075aacd3dc USAGE.md: id: 3aed33ce6e6f - last_write_checksum: sha1:b5d92c688a56ab1c0b76aa34cbac03ed89f3d801 - pristine_git_object: 69c81d0d165391cb64a26d033c987d065f9f9830 + last_write_checksum: sha1:7e8feeedeae703c0a0932b486c65c41a07a5ad10 + pristine_git_object: c01b12b9dd3b67c6dd82491633267d0a04296879 docs/lib/utils/retryconfig.md: id: 0ce9707cb848 last_write_checksum: sha1:bc4454e196fcd219f5a78da690375a884f5ed07b @@ -91,32 +92,56 @@ trackedFiles: pristine_git_object: 5563636092178fc7f98d571c8443fb8d2ae61806 docs/models/actionsearch.md: id: 52ec8c04eadc - last_write_checksum: sha1:8b4f14fd19abb9f25a3f51dbb29bf7712cad9c67 - pristine_git_object: 6f80a5536ddd27c3926ae1f4333d66ae85412bf6 + last_write_checksum: sha1:6474a59ff22860995ae8461ef576e9c5f76cbcfe + pristine_git_object: 7d95cdf0a390b8007ff0f599150a78cbd2842fd2 docs/models/activityitem.md: id: f0c5f0e6c469 last_write_checksum: sha1:d25ad4a8896acf08a136b24bdeca528217e63366 pristine_git_object: 761ca947b3ed048a95b168c2167d5806536ef64a + docs/models/activityresponse.md: + id: 5f8df7ea105d + last_write_checksum: sha1:e80d856f77247563e73d73b56745a74f532ab9bf + pristine_git_object: dd9cc06404936aacab9b4898f6d699b82b3203d9 docs/models/allowedtools.md: id: 3173f34039d5 last_write_checksum: sha1:88a50744e9312e7b30f29130bcfcfc190ce6fd5f pristine_git_object: c0a3f36038e2c4859ba998970302c4ccabf9b797 + docs/models/allowedtoolsunion.md: + id: 799fcaf5d3ff + last_write_checksum: sha1:3da7bc09fea68a6efb108b613b37035cfe03cda3 + pristine_git_object: 5044879001f545ec94bc2c498273bd24271af33e docs/models/always.md: id: 017ae40db277 last_write_checksum: sha1:ad37e192d0d5375f48064a5ad6a0c3658ff5438e pristine_git_object: e642f971bacfad9e4b23959b7ba033e4508e3318 docs/models/annotationaddedevent.md: id: 1d604076bb55 - last_write_checksum: sha1:39c3b334fdde9ab8ec3fc776da8f23c866cc6c3e - pristine_git_object: 17364f4a9d6bc916c5736493ea05d47bc5e46cfb + last_write_checksum: sha1:aaee3a2019c019951a73f1f4c9e6419d4157fcdc + pristine_git_object: 3a1009d1ecb2d7fb4403e9de8ddccfc477aaddab + docs/models/anthropiccachecontroldirective.md: + id: e5e1a8c6dc4f + last_write_checksum: sha1:959d323ab713e5ec1a2a02d30ec9c7b8792752d5 + pristine_git_object: 0e632679bb2c3dd90c9ad228d82a32f33001e73c + docs/models/anthropiccachecontroldirectivetype.md: + id: 44e83d1047c1 + last_write_checksum: sha1:4a3a59725d916a09a2c5d70ef9645e73551c088f + pristine_git_object: bd79a337edb7298c9f4946366ab0305c87fdae86 + docs/models/anthropiccachecontrolttl.md: + id: 4d8e9fcb408a + last_write_checksum: sha1:19fc711a4800d37f8232832e79c8fd9fa8e15142 + pristine_git_object: c3c1e402505f9dbec0696e640ebdd1e41c0c6f64 docs/models/applypatchservertool.md: id: 86422c274e49 last_write_checksum: sha1:7b838dc21985c762b5601f73262507ca3a9c527e pristine_git_object: a4450c0df68af7848df2d4f702833f1dbac8d7c2 docs/models/architecture.md: id: b8d52e1654c4 - last_write_checksum: sha1:07517ea9f4d701aa89a5980faf33d5048d43e78a - pristine_git_object: a79153a013b15854d652f570cbc42de986a706b9 + last_write_checksum: sha1:1cbb43f5c29fe5eee4076ef94d4902bca607c132 + pristine_git_object: f5634988185aab2ecf39a0e9f873532ee8c36597 + docs/models/autorouterplugin.md: + id: 96e009b23f15 + last_write_checksum: sha1:1a8445df84205b92532ba7e63c43c086ec780568 + pristine_git_object: b9cb2922fd7834e3d2cdbe6d0f423205e619b83a docs/models/background.md: id: 3b0fc0aed098 last_write_checksum: sha1:fc5a93bba90a86a1dfdd0f97f34dda7f224d20b0 @@ -137,34 +162,10 @@ trackedFiles: id: 9ff39b056162 last_write_checksum: sha1:118884d8ba3abb7a260466f46ab151b47befb159 pristine_git_object: 183a144c7eed2650437b7ee390b69509590df6fd - docs/models/baseinputscontent3.md: - id: 2cd205cd13db - last_write_checksum: sha1:1fd988e22799b42129c714f662187644436114b2 - pristine_git_object: 41412bd8f5294b6f4b2cdfc2ca0a4b591ee19e2d - docs/models/baseinputsfunctioncall.md: - id: 7d80cf55ff93 - last_write_checksum: sha1:01dc48d31853e62bbf4ac190676b471dacee4b1d - pristine_git_object: ed9d1c7e92b76108cf64bb1e3d0c21fb1fbc5ffa - docs/models/baseinputsfunctioncalloutput.md: - id: f88098b5bc1e - last_write_checksum: sha1:9a1945a0b374e2960a8b0317a00bc4526c857a98 - pristine_git_object: 83f3e99610046440ba676d30229b13c1328ff4cd - docs/models/baseinputsmessage1.md: - id: 2c0df9eeeace - last_write_checksum: sha1:edebb94c9aedbe72b331b91772cdf52bff855d6f - pristine_git_object: bdd8886ce5efc24a65f2ccdb00aa103e540bdb7e - docs/models/baseinputsmessage2.md: - id: 5fd83291861b - last_write_checksum: sha1:05065fe045dbb9b277c9a9928b9b1c61a0bd582b - pristine_git_object: 89bbeb5c73ab1b122c98a5328d03eb1a4e69f53c - docs/models/baseinputsoutput1.md: - id: 2462dec70a21 - last_write_checksum: sha1:2f266e3a355f9dad300ba06f5c104b09798253b9 - pristine_git_object: 895fabf493219f798e343a74d75e2776543bb243 - docs/models/baseinputsoutput2.md: - id: 57e458ff952a - last_write_checksum: sha1:ad050231b7ef220a7e1f3ea9a8fa95519df75407 - pristine_git_object: 2fccf811e8b1336e78b4793085df8942c6ffde57 + docs/models/baseinputsmessage.md: + id: a26c17ca90ad + last_write_checksum: sha1:044b5bc8f1052ba44d977bd38675d541d44be301 + pristine_git_object: 2ff7b4344db0109ba5e751336cac3f04da71fa31 docs/models/baseinputsphasecommentary.md: id: 3f7a31a54a46 last_write_checksum: sha1:d7446198ff18f611f04507532e135afca6784cde @@ -181,78 +182,74 @@ trackedFiles: id: 9a453e6e3fef last_write_checksum: sha1:c7927dfe823136f85afb70780544d06cc7c53942 pristine_git_object: b503a86ec09c06007ad5bc6df66790392197d743 - docs/models/baseinputsroledeveloper1.md: - id: 061f3a9a093f - last_write_checksum: sha1:55704aef4c6ea3b02de2489ce2510fbb1bff6ebf - pristine_git_object: 1364ec941eaac7b1c3248939f63efe176cbf6817 - docs/models/baseinputsroledeveloper2.md: - id: 97765303644d - last_write_checksum: sha1:5fc3c51b359cac9ef15aa379c9d2a918e73f520c - pristine_git_object: f4841e0ed781b47db7d5d97fedf7d75db3644474 - docs/models/baseinputsrolesystem1.md: - id: 776d0d7e748a - last_write_checksum: sha1:069270699b91c9db6d18cd7701bc89b17c8e65b5 - pristine_git_object: c1b7c0e617bfe17da5effe342d2de4be0d0049dd - docs/models/baseinputsrolesystem2.md: - id: a204cc35e292 - last_write_checksum: sha1:8a660c86a8f459fd498dc45e4ceb71aa90b10976 - pristine_git_object: 2ad2cab47e341c42e81499435f667b0a57ad7c40 - docs/models/baseinputsroleunion1.md: - id: 17522e5cd202 - last_write_checksum: sha1:113962c2b3ae83a2c848063279172b1309453618 - pristine_git_object: a7510dec0afc5529239f61ab2900df5b05328dec - docs/models/baseinputsroleunion2.md: - id: 0ce835fd7632 - last_write_checksum: sha1:01870c191c36a9201fa633de39981e350b9d571b - pristine_git_object: 89e28aff9e62dbf2b1e8e9ed06492415b40d91ef - docs/models/baseinputsroleuser1.md: - id: e6aee8cd67da - last_write_checksum: sha1:d325d03d3779c606d224f6b836775952b5753123 - pristine_git_object: ec0725bd76364ed5359b642aaf265dab1851266a - docs/models/baseinputsroleuser2.md: - id: 3d2ec25386df - last_write_checksum: sha1:4e8d2988c9d651842a5a706477e4b80ac9c797b0 - pristine_git_object: a96b9cc3dc64f050839916c06e617d787a303d15 - docs/models/baseinputstypefunctioncall.md: - id: a2a86c705c44 - last_write_checksum: sha1:36b47478e34cbca8173258fac7e84b38f51ff610 - pristine_git_object: 42d85d0e01df34a14f5b50672e25e3082358845c - docs/models/baseinputstypefunctioncalloutput.md: - id: 3dcae4b37ef1 - last_write_checksum: sha1:fa33559e9808060e451becbadc4a0f8b21406688 - pristine_git_object: 0bb8fd06f73b5d1bea42ea7a256205aa84907ae7 - docs/models/baseinputstypemessage1.md: - id: 46f5e4b087f2 - last_write_checksum: sha1:db7e17852d5c5469e0f9fe497a765650437c84e1 - pristine_git_object: 09b3b474baf80176a336286dee6f40c54f6337d1 - docs/models/baseinputstypemessage2.md: - id: 0feff33d0040 - last_write_checksum: sha1:4198b5597b447a676915aa9f7bb9ebb72245b938 - pristine_git_object: d88208d2a75c2a8f4e7e5cb1ab0746f69eccf2d4 + docs/models/baseinputsroledeveloper.md: + id: 83eb2643d288 + last_write_checksum: sha1:33cb470581abcf0668d92763361a9f7619ed0f47 + pristine_git_object: 545693eddb51403af4935a3726e3b68c56c89b26 + docs/models/baseinputsrolesystem.md: + id: efe2e0892905 + last_write_checksum: sha1:095f930d893b2d00d71591d503ed5ec12c2a682d + pristine_git_object: 9f016caacff9167b9173080f7ca331a90e358ccf + docs/models/baseinputsroleunion.md: + id: b69e4bb1d653 + last_write_checksum: sha1:81e0a7af94e67c2516f5d744e3c27ff37eaaa500 + pristine_git_object: 7cde7ec544019ea27a2705125fa527130973c6de + docs/models/baseinputsroleuser.md: + id: c1f79580d33b + last_write_checksum: sha1:bc3a7930f828a0e9c9ab4f912778f2141fb107b5 + pristine_git_object: e3b2fcd6d3b83a88d08277d00cf3774e36672541 + docs/models/baseinputstype.md: + id: 1916cc95348c + last_write_checksum: sha1:4fa09d3e3ad0ef017d2c63ec838ed7e87a718f5b + pristine_git_object: 65db0044d84508dae08dcef32f1615580e0e9e13 docs/models/baseinputsunion.md: id: acf51dd81540 - last_write_checksum: sha1:66f7da1f7fd6bca289746e92f08ff9b36c743271 - pristine_git_object: 4a58d9699b6609ed7296eb2c55423b73113cca56 + last_write_checksum: sha1:af6347705b58d96e7760a7b2acf5dbbe50c37328 + pristine_git_object: 7e78dba89627e17d57e8d1729a695ec33d9b51e6 docs/models/baseinputsunion1.md: id: e083f1968ab3 - last_write_checksum: sha1:b9f08e0bc92198afed2c616397ea55166f447ab2 - pristine_git_object: 7648510ce73a0a4ccbbefb4f1edace69f015aa95 + last_write_checksum: sha1:f9cd919929e2981e8f64cd7a64e97dafeac05f2f + pristine_git_object: ef4ab45be2c7a26e47320eda0d9d9efb3f2b6caf docs/models/basereasoningconfig.md: id: 8308c44bb9c7 - last_write_checksum: sha1:fee455a7127694d6c198e4d470de659821b95f0b - pristine_git_object: 43c62a4eae3a194be213bd211b6bde6444193adc + last_write_checksum: sha1:a504443b302942f12579204e417e34ac95c413be + pristine_git_object: 4c96db94d9a095d9876a798e0f5a7dd539a9ced1 + docs/models/bulkassignkeysrequest.md: + id: 9cfb139549ed + last_write_checksum: sha1:8cf072c06dddf618729602465d28edb50f2adcc3 + pristine_git_object: f01f5fd0f6342b9ec9be7a26ebcb0eea2ae89c2d + docs/models/bulkassignkeysresponse.md: + id: f752ed631f39 + last_write_checksum: sha1:e87d6cb3cbfd2b4c7d316f11aed1ac695e5b08a5 + pristine_git_object: d61d4a1341f827f30d676490bc6729d78109453e + docs/models/bulkassignmembersrequest.md: + id: fb6fb3edd8f7 + last_write_checksum: sha1:44e40e4f80757491a7f3fa01b2f6e26635313893 + pristine_git_object: 9f798a29aff2c47b7f91c486b7b7ce1d842aa849 + docs/models/bulkassignmembersresponse.md: + id: eb9e5a0a2312 + last_write_checksum: sha1:66c0c86313e06b49941d8a5d0104637255b4e877 + pristine_git_object: 0a717fd0a9809127b9ea6e4fc2d648398cf3195b + docs/models/bulkunassignkeysrequest.md: + id: 711f5746cb02 + last_write_checksum: sha1:bca27344491ac4c5b1561f1a5b65f173015458bb + pristine_git_object: 216e599bd1b340ce77acd32c9cff8a2822015b75 + docs/models/bulkunassignkeysresponse.md: + id: 7ba9802caa8c + last_write_checksum: sha1:fe9561cbcc609c235f2b485cb83e19b0f14edb13 + pristine_git_object: 3bf8fc1c4ae35f7aa937cac31ebe702f14becd33 + docs/models/bulkunassignmembersrequest.md: + id: 2690f9ece950 + last_write_checksum: sha1:4e3a7ddc522fd6ba131329f605d41d4d2a6b2dc6 + pristine_git_object: 4f354ccbc14d96baa89ebdf49cefac3e15270a00 + docs/models/bulkunassignmembersresponse.md: + id: b08ccd3296bc + last_write_checksum: sha1:99f665fd768fd8862faa6cc708c317d2a7dd58e1 + pristine_git_object: 4e2e59f2e8fcc85c7bd610dd8f2d12aff6d4a518 docs/models/by.md: id: 197cbd9579c6 last_write_checksum: sha1:70cc2bb47d31c43c21d8da48a6cdbd24b2e2d107 pristine_git_object: df6a62df09779a98e60c26f74be2b4f202ab89ac - docs/models/cachecontrol.md: - id: 400a7240e8c2 - last_write_checksum: sha1:0813cddf0350d7885b906084988a79ace1ddea15 - pristine_git_object: 380b74905beb105c6f4d6b58e60434a7a3135de6 - docs/models/chainid.md: - id: 9136f718f4f8 - last_write_checksum: sha1:5b28e1cc07ba022cb361fd06b77b25a2bdbee2b5 - pristine_git_object: f6f7a85f2de9a0bb24a92fef19b6c12e24551fff docs/models/chatassistantimages.md: id: c09d51959fbd last_write_checksum: sha1:ea0718a3034d9112be91f6829a0a94d531935b7a @@ -263,8 +260,8 @@ trackedFiles: pristine_git_object: 325a8ef210e4ab01df026ae7c7b369a546ca57a5 docs/models/chatassistantmessage.md: id: 7183e8263eac - last_write_checksum: sha1:051ecc668f4260c1bc74d51469d871aa7197a77c - pristine_git_object: 335a58099a70cd8ada77262787ea4f87cc2c00e8 + last_write_checksum: sha1:714d39b7a64b329ae6806261e67e2c1983417a86 + pristine_git_object: 61caca97277232318baaeaca44d2d90a17193ef4 docs/models/chatassistantmessagecontent.md: id: eb7111ca0687 last_write_checksum: sha1:7f1f50336f994a77bf727e8d0b742730143c1265 @@ -279,44 +276,32 @@ trackedFiles: pristine_git_object: 25b0cd6e1530a4e2ac0d0c19212811ed83fb2b31 docs/models/chatchoice.md: id: 1c73299cb3ce - last_write_checksum: sha1:a01bdfd8ea4e1eb6cf3e0889e84ae042264a129c - pristine_git_object: b35269e0b70976d2b2219a6c92668f36b361eed9 + last_write_checksum: sha1:40a47356ffa9a17c2f52ae3d0145f94991d53603 + pristine_git_object: 4d096de81fb6481a32a39d516704d939bd7b43e0 docs/models/chatcontentaudio.md: id: ae93c434ad94 - last_write_checksum: sha1:75bf945a4cb2f09102e17033114578b743ce4c7a - pristine_git_object: 03ecf628a801e9b8740449a0a26aca4feec67ec3 + last_write_checksum: sha1:c2da655f7ab1c158b06601d662e66753018876b0 + pristine_git_object: f14c7137aebf55c2143228e3557d38f6d60a11b3 docs/models/chatcontentaudioinputaudio.md: id: a0994738bcdc last_write_checksum: sha1:c3703257f9b71191b94db56edb619e1568e86dbb pristine_git_object: 863921c43c27c80d8b3202922d36597f57de4454 - docs/models/chatcontentaudiotype.md: - id: 81c54a2ab2bb - last_write_checksum: sha1:ae81710cf6ac42800bcd2b6f63aa54cc78a8bf01 - pristine_git_object: 7cd7f21bfa44fc8121bb7bba5a558c4942bbda94 docs/models/chatcontentcachecontrol.md: id: be65fe916de3 - last_write_checksum: sha1:3e304760ddf2bd7a71ebcdf3203e917d4913fffe - pristine_git_object: 590ba7a5d2dfbf01a6e49b60de302a0bf66ce203 - docs/models/chatcontentcachecontrolttl.md: - id: 6690e8c159f4 - last_write_checksum: sha1:cb75aa0d1ddc3b7fc37aa095d14ae8dab59087a3 - pristine_git_object: 027ffaf2f4013baa7230313aab6585b740377756 + last_write_checksum: sha1:4f065acc5b66eb2040590edfff7ec6a3451683f6 + pristine_git_object: 63c31101eba9e48f9cc9fd10be816a87928e0599 docs/models/chatcontentcachecontroltype.md: id: aad5ec29e485 last_write_checksum: sha1:dd906fe90c66b306db25c4c959fa2ae271e44c44 pristine_git_object: 19bab6f36dfc9fee17e36aefac071a9481354a99 docs/models/chatcontentfile.md: id: ed3ac87a8e07 - last_write_checksum: sha1:b90298def4e209b5788fef3b1608feaf4f6f57c2 - pristine_git_object: 95f7300d9d83f4c1e7eb74bca64e5527d87f6d1c - docs/models/chatcontentfiletype.md: - id: 4f9b3da2d6dc - last_write_checksum: sha1:0a90e0081e912976a4daaa05a972fbcf1b3eb6bb - pristine_git_object: 21976312659b8e35f6627b3dce26706f9e8ea687 + last_write_checksum: sha1:24079a8eabaadd7ec1088b035a4a954a60ee9c3f + pristine_git_object: 828d2d470ee5e74a26d821ee2ef3c8b3c0fbeffa docs/models/chatcontentimage.md: id: d9ee3295b615 - last_write_checksum: sha1:a222870fe804ccfc526fc1ea1d7c9e457f65ac9a - pristine_git_object: ac2723dfb38d8215f5bd3ff119241cd4fbe61411 + last_write_checksum: sha1:46e8ddf23e60c32655c98e3736a12cbaaac608de + pristine_git_object: 3ee114ce580870ae9de92cd1a996ce05baf02b9f docs/models/chatcontentimagedetail.md: id: e50ca4f20119 last_write_checksum: sha1:259941e6d6483ddca55edbe64ba580c4c5886ce8 @@ -325,18 +310,10 @@ trackedFiles: id: 5f969d5c40da last_write_checksum: sha1:bf9fc53d7559ebb0312492de15128eb8e4ae65cd pristine_git_object: 31bddc4f046db9f0ba1d28ded4f42e95b4f18d36 - docs/models/chatcontentimagetype.md: - id: 15e33559be57 - last_write_checksum: sha1:f36bcd88dce5eb3c120a6ad3984860dd0d82b6e7 - pristine_git_object: 2aee274ed6c4284bd18754101be643dbe3a13c30 docs/models/chatcontentitems.md: id: 2b67ca68344d - last_write_checksum: sha1:03de9e90ff328760caa80323411ec10910d8f0d1 - pristine_git_object: c490129bf088b2af43ae20de0ac07a85255aa85a - docs/models/chatcontentitems1.md: - id: ba0f7e56f5f3 - last_write_checksum: sha1:e5e715d3018ffbabfb2674c7b98ef2337bf25e0b - pristine_git_object: 4242e4e8e3b4ff56d349094a15912adc6323bb00 + last_write_checksum: sha1:2ff9ad1d23927d3cb9fdc9dca6530a8a1d2b09fd + pristine_git_object: f9b2bee481eb138d1fa7d0d67ab7f17b38de34ee docs/models/chatcontenttext.md: id: 9ed3205c3b80 last_write_checksum: sha1:5b82d87c54a0d7a4728b2e0cbf0561df3dc7b198 @@ -347,12 +324,12 @@ trackedFiles: pristine_git_object: fae9b886eb2931b469573e8c6261a7aaad7e0218 docs/models/chatcontentvideo.md: id: 28d1a1d78635 - last_write_checksum: sha1:2356750d5f22c399c403d6d4c540d28b80454210 - pristine_git_object: 5d982ef863ed8fe39945920275d66958e6a9b453 + last_write_checksum: sha1:0e272b80aabaa6192a8778bc674e3a24d66cb10a + pristine_git_object: 6c6fd5186a1e20a8ebf36487a8488ed5e3cb961d docs/models/chatcontentvideoinput.md: id: 186581db4164 - last_write_checksum: sha1:666145cd94a694faac718c3041fb5337519b1062 - pristine_git_object: a3acb71dae11977ce37f74c9b2eafc36b3c30825 + last_write_checksum: sha1:8c236fac0a92901a1c9a854711cec9a18d7f5da6 + pristine_git_object: 84423add9ff34de11da9812fff4fc0aa525cd239 docs/models/chatdebugoptions.md: id: a0327010956b last_write_checksum: sha1:863d3ac167a222b9aa7069e1700281b848a4d963 @@ -387,8 +364,8 @@ trackedFiles: pristine_git_object: af9f0dc19b88fb85368f6c38a8cd887322bc7975 docs/models/chatfunctiontool.md: id: 5464656ccd20 - last_write_checksum: sha1:3826f62857b0966da674b711c0ebd01d29715cdc - pristine_git_object: e231f8368c6e4dd903a207ccaeb35cdbc89f0897 + last_write_checksum: sha1:f703617c059bf0b5ee99767021f4aefb3885b374 + pristine_git_object: 81a4a75968d965520095667784bf88f4f75266eb docs/models/chatfunctiontoolfunction.md: id: 65b6def5d64c last_write_checksum: sha1:15d0d2f33c7a52525ff64e1b7dcc90d38021c33c @@ -427,108 +404,20 @@ trackedFiles: pristine_git_object: 20004462abfbb675672cf1623cc8200ddf0d63c1 docs/models/chatrequest.md: id: 81b65d713472 - last_write_checksum: sha1:ff348288c9ff2ac81960478a86a080e5c68e2f7d - pristine_git_object: 4fe1dcabaa91cfde194b4c2e075b737b157f7b57 - docs/models/chatrequestby.md: - id: e3079b5d3b81 - last_write_checksum: sha1:06b68e6b0bbc0d1355e5bc694d4ba44971ffc2e6 - pristine_git_object: 0508858f9d0e439bf0a8ce5b401f1d8073d21356 - docs/models/chatrequestignore.md: - id: 9ae3d177eb67 - last_write_checksum: sha1:dfb5bbff0c7a13bf62ecf6e3b92a4b8fccad8f0e - pristine_git_object: d9e1fe36d37b6092daaa6f0e482948b9890654c9 + last_write_checksum: sha1:f69f10aaa6231e14c302cb5e1e1701a6a46bb5fe + pristine_git_object: b0716982cde7e837a2e1ab731b11e0ce4e7cb9cc docs/models/chatrequestimageconfig.md: id: 1724ea5e877a last_write_checksum: sha1:8371beeebe0320b369350350794158e1ea9ba607 pristine_git_object: f058a865d5918509c7830fa0fb1e5235d64f7f70 - docs/models/chatrequestmaxprice.md: - id: 53d179a2432b - last_write_checksum: sha1:a2592b46684043aeb9e9369c4fe6e8de5406ae3b - pristine_git_object: c435174d33b515427d389382d80b0bc818dd306b - docs/models/chatrequestonly.md: - id: 865fbcb293b4 - last_write_checksum: sha1:759fac6a44a648b24a6c043917cd1edb701609dc - pristine_git_object: 2c2cd0314e70638bf656aa5bef9b9b19697a04d0 - docs/models/chatrequestorder.md: - id: 52ea27914020 - last_write_checksum: sha1:af7ce303caaf47278e8b374313229f5c275e575c - pristine_git_object: 4d1b10bd5857a9379a8f579ebac403d46ce78029 - docs/models/chatrequestpartition.md: - id: f0d191b24288 - last_write_checksum: sha1:6611d1d76f3531fa7208995d053c68e709bb1b6f - pristine_git_object: 756a464e033605e18e5e798840a333aee5d80b82 - docs/models/chatrequestpluginautorouter.md: - id: 94290e027dbd - last_write_checksum: sha1:3bd4d3cfefd24cf54aaa424510528e3c8b78664a - pristine_git_object: 49b5aa3ba110b4aed1bcefd137bcd895597a4ca9 - docs/models/chatrequestplugincontextcompression.md: - id: 91a552b03f59 - last_write_checksum: sha1:ecb075bf0fc0047d52af45b09e6d92c13a967aca - pristine_git_object: 350a7cb718f4066b20914f68190c98c2920b2dda - docs/models/chatrequestpluginfileparser.md: - id: 953b2e8c1437 - last_write_checksum: sha1:d6f1aabd47ad2f9bf884f8fec9c781035ead4c3f - pristine_git_object: c5c2a0a949fc56487c7b587a5937fdd9277b1dca - docs/models/chatrequestpluginmoderation.md: - id: 4339849c9fd9 - last_write_checksum: sha1:0d8e5f8267c19dedf2ba8a6705f250c72efa138b - pristine_git_object: e225d69a18ffc6eb38ce8e05ee21ab42ad6d7c35 - docs/models/chatrequestpluginresponsehealing.md: - id: 2e45b2f5e51b - last_write_checksum: sha1:e4e4be9623581505b6370516144d1b7e35541a8c - pristine_git_object: 16886012d8c8f4defbd821e8072fa58e5a154c7b - docs/models/chatrequestpluginunion.md: - id: 06d1acde1a65 - last_write_checksum: sha1:9203b6cdd5295fdf61abb89978ef51e2da62f979 - pristine_git_object: 9c3281e2b39dfbcf16d1a6ea832f9b0d1f0433cb - docs/models/chatrequestpluginweb.md: - id: 9d7d7dd1cd67 - last_write_checksum: sha1:eff0ac0f7a9c7aaccedc376083b048b4575657d4 - pristine_git_object: b363b2adafc195c3ed60edee4fb7ad32bd7df27a - docs/models/chatrequestprovider.md: - id: 479c0daf3877 - last_write_checksum: sha1:a65004d9ea5c6ffffa3124dc01774d915db00427 - pristine_git_object: 1ae38005a253972592dc7c38f59569404c9e542d - docs/models/chatrequestprovidersort.md: - id: 9fe5934f0085 - last_write_checksum: sha1:6e1b74aecb5be2e36d852404e1318fbd19f626b1 - pristine_git_object: 4ea598346f9901ca0df733190ef38902dd436580 - docs/models/chatrequestprovidersortconfig.md: - id: 76ea601ce379 - last_write_checksum: sha1:bf2f9c648ac4a6640ff9fd2423f819be7f226180 - pristine_git_object: bca3f75b29b6728d805d4eb61bdd6045309b1c15 - docs/models/chatrequestprovidersortconfigenum.md: - id: e3260ad01472 - last_write_checksum: sha1:448c2c5000e58a8705ba896adf0fa2ffc4d41a3a - pristine_git_object: bb564f28a59b015e48d0f964f89b0b42e0c21007 - docs/models/chatrequestprovidersortconfigunion.md: - id: 7066e7001fbe - last_write_checksum: sha1:f8eb881360919180ae2cb72c65aa348f5769a39c - pristine_git_object: 157da7ddabe431c28aea5cc02764c5c24bc69e40 + docs/models/chatrequestplugin.md: + id: 8e2669d582eb + last_write_checksum: sha1:3d27bd152cf716ff9ce4b7ab3e6a4fe25833214c + pristine_git_object: cbd4802a4a7859d341146d10d68e321ee670f3c2 docs/models/chatrequestservicetier.md: id: 34b32ac1991b last_write_checksum: sha1:8e3a3d84e3163d84c9f2144362ab2469d68e016b pristine_git_object: 252c877081ff18a9f698bcd3c6be1acce8cba842 - docs/models/chatrequestsortenum.md: - id: 58a6a84f6912 - last_write_checksum: sha1:b325b2c63ce97912e193283e08d83879b863038e - pristine_git_object: 560eb308077fc21127bbd9356c2b07c1cb45ccee - docs/models/chatrequestsortunion.md: - id: 5846b744cca7 - last_write_checksum: sha1:c076cf7d99f90cf6cd3d6dc10ff750d323bde777 - pristine_git_object: d02fc997527895a67fd69deb187d6361122522e1 - docs/models/chatrequesttrace.md: - id: 623ac3d619ca - last_write_checksum: sha1:4e02d5da4da198822abfa57d613a9ce813692eb8 - pristine_git_object: 3be103f90a8ba605f03c7fefaa27282fe87bff3f - docs/models/chatrequestttl.md: - id: a2b1044184b8 - last_write_checksum: sha1:c1ccc8e0ce7b1bd1d2b1f757eff820224e31064d - pristine_git_object: dcc289ac71be56c1853b021f92a3f34f8c55d1af - docs/models/chatrequesttype.md: - id: e0523668907a - last_write_checksum: sha1:5a8a8779f016473b6530ca28eb3cd9bc63a11ada - pristine_git_object: 88845ea2d3c89602d808b722e7976fc34cfa8b89 docs/models/chatresult.md: id: 0d44370308d5 last_write_checksum: sha1:a1a19bf4f19b8ca8d059388d754465369eae0642 @@ -539,8 +428,8 @@ trackedFiles: pristine_git_object: 380700030ded86637b308c8674491a5a8ab5fac1 docs/models/chatstreamchoice.md: id: ea07d9ed7159 - last_write_checksum: sha1:b3cc95a1863f023d5cdc70bf60a2db43a450eb83 - pristine_git_object: 0b69af76856bbf743c9ef749745ef6b77926e46e + last_write_checksum: sha1:72901b334d7ba8a1087d919510ef568e6f700087 + pristine_git_object: 801235ba586601a6718d8199104aa3bd736838ef docs/models/chatstreamchunk.md: id: 0c99681ac5b3 last_write_checksum: sha1:a4dd7140bc8d43eed9cb70594d920dbd3ae6c315 @@ -551,8 +440,8 @@ trackedFiles: pristine_git_object: 7adfce1f27907b9a32a0ddbed694023bf2fcf54f docs/models/chatstreamdelta.md: id: 3eee7af9ae58 - last_write_checksum: sha1:0d55db1d159a0b5221ddf7de91292e5696f88a18 - pristine_git_object: 44b57bd231bdc836ac0aa6b58d86d9850b5833e9 + last_write_checksum: sha1:1c5049d27016f2d0225609afb5ac7b257e8a8485 + pristine_git_object: f0fde7eadd426ea027187c9b3010aba16d3ff56f docs/models/chatstreamdeltarole.md: id: 791ab625450c last_write_checksum: sha1:9515ffdb2008f9df5b8af70c18598303e9adf251 @@ -567,8 +456,8 @@ trackedFiles: pristine_git_object: d15dbff0a8b2fe820339a9123a8dfc233466f340 docs/models/chatstreamtoolcallfunction.md: id: 696bc1f14e51 - last_write_checksum: sha1:638874a82f8c12a4362f6ec5763323b000f0000a - pristine_git_object: 8752c2e3a63c2b65c1682c4a41b92b86d430ae57 + last_write_checksum: sha1:56d9be1274addec1829ce0ac3f8cd7d6afb6b712 + pristine_git_object: c01566bd9ea5060bf38bfbe7386f330a51bcc55b docs/models/chatstreamtoolcalltype.md: id: 26674216a0e9 last_write_checksum: sha1:011dbca33330354552271733797e5215ab52ba00 @@ -591,8 +480,8 @@ trackedFiles: pristine_git_object: 3143a8161e0ea1f58974fa8230bd4372ad28469b docs/models/chattokenlogprobtoplogprob.md: id: 02c2b452e880 - last_write_checksum: sha1:67d83c3a570e15b95f033e41fa0b30557f0c69e0 - pristine_git_object: d17cd5c1d133150c3a439ece79866386dae2e814 + last_write_checksum: sha1:79d9d6810064e849073a936e4180b160d335eb60 + pristine_git_object: 24b29ca3026076d4967756121c52b6b8833e7516 docs/models/chattoolcall.md: id: e32eac40cc31 last_write_checksum: sha1:df5b80e901d8c8b2a18c47d46e27040ae8f0aa9e @@ -641,78 +530,14 @@ trackedFiles: id: 3aecb0a1e44a last_write_checksum: sha1:13ae2deb13119c9e7f65dafe2b02de7dc8011c5a pristine_git_object: 923bee6d8c621967a019f62e56a640ae3873b91d - docs/models/chatwebsearchservertool.md: - id: 1ecbc02eded3 - last_write_checksum: sha1:4ada6d5cd701199dcdd59302f93a19f3bd22798b - pristine_git_object: 7c8bf44fe30a15730fd540ec42ba82d1cf6daa08 - docs/models/chatwebsearchservertoolengine.md: - id: 8cd22400ceb7 - last_write_checksum: sha1:947e85137072b09ec80899355e12055f28dde1c8 - pristine_git_object: 4855f8669cc0a420e529512a3a2c8f7312deab05 - docs/models/chatwebsearchservertoolparameters.md: - id: 4319c6a15142 - last_write_checksum: sha1:3207e151168d1083661f26f353b9084e4abe5711 - pristine_git_object: 6d3c1298e835b64dc5d384fdfbfd3a3e4345c3a9 - docs/models/chatwebsearchservertoolparameterstype.md: - id: b4986acc3235 - last_write_checksum: sha1:126eb05fbcfaaa245019c863bb739015d1cd4b4b - pristine_git_object: 36651f16fe9d746cc84cc5a4f68c92fabbb8d952 - docs/models/chatwebsearchservertoolsearchcontextsize.md: - id: 9a60544cf8db - last_write_checksum: sha1:68f2e51047b35ddc8840f4c5a5136b7b09219623 - pristine_git_object: 1ab32519d791b08ad1b7f152a7e33565e3f73627 - docs/models/chatwebsearchservertooltypeopenrouterwebsearch.md: - id: 809efe4da4c4 - last_write_checksum: sha1:6a508fefeb44630f3bdac46e790e73dfe6b08002 - pristine_git_object: b5396324f900515438241f43fcf000315cc8491f - docs/models/chatwebsearchservertooluserlocation.md: - id: 41056ef55d58 - last_write_checksum: sha1:9abacd5b5f679db1c9117464ab09b7efe382793a - pristine_git_object: bc65dc138bfabe90b9826d9618fcb374dd8d9339 docs/models/chatwebsearchshorthand.md: id: 815abb59b6ce - last_write_checksum: sha1:54b37c93fa4ff684f6a6a846a17e08adf601dfae - pristine_git_object: ad91fc71cc5c408b26fbe5122ed2537c7d0f9f6e - docs/models/chatwebsearchshorthandengine.md: - id: edf937b2a374 - last_write_checksum: sha1:be9504c7959612c954d2600c6d1c59749827fc50 - pristine_git_object: 28238a1670883564773a70127d1472015d09239d - docs/models/chatwebsearchshorthandparameters.md: - id: d8ab8b162b15 - last_write_checksum: sha1:0c3a55223f42c909b9921437225b4bf993334976 - pristine_git_object: d787b50ba707fd55b77ffa2fc8476f2db5187e10 - docs/models/chatwebsearchshorthandparametersengine.md: - id: 27b4ec2061e8 - last_write_checksum: sha1:ccae95b0bb58668df10747efbeda27c091126d11 - pristine_git_object: f4a8063211bef8a15f81c6c34d1eaf112898f341 - docs/models/chatwebsearchshorthandparameterssearchcontextsize.md: - id: 8758ed6143d4 - last_write_checksum: sha1:3e07f7d769edba2fb0c49864d7ff57809c6f2e73 - pristine_git_object: 38443010137a1ecdef17e99db8094b7875755bb9 - docs/models/chatwebsearchshorthandparameterstype.md: - id: 109fc1976183 - last_write_checksum: sha1:44c2226b467ca348f4d769860dce6b59fc16fbde - pristine_git_object: 6b73907b86b2b1b5126baca8642565cf79629bba - docs/models/chatwebsearchshorthandparametersuserlocation.md: - id: 4034b7949da7 - last_write_checksum: sha1:e4bd481107efa8c6915f8b80d9f8c7f6078cfc4b - pristine_git_object: dcec81aa7bef90f695dd4ec7c6f5e25eebad8cb9 - docs/models/chatwebsearchshorthandsearchcontextsize.md: - id: 6ad05d7b2150 - last_write_checksum: sha1:821f635e077dda1d3b6f7c910c375657869e0215 - pristine_git_object: 318b696263de1fc37a4a98bb856a388f5bb5c30e + last_write_checksum: sha1:c299e4f3a9bb52760891a2dbd84501dc1ac94187 + pristine_git_object: bf68ba214cd61d463db7798273e0fbd95ad984b4 docs/models/chatwebsearchshorthandtype.md: id: 8db7de3008a9 last_write_checksum: sha1:038536cece2a66c98049db0374f7747c04501091 pristine_git_object: 18a054813aee65d6fe58199dd77b449bb315adf2 - docs/models/chatwebsearchshorthandtypeapproximate.md: - id: 518865dfed9b - last_write_checksum: sha1:eda820c51b8f69ade84da2a9db695c4029a97a4f - pristine_git_object: b3dc0b2110fa400218a195ef0f9b8ba2c68c84eb - docs/models/chatwebsearchshorthanduserlocation.md: - id: bea417a2ef83 - last_write_checksum: sha1:160613d65968661a04d20916988df40e35144428 - pristine_git_object: d1dc8b72233e239f357f994d0ca8040303b12ea0 docs/models/code.md: id: 2fcb3964c9c0 last_write_checksum: sha1:defee39ca71dbbe5599d5adb2509e1c8409a1e42 @@ -731,8 +556,8 @@ trackedFiles: pristine_git_object: f5a794e0d74f3ac046e339d3f12ac56e364b8c20 docs/models/compoundfilter.md: id: 627199c420ed - last_write_checksum: sha1:962b93f3a49a97912b063011837bf311ecddad23 - pristine_git_object: 34117bb825a00cd2a7a02a6fca13b27fae01def9 + last_write_checksum: sha1:e55994276a5a68be7a2d54c24226780f5c80b5e9 + pristine_git_object: 8b91cf139482abf6e3495f5e8327a4af54c854bf docs/models/compoundfiltertype.md: id: ef2e7d157a4c last_write_checksum: sha1:ab5bd855c1b4e116d8e20973e3e524a4f27f810e @@ -763,16 +588,16 @@ trackedFiles: pristine_git_object: 4b56db201b3ae06afe6bd3659ca0969f4dee8074 docs/models/contentpartaddedevent.md: id: 9b321cdad488 - last_write_checksum: sha1:0bf7dfab9a90d2f08df699e8237e3096d399a37c - pristine_git_object: c96ca639a818f376f8e4627d9b60af35b47186f5 + last_write_checksum: sha1:6c3a80fc70399de0334e7c2f1a7cf358f8e540e8 + pristine_git_object: dd80f0127ecaa15a08def8ae2a9675db89d0e79e docs/models/contentpartaddedeventpart.md: id: 80acab269c1e last_write_checksum: sha1:11cf3e4c3d11cd0393c85f6e8002187cfa264a1a pristine_git_object: 56f31c7a5a965b5d36a178693ceda33864d7a672 docs/models/contentpartdoneevent.md: id: 8f6585c42867 - last_write_checksum: sha1:0914a694b29d6e101f762d605282bc013fbbb442 - pristine_git_object: 9f68262195e1d5910bf19d0e033fe940e950cd5c + last_write_checksum: sha1:4160169f4765a7beb05f679bde7ca28dabe69abd + pristine_git_object: e0a9c3089efed04c5f0c319cf572bd282a349f42 docs/models/contentpartdoneeventpart.md: id: 5705cf728d04 last_write_checksum: sha1:95c2600e7be7dc5a6a9767a7dca0b95ca2a76c0d @@ -781,14 +606,22 @@ trackedFiles: id: c70d46632a91 last_write_checksum: sha1:0b4ceaf9569f9af29844ed5a324f886daf7bb70d pristine_git_object: 52167978e886bfda0a13c99624e3d828806b0d35 + docs/models/contextcompressionplugin.md: + id: 3382df201c10 + last_write_checksum: sha1:a836312e7d08a85646be991f446bd4610f256151 + pristine_git_object: 6b4ef9e55f4f66f5d7dd318759d5cfef6a60652a docs/models/costdetails.md: id: 35e3d2efb6b1 last_write_checksum: sha1:8e70b5ef0b5ff86b63dd487ea4cbabe9e4488c71 pristine_git_object: de05fadab79ab6725ad396c4d279c1159d06e146 - docs/models/createchargerequest.md: - id: 31dc6bdffc5e - last_write_checksum: sha1:3a19c2cc0781ae2b694a7fb2adf84f88011c4ad6 - pristine_git_object: 096fdbbc5d7d27e79223f32847a83553b83fb75b + docs/models/createguardrailrequest.md: + id: 414fbd831d11 + last_write_checksum: sha1:1099e7634176dc1c550890f61403c14712d64b64 + pristine_git_object: c23517273dffdbd2eac6b9147498824b5add3ccf + docs/models/createguardrailresponse.md: + id: 1479b9a825eb + last_write_checksum: sha1:ed602b49160dfd6f048fc2159e4519a9061d2ce9 + pristine_git_object: efac0039332351756c0565aad5912fc69ae3ca00 docs/models/customtool.md: id: f64ed08d154e last_write_checksum: sha1:186c21f4e45c51db4ea92eee5c065b1ab9b6fc20 @@ -817,10 +650,14 @@ trackedFiles: id: 91207995478e last_write_checksum: sha1:8aead0a16b750025f3e18b89d01ae1e4656272f1 pristine_git_object: 2f1254ed0b2b36b3bec078d9e424f15ebfe3997c + docs/models/deleteguardrailresponse.md: + id: 05f4687c17a8 + last_write_checksum: sha1:95402c85e77872b9ed21065327e36e15099cb9c5 + pristine_git_object: fa9dd3ab29160d841c0dc6ea0b1d8a34767e3503 docs/models/easyinputmessage.md: id: 7c507bc95e89 - last_write_checksum: sha1:c9c591c21de52e2e43aa52212af84f5388993031 - pristine_git_object: 4cbf62ffa0b9224842ff5f39ab1a631bd33dc6ae + last_write_checksum: sha1:63bb926c52c157fd7e442d3cc82a7150f4384699 + pristine_git_object: ead7ffdd4f1c92655abc501f7e476d3b7c9a4b65 docs/models/easyinputmessagecontentinputimage.md: id: 0d738cf1e85b last_write_checksum: sha1:be12a1899586ca057a7a6bef17a4ca3a1881effb @@ -961,30 +798,34 @@ trackedFiles: id: 8bdcd41d649f last_write_checksum: sha1:26035a10a5ac9195ad1ad36980c6c2f0e9187976 pristine_git_object: adfa205a63e7874c6201e591662537d9c92ec2dd + docs/models/fileparserplugin.md: + id: 07f43b4c1eb5 + last_write_checksum: sha1:831272621fa2daf67f9150ba1648474476339327 + pristine_git_object: cc9a7c13339b0af84b76b591f28cfd9611b0b7cf docs/models/filepath.md: id: 631b7692556d - last_write_checksum: sha1:86e5dd38e3b26b0238814697cb6ce5086f5963cc - pristine_git_object: 1401b28fe26e4bfce1b2e72765d431185f919ae8 + last_write_checksum: sha1:1011b89bac04f166f925a9ec3dcd1b7bf540e623 + pristine_git_object: 22fa7521d51a4f6d02c315a974fb3652f197ead5 docs/models/filesearchservertool.md: id: ac4394b96aa7 - last_write_checksum: sha1:5f78908848c8d0e9f0068f0260eb141d63faeccc - pristine_git_object: 9b797993894cfcb1a43dbc039c5747611dae6d75 - docs/models/filesearchservertoolfilters.md: - id: c489b49b04fe - last_write_checksum: sha1:cbe7f1bfeb69779e39fdc36a8bb5842083e5b871 - pristine_git_object: c4a49976571cf24e5a86f59ad3bb775ce12a915b + last_write_checksum: sha1:b33105f3b9a99b5c7ecc5c29689b39531d486dd5 + pristine_git_object: cf2cf4b6e78231e54502e9fbb563f6a0bf1c7ac5 docs/models/filet.md: id: a3e5d1b56bb6 last_write_checksum: sha1:a24284687f9cb271852b26a4e2b9e4be3cd0c597 pristine_git_object: 5a179500118afed0663a9d98323d84fbf1c15052 docs/models/filters.md: id: 1370bfdd2199 - last_write_checksum: sha1:ade7a511f4eb63b44fa6e2ba77f7b66c6faa7fea - pristine_git_object: 609fe81492b07e8a1c3240662ba903356aab70d2 + last_write_checksum: sha1:525f80977743e949bf0668a619e4865921e863a9 + pristine_git_object: b75a8fd694cd63818e4f11b52fed73952505e0be docs/models/filterstype.md: id: db98c2c52aa6 last_write_checksum: sha1:8aa9b0f0d688da52422aa779fb109da9e8e753c0 pristine_git_object: f64f2f839dafe818dda0a17f8e60833a3e34e083 + docs/models/filtersunion.md: + id: 1b1f385574b6 + last_write_checksum: sha1:c1edc415bb41a228f5e1cd04aa5dd959eef7ae82 + pristine_git_object: e98c85420ebf94dd18fd993daed908dec02254f8 docs/models/forbiddenresponseerrordata.md: id: dcfaa46a8072 last_write_checksum: sha1:cbc76d78110922926f151f33e467c2b9821fb505 @@ -993,6 +834,10 @@ trackedFiles: id: b5610092256d last_write_checksum: sha1:5283b707d7844d8c8c9acbe3c1867f16b873a556 pristine_git_object: 9eb17e0b444ea849e508a97faecc627b2f97ea94 + docs/models/formatenum.md: + id: 4d443dc702e0 + last_write_checksum: sha1:7a8d68b70b9d7c300bd14cf2801b03392af57f09 + pristine_git_object: 25dbcf70cdc2f8dd25eee7c98cbb3c6aff520624 docs/models/formatgrammar.md: id: dbda5ad4fee4 last_write_checksum: sha1:daac2d887a5d63050e180b847137cd453f284604 @@ -1019,24 +864,24 @@ trackedFiles: pristine_git_object: b80b193e233f424ca80da8601f1a22d367f3eb47 docs/models/functioncallargsdeltaevent.md: id: abcf083f706b - last_write_checksum: sha1:1fecdc5756675930b16bd9dae8686badaf561bbd - pristine_git_object: 9c62b97fc66e63c0d53b1fd25e212771c23d5856 + last_write_checksum: sha1:fd3d7942090a9e5fa8d9f5c6c303835ee105cdee + pristine_git_object: 8da925338a5e26f7a24acf6fed464d026d813cc4 docs/models/functioncallargsdoneevent.md: id: e821af2efced - last_write_checksum: sha1:b21a9875405b133ae9d0645c7a41501bc7f5011d - pristine_git_object: a1091dc72c89489e18236fcd7bca6cae0deeadb8 + last_write_checksum: sha1:5bd847a72c01fa1565548fa1621844cd3c5897e6 + pristine_git_object: 5f1245e548da520a37735cccb228b073a13d714d docs/models/functioncallitem.md: id: 0d56c7f07d36 - last_write_checksum: sha1:2c7a8d89d86e7cc71077823c03ac7c8a7e02b88e - pristine_git_object: f4064b5e9d7bba669595fdcccba4a358942861e2 + last_write_checksum: sha1:346d1e0efa207f053553ec83f8a0dd9d27f87a7b + pristine_git_object: 8f87ea3c69a3cec5ca97267c47baaf71066c0c0a docs/models/functioncallitemtype.md: id: 0cb9d007e8bc last_write_checksum: sha1:ea8b0b0528817a13c8d2d682b5804127a5ad9a88 pristine_git_object: ad56ccbcfd0e328c983602b7107c1734c2a83000 docs/models/functioncalloutputitem.md: id: 517286c0629c - last_write_checksum: sha1:ef7d5efc41d61404a6646206db69940bebac920c - pristine_git_object: d127cb967e450f0ac71e74be60f92f5cfbadd36c + last_write_checksum: sha1:793808709f71e5a5bf072d939c0a42787be510c7 + pristine_git_object: a982ebabd7e248778e386fe1ece2c9afa2e8a20b docs/models/functioncalloutputitemdetail.md: id: da2267e98b10 last_write_checksum: sha1:f4132ca1591c03675621863dcc26f822ea8c8f02 @@ -1049,26 +894,46 @@ trackedFiles: id: d64888f1f012 last_write_checksum: sha1:02069d4b7ece68b6bf5ee1da1fd0e149e8df85ea pristine_git_object: 255bb9650ae1192c54eb3be151037c2cd6bbce58 + docs/models/functioncalloutputitemstatus.md: + id: 3890e23d3275 + last_write_checksum: sha1:3fd7f861c200c32c99ea72fbc5e6dffb2bd817f7 + pristine_git_object: 2baa9f1f3a96b8a64a06b3eaa46758a3836233bd docs/models/functioncalloutputitemtypefunctioncalloutput.md: id: 8557f647116a last_write_checksum: sha1:542cd34a5b9cafb0ac5dca2e01861b4b6f4c098e pristine_git_object: 8f53de6914880a8a034a0b60aff8b120d034eefc + docs/models/getguardrailresponse.md: + id: 3590ce9e2938 + last_write_checksum: sha1:92ea580ff687b519ee36f5ce0d45ba7b7a907c99 + pristine_git_object: 5cab946d8a46394a174f56d418342eb8f8679a28 + docs/models/guardrail.md: + id: 34d09568ab25 + last_write_checksum: sha1:dc12a7f8f4f46eb5f8f666817d9e515f1d869667 + pristine_git_object: 8176e0aa7f3588db15bea66b782a46211a3eaa7a + docs/models/guardrailinterval.md: + id: 8efefeea83d1 + last_write_checksum: sha1:6e8b5b17fa686c0d1108867095a9a7f8bb072802 + pristine_git_object: 824021efc78f489b0c8c34604b38df51ab2f90d6 + docs/models/ignore.md: + id: d1a0635b9cf0 + last_write_checksum: sha1:7a8cc427b44e4a856a9bbcc9792c143602b7d975 + pristine_git_object: de9c31d0011f3289444fcedac3c33a113d512cf9 docs/models/imagegencallcompletedevent.md: id: c31cf621765c - last_write_checksum: sha1:e61cd6e589010239001bf691c021bb31c6e8ff57 - pristine_git_object: 4b5e80a8b59c4b3779b1183ee586f5e0edc21546 + last_write_checksum: sha1:cfacfd6bf8566a57450ac9bfd26313550608c620 + pristine_git_object: 8e6d9d682316ebd4ebfe0c6d19094d39965b2a99 docs/models/imagegencallgeneratingevent.md: id: 5b1e4a3a9e25 - last_write_checksum: sha1:09571b7c98b7f1fd370a69d59dce0e6ffa26ee3d - pristine_git_object: 77fce2055e074a55992e5cf3666d8dad9a79b680 + last_write_checksum: sha1:864f2f4feea5abdcb742c2937566cf13d3a7c202 + pristine_git_object: 5bc4faafd0c300d089b1cd702bf5539e33696580 docs/models/imagegencallinprogressevent.md: id: 51e4b2ba497a - last_write_checksum: sha1:cc753123f1444500a3ea66f88036b144864d26ff - pristine_git_object: fd93f24e6cfd7108edee4034af86ea942781af92 + last_write_checksum: sha1:eef454efaad680a0dbd7fd318b0ccd27d65c214a + pristine_git_object: 3366aab18f277ca2165892c923c7f93888213638 docs/models/imagegencallpartialimageevent.md: id: 675108c6b0ba - last_write_checksum: sha1:b8ddfd212d9cc8314576254a7f0d980b55cbb001 - pristine_git_object: 794bf4b4c9594580c3ca5fa5b23212fc2f13b4f0 + last_write_checksum: sha1:dc4c245ae17012fcbb0d8fe9fc1917d3b67a12b9 + pristine_git_object: 618864c581364aae7da144d625567053f51e592b docs/models/imagegenerationservertool.md: id: 025e7df31fc2 last_write_checksum: sha1:5d1921eb4f56ca78a7461e71a1b9d2ab24461271 @@ -1085,14 +950,10 @@ trackedFiles: id: cf8d2935b1e7 last_write_checksum: sha1:77587b1bd6f9655a05f70ff96f9fc701709c4347 pristine_git_object: 8ce4b838b334d0e57e0f1dcc5ef6cf71bb9efb64 - docs/models/inputaudioformat.md: - id: dbd07924c0ae - last_write_checksum: sha1:9794664a5ec3c5e2b730900b5f781c3c32ab89e1 - pristine_git_object: 2963708be20103059fac937356b03d4161969217 docs/models/inputaudioinputaudio.md: id: f0d13f50558d - last_write_checksum: sha1:8e5fd44fc3e6d8d42de1502419284819b312ce8d - pristine_git_object: b7d9813877158eb7cff4565e6523ffb770c1dba3 + last_write_checksum: sha1:ada9800494d5bbdba3d8c1d27f93733a8b07fd71 + pristine_git_object: 0916b09094805d820c61036127f43af50fbbd403 docs/models/inputfidelity.md: id: f19e94e3f06b last_write_checksum: sha1:0c773bdb0e02c5a69c18773b159b396e434af484 @@ -1119,8 +980,8 @@ trackedFiles: pristine_git_object: c41966304ae65cfb472674905eaf287316690944 docs/models/inputmessageitem.md: id: 0976fdff24e2 - last_write_checksum: sha1:97ad17285a600edd8cc03435ba69d0bc8af41481 - pristine_git_object: f57130f7d490ba7e7a9209596d4545b2138e1997 + last_write_checksum: sha1:cc661246f10db95431c663bf0e292ef1b49a68bd + pristine_git_object: c02ecba0ea042706b261652431a5a147914f4abb docs/models/inputmessageitemcontentinputimage.md: id: 3b3861b949f0 last_write_checksum: sha1:b52848d4cd21809c279e3c3d405b94cbc015805c @@ -1165,10 +1026,6 @@ trackedFiles: id: 8af933e3ed7e last_write_checksum: sha1:4b999aa042a2baf9291a4dd675e41fe3bb9b49ab pristine_git_object: c9ac45798157a2bc26089240e303068292f83b87 - docs/models/inputsformat.md: - id: 45553776d069 - last_write_checksum: sha1:43f4427e2be1b9390f987c9c15b9efbd781043df - pristine_git_object: 326cf82fd1d40842f2e529e75b5376f8945c35e0 docs/models/inputsmessage.md: id: 174dcada287d last_write_checksum: sha1:13ca1e7630feea326540d83e4089043b6b2dadd6 @@ -1187,8 +1044,8 @@ trackedFiles: pristine_git_object: 5e3d463d4b7f502e5ab46c656c83dd67602e1c7f docs/models/inputsreasoning.md: id: 4d6ef00413d2 - last_write_checksum: sha1:71b2abdef56b30bdc26393ff9d3911a44f6fcc81 - pristine_git_object: 25ae462cbf86137ff8cff34c1fb7bca63e3dd126 + last_write_checksum: sha1:106910875234fde828c62b1e71ef5e0bc45b3d07 + pristine_git_object: dc59a889195524b6bcd736d588ac1537e85b1ce0 docs/models/inputsrole.md: id: 207902dd0555 last_write_checksum: sha1:e2d2e6caf4284014770d4fc11398c3a7e813e6b9 @@ -1239,52 +1096,72 @@ trackedFiles: pristine_git_object: e3c6069d5df56ad5f14e6084dbdf926fb1dc5004 docs/models/inputsunion1.md: id: 1109bc1aa0ce - last_write_checksum: sha1:a874cc7b61b7551d42f9b4f9111b81f372a09bfc - pristine_git_object: b1cbe25582ee96f7ddf8e472a7b13fd9af6f787a + last_write_checksum: sha1:763ca91d671b80c10b7aa9f263bfc0c4221ed783 + pristine_git_object: 93d4d598e2e6cb2a74c7ccb0f443df15e3197205 docs/models/inputtext.md: id: bc941fd800e1 last_write_checksum: sha1:e2e1aaa2bd28e42bbaed83435bafb2d7ddff00df pristine_git_object: 13c746b3ba5f6f9b7db1f33fc49f8d8fb424547c docs/models/inputtokensdetails.md: id: aeba2f6d934a - last_write_checksum: sha1:8f4755ef4194ece4c90a579096f438cf60aba09f - pristine_git_object: 613d3c8c9f8f51d002ac072ddb6528ce7aa43ca3 + last_write_checksum: sha1:81cabb0d43c5c8f3136a629ee6eab1eefe30e350 + pristine_git_object: 5887fac29e66e54eecb904a403da4da78b9d5e2d docs/models/inputvideo.md: id: e77bc875f265 last_write_checksum: sha1:d1f710b7075f9dc4b763dda8f9ffe2454ea28228 pristine_git_object: a4ba35835e8373625039f8a665119b632c17e644 docs/models/instructtype.md: id: 0c91ef9ec655 - last_write_checksum: sha1:097484db35061eb9c2fa3524dd8928f78ec767b0 - pristine_git_object: 4a40bcdf172966e4229e7953af35c5f4dda02b1c + last_write_checksum: sha1:a75a31551a3d9665720ff87c7138c979aff5ce3e + pristine_git_object: d11ac515c58b4131244321a773914949fbcf46f6 docs/models/internalserverresponseerrordata.md: id: 8111b3241977 last_write_checksum: sha1:e51036fa1ff86fc102ea8a785702641184b92725 pristine_git_object: 241d4b4d64511a03e3c4020ee846404471276f5a + docs/models/keyassignment.md: + id: eae3b7f94631 + last_write_checksum: sha1:bb7484fe092802361a1ba6b7da3442d2ed5b1535 + pristine_git_object: 1b4b5515f482810e506c34098b7c69e48efad65c docs/models/legacychatcontentvideo.md: id: 4148479c1517 - last_write_checksum: sha1:febe219177feb25b845a7c16ea24c29c33e175c5 - pristine_git_object: 7dd690503141b315f0c4bc7bd973a5c146df9ffa + last_write_checksum: sha1:1c920c2925e80431c2821aaabed619c0b819c778 + pristine_git_object: b7dca8d8e6d80942c24a2cd86f38ce74d23484ce docs/models/legacywebsearchservertool.md: id: 445abacb3b60 - last_write_checksum: sha1:6fa520e0afe16a6abc0ac3bbeb5fe5c13b94e06b - pristine_git_object: d2ca04cfd1051917f77647e46662a380e2960c54 - docs/models/legacywebsearchservertoolengine.md: - id: 975467dac273 - last_write_checksum: sha1:0498027543cfa04d590fc3cee97e0eb43bd0efd1 - pristine_git_object: c1afe4a10b11b78a0f2d3cfe03f53d1e673f6c84 - docs/models/legacywebsearchservertoolfilters.md: - id: a6479ee9e854 - last_write_checksum: sha1:60965606ff0714ef7e2897e997ed2445cf7c7efe - pristine_git_object: 0189ccdba959ad5aab959a27dee4355cc945ff7d + last_write_checksum: sha1:64ea69ee61257ec44fa1b9891a27866cbb81eb92 + pristine_git_object: 5144c6bc31c59dc8650689a9a2f532ec2ad9268c docs/models/listendpointsresponse.md: id: 538591337ba9 - last_write_checksum: sha1:9a4e2b9a93404b04e1e0561301420b173597e514 - pristine_git_object: 1dad57e0665ff22e5b9c5fe223e11626eb69d8d3 + last_write_checksum: sha1:2fc15fd32eab806482ba0afb48a7a00bd1cfb194 + pristine_git_object: 1ae3b34aed2af73f8184f0fd946e0717380558c9 + docs/models/listguardrailsresponse.md: + id: 0696b16e9857 + last_write_checksum: sha1:ed2198b78afb5e5947fdab13ea5e612629ee66c9 + pristine_git_object: 9527bf57f2d7c93c2480c2f45cc68a9e74f3a4fa + docs/models/listkeyassignmentsresponse.md: + id: 792b40d31626 + last_write_checksum: sha1:9385ba4f3636417983ce015b2d26a7372695103c + pristine_git_object: 9e40b70e23b0ff6eb1873f81585032e71e13ed23 + docs/models/listmemberassignmentsresponse.md: + id: 0c693860c64d + last_write_checksum: sha1:5bb216edb6cfca661a1e8bab263516abb05cf2c7 + pristine_git_object: ce66fd9dcdfbd18cdddc9c8f6016bc6d20562ff9 + docs/models/logprob.md: + id: 5a2841eb9a83 + last_write_checksum: sha1:0eb652527834be13e2c4cd142632ea5f1b0526c6 + pristine_git_object: ab1084172ca3d0672ea5a469869ae8c8794c3601 + docs/models/maxprice.md: + id: 7c7c9e7845a0 + last_write_checksum: sha1:30f4a092e04928701f7a143f13c21168d5f74cc2 + pristine_git_object: b2ce9736fc5033803e331146a5e819b3d141033a docs/models/mcpservertool.md: id: 4c735771a7c0 - last_write_checksum: sha1:439392ee5fbe4bb701cbff45ce9c407449bd67ba - pristine_git_object: 6ceb5639e614bf6c46803da2fc25d176e4f3cbcf + last_write_checksum: sha1:f17a1b4056ba0d2e5569d30c5fc8f45065ad234a + pristine_git_object: 0bb7d00d18d31ddf670bb8d56cf1ad43a1db17d7 + docs/models/memberassignment.md: + id: 0f0ea1ec8d2d + last_write_checksum: sha1:b7319ae520bee2c41accd5af83fc14d84f1fde79 + pristine_git_object: 664552e7ba56888c9651d6ae6bb188d7619ad07d docs/models/memorylimit.md: id: 811cdcd7930f last_write_checksum: sha1:ec0cc0aa0c86e1697f81b75849e4792b3d627a41 @@ -1293,10 +1170,18 @@ trackedFiles: id: bf9d60290081 last_write_checksum: sha1:8c6813e57875127c5fa7d7fcf5b86936eb9b6895 pristine_git_object: 1e2c07095ece0a141bec26a98bc8c9fd551b4c51 + docs/models/mode.md: + id: 568581cb28bc + last_write_checksum: sha1:9993aa8d6bb2ffa08c792a132e5533c6f55e16e4 + pristine_git_object: d270cf6efcd865ad6e3be70448541a3f7f8eba33 + docs/models/modeauto.md: + id: 903a198fe9c1 + last_write_checksum: sha1:251a936757329b5cc687ab6bf0fa18f8d7069893 + pristine_git_object: 57cc76f774a90c068b57c93918357394fcc2e20f docs/models/model.md: id: 66e0236ac289 - last_write_checksum: sha1:813a4bec928cd3caa3029e29e92108abf34bd936 - pristine_git_object: e493176e5fe7424d4a926d63b71cbc45dcf9a386 + last_write_checksum: sha1:0b5f5e129ce95491381b507eda5088942d91e351 + pristine_git_object: f339d0a58274eb27c68b148cdcda7072f0e5f1dc docs/models/modelarchitecture.md: id: 7eab960e8441 last_write_checksum: sha1:b0fc4a5562c42268752c5da883ccba22e8294b93 @@ -1311,20 +1196,32 @@ trackedFiles: pristine_git_object: ad7c671e5264ab34b0657bc2f55daa25f5873d3d docs/models/modelgroup.md: id: f8bdc830b8ff - last_write_checksum: sha1:e90ab3a289eb0015948fd808e776c518304807c4 - pristine_git_object: a2c121bb2349d3c077c44ba55b31a039ac817754 + last_write_checksum: sha1:e33e398671117f5f53d2c7ce5f776435f11a0c1c + pristine_git_object: 008f07052aa9314adec00885fe5f17536195b85d + docs/models/modellinks.md: + id: c1a81919d772 + last_write_checksum: sha1:8e3c5086cc05069ab69d345756c9252083d8df94 + pristine_git_object: 32656664b666779e69bda03853e9c0b75271db6e docs/models/modelscountresponse.md: id: 1b997e3738fa last_write_checksum: sha1:77332e0a1d5fc3dcaa2ce64133e0bc97bfd62a10 pristine_git_object: caf9b9a3836f505f002c7dd3779708165a5c2d7d docs/models/modelslistresponse.md: id: 62180dd98256 - last_write_checksum: sha1:b647f2ce2c4b1f38914220821183e83e61df2a2d - pristine_git_object: 30173e6226f406ac4599db10fb486904167e3805 + last_write_checksum: sha1:67132c3caede2f35d744560d55a12c76761f084a + pristine_git_object: 5baa83bd8e3bf059eb6e711eb629be87bd0f8a5c docs/models/moderation.md: id: ace7cb4ee27c last_write_checksum: sha1:bcd2fab3a1355e3cb37ce2963f22e061c6b012b4 pristine_git_object: e2105ba17ae82ebd6b3ee33e6513bc1d436d4792 + docs/models/moderationplugin.md: + id: d765c5137f42 + last_write_checksum: sha1:f206a8b53e63df5453dff2d33a3ce1f6828f6ebe + pristine_git_object: 29700d0ad8f07ee323ab5af925c805de0a838bb7 + docs/models/moderequired.md: + id: dce983759d07 + last_write_checksum: sha1:740e5b5298a8dbe4cb033eb43d0d093daaeb2d7d + pristine_git_object: 0b0aaefd76b7cb6debb4d80b613441d536c734cd docs/models/never.md: id: cb9bec97a0d2 last_write_checksum: sha1:8aa370da73c412b9a13cc0d437eae126c0e5a977 @@ -1333,18 +1230,78 @@ trackedFiles: id: 757633dd768c last_write_checksum: sha1:c11ecb97bcefe57923f48599d0eeaa6ed34d750a pristine_git_object: 4221a4ffa9583b10c4acd0c2f67d1d8372ba1f95 + docs/models/only.md: + id: 04e4b0af8d68 + last_write_checksum: sha1:3a5193a104e908925e90c4806cdcd1035a61dc9d + pristine_git_object: c42022058a2175b13a734014ad50802729508874 + docs/models/openairesponsefunctiontoolcall.md: + id: 4ccd469fbc78 + last_write_checksum: sha1:ef7c2b3284ffc95fdbeb112018f28f055f65f721 + pristine_git_object: 7d1210d22a2d6cf9d2ef68ca19c40b9d863786bd + docs/models/openairesponsefunctiontoolcalloutput.md: + id: 7188829dbce3 + last_write_checksum: sha1:cba7362bc225085067e677071912cd7deb03f627 + pristine_git_object: 5a9b92707e71eecc0ea066e15fa76ae307c7d3a4 + docs/models/openairesponsefunctiontoolcalloutputoutput1.md: + id: b783e1016b39 + last_write_checksum: sha1:6b12a702ee8734be8ecced91a46ac4ce76123513 + pristine_git_object: da8247d194634ddaf3f6c62254092eaa23a87cd5 + docs/models/openairesponsefunctiontoolcalloutputoutput2.md: + id: 6d373d444469 + last_write_checksum: sha1:f4f2b9b9cf8072ede4e81bca3ba2bb44307a4669 + pristine_git_object: ed4cf552b831fd311024033b71a855c923aaf089 + docs/models/openairesponsefunctiontoolcalloutputstatus.md: + id: 3690edf1fb62 + last_write_checksum: sha1:04470cdfa092e54ba11b5a3bb046263a44807acc + pristine_git_object: cb051ca7c1de64caae38f83f152150f6694f15b8 + docs/models/openairesponsefunctiontoolcalloutputtype.md: + id: fa0b2d5865c7 + last_write_checksum: sha1:260b499cf80307d50eab0d481bbd86c0955ee066 + pristine_git_object: 44ce677e42a849b66e74e7cd5d181fab41cd8661 + docs/models/openairesponsefunctiontoolcalltype.md: + id: 4088326575c5 + last_write_checksum: sha1:85815ac9b7b22d0d65320b3f7fad814d6eb260a6 + pristine_git_object: fe032d4cfc19cc6e2f45e11fc5976604369673a7 + docs/models/openairesponseinputmessageitem.md: + id: ab4a280bae16 + last_write_checksum: sha1:6fda61af58ebb76ed2d0616dd2074cd4f7567278 + pristine_git_object: 2cd7b120ccd36a3470c2a8f3969ef9acff1fbc53 + docs/models/openairesponseinputmessageitemcontent.md: + id: 462f52653086 + last_write_checksum: sha1:459b7b0636773c58ea1c12618d93d399b0a0d8bc + pristine_git_object: 472df15324883ed5201b67b8f2279abc0823cb79 + docs/models/openairesponseinputmessageitemroledeveloper.md: + id: 43dafe2e13a4 + last_write_checksum: sha1:e709397ec02ef98e40fed187ed2d70d1e29571ac + pristine_git_object: f82376ef144e62ea3e947aff51064267c853ad23 + docs/models/openairesponseinputmessageitemrolesystem.md: + id: 056eeb53c257 + last_write_checksum: sha1:403099c4cd9bfe9e7197607035db3a7298d007c6 + pristine_git_object: 72416cc23f3d86214bac3d03c1fac7995ac4e562 + docs/models/openairesponseinputmessageitemroleunion.md: + id: 9e5f9c451bd4 + last_write_checksum: sha1:eaadc1387e020b347e8d057aba612052dc046210 + pristine_git_object: 94689be8fc98db4207f2c17070660d4150748c65 + docs/models/openairesponseinputmessageitemroleuser.md: + id: 9f97df966db5 + last_write_checksum: sha1:ffce9d0cbdec1202afc4e11b3b65e99edce2c10d + pristine_git_object: 571eb42c40dd9bdf4baee27226163543d191ce99 + docs/models/openairesponseinputmessageitemtype.md: + id: 643ff7c7769c + last_write_checksum: sha1:2341e49ad6e75b16e73cc74c563439a456b6d053 + pristine_git_object: b87b08a0ef660289e80854b404a3a78467ed36c9 docs/models/openairesponsesannotation.md: id: e0fb0de332e3 - last_write_checksum: sha1:b655ca2bfbf1d8444405715767a97dac35d44bcf - pristine_git_object: f4b8b9641c7b041953dd8a7ab52197c3efc28c30 + last_write_checksum: sha1:a37f2662c3033b3cf78b894e7604aeaa89567f22 + pristine_git_object: 7f882058b6de81717a836b2e39b9d8e3a00e0c8a docs/models/openairesponsesrefusalcontent.md: id: d469dc69b5d6 last_write_checksum: sha1:48c37ce5d410ee6ac92cd4a2bdcfc67f7e9bf4ab pristine_git_object: 6e2def30843e78e82851210f85e7f3df6f42c846 docs/models/openairesponsesresponsestatus.md: id: 91afa92c1af2 - last_write_checksum: sha1:52c7e8a7e988b645d84d4449878138d8bb50195e - pristine_git_object: f0b38faf9419c9e99659baf6d2cd4438b9e32ef5 + last_write_checksum: sha1:93978dcb81abec474011be3a8937ae2e1805cbe3 + pristine_git_object: 44ff0f745bf070c5319f95c3aadcc81c7e04ae10 docs/models/openairesponsestoolchoice.md: id: afa4fae61da6 last_write_checksum: sha1:12cde87794b6582d7af35fb23707880a0f9a7fe9 @@ -1379,16 +1336,24 @@ trackedFiles: pristine_git_object: 5e0d997fedd76a7d9935bc8eb7bc1a9361b0bdaa docs/models/openairesponsestoolchoiceunion.md: id: 5b05c7b33b05 - last_write_checksum: sha1:bb1050ac66d00f9140e1d230d3b5e19b30fc4cd0 - pristine_git_object: f394b5268b193d88f5d118f6304943535bc2dae4 + last_write_checksum: sha1:1a0ae3c955b7adde42f60a5714ec62d610793889 + pristine_git_object: 8a3a596456b600ef2fe5ef2d634691facf6d6c0d docs/models/openairesponsestruncation.md: id: 8b8c4dd661e0 last_write_checksum: sha1:41e3d6a6e1d6aff37b45b70a218a9ae5e954125b pristine_git_object: 4f256109f7a48fb9535f6d3b95ee54150fd79607 + docs/models/openresponsescreatedevent.md: + id: 926c3abdd31e + last_write_checksum: sha1:36e58388c1874520f2ffd4d0bb328c432e5f9047 + pristine_git_object: 74178965be1f1214cb777b526a27cc2b154a6503 + docs/models/openresponsesinprogressevent.md: + id: 1c39a6ebd0ad + last_write_checksum: sha1:551ff8a2c7298d81e8c0ed4f34bdb016e8259a7e + pristine_git_object: 3af921ae848c8497867b828f635f482d6b83779f docs/models/openresponsesresult.md: id: 84990af4bfa0 - last_write_checksum: sha1:a811db5d6489ca84b4353fc6be10012c53143dfa - pristine_git_object: f61adf52906702d6ed232aebafa1d60e1eb05355 + last_write_checksum: sha1:db1a8e0ead44c9c6d3124cee7dc3c0bf61977529 + pristine_git_object: f6e078107f459fa43dd22e1cc6440fb627db3d25 docs/models/openresponsesresultobject.md: id: a67bbc1f8fe1 last_write_checksum: sha1:7f55da79b4452480a8775b48cb4b6111d1d23216 @@ -1401,78 +1366,50 @@ trackedFiles: id: d416c6c1ff45 last_write_checksum: sha1:357c2164df74c85850f7b9cfdc75d34eeef0f5a5 pristine_git_object: 371c2c3437d78a84a0b2b7626c8ba048192217f2 + docs/models/openrouterwebsearchservertool.md: + id: cc043aaf682e + last_write_checksum: sha1:4ca1419265f668f51b7345a775eb4d6f18ad68e8 + pristine_git_object: fc4ad8be46f466de86f90263414700004033bb5f + docs/models/openrouterwebsearchservertooltype.md: + id: 84dd6552b097 + last_write_checksum: sha1:2a46b6fe3deb5e213a2144f4bb598f688140e4b1 + pristine_git_object: dddad5ea3a289121e4b5f96e4329bb75c6b27ac4 docs/models/operations/apitype.md: id: e006095ee88d - last_write_checksum: sha1:daa33073e9510c9ab34cddb791f6f9fccb1849e3 - pristine_git_object: d01ad30e7821f257bb3a8462a36c5421ae45922d + last_write_checksum: sha1:b640aa5076b8aa61cfca271054625c1b63003918 + pristine_git_object: 4758d05b5cee0a562fd7929d22a16333e6de0dcc docs/models/operations/bulkassignkeystoguardrailglobals.md: id: 61e2eefa173b last_write_checksum: sha1:0897cbc7bfb2fdf62072e1be1a99b3edeb0ca9f3 pristine_git_object: ed0220ebcc4d2aa0848264c910fed701ea427780 docs/models/operations/bulkassignkeystoguardrailrequest.md: id: eec92c190ec4 - last_write_checksum: sha1:307cbc36f810bf29f92ca89be7be0f6240fb780f - pristine_git_object: bc5eaf7105e3f9bf52217c998f882e93624d3f29 - docs/models/operations/bulkassignkeystoguardrailrequestbody.md: - id: 5f4b03d3ad7d - last_write_checksum: sha1:7f7649e3c8a7de3494a0ed89bb2f246688b679d8 - pristine_git_object: a7ed0dcf35cd39db9f4bc40240659ef2856c9f3d - docs/models/operations/bulkassignkeystoguardrailresponse.md: - id: 6a2fd0d5d182 - last_write_checksum: sha1:e516aea1274973906af4353c2b75016471736c88 - pristine_git_object: a9b6b30ca59a9cc937a2c3cf3015d0deb8fbbaab + last_write_checksum: sha1:32ec424033d73bed1d81cee545c1102b52f59932 + pristine_git_object: fa34230d6283674b791e9d09033997bd313734f5 docs/models/operations/bulkassignmemberstoguardrailglobals.md: id: d9a733e7541f last_write_checksum: sha1:20dd75b0d6449cd26c74310a1c09e6fbf0671101 pristine_git_object: 67b29b9d5a1cc8969caa984a245a15bb2667a296 docs/models/operations/bulkassignmemberstoguardrailrequest.md: id: 6d07250d41fb - last_write_checksum: sha1:978c9b35d01257153cb6676d9bf583f1c82ea463 - pristine_git_object: fa8bb4cadf7a026fb2beb0cf5c13f792b8afb26c - docs/models/operations/bulkassignmemberstoguardrailrequestbody.md: - id: 901e5406cc36 - last_write_checksum: sha1:694c378c7fb368a63b8797edbbc31161db92c192 - pristine_git_object: a1b888275fcba9a94c92224ce068bb40cb278bd3 - docs/models/operations/bulkassignmemberstoguardrailresponse.md: - id: d981e5ad2eb4 - last_write_checksum: sha1:5d033baf3b7956b6a774462336204fa1e120a397 - pristine_git_object: 6f83d903b69b867518e6867abebf8fe19a0bdbc8 + last_write_checksum: sha1:8eda392c4418302dab3cb684938d28e515dcc7ce + pristine_git_object: c36a00c00b685d78b71e81ba87131c73c0d1ae02 docs/models/operations/bulkunassignkeysfromguardrailglobals.md: id: 7f8519de7a1a last_write_checksum: sha1:ddc9545ee81fc2e8797e3bd984866c223943b6f2 pristine_git_object: d962c6e5f9ebb848ba0f8b9946068763a4b84cb6 docs/models/operations/bulkunassignkeysfromguardrailrequest.md: id: 11b8284d978b - last_write_checksum: sha1:ca01a8b44f28b5093eb77848fccfe77ed55aac07 - pristine_git_object: a57fdea559554754eda842843a4f379a0a3266c8 - docs/models/operations/bulkunassignkeysfromguardrailrequestbody.md: - id: 70c081957fd7 - last_write_checksum: sha1:0ef603ea9b21005fba34c0a16a217cecca35660a - pristine_git_object: 5a1b1ad37d6a0d34603e6e693b1b67ec3854142c - docs/models/operations/bulkunassignkeysfromguardrailresponse.md: - id: 04155d81cc22 - last_write_checksum: sha1:b5085fb21424a2d9c1bc2062e32641dd13378e3c - pristine_git_object: c77c8c7788c83b34e67b96fa4e4ee80b5863f83e + last_write_checksum: sha1:d6fc192711573998a07e33aab1dacafa597a1a91 + pristine_git_object: 44f7f4a41b6de14a2b992d489c54437a0f7b70a4 docs/models/operations/bulkunassignmembersfromguardrailglobals.md: id: ead5b950893f last_write_checksum: sha1:a5880201b08a5af7954db2b93f2a1dea0fcda3b7 pristine_git_object: 16ee3a942feb9536c0ea9e3dc4022862f737d2f8 docs/models/operations/bulkunassignmembersfromguardrailrequest.md: id: 18d0efe64297 - last_write_checksum: sha1:57a3df4ae89081559262ce3a0d0480156ec1821c - pristine_git_object: 668117d9a57991d16d33f9b31f8809b5697e820f - docs/models/operations/bulkunassignmembersfromguardrailrequestbody.md: - id: 88aa17ef2fc4 - last_write_checksum: sha1:b38c129d01e1da2f5949e0ff0acf1a8e3519a3f0 - pristine_git_object: 82ae5400dd7451710f20dffc0fef90081babb53a - docs/models/operations/bulkunassignmembersfromguardrailresponse.md: - id: cd55826aaa0b - last_write_checksum: sha1:0a20ebfffcac64297a3e144220fd7a6c8fda7155 - pristine_git_object: a35686705068da84815519a0012adcf6f6363359 - docs/models/operations/calldata.md: - id: 61fd699260b7 - last_write_checksum: sha1:59c23ee14134f0af662207b7dfd26978cd9a3675 - pristine_git_object: d630cf8a4fb642abcbafa927ff8f4af3218c9f3d + last_write_checksum: sha1:ac628f6002483c3aa22c300021e5240d6e1629aa + pristine_git_object: 0d825994d4e24739660de23e9d5fb0cd8be18d3c docs/models/operations/category.md: id: 38b5d89ba971 last_write_checksum: sha1:d9d9d5337224da46c18f1f77020b0df0c2106845 @@ -1507,84 +1444,48 @@ trackedFiles: pristine_git_object: 2068be70948914ac3c26a9bc0469cbe2a3e7e34e docs/models/operations/createauthkeyscoderequestbody.md: id: 41569d05ee8b - last_write_checksum: sha1:5d7996ddad24270c2c0e8f11498068d07be6f397 - pristine_git_object: 9e51f134d7964144989224d9ce193840877be666 + last_write_checksum: sha1:0d92cd55862c8774cb38453c1824cf7bb443a95e + pristine_git_object: 54c55968bf5592e8fc77b66e0384cf16b105bf58 docs/models/operations/createauthkeyscoderesponse.md: id: 94a1e2c0f03a last_write_checksum: sha1:8f4eaa9a5649fce1940c6d145138916b9076d5e3 pristine_git_object: e610aec99da2631ca021f7da7b7fff51cc2a8ed6 - docs/models/operations/createcoinbasechargedata.md: - id: 490bfd48525a - last_write_checksum: sha1:3e1fa70b7006fc4e8ea3b58c96901ec4c1f2b09b - pristine_git_object: 9acb63a0586c85be3d04febab19bd40d70b8dc09 - docs/models/operations/createcoinbasechargeglobals.md: - id: bed4fb2653df - last_write_checksum: sha1:a441886a90c0ba1a2193b64391eb7b67683fc611 - pristine_git_object: 8a57aaa679bbee961ea6221ab812acaa7beb6473 - docs/models/operations/createcoinbasechargerequest.md: - id: 1ad6100da109 - last_write_checksum: sha1:5085c5708cdb0a650bd7120678fb19ba4a6404d2 - pristine_git_object: 7427ed1d4fea842c56462ad06e14b768eac94ee1 - docs/models/operations/createcoinbasechargeresponse.md: - id: e65fad3f99f9 - last_write_checksum: sha1:6659e8d6ccd26453231b2687c880e21c7ec918f6 - pristine_git_object: 48df4424dbc61c0816c9817714997fd2ce5b59cf - docs/models/operations/createcoinbasechargesecurity.md: - id: 737be14f7fb6 - last_write_checksum: sha1:19c9dd5cdbc0b6edf2ddd2032285174e77a94830 - pristine_git_object: 9de595c8d2af49d56f8fc7c27a0dc38f40a2a92a docs/models/operations/createembeddingsdata.md: id: d578a89d3da9 - last_write_checksum: sha1:dd3434d9a34e2f2fef6321ee451c4b2035ff83a4 - pristine_git_object: b6acb2269230b6e88e6d2e8fe87c529343704b0f + last_write_checksum: sha1:8aa49c928d2d1326ec80f4ec21627f31f5ec5c3b + pristine_git_object: 43c86a3007aca0a423d48cd0b2aca628d62f02d0 docs/models/operations/createembeddingsglobals.md: id: 35582313a14e last_write_checksum: sha1:a302b579acd0a1ab7767c3f5655366d6f13e1826 pristine_git_object: fb4f79f436ec911f7b6cf4bf3dea644f1d88659a docs/models/operations/createembeddingsrequest.md: id: 69cf4f5d82bd - last_write_checksum: sha1:78c2602b817b404958fe44499cc2a0cda6babeb4 - pristine_git_object: 2768e50f2cd1d11ef54222de64f66a63e9715215 + last_write_checksum: sha1:da2d477ccd30f540d587bac50eff0c168afa4d84 + pristine_git_object: 427405dbd4c22dcd68562ae75a2e148c29b3880a docs/models/operations/createembeddingsrequestbody.md: id: 295a16bb71ad - last_write_checksum: sha1:218360560487950435b551327c098d4af9cd10cb - pristine_git_object: 37b54605b995290afd8372cbfcf8c89821369f81 + last_write_checksum: sha1:9ffbd5a09427d1f1ab234ca6032b55c936ab3bcd + pristine_git_object: 2c5e4371ed8c730f78fb9bffcb74ba0454d052c1 docs/models/operations/createembeddingsresponse.md: id: 3db56e9f80db - last_write_checksum: sha1:ad8b1994a2642406158c20fcc49c7c7ffe297373 - pristine_git_object: cfc7f402ab937558070c93bc75f277278b2fe5ca + last_write_checksum: sha1:9f56d6f978ec08bf44711c5cec0a001a8228a69c + pristine_git_object: 8ab9f0ee501dadb840e3e24b819922feb59ce55d docs/models/operations/createembeddingsresponsebody.md: id: 2b379b986bdb - last_write_checksum: sha1:45d20471e0cef861e7707c4fd727764ba64bcf55 - pristine_git_object: 18423c1dfd4f45eae5667c74b1b1be2bfd76af72 - docs/models/operations/createguardraildata.md: - id: d3bba8a28f74 - last_write_checksum: sha1:6982a26c23405a04e48693e0b19b29d3e82119db - pristine_git_object: e914c2f7ab2c53c9bf146a772d71f227dafe7d49 + last_write_checksum: sha1:39bd4ca26165b55ea322fff4da0729699cfd3873 + pristine_git_object: 3b5e048690ba09d4014bb384abc862542444f8b5 + docs/models/operations/createembeddingsusage.md: + id: 55932019377c + last_write_checksum: sha1:d3b7cb16010fb1e1fe7e7a6aabbd040cf9e0b2ea + pristine_git_object: 0b4a406c11e3232987e14ab4b5fbdb02a13b05bf docs/models/operations/createguardrailglobals.md: id: e77858413127 last_write_checksum: sha1:7ef455ffd6047be34e904af50a099ce6814fad12 pristine_git_object: 636614f8d6b57715713908ce9142d5f3996bb78d docs/models/operations/createguardrailrequest.md: id: ff2eac26fe01 - last_write_checksum: sha1:14431447721281325f6e83766c9f5596289ef266 - pristine_git_object: 2d9de582fe0fa7671b1553effbb80b5192a85330 - docs/models/operations/createguardrailrequestbody.md: - id: 40f2921a92bb - last_write_checksum: sha1:56bde52eb7eb2a32c9f6f933ede5c8caa42351e4 - pristine_git_object: c55fc131f7ed9cae5bf455ef0ce8298d62eb7b7b - docs/models/operations/createguardrailresetintervalrequest.md: - id: 939a4d83737f - last_write_checksum: sha1:138fa9a5650073a60f5f62333f6362dd8ac8c515 - pristine_git_object: f13dca3481fc60a35c7c6878e62797e92f833489 - docs/models/operations/createguardrailresetintervalresponse.md: - id: 20f91ff333af - last_write_checksum: sha1:3c4f53e715b447158d1b84ed91d1732d63751fc7 - pristine_git_object: 81c6a47cda6f4e072bae43664e3884596a6c209d - docs/models/operations/createguardrailresponse.md: - id: 357ae04b4e21 - last_write_checksum: sha1:dae57092abd450097d90d42e923e4dbe70853f2c - pristine_git_object: 82ab5e0cf72896cd3133decc512f5c07823b0039 + last_write_checksum: sha1:750ce6f539d3932f11ebec62119354fbbf0efc3e + pristine_git_object: 9c3d3ea5fd12861a6981f37e3bf30304836a1c54 docs/models/operations/createkeysdata.md: id: 9cbfcb7edadb last_write_checksum: sha1:788a18f60ca2bc5695169be63efa93c397c47204 @@ -1603,12 +1504,36 @@ trackedFiles: pristine_git_object: f5db40c72626ccecba274d177ab758088042e56c docs/models/operations/createkeysrequestbody.md: id: 7fe4c5641385 - last_write_checksum: sha1:3f1c48490829d0de735fe05d562b774cda30aa6f - pristine_git_object: dbf3e43faa345fd56030e40702012dac06e81ee8 + last_write_checksum: sha1:c75eb21ec886fbbc1a7d05969a2cc8ac7fca4313 + pristine_git_object: d02b37e92fef3dc0be844bbde60555e461b8f6b8 docs/models/operations/createkeysresponse.md: id: dacec48ccb70 last_write_checksum: sha1:06eb9a53da091aa5155c0b3358b5bc2b719d6e69 pristine_git_object: e09f4cc33d2827d971f5d10dce93a7474aba86c7 + docs/models/operations/creatererankglobals.md: + id: a69e0c2ebb3a + last_write_checksum: sha1:81de6495768fe15d967381108daa6e453e868ea8 + pristine_git_object: 62601cdabdfdb550688f56e297b0192263e7ba93 + docs/models/operations/creatererankrequest.md: + id: 9aacc054ae93 + last_write_checksum: sha1:e3f5cc1d1409d4fbc7dfd10a2ff7d9d4bad7f1f8 + pristine_git_object: 946011434acfa19662134dd84624cdc4b38a1e62 + docs/models/operations/creatererankrequestbody.md: + id: 0765b36caa92 + last_write_checksum: sha1:d423f7945faed017df65334439f07c0ce453182b + pristine_git_object: 925a36ea4b1050d538bd8df4643d5560ee72e938 + docs/models/operations/creatererankresponse.md: + id: 4ef868bdb264 + last_write_checksum: sha1:db9a3d988955d5de1f02367e4c2c3cb4060ece1f + pristine_git_object: f17c7c44cdba0cf39f2a9fa45a96f5c9118508d4 + docs/models/operations/creatererankresponsebody.md: + id: c7b025478225 + last_write_checksum: sha1:b70b263a8da078fbd7527a0ff557e091836eff01 + pristine_git_object: 8c05281affd5fc830670439e5427038583b9b11d + docs/models/operations/creatererankusage.md: + id: 3a5bad0b926e + last_write_checksum: sha1:2200390385749db8c668ef062ef7666e8aeb6ed7 + pristine_git_object: 0b77aeb1643fbbd607f17d8befa63bf0af8d6a30 docs/models/operations/createresponsesglobals.md: id: 18acf1695447 last_write_checksum: sha1:c7c9c9c761a321dd149838148cb8fc0652afd778 @@ -1619,12 +1544,12 @@ trackedFiles: pristine_git_object: 6d89398368e0dfd70dd396b859ed97b8790f6309 docs/models/operations/createresponsesresponse.md: id: c55a819f0ab5 - last_write_checksum: sha1:b06475f4653b025803adc0853307ebecf14775e4 - pristine_git_object: 05a6aa2b48a979aa960c4a861d0e7e651fce8704 + last_write_checksum: sha1:f3ca6984286e52d82b8749083d1e01655752574d + pristine_git_object: bffa7a5361f72c6a45ec35cd44b1a3c1fe1f1f06 docs/models/operations/createresponsesresponsebody.md: id: c0639e97c684 - last_write_checksum: sha1:ab2bd87bd695a2045985ae222355bdcea2fb2ba1 - pristine_git_object: 9a44a6587935f240b7b72d2c49baa09d1fd901ba + last_write_checksum: sha1:1c89a7df26d2dc4569733b19ac5e197263db59ff + pristine_git_object: c8fb8cb33d758b9769b9e9a83d67ae4d4e50e450 docs/models/operations/datacenter.md: id: 7a9819bf0f2b last_write_checksum: sha1:7ea8594aad4e4b93a6f7e5d50c12cb38cc1fbd49 @@ -1637,10 +1562,6 @@ trackedFiles: id: 1bd1d6b15de5 last_write_checksum: sha1:cb09eb05dcaf199d1835df90ba15df361edeff6d pristine_git_object: 9989ffc9ef5f3ebd4bff9d6078dc4969099d86e3 - docs/models/operations/deleteguardrailresponse.md: - id: d7079591d587 - last_write_checksum: sha1:b0772ea7a1458a5b463290f731f92c21bcdcff1b - pristine_git_object: ef931107083e4cd826ffb22de9c3dfa7f0070f3f docs/models/operations/deletekeysglobals.md: id: eee2ff646d0b last_write_checksum: sha1:be1cc97f87b0e022e9ef1673d28b9063b561949c @@ -1653,14 +1574,18 @@ trackedFiles: id: b7cb4fb91f4a last_write_checksum: sha1:584251965fcdfd8b0df2b6edafdd4945ac372018 pristine_git_object: 5bab0e60c31fc3e0da330544ade1d7642703f6bf + docs/models/operations/document.md: + id: 20633c7fa04e + last_write_checksum: sha1:f6c94c47492cab9f19380585ffa79fb6caaf15b3 + pristine_git_object: d019e7ad42175269dee5b55db48a38fcce8fe649 docs/models/operations/embedding.md: id: 78fbe8e6e84d - last_write_checksum: sha1:2065eb916556a77f713dcceaa8f376c45afe6d75 - pristine_git_object: 840767b68e655f738b593c22673cf3aa1e1dea78 + last_write_checksum: sha1:eaa78d9f7132ae36e597c5635330c39da8d36f65 + pristine_git_object: 34cea4b90863c31ca099620e2961a00992909a3c docs/models/operations/encodingformat.md: id: f39b79526b77 - last_write_checksum: sha1:6c30d2ef586bc5c9f4f5a54c37b755263b7c28b9 - pristine_git_object: 02594e2554793a8b8e1e80bdf6d34cf168d09e61 + last_write_checksum: sha1:692238ac6634649b7d2ddcee20a828d5260e850f + pristine_git_object: 78efaae2ea4087428561ce6ce5b1952eded787a0 docs/models/operations/exchangeauthcodeforapikeycodechallengemethod.md: id: b35744ae0419 last_write_checksum: sha1:514d191123f272c81bc4c0ddf33cf7018e2565b5 @@ -1715,24 +1640,20 @@ trackedFiles: pristine_git_object: 30bd2282274b8df4d8cf91113a061081762edf39 docs/models/operations/getgenerationdata.md: id: c47059f62af7 - last_write_checksum: sha1:af20846a31a320fd39534e49800967bca881f27a - pristine_git_object: 500816daa2609ae1b880c8fe86f6bf4440de16da + last_write_checksum: sha1:2fa0bcdeb33558a809e88ef3ff031d3a8e3d1a13 + pristine_git_object: 467547298065e4e050cbf135e59731a1686d7af9 docs/models/operations/getgenerationglobals.md: id: 5f2afe6fb90f last_write_checksum: sha1:832bdd95d117d8afd5ab64f730df60b90be80b60 pristine_git_object: dc1d1dbefca3833bf2e8ecb7c9a23f4acfcbaa31 docs/models/operations/getgenerationrequest.md: id: fe98f4f7a718 - last_write_checksum: sha1:a03a8cac5250effaae1fd86ea721eb5f7be3faad - pristine_git_object: 721877b0c6ed62ec9ca270f1f8a02902427100bf + last_write_checksum: sha1:515943de37768e391f86dee8d5e2373e2f1c27a9 + pristine_git_object: ab182ccd1b7dd785ed6ab7b3806c020ca89e2739 docs/models/operations/getgenerationresponse.md: id: edafe5ee4596 last_write_checksum: sha1:2a6b5ed7e9ccbc5ccf1486f345296566925664f7 pristine_git_object: 2f82ace8b79f14ae2c1d61d3182813ba862b83b4 - docs/models/operations/getguardraildata.md: - id: 698e237b3e04 - last_write_checksum: sha1:0cf06c8dd86e7eccc4f8fe687d417ce75a136f2f - pristine_git_object: ed56bce70f230cdd8bac6302340534381ba4e64c docs/models/operations/getguardrailglobals.md: id: e8b35d73e652 last_write_checksum: sha1:61e3b6bd526b08956d6b98402d15277a8129f88d @@ -1741,14 +1662,6 @@ trackedFiles: id: 1e8ddf8ef10a last_write_checksum: sha1:72fb2d0b40588232166ae01afc64ba50e97e5f89 pristine_git_object: fdf0bcfd61cd4a978344d826d4c7ab862842032b - docs/models/operations/getguardrailresetinterval.md: - id: 8f08f64080d1 - last_write_checksum: sha1:1790f5786360c4e46f2a4038e0ee5d4e612b3b08 - pristine_git_object: 3b74eacea86d584ffc8baa6cacafa70783f9cc10 - docs/models/operations/getguardrailresponse.md: - id: 158ac25881ae - last_write_checksum: sha1:2ff76ee41d5f4daf6e74ceb1c3a9a26b83b04ae1 - pristine_git_object: 1f501c881f91f702314209f03f8f1bde80d4ff36 docs/models/operations/getkeydata.md: id: 359964834be9 last_write_checksum: sha1:c5dcbe772df48d5c997b1d8d93aeb8bab2a42da4 @@ -1771,20 +1684,16 @@ trackedFiles: pristine_git_object: ff8b217678df8e2b62c6dec64bc4350add0b3305 docs/models/operations/getmodelsrequest.md: id: 801c51f5ac65 - last_write_checksum: sha1:d002835390dcc17e508b1471393463c8eafd3d5a - pristine_git_object: 584f2c715beb81dd7aea0917fd044bf119309fc9 + last_write_checksum: sha1:066a59cc51205325a8f604c199f4263acc8b231a + pristine_git_object: 2b9e2e53dea497ea65c3b0afe2d5fdcbc5c07082 docs/models/operations/getuseractivityglobals.md: id: c8e7b780737e last_write_checksum: sha1:a3a48d069e8d87c6f9a6d01ed1706d9c555e49ac pristine_git_object: aa35304d64364b40f20fa4733e02954be2d126b5 docs/models/operations/getuseractivityrequest.md: id: 094eba1cffb3 - last_write_checksum: sha1:3e43f20cdbb65dc5a0c576e4c3b8666ca52ab56d - pristine_git_object: b42df01fc07199083733e2675483899d3aef3ab9 - docs/models/operations/getuseractivityresponse.md: - id: 4f48d035cca1 - last_write_checksum: sha1:eed1b34aa9c90cd31f03b3374363d5b93065b942 - pristine_git_object: 6276d5ef171c677f757a924cdb5992a6521f9d62 + last_write_checksum: sha1:5652206fd6eb4f59090aac68eb899c45acf57cff + pristine_git_object: 3761cd02e4df68823b60d457a33ab07adb4ea092 docs/models/operations/headquarters.md: id: 6d8d0f5b8582 last_write_checksum: sha1:df26249f2e2292e0c4f310e0067a54f5f2877363 @@ -1799,8 +1708,8 @@ trackedFiles: pristine_git_object: de8968b29fc5d21bb21cd09d7118240c120ec6fd docs/models/operations/inputunion.md: id: eed9590d62a8 - last_write_checksum: sha1:c09d0ef41cd378ac909b94962e726a67d470301c - pristine_git_object: d9f8b76324d689897fb59610c9a13e1a2d83fad1 + last_write_checksum: sha1:dfc7b3393d8d909f706c482de9322c7d19879c8e + pristine_git_object: 0989515a5467e052ac586d0dbfd358961231280c docs/models/operations/listdata.md: id: d80bed3b167e last_write_checksum: sha1:37d0f9bfc6a4aa26430873a93ccc18a44b19614d @@ -1819,12 +1728,12 @@ trackedFiles: pristine_git_object: 97ff92882e18e4b52f43529b5d31de98dd7c0923 docs/models/operations/listendpointsrequest.md: id: e52338ef5349 - last_write_checksum: sha1:3b4c2df7e469d76796a9477dfa81a751200806f7 - pristine_git_object: a5eecdd5cd6cbb4755e5dc0781759095446b024e + last_write_checksum: sha1:d31e95cf3fcb06444c491c434cecdd8a2b02a652 + pristine_git_object: 6298ca2129603f3eafd95073870da4235c9e55f4 docs/models/operations/listendpointsresponse.md: id: 662f4daf76d2 - last_write_checksum: sha1:6b213b9f0bdc2fb68e0b3d07f13f68e805c765b7 - pristine_git_object: cd366c60649b0588fdbea1f74072759585e04e7c + last_write_checksum: sha1:5e411fb9445e23c644ba86c7ca992560f1208390 + pristine_git_object: a97e086b45af4b2c331a47457e0ec59240408ab9 docs/models/operations/listendpointszdrglobals.md: id: 398b7a4786cb last_write_checksum: sha1:2c9fbd5b46ec7115c65583d3e17f0d3144de843c @@ -1835,96 +1744,72 @@ trackedFiles: pristine_git_object: 172a25fac65911a10fe0e5237c5c591dad77afcb docs/models/operations/listendpointszdrresponse.md: id: 5c9c93477484 - last_write_checksum: sha1:719e6d95b94c3a9064a7f5d834a3cfa0447a096a - pristine_git_object: 92153e5ad732d668c12b57d90b6c0d3df67f01a3 + last_write_checksum: sha1:2ac8892a1bd15e13c394b0f0834ad0ce3e6f675e + pristine_git_object: 4c8d2ef2287a57730a6c33e468ce4412371dcd40 docs/models/operations/listglobals.md: id: f8c0a9ce961c last_write_checksum: sha1:3635bee00d7f3c7e1b2fc1c052fcf95743593094 pristine_git_object: aaf00291062378387c4730897767acb6d1af63e2 - docs/models/operations/listguardrailkeyassignmentsdata.md: - id: 2449d3e220c5 - last_write_checksum: sha1:90c67668b39d1d9014650badbce2bf6eeaf65811 - pristine_git_object: 14a675121c0711d893ad996b79deee38f168cf3d docs/models/operations/listguardrailkeyassignmentsglobals.md: id: 7925690ec4dd last_write_checksum: sha1:8da84afb2dd461ca5071e146a1d2d2add5ded7e9 pristine_git_object: 4a33b8874997b3628aca6328c4618d549b9c151f docs/models/operations/listguardrailkeyassignmentsrequest.md: id: 0da98c6ebcd1 - last_write_checksum: sha1:6172f7a40df9fe488e960b4f5bdfeccc7420a744 - pristine_git_object: ea9fca674108d9523254fdaa211a379ff657733a + last_write_checksum: sha1:961caf693e0f96774a5f10ba563b7d59f5e0e7c4 + pristine_git_object: 98960de4de8ba82fcd41d84ea5b0c03a5c26b75f docs/models/operations/listguardrailkeyassignmentsresponse.md: id: e03a3c240b60 - last_write_checksum: sha1:98226493d1e8244993f796c0c315b1410a29c90a - pristine_git_object: 386a0775b25ff248944ee3a897b756b32471b457 - docs/models/operations/listguardrailmemberassignmentsdata.md: - id: 0f48e0c7bf39 - last_write_checksum: sha1:658762757fac748991893029e84f48cab0b72a0f - pristine_git_object: bccd30f3b2250f966048111d7f090554f60d895c + last_write_checksum: sha1:3bfdd09ad6a06253bc67f9e6f4b72a8dcbe81656 + pristine_git_object: b88efeb7ba9a12ab68e4c42460a65284e0fda865 docs/models/operations/listguardrailmemberassignmentsglobals.md: id: 23bf395fd200 last_write_checksum: sha1:47876b17d314afc1d1fa3505fd3b86221665db70 pristine_git_object: 932671e17336d1c5deef79ee5a27f984457154de docs/models/operations/listguardrailmemberassignmentsrequest.md: id: 09467f2fd854 - last_write_checksum: sha1:4d27d1975e66f6c8e0d166f1132114c6cca01e2b - pristine_git_object: 6c3d33e2e0cbf56400f3e02f925cfc3f068d7947 + last_write_checksum: sha1:46c22f93d7e25130d699388f3c96a4bc450c2601 + pristine_git_object: c8c6940d2edc981ec32cc6912d728733ba735bbd docs/models/operations/listguardrailmemberassignmentsresponse.md: id: 192195db9749 - last_write_checksum: sha1:335f647ad7d76bdd149681bc88fe95c7e79230d4 - pristine_git_object: 297a6a8958e0024e63856f852593cbca1c76e49e - docs/models/operations/listguardrailsdata.md: - id: e3026e27f10f - last_write_checksum: sha1:8d0f127b786faf02528605c2ea9c26229b12d474 - pristine_git_object: d0b8b4e9f4939cbe0b58333b174fe5bd846ed6b5 + last_write_checksum: sha1:5aa3e39ae7adac28db22f58c687be02d6d14e0df + pristine_git_object: e0dc52437852f7e1543f151c54c11a2cb69d554f docs/models/operations/listguardrailsglobals.md: id: 2f7750b36bce last_write_checksum: sha1:a343ddcb7e52369c097bd2ee69a952feee280e1b pristine_git_object: bd212b445e0509816dd7f1ab76c810d24061e420 docs/models/operations/listguardrailsrequest.md: id: 3ae99ee8cbd8 - last_write_checksum: sha1:945349f076d20164872e43dd1e3408fa9ae440ed - pristine_git_object: fd4c9dede58dca7aa7ea6f0a8a99d2f33600959e - docs/models/operations/listguardrailsresetinterval.md: - id: 8fcdc9f3b5af - last_write_checksum: sha1:ea28a99c2ace8ab453ef2d92254075a38948f0d0 - pristine_git_object: 4295722e4495e43d1836592b7a76a24f6d3859cb + last_write_checksum: sha1:d317459caf6567c578489f05253cbe3950355b4a + pristine_git_object: 1d9c1ad93fa3269b9f179ac681304319ad4fbeb3 docs/models/operations/listguardrailsresponse.md: id: 3d55593e8311 - last_write_checksum: sha1:000d04909a19f19c3ab3e65c775ec85f04378703 - pristine_git_object: f32e01e8003c7d73ab69190ddb7951f658fdb074 - docs/models/operations/listkeyassignmentsdata.md: - id: ba3435f6b2d1 - last_write_checksum: sha1:ff04fa1a32fceb4b46829466dcfe50a170a91c2f - pristine_git_object: e30d8132fdab61f06d909b2207a1e4b7c0924641 + last_write_checksum: sha1:340af3355c9157deddb6b6b2348aadf2ba4d62ac + pristine_git_object: b2a857e86dc5ae0e664af027db9235716c71cea1 docs/models/operations/listkeyassignmentsglobals.md: id: ccf1cb233045 last_write_checksum: sha1:2e1e5cccd6760af76b71aad6fe4d2f636784d0fa pristine_git_object: fb98c566c646303406068eabce63e0554e14b4cb docs/models/operations/listkeyassignmentsrequest.md: id: cf678e788175 - last_write_checksum: sha1:1f6bf385568005e2ec56f8e7c9e10b15db049541 - pristine_git_object: aee7f11525be694399760131ac3a47284cf5567b + last_write_checksum: sha1:06da3575de3d3861a8a9a4709f32f11369b88a26 + pristine_git_object: 5c3f8d71fa2b7adc9a46b30a06c25f4d70274889 docs/models/operations/listkeyassignmentsresponse.md: id: 55f05a5d20ad - last_write_checksum: sha1:f65bc21e6582db5b85e12637b4a1c1dc185ccb2b - pristine_git_object: bdce9b8ec7692cfcafe0cfd99eb21c5fb074e59a - docs/models/operations/listmemberassignmentsdata.md: - id: ee3f4f34190c - last_write_checksum: sha1:d8161ec7de10c1e0659954fd5f468621be7298a6 - pristine_git_object: 52d097617cd3df704040c550e747a0636b35ff0f + last_write_checksum: sha1:edad8914c7017954c4cff8a6bb535d3d47627ee2 + pristine_git_object: 884f706d54510c3a0b7e13e167bc0f8af7fbc5ee docs/models/operations/listmemberassignmentsglobals.md: id: 248b072d8556 last_write_checksum: sha1:67ac80ef0664b73473b1080135c7847e392ccbc4 pristine_git_object: 464f8c7bcc97289d56794e4c041550aec310d4b7 docs/models/operations/listmemberassignmentsrequest.md: id: 010cf517af0d - last_write_checksum: sha1:929f4837ac72e1111bcf513c4631f30f45e89581 - pristine_git_object: 9d8e2840a82cfe2f93ea29a472170edc0a8abbf8 + last_write_checksum: sha1:59ee7d7795498bc4a76e99af4614a34f8afa9099 + pristine_git_object: c8c39bf75982ca3086650b4e6fbceeb644746ebf docs/models/operations/listmemberassignmentsresponse.md: id: e8da4e9e6027 - last_write_checksum: sha1:6299d28524846483d818ac55a0ebb93a416f71b7 - pristine_git_object: d9d9bb77d9f221b4586c800442fb88b091c8e3ba + last_write_checksum: sha1:df172280a544c78e4e50195122122966efedf483 + pristine_git_object: cf85071eebec232130be261f7750f8c27a1753ae docs/models/operations/listmodelscountglobals.md: id: 0af2c2696127 last_write_checksum: sha1:97b26975a931daec6fea5e671fed1534fbfba4cb @@ -1945,6 +1830,26 @@ trackedFiles: id: 07a43f294881 last_write_checksum: sha1:0960a0a6dbece8266f287e905eb5e592024240f8 pristine_git_object: bfa424be941736220e7e5aef02e0b254b429bbbd + docs/models/operations/listorganizationmembersdata.md: + id: 8e9af7c7ecf0 + last_write_checksum: sha1:d8b0f80e9122392c7d3181b55fb549e48cb99b33 + pristine_git_object: f7775fa0b99ead93bf8861209e26933726398d69 + docs/models/operations/listorganizationmembersglobals.md: + id: 83ce3eaf29de + last_write_checksum: sha1:2130f66a4cdf354ac399ea294e0be6d6c56fe29b + pristine_git_object: 16e56661a755e0aefcb16fc12ecafa8bafec7c2e + docs/models/operations/listorganizationmembersrequest.md: + id: b0a028cd1a8d + last_write_checksum: sha1:70fea0c70aa1e6386849ada806220615512a46d4 + pristine_git_object: 28d4ca5d74ad4034441f34775dffa3a4eaff9993 + docs/models/operations/listorganizationmembersresponse.md: + id: 16b76ebf225a + last_write_checksum: sha1:0f6651f295d8eb2f0d874c1e083da50832561504 + pristine_git_object: 90b2325af1a10041a6f80e1860256c2cddea4f87 + docs/models/operations/listorganizationmembersresponsebody.md: + id: ae9cc6ec886a + last_write_checksum: sha1:35721f51d17e97735cecabf5e0872d9641988bb3 + pristine_git_object: dca67117dcbbd8f5190f39d7159a81bab90f227b docs/models/operations/listprovidersdata.md: id: 97edf5a3cd2e last_write_checksum: sha1:a3db6d0a1068cf29e28627f95216b6e991477e71 @@ -1963,16 +1868,12 @@ trackedFiles: pristine_git_object: c383f6cd643368b2e7235318cafbc5658a80d556 docs/models/operations/listrequest.md: id: 88400dabffcb - last_write_checksum: sha1:5ce56184011ab8b170baf8583c809022efdc2a1e - pristine_git_object: a29359f4850f1b4d5dc7d3d4795307c95689574c + last_write_checksum: sha1:f02a4cfea22f0dc2686de3317ff9ba7ea698c7b5 + pristine_git_object: 3104d412c9af20190f552d00cffdfa8526841e68 docs/models/operations/listresponse.md: id: dcc8376da198 last_write_checksum: sha1:67a7c53d70a9a01477bb4a404f088003a492fdb1 pristine_git_object: 196deab5f612d3c6358697e3f7cab879e394dd77 - docs/models/operations/metadata.md: - id: 4c22404ca93c - last_write_checksum: sha1:0c48510c4e07e55f79753cd344f3f1270af6c6c8 - pristine_git_object: 597c48b5fc1d48d143a4babf7abc90a7b94d4bf5 docs/models/operations/objectembedding.md: id: a02a569169a0 last_write_checksum: sha1:643772fa89e5f287be7db8295088c2984685a365 @@ -1981,26 +1882,26 @@ trackedFiles: id: 98bd2cd64286 last_write_checksum: sha1:f9ff52c02c2cff4b24d7b4dad7101418ce372018 pristine_git_object: 6319d7beaa2d9709e126f07a3207533fcf24c1b8 - docs/models/operations/providername.md: - id: 616da1534f02 - last_write_checksum: sha1:1086ea193720fb0da1c7df863e66511c58055738 - pristine_git_object: 37cc7202ebd402d3a705fa4ba5f5c14077af1bce - docs/models/operations/providerresponse.md: - id: 8af09d586b03 - last_write_checksum: sha1:3969076345480f6e5738cc0299685a56331137f0 - pristine_git_object: f4c34c0401f326239d620b1974214dd189306e53 docs/models/operations/ratelimit.md: id: 94a6ae30f279 last_write_checksum: sha1:55a11ba047d92a3ebaa49307db470a78dc12ff00 pristine_git_object: 2fa11c778b7bfd350cabb68566c553fc7faf3435 + docs/models/operations/result.md: + id: 6953cabb9266 + last_write_checksum: sha1:043162724cb891e68fbc8b9587f2fefbfc97cd05 + pristine_git_object: 9d7070c8dff5604219565025d7d0cf7cd59ea499 + docs/models/operations/role.md: + id: da2c36811787 + last_write_checksum: sha1:51b191a147a8c242fd8edcc4c251a3a5db0f559f + pristine_git_object: dafd039c7cf683365d9a9f0e90fbb0e1f37e12ce docs/models/operations/sendchatcompletionrequestglobals.md: id: 90e72b8cd0ff last_write_checksum: sha1:d7862a62211f2fb7eef9c731b553de866ad7d455 pristine_git_object: 9f12b326c289cab94bfb4cad2cfaa4ed1c830dc2 docs/models/operations/sendchatcompletionrequestrequest.md: id: 20682772581d - last_write_checksum: sha1:05688a4a24e585e974349f5b36323591a8512092 - pristine_git_object: ae5e29123a59b46b1e5d52f6e8b68747520f3717 + last_write_checksum: sha1:0e2233fb1a742525d522f545742b7a7030b7aa0d + pristine_git_object: 1539973a7e7a6b54785afcc8f4461668ac9d59d0 docs/models/operations/sendchatcompletionrequestresponse.md: id: 3ca0009c143d last_write_checksum: sha1:01ad67821135ffe63f1ca7207fc27213641611f3 @@ -2009,38 +1910,14 @@ trackedFiles: id: fb7605216c3b last_write_checksum: sha1:1d5d315b82137fd932a05a36fc5e036238acb30f pristine_git_object: 6fbbfa90899e386f6e6786cc5064820a6ec3b1fc - docs/models/operations/transferintent.md: - id: 4585adc299cd - last_write_checksum: sha1:20096e1501c818b6229900c48845a340e10301fc - pristine_git_object: be14c3de94902289b9f2d74ba7472aff1895bc08 - docs/models/operations/updateguardraildata.md: - id: 5b03440d96da - last_write_checksum: sha1:b5fedeff51cb8b4be58b2e741f8a118168cdff84 - pristine_git_object: 22cbd14ec9d351587650487eb6d9df5bd37963ba docs/models/operations/updateguardrailglobals.md: id: dc7cc05a81c1 last_write_checksum: sha1:9a81f6463fdae1bddc1194cd2717b2a6855dae6d pristine_git_object: 5f51b0819f6f85018f24995306dac910a66bf08a docs/models/operations/updateguardrailrequest.md: id: 4750db2d4690 - last_write_checksum: sha1:5cc26a4b53acc9bc2093d7dc25372eef4696fb9d - pristine_git_object: 1a3aa6337529ada13803aeeb59ba63874f6baee0 - docs/models/operations/updateguardrailrequestbody.md: - id: c4990d5fd9a9 - last_write_checksum: sha1:2f1070851bd7d7cbc49899394b25668c69bfdac0 - pristine_git_object: 02e8d2bc846a9724b27ef2425bdf172496bfa340 - docs/models/operations/updateguardrailresetintervalrequest.md: - id: 8535183822a9 - last_write_checksum: sha1:0089c350fd23ca94e266bc9dc9001939071626ae - pristine_git_object: 8e6f6716515e999f55897fc68d120d402af61448 - docs/models/operations/updateguardrailresetintervalresponse.md: - id: b3d1e23bf314 - last_write_checksum: sha1:a38616b6fb876dbe2f5851bc254d5a4998d4104f - pristine_git_object: c4c13495e401930216844d71a4319f9bc25f0a65 - docs/models/operations/updateguardrailresponse.md: - id: 5c8279466bec - last_write_checksum: sha1:714f394c01dbde489c870e026eb7301c497eb49a - pristine_git_object: 51f061f5c4ba1c5c86c2c16e982d127410ef3de5 + last_write_checksum: sha1:d953919eb3e9e21f993bcb2c59ca3535f2f0a24c + pristine_git_object: 32c1938d9e141aeec5a413dd10212aa2122fc313 docs/models/operations/updatekeysdata.md: id: b58660ebb695 last_write_checksum: sha1:0c0c7f49852d5c09dbd9e29c0bd6031e999716f7 @@ -2065,34 +1942,26 @@ trackedFiles: id: fb4d74ed0adc last_write_checksum: sha1:413f6629b6428c4d158f2a6ea5c19ec04d72dc11 pristine_git_object: cd71a1d25efc6f689674b57062f31a93309c9ea5 - docs/models/operations/usage.md: - id: 735448cf5655 - last_write_checksum: sha1:4b96e81e4d478f4f489cc9b24728e5997641200f - pristine_git_object: 9fd024851b0da0e68bd923c5ade17fffb9dc8410 docs/models/operations/usagelimittype.md: id: 22ad2742a599 last_write_checksum: sha1:7a6bf686440f92d48981d49715bcff65bb122e2f pristine_git_object: 83453002a36901fb9972e6c8768c141d6b7e4c02 - docs/models/operations/web3data.md: - id: c7e71a30706c - last_write_checksum: sha1:f20566610f7231c6e4b8616b55612cb645aec2b4 - pristine_git_object: a47730add7de7c357505bd52d7df97ce35232e53 + docs/models/order.md: + id: 5d2682daf79b + last_write_checksum: sha1:a2171967c9823ddb7138ba4981a96b9ad7d42e63 + pristine_git_object: 8a2f0898d0183e15dd1a5b2e120cf54be5cb0504 docs/models/outputdatetimeitem.md: id: a4676f917431 - last_write_checksum: sha1:805242a01e1b141cd29b14f6b3d9de27d11169b8 - pristine_git_object: 0a60dce269a379a38342dedc9815d11a773fb157 - docs/models/outputdatetimeitemstatus.md: - id: 7cc9f23255e3 - last_write_checksum: sha1:0311bf99a8c761e5fae4b40fbbb9147a7ee4e447 - pristine_git_object: 5f095760ab299e8f3c2970e3b150da535adc3a48 + last_write_checksum: sha1:419fd1522616bd995be4a0d14e2df34bc479159f + pristine_git_object: 892e7362b5b10ef14f627324dda8362f44419c86 docs/models/outputdatetimeitemtype.md: id: 59d60c98a6cf last_write_checksum: sha1:105802dd34e2b72619465fa8e78a0fd04e647a11 pristine_git_object: c7f484c15d085cb3c2646b2ce10caf299ff0615d docs/models/outputfilesearchcallitem.md: id: ce9d5a22a75a - last_write_checksum: sha1:db1dd3325709f12c6d11bc3ba0fc0cb8c3ce7737 - pristine_git_object: 6663702af913e1bc2121c03c571bb328584035c4 + last_write_checksum: sha1:ce7822b53df2fb8f94c9dcecd33d8a5b7a1d6974 + pristine_git_object: 1faddfcef67b24c0dc36537e063cac4195111764 docs/models/outputfilesearchcallitemtype.md: id: 116d15acfdd2 last_write_checksum: sha1:a32ae965f4ff2c6cd5b3544c787c28a2ce0c0f17 @@ -2103,8 +1972,8 @@ trackedFiles: pristine_git_object: adb93d341a4c914c9b936a793e586fb212b5c7af docs/models/outputfunctioncallitem.md: id: 8300485b699e - last_write_checksum: sha1:be827944dfa5d651b3063cfeb932f9d5e168ffbb - pristine_git_object: e0790650a586c473797d0110ced96397999f325a + last_write_checksum: sha1:b78e61dbd89f672dc1a59a4a286fb9755f4a6037 + pristine_git_object: f2f0270a1971fc17a38df4f85faa05ecb62fd441 docs/models/outputfunctioncallitemstatuscompleted.md: id: 38f4a88dba7e last_write_checksum: sha1:d71da18899b11ffc260978b45e806b2076835a74 @@ -2127,8 +1996,8 @@ trackedFiles: pristine_git_object: 4583d296ed3850987194d2698f596f3bc89091e0 docs/models/outputimagegenerationcallitem.md: id: ddf7a3af310f - last_write_checksum: sha1:72128dd39e5a35da99a7c233372d91c61b629485 - pristine_git_object: dd03e3bf91753ef7b094d5bfdedf04fa1bc7e8e5 + last_write_checksum: sha1:2a327a79e4113cac58670d0fdf384648eec9dae2 + pristine_git_object: 792928f9911b9f4de8adc04fd7d60af732b29c5e docs/models/outputimagegenerationcallitemtype.md: id: 0230b362a729 last_write_checksum: sha1:ea2368cb8831fc4fa9884ff6059b3bb36f9cf18e @@ -2147,8 +2016,8 @@ trackedFiles: pristine_git_object: 06c7d7bce3957e371abf88b72932c381684c553d docs/models/outputitems.md: id: 6942c0928d92 - last_write_checksum: sha1:7ee7e5c4e1e1545d5a271e46433a20c2d58045f6 - pristine_git_object: b1e8cd9bcce5d39ce32027313d318018830dd488 + last_write_checksum: sha1:a86230092493f7a3b877c399b6e7643a61980591 + pristine_git_object: fd3704aa2ba260d9d7cb078debc8ca602c48371d docs/models/outputmessage.md: id: e52a5866db02 last_write_checksum: sha1:1236707e8d8923906d77564ed879f0d899ef8190 @@ -2239,20 +2108,16 @@ trackedFiles: pristine_git_object: 698f2ba84bcf9d383a76f4dd216ffe19ed15aad7 docs/models/outputmodality.md: id: 6fd80b0d62b6 - last_write_checksum: sha1:b2c958285bc75bd48ddd94b18a42710eace5e2c8 - pristine_git_object: 1efcd8a374a2094b5d60f1b4a6783ecc85345e42 + last_write_checksum: sha1:08c40364afad54a7ef5ddd2bd703c8decd8f33c4 + pristine_git_object: 8552be6cc5568b8badbcb7fc9799e83d376a9cd4 docs/models/outputmodalityenum.md: id: cd0418e6bf91 - last_write_checksum: sha1:2483ce61d4952ddb430ef27c62f89d6d974ac57f - pristine_git_object: 8e3d38281833e806188cba5e5105197daa50cbc4 + last_write_checksum: sha1:24278972b2bc023e114accf89472a40f157c37f9 + pristine_git_object: 68d8d90c801e4408a2d09a52486623813803da09 docs/models/outputreasoningitem.md: id: 637d725308be - last_write_checksum: sha1:1f5345a5c463f91f5c82694c2271965b7d7d72b2 - pristine_git_object: 0e2177599ad723fbdc03b0ed8d392702e8cc8ada - docs/models/outputreasoningitemformat.md: - id: bf973298665b - last_write_checksum: sha1:b710819c6c34e5aa09ec2ff0f310e78249ab59b4 - pristine_git_object: ad8bbc58c4718711f611e9e40d28c142c700d46e + last_write_checksum: sha1:6848a86a8c286a59cc0f48ee011320d8486ccec3 + pristine_git_object: f20697cea84e89e1d42c8c9530a8350dfd9e3715 docs/models/outputreasoningitemstatuscompleted.md: id: 7b93f7378f4b last_write_checksum: sha1:bc133811705c7e690ec418214fbd37ac1a791ae1 @@ -2275,20 +2140,16 @@ trackedFiles: pristine_git_object: 513224aed83087ae965e7d350f46e32556ba0719 docs/models/outputservertoolitem.md: id: bac48d21696f - last_write_checksum: sha1:79b8d3c3387edb5ee597d24778df21e797c27aac - pristine_git_object: c5982f7ae6c6cfd0a085bf6f209b6dfca379b3c0 - docs/models/outputservertoolitemstatus.md: - id: b322e4087fb9 - last_write_checksum: sha1:2d2dac26e3bacbf6f2db3a8a0cff0579c71368a2 - pristine_git_object: 2332206826b5eff8e7433b983b95448dd9dfa1b2 + last_write_checksum: sha1:0f1dbd1cab21ec2f9412434c24109823fb724a5e + pristine_git_object: 2aa3e6eead105af7becd6fac79d5938b42bbd78f docs/models/outputtokensdetails.md: id: 4ea91230cf2d - last_write_checksum: sha1:2523e32649cad606e8e0b52151d862cf08456b29 - pristine_git_object: 294456ad9a1bc15fb0a9cd6c5b7839c17d0b70cf + last_write_checksum: sha1:e58beb39439aa240e55858909534036b23640af3 + pristine_git_object: 7d5103ff709124192f32f744c74bb1a3ba5b2f7f docs/models/outputwebsearchcallitem.md: id: c714eb79154c - last_write_checksum: sha1:5bf0bf3fbeb7ecd7fe29d68a01bf7d3e550ab834 - pristine_git_object: 87371e17e25ea5ffc7e83bbc7a4425f21ce2ddf5 + last_write_checksum: sha1:dc46d7024402486a1a285c72afa2ee108920319c + pristine_git_object: badde6db9873a8b03e8e49cb13c84efd881802ec docs/models/parameter.md: id: 287afbf6f281 last_write_checksum: sha1:278b115df3ec93032ae628e759c82fffa3addcb6 @@ -2307,8 +2168,8 @@ trackedFiles: pristine_git_object: 25760477441c4b246c48d1ac7fdbbe0cad64eb16 docs/models/pdfparserengine.md: id: c7ee8484b003 - last_write_checksum: sha1:391ee26c6000bc63d9d52c204a3f9afb884198b4 - pristine_git_object: 99aa61a7793cc6bafaeface2a62d22c97ccfdd10 + last_write_checksum: sha1:442a150fa1f258d87374f3f9ab72dfc35569fac2 + pristine_git_object: dad11a13c7fe4374e794671c992ac1943f21d271 docs/models/pdfparserengineenum.md: id: 57198a073d13 last_write_checksum: sha1:06928135e8f58fc34e19b6db50e940ffa4713ee7 @@ -2319,8 +2180,8 @@ trackedFiles: pristine_git_object: c94c57751d6721c32a2c532976dca65dafca3a54 docs/models/pdfparseroptions.md: id: e1affaa37c33 - last_write_checksum: sha1:f2d4246e89540ca8e2595b29f9212a7fb536700f - pristine_git_object: 6868a31d3f6117d0cced28214add244774ceb19f + last_write_checksum: sha1:b02a110bfdec9b4beb374f002d3704aaf56f3db8 + pristine_git_object: b51efdb5619158c73b1e3f599eeea1ad0025ba8e docs/models/percentilelatencycutoffs.md: id: d12acbf645e5 last_write_checksum: sha1:90ff738ed045521e36725c2f8f0312752e766530 @@ -2347,28 +2208,12 @@ trackedFiles: pristine_git_object: 90581244ce1ba0be538b910ae3a6d4380685c90a docs/models/preview20250311websearchservertool.md: id: c8a03f19c663 - last_write_checksum: sha1:f38922b523509bed331fcc8e130c0d877c89956a - pristine_git_object: 653aa40471dfb7bd70e920f6819a28cde70854f1 - docs/models/preview20250311websearchservertoolengine.md: - id: 893b4af66eb8 - last_write_checksum: sha1:6bf77673a979be06cef74b5293cc65ac48249ccc - pristine_git_object: e5b4d388569d66f75b4a103f0d5ad0a7d6e577a2 - docs/models/preview20250311websearchservertoolfilters.md: - id: a162adac76bc - last_write_checksum: sha1:1b56f39dc2ed925220387c6b3ed3e566193aa5f1 - pristine_git_object: bc8ddde1a1d82df1222bfe7ba78bd57191a2e3b8 + last_write_checksum: sha1:22581f9a3e72d430f98f98b25faafa3da8012de1 + pristine_git_object: 27a6e1c08aa861e82d8aa5f82b98a5fd5d0db85f docs/models/previewwebsearchservertool.md: id: 6aa1fade253f - last_write_checksum: sha1:4d3ad99d478d09616ed0ef4a39a69b5086023113 - pristine_git_object: 97014376570f49822486fdbb0e784b2067346400 - docs/models/previewwebsearchservertoolengine.md: - id: 8719c84a2bdb - last_write_checksum: sha1:b5236509945c148e84bafaf8ba04124cc90f4c2d - pristine_git_object: 14dada80d46251948ea4a25d32ba5105a49722f8 - docs/models/previewwebsearchservertoolfilters.md: - id: cd0a1ca2f48b - last_write_checksum: sha1:e4b44695d9437e97a308bede7db5a976cd200990 - pristine_git_object: 7e7ce150e16402e84475d8cd226b04ab13cddc43 + last_write_checksum: sha1:cb15757dd219d1b1774d7cda9247355a618b3c90 + pristine_git_object: 1da6d72fbf1af52c57c26c42e075467e757a153d docs/models/previewwebsearchuserlocation.md: id: 98fb947f496d last_write_checksum: sha1:9165bb9710048abe44a1ea51a28ecf7b9b56898f @@ -2395,56 +2240,16 @@ trackedFiles: pristine_git_object: da229099b7c8cdff965c40da5b86e910c47a29d2 docs/models/providerpreferences.md: id: f9bf4d106c4e - last_write_checksum: sha1:260d41833535a617691fdcada2469b8a7a557fe7 - pristine_git_object: 306c9db4c74770bac0d3ccb22c1ca343c1826829 - docs/models/providerpreferencesby.md: - id: c158490e5169 - last_write_checksum: sha1:4db69ffba2c98c3cae80b6b9c15ed98897c9ecb4 - pristine_git_object: 8fa6b2fcff47af73dfff385a4292a1a9d1b0875d - docs/models/providerpreferencesignore.md: - id: a4edb667e4e3 - last_write_checksum: sha1:168239130d7819aaa9dc83613dc8a75564927122 - pristine_git_object: d14a7d5eb6a333dd85db753faaab312d316efd92 - docs/models/providerpreferencesmaxprice.md: - id: 230affd50590 - last_write_checksum: sha1:ffc88759aaf01953a1006c039613acfbd44ff7f6 - pristine_git_object: 329af3fbaf0d32435020b1aa23ea4af34ed34bf9 - docs/models/providerpreferencesonly.md: - id: 76e7e4fc8162 - last_write_checksum: sha1:2b9fc5eaeb0671330c629459eec885989f42b714 - pristine_git_object: 9240a5eee9e85439abaa47400a5af8404bb44d5c - docs/models/providerpreferencesorder.md: - id: 40023712411b - last_write_checksum: sha1:3611c918be2df163f89b12df60d86bac28f7c8db - pristine_git_object: 0937f38f8fac992647d866acab87aece85f02472 - docs/models/providerpreferencespartition.md: - id: 8e25d1553b96 - last_write_checksum: sha1:8c379174b71869bdb697895f9e328bf2de3dc36a - pristine_git_object: 3c1d3ffe3ff5a38f2d34c0d15f69bebd263a242d - docs/models/providerpreferencesprovidersort.md: - id: 07b60010ff38 - last_write_checksum: sha1:ade0999f5bdc7c06f07bb52ff202615b0a97da89 - pristine_git_object: e9b44bf11bf555894e988f3f7cd20fde5988484b - docs/models/providerpreferencesprovidersortconfig.md: - id: 166996ff16db - last_write_checksum: sha1:080ad6b029f43acda782720deebc77e2a1a71322 - pristine_git_object: 5fe0b816124b2af1cf20e73210c65aaa4dd36f0b - docs/models/providerpreferencesprovidersortconfigenum.md: - id: 94d3da0f14bb - last_write_checksum: sha1:f791319a3b2291f99055511df665fb852fb6926a - pristine_git_object: 488f781432cdbfea0c83acef02f4dc7b0ca38c36 - docs/models/providerpreferencesprovidersortconfigunion.md: - id: 136affb233c5 - last_write_checksum: sha1:4722e94c3ccfd87a2e479523046d9ddfa1af9954 - pristine_git_object: ae0d8d189e7d2a6f33ca30ad7779e252bf614563 - docs/models/providerpreferencessortenum.md: - id: b6f1768bdd66 - last_write_checksum: sha1:e1fdaac025717317215673631ad63d9c93cab684 - pristine_git_object: ed6e30ea8bfda60eac977975050d610ab0e029bd - docs/models/providerpreferencessortunion.md: - id: 92cd060f2cd4 - last_write_checksum: sha1:ec91b09ec4d78fc63c0bb0149026515107533ea8 - pristine_git_object: c71c5597dba6a76f72d42143726d2d3f51f71eae + last_write_checksum: sha1:80fce60c8989b4901c5fc749c8aa41d84c95b77d + pristine_git_object: f42d7dbb4d323189d61122c75c92ad896543fdef + docs/models/providerresponse.md: + id: 489064dddb13 + last_write_checksum: sha1:dc1c73f5b3478a9914556f001fce3aed30812030 + pristine_git_object: 5eb7f693fa42e528623d1577793266671d216803 + docs/models/providerresponseprovidername.md: + id: d59f0f17ca15 + last_write_checksum: sha1:bc63217e1cc0ae9de3475f0369da078aeeb05308 + pristine_git_object: 2d654e404f07cf4b6618ae2129892486a0b7ca24 docs/models/providersort.md: id: dedd9969d635 last_write_checksum: sha1:fdcd79fbebb3c669d794ca73835c447f398a538e @@ -2455,8 +2260,8 @@ trackedFiles: pristine_git_object: 4b6763492150066e02a4c24ae39d996dcd2679f0 docs/models/publicendpoint.md: id: 981d88d3c6db - last_write_checksum: sha1:fe984708689687dc2cc975bb6e1182e47c58932c - pristine_git_object: d334bf1904973a0ceaec9269fc1eabf7e75f5f04 + last_write_checksum: sha1:6f25d6afc9a45ea774e9b9c60609ad19a23969a1 + pristine_git_object: 5e05689b73590056bbf52b23efc28f82724ffc6b docs/models/publicendpointquantization.md: id: b5a1de0acc9d last_write_checksum: sha1:a4c036afaee8c2fc88afeddafd51e1bb545cbea9 @@ -2487,60 +2292,48 @@ trackedFiles: pristine_git_object: d3599ed4f44c99ac22f4a1648423faccc74d77c6 docs/models/reasoning.md: id: fb409fba3ea1 - last_write_checksum: sha1:0779de67c944ca3adace35f2381b0f18a6292d2e - pristine_git_object: f595b98f563af1ba5d58448796169d82da4bb0fe + last_write_checksum: sha1:e3e39d7baeaebb576646fbbe9714de0c74f28fd3 + pristine_git_object: f3909245532e15fad6b2dc45fbb2e1c7134d31d4 docs/models/reasoningconfig.md: id: 21ecd2b7375c - last_write_checksum: sha1:8dc29b7db158f8f33aa7cbcc18fcbbb669b58ada - pristine_git_object: 3b95f7799e773472b45ee7e7dfaa495bb3f0c282 + last_write_checksum: sha1:fc37e804882088f0d766bbb11612347e7d98afda + pristine_git_object: c5d54594cd75e6692f7e96fc7865eec5ef1bbd7e docs/models/reasoningdeltaevent.md: id: 572f2ee74ad4 - last_write_checksum: sha1:7ccfdf411262a47ec0461786a9def046a7b02c29 - pristine_git_object: c5c2ac8ee57796ade0d1762ce2d56d84bbcd1818 + last_write_checksum: sha1:771d18472386c179338e5c4ae1daaa389d7d7e15 + pristine_git_object: 3985b12eae043c365d3201b16ca220e2021896fe docs/models/reasoningdetailencrypted.md: id: 4b89489f8b93 - last_write_checksum: sha1:fb3157cf93459a9e52af9cd513fb251a5dcb183f - pristine_git_object: 42f226cbf68cad5341fa1999df7b61163239683e - docs/models/reasoningdetailencryptedformat.md: - id: 427fe9e4605c - last_write_checksum: sha1:a90e72a22c3c56e56ec43abef15493dc2d06bd93 - pristine_git_object: 6a53e623989fdbb74bb0c6297213e1be0d62cf85 + last_write_checksum: sha1:b515e7ea897802b8e542e3ddff1b2b8211bbd172 + pristine_git_object: 517ea72285c71d10e50917693379ca4cb9a2b4aa docs/models/reasoningdetailsummary.md: id: 1aedc148a57f - last_write_checksum: sha1:336004273d0151d3885e6f80fab67e448b42a57b - pristine_git_object: 85c377e28e9d925f950fc861f05d3e3d3b47fe4c - docs/models/reasoningdetailsummaryformat.md: - id: df380badde4a - last_write_checksum: sha1:e76f89fb6a0e98ce31874ea4defb944678958672 - pristine_git_object: 62cf8a26594a916978ca364b26750c50da99fd13 + last_write_checksum: sha1:796bacea82cb7399834dccfaa2a671dc4736cf3a + pristine_git_object: 083bcc39d44b4fa19c18450a05b9cdeddd70bf9f docs/models/reasoningdetailtext.md: id: 736fc4cb08d8 - last_write_checksum: sha1:521d0a0c0bdbbb2044fa42a0e2cbb5b603238755 - pristine_git_object: 0a428c24ffa94e2f97e7ed62fdc37198ca154adb - docs/models/reasoningdetailtextformat.md: - id: bfc492580515 - last_write_checksum: sha1:6c0df1d7eaf432cd4de8d6b9698596f7a74c02d6 - pristine_git_object: b1a3b6869fe53997d8c931271b68751d86debdb1 + last_write_checksum: sha1:fdc674183890bffd689aae0f03190e71d1782a88 + pristine_git_object: 4396b4e1e063de54853d14b97d25aa299b1d8a68 docs/models/reasoningdetailunion.md: id: 7425c6e6d4ac last_write_checksum: sha1:1dfcc9fa59cd35fc1c2c2876c255d0b78b9f9518 pristine_git_object: 88328d825878c6109695e18e62819c722bd48036 docs/models/reasoningdoneevent.md: id: eb8f7bcce8d5 - last_write_checksum: sha1:e12eee1b165d87a486f9c12aa158627bc5c3d558 - pristine_git_object: 6b2a7606232cdf2faf259913f3a5f418dcec0e52 - docs/models/reasoningeffortenum.md: - id: 75abca7f5e9b - last_write_checksum: sha1:a00e02fde2f4ccfc2142204165ba2b0d345a805a - pristine_git_object: 14fcfd7ed7e1bf4ed02684a4f0e00dd82d334534 + last_write_checksum: sha1:7d667fd6ccf9c805d97f4b84f25c7ea0aa4a3468 + pristine_git_object: 666c93d53749a209fbec8f0a51435e177dd19790 + docs/models/reasoningeffort.md: + id: c8fd630d3f07 + last_write_checksum: sha1:ba41715e2053fc6734d4533c311060afa615250a + pristine_git_object: b714ed98184769738fccb5623c933c3b19b0c6ba + docs/models/reasoningformat.md: + id: 5e0f5873cfc7 + last_write_checksum: sha1:194ac047f4416700e8103f8d2c4f88b6533392d0 + pristine_git_object: a50737cfc4d272805d4f7d347eb1556a841694ac docs/models/reasoningitem.md: id: 9b64e42a341c - last_write_checksum: sha1:f30e07c04d7144e0f7d9f4e7504c717900ebe438 - pristine_git_object: 09022484149ac59bc64e24c56bb168474ad320db - docs/models/reasoningitemformat.md: - id: d99c0bd3e54d - last_write_checksum: sha1:98c8d46e389546dc38dea7259196805dfb64ea4b - pristine_git_object: ab63c22118d327711a5b3e91e399e877fee62baa + last_write_checksum: sha1:db82592ca1c383d7a327f70b24d71c510a536d63 + pristine_git_object: 5d67ace29c481940b48b4962828828615b658ac4 docs/models/reasoningitemstatuscompleted.md: id: "220760810899" last_write_checksum: sha1:0c707b469f310418efbaf989a9e8e3a850346271 @@ -2563,32 +2356,32 @@ trackedFiles: pristine_git_object: 2e29f8aa08d820bf15a425bf0de2c024b0e60bb7 docs/models/reasoningsummarypartaddedevent.md: id: 7052969259d1 - last_write_checksum: sha1:e87692bb444e730b0077e7feee57369f8abd5538 - pristine_git_object: 8a6ab6337d6a55946773509fdc4f7c145ab74a03 + last_write_checksum: sha1:60bc7c90e61db29f09e8a41d82b8e62b4944e6bc + pristine_git_object: 3427f90137f93403db6b5c29299b28ce5d1483c6 docs/models/reasoningsummarypartdoneevent.md: id: 03d3da99ff88 - last_write_checksum: sha1:6a624e34631574a7e4b460b32a4004117532a48c - pristine_git_object: 878651d7f9e9a938e07f3098b711defb41466982 + last_write_checksum: sha1:0eb9cc9be6d9f4e59ea74f98380d50f075644003 + pristine_git_object: 2359c802904cf790d706dd513f28fa772fcfbb17 docs/models/reasoningsummarytext.md: id: 18b35794819f last_write_checksum: sha1:002f812610352dbdbd727d53b3a8bca2426b1511 pristine_git_object: 6ee39e828fcfb794ffd3ca8624fc697301991bb9 docs/models/reasoningsummarytextdeltaevent.md: id: 748d0f5c8be4 - last_write_checksum: sha1:21e79d1453cb1ce36ec55ceebe1afad50f47c45a - pristine_git_object: 9bb36a4057493ad1b243ae03c941a993ab812ca6 + last_write_checksum: sha1:e66ef41c1f4dfb571c029731558f4a60e5b9172c + pristine_git_object: 055662e45ee399f2ffa4a9780670162618cdd16b docs/models/reasoningsummarytextdoneevent.md: id: 34716eebd13b - last_write_checksum: sha1:2d64e99c02095a37464bb415f7b9c3f3b9372028 - pristine_git_object: ddaf405d50cc881cf83fbf17cffa65c361273e7d + last_write_checksum: sha1:76aebf00d7a16039f03110fa5815cdf484c4a7d1 + pristine_git_object: 7bfb8e3b78356bc0157670a6f56aea08f4101250 docs/models/reasoningsummarytexttype.md: id: a7483dfe07f5 last_write_checksum: sha1:63143ab05932a80c5318665fec4bbd72e30ce866 pristine_git_object: 63ce1eb4b9607dfb736d4027049f1338205e0351 - docs/models/reasoningsummaryverbosityenum.md: - id: ac9ad84db923 - last_write_checksum: sha1:bbe3d643ff8e0e5cf10b6efe75c2bf453c983e29 - pristine_git_object: 8139386d0583f3c6328e86bac32be5336e3412bb + docs/models/reasoningsummaryverbosity.md: + id: d925ace91d73 + last_write_checksum: sha1:d804d28e46e42537d5afbc29f6bbcd2c67fb844f + pristine_git_object: 20c0d4aef8f3ff64364826088cd8baed1fa5c0b8 docs/models/reasoningtextcontent.md: id: 720b21c43aad last_write_checksum: sha1:a5fb7d585418f1ae608305508e64d71ac8cbecee @@ -2599,12 +2392,12 @@ trackedFiles: pristine_git_object: 587fce7a1be9ebbfee6b40fe93f47e4e7991e172 docs/models/refusaldeltaevent.md: id: 0abec2d1df62 - last_write_checksum: sha1:5b66f9806ea33f5d5c7b5ff25fc9fe2a5ff154c9 - pristine_git_object: 8a674f4bb33d195ca8a8b99896c25fb95ac068d6 + last_write_checksum: sha1:cc2f4931b03ec328a9904e19b4d936ec0f20b5b7 + pristine_git_object: def47a7a7b0e427de74e7f2cdf961e11c21bd90d docs/models/refusaldoneevent.md: id: 6afbde18e9f2 - last_write_checksum: sha1:03f91c282666c7b395a278c27bb53d4ed6831eb3 - pristine_git_object: abe4a0c53992cfbf18a8fcb96f70ecc77f844995 + last_write_checksum: sha1:a7ff0bfd22fe9404be0fd24311bcc90150fb6311 + pristine_git_object: e6d6611fcdc0b277c8fd43ddd70e58d7522d3b23 docs/models/requesttimeoutresponseerrordata.md: id: d8c3c018c9da last_write_checksum: sha1:db536113967f3acb8e19fed70eee3dc3dedfaa19 @@ -2621,94 +2414,50 @@ trackedFiles: id: 77f9fa189fee last_write_checksum: sha1:9cc2b084de7b3d0ff91d18d051083eff8adf31f9 pristine_git_object: c67e97d077270ee4cdf641bd24a871c53b99e3e8 + docs/models/requireapprovalunion.md: + id: 551dc6a7a607 + last_write_checksum: sha1:febe4ba6a323741431a0d66490487ff7f0416585 + pristine_git_object: 3a877dc9fa39dd5bff9ccb16ef255e6af80a49f0 docs/models/responseformat.md: id: 50a1e4140614 last_write_checksum: sha1:24a9b20da24512740fa4519d08c132e7d836d739 pristine_git_object: 229fe6f8d86ca655bdc0e84f7f6e162cf916fd5c + docs/models/responsehealingplugin.md: + id: bac517f9331b + last_write_checksum: sha1:17b5090a5f71b1cca2f64b519535133536d4761d + pristine_git_object: 6584786d770d40d95f7bce5705c7c997be63b15d docs/models/responseincludesenum.md: id: 40a516114048 - last_write_checksum: sha1:5658184501c960050bff953f9454bee37b649bfa - pristine_git_object: 814f2c3b8c409e09d941945a529cad20208de84c + last_write_checksum: sha1:1fb4c14f13470056b3ef992f363556c50fd1a67a + pristine_git_object: 2a00ce799916a73a6f7b4b54d16a2409cc1cc3da docs/models/responseoutputtext.md: id: 95e91ca81990 - last_write_checksum: sha1:50491236b5e708d7b7784b7945fda71901bf2269 - pristine_git_object: 76338eb342729aae5bd236f26d087354499371da - docs/models/responseoutputtextlogprob.md: - id: c8fe84770887 - last_write_checksum: sha1:33d456f609ec0289cff49992181390dc2162aa76 - pristine_git_object: b8f8dbd40a99c8dd179a8746a73f41359df2e499 + last_write_checksum: sha1:49241881ccb25962d988cd4c8557bd04b433cf76 + pristine_git_object: c0d9c093f7ad217e8cf3cc469e940107412bb3e8 docs/models/responseoutputtexttoplogprob.md: id: 4cae20e12fcf - last_write_checksum: sha1:561e05b3d842295788e963a3cd0d5609657a7778 - pristine_git_object: 9e5fada59213aea3dacee5009176b80cfb637d03 + last_write_checksum: sha1:5a1c9f8a5d3bd20117ff6f68c3739732b36637bf + pristine_git_object: 353ea6cf92ee4c209182f89d2e3bf16d1a47b370 docs/models/responseserrorfield.md: id: 03dd50404dff last_write_checksum: sha1:84b4728077d3f577b2ef7f0c41d0f96cecb3bf10 pristine_git_object: b29a01e17ddc4a8537b7fce887b467ed248709ca docs/models/responsesrequest.md: id: 8c2dd311f9ae - last_write_checksum: sha1:7aad6e2ba6accf08404632703d8b8b883f448555 - pristine_git_object: 6ec515f2ef6c222e1be0aca391a15c2f827223d6 - docs/models/responsesrequestignore.md: - id: c4f071afde0b - last_write_checksum: sha1:1d8443ce44e3c7f5a15fbbcedb391e780e158cbd - pristine_git_object: f9cc42bde19d262e224bf4e6ae197896494723c8 + last_write_checksum: sha1:c3c001cb42bceec5d1b58c26a4f4e98905f74b1a + pristine_git_object: 97195e6b09df67b6b2d1b4a9af08a1161d7fa3c3 docs/models/responsesrequestimageconfig.md: id: 8f45935983c4 last_write_checksum: sha1:15e6cf836cf0cf46d94eac7bc0f7b89404021d6a pristine_git_object: 9091908dd31fc14aa3a2c9fa589be3062de41ada - docs/models/responsesrequestmaxprice.md: - id: 98f199c91fee - last_write_checksum: sha1:314f8ae0a29ae8893496cf795249ea3badbd8ca9 - pristine_git_object: f388065b14ae9d902171a8cb3b49e025ca6494c0 - docs/models/responsesrequestonly.md: - id: "294886662168" - last_write_checksum: sha1:42ef7f9a2d06cbe43fdffece7d7be80e0360fdee - pristine_git_object: cb8a63954fd881e0bd9d7d8caaf8b0ca60c218e3 - docs/models/responsesrequestorder.md: - id: 23cdc1d05fda - last_write_checksum: sha1:9cabbbb09d8e9fad4b9982d68d5e01e5959af82a - pristine_git_object: c9292ff23a502c82d92a0084883431820678579f - docs/models/responsesrequestpluginautorouter.md: - id: 201bec68ebcf - last_write_checksum: sha1:880379cfe1180401f149a026ca9a673910e6702a - pristine_git_object: 1a5702c2f74af6d39f3f9e39e5ede14801bd2bbb - docs/models/responsesrequestplugincontextcompression.md: - id: 7d9bdded251e - last_write_checksum: sha1:ace8e9bb310f425bc6c263155847259ea2e7fa3c - pristine_git_object: d278926ea8c3acfac70571a8d1f492c1916aee30 - docs/models/responsesrequestpluginfileparser.md: - id: bc0d5e7866fe - last_write_checksum: sha1:fc3a08f3b8394d6d1a0de65bc388557b7c43a8ce - pristine_git_object: 209065d0de74e5c666d3b9b07c77d6a61b4f8d43 - docs/models/responsesrequestpluginmoderation.md: - id: 0f7e9f0c217e - last_write_checksum: sha1:80ea7f74940c16aa77719fd57b808039b85dfb13 - pristine_git_object: 11e28cd49fa01bef2681bfb471d2cd97cfaa01bd - docs/models/responsesrequestpluginresponsehealing.md: - id: b4f19ad0d160 - last_write_checksum: sha1:22c5d9e5a1d7828561a0a83a4395c45f1c07cb13 - pristine_git_object: ace526814f86afc1cf60cf814a251fd394a72546 - docs/models/responsesrequestpluginunion.md: - id: 6cb4cfe01348 - last_write_checksum: sha1:d294c8375d856c7c5645465600b90a903a866a43 - pristine_git_object: 71eddc9314d95d5b5810b8c6b04dbaf9b6d7b221 - docs/models/responsesrequestpluginweb.md: - id: 72acbc887188 - last_write_checksum: sha1:41296b2204734038c53ea2b55cb817eb236294c1 - pristine_git_object: 63ce40d59bc41b1c9a25e6b5650d7e8962b69537 - docs/models/responsesrequestprovider.md: - id: 5d604be8a30b - last_write_checksum: sha1:d464dc87d59f8fdf934c873ac9d3b68e23a78f92 - pristine_git_object: 209abb7df9ea741d9311859bcbeab2626b3e04df + docs/models/responsesrequestplugin.md: + id: a4b8f9908846 + last_write_checksum: sha1:272b0f2a0db7ef2472b73114234b1669110b202d + pristine_git_object: 7b6867f3d18f048c7633bb44b014817b170ce0ec docs/models/responsesrequestservicetier.md: id: 1bf12cca7f6e last_write_checksum: sha1:84e5d6e8fd95e96ed39d226a25d2b8e78ae81d41 pristine_git_object: 7fb0292f6e887f1bc5695f0034be275f8f406a6e - docs/models/responsesrequestsort.md: - id: 58bd32eeaa12 - last_write_checksum: sha1:d2e7907d583d15cd538c24416639400309bd90c2 - pristine_git_object: 264217e109e7bb5ccf81a0c8d5a5f100605688c8 docs/models/responsesrequesttoolfunction.md: id: f8b922a40569 last_write_checksum: sha1:fe1c3aac7b1638ae4c1e928eb8d396b134e44348 @@ -2717,14 +2466,14 @@ trackedFiles: id: 0cab4203954b last_write_checksum: sha1:66b53802b3bf446c52d14778924813ad27f593eb pristine_git_object: 335cbd26f4a12ff7c88cb8e8b3dd8337ec7c9f09 - docs/models/responsesrequesttrace.md: - id: ace3d4b73652 - last_write_checksum: sha1:6933c4c733cb6f45cb07dde56a02d8fea17fd476 - pristine_git_object: 099922b73a48bff6768fe90481b8ca7a168996ee docs/models/searchcontextsizeenum.md: id: 4de34693233a last_write_checksum: sha1:efc7659126209876e2b83b5fd67b1dc379796ad0 pristine_git_object: cae2b42b5d37cec04614acacf0805b08217dec45 + docs/models/searchqualitylevel.md: + id: 2940faca7194 + last_write_checksum: sha1:0957dafcbade0cad136e8fce0f43ca7482329995 + pristine_git_object: 0062e6bd899d73d982537e656e191888eedbb2d3 docs/models/security.md: id: 452e4d4eb67a last_write_checksum: sha1:1978f84a4c782f5ed85eb03074a6fa5e19f103c7 @@ -2741,50 +2490,50 @@ trackedFiles: id: fa13061e86ae last_write_checksum: sha1:18590e6cfd13d671a075480e68beecab874b614c pristine_git_object: b226d39ff9119db35c815d05c34b41923d840954 - docs/models/source.md: - id: 6541ef7b41e7 - last_write_checksum: sha1:a42cc7c70cebcf51fcff0924a663565de5bfeca1 - pristine_git_object: 9b64b472f50739a8f356df88f52730fbd23d42e7 + docs/models/sort.md: + id: eab5be40af59 + last_write_checksum: sha1:21724ae2bcd6f9cbdf5bcd83973edec12a4f6729 + pristine_git_object: b128eb45dc4400f466a592da89c0a2654321b5a7 docs/models/stop.md: id: f231cc9f5041 last_write_checksum: sha1:5e7c2e81c789b9117be2062afe12bc8dda431846 pristine_git_object: bbb864dc85fd4feade6c614757fb2951386304b3 docs/models/storedprompttemplate.md: id: 53344431423f - last_write_checksum: sha1:baab6ff9fcf9ce7faa9abdb672539d430102430c - pristine_git_object: 7671d76e7d3fd1ab53f08c9239d87117aade94b1 + last_write_checksum: sha1:91e6a59617d31a34605a530690e08cf0b037d8f9 + pristine_git_object: d7eba318f407adfae4996ceb42e350957bf767de docs/models/streamevents.md: id: 7b9e7f83a124 - last_write_checksum: sha1:d23aead4762247ffde5ff96f9b68fd0e7753b8ff - pristine_git_object: 4852acf6e8d9839096a3c81fc98a56ba9d1425f2 + last_write_checksum: sha1:a09480b6a46e098fd041b70825594b4a77537df8 + pristine_git_object: 891c4952d2e52b4a104250184f6e3f50767bd62e docs/models/streameventsresponsecompleted.md: id: 162356c5e731 - last_write_checksum: sha1:9a6b01ee52ad161d34f98ca0beffab60d521b1b6 - pristine_git_object: 48ab621e694b64b7ef6ee8e6c77270378f66aaff - docs/models/streameventsresponsecreated.md: - id: c7d88a6e1e7e - last_write_checksum: sha1:98bf239fad1ed6746cf0a4a8382f573ff9936235 - pristine_git_object: 0360921330e6b67643f50f9065d0fc57882be6ae + last_write_checksum: sha1:3caeacbf877c6d63d52fba03f769dd466e20119a + pristine_git_object: 8c536d841a5a173d8eab33f2785126fd20af24d3 docs/models/streameventsresponsefailed.md: id: 9b4d88a50d47 - last_write_checksum: sha1:ff0b646e762dff21f71e297281f788239fbdc134 - pristine_git_object: 370f44ec35b60ab1c1a606f614d0caeb31d04eae + last_write_checksum: sha1:7067df68ee0c984df328a7b0dd5f34e2669324c7 + pristine_git_object: 38a7c21ad7985e0caa8d0eb5504758ac942682b5 docs/models/streameventsresponseincomplete.md: id: 095f1aaabbb9 - last_write_checksum: sha1:acb657418d960ac95174e0067d7e48043b88b050 - pristine_git_object: 02c3ea1a80d94db2ec951ba1846158b91c7eeb83 - docs/models/streameventsresponseinprogress.md: - id: efae882cc940 - last_write_checksum: sha1:57c64b48566d37f8e57a304add33218018440bae - pristine_git_object: fd9866632ce405f3c22dee7cea2d2653a099ca51 + last_write_checksum: sha1:23feca448bd07992b05c6bcb066e2566cec8c6fc + pristine_git_object: e440ff671f5b17f947e632e3686fcfd02ff6ff2a docs/models/streameventsresponseoutputitemadded.md: id: 322d7352fb7b - last_write_checksum: sha1:228b91b3c0d9f2b8d1c78d0b87ca91d9de35001d - pristine_git_object: 1a35e6a3376f84f932622d76d02386792911eaa7 + last_write_checksum: sha1:70fe18e73fe939bdda60021c103cc6d79ff452c5 + pristine_git_object: d38096d29f55b487e7e136ea264502969d9c8f1e docs/models/streameventsresponseoutputitemdone.md: id: 2e34f520d07d - last_write_checksum: sha1:0b05b5f2d34a3aca47ee4e5deabc9949f0111617 - pristine_git_object: ad3f6ab4e687cf302bb7568b5dbc78cc5c06b8e5 + last_write_checksum: sha1:f3ce0450cc94c2a867962e2c960828b9ed350697 + pristine_git_object: ba27e77ad57a6794485cb5df1b9c1182c19afef0 + docs/models/streamlogprob.md: + id: 98efa527982e + last_write_checksum: sha1:572c7f4bc0630eae71657c638b317119f248d379 + pristine_git_object: 5324ef2442872c14af35a2adcff2b9aa6cca5f2b + docs/models/streamlogprobtoplogprob.md: + id: 33795bcad34b + last_write_checksum: sha1:1457a8228674e70903b2c28d06aebad9a579e4e7 + pristine_git_object: e2cbdbae73ade2eafdd8c6bbd3b204e82eb5ed70 docs/models/syntax.md: id: b5f23261fcd5 last_write_checksum: sha1:5ddcfb4d7a3b0cc1a8830cd48da5bf1f6e98c399 @@ -2799,28 +2548,12 @@ trackedFiles: pristine_git_object: 329d2368122c268da2ee979efb970bf0b2358727 docs/models/textdeltaevent.md: id: 65173e5d6bac - last_write_checksum: sha1:23eebb9a1f1a8b310f104f5764de004389161f0c - pristine_git_object: fb6a786a8c7c9b0392fbce6ab58c078f3700f0d9 - docs/models/textdeltaeventlogprob.md: - id: 1ad4e5b84cab - last_write_checksum: sha1:762445950c90f4eb25cbe1efec2ef576c2635bb2 - pristine_git_object: 797f8dabe96d2d3d4406b62caea571f242df9df4 - docs/models/textdeltaeventtoplogprob.md: - id: 1e9bea435307 - last_write_checksum: sha1:cf9b8a6a51c85e8a0277ec91ff2ed78d1b862a3e - pristine_git_object: a144419ebd9c8f1bacf39cad90e5919eddd22a9a + last_write_checksum: sha1:6ea5ab0b8311927277ad24e2c4e162bdb2a990ca + pristine_git_object: bc88d0069aa5f653d0509be504226c0d0e902b74 docs/models/textdoneevent.md: id: c106b854de8a - last_write_checksum: sha1:84f5fc0c5371be365041e46e829726056c83fc49 - pristine_git_object: e89d7fe794c2c274018f81c0da1b3d8d90711592 - docs/models/textdoneeventlogprob.md: - id: 8c0358bac31a - last_write_checksum: sha1:4ac240ac9ab81f72022a59742352e11cae04b56f - pristine_git_object: 3c9576e9c52fac730a06318c4d6bac134cc723d6 - docs/models/textdoneeventtoplogprob.md: - id: 84f7c14b9668 - last_write_checksum: sha1:d91e7b0430bf4e53c89e6a11bd252d74d83da979 - pristine_git_object: 7edca947716376d54ca3bcca9039379e2b332f2b + last_write_checksum: sha1:6b671f7b7c05dd8334169412119731c66ad8ab18 + pristine_git_object: b8c2c12a1b5172b185e6c46aa25707b301ea0720 docs/models/textextendedconfig.md: id: 84225a911df3 last_write_checksum: sha1:fb75ec057fb264f6b165f24e4a2fdfd982571e41 @@ -2831,12 +2564,20 @@ trackedFiles: pristine_git_object: 3853b4986cf6f15e5d053aad75f1cc86c13ce8b2 docs/models/tokenizer.md: id: 8f0a31dac373 - last_write_checksum: sha1:dfc9d70bc2c2981b40ae2471216a8654c390d31d - pristine_git_object: 38a08a8f06dfb4f9e5d41381e1bb1bd97d6448e0 - docs/models/toolcallstatusenum.md: - id: cf730692ab4f - last_write_checksum: sha1:0082d561dec94b9038ae0684f63a7f6f4814a644 - pristine_git_object: 081120623a6946b2bd980ed232da7f2fb399395e + last_write_checksum: sha1:f25c6fefc85b42fe1bb251de683c720dbefefbad + pristine_git_object: c8cb31d3fa36467c32e6e9afdf9764253d1db2dd + docs/models/toolcallstatus.md: + id: 0eab420fb379 + last_write_checksum: sha1:629d281b98874d122c4afea78805d6795785638b + pristine_git_object: 2eeb28226e7795ceb5e4e547cc89f97bcb959113 + docs/models/toolchoiceallowed.md: + id: 89031dc03b63 + last_write_checksum: sha1:5ea0275daec139b93c6436072347ee9d4a6b7ac6 + pristine_git_object: 86e5307da59935464f9b3a5f84e14cafde076264 + docs/models/toolchoiceallowedtype.md: + id: 6b8cf808ffde + last_write_checksum: sha1:111e239d5707ca99fc56e67226fc46a6399fab47 + pristine_git_object: 344baea88a8f97f72c421ce4c8f5b029081a1a71 docs/models/toomanyrequestsresponseerrordata.md: id: b4929af623aa last_write_checksum: sha1:6135140c8a32957c3007ab7a00bc13970d083cca @@ -2845,18 +2586,18 @@ trackedFiles: id: 6d198b9b973b last_write_checksum: sha1:4df4b348401c3e30d52b27aad85d649bfea28ed2 pristine_git_object: e318660cf6780d3417a5271672f8f9416ec08060 - docs/models/truncationenum.md: - id: 83317dc28c04 - last_write_checksum: sha1:fbebabba0d9d980f3726e2288d8817dc17f942d3 - pristine_git_object: 2c019ced935ddc3a9fcd94c1d9f00e4c64ebd0e3 + docs/models/traceconfig.md: + id: bb233509f282 + last_write_checksum: sha1:4425f6fbd8b1efe0c74d394cf00d930ab2ab5d06 + pristine_git_object: bf1e95e1f0ff2b736b305a27de301012aefd1974 + docs/models/truncation.md: + id: 075cd6c561df + last_write_checksum: sha1:192825e4cedb7b6ad0e3bd62e884444a1a1d6e9c + pristine_git_object: 35488c984cdf487047dc9422efae0dadeeb2d503 docs/models/type.md: id: 98c32f09b2c8 last_write_checksum: sha1:0ab2246ff8dbb5a4b379ef7356b2b6d3fd5d8d6f pristine_git_object: 71afedd4f19f14664c959cd332da798d860e7fef - docs/models/typeurl.md: - id: b2b253610bfa - last_write_checksum: sha1:8a8edef8f989c578d2c1a6d60a3c2345723ef2d5 - pristine_git_object: f3dff1721e733ae4322aaf271700fdece67aad10 docs/models/typewebsearchcall.md: id: 94eb257927f7 last_write_checksum: sha1:d720b3663ff1b3bdf3466c91ff808872889b6dad @@ -2869,10 +2610,18 @@ trackedFiles: id: ece17be345f0 last_write_checksum: sha1:f9fb4891998fb92818f079d00d3081ead7d51421 pristine_git_object: 3f171e2729563d44cc0814b7f6707b88b4a24f49 + docs/models/updateguardrailrequest.md: + id: 720b87f201c8 + last_write_checksum: sha1:2b07ed184dbae95117a31971378ef505db2427ba + pristine_git_object: fbf4bbaf10dd33e698a53e0824e2b81782346d61 + docs/models/updateguardrailresponse.md: + id: e651ac0d6e06 + last_write_checksum: sha1:988618d1e19d69ccc89d4bb30fa6e1751a599624 + pristine_git_object: df1ead696edefd753a5dda29c1bc5721c0958def docs/models/urlcitation.md: id: 6aea1a90dde8 - last_write_checksum: sha1:5c2d51069922bda24df2a5c183056ae3adaf28ef - pristine_git_object: 284cac107e23a55fcf60f87c6ae3a23bd351365b + last_write_checksum: sha1:9a1d7c839f187ea38516cb7d81a397de7774470b + pristine_git_object: 0e62166896d2a9263c8e4bfa2b44767d8299aefe docs/models/usage.md: id: ba79ec873169 last_write_checksum: sha1:dba6fee826d3263cd168bbad34df259deb8ff517 @@ -2891,32 +2640,40 @@ trackedFiles: pristine_git_object: af35d730d67e9cc7545315d87aa7bfac27247e11 docs/models/websearchcallcompletedevent.md: id: e2a1dc96eec9 - last_write_checksum: sha1:d627396314c56e2a7d51a0217473dc927a74514e - pristine_git_object: 16972ad48fd6f7da0a3cdcf0e981bf63a259f4b6 + last_write_checksum: sha1:6153fc918378c7e10c487ded3a359c1468d3bbe3 + pristine_git_object: 56945d05e66ced317dbbf5c4dc7045c318d83f1b docs/models/websearchcallinprogressevent.md: id: 2b72bdd03768 - last_write_checksum: sha1:302459567e87522b673d425a31a4bdb46bdfd4ef - pristine_git_object: b5fe15a11ba9f045afa16db67b04ec2baddc8a51 + last_write_checksum: sha1:f70cd07195d5cfcd897b1be66d68db5e4afc68d5 + pristine_git_object: c0a197949868bf01739022928d006b247c1ea4d3 docs/models/websearchcallsearchingevent.md: id: e80558eb0591 - last_write_checksum: sha1:d32693dcca534f8e5773bc4f93a6ca9dfc9f5599 - pristine_git_object: d92f1a0af094770d5d31d2165f64c230b7a9ce6d + last_write_checksum: sha1:3ec1dfd549b920df38a6960a4b399f80f0f22438 + pristine_git_object: c99e1e8e8ae75fa44ae67f058c03db817d21c2a1 + docs/models/websearchconfig.md: + id: 9db26eaa5afc + last_write_checksum: sha1:a901a5bc0fac0778b4c9b2eb335b26b21e934ba7 + pristine_git_object: 56551a54229b7ebb9bab39801451c4717f8469cf + docs/models/websearchdomainfilter.md: + id: 0139e0f81963 + last_write_checksum: sha1:148f58c10dffc402e72aecea9550f2e1fc780e00 + pristine_git_object: f133a06445e56c8bacf3c412b48bb220a93e2e2f docs/models/websearchengine.md: id: 2a21d29e41be - last_write_checksum: sha1:ee5e6ff9fd57151f6dbec8f17543aeee75107597 - pristine_git_object: cc70585e4501b4082656461d94305ad65a867376 + last_write_checksum: sha1:d99c15bd9691fd057218e260d6b88f342b90e265 + pristine_git_object: 142e52f7d42af65d3fb2df405bfd9b94e5d54f17 + docs/models/websearchengineenum.md: + id: b841cc1abdd4 + last_write_checksum: sha1:1e800fdfd978eee813fc468fa19ed9f293173d8c + pristine_git_object: 45d3c043d243c18ffde26085ceb33dee4e4223a8 + docs/models/websearchplugin.md: + id: 92ab32076027 + last_write_checksum: sha1:083d70b207b1cb285e52816d3b3795e33d0ca341 + pristine_git_object: df8d4c85c4568a674ddaafbf27dd4a2c1aec69df docs/models/websearchservertool.md: id: 46b94ec8dea6 - last_write_checksum: sha1:e04d95d2fcb7de91c7658da60363b188753a0457 - pristine_git_object: b63fce39db56c2b0b599bda0fcc80b0b3ada9647 - docs/models/websearchservertoolengine.md: - id: 2901cb207f2b - last_write_checksum: sha1:8b9459d977542bfd0c40014bb77e63617b02ac63 - pristine_git_object: 26acc86c0b104b78a795cc881a60963e18743e20 - docs/models/websearchservertoolfilters.md: - id: 5ee49da43853 - last_write_checksum: sha1:cbdb2e28921910fb5a990851106cf72d256f520c - pristine_git_object: 31a41965ebe70022a6b07e22b2e93ccac87e3d72 + last_write_checksum: sha1:fdf2801789819760e2e98cb61b04fea556d9b6b3 + pristine_git_object: 85a8425ba0daa4c349bddfceb64b8109a6396dc5 docs/models/websearchservertoolopenrouter.md: id: 0246a19f960f last_write_checksum: sha1:6e0e6eb38953b7ef2113f5afaa075b155587fb4b @@ -2925,6 +2682,14 @@ trackedFiles: id: 0f148073d88b last_write_checksum: sha1:75ff4b5e7c5e5cefb25c945ed4e75c8ed772e0f8 pristine_git_object: c6b7e6b3bd29b5a19f8a067bdfeda71722e95231 + docs/models/websearchsource.md: + id: a8025a04f2ee + last_write_checksum: sha1:599ada4d8ffaeaee4191f942bbdde890d303304a + pristine_git_object: fe8e5366d64df02a951294495205295fa47fc562 + docs/models/websearchsourcetype.md: + id: 3e68acd287e8 + last_write_checksum: sha1:8cd80ffffb30497b4fea5f38c3525951d9518098 + pristine_git_object: 10a3acffff337404e396e0ef80e2fb128e1c5bbd docs/models/websearchstatus.md: id: 2d69b50ae71b last_write_checksum: sha1:d3e1e883df750a8336351c3ecc8b62f2049b8086 @@ -2933,30 +2698,38 @@ trackedFiles: id: 158041f6dfe7 last_write_checksum: sha1:dcf67aee35de7d833b3933a095fb5a7b532ac91d pristine_git_object: 55b969a08a276f01cdaaf252321ea555adcd3b29 + docs/models/websearchuserlocationservertool.md: + id: 938bad6d3533 + last_write_checksum: sha1:87c92881a508488e2ac7371fa8f7a2a6fdb54b32 + pristine_git_object: 71f2ad03d13aa4268befddebc8d9b75a7f3ac46b + docs/models/websearchuserlocationservertooltype.md: + id: bb6078a05d2a + last_write_checksum: sha1:3a2c923d1d6f1f8f9a1e5b2fd2b2c35040a178dd + pristine_git_object: 2378945bfa68175821a28c7cd087d67aea950456 docs/models/websearchuserlocationtype.md: id: e437c7477fce last_write_checksum: sha1:9913dd9efb5078245c84567023699e183f97eb33 pristine_git_object: 8e81b3fd5c750c14ae6cddfed175945b72089152 docs/sdks/analytics/README.md: id: 4c84abb05030 - last_write_checksum: sha1:4e54a77cc2c4e0231428ff27a9d20541b0f4ed7f - pristine_git_object: d74a22067d9997ec0c76f882f351ec558cd01ff1 + last_write_checksum: sha1:2fa9f1d634d11b67fe2ce775619b5902fa1626e4 + pristine_git_object: ffc847275bdd4a6f88170d4a0a198faa083a28dc docs/sdks/apikeys/README.md: id: e2bd25998427 - last_write_checksum: sha1:93bb601c259c528457774cd5bd9493990a21dfce - pristine_git_object: d5424399394468280b833d9a1082c00a42c9534c + last_write_checksum: sha1:1fc63255356927db00228a87ff111dfb1236d424 + pristine_git_object: 1d2e7c4f07aa5167081e5df5e28e3146b6d70dae docs/sdks/chat/README.md: id: 393193527c2c - last_write_checksum: sha1:0e620173587952ab3d77b9464285431aa41526e0 - pristine_git_object: bebcd5798911bedf845af1fc5bff1c85846f3db7 + last_write_checksum: sha1:ce4feaab84e6c4bdcb15be3612196abbee4630b8 + pristine_git_object: 9151ae348cf73d0982469549c1f84c43679416cc docs/sdks/credits/README.md: id: 81608135c0ff - last_write_checksum: sha1:4bb44b478c0d1e0423790679428c3b74d25bea07 - pristine_git_object: ee5a6600c153c598b1806cf5c216511d83a0c8d4 + last_write_checksum: sha1:fddf93226f9196a966a592422c07720f5233a8d6 + pristine_git_object: a902be6fa740c256c7a78fc05b891ed610710feb docs/sdks/embeddings/README.md: id: 15b5b04486c1 - last_write_checksum: sha1:d8e5a2c9498b1fa97d75bf4f85592630617cef29 - pristine_git_object: 286acc1a794c34d932712f41a331db5d802828bb + last_write_checksum: sha1:c578c86ccb4c956fda6a316e7eb53f21dd40cf69 + pristine_git_object: 835b2250dfed24734543bed405817b63e4dcd502 docs/sdks/endpoints/README.md: id: 80d3fa9f5f5b last_write_checksum: sha1:e3ab3615747e2f29ad687ff9e6ac6e11f434556c @@ -2967,24 +2740,32 @@ trackedFiles: pristine_git_object: 0667b0577924b2570ed4a32459c111383170361f docs/sdks/guardrails/README.md: id: f72b38a5a2a7 - last_write_checksum: sha1:7dcf248293db2b4e7b762956aeebc85f8aafd450 - pristine_git_object: e55ef8b0f8783d4d3bb739a0e37e2c19cca0d1c1 + last_write_checksum: sha1:5bb62524b61297c1d7ab9206e0299c7483c250a5 + pristine_git_object: 472a89c8ac9bb14ed42b6c5d8cc182b1d1d0cd23 docs/sdks/models/README.md: id: b35bdf4bc7ed last_write_checksum: sha1:f725c16e8c418ac7cbb0b34f129f1d8c0ff6c042 pristine_git_object: 2e4d0e645aa9c251cef6c2f028a1c6c3502ffea1 docs/sdks/oauth/README.md: id: 80ad2c1a7b62 - last_write_checksum: sha1:defbc1d8278d76e99e4eb5473f8acb048d92621b - pristine_git_object: c3e6fb2bd1f6a37436c4077e5b6aab3c2898f648 + last_write_checksum: sha1:cc40810eb1647deaf1bc3401a00fced24c6dd2ec + pristine_git_object: 6d1bb8cbe1e44cfcd3bbdff2cc116fa651deba0b + docs/sdks/organization/README.md: + id: 69e4232b8432 + last_write_checksum: sha1:52adb5056b0cf654a5079dae45853990709380d3 + pristine_git_object: 2dee941019490637ff4698640265e1cec1b6f175 docs/sdks/providers/README.md: id: b02aa45c0093 last_write_checksum: sha1:caca852ec93cf16ff32aef63832948cf43790d74 pristine_git_object: fe849dc37ce12bac9da8cb2c47dd4c6845df0e4d + docs/sdks/rerank/README.md: + id: e2b361cec1dd + last_write_checksum: sha1:4b6b32eb0048f1ddf75927f4887adb5a5d8f3e62 + pristine_git_object: 1487b5c5fc0dc01edbea3fa041949a54cf500ae2 docs/sdks/responses/README.md: id: e717bad14f63 - last_write_checksum: sha1:6c59dea327d1c392e01256d86c0dcd80c291066c - pristine_git_object: 20c266d330da4cfe7f7122afea48ad65751bc2cd + last_write_checksum: sha1:cb305dcdf91f6051d822918f872d381319b3fb81 + pristine_git_object: 7002690cc52491b4677db8ce5aff65d0a75e09ff eslint.config.mjs: id: 461c8d07f6da last_write_checksum: sha1:9398f326377fe47f67af2df6eb6370750c0790b4 @@ -2999,164 +2780,168 @@ trackedFiles: pristine_git_object: 3023d20d49edb84df485d98777ec339f33b5ec6b examples/betaResponsesSend.example.ts: id: 66896eb477c6 - last_write_checksum: sha1:d700f0c290112977693207cd0cd9cdd51c59eab2 - pristine_git_object: b14adcbe9a0db9cf2919bfe2f7f7fbb02163ee41 + last_write_checksum: sha1:a9add2612f52a94d2cfddd2683e5bfca88638e97 + pristine_git_object: a86eda344c6db326ad232bac3cd65e27a12777f1 examples/package.json: id: c1d7b0ec8e7e last_write_checksum: sha1:ce55578b5e4f5ea8dbe806eff6cf5d6bdd8172ac pristine_git_object: 410efafd6a7f50d91ccb87131fedbe0c3d47e15a jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:13daedf71942f557fb3f3357bd8c7e6deaf9995a - pristine_git_object: 701d990fa847f0f1cb240abd13ea48a5c6a753ca + last_write_checksum: sha1:b522d64881528c41103fc6015bf07e7404689ee2 + pristine_git_object: b88f6d3bb76aa6bbb9fc916041efe9cbbd857316 package.json: id: 7030d0b2f71b - last_write_checksum: sha1:614fe676b19f3399c8d3bd9c52bfdc878721ffb4 - pristine_git_object: 84d652e14d239cd467926d8bce5f136ca76c7f6d + last_write_checksum: sha1:bd5bcb630503c6dec81bb0e36b2991e0f2c1e7f2 + pristine_git_object: 0cbc2f92b1dbc386e3a07a11196a886b7389f21c src/core.ts: id: f431fdbcd144 last_write_checksum: sha1:5aa66b0b6a5964f3eea7f3098c2eb3c0ee9c0131 pristine_git_object: 8747345312bcc83a569602bf521f20f0e1559fb1 src/funcs/analyticsGetUserActivity.ts: id: 6525bcc66ab5 - last_write_checksum: sha1:3f896b945b476cb683f50e5d2e3de7aba2c90bcf - pristine_git_object: 3fb172c2b553841d1f7a8995742fd8b9ae1a4ce7 + last_write_checksum: sha1:da1c3677da302018a6ab71dbb37c6053a137bc18 + pristine_git_object: ff4692c7702dbad89c5d782a7af87aa575d495b0 src/funcs/apiKeysCreate.ts: id: 133e2c5f487c - last_write_checksum: sha1:25ca9081e1b2850f55ff27fdd6574f476607d283 - pristine_git_object: 15302b5bf9937f57e9cf6759af7fbd7fefb088c5 + last_write_checksum: sha1:8a38e086638144d39452bfc35b883d381616ef08 + pristine_git_object: b0e0b48876aeaa23ede2b904c8e72fe5e842bb4c src/funcs/apiKeysDelete.ts: id: c151c399f75f - last_write_checksum: sha1:ac55e1028d768167da6208228cfda6000e08b281 - pristine_git_object: 65e8e4d26f228ec04e51c4f3c030ae515449afcb + last_write_checksum: sha1:1fb8f8dc40ec41e51878c6bfd40d5f869b128da3 + pristine_git_object: ce7428d9d0c4bce11ec3edde86589ed962d441ae src/funcs/apiKeysGet.ts: id: 12a5c2abbddd - last_write_checksum: sha1:1522e65bed56299a24d15e2010c7e4a343481e7c - pristine_git_object: 48102f93c1f1e808e21b3dd04131ef5152705b59 + last_write_checksum: sha1:0c883ae1135f0d3dd2e82b0e13af42b81b644991 + pristine_git_object: a8c7fa6c66cd98e4c9ab48a7f97ac402ba276b34 src/funcs/apiKeysGetCurrentKeyMetadata.ts: id: d9449cb31931 - last_write_checksum: sha1:b5033bfa6274202ac8f4d1f97ab4dd9cf65ae9df - pristine_git_object: 56890099630d2449f84275cb90ecca8807532135 + last_write_checksum: sha1:2f7dc5c2ad1e93689cc4c1de43579ced48959cac + pristine_git_object: d953da3187102e4a846100c54da4ad89d872bd00 src/funcs/apiKeysList.ts: id: 2afc8d8f1ce0 - last_write_checksum: sha1:81c624610f4aecf12d1624a5e0eede95739f66a3 - pristine_git_object: 8b2d00b569770a40463899aa1185d996bbd808b3 + last_write_checksum: sha1:a8e01e8253dbe0a3fe35802a889b39044699b2d3 + pristine_git_object: 96a1d04f3d6ef8b88475a99e7f4069b78dae65a4 src/funcs/apiKeysUpdate.ts: id: 05700884934b - last_write_checksum: sha1:c5facdf98bbb575d1c467c0db3c0797a90e0bf0b - pristine_git_object: b971db8b50bf3462b01e10e1fc075271db1cf53d + last_write_checksum: sha1:27e021d0b93532c521e1150f158ab071ef1e797e + pristine_git_object: baba4cd7587f1d856ddc788349137a8dcb5788fb src/funcs/betaResponsesSend.ts: id: c5c4ab0c3f76 - last_write_checksum: sha1:07e3f9a810e08752ff9783d1eb27c729b052fbeb - pristine_git_object: 9bfaa8374c8a95dbe2013bd98db816cd1ea76747 + last_write_checksum: sha1:632348c6f1d1ced6bf4f25c8d553899b4958ba46 + pristine_git_object: 753f20ec379919d03a600757c95d5d1a17a72bb8 src/funcs/chatSend.ts: id: 8c3aa3c963bf - last_write_checksum: sha1:ac2b2d17e2d483dcc5ada6e0fc94bef6b210d1cb - pristine_git_object: e6dc03e8a0bb683c437bc26d4c3d9aae9c8b0766 - src/funcs/creditsCreateCoinbaseCharge.ts: - id: e07ee6831da3 - last_write_checksum: sha1:dcde2b49a608ff1510ea6cc7892d388e4996d6bd - pristine_git_object: 702ad6f5efe10f60f20bf52ebec604af5d4c178b + last_write_checksum: sha1:ff7df1a9799b23950f3f99a36dfdc3cb9343ab25 + pristine_git_object: a77f61ddb4e752f9357261e018e4583548f67fe3 src/funcs/creditsGetCredits.ts: id: 88fdc1315137 - last_write_checksum: sha1:57922a22594546e3aba61884924e4e8a18df10a4 - pristine_git_object: 81708b67c7a394d1952d8bc10ab9cbb9eb502c95 + last_write_checksum: sha1:557d8fd868e6682bd791e072c330b934e79ddc10 + pristine_git_object: fd128513c6c58ebaca7f5ed3db252caf68d53c1d src/funcs/embeddingsGenerate.ts: id: f6455fcfe2c8 - last_write_checksum: sha1:00de3b29f99a6e1128fd63f1b06e09ea7631f80b - pristine_git_object: 0b51ab86c84d486568aa7d58ed22e0f28d107369 + last_write_checksum: sha1:66b3113073262e908bd337986346a0f772053243 + pristine_git_object: 1cf355c9339041b628ed232afc2c30598a71e731 src/funcs/embeddingsListModels.ts: id: dbe9751f8369 - last_write_checksum: sha1:25fc28ea51b53bc91d00289be6eefa6957bdba0a - pristine_git_object: 03ed629fbd3893732d758e66518dabe9af07d977 + last_write_checksum: sha1:b2d41c90306e244373c95e475dfdd083728e2f45 + pristine_git_object: edb75a8deeb59110356896fddc6749e6387ba036 src/funcs/endpointsList.ts: id: ea932ec09987 - last_write_checksum: sha1:58f38e35c60773a48a6aa6de2198bc19b33b7f63 - pristine_git_object: 5934a72621ade6ab3c36c24729e2f02f44c6b2d6 + last_write_checksum: sha1:1df6b7d28acacc6110c7e8bbe251d35af801ff33 + pristine_git_object: 207bee76edc808d43d8d79e0bd4727f174065440 src/funcs/endpointsListZdrEndpoints.ts: id: 4efb7ea3e48f - last_write_checksum: sha1:72d81dacd4f47f7a6e1f57b35dc9de6034abde85 - pristine_git_object: 2b319a71afb974b5d3ef928848e7f77de2432e5d + last_write_checksum: sha1:124415ee1e58f09c7f19f062c62795bf5718926d + pristine_git_object: 8346d4fd80631bafd991bdfd504b9afd1c7daf98 src/funcs/generationsGetGeneration.ts: id: dac2d205a08d - last_write_checksum: sha1:1293a6d874484c413c1f5908394fbb91fea93a27 - pristine_git_object: 8e6648d64ea597cd1830f79e6b001e0041d27673 + last_write_checksum: sha1:5a02119e509a40807fc1cd5d09c0539b02530f4e + pristine_git_object: 88f41e8abedd7bb90c6bc785460100e21f1d663f src/funcs/guardrailsBulkAssignKeys.ts: id: a97261f248c8 - last_write_checksum: sha1:7b52bcc66ff561419df003ea430eeb3e674aa3c4 - pristine_git_object: 7c26b9a8dd8891a21de02cd251e79da0416c2e1f + last_write_checksum: sha1:a5d1d0aace1915176ebeadc0b24ebb0a536a2b13 + pristine_git_object: cc0ef63b3b45881be9307a2ea6296a5f3937ed1e src/funcs/guardrailsBulkAssignMembers.ts: id: a1c1e49b5bfc - last_write_checksum: sha1:dc5ad68b907dc96f3e3a2bfdb2792c6ecaa638ff - pristine_git_object: 9dc855c650a4986aac2b9f21e35d15bc942f6fb3 + last_write_checksum: sha1:e0ab61ce49cdb9391aebf24c7f372aa60f2c5ec3 + pristine_git_object: 74ca93279a113e3d3c346a4747c42bb2b2e81af5 src/funcs/guardrailsBulkUnassignKeys.ts: id: 605482eb28f5 - last_write_checksum: sha1:644d15edf1becdaf4b3f344de5b85abb65fe828c - pristine_git_object: b9fa7e71f3c8400e93f984045832084998b99183 + last_write_checksum: sha1:7af55946a71f66038c232d01f505819586e2a010 + pristine_git_object: 67e7a75fde4cce871d4ac3e266b1bcfe058c66a4 src/funcs/guardrailsBulkUnassignMembers.ts: id: 582edea4287b - last_write_checksum: sha1:ccbd4ac892e87517992c7c31dbf4b0c8117086de - pristine_git_object: 16939d931f3efd93d3d02b5a0e54a6af6e9fbede + last_write_checksum: sha1:dd4fa3211cf5ffb3778354893aa7f877d62413d1 + pristine_git_object: d0ec8d8b90deebfa46ac6b0f2e57584ec50e0860 src/funcs/guardrailsCreate.ts: id: 6d61eb74274f - last_write_checksum: sha1:64076bde775a2edb9f1b830c941cf45a67668331 - pristine_git_object: ec426bd16c28eaa957eeef4ba0bdb05bf7c4e9af + last_write_checksum: sha1:83a86bd6a33e672d5e61c12b3d8c1f271d9e1d3b + pristine_git_object: 57dc9e00a1e8de84ecb2503baf03a46b58f6dcda src/funcs/guardrailsDelete.ts: id: 2ee7e7eaab9a - last_write_checksum: sha1:fd9b64c2a823eb2cd9465b0fdf1d6ea9bb780938 - pristine_git_object: ce2562e86d0458c806075e8424b28634957375c9 + last_write_checksum: sha1:a7554a0252c2859acc00b89635f4f35522958043 + pristine_git_object: 1f983138ddeddca8ab7ae2acf52d74d2d2993256 src/funcs/guardrailsGet.ts: id: 259eaa63a20a - last_write_checksum: sha1:2c5ce8484b649077e0143786d38ce081d7340b58 - pristine_git_object: ff2003a1c001639c7f9a2042c688edbf0047187e + last_write_checksum: sha1:76eee5e38185ab0e53162f9700698f99bf5a3073 + pristine_git_object: bed357f5a0e09b2bebc309a52e3403a3862f313c src/funcs/guardrailsList.ts: id: 5a0c89687e40 - last_write_checksum: sha1:dd97f1aba2c5933babb0521e07392936e5d3cf5b - pristine_git_object: e181e7f4df9d0d69a20e1e678fbe34b40313fd82 + last_write_checksum: sha1:28051816d54904a0c71dba2edd9673a3249d92a8 + pristine_git_object: 78bd226b7de01b07c2371533c5022e422435c88a src/funcs/guardrailsListGuardrailKeyAssignments.ts: id: 524ae2fd5189 - last_write_checksum: sha1:820587ae6a5bed0d3570b3c5583364d4c05af18e - pristine_git_object: 39da0b683f0f86b157aa1e7de88d6210da56b70c + last_write_checksum: sha1:5d6e01336a47ecfb0eb8226225316f5986e8978e + pristine_git_object: 72bf31255d445e4f7b5f3ff03974a60f376ca2eb src/funcs/guardrailsListGuardrailMemberAssignments.ts: id: fc84c185d2b3 - last_write_checksum: sha1:b54682dcf56c19b80aed3fee40717867322d8999 - pristine_git_object: a4d6a85459e7e4911df3526e9c8f6cafaaa9643d + last_write_checksum: sha1:f99035727d9b1308d7491a450812937b27833a70 + pristine_git_object: 88cbd772148febffc6769c2c98f56dca3360531a src/funcs/guardrailsListKeyAssignments.ts: id: f654b4f757b2 - last_write_checksum: sha1:96c6a747b32b2d44c2ae6d94ba1520b943217ccc - pristine_git_object: b1f565043644af3cc66b8d6466c31ecde0bce81b + last_write_checksum: sha1:75d6133b66d7dc05071072d42947123bcd715c69 + pristine_git_object: 2f9ce0e1da09dd13eb390875402213c9bc0b4721 src/funcs/guardrailsListMemberAssignments.ts: id: c2762783a96a - last_write_checksum: sha1:2df10691a59e187a6d8851085d13faf36d4eb136 - pristine_git_object: 44f3e6f2dec79b28670d4a1bad10b73e830f5973 + last_write_checksum: sha1:ea26a11ec907a752cc7f69707fc7afbed2a67c05 + pristine_git_object: 2d1e79ab471b232a7b38c7a9290f8b746295d4f6 src/funcs/guardrailsUpdate.ts: id: f8685ead7098 - last_write_checksum: sha1:c5658e0ace2c7d640ab88d57f571664a8fcc36a1 - pristine_git_object: 47262b78f15ebe8ecda7c86747929aa0deb4eeac + last_write_checksum: sha1:1afa15fcfbf74c68bf3e78ae28aa8a6706fdb5dc + pristine_git_object: 5187613c69e300add9a75e26492bd8661331fecc src/funcs/modelsCount.ts: id: 371adfc67b48 - last_write_checksum: sha1:80609e415a3ce22e85911777aa92719dd2c377fb - pristine_git_object: 37341fe95b4f4e71aac9830ad89ff3c9c21729a9 + last_write_checksum: sha1:94d4e0aa9fe1ae7073acaf999c7cd50490f70366 + pristine_git_object: 0d1f8b2afeb29513fc20f0c32beaae7219afbdd9 src/funcs/modelsList.ts: id: deff050b46c5 - last_write_checksum: sha1:9b6aa77513f2ff523095f0acc9cf6030c6a5c77b - pristine_git_object: fcae3864c7ed9843574673ba5d8cdf8ffaf6f9e1 + last_write_checksum: sha1:b1283151ba65dbf338aa6ced31e8a6573d3563dc + pristine_git_object: 926d79e6a5f96069b07055aac245bb23f3885bb2 src/funcs/modelsListForUser.ts: id: db628dd3c179 - last_write_checksum: sha1:ec1362ef8ddda13d8d30b46858b78a905b78dffe - pristine_git_object: 9b406a7f176919f9c34dac5c60e02f21e967a29f + last_write_checksum: sha1:d038949f743d828c8bf380d699b6888e78a7940d + pristine_git_object: cba796d876231db1379d63079a6c13d1d28b192d src/funcs/oAuthCreateAuthCode.ts: id: 8a79f27722c0 - last_write_checksum: sha1:a9f2a489e15a7d58b035982877ceaf70061f33b6 - pristine_git_object: deb51c7d9e41e76b94cabfa00a12bfc3743ae47d + last_write_checksum: sha1:8d39aa6e64b0aa4f89d188e6180086805cfb211d + pristine_git_object: 7f7c14a3234055f71e7fde16c3a9368b823ac0fe src/funcs/oAuthExchangeAuthCodeForAPIKey.ts: id: 3386ec12d934 - last_write_checksum: sha1:cf9eb1d87a749960337500633dca8609000a5a99 - pristine_git_object: ba520dedf4ceeebb97264403d6b71d5e3ff96d9f + last_write_checksum: sha1:229e10e92b9925f9dfa58e2707dc9f2fb3f4c32a + pristine_git_object: c4720a20f4cfb378967aa1ab56963c7529f326d5 + src/funcs/organizationListMembers.ts: + id: dc6644106a4d + last_write_checksum: sha1:a50a1e032a02b98d5991cb220524b5bdaf80a165 + pristine_git_object: 4ef0a3fad14c4051d04267c3cc6f11c89f05514d src/funcs/providersList.ts: id: 8ad87e7210ae - last_write_checksum: sha1:0236177ec700bd755ff51802b7af5aefab2131cb - pristine_git_object: f37022cdb99bc280d34449c87342871237462eaa + last_write_checksum: sha1:512df809d0cc7549d3de3b4ccc05a989901e4db1 + pristine_git_object: 503bef3df768ae98e601bdebf032f600912ecb3f + src/funcs/rerankRerank.ts: + id: 915c20e147a4 + last_write_checksum: sha1:40d284f84044cbe2610c1a1c5b5f84dd9e1450cc + pristine_git_object: f39c3bac6a469e777ffcf039e5a1c1e2b3f2d0d9 src/hooks/hooks.ts: id: a2463fc6f69b last_write_checksum: sha1:fca8fbb93caa95e04081273240c61985b717bd09 @@ -3179,8 +2964,8 @@ trackedFiles: pristine_git_object: a187e58707bdb726ca2aff74941efe7493422d4e src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:92de57c6b1cb948c5f50f4f0ddb51255e771527a - pristine_git_object: ad74991a5320acfd2758f7c29b44e312020a2744 + last_write_checksum: sha1:87d13ba98832a0eaf232cdaeec6d59e61c868cdf + pristine_git_object: 591743c2024b47070780d0da39e45ad05352dcd0 src/lib/dlv.ts: id: b1988214835a last_write_checksum: sha1:eaac763b22717206a6199104e0403ed17a4e2711 @@ -3243,16 +3028,32 @@ trackedFiles: pristine_git_object: e4f870ddddfb3745e52ab6b53c168025243e28c3 src/models/activityitem.ts: id: ee2d86453873 - last_write_checksum: sha1:8e915d323967ad02633368b086192807830a38d5 - pristine_git_object: c13ce72558d6d7e328189266bca17c00b433ab2a + last_write_checksum: sha1:3b184fc1d9a0fa40dc0ae77917736bec7da2b6a3 + pristine_git_object: 3e8158dc352db583feb87c17483d4fc224b9860b + src/models/activityresponse.ts: + id: c535306a4318 + last_write_checksum: sha1:c8c737bab0413512049267743ad03fa9aaa30deb + pristine_git_object: 41223fe450362a089e7de222ab42d025e0cecc9f src/models/annotationaddedevent.ts: id: e5c5f2adf5f6 - last_write_checksum: sha1:7f160140ce05a6efe6140f75ca42a5ef46c3bac6 - pristine_git_object: 5a81c33b7b8b496938275aebb08da8a46f50bba1 + last_write_checksum: sha1:de07777dae940775f53d0225cf1bc3f315611c74 + pristine_git_object: 22e406b8b0272639a685035051d0815f6ebd852e + src/models/anthropiccachecontroldirective.ts: + id: e8b49d71cdd5 + last_write_checksum: sha1:142f20c69c0771223fb7f25767eb1af5b0826918 + pristine_git_object: 9386ba233d12f7f07e740ff630123f49377f3016 + src/models/anthropiccachecontrolttl.ts: + id: d6c8b6f13cb1 + last_write_checksum: sha1:ce33734180f67ddfe3287e5ee8939ff265c7c1de + pristine_git_object: 1e06de28f0cd122795603a2a2cdbd06875a0c2fa src/models/applypatchservertool.ts: id: ee989280d886 last_write_checksum: sha1:bd583549c537d27a8c1e4da7f6bc06f7b5a3007f pristine_git_object: 24992420a409c3143f19f78c10fc647802586d2f + src/models/autorouterplugin.ts: + id: e3853c83720d + last_write_checksum: sha1:d895665daa49f60533b34e44e615b16f4c6d751b + pristine_git_object: b66bba1df492c285de0780ecb38116e4bbdc9051 src/models/badgatewayresponseerrordata.ts: id: de317517c298 last_write_checksum: sha1:0c142f4aa9e808430a0caffe3c454146875e7c56 @@ -3263,12 +3064,44 @@ trackedFiles: pristine_git_object: f2adbe93cad88fc26324f6b9651e5bef9b93eb89 src/models/baseinputsunion.ts: id: 7237afe9aafd - last_write_checksum: sha1:75d6df84186917426e23f7e356098f6250e915e8 - pristine_git_object: 36e5c40d812f6c1790da320a55b75a7a68984d59 + last_write_checksum: sha1:6b3c61a2275779b5699b75b1da26836075442b06 + pristine_git_object: cd534c962d4dd3081a9d2cf2acce2886475895b9 src/models/basereasoningconfig.ts: id: f3138cf23569 - last_write_checksum: sha1:e79df4f394c347b032dd62582d831fa3104fcea6 - pristine_git_object: 2fe05d1b565365c093adcab3c17dac319b677bd7 + last_write_checksum: sha1:91d55dbdf969312a9e68d3b76abd3663e6787e67 + pristine_git_object: 2d487fb5237e2445082b59d75ac7b301b3e52199 + src/models/bulkassignkeysrequest.ts: + id: ad0c5e35d467 + last_write_checksum: sha1:96d89cb7676c0a2ac6af8e13d85b52d1dfcabd32 + pristine_git_object: fa4991335b8e5833acde1f556db8c13f8f863d03 + src/models/bulkassignkeysresponse.ts: + id: c8f692e7b579 + last_write_checksum: sha1:00ca5e21b9bd5eeadb0fe9a936b91813d7f478d0 + pristine_git_object: 24c5ab30e47462f970f39bec6235047a8043e585 + src/models/bulkassignmembersrequest.ts: + id: 502ee2c0e36a + last_write_checksum: sha1:f3fd08d8dc9887c513ba10788399b2a4e7129751 + pristine_git_object: f7710317fc02b8707722ddb01ff670030f19845c + src/models/bulkassignmembersresponse.ts: + id: e54fe72a28b7 + last_write_checksum: sha1:d9f28f542f172175638923802b54859764f9c2e6 + pristine_git_object: 53292cf5bcc74e9df0cd7fbcfa0a68a446a8373a + src/models/bulkunassignkeysrequest.ts: + id: e773f6f68c24 + last_write_checksum: sha1:bbd5ae18e76e369b2b6b7fcd2a933c90ce110bf5 + pristine_git_object: 05516b4e051a737b20d7212a53c5c60e9a582ee9 + src/models/bulkunassignkeysresponse.ts: + id: 5906bcf3a524 + last_write_checksum: sha1:7976e84ac408cebc1b5c68f096bc7ce914c4ef33 + pristine_git_object: dd2278eb9a89c726ce3d2e43bbd28b3e33a2b871 + src/models/bulkunassignmembersrequest.ts: + id: 3443354340f5 + last_write_checksum: sha1:48322499d9e96b01937e795602114c531a807062 + pristine_git_object: e37e75531236f0eb089159c4b3f498fc4cf6635f + src/models/bulkunassignmembersresponse.ts: + id: 4d3857aa5f6c + last_write_checksum: sha1:cbbc5b3ee48c241ab715314e93c53ee3b88f1b97 + pristine_git_object: fbf53dfb6f2bc1aba4ed0b9a600e560824ea7bb2 src/models/chatassistantimages.ts: id: 31fb8a4309f9 last_write_checksum: sha1:6b04f05aba427f76bd7a45345cf1ab055ff45ea9 @@ -3279,32 +3112,32 @@ trackedFiles: pristine_git_object: e66292450dd0631f8fb0511a0d9b390f871c08ca src/models/chataudiooutput.ts: id: 692ef1eded11 - last_write_checksum: sha1:1a50c27bbd44733ecc47b9c16a53538a723ba323 - pristine_git_object: 848f5f6fe08315f02340686695e55960d0bc42a7 + last_write_checksum: sha1:1ce9e5df0dacdc93a010144a826b67f26518b75a + pristine_git_object: fcb5af046ce07f0ae3a09a13cf1f08656805e37a src/models/chatchoice.ts: id: cb1eedd5b62e - last_write_checksum: sha1:82c51350abf27e05fd86e098c5bf18db049ca344 - pristine_git_object: 18d99a37427e770879c9230bf33380d033f9fde8 + last_write_checksum: sha1:6bc4a1e344698cfcf5f86079c542e10e26dcccd8 + pristine_git_object: bb8b94e36abfb850b29a930c378a95679f9d40a0 src/models/chatcontentaudio.ts: id: 0f458a760f42 - last_write_checksum: sha1:6b52cf66f20830b86061577477ed0ab8ba24ccb0 - pristine_git_object: 2719c9b97dffb223a0d3f06eeb3021145ff0d121 + last_write_checksum: sha1:c3680f81a4d2482a94f09fb959a599077c769d0b + pristine_git_object: 9ac36b3408f446b435a9d2960b376384c7326640 src/models/chatcontentcachecontrol.ts: id: 2826e2627ca8 - last_write_checksum: sha1:66c498713f76dd23d474fe081d328ffdcf32b138 - pristine_git_object: 19802719da74d9440f8969e74796124c0ab70833 + last_write_checksum: sha1:23622568742dbf4a75e12a871891e490f8b534bd + pristine_git_object: ebd791429db9ddcf8032f23d6643ac441c0763f2 src/models/chatcontentfile.ts: id: ee5054f5da9f - last_write_checksum: sha1:3005d0df4df4bafa75eefa4bb73788f5e20b5d6b - pristine_git_object: 9011ad27c8934734985001d281af014048ef0eb8 + last_write_checksum: sha1:99bebe4be4ef99a6c8e47b7f7893f6773a8d15c3 + pristine_git_object: 87f8c2d20131f510ff933a8e217919d1c501f0c6 src/models/chatcontentimage.ts: id: 0903ebf8f7a0 - last_write_checksum: sha1:0709c422ab7b5bf467369053b50213f49a70a591 - pristine_git_object: 88e500bbc36918937e34f1842a0ee4ee4ab60599 + last_write_checksum: sha1:31330a1a6c8ae2017a77887afde216193e394570 + pristine_git_object: 642dfb6b4f55dd9c00dca8d568c35dc543381333 src/models/chatcontentitems.ts: id: 3d8c886d8084 - last_write_checksum: sha1:d7a363043dde203e4068306fb3e9e67662e10b46 - pristine_git_object: 94b65745b7c5a798be4dad560e53b4f264978cdf + last_write_checksum: sha1:71a281a4394ed5864ab9c50a38b33a0f3552557a + pristine_git_object: 2efd5a78f158b3e785c8cac8eb0ca3ad9adfd771 src/models/chatcontenttext.ts: id: 09b5a48d2bab last_write_checksum: sha1:53646685e1b214fad3eacef7c817f6e76cb1b2ff @@ -3347,8 +3180,8 @@ trackedFiles: pristine_git_object: d082d241abf206468fe635e7c47dca140e3bfd90 src/models/chatfunctiontool.ts: id: 400104319b29 - last_write_checksum: sha1:be96d151b4496670f67f97e6c441e4911253a8bf - pristine_git_object: 01c555d7c8fbfa1f6a85cf62e8d19c05c07dad65 + last_write_checksum: sha1:d8826ba7230610e19a912abebf28f400913d1647 + pristine_git_object: d217be1daaf0ea81b78612f9b2135e2ca41b5a9b src/models/chatjsonschemaconfig.ts: id: 1ad0e5d930fb last_write_checksum: sha1:f4e301877c2895a6db49b68dc0a529c181b3c1bb @@ -3367,20 +3200,20 @@ trackedFiles: pristine_git_object: 321dcdebd677779915fa4f9a805175997936d368 src/models/chatrequest.ts: id: 5d2646ed8dcf - last_write_checksum: sha1:a9e34704de0930e882064aa88e8bae0516a0b1f0 - pristine_git_object: fd8c3ee3bde658f5bd7e3c3d0bec34275d72db7c + last_write_checksum: sha1:6e9f49dc34c39c951b25f98beab24e12269f5da2 + pristine_git_object: c198f7138b2771d32c222f86d09276d1056d1d98 src/models/chatresult.ts: id: afefd8aadd09 - last_write_checksum: sha1:12f3e84531c1d4647de1627f7c2704e44e6d8278 - pristine_git_object: c5a18849eba013034c0bda120f90d9f4cfa09e3a + last_write_checksum: sha1:f5e94680fa9c0bbb413d94f9edfd900d43c48fb4 + pristine_git_object: 970778739de776e099c4d5a118d94350998fce3b src/models/chatstreamchoice.ts: id: 3747d92a0ba4 - last_write_checksum: sha1:a67c2b4ff1f74d7adb4c8d54a93e78e3fac52ed4 - pristine_git_object: ca617a807b301c93b82d178435cab3b1a04cf318 + last_write_checksum: sha1:550fa3775e020f2dcf8181b3c25fe77ba2259479 + pristine_git_object: a31c5fa956f97bb59c81fa91544208a659d14ef4 src/models/chatstreamchunk.ts: id: 361f940e91e4 - last_write_checksum: sha1:20453a5570a18585b47afb7355df130b4f8e6dd5 - pristine_git_object: f1503f3fc2b32cac79f9baa8b3bff8b74af89ce2 + last_write_checksum: sha1:33767cdca3c51408bd485302af23e85ede81ee8c + pristine_git_object: e393dcffb0e2667a5786953db553df8b82c0ed26 src/models/chatstreamdelta.ts: id: 74a4be948d5f last_write_checksum: sha1:43069eb37a686da08d5782eff5de1a7a8425a3d3 @@ -3391,16 +3224,16 @@ trackedFiles: pristine_git_object: 41edb3f3d3b0b53241720d885cf78ece2613e3d5 src/models/chatstreamtoolcall.ts: id: bad96c4eeaf7 - last_write_checksum: sha1:ade55f5ca1ab22f63f293c7fe05c82d0a3f7f20d - pristine_git_object: f46ead551c78bba7f29b50e5f24a2fec5e201e68 + last_write_checksum: sha1:1e770dc9d832676fb7515891c6af85e6cba38b46 + pristine_git_object: 83c22e84e402aa619761477fc783aaf81fcffd79 src/models/chatsystemmessage.ts: id: e404d41c140a last_write_checksum: sha1:8103d612ae47d5e6587bc074b96f10a145f39d2d pristine_git_object: c053a9a8241f7f5dc138f61ddcc9add90602910b src/models/chattokenlogprob.ts: id: 267d5cc43c1b - last_write_checksum: sha1:b67a807fc0001a8174afbd6233a7f1b983189fcd - pristine_git_object: c99af343f070a5f54d0b4e3e0fcc246a6ee56312 + last_write_checksum: sha1:fa6632bbf956cdcbab82798f7af84b8c0df410f9 + pristine_git_object: 0d1472a0ba25bae2de57d6d515166671dc7f731a src/models/chattokenlogprobs.ts: id: 9dc7afbf530d last_write_checksum: sha1:7c480d48b938cd709f903994c006c0189468a0c8 @@ -3419,20 +3252,16 @@ trackedFiles: pristine_git_object: 35a6c2e6b02f21e2b47ea4033ccd89720e3e35aa src/models/chatusage.ts: id: 1e677d1ed4fc - last_write_checksum: sha1:cc8e1baa702e2bd79216a5e27a04c7b82805ab2b - pristine_git_object: 439206d07ec60e8db31ebf5cf4adf8c67c36d1da + last_write_checksum: sha1:c9c2cdf885b2aaa64a9a5f2e900c8f61160b6d10 + pristine_git_object: 0e44d04dc7ebfa81bca10f1c82716a024d154aac src/models/chatusermessage.ts: id: bc892e4ebadf last_write_checksum: sha1:3c51a645b304abe942a8fc75c5d20186c0c45dc1 pristine_git_object: 49794171070f32becceb3d64fcddf0a56e589ed1 - src/models/chatwebsearchservertool.ts: - id: ae822f875178 - last_write_checksum: sha1:49694b0ce0c148a248b542638c36a0852ec95abe - pristine_git_object: 34a2183b8bcb5c5c0de7b478845e727720287b9d src/models/chatwebsearchshorthand.ts: id: a67d6bbce478 - last_write_checksum: sha1:41e6fa1d97d5f59beac43fb53b9e43b7e0c36558 - pristine_git_object: 9ba2ce00234a8d48bafe89b15b7df0d1270858b3 + last_write_checksum: sha1:ee9e795aaf395b75f902d9d60f7f17479d30fd17 + pristine_git_object: 8c4d7ef0da26ffb0a734892cc5fe4e3bbd0db683 src/models/codeinterpreterservertool.ts: id: 493e614d6c34 last_write_checksum: sha1:f4f5786c99d48ab148114b74c8769df8faf60a92 @@ -3447,44 +3276,52 @@ trackedFiles: pristine_git_object: addc6873486dcd84d296da34d9995a456e4121c2 src/models/computeruseservertool.ts: id: e6059da59a69 - last_write_checksum: sha1:994a61ebc74791aea9e9571078db7a17f2964bfc - pristine_git_object: 3af58e15ae9e284b4594def2927e15f43daae4d0 + last_write_checksum: sha1:2729703841829552180f5b231d813e1347563f06 + pristine_git_object: cf10a81db0c6241a6d7ce2abf808b01c3d999db7 src/models/conflictresponseerrordata.ts: id: 6c8ea4c00fd1 last_write_checksum: sha1:17324f17b1a106b9a3d528d0240e31534835ea7a pristine_git_object: cc54245c51c84fb281f396b83df2ef2f1bda4880 src/models/contentpartaddedevent.ts: id: 5ba581a076ec - last_write_checksum: sha1:f3771a3ba20515166f9d842abc51d4f487cc74bd - pristine_git_object: 3bad02f670168965dd75f5aebd3f1265bc92d15a + last_write_checksum: sha1:51d54f89757c1c291ff9bbbdd2944071e152bf69 + pristine_git_object: 21ab0f4d1446a23103ffaf8949bfe9c49950d866 src/models/contentpartdoneevent.ts: id: 943cfab7678a - last_write_checksum: sha1:9e3ff2ce68cb15660ec5b6e5ddb044ac48bb9d5b - pristine_git_object: ced429f9453ac763ee9e6b542ee8aa1943a0fbd1 + last_write_checksum: sha1:92aa19d5e8b8f4be153a4931b3019a7044177c96 + pristine_git_object: 8553f649ba28e90a092f612b45d109d502824560 src/models/contextcompressionengine.ts: id: c80f6c3a6e09 last_write_checksum: sha1:9f81ff45a5fc42bd3d33271ed308972254ed77c5 pristine_git_object: 425b51d7ee21c067c1b9dfe3092a7f4feab34fb8 - src/models/createchargerequest.ts: - id: c342dc72d1f4 - last_write_checksum: sha1:c57248f3591179c079ee972d6e5fed7ae0cfa50f - pristine_git_object: bd6860c3f634b462352ea4ef1c9df35983435161 + src/models/contextcompressionplugin.ts: + id: e3e073b472a1 + last_write_checksum: sha1:b3c2a1367acfb47017405b4173b8edd48d77b15e + pristine_git_object: 7a74c30db4af3d5cc0ee2b11d31ff8b4469d72bc + src/models/createguardrailrequest.ts: + id: fbf07f1435fd + last_write_checksum: sha1:4869754d23de96ba75be6643f2afb331984bc8c2 + pristine_git_object: af15767fdd5730f985f1b34d98b2d3c6c8406b3e + src/models/createguardrailresponse.ts: + id: f0b6f29656b5 + last_write_checksum: sha1:f97971ea73141b6983b75e600b0df08df5511d0f + pristine_git_object: 2329ce81235843e4ec07d364e5967c5d9ace6a37 src/models/customtool.ts: id: b293ddf87321 - last_write_checksum: sha1:52c7550853c6ba558d1ffe0194c03eb857ade7ec - pristine_git_object: c9dc3b4ff90eb5a709154f37cf2649b05d41543e - src/models/datacollection.ts: - id: fa417e9ad79a - last_write_checksum: sha1:2245458d063c9185e8a0be3cc77fff435750853b - pristine_git_object: e075ba95073bbb9e5e43b32d75dcc1c48a1cf9ce + last_write_checksum: sha1:ef89ac688667481943a11f7299813cd0269be3fd + pristine_git_object: 9f04d8014cc8df55affd6bea405cf4f5a16d7c0e src/models/datetimeservertool.ts: id: a1a7d93b0f75 last_write_checksum: sha1:eaf901bb872c420ea61fd54afb1f5e4222a867b1 pristine_git_object: 042c138844200518dff05965de338ffc3c942211 src/models/defaultparameters.ts: id: 8da6fac53cb5 - last_write_checksum: sha1:fd873c8ef3d94449efa3289de5a198f6d50d4c59 - pristine_git_object: b2603a4d34cf43f1eb9995ce5371630d26f3bd10 + last_write_checksum: sha1:b2dbd9043d899e042a4b84fd01e565f5aa9e77e6 + pristine_git_object: 131372a4a50a3ee28a2e6c174516de12784cf0c1 + src/models/deleteguardrailresponse.ts: + id: 1369f013fe1a + last_write_checksum: sha1:565ef523d328e7acec91693559d7544798cfd642 + pristine_git_object: 943415e3ac21d0eb30bd73300b99874fe1cda296 src/models/easyinputmessage.ts: id: 0e3bca037a2a last_write_checksum: sha1:3326de9be8ea410057fa26840ee3bb4128cd8850 @@ -3499,8 +3336,8 @@ trackedFiles: pristine_git_object: afd9fedd3b5285d3929fb4c6f3069b7423412d10 src/models/errorevent.ts: id: a4e22766585b - last_write_checksum: sha1:590e4cb3705009cd35a71f11fe030743edd64f67 - pristine_git_object: 13b3a6a9da534dcd10582b16c47110de4e36bd00 + last_write_checksum: sha1:c5aa5b2a479652cc75f04bbd854ddf8a6dfd8745 + pristine_git_object: 6f4cfe3ecc126d284996a4959318d4af519ec60a src/models/errors/badgatewayresponseerror.ts: id: 6264bb9f01d6 last_write_checksum: sha1:32c26e4f3668a52b04dba2400c7d0fb31f460a57 @@ -3587,16 +3424,20 @@ trackedFiles: pristine_git_object: 4ece53ed4524690d931bc6e093745191778ad965 src/models/filecitation.ts: id: 0e609723dbc8 - last_write_checksum: sha1:b823780174bbb546e312d6b149d47bb00e0d8318 - pristine_git_object: 665445c5db6cb969c75fdbb7063462e6bd33e43a + last_write_checksum: sha1:0e6a41f592ed90da6ce7eacf2341d85407b118f8 + pristine_git_object: c77b8a6731397a0a4385f186c6ff8b80927d0374 + src/models/fileparserplugin.ts: + id: 04e61b333ea7 + last_write_checksum: sha1:0d630f73c848ceb2aa9db5b2903634c554aaa51c + pristine_git_object: 891f6ebf5badd7dc249102f16b5fa56b5f955ff3 src/models/filepath.ts: id: 0f8d4008ed8e - last_write_checksum: sha1:e1f7983eec9a1c7c19fd9e704ccd7546c77e117d - pristine_git_object: 90ff601bb8ca46eaba0d038c745163a5c8493d6c + last_write_checksum: sha1:cfc1871bc10aa8472310ac93fedd95fce49f1b23 + pristine_git_object: 2705a098bbd8311ededbfcd116f170a4ff42c9fc src/models/filesearchservertool.ts: id: e9b1dc2a101e - last_write_checksum: sha1:a7c64ef2ff4ba9b869ba16230b8b9a7b3c10bacd - pristine_git_object: 885c0437f9187cfadab5e8d8b318f3d48069e35b + last_write_checksum: sha1:6bbaae9c929bdf7cc99285e7885e76d6f6be050f + pristine_git_object: d8c1c028b91ac9dcefab36b30595d552924a9e36 src/models/forbiddenresponseerrordata.ts: id: cc3fdc45a2fd last_write_checksum: sha1:81bef9546eb570e81c3bf3c6fa65175361411860 @@ -3611,48 +3452,60 @@ trackedFiles: pristine_git_object: d45eb5a6281d335fccfbf48d361896628bf39cbf src/models/formats.ts: id: 6e4608e1920c - last_write_checksum: sha1:f761afe7752dfaf97c47c69b7b7c9e62af6b1cd8 - pristine_git_object: 3dbb19055ea48f9f3d46f22e3f12716b9bc4a293 + last_write_checksum: sha1:22f5e515f8631c4301fd7c0a90955916f9c67cfb + pristine_git_object: 7f9ca8e7b65e665f800ef4e6304e931cdc650ca0 src/models/formattextconfig.ts: id: 06c312c9c674 last_write_checksum: sha1:e1a46d14d6ec6b93c1777b51541d2c88ee36b41f pristine_git_object: cab970c91a636c1e19fde288af84663f9abb1838 src/models/functioncallargsdeltaevent.ts: id: 2f23b040fdad - last_write_checksum: sha1:de646289835c35c509ce1a7d59f94e66f49ed9e3 - pristine_git_object: f170a417a4bfae434e965e0d41e31cd301ce8cd6 + last_write_checksum: sha1:ab8c22f1def21f83f0c22d96c21b6f6c6c57aaab + pristine_git_object: e2ca44f16c7ed96a0e18be95c632cc9317b64206 src/models/functioncallargsdoneevent.ts: id: b2142af551f4 - last_write_checksum: sha1:43b9cdc1ca5bd80c64f04b30d51965c70bb4eef3 - pristine_git_object: 6db82e3ca4addd2e334a17956688cb37ca6314ac + last_write_checksum: sha1:1069a61840e6657c9dc45af922edb4058a4697cf + pristine_git_object: e64080fa6bcfec8c06abbeff84f73111d80311d1 src/models/functioncallitem.ts: id: 7e96e10e664b - last_write_checksum: sha1:dbd9b4f114c2f638480babf9a0ef193372e11f79 - pristine_git_object: 95e4b01f16e307ea30bd2ddae641f019e994c9b1 + last_write_checksum: sha1:99dd51e66beee33e4e95963d5d79ffb79dde8e59 + pristine_git_object: 144a56e694eee111ae04b1361a5c3f998ef05532 src/models/functioncalloutputitem.ts: id: 279b91cadffe - last_write_checksum: sha1:574abdac1bf5af0f8b56e614a25a620ae1af6619 - pristine_git_object: 9507b1da8f2ccb8d77c3b9a31c220dad5766b015 + last_write_checksum: sha1:366d04a9878e0687f148e318194871ec5349866e + pristine_git_object: c67de54e53f25ab1e5367951bbdba9f6ac7ba5af + src/models/getguardrailresponse.ts: + id: 3103b978871a + last_write_checksum: sha1:5ddb4118f2be61504caa75a7c83e3af7f0725b91 + pristine_git_object: bf3d99d78c065c87f9c3c9df4e2f57d18648f1e8 + src/models/guardrail.ts: + id: 240a4b8d7a7d + last_write_checksum: sha1:15432b5a549f7858a367d5516e4068b3af8a8dfa + pristine_git_object: 3e16001d00892582ea8048a5ac3996bf0bef8313 + src/models/guardrailinterval.ts: + id: a8a819c013c0 + last_write_checksum: sha1:cb34225d4273d17f772df6f403e22380155ba002 + pristine_git_object: 381964d94a7eb6a0badacba10db0785e3a359638 src/models/imagegencallcompletedevent.ts: id: fe8d977c7dca - last_write_checksum: sha1:fab23f1f5b73887ff9874182992b5c0d3457d118 - pristine_git_object: b581483d52d81b256f78a2028fd64b7e35c08385 + last_write_checksum: sha1:26b7884252493a77bfd96ffeb476f30195cd88f0 + pristine_git_object: 7985d9560234e3a220ea99201e7654fe6b5449c7 src/models/imagegencallgeneratingevent.ts: id: f2806bd9c69c - last_write_checksum: sha1:526e36e5f326b08427769d5c080ca5b42c2ae5dd - pristine_git_object: ae0ae8f4a10f4830e2ceeb8584dbeee2e6553925 + last_write_checksum: sha1:c7de282a0f866f3643102a5f8ef454604df75652 + pristine_git_object: 5c1a930f836bdc902f0a426994ee9778b2e06e2f src/models/imagegencallinprogressevent.ts: id: f9385ea6a417 - last_write_checksum: sha1:f17f7994fc230308103cb971c28748964a7a304b - pristine_git_object: 78a23a98fe52fe68518de2a076830c62df66838a + last_write_checksum: sha1:79e9efe74c020bb7b1f7c6547f9364998721967f + pristine_git_object: 20f9f64e3cc1413d2020884324283a455cc003e4 src/models/imagegencallpartialimageevent.ts: id: db1f02788378 - last_write_checksum: sha1:6501c0e1441738dfe3ec4e158d2ddc23a881a506 - pristine_git_object: 2fc2883cee400250738b18b98e687e84ec1a7ff1 + last_write_checksum: sha1:3a678392c5c1c0d91d7ccef225bfcae2dcb632cc + pristine_git_object: 802ea6c22bd305c9ae963b2d6d429cd67c981378 src/models/imagegenerationservertool.ts: id: 1efbad50f534 - last_write_checksum: sha1:2271bc75a3ca736619805c9b3817b6716138d82f - pristine_git_object: a740f320ee9815b279eff3bab75ad9fd5e016701 + last_write_checksum: sha1:083519d1cf7d347e28fbf53edc6262e30bb07134 + pristine_git_object: 03ccd92db925104cc4c9b5a9aec31fe514cfc15c src/models/imagegenerationstatus.ts: id: 2a72a5923e5a last_write_checksum: sha1:54850900dd3ae1504340efdc87f6435f4dc4e21e @@ -3663,12 +3516,12 @@ trackedFiles: pristine_git_object: 8e109bedfdcf2c4808e49323dda861e3c6069d51 src/models/index.ts: id: f93644b0f37e - last_write_checksum: sha1:ecf3e7a657f528d27010d842e8a486f9ac523543 - pristine_git_object: 393ef6818a52c44279cb5123cb1483b418e55b72 + last_write_checksum: sha1:5448ac2025a7038f926ecfea892b16cca7d88cf4 + pristine_git_object: c7fa26ce7c680ee2014b951b1726732ad31414ba src/models/inputaudio.ts: id: 9bdc14c7565f - last_write_checksum: sha1:b8c008e3a20193da45c859507438e3d1d32b5177 - pristine_git_object: 7c21e4a072e07935e5c6542ec625e6f60864efe3 + last_write_checksum: sha1:6ee0978545e8e5089507bf9a86804d7d66011404 + pristine_git_object: 99262f07323da96b92b895af619bbc7f3e8c8ac6 src/models/inputfile.ts: id: 21319fb604ac last_write_checksum: sha1:dda7fadce9739873a8814cf5c8c0afb83e8f8ad4 @@ -3687,8 +3540,8 @@ trackedFiles: pristine_git_object: a92bcc401c21e9213243e53629ccd4e673a94c12 src/models/inputsunion.ts: id: 3aff2165a17d - last_write_checksum: sha1:fd72830038759326b378b734152af10259ed878a - pristine_git_object: 0a4daef9260c152e16cf07dbfe110e391a4a1e64 + last_write_checksum: sha1:0a40400d6dd2d44a075d72ea6e5ca05de0e1b423 + pristine_git_object: c4ef1276ac9dc8509f6d2409feb99f3ba7a4331b src/models/inputtext.ts: id: 8d6c10a240ae last_write_checksum: sha1:f002b0435baa4b14023477c76e494f3360d75359 @@ -3705,50 +3558,90 @@ trackedFiles: id: 48c17eec376a last_write_checksum: sha1:dd8ef69e1787fe3a496c4142a1c47cf38cf62ffc pristine_git_object: 1676c40a5b6dc5646acad69089007f2e43a1bd61 + src/models/keyassignment.ts: + id: 0daee4bf9653 + last_write_checksum: sha1:4696efe3c1c30a584da3536a7d18367593762532 + pristine_git_object: 41d187bdec027b170f1c9975867ec782d77ec5fa src/models/legacychatcontentvideo.ts: id: baf6fcb0034a last_write_checksum: sha1:95bf2572307790ff941d086f56dc067ea1f778be pristine_git_object: a5bba6cbdc9500a118bc58bd9b3c52910b8b9412 src/models/legacywebsearchservertool.ts: id: 1a9c64204177 - last_write_checksum: sha1:e42c1dbc9072107e8506b7998acb5f68471e5296 - pristine_git_object: 14b3583c28bbeae3e7e871b02ce2889deb5e5713 + last_write_checksum: sha1:c89778ff9190145982ce9a5200f3a2ffbbb1057f + pristine_git_object: 01d0b631e66679e1650f7b73c322327c8c03f7a2 src/models/listendpointsresponse.ts: id: 5178e92a44ba - last_write_checksum: sha1:f14d4f1bb0115f6de83613d6d946bd75ec47322a - pristine_git_object: b6d6af839a15e92f869817c5cb03cab07a8461bd + last_write_checksum: sha1:7876bf657c3efdd99154c81a61a3b1e5d96b843a + pristine_git_object: cc59156e4c6f811fb520cf45d513938ca75d62c8 + src/models/listguardrailsresponse.ts: + id: 281c3f73d27b + last_write_checksum: sha1:c13d7812479837df8f29f6a6fa50cf2c338cb49b + pristine_git_object: 1600636fa1f26f5ea2edd278e1d8556e92d3988c + src/models/listkeyassignmentsresponse.ts: + id: 6c14372c6290 + last_write_checksum: sha1:34a2e9c84b2087a76dc48aac275cfb297371bc57 + pristine_git_object: e7f6f8be1fc7f645cbe09d10c1d99cac6cab523e + src/models/listmemberassignmentsresponse.ts: + id: bbd89d5e9f3f + last_write_checksum: sha1:28a5b3f627953900912fa9a132c1cd86d0541745 + pristine_git_object: c6211224826dc33fa66518f6d5bfe6c93f75651b src/models/mcpservertool.ts: id: 5e5a26b93ed7 - last_write_checksum: sha1:b544805d4218bd56e100e3a1f947d8c015ac09e7 - pristine_git_object: 65d6222950a0145cef6083f3f6e912a30b169a6f + last_write_checksum: sha1:4fb425c6bdbddb2d5237b50fe3fc7e03e4f1e9b4 + pristine_git_object: 448f9ecf5254562fa27b734fe46ee684ee0f81a9 + src/models/memberassignment.ts: + id: 5e100b48823e + last_write_checksum: sha1:a76c7a418747c39315866f456b9eaa0720568dcf + pristine_git_object: 4f354b8e2aa0d499afd7ac6c2bd2e97121d38467 src/models/model.ts: id: b99d4c14e794 - last_write_checksum: sha1:80681fec4a203e33c2c22de53112cf7091863724 - pristine_git_object: 35c99ed0fc553894595f1b1da145000542dcc53a + last_write_checksum: sha1:f903ac77da50eadc8ae78d4201c5c52d46c7d1f2 + pristine_git_object: 4125ab3a395f681f4f2b0ee917aa64cd651b1d8b src/models/modelarchitecture.ts: id: 57607576095f last_write_checksum: sha1:bb77b74a29ec13ae559b909ba2d03b5bbd4bdb42 pristine_git_object: 7b404df1aaaf83c01d4d02e47a63539d56cb65bc src/models/modelgroup.ts: id: b65482ec4223 - last_write_checksum: sha1:71c1363901abacdf5016cdc23c6642825e3b7818 - pristine_git_object: 9c40d281d50644248ff88cc05e7f63514b519504 + last_write_checksum: sha1:0ee8662687f1c146ee4eada78da058949c970c97 + pristine_git_object: c34631d385472d015d0f285112fc489d8abf62e2 + src/models/modellinks.ts: + id: 965b10bc40c4 + last_write_checksum: sha1:0dced5177ae5c305c73e3a1d35294698ea634cc9 + pristine_git_object: dd5fb55709969dd04f6f1f562bf3057b680c95fd src/models/modelscountresponse.ts: id: cf41f6279453 - last_write_checksum: sha1:128db8cacfb273fe25d15a99356a5fa40f2e8180 - pristine_git_object: 950a3f9216780e6a00895a6dcd743d411377fb52 + last_write_checksum: sha1:38d61592af2815035645b01797a7c49b1bbb373a + pristine_git_object: c511ac5b277fa19ae034b0d31570c815143b39b6 src/models/modelslistresponse.ts: id: ea0e62a13d8d last_write_checksum: sha1:0beae3a59e783ff5e4a4b444b16e6227a5024f1a pristine_git_object: f3fae481c3a9a4c1461521e18e9693de9c291846 + src/models/moderationplugin.ts: + id: 309bb6cfc394 + last_write_checksum: sha1:da7750a3d97ce6cdcd87f4002b289e95743fa8f6 + pristine_git_object: 276357bd069a57e77f901210d081716cddbeb1f5 src/models/notfoundresponseerrordata.ts: id: 6c2943dd4f02 last_write_checksum: sha1:cd0ce3ea1fc6a309f88347c58a6d62cf9814f354 pristine_git_object: aa237f7f6b89ed4a65adbff5d1fc12514cfa11b2 + src/models/openairesponsefunctiontoolcall.ts: + id: d27a63e0fb93 + last_write_checksum: sha1:080713c4a9a983927ab1d46997655145568422f5 + pristine_git_object: a7dc5bb1423ef7747473943e5cee5b6c20dcd4c8 + src/models/openairesponsefunctiontoolcalloutput.ts: + id: 78c25d89c63e + last_write_checksum: sha1:cefb66840f85abe2dd4f2785e03ab8447ef83888 + pristine_git_object: 8a32ba944a8f776f41b7add416da270c8d554de3 + src/models/openairesponseinputmessageitem.ts: + id: 67004da2ad5c + last_write_checksum: sha1:85aaae3073dd41b37fccad1cf75e6ee9e5892ffd + pristine_git_object: bdd8605d230c9897a034034bf385d619ac3257c4 src/models/openairesponsesannotation.ts: id: 5828fa2314e3 - last_write_checksum: sha1:98d25d1c2d24ac1734d757ddae32f5cee7354589 - pristine_git_object: c402006e91b690092d1597532b555f8656de100c + last_write_checksum: sha1:750f70f96b907aee491f2c7320788e8e76ab4fc8 + pristine_git_object: d213ed21f4fcef620f7d1df68409f6f2d374d3e6 src/models/openairesponsesrefusalcontent.ts: id: 5445ae4a5385 last_write_checksum: sha1:b72f18c622cecdddcef3151129be6c253c87ba8a @@ -3759,60 +3652,72 @@ trackedFiles: pristine_git_object: aea8bf92ec7d91eb7439ded4155f8d82ba244974 src/models/openairesponsestoolchoiceunion.ts: id: 73d80db9cd46 - last_write_checksum: sha1:cd842307394659cb6c333d534ee3e589a5c6b826 - pristine_git_object: f35263df3e3a8492a0ddcdbfa786ecab3b4464cd + last_write_checksum: sha1:793f01efd7e5c383a1d5849886ef3d2351e615b0 + pristine_git_object: 55ba976f2beab4f690d24bbdce9bcfd6ee922e8d src/models/openairesponsestruncation.ts: id: 03de9ac74888 last_write_checksum: sha1:736467314cc6ffb42dc5098719a301a5e4d84b12 pristine_git_object: 54f771f9d0c2610b989c9f1567549873fcdda4c4 + src/models/openresponsescreatedevent.ts: + id: e65287120d25 + last_write_checksum: sha1:83248d778dc4624589d2fe9de92e732d56022881 + pristine_git_object: 8275b45e32c1c2c3d3b8217b28d2e9a05ec5976d + src/models/openresponsesinprogressevent.ts: + id: 44b1a23df5d5 + last_write_checksum: sha1:0b6288e9fb14bdeb19f247ccf6df1e222f5aa951 + pristine_git_object: 7a5a866d01b0c0a351ac5ddc6cdb32ea3625550e src/models/openresponsesresult.ts: id: 95391b93fcbf - last_write_checksum: sha1:5bbb261dcbc187ee1138dc6f46b0e9e8347c467f - pristine_git_object: f7a44e0952c4c42ed77ff0fc44b0191f7785ce0b + last_write_checksum: sha1:a37a90adcdfff0b54f75c0c880a1ef1255c0bef0 + pristine_git_object: 665b48f03361658930ea4a53d6185c3fc9f5b287 + src/models/openrouterwebsearchservertool.ts: + id: 4d50f36832ad + last_write_checksum: sha1:c98159db61d9e89a32e2b2aa035305dfc26942e4 + pristine_git_object: 75ab0dfad01d0fe34bc88825c25bab36c841f566 src/models/operations/bulkassignkeystoguardrail.ts: id: 643ef16e0881 - last_write_checksum: sha1:ad3b95dce9bb01dad606f1f91db9a3c72f814694 - pristine_git_object: 30cd72ca87a14875aeab69b731b3a794e2bb86dd + last_write_checksum: sha1:16f1d89f7c83dff29ca08549aea584f3a1d2d237 + pristine_git_object: 7175498fd9f1f03b62e7dd9f7d867364087c88c5 src/models/operations/bulkassignmemberstoguardrail.ts: id: 5a5257c83899 - last_write_checksum: sha1:1610e53d4b0d0bd020d0c92aa4f57cfa4e1243df - pristine_git_object: f79a061b45c80aeeb2034a35b5f9f9dbd442c4a1 + last_write_checksum: sha1:ec0c106ca39be59620ff3c813f940ac9c65e55c9 + pristine_git_object: 0dfdfa26a1fb2423964529addf6c8852edf4be3e src/models/operations/bulkunassignkeysfromguardrail.ts: id: 7793ffc670a0 - last_write_checksum: sha1:b2dcce5b0c51f8d151ce9369405ec283b5aa89da - pristine_git_object: ff7e659b8b36c8c790dfd72bbed1aae0eacf2e3c + last_write_checksum: sha1:5d0793f0a87b9040375cfbdc5c0200c306efb860 + pristine_git_object: c591218b1142a39ad852b8c054e8fc79333918d6 src/models/operations/bulkunassignmembersfromguardrail.ts: id: ea6be9164914 - last_write_checksum: sha1:2238d0c87df88dcfeaa6aa30c8db2129e5477fcf - pristine_git_object: 4533c1ff5b83b562d27bc2a040723527f1eca48b + last_write_checksum: sha1:3b793ac917cf10a070530105294dca60f94e4251 + pristine_git_object: de9f7c710114cfd263def5b6b7541dadf4ba6244 src/models/operations/createauthkeyscode.ts: id: 1443f6afbf40 - last_write_checksum: sha1:13f1d47c7810dc005d1fcc6c7b730c368f0c59a8 - pristine_git_object: 86a24a47038af242f1f1e8377d22bd8e4ae1d064 - src/models/operations/createcoinbasecharge.ts: - id: 1e75ac2debf2 - last_write_checksum: sha1:63699b92eca119687bdb7d7e62baad5195533c30 - pristine_git_object: a2a9035f4eb9ed2f6b017f6c1aa5e1f1dcdc0ec8 + last_write_checksum: sha1:b87eccb1654c4a8737ed6f52237144880cc0ea21 + pristine_git_object: f6c782e14705a7835f430d989d73d9ae54551c19 src/models/operations/createembeddings.ts: id: 7c210337fdff - last_write_checksum: sha1:afbd670d14735cad9d27256b895a0cefa1c2637c - pristine_git_object: 6664d9fe1c3091988da09ab03d4a14e7eee0b8a1 + last_write_checksum: sha1:739186e25393db9765c241e043c224842b6db756 + pristine_git_object: e65e6571bab422b1a88656b9e9921051035425eb src/models/operations/createguardrail.ts: id: 36e5a2696dfd - last_write_checksum: sha1:7ad2f519c4771b18702d5e119f74a71d5fd1228c - pristine_git_object: 43a7341153eeabe7d7caf749a8a9d5ceeaf0c238 + last_write_checksum: sha1:4c668c93e119266cfdc1c46da678151673696fdf + pristine_git_object: 2a17016216d1c5f2a3eb6ea3f286bee91f40a3a8 src/models/operations/createkeys.ts: id: e7a250c8b7bb - last_write_checksum: sha1:e067d01c3f1390c8adc06edb2bc238229c2c3671 - pristine_git_object: c9a39606199b209404eb3a8dea672b6f8ae6c0c7 + last_write_checksum: sha1:f5b94ca094d5ea4371a7aabdc0fe2e042d9a7af5 + pristine_git_object: 0bb9476b790557c4ede1d831e55a50c0b8517a3b + src/models/operations/creatererank.ts: + id: e1de55b94363 + last_write_checksum: sha1:6de35ade8f4557daaaa902c8fa56d87095c760e1 + pristine_git_object: e690af47cbbbe748db34ac6efcbefde4be6bc1fc src/models/operations/createresponses.ts: id: 7ad611b27e9d last_write_checksum: sha1:9381e8cb9b2f83d1b32de49cde3180d5c22f5d98 pristine_git_object: 2e36482223e3a0954e7357a557ca36b7d675954a src/models/operations/deleteguardrail.ts: id: 767137f1b80b - last_write_checksum: sha1:43d43f0b9edad6c7eab85267ee725b0e983373b8 - pristine_git_object: 8bd9516712fe4a7233bad70f4b478f0e1ac1309e + last_write_checksum: sha1:34eda028509a37d515950793ef314624b9dde507 + pristine_git_object: 9f9996b3729c03bc6f64457f2cb9507348519276 src/models/operations/deletekeys.ts: id: efa22339a3d6 last_write_checksum: sha1:b378797761e4c19909fc8889a01dce2d230c55af @@ -3827,68 +3732,68 @@ trackedFiles: pristine_git_object: 582583b06840936f57378e254912c100f7082cf8 src/models/operations/getcurrentkey.ts: id: ddb4fa558414 - last_write_checksum: sha1:8e5e646bfa98164f5112c8f87f3928352600dd6c - pristine_git_object: 6a491a29aaff051cf8dc88baaab9a21894cba621 + last_write_checksum: sha1:c33ad31aed3e4101da116f862a249de7900ec052 + pristine_git_object: 67d5a37cbf2626ab66d99f4a558c18269fdc5c74 src/models/operations/getgeneration.ts: id: 5cdb2959d2a5 - last_write_checksum: sha1:cb27ab1561ea4952d7f6482433b495a3850f9228 - pristine_git_object: 3e8e368449091f00a066c8b57e182181ce5f86b2 + last_write_checksum: sha1:d71f2df297f404c9d3e774bddf07bbd7780a86da + pristine_git_object: fd9ed3dbe3778aa8fc683bda8542396458165315 src/models/operations/getguardrail.ts: id: 11c366ebdade - last_write_checksum: sha1:049a7b3e697632b01bcc408ef50d91f38d8863c7 - pristine_git_object: 78ba0d03d866d64a7d5ac105c83f9da0698f404c + last_write_checksum: sha1:10483864cbd03e519b3311ed617a32239f1a4a3e + pristine_git_object: 77bda268bebcc372bc07bb0c53ce6e3b7f434850 src/models/operations/getkey.ts: id: 27d0f86c087f - last_write_checksum: sha1:826ffa2b00d350654f78c75b3e3b431acd996d88 - pristine_git_object: 70043ed0cad75e83123b9e65ef4b2eeff0168f24 + last_write_checksum: sha1:b9d4e4fcaa8e4ce9aac022434f8bc65db7653688 + pristine_git_object: 21044e354b04adeab1349308bad6eb8c42e6c2e9 src/models/operations/getmodels.ts: id: f1343fbaaed5 - last_write_checksum: sha1:4f193155c4daa79ac557ce7ecb109552170b8c33 - pristine_git_object: e69ff4724376fa35c82fe44ff31700f5a583cbd9 + last_write_checksum: sha1:2f571c7bec3bb560c6b79d75699db9e2556d944b + pristine_git_object: 623a0b4650bec8c1ce524fb10823292957968930 src/models/operations/getuseractivity.ts: id: 19535b4511a4 - last_write_checksum: sha1:8e27430a1680e4a9b8eaf380ef6354b9a4a3f9a1 - pristine_git_object: 801fc3396b11ba2cc8ece8d315737cc5eaf058e2 + last_write_checksum: sha1:e1c9efdef2f64906b749d122e274238982c80944 + pristine_git_object: 8566d1dc24ae206e77b5168fa18adc5d90e8b0b4 src/models/operations/index.ts: id: 0d9ffaf774d2 - last_write_checksum: sha1:aebe69f14d17a59a12331923dc5a56eb0112dd3b - pristine_git_object: 58437e2f5a079c1eb526aa570e47d4a0ced98a55 + last_write_checksum: sha1:b3a6f4f023a0041c22d467c2a5f42ece439c3d6d + pristine_git_object: c889e5b3c54f51429e4c9db37a5a9d5fb76aacff src/models/operations/list.ts: id: ce11386ad30f - last_write_checksum: sha1:76470b82826f1c35920e9ea849b12982a7c7f4cf - pristine_git_object: c1af76dba77ada4f2c7d69335596e28ad5717bd1 + last_write_checksum: sha1:a2bf4b0cabb69114705e572df46e121dbc8a34a9 + pristine_git_object: 4b2c070884f47ac09e5cb55e460dc75b41138c6f src/models/operations/listembeddingsmodels.ts: id: 568d609eb99c last_write_checksum: sha1:3e201ad1798214c57a18f46b0791b658d369a840 pristine_git_object: 6755fab61e2a7eab563fa5a06e6d3bcdc5bb40fa src/models/operations/listendpoints.ts: id: 253a81bc10af - last_write_checksum: sha1:632b2f4445e7c55a7fa93ee851c0e39290833bb1 - pristine_git_object: 26e84519be168bcd5cfc6c2f60eeda863e389aaa + last_write_checksum: sha1:87ccd26c87d3eab2fa9f077d9a122e1f5a275a44 + pristine_git_object: f5cfb8be25fb1d43d1ba5d91bf1a64c129a125de src/models/operations/listendpointszdr.ts: id: d52e6aeefb5e last_write_checksum: sha1:cc3ac1f58f408404223743f0d9119d12c8d8f942 pristine_git_object: caa00bb10e50850762f9446f2674c7e71e3f3f58 src/models/operations/listguardrailkeyassignments.ts: id: 6e6e1963f3ec - last_write_checksum: sha1:27b158cb1499727411f1d1f80903de4a97f23267 - pristine_git_object: e5ae4cf2e332bac7498ed7bf4f273d2b06c1e6ef + last_write_checksum: sha1:a9e1879d3858ea3a84e3a89fed70667aed77f6ff + pristine_git_object: 4b2664a19ce1014a412d7ef988eb268d1ad3d6c9 src/models/operations/listguardrailmemberassignments.ts: id: f92502de471d - last_write_checksum: sha1:c9e610eb959d2d574241a58f856d46e353f08810 - pristine_git_object: a99c37c30a8fb06086b75ab7ab2abe9bd566726e + last_write_checksum: sha1:225c7aecb87bdcc2161f0566b0cd0aad91536470 + pristine_git_object: 0f4110ee7f729d784f68c176d69dab75992b726d src/models/operations/listguardrails.ts: id: 71455e4e600e - last_write_checksum: sha1:e99fe624e5e37299685d03f5a2748a8dd451f0e6 - pristine_git_object: 64618e3598bc6796aa7d04577af39dd26f66582b + last_write_checksum: sha1:54bfd8a03cc03b748a031e9bd47e0f4925e86d33 + pristine_git_object: 873a94f7bd1c19ec0ef5e1793132024d832c971e src/models/operations/listkeyassignments.ts: id: cf0d2f290052 - last_write_checksum: sha1:419579a8ac662bec00b1a6c45c43d0fc936b84b5 - pristine_git_object: 800c8962b4cae0a4da31f6384ec66676482149c6 + last_write_checksum: sha1:c2046342bf1c2ff0428ec8a087c2b450f568d159 + pristine_git_object: dd5b016db4c3304e5e36ac9b383dff46f0537fe4 src/models/operations/listmemberassignments.ts: id: 64c40f6dc5d8 - last_write_checksum: sha1:0b9e9ec197d4bff0c1303af665d024b42b344a14 - pristine_git_object: 5472421e5f9af93f80f790d0bc1636e32161a8c6 + last_write_checksum: sha1:43c6101de20a975f0412177d31650cfc01eaa446 + pristine_git_object: d5f5733470f27228f12b1ee66f485092e0e9d933 src/models/operations/listmodelscount.ts: id: 7705f49b31c9 last_write_checksum: sha1:a10ed6ed107e2cb0556f1d26145009d0847b3372 @@ -3897,6 +3802,10 @@ trackedFiles: id: 0846aac6be02 last_write_checksum: sha1:2217777fde0eff610e2bbf41fb71e2de1f27d1bc pristine_git_object: f9728e0eb32d03dd07449c4f9b306e2234724f77 + src/models/operations/listorganizationmembers.ts: + id: cc21259f09b8 + last_write_checksum: sha1:a0d5314431d068d93210e11858cf1b4eb553182b + pristine_git_object: 5c4bd662205b91207e5c6a1a72fecc0d3566a236 src/models/operations/listproviders.ts: id: 76a35169de06 last_write_checksum: sha1:da9ed71021a67f048ecc01bbca0cba5410adb0d0 @@ -3907,16 +3816,16 @@ trackedFiles: pristine_git_object: ad06e9df4beec78d6ca5bf732d1b9468615fdbef src/models/operations/updateguardrail.ts: id: f9780f5d66dd - last_write_checksum: sha1:8572313721f26bf58ad0dbf8a6ee69e876d6bc96 - pristine_git_object: 0cc62a6cb4cb2322873b0a125f382f7c46850036 + last_write_checksum: sha1:db1008af35055ff6679ab053c9b5c375bfb0b303 + pristine_git_object: 7c5dc47c0d7062c8dcb77f1dd796479fa2755c6e src/models/operations/updatekeys.ts: id: 30a0942aa2b9 - last_write_checksum: sha1:df7720fb29941d1c612ad15c113bf57b783a6839 - pristine_git_object: 668b738ba6ec3f4ebad9e81df5c66209b02108b9 + last_write_checksum: sha1:78a421bd09e19d9c9d65af2da6e80f878ac905a4 + pristine_git_object: 59fc6dbe1fb673aea39172f7188e7421c0b62abc src/models/outputdatetimeitem.ts: id: 0c1828e72f98 - last_write_checksum: sha1:2945c7e09d041bea238d1381fe4a9ea41c510591 - pristine_git_object: 37302b544f12e97f5ea06c84abf120c664f18fcb + last_write_checksum: sha1:1776637f3ba4832cfa6d92d4412de5b6cec143bb + pristine_git_object: 2582ddcc10f1fc8c921a7156000477126b5672ed src/models/outputfilesearchcallitem.ts: id: eafceec94b81 last_write_checksum: sha1:3d232cb12b3dab8a87e10a092c7cdf3f3b4d8806 @@ -3939,32 +3848,32 @@ trackedFiles: pristine_git_object: d085ed55f12340ff878f7b7641c581859f27575f src/models/outputmessage.ts: id: fa128cf87d51 - last_write_checksum: sha1:84f6d4513ab061449fa96053822825b8395c6778 - pristine_git_object: fed678820bafe7a9b216badbc7f229d6fd129505 + last_write_checksum: sha1:b56196c4af9fa0c14345f2550aa8212ab5b695a8 + pristine_git_object: 66e1365905299f6f0c9dc8bf6f460373f8a2c889 src/models/outputmessageitem.ts: id: 7eb39195329c - last_write_checksum: sha1:5bd5b4751fdbba2929a6d9c27b471fb1d63f712e - pristine_git_object: 8b41e657b76943819f9b4920e5af3adb0b3c62c2 + last_write_checksum: sha1:b1a51a807978b988b56a0b8749804ac61bf61161 + pristine_git_object: 2c3915cdcf1a16ccc8bec8d5f927714fdd66b620 src/models/outputmodality.ts: id: 6b2d2af692c7 - last_write_checksum: sha1:b16a042afff3cb76f26f14d1a3cdcd27881a39b6 - pristine_git_object: 143ff54c4ce0a9108daea0a7ac2d45f8d188925a + last_write_checksum: sha1:751836c130c4271e82b1fbc946d1d341374b4ccc + pristine_git_object: 73f67ca733f117cabf82ce6e67b695229d1c412a src/models/outputmodalityenum.ts: id: 732188d6b8fa last_write_checksum: sha1:c60a8eb3c5d5b0c30efb1316c937834461517bc9 pristine_git_object: 0c35bf9729544fdcf9a988916e7162e7843d8f96 src/models/outputreasoningitem.ts: id: 4ea30f8ad34c - last_write_checksum: sha1:bfc1cf36cb1c7b61e783e14c871e39d307da3d69 - pristine_git_object: 4c1277530fb0cd7a1e89a7920fad11c17136d522 + last_write_checksum: sha1:1eaaa43f2455c0f0bead1377f56f440ef1ec8322 + pristine_git_object: a3003723ae40042e669a8db39e5fcef5c214a361 src/models/outputservertoolitem.ts: id: ca93d8ce3ebb - last_write_checksum: sha1:b6e3ea9da8dbb30d0d4bec2965d162d56f5076e1 - pristine_git_object: 889e2de5da5da898db81301c6e45fb71aef536e2 + last_write_checksum: sha1:8c6fc8a7f3a6ccbd7f2ac54f0e156184bb8a293c + pristine_git_object: 9ecbd1c5f9ed484148ea777d89979a70db8d1248 src/models/outputwebsearchcallitem.ts: id: b4585d176186 - last_write_checksum: sha1:bd345d1ec2dbbe6e543b107c7083844828ae73ce - pristine_git_object: c671368bf6948fad2661fd4c1c378a9ebd80728e + last_write_checksum: sha1:18f9a683703b4272b8f25109f39854db5bd134f8 + pristine_git_object: 719aa46772f4c369cddbd974c6d0f3b8c2cb4409 src/models/parameter.ts: id: 066287ded212 last_write_checksum: sha1:7cb843fedcaccbbabc94189d512da6192cbf835d @@ -3987,16 +3896,16 @@ trackedFiles: pristine_git_object: dd0cc0e98d2ed1291fdb09172826da0f5af85c6a src/models/percentilelatencycutoffs.ts: id: 92e053096488 - last_write_checksum: sha1:dd5b3d55d449f6f5074572c359bdca828aea081e - pristine_git_object: aea49c29fe5fa2917845f802780ac181d3573722 + last_write_checksum: sha1:11c5451708cfdf136f3b02f483dffba308bb90cd + pristine_git_object: 7c77bcc574688579ec1c0919a5c0818997a775e0 src/models/percentilestats.ts: id: 9a6b504d3964 last_write_checksum: sha1:be5654d2818969037deb62d4b1277439e97ae0ff pristine_git_object: 9dfb13ad741f08c1d0456b01d01cb5f5047dc514 src/models/percentilethroughputcutoffs.ts: id: 847aba8ff633 - last_write_checksum: sha1:6b12d3bcc625d01a7741d60878db1dd2426b65c1 - pristine_git_object: 64350cb96504a94daf1cfb8af7facf5b479c4cf3 + last_write_checksum: sha1:0cb3dd15ad9e67da10a3b44ef318bd7f7c32901b + pristine_git_object: 35149cce1af5f6182a284389b45dc74079656f2e src/models/perrequestlimits.ts: id: 2b2b6cf6a019 last_write_checksum: sha1:b301eb57f0a4eef19f3fa62e6a3e54e44dfa3913 @@ -4011,12 +3920,12 @@ trackedFiles: pristine_git_object: d2180d165594e1e5a5cd373ad9b0e03b13acce61 src/models/preview20250311websearchservertool.ts: id: c171c186ccac - last_write_checksum: sha1:4f516aa62e3a8a99d4838cafadf380d066a3e17a - pristine_git_object: fe5f5d908eaed4de6a621c59bc98ee34896eccfc + last_write_checksum: sha1:fd226ae54cad762ea046d7e87e3ae40b27907290 + pristine_git_object: f1e847959d2a0c6b4017d015bd27268833b2e84d src/models/previewwebsearchservertool.ts: id: 6b7147491ff2 - last_write_checksum: sha1:2575d91ab8c0f0de6abbded8b07bdca68f1c8e27 - pristine_git_object: d760913ac564c4ebab018f4b84b442f3a1f9998f + last_write_checksum: sha1:12fcb6aac7c58cf3addb6464ff090f1d40a70d0b + pristine_git_object: f21c0cef764f07e45aeb4fc7cfc8e0091946a16b src/models/previewwebsearchuserlocation.ts: id: 64db0edfc37d last_write_checksum: sha1:d087b553302d4b9ad5c4c90ceadfcddbc7fcbf7b @@ -4031,8 +3940,12 @@ trackedFiles: pristine_git_object: a42994698e17df9b87b470212766b7d9a5c0ddb8 src/models/providerpreferences.ts: id: 3a47295d7b91 - last_write_checksum: sha1:0a429e4f51b40e15bb8e17d823c57ec5e118ca34 - pristine_git_object: d06fa3ea2774792231a78fd4b5130b7f17ab673f + last_write_checksum: sha1:944b2a6981a6e147378c8670d132e6a866635bf3 + pristine_git_object: 0d685586c61ac59a3544ddee5512d9e4bf7d5f7b + src/models/providerresponse.ts: + id: 7427d17a27bc + last_write_checksum: sha1:398ebe925f9b964bd28d2cced1462999e0ccb450 + pristine_git_object: cff42d77da9c52f80ed5f7101ab6b589067a4497 src/models/providersort.ts: id: 7d1e919d1ec3 last_write_checksum: sha1:4c871e5fc8af6042ca41d12c54ba8640706c0863 @@ -4043,8 +3956,8 @@ trackedFiles: pristine_git_object: fc796682165e0c6c8f0787ee2cb37c79671557f9 src/models/publicendpoint.ts: id: 396ce3186017 - last_write_checksum: sha1:b209b95d49d745546712cd8b42a5c34f9945d6c2 - pristine_git_object: 01ca674ac2af8f36e70b115e27b5bb2bffdfc5d7 + last_write_checksum: sha1:d7b4c33b9511d3c0ff8c128f4fa5de5c6fdb7365 + pristine_git_object: 69e1256e4b931dbf214492cabe2bc94bff78a064 src/models/publicpricing.ts: id: 0a44a1c3bab5 last_write_checksum: sha1:192331811f6afeda7eed73dd3b21be5ad61b7761 @@ -4055,100 +3968,112 @@ trackedFiles: pristine_git_object: 55082b7e886b01408398431244ebcf4ecef0f605 src/models/reasoningconfig.ts: id: "809170859136" - last_write_checksum: sha1:b7a44a1349140ed1d5996fd2cb6630f2d9b9467f - pristine_git_object: d471de6d3cf19f48d4efe189e1f2bf1f369fa262 + last_write_checksum: sha1:c1f83e87f4ed1f597880d9b72ed4a1a91511237f + pristine_git_object: 823db555891c048e202ff96bb0346558d792ff4b src/models/reasoningdeltaevent.ts: id: 0e129c34b701 - last_write_checksum: sha1:f72d23a436b5f6959acc261ee905bf5d2ebb9d5e - pristine_git_object: 8091842fd0625637738e6bd1d1727dd8239bddcc + last_write_checksum: sha1:93c1313e9c017977984d240c671bb0bb45da1307 + pristine_git_object: 3d2d6c4d062d70f0032f8b7f919e1edbeab994c6 src/models/reasoningdetailencrypted.ts: id: 6172b093f9ae - last_write_checksum: sha1:0f219cd7ba17f128a79037deee0d277bc35337e7 - pristine_git_object: 8f8217ed91e379bc1740b6ee7704bb2ff200e8bb + last_write_checksum: sha1:b6da61a9ea94419fa11c40261d5fbf44879cbb86 + pristine_git_object: c8c104e24bd7c209d6bf41a2993f3d105fc90208 src/models/reasoningdetailsummary.ts: id: ecc7ceb880a1 - last_write_checksum: sha1:df1a40e39c171b2410303f817256c083267ba1af - pristine_git_object: 4370c07ced3247792c34c7d25c67e0d5f01400a7 + last_write_checksum: sha1:dc5aeb12a13bb4bb7113cf64a2a59db32ff1e0de + pristine_git_object: 109570fd230bc90c8de83bb8bf232a4aede110f8 src/models/reasoningdetailtext.ts: id: 0f126d8c4950 - last_write_checksum: sha1:48ba33c3de6b350714d8e070864562b5a89c5a9e - pristine_git_object: 4735b8824cf4f59bc1f4ffdf11f4d69d378142ef + last_write_checksum: sha1:ef0404938381c8b6781dfa4b8a271883707550de + pristine_git_object: 6bd7ab2477cbca56ef2f9a63217bb161fa3aedc7 src/models/reasoningdetailunion.ts: id: 688738e07ecb - last_write_checksum: sha1:1bfd2cf95a930e0670fb3cc1ba1fa39226dcf467 - pristine_git_object: 08cb14ea2d94a964554164b751fa8fd248a552b8 + last_write_checksum: sha1:7c586ba0a5b2a1a3f3dbceb3eaefc5b04c5f9f28 + pristine_git_object: eb264380250120050afc2abbbd0ae220a95ec22d src/models/reasoningdoneevent.ts: id: 3af93f83e103 - last_write_checksum: sha1:6d5a217b607ffe8ae6744145b4ba768bd3bd7033 - pristine_git_object: 2f44cfa09d3e57a895b4e2d3edd2e175c949a676 - src/models/reasoningeffortenum.ts: - id: 9559eb443bab - last_write_checksum: sha1:24a2af459ddf92caf22c9b20b1e7b9a249af889b - pristine_git_object: 931b6ef96f348e69a8a36e7212bab38e14354b94 + last_write_checksum: sha1:ee347b3d53ecb000fbd9a29d32e6404b519f1b15 + pristine_git_object: 2019f7c637ad995f45f930771cc5e1172f1fed5c + src/models/reasoningeffort.ts: + id: dd747014f9d3 + last_write_checksum: sha1:593d1493673d94ff08828b62dbd88afe4ac9dc11 + pristine_git_object: 2804617c189acf4c4571cbc5d10d9178065ff537 + src/models/reasoningformat.ts: + id: b523cf757168 + last_write_checksum: sha1:6c79374859b23c316ee6595995d1bfcb767cbc8e + pristine_git_object: 4e550e5c0d780a52de16687592e354d1a8835685 src/models/reasoningitem.ts: id: 347a000c48b1 - last_write_checksum: sha1:c7f60dae767ba9e8529fbe5c7af2d4b090132df2 - pristine_git_object: 0c680d0f7ef96b3aee6b95b450878ae606755221 + last_write_checksum: sha1:d292308cbd094aac0facce7552af707acc595e03 + pristine_git_object: 709e9e74a3263319ca89d90a765ad57d0c6fc350 src/models/reasoningsummarypartaddedevent.ts: id: aca3bffec6c2 - last_write_checksum: sha1:7ebd5799f0e8cb90b4960d307874d3754513bc3f - pristine_git_object: 1cda44b26467b24141f7a83dcd8b2b136a7cb8bc + last_write_checksum: sha1:4ca7079e0a7efb16e04acf7080dfd77a8f77a3cb + pristine_git_object: 13e17b8fb091544b57bd8db284b22262e2201d9a src/models/reasoningsummarypartdoneevent.ts: id: 5917fb728157 - last_write_checksum: sha1:9b7b1bf8efd2c63a2f62d1a95537ba32785b06f1 - pristine_git_object: 851b09e981cce9419895d2f32ef52b7eff2b61f1 + last_write_checksum: sha1:b40e180f519467e51653d2484a862348f621725f + pristine_git_object: 08abf7fb47b9df601c6821672b0957256168dbb1 src/models/reasoningsummarytext.ts: id: 9c06c18de6d6 last_write_checksum: sha1:a4cad2def2f1c17142fb524927190f0d3e571037 pristine_git_object: b9720f5172dfa1efaf77e3c0adb991bbf994c989 src/models/reasoningsummarytextdeltaevent.ts: id: 888dc7b3074b - last_write_checksum: sha1:2b5eaeab864cfefc6111b408f17eb08c8b68cc5e - pristine_git_object: b93846ca93b6fad2658bdc70a8d28dde71bdbc71 + last_write_checksum: sha1:6e697a3d14eeaa34596009c93a73750e70dba504 + pristine_git_object: 99a2bf345ca99db15ee05fdf447ad4c1b2cdf270 src/models/reasoningsummarytextdoneevent.ts: id: 4945c757d284 - last_write_checksum: sha1:b18d0b03fa05edc580bbd901b22f2dee70d26890 - pristine_git_object: 61d4c4f14b1cfadf24a77ea0388377608278a649 - src/models/reasoningsummaryverbosityenum.ts: - id: 2d2055f25ddc - last_write_checksum: sha1:1421658276689c45fe815ece0d5676f799442195 - pristine_git_object: d24150d510eb10872fabcd8878999aef3a05d9e8 + last_write_checksum: sha1:e2ee0d8606536c1699df269ac51417914a91ae67 + pristine_git_object: d4dff946ed594809ca2358425a07fd7bbf78077f + src/models/reasoningsummaryverbosity.ts: + id: a51c85f04729 + last_write_checksum: sha1:70be5cfadcb8aa43583833971df69cfe5906cf00 + pristine_git_object: 58291795f0be63e21552ef0e336261f55bb838d5 src/models/reasoningtextcontent.ts: id: e5520210e3cb last_write_checksum: sha1:5e2ef062b80ea5cc465273c9869b3b311a42ba15 pristine_git_object: 10912a9034bd83a2a205dbf4a1ccb1a87f2ec857 src/models/refusaldeltaevent.ts: id: 31c52296d4c7 - last_write_checksum: sha1:3ee4819122883d0767e546fc19fa39fe447ddd93 - pristine_git_object: 72b72f161debde088d03f6d4e09ec24ff76dc843 + last_write_checksum: sha1:67539f4a5d5345981744f5f5cbb1e7b8417ed9e2 + pristine_git_object: ca05f7493325a080812f5e0884ab18822da50877 src/models/refusaldoneevent.ts: id: cd0c3a7b56ac - last_write_checksum: sha1:51652504b0b6794810e2c7bf2439355bc7bae43a - pristine_git_object: 16621be53530726fa299b6f48a45469d69f883c3 + last_write_checksum: sha1:40be839d51d60d444c432beb636b3873b8bc259e + pristine_git_object: b842190427c4d1e2c154b7e3c08b76d8b9cad921 src/models/requesttimeoutresponseerrordata.ts: id: a08eeff8786c last_write_checksum: sha1:5429dbc4ea062c63e6dc613d74c3ece63f218903 pristine_git_object: c9eac87a0c41f81c8ab40f4634f943a0a896ae59 + src/models/responsehealingplugin.ts: + id: 622c12ba88e2 + last_write_checksum: sha1:61e439043804da9cbcc7966ceccbbeef02a06fea + pristine_git_object: 3433a1920b922d26449740f9295bfc5f6a82a5d4 src/models/responseincludesenum.ts: id: 49a048777535 last_write_checksum: sha1:1154aedcb4b10ba7a8d4b16b45bedb972722d73c pristine_git_object: 33d47e19f0200a85706d11076402b5e2f59979c6 src/models/responseoutputtext.ts: id: 2d5e61e53c46 - last_write_checksum: sha1:6794eb8e5293078f7089b91d9d5eea31a1a4e7e0 - pristine_git_object: d97cb1151c0000e18226f0bc7a217e1d74972751 + last_write_checksum: sha1:b4bb7c4b30e5383d725018d385924e911e19d2bd + pristine_git_object: ae3795d4312a1ca9f27fe973a7c8bc96ff845c6a src/models/responseserrorfield.ts: id: 830ea3d3b590 last_write_checksum: sha1:c297c3d3db7622fc157822291aeba52308394941 pristine_git_object: 584f66cd23f2e112b14f8d0b23aea1cd4532c412 src/models/responsesrequest.ts: id: 39799702f982 - last_write_checksum: sha1:8023395d72aa2897d7f1e1b734b82cb5124f6b83 - pristine_git_object: 0b44340df6adbd6f7bcf9ba9be39e09a9bd5a751 + last_write_checksum: sha1:1625123aafa7f23195933eb9cd481883bf6406e2 + pristine_git_object: cb8afba7e3839d6f27bbdf8f9c161aaa43f2903b src/models/searchcontextsizeenum.ts: id: d76263d711fe last_write_checksum: sha1:84b915e8d44e263ab6436d727663d69caa799149 pristine_git_object: 59040b90a79f43fd75d693a44b2911a6fbaf63ff + src/models/searchqualitylevel.ts: + id: 3f28e436c1e6 + last_write_checksum: sha1:efbd3397588aeb3e563cdc8ccc4b3b72c6519ba1 + pristine_git_object: 4a8a3b533176cca3ba1c7676b96960270e7a0eed src/models/security.ts: id: d90c6c784ca5 last_write_checksum: sha1:90d7a8903f46cd2ea5428527343a003511fc78c9 @@ -4167,40 +4092,76 @@ trackedFiles: pristine_git_object: 9b47a83e44ed6bdfaf6ba88030021fe7a1f6a5ad src/models/streamevents.ts: id: 4aa1487f961f - last_write_checksum: sha1:f92f34b44f76e4fab102d5d942823547806a96aa - pristine_git_object: a6ae14458583d0b69a7794196097df93897613a6 + last_write_checksum: sha1:c3d08c5666efcd243ddd4e0eb25c589ec30e0718 + pristine_git_object: 9621bd92a595bc14481a39a76cdcc25c807ecc4f + src/models/streameventsresponsecompleted.ts: + id: f7fe07ad1c47 + last_write_checksum: sha1:44cd9b2e424791620cc7e60dadaab84908e33c69 + pristine_git_object: f18119193c4a43dd647aa56497cf4756f3a5d25e + src/models/streameventsresponsefailed.ts: + id: 63748aa9f88e + last_write_checksum: sha1:9b1a43dc709b078c8c4dd34e50aee11d6a88c776 + pristine_git_object: 7159e485a8a0cacc604adaf88577b56a9e89e9f1 + src/models/streameventsresponseincomplete.ts: + id: 56f3a5c4a544 + last_write_checksum: sha1:3d9a61b0df1b90f86c4f6e40a97747900e240c10 + pristine_git_object: 245b73641dc9a21e743dfe429a5c9f30c544d87c + src/models/streameventsresponseoutputitemadded.ts: + id: 16cdc9efe2b8 + last_write_checksum: sha1:45d3331ce2a89495a08a5209ed356fb6011b3dc3 + pristine_git_object: ff42b17820533f503c31b50e3e078d7b2ce132cc + src/models/streameventsresponseoutputitemdone.ts: + id: cef4030a60c2 + last_write_checksum: sha1:32c65f48551f50a8847138a1db63ef83a479707c + pristine_git_object: 762a2fb7109a319d4236deff552f452e9444decc + src/models/streamlogprob.ts: + id: 3d401204f1ef + last_write_checksum: sha1:803003629be8d3893f6800c20a4aae21b9cbbdbe + pristine_git_object: 53d54a6d8b13f05a63ccd425465c2b59ecdcf485 + src/models/streamlogprobtoplogprob.ts: + id: 3b88c304514b + last_write_checksum: sha1:8af2887d40e2adb9e141c224a6540c82b5cd24d7 + pristine_git_object: 7fda0124e1121a73693b5a99c086a9af7777ec5f src/models/textconfig.ts: id: 1a4d7bc40860 last_write_checksum: sha1:59d2f46170638f47bf89ff0e94fb358bfd2ff8e0 pristine_git_object: 566b894a88c07c7d7f790fc56cd7fc2a76e5175a src/models/textdeltaevent.ts: id: 920ea48e0f90 - last_write_checksum: sha1:c13c3154d5f92f0cdbd7a67048c0db8d43f5894e - pristine_git_object: d8de434cfb83d1b5cc40dfb7cfb829f1f0cb21df + last_write_checksum: sha1:eea0f7cc0c3eae3e11d9a0848e2dad479f254c6b + pristine_git_object: 2d405f2c1254a513886efb744e2cbe5a9af9d88c src/models/textdoneevent.ts: id: 006e3645c287 - last_write_checksum: sha1:548245eef1a0493aafd7ea14138a708fa3439370 - pristine_git_object: c18cadab0335ee909e99aba52d8b2b7b265fbf04 + last_write_checksum: sha1:0bf87c4c60d604d84070f3d5777cfc0b164d8d76 + pristine_git_object: 39082bc8214b6cdb89716fe4c3996ba11954e221 src/models/textextendedconfig.ts: id: e264e7981200 last_write_checksum: sha1:1145008ffa386acff5fcc8912460e1ff1af807f2 pristine_git_object: dc6dfb6e5dc8b661749353870fd2bc11f9685fe3 - src/models/toolcallstatusenum.ts: - id: bbb08fcb13ab - last_write_checksum: sha1:ab818b9f6b6366511cc83ca4d358575a3cf0eafe - pristine_git_object: 8e2fd64df28db96fff31caad799f1c863bb568c0 + src/models/toolcallstatus.ts: + id: 54eb9c06bedb + last_write_checksum: sha1:28d8c73463fd784616838c285a0cf5a6b83b7b4c + pristine_git_object: 1585e3f90f3f774a0b955cb671e7745c5b95473b + src/models/toolchoiceallowed.ts: + id: 82ee236509d6 + last_write_checksum: sha1:d6644ec862ec45a911699e97eaa0fd456af7592d + pristine_git_object: 1fc49da113c6ca4c28c7698dd5e7790f1b47947d src/models/toomanyrequestsresponseerrordata.ts: id: ff9492357bd9 last_write_checksum: sha1:0ec65f87b4b129d107d23eab65206c26f7f80435 pristine_git_object: 5b47d7723fc7f54b5f961411306204d8424e080d src/models/topproviderinfo.ts: id: 7439c7b1a9c6 - last_write_checksum: sha1:ffdff42721b0cfc90d8fc96c63044624dad078bb - pristine_git_object: c95a2f1288611c754ac2958146966badc90c5c6e - src/models/truncationenum.ts: - id: 2e68448c1324 - last_write_checksum: sha1:97c17927c32eb81231d693f5882bdc7d38631be2 - pristine_git_object: 8e78e3725915400f511b3a94d677b2f57122ece8 + last_write_checksum: sha1:a445f125ed5c22afba120582f5dc7a32276f8c7e + pristine_git_object: 51d07ed21cbcf109a56fb270077e88067648748f + src/models/traceconfig.ts: + id: 50ce6e8a7bcd + last_write_checksum: sha1:f176bee8362b5cee52ba54854f8dca30cf56e6a9 + pristine_git_object: 1f176fb41411b6258eefb34c2800ba2a081aa3a4 + src/models/truncation.ts: + id: 8aa9a16a7a40 + last_write_checksum: sha1:66ad3376d9c0bc83987301af9b72eb6b68a598c9 + pristine_git_object: 26483639719d22695028d8bc8db5643386bf9eab src/models/unauthorizedresponseerrordata.ts: id: d335c48e0c3e last_write_checksum: sha1:0aeb2103469f3dad0c04196c8470d851d7e09142 @@ -4209,38 +4170,66 @@ trackedFiles: id: "557063315301" last_write_checksum: sha1:77a2c2515bda14c3d700340277b8762cb0067688 pristine_git_object: 0c68c6962a0dde28d6804dadfb3385c965f10c96 + src/models/updateguardrailrequest.ts: + id: 8ae5b029f2d5 + last_write_checksum: sha1:5539e074c36d4ab87d417947664bb9d3bbc13f56 + pristine_git_object: b7773270a871b088411d5ed56649b50eb0ce6740 + src/models/updateguardrailresponse.ts: + id: a1debd60e96d + last_write_checksum: sha1:818ca8d0fdd11a7a768a396708b84b5e171d73c1 + pristine_git_object: 62e472e9b880f14ff6a0433cd58068fead471355 src/models/urlcitation.ts: id: ccd6ecd62c64 - last_write_checksum: sha1:3b6e62096e04ba3049c1cf2ee72ec591f45dfbaa - pristine_git_object: 4d03e2fd769dbe3f2c6bde3ac3f642a1343ebafd + last_write_checksum: sha1:ebb04427f7de520096ec6cddfc3d2554d4576406 + pristine_git_object: 562276b23c64188453ed3093d9e699b29aa773dd src/models/usage.ts: id: 7d556ab96faf - last_write_checksum: sha1:5a6970fd7f65151d318bc4ec981faefa361bc63e - pristine_git_object: 8ca3e5ee28e8a4fadf412c8e9f6c696b503a453e + last_write_checksum: sha1:0a8b0eb47e5026ce227c340ff928c6ee52c1fedb + pristine_git_object: 979fd10997c8e75696e8d8da33c785d87d261f33 src/models/websearchcallcompletedevent.ts: id: 5137f6f83524 - last_write_checksum: sha1:92dda5436088e9b8f4dee93f10af8f6b13bf3eae - pristine_git_object: 0a723e66919f312123b63e590b1d2bba8e71bbc7 + last_write_checksum: sha1:88460909de76937ca5fab75877a274e3526a2b7b + pristine_git_object: 9634bf7d187e79672d2c8aba9f5b84169c2ea398 src/models/websearchcallinprogressevent.ts: id: faa6555bfcd9 - last_write_checksum: sha1:00fdd33dd080dfc05865a9f47ea37bd52a1209c9 - pristine_git_object: 4bd03e619a44af567fec7009e873bc5ba67ffece + last_write_checksum: sha1:613240ee2e978de8ed9f66261cc652be00357ea2 + pristine_git_object: 4b3b19e44191a00013ec9833e2877c955eb3db09 src/models/websearchcallsearchingevent.ts: id: 337a384e39d8 - last_write_checksum: sha1:3cf520837aec229a32bcbf3515aff546c585a631 - pristine_git_object: 38991ae479317a6589d10ffce553280c0bccd62a + last_write_checksum: sha1:d998383eeb5c603555f79b70abe8726c2e2d3612 + pristine_git_object: 8dba9bfb2e4f48249755171879aa5d9a62ea9ef9 + src/models/websearchconfig.ts: + id: d43f37b9a707 + last_write_checksum: sha1:f2b82bc98253b4e5526bad553dbbf9231160c091 + pristine_git_object: acdb34ae4fff5789197285b321fc416bf69dfb44 + src/models/websearchdomainfilter.ts: + id: 827204408f55 + last_write_checksum: sha1:40de66ff4e761250806be0246ec0489047df7e3e + pristine_git_object: 709be924e0fcec6af68d3cb34d510b82015b3680 src/models/websearchengine.ts: id: 49b0152fd59a last_write_checksum: sha1:8166273041939c547eedf9139646a9eabfd6d963 pristine_git_object: bda19371ea861d782af3c093e476c97d62a6fc20 + src/models/websearchengineenum.ts: + id: 273c8df02654 + last_write_checksum: sha1:d0bb4b1871045106bddfd371a93f3bfe9641259b + pristine_git_object: 309d906f5b5808e3f8dfb750c1ea4aa0d5690d8d + src/models/websearchplugin.ts: + id: fa32581277e2 + last_write_checksum: sha1:77f1ce5f2f98cb3a8c40675c8edeccee24e91408 + pristine_git_object: e9b1b92467223ba71ae9e0262c2d90ef1a8bc4a2 src/models/websearchservertool.ts: id: 3f6589dedf90 - last_write_checksum: sha1:ae01b9a661d07d2bc187a89a4ce1e48805a6e1f3 - pristine_git_object: cd9a854fa704f81a52085d3032bc35828538320d + last_write_checksum: sha1:9f1042d5282824e7887b5d9e651b7dbc14d42e03 + pristine_git_object: 662d6ece19953e30ab400fd96968a2a843746c22 src/models/websearchservertoolopenrouter.ts: id: 99dffefc1c11 - last_write_checksum: sha1:32f5fd30ac64fa83d6829f832640909e9c82ec95 - pristine_git_object: 4b851e48203cea7abcea2a23e986b2d486b2dd85 + last_write_checksum: sha1:71cafe7ba5c44194eeac6f0fd0ae975ed19eb42a + pristine_git_object: 5c675ea7bd3da9fbfef4c98f7fc50758e2edacd8 + src/models/websearchsource.ts: + id: 2a64353a399c + last_write_checksum: sha1:756ce4b7c63064c3d03e6e20cc563e03c3d00036 + pristine_git_object: d37ecd977175551b72728a31daf2726b6f595fa7 src/models/websearchstatus.ts: id: 55795920a937 last_write_checksum: sha1:cf0c6874146a4be7c3d9cc08e2ae7eb22a0d5691 @@ -4249,10 +4238,14 @@ trackedFiles: id: cc946a3064e3 last_write_checksum: sha1:2e1c67212e9e3a10710ad47b807d47ebf05f6ac7 pristine_git_object: 8c7959788158956d9d3b925f5d57d9ec88c6ae53 + src/models/websearchuserlocationservertool.ts: + id: d1b6cb4026ad + last_write_checksum: sha1:f877ced01e8d52640aa16fdf755d11838076825d + pristine_git_object: 51140ef24985eadadc26208f7cb54cf4bf2396ed src/sdk/analytics.ts: id: 411d91261be3 - last_write_checksum: sha1:f38f7f057f9b0f1a6dd2be2a2c6a78a3f36305bf - pristine_git_object: 9e2e17881caf43605e8b2614ca74a110d8427d34 + last_write_checksum: sha1:338921c07b58f6f719072a86a0aead6e734cac38 + pristine_git_object: 353e5a5896f3dff83490742b4d78da51d6ffc992 src/sdk/apikeys.ts: id: 5dda931501e1 last_write_checksum: sha1:d86e3cdd6b29b45749007e9603e6bab7f3d58981 @@ -4267,8 +4260,8 @@ trackedFiles: pristine_git_object: be2dd27c7af4e9c73097fc2daf24627e7db9936c src/sdk/credits.ts: id: c72074b5f165 - last_write_checksum: sha1:3b225301fa5aa4892bab943123f1c3a4d9db2adf - pristine_git_object: 0241639405af35aa2227d354134864e039d72544 + last_write_checksum: sha1:09ba049248259aa5bd8916df45ec4faf7967152e + pristine_git_object: 02d1a2d408eca05a63439bdb65dfda8821f141fd src/sdk/embeddings.ts: id: 70cbb18bedaf last_write_checksum: sha1:e62ce45c27f12941ae5ec7e458b87952db3cedba @@ -4283,8 +4276,8 @@ trackedFiles: pristine_git_object: ebd85c57507e8982774ccd26c3d9efe4a727bb90 src/sdk/guardrails.ts: id: 30ab0b1cc8db - last_write_checksum: sha1:779db9249603fdf3f3cf0bdeaa6926853fd5b3c0 - pristine_git_object: 3ea2dbba5bf84c767a653728e918ca485246f42c + last_write_checksum: sha1:84126d52261b8ce059ea5966669b8a1810805fcf + pristine_git_object: b7a5eecf1c18ee9b2e273120795416d5072b8cd7 src/sdk/index.ts: id: a857902a703f last_write_checksum: sha1:54cdd8319bfbee269b54b8c56988fc0a678f2ec3 @@ -4297,18 +4290,26 @@ trackedFiles: id: 37b7f9b2970b last_write_checksum: sha1:9066fa7baf0b904ca1aa96b654fbc79b3d6c3236 pristine_git_object: 12f35868fad83b3b6ce20fa340d2d9f8df7bbbd1 + src/sdk/organization.ts: + id: 976de6f449fe + last_write_checksum: sha1:f199f99888476f495050eee5fbc18808226350b1 + pristine_git_object: b64a11106ed376ea785395121eb7c011ea22f906 src/sdk/providers.ts: id: fb8faa7013d0 last_write_checksum: sha1:80c337cdcdfb182fcaa124dd2e1c62947faf74cf pristine_git_object: e08f75b3c721372a101b55d897fe6faff003deec + src/sdk/rerank.ts: + id: 0d5a42c2eac3 + last_write_checksum: sha1:06331346ae4668adf5852b57804354b99a0ffcf7 + pristine_git_object: 9cedd8f2ef4318c8e5d75e7a563b6732f4dabfee src/sdk/responses.ts: id: fc4b535757c5 last_write_checksum: sha1:66e90f739309d9df418df0a157059b0f9de2a228 pristine_git_object: 143b7b9e6a282d3c16648723c59648b335491972 src/sdk/sdk.ts: id: 784571af2f69 - last_write_checksum: sha1:db09fd807941a64443978892e374392e670e4adb - pristine_git_object: c838f2bd4341e9fc0e3dd7bef95e7630ae65185e + last_write_checksum: sha1:9be0b164768252c5a5e50aa0ac731497c9c6a967 + pristine_git_object: 78e15bab8f965e856b55e9ccd499b25cf8b99234 src/types/async.ts: id: fac8da972f86 last_write_checksum: sha1:e2a7c53b428567587741f38e6da489f596de6227 @@ -4364,7 +4365,7 @@ examples: application/json: {"store": false, "service_tier": "auto", "stream": false} responses: "200": - application/json: {"id": "resp-abc123", "object": "response", "created_at": 1704067200, "model": "gpt-4", "status": "completed", "completed_at": 2510.63, "output": [{"type": "message", "status": "completed"}], "error": null, "incomplete_details": null, "temperature": null, "top_p": null, "presence_penalty": 7468.94, "frequency_penalty": 3967.09, "instructions": null, "metadata": null, "tools": [], "tool_choice": "auto", "parallel_tool_calls": true} + application/json: {"id": "resp-abc123", "object": "response", "created_at": 1704067200, "model": "gpt-4", "status": "completed", "completed_at": 2510.63, "output": [{"type": "message", "status": "completed"}], "error": null, "incomplete_details": null, "temperature": 9442.28, "top_p": 2510.63, "presence_penalty": 7468.94, "frequency_penalty": 3967.09, "instructions": null, "metadata": null, "tools": [], "tool_choice": "auto", "parallel_tool_calls": true} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "401": @@ -4404,10 +4405,12 @@ examples: application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} sendChatCompletionRequest: speakeasy-default-send-chat-completion-request: requestBody: - application/json: {"messages": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "What is the capital of France?"}], "stream": false, "temperature": 0.7, "top_p": 1} + application/json: {"messages": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "What is the capital of France?"}], "stream": false} responses: "200": application/json: {"id": "chatcmpl-123", "choices": [{"finish_reason": "stop", "index": 0, "message": {"role": "assistant"}}], "created": 1677652288, "model": "openai/gpt-4", "object": "chat.completion", "system_fingerprint": "fp_44709d6fcb"} @@ -4466,10 +4469,10 @@ examples: createEmbeddings: speakeasy-default-create-embeddings: requestBody: - application/json: {"input": "", "model": "Taurus"} + application/json: {"input": "The quick brown fox jumps over the lazy dog", "model": "openai/text-embedding-3-small"} responses: "200": - application/json: {"object": "list", "data": [], "model": "Model S"} + application/json: {"object": "list", "data": [{"object": "embedding", "embedding": [0.0023064255, -0.009327292, 0.015797347]}], "model": "openai/text-embedding-3-small"} text/event-stream: "" "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} @@ -4495,7 +4498,7 @@ examples: speakeasy-default-list-embeddings-models: responses: "200": - application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]} + application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null, "links": {"details": "/api/v1/models/openai/gpt-5.4/endpoints"}}]} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "500": @@ -4537,7 +4540,7 @@ examples: speakeasy-default-get-models: responses: "200": - application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]} + application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null, "links": {"details": "/api/v1/models/openai/gpt-5.4/endpoints"}}]} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "500": @@ -4546,7 +4549,7 @@ examples: speakeasy-default-list-models-user: responses: "200": - application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]} + application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null, "links": {"details": "/api/v1/models/openai/gpt-5.4/endpoints"}}]} "401": application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "404": @@ -4561,7 +4564,7 @@ examples: slug: "" responses: "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_id": "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}}]}} + 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_id": "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, "uptime_last_5m": 100, "uptime_last_1d": 99.8, "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": application/json: {"error": {"code": 404, "message": "Resource not found"}} "500": @@ -4570,7 +4573,7 @@ examples: speakeasy-default-list-endpoints-zdr: responses: "200": - application/json: {"data": [{"name": "OpenAI: GPT-4", "model_id": "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": 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}}]} + application/json: {"data": [{"name": "OpenAI: GPT-4", "model_id": "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, "uptime_last_5m": 100, "uptime_last_1d": 99.8, "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}}]} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} listProviders: @@ -4739,7 +4742,7 @@ examples: speakeasy-default-list-key-assignments: responses: "200": - application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "key_hash": "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "key_name": "Production Key", "key_label": "prod-key", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 25} + application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "key_hash": "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "key_name": "Production Key", "key_label": "prod-key", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 1} "401": application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "500": @@ -4748,7 +4751,7 @@ examples: speakeasy-default-list-member-assignments: responses: "200": - application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "user_id": "user_abc123", "organization_id": "org_xyz789", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 10} + application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "user_id": "user_abc123", "organization_id": "org_xyz789", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 1} "401": application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "500": @@ -4760,7 +4763,7 @@ examples: id: "550e8400-e29b-41d4-a716-446655440000" responses: "200": - application/json: {"data": [], "total_count": 25} + application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "key_hash": "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "key_name": "Production Key", "key_label": "prod-key", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 1} "401": application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "404": @@ -4792,7 +4795,7 @@ examples: id: "550e8400-e29b-41d4-a716-446655440000" responses: "200": - application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "user_id": "user_abc123", "organization_id": "org_xyz789", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 10} + application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "user_id": "user_abc123", "organization_id": "org_xyz789", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 1} "401": application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "404": @@ -4881,4 +4884,43 @@ examples: application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + listOrganizationMembers: + speakeasy-default-list-organization-members: + responses: + "200": + application/json: {"data": [{"id": "user_2dHFtVWx2n56w6HkM0000000000", "first_name": "Jane", "last_name": "Doe", "email": "jane.doe@example.com", "role": "org:member"}], "total_count": 25} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + createRerank: + speakeasy-default-create-rerank: + requestBody: + application/json: {"model": "cohere/rerank-v3.5", "query": "What is the capital of France?", "documents": ["Paris is the capital of France.", "Berlin is the capital of Germany."]} + responses: + "200": + application/json: {"model": "cohere/rerank-v3.5", "results": [{"index": 0, "relevance_score": 0.98, "document": {"text": "Paris is the capital of France."}}]} + text/event-stream: "" + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "402": + application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "429": + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "502": + application/json: {"error": {"code": 502, "message": "Provider returned error"}} + "503": + application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}} + "524": + application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} + "529": + application/json: {"error": {"code": 529, "message": "Provider returned error"}} examplesVersion: 1.0.2 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index e3cca687..59af368b 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: skipResponseBodyAssertions: false preApplyUnionDiscriminators: true typescript: - version: 0.11.2 + version: 0.12.0 acceptHeaderEnum: false additionalDependencies: dependencies: @@ -95,7 +95,7 @@ typescript: flatteningOrder: parameters-first formStringArrayEncodeMode: encoded-string forwardCompatibleEnumsByDefault: false - forwardCompatibleUnionsByDefault: "tagged-only" + forwardCompatibleUnionsByDefault: tagged-only generateExamples: true imports: option: openapi diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index fd9757e6..ab956629 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -5863,48 +5863,48 @@ components: - enabled example: enabled: true - AnthropicBase64PDFSource: + AnthropicBase64PdfSource: type: object properties: - data: + type: type: string + enum: + - base64 media_type: type: string enum: - application/pdf - type: + data: type: string - enum: - - base64 required: - - data - - media_type - type + - media_type + - data example: - data: JVBERi0x... - media_type: application/pdf type: base64 - AnthropicPlainTextSourceResponse: + media_type: application/pdf + data: JVBERi0x... + AnthropicPlainTextSource: type: object properties: - data: + type: type: string + enum: + - text media_type: type: string enum: - text/plain - type: + data: type: string - enum: - - text required: - - data - - media_type - type + - media_type + - data example: - data: Hello, world! - media_type: text/plain type: text + media_type: text/plain + data: Hello, world! AnthropicDocumentBlock: type: object properties: @@ -5912,8 +5912,8 @@ components: $ref: '#/components/schemas/AnthropicCitationsConfig' source: anyOf: - - $ref: '#/components/schemas/AnthropicBase64PDFSource' - - $ref: '#/components/schemas/AnthropicPlainTextSourceResponse' + - $ref: '#/components/schemas/AnthropicBase64PdfSource' + - $ref: '#/components/schemas/AnthropicPlainTextSource' title: type: string nullable: true @@ -7688,7 +7688,7 @@ components: example: max_results: 5 search_context_size: medium - MessagesWebSearchServerTool: + OpenRouterWebSearchServerTool: type: object properties: type: @@ -7810,48 +7810,6 @@ components: type: base64 media_type: image/jpeg data: /9j/4AAQ... - AnthropicBase64PdfSource: - type: object - properties: - type: - type: string - enum: - - base64 - media_type: - type: string - enum: - - application/pdf - data: - type: string - required: - - type - - media_type - - data - example: - type: base64 - media_type: application/pdf - data: JVBERi0x... - AnthropicPlainTextSource: - type: object - properties: - type: - type: string - enum: - - text - media_type: - type: string - enum: - - text/plain - data: - type: string - required: - - type - - media_type - - data - example: - type: text - media_type: text/plain - data: Hello, world! AnthropicUrlPdfSource: type: object properties: @@ -8394,7 +8352,7 @@ components: - type - name - $ref: '#/components/schemas/DatetimeServerTool' - - $ref: '#/components/schemas/MessagesWebSearchServerTool' + - $ref: '#/components/schemas/OpenRouterWebSearchServerTool' tool_choice: oneOf: - type: object @@ -9876,23 +9834,6 @@ components: - $ref: '#/components/schemas/ChatNamedToolChoice' description: Tool choice configuration example: auto - ChatWebSearchServerTool: - type: object - properties: - type: - type: string - enum: - - openrouter:web_search - parameters: - $ref: '#/components/schemas/WebSearchConfig' - required: - - type - description: 'OpenRouter built-in server tool: searches the web for current information' - example: - type: openrouter:web_search - parameters: - engine: auto - max_results: 5 ChatWebSearchShorthand: type: object properties: @@ -10001,7 +9942,7 @@ components: - type - function - $ref: '#/components/schemas/DatetimeServerTool' - - $ref: '#/components/schemas/ChatWebSearchServerTool' + - $ref: '#/components/schemas/OpenRouterWebSearchServerTool' - $ref: '#/components/schemas/ChatWebSearchShorthand' description: Tool definition for function calling (regular function or OpenRouter built-in server tool) example: diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 14989249..04198e89 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -30,6 +30,7 @@ components: - failed - cancelled - queued + example: completed x-speakeasy-unknown-values: allow FileCitation: type: object @@ -43,7 +44,7 @@ components: filename: type: string index: - type: number + type: integer required: - type - file_id @@ -66,9 +67,9 @@ components: title: type: string start_index: - type: number + type: integer end_index: - type: number + type: integer required: - type - url @@ -91,7 +92,7 @@ components: file_id: type: string index: - type: number + type: integer required: - type - file_id @@ -105,6 +106,11 @@ components: - $ref: '#/components/schemas/FileCitation' - $ref: '#/components/schemas/URLCitation' - $ref: '#/components/schemas/FilePath' + example: + type: file_citation + file_id: file-abc123 + filename: research_paper.pdf + index: 0 ResponseOutputText: type: object properties: @@ -128,9 +134,10 @@ components: bytes: type: array items: - type: number + type: integer logprob: type: number + format: double top_logprobs: type: array items: @@ -141,9 +148,10 @@ components: bytes: type: array items: - type: number + type: integer logprob: type: number + format: double required: - token - bytes @@ -279,6 +287,19 @@ components: example: type: summary_text text: Analyzed the problem using first principles + ReasoningFormat: + type: string + nullable: true + enum: + - unknown + - openai-responses-v1 + - azure-openai-responses-v1 + - xai-responses-v1 + - anthropic-claude-v1 + - google-gemini-v1 + - null + example: unknown + x-speakeasy-unknown-values: allow OutputItemReasoning: type: object properties: @@ -336,18 +357,7 @@ components: 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 + $ref: '#/components/schemas/ReasoningFormat' example: id: reasoning-123 type: reasoning @@ -404,11 +414,27 @@ components: - type: object properties: {} example: + id: fc-abc123 type: function_call - id: call-abc123 - name: get_weather - arguments: '{"location":"San Francisco","unit":"celsius"}' call_id: call-abc123 + name: get_weather + arguments: '{"location":"San Francisco"}' + status: completed + WebSearchSource: + type: object + properties: + type: + type: string + enum: + - url + url: + type: string + required: + - type + - url + example: + type: url + url: https://example.com/article WebSearchStatus: type: string enum: @@ -444,17 +470,7 @@ components: sources: type: array items: - type: object - properties: - type: - type: string - enum: - - url - url: - type: string - required: - - type - - url + $ref: '#/components/schemas/WebSearchSource' required: - type - query @@ -503,11 +519,8 @@ components: - type: object properties: {} example: + id: ws-abc123 type: web_search_call - id: search-abc123 - action: - type: search - query: OpenAI API status: completed OutputItemFileSearchCall: type: object @@ -542,12 +555,12 @@ components: - type: object properties: {} example: + id: fs-abc123 type: file_search_call - id: filesearch-abc123 - queries: - - machine learning algorithms - - neural networks status: completed + queries: + - search term + results: [] ImageGenerationStatus: type: string enum: @@ -587,10 +600,18 @@ components: - type: object properties: {} example: + id: img-abc123 type: image_generation_call - id: imagegen-abc123 - result: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg== status: completed + result: null + ToolCallStatus: + type: string + enum: + - in_progress + - completed + - incomplete + example: completed + x-speakeasy-unknown-values: allow OutputServerToolItem: type: object properties: @@ -601,12 +622,7 @@ components: id: type: string status: - type: string - enum: - - completed - - in_progress - - incomplete - x-speakeasy-unknown-values: allow + $ref: '#/components/schemas/ToolCallStatus' required: - type - status @@ -680,35 +696,45 @@ components: - max_output_tokens - content_filter x-speakeasy-unknown-values: allow + example: + reason: max_output_tokens OpenAIResponsesUsage: type: object properties: input_tokens: - type: number + type: integer input_tokens_details: type: object properties: cached_tokens: - type: number + type: integer required: - cached_tokens output_tokens: - type: number + type: integer output_tokens_details: type: object properties: reasoning_tokens: - type: number + type: integer required: - reasoning_tokens total_tokens: - type: number + type: integer required: - input_tokens - input_tokens_details - output_tokens - output_tokens_details - total_tokens + example: + input_tokens: 100 + input_tokens_details: + cached_tokens: 0 + output_tokens: 50 + output_tokens_details: + reasoning_tokens: 0 + total_tokens: 150 Usage: allOf: - $ref: '#/components/schemas/OpenAIResponsesUsage' @@ -717,7 +743,7 @@ components: properties: cost: type: number - nullable: true + format: double description: Cost of the completion is_byok: type: boolean @@ -727,15 +753,16 @@ components: properties: upstream_inference_cost: type: number - nullable: true + format: double upstream_inference_input_cost: type: number + format: double upstream_inference_output_cost: type: number + format: double required: - upstream_inference_input_cost - upstream_inference_output_cost - description: Token usage information for the response example: input_tokens: 10 output_tokens: 25 @@ -749,6 +776,7 @@ components: upstream_inference_cost: null upstream_inference_input_cost: 0.0008 upstream_inference_output_cost: 0.0004 + description: Token usage information for the response InputText: type: object properties: @@ -843,15 +871,120 @@ components: input_audio: data: SGVsbG8gV29ybGQ= format: mp3 - ToolCallStatusEnum: - type: string - nullable: true - enum: - - in_progress - - completed - - incomplete - example: completed - x-speakeasy-unknown-values: allow + OpenAIResponseInputMessageItem: + type: object + properties: + id: + type: string + type: + type: string + enum: + - message + role: + anyOf: + - type: string + enum: + - user + - type: string + enum: + - system + - type: string + enum: + - developer + content: + type: array + items: + oneOf: + - $ref: '#/components/schemas/InputText' + - $ref: '#/components/schemas/InputImage' + - $ref: '#/components/schemas/InputFile' + - $ref: '#/components/schemas/InputAudio' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/InputText' + input_image: '#/components/schemas/InputImage' + input_file: '#/components/schemas/InputFile' + input_audio: '#/components/schemas/InputAudio' + required: + - id + - role + - content + example: + id: msg-abc123 + type: message + role: user + content: + - type: input_text + text: Hello, how are you? + OpenAIResponseFunctionToolCallOutput: + type: object + properties: + type: + type: string + enum: + - function_call_output + id: + type: string + nullable: true + call_id: + type: string + output: + anyOf: + - type: string + - type: array + items: + oneOf: + - $ref: '#/components/schemas/InputText' + - $ref: '#/components/schemas/InputImage' + - $ref: '#/components/schemas/InputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/InputText' + input_image: '#/components/schemas/InputImage' + input_file: '#/components/schemas/InputFile' + status: + allOf: + - $ref: '#/components/schemas/ToolCallStatus' + - nullable: true + required: + - type + - call_id + - output + example: + type: function_call_output + call_id: call-abc123 + output: '{"temperature":72,"conditions":"sunny"}' + OpenAIResponseFunctionToolCall: + type: object + properties: + type: + type: string + enum: + - function_call + call_id: + type: string + name: + type: string + arguments: + type: string + id: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + required: + - type + - call_id + - name + - arguments + example: + type: function_call + call_id: call-abc123 + name: get_weather + arguments: '{"location":"San Francisco"}' + id: fc-abc123 + status: completed BaseInputs: anyOf: - type: string @@ -907,100 +1040,15 @@ components: required: - role - content - - type: object - properties: - id: - type: string - type: - type: string - enum: - - message - role: - anyOf: - - type: string - enum: - - user - - type: string - enum: - - system - - type: string - enum: - - developer - content: - type: array - items: - oneOf: - - $ref: '#/components/schemas/InputText' - - $ref: '#/components/schemas/InputImage' - - $ref: '#/components/schemas/InputFile' - - $ref: '#/components/schemas/InputAudio' - discriminator: - propertyName: type - mapping: - input_text: '#/components/schemas/InputText' - input_image: '#/components/schemas/InputImage' - input_file: '#/components/schemas/InputFile' - input_audio: '#/components/schemas/InputAudio' - required: - - id - - role - - content - - type: object - properties: - type: - type: string - enum: - - function_call_output - id: - type: string - nullable: true - call_id: - type: string - output: - anyOf: - - type: string - - type: array - items: - oneOf: - - $ref: '#/components/schemas/InputText' - - $ref: '#/components/schemas/InputImage' - - $ref: '#/components/schemas/InputFile' - discriminator: - propertyName: type - mapping: - input_text: '#/components/schemas/InputText' - input_image: '#/components/schemas/InputImage' - input_file: '#/components/schemas/InputFile' - status: - $ref: '#/components/schemas/ToolCallStatusEnum' - required: - - type - - call_id - - output - - type: object - properties: - type: - type: string - enum: - - function_call - call_id: - type: string - name: - type: string - arguments: - type: string - id: - type: string - status: - $ref: '#/components/schemas/ToolCallStatusEnum' - required: - - type - - call_id - - name - - arguments + - $ref: '#/components/schemas/OpenAIResponseInputMessageItem' + - $ref: '#/components/schemas/OpenAIResponseFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseFunctionToolCall' - $ref: '#/components/schemas/OutputItemImageGenerationCall' - $ref: '#/components/schemas/OutputMessage' - nullable: true + example: + - role: user + content: What is the weather today? RequestMetadata: type: object nullable: true @@ -1086,6 +1134,43 @@ components: nullable: true required: - type + example: + type: approximate + city: San Francisco + country: USA + region: California + timezone: America/Los_Angeles + WebSearchEngineEnum: + type: string + enum: + - auto + - native + - exa + - firecrawl + - parallel + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. + example: auto + x-speakeasy-unknown-values: allow + WebSearchDomainFilter: + type: object + nullable: true + properties: + allowed_domains: + type: array + nullable: true + items: + type: string + excluded_domains: + type: array + nullable: true + items: + type: string + example: + allowed_domains: + - example.com + excluded_domains: + - spam.com Preview_WebSearchServerTool: type: object properties: @@ -1098,38 +1183,14 @@ components: user_location: $ref: '#/components/schemas/Preview_WebSearchUserLocation' engine: - type: string - enum: - - auto - - native - - exa - - firecrawl - - parallel - description: >- - Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - example: auto - x-speakeasy-unknown-values: allow + $ref: '#/components/schemas/WebSearchEngineEnum' max_results: - type: number - minimum: 1 - maximum: 25 + type: integer description: >- Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. example: 5 filters: - type: object - nullable: true - properties: - allowed_domains: - type: array - nullable: true - items: - type: string - excluded_domains: - type: array - nullable: true - items: - type: string + $ref: '#/components/schemas/WebSearchDomainFilter' required: - type description: Web search preview tool configuration @@ -1147,38 +1208,14 @@ components: user_location: $ref: '#/components/schemas/Preview_WebSearchUserLocation' engine: - type: string - enum: - - auto - - native - - exa - - firecrawl - - parallel - description: >- - Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - example: auto - x-speakeasy-unknown-values: allow + $ref: '#/components/schemas/WebSearchEngineEnum' max_results: - type: number - minimum: 1 - maximum: 25 + type: integer description: >- Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. example: 5 filters: - type: object - nullable: true - properties: - allowed_domains: - type: array - nullable: true - items: - type: string - excluded_domains: - type: array - nullable: true - items: - type: string + $ref: '#/components/schemas/WebSearchDomainFilter' required: - type description: Web search preview tool configuration (2025-03-11 version) @@ -1219,39 +1256,15 @@ components: enum: - web_search filters: - type: object - nullable: true - properties: - allowed_domains: - type: array - nullable: true - items: - type: string - excluded_domains: - type: array - nullable: true - items: - type: string + $ref: '#/components/schemas/WebSearchDomainFilter' search_context_size: $ref: '#/components/schemas/SearchContextSizeEnum' user_location: $ref: '#/components/schemas/WebSearchUserLocation' engine: - type: string - enum: - - auto - - native - - exa - - firecrawl - - parallel - description: >- - Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - example: auto - x-speakeasy-unknown-values: allow + $ref: '#/components/schemas/WebSearchEngineEnum' max_results: - type: number - minimum: 1 - maximum: 25 + type: integer description: >- Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. example: 5 @@ -1272,39 +1285,15 @@ components: enum: - web_search_2025_08_26 filters: - type: object - nullable: true - properties: - allowed_domains: - type: array - nullable: true - items: - type: string - excluded_domains: - type: array - nullable: true - items: - type: string + $ref: '#/components/schemas/WebSearchDomainFilter' search_context_size: $ref: '#/components/schemas/SearchContextSizeEnum' user_location: $ref: '#/components/schemas/WebSearchUserLocation' engine: - type: string - enum: - - auto - - native - - exa - - firecrawl - - parallel - description: >- - Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - example: auto - x-speakeasy-unknown-values: allow + $ref: '#/components/schemas/WebSearchEngineEnum' max_results: - type: number - minimum: 1 - maximum: 25 + type: integer description: >- Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. example: 5 @@ -1336,6 +1325,12 @@ components: - type - filters description: A compound filter that combines multiple comparison or compound filters + example: + type: and + filters: + - key: author + type: eq + value: Alice FileSearchServerTool: type: object properties: @@ -1367,12 +1362,14 @@ components: anyOf: - type: string - type: number + format: double - type: boolean - type: array items: anyOf: - type: string - type: number + format: double required: - key - type @@ -1381,8 +1378,6 @@ components: - nullable: true max_num_results: type: integer - minimum: 1 - maximum: 50 ranking_options: type: object properties: @@ -1394,6 +1389,7 @@ components: x-speakeasy-unknown-values: allow score_threshold: type: number + format: double required: - type - vector_store_ids @@ -1410,9 +1406,9 @@ components: enum: - computer_use_preview display_height: - type: number + type: integer display_width: - type: number + type: integer environment: type: string enum: @@ -1461,6 +1457,7 @@ components: - 4g - 16g - 64g + - null x-speakeasy-unknown-values: allow required: - type @@ -1494,7 +1491,6 @@ components: read_only: type: boolean - nullable: true - - nullable: true authorization: type: string connector_id: @@ -1539,7 +1535,6 @@ components: enum: - never - nullable: true - - nullable: true server_description: type: string server_url: @@ -1572,6 +1567,7 @@ components: enum: - high - low + - null x-speakeasy-unknown-values: allow input_image_mask: type: object @@ -1593,7 +1589,7 @@ components: - low x-speakeasy-unknown-values: allow output_compression: - type: number + type: integer output_format: type: string enum: @@ -1602,7 +1598,7 @@ components: - jpeg x-speakeasy-unknown-values: allow partial_images: - type: number + type: integer quality: type: string enum: @@ -1707,6 +1703,38 @@ components: example: type: custom name: my_tool + ToolChoiceAllowed: + type: object + properties: + type: + type: string + enum: + - allowed_tools + mode: + anyOf: + - type: string + enum: + - auto + - type: string + enum: + - required + tools: + type: array + items: + type: object + additionalProperties: + nullable: true + required: + - type + - mode + - tools + description: Constrains the model to a pre-defined set of allowed tools + example: + type: allowed_tools + mode: auto + tools: + - type: function + name: get_weather OpenAIResponsesToolChoice: anyOf: - type: string @@ -1741,6 +1769,8 @@ components: - web_search_preview required: - type + - $ref: '#/components/schemas/ToolChoiceAllowed' + example: auto StoredPromptTemplate: type: object nullable: true @@ -1758,7 +1788,11 @@ components: - $ref: '#/components/schemas/InputFile' required: - id - ReasoningEffortEnum: + example: + id: prompt-abc123 + variables: + name: John + ReasoningEffort: type: string nullable: true enum: @@ -1768,14 +1802,17 @@ components: - low - minimal - none + - null + example: medium x-speakeasy-unknown-values: allow - ReasoningSummaryVerbosityEnum: + ReasoningSummaryVerbosity: type: string nullable: true enum: - auto - concise - detailed + - null example: auto x-speakeasy-unknown-values: allow BaseReasoningConfig: @@ -1783,15 +1820,20 @@ components: nullable: true properties: effort: - $ref: '#/components/schemas/ReasoningEffortEnum' + $ref: '#/components/schemas/ReasoningEffort' summary: - $ref: '#/components/schemas/ReasoningSummaryVerbosityEnum' - TruncationEnum: + $ref: '#/components/schemas/ReasoningSummaryVerbosity' + example: + effort: medium + summary: auto + Truncation: type: string nullable: true enum: - auto - disabled + - null + example: auto x-speakeasy-unknown-values: allow FormatTextConfig: type: object @@ -1873,13 +1915,14 @@ components: - high - low - medium + - null x-speakeasy-unknown-values: allow description: Text output configuration including format and verbosity example: format: type: text verbosity: medium - ServiceTierEnum: + ServiceTier: type: string nullable: true enum: @@ -1888,6 +1931,8 @@ components: - flex - priority - scale + - null + example: default x-speakeasy-unknown-values: allow BaseResponsesResult: type: object @@ -1899,14 +1944,13 @@ components: enum: - response created_at: - type: number + type: integer model: type: string status: $ref: '#/components/schemas/OpenAIResponsesResponseStatus' completed_at: - type: number - nullable: true + type: integer output: type: array items: @@ -1944,25 +1988,23 @@ components: usage: $ref: '#/components/schemas/OpenAIResponsesUsage' max_tool_calls: - type: number - nullable: true + type: integer top_logprobs: - type: number + type: integer max_output_tokens: - type: number - nullable: true + type: integer temperature: type: number - nullable: true + format: double top_p: type: number - nullable: true + format: double presence_penalty: type: number - nullable: true + format: double frequency_penalty: type: number - nullable: true + format: double instructions: $ref: '#/components/schemas/BaseInputs' metadata: @@ -2022,11 +2064,11 @@ components: reasoning: $ref: '#/components/schemas/BaseReasoningConfig' service_tier: - $ref: '#/components/schemas/ServiceTierEnum' + $ref: '#/components/schemas/ServiceTier' store: type: boolean truncation: - $ref: '#/components/schemas/TruncationEnum' + $ref: '#/components/schemas/Truncation' text: $ref: '#/components/schemas/TextConfig' required: @@ -2048,6 +2090,24 @@ components: - tools - tool_choice - parallel_tool_calls + example: + id: resp-abc123 + object: response + created_at: 1704067200 + model: gpt-4 + status: completed + completed_at: 1704067210 + output: [] + tools: [] + tool_choice: auto + parallel_tool_calls: true + error: null + incomplete_details: null + metadata: null + instructions: null + temperature: null + top_p: null + max_output_tokens: null OpenResponsesResult: allOf: - $ref: '#/components/schemas/BaseResponsesResult' @@ -2062,7 +2122,6 @@ components: service_tier: type: string nullable: true - description: Complete non-streaming response from the Responses API example: id: resp-abc123 object: response @@ -2096,6 +2155,7 @@ components: max_output_tokens: null metadata: null instructions: null + description: Complete non-streaming response from the Responses API CreatedEvent: type: object properties: @@ -2106,7 +2166,7 @@ components: response: $ref: '#/components/schemas/BaseResponsesResult' sequence_number: - type: number + type: integer required: - type - response @@ -2132,6 +2192,34 @@ components: top_p: null max_output_tokens: null sequence_number: 0 + OpenResponsesCreatedEvent: + allOf: + - $ref: '#/components/schemas/CreatedEvent' + - type: object + properties: + response: + $ref: '#/components/schemas/OpenResponsesResult' + description: Event emitted when a response is created + example: + type: response.created + response: + id: resp-abc123 + object: response + created_at: 1704067200 + model: gpt-4 + status: in_progress + output: [] + tools: [] + tool_choice: auto + parallel_tool_calls: true + error: null + incomplete_details: null + metadata: null + instructions: null + temperature: null + top_p: null + max_output_tokens: null + sequence_number: 0 InProgressEvent: type: object properties: @@ -2142,7 +2230,7 @@ components: response: $ref: '#/components/schemas/BaseResponsesResult' sequence_number: - type: number + type: integer required: - type - response @@ -2168,6 +2256,34 @@ components: top_p: null max_output_tokens: null sequence_number: 1 + OpenResponsesInProgressEvent: + allOf: + - $ref: '#/components/schemas/InProgressEvent' + - type: object + properties: + response: + $ref: '#/components/schemas/OpenResponsesResult' + description: Event emitted when a response is in progress + example: + type: response.in_progress + response: + id: resp-abc123 + object: response + created_at: 1704067200 + model: gpt-4 + status: in_progress + output: [] + tools: [] + tool_choice: auto + parallel_tool_calls: true + error: null + incomplete_details: null + metadata: null + instructions: null + temperature: null + top_p: null + max_output_tokens: null + sequence_number: 1 CompletedEvent: type: object properties: @@ -2178,7 +2294,7 @@ components: response: $ref: '#/components/schemas/BaseResponsesResult' sequence_number: - type: number + type: integer required: - type - response @@ -2212,17 +2328,45 @@ components: top_p: null max_output_tokens: null sequence_number: 10 - IncompleteEvent: - type: object - properties: - type: - type: string + StreamEventsResponseCompleted: + allOf: + - $ref: '#/components/schemas/CompletedEvent' + - type: object + properties: + response: + $ref: '#/components/schemas/OpenResponsesResult' + description: Event emitted when a response has completed successfully + example: + type: response.completed + response: + id: resp-abc123 + object: response + created_at: 1704067200 + model: gpt-4 + status: completed + output: [] + tools: [] + tool_choice: auto + parallel_tool_calls: true + error: null + incomplete_details: null + metadata: null + instructions: null + temperature: null + top_p: null + max_output_tokens: null + sequence_number: 10 + IncompleteEvent: + type: object + properties: + type: + type: string enum: - response.incomplete response: $ref: '#/components/schemas/BaseResponsesResult' sequence_number: - type: number + type: integer required: - type - response @@ -2248,6 +2392,34 @@ components: top_p: null max_output_tokens: null sequence_number: 5 + StreamEventsResponseIncomplete: + allOf: + - $ref: '#/components/schemas/IncompleteEvent' + - type: object + properties: + response: + $ref: '#/components/schemas/OpenResponsesResult' + description: Event emitted when a response is incomplete + example: + type: response.incomplete + response: + id: resp-abc123 + object: response + created_at: 1704067200 + model: gpt-4 + status: incomplete + output: [] + tools: [] + tool_choice: auto + parallel_tool_calls: true + error: null + incomplete_details: null + metadata: null + instructions: null + temperature: null + top_p: null + max_output_tokens: null + sequence_number: 5 FailedEvent: type: object properties: @@ -2258,7 +2430,7 @@ components: response: $ref: '#/components/schemas/BaseResponsesResult' sequence_number: - type: number + type: integer required: - type - response @@ -2284,6 +2456,34 @@ components: top_p: null max_output_tokens: null sequence_number: 3 + StreamEventsResponseFailed: + allOf: + - $ref: '#/components/schemas/FailedEvent' + - type: object + properties: + response: + $ref: '#/components/schemas/OpenResponsesResult' + description: Event emitted when a response has failed + example: + type: response.failed + response: + id: resp-abc123 + object: response + created_at: 1704067200 + model: gpt-4 + status: failed + output: [] + tools: [] + tool_choice: auto + parallel_tool_calls: true + error: null + incomplete_details: null + metadata: null + instructions: null + temperature: null + top_p: null + max_output_tokens: null + sequence_number: 3 BaseErrorEvent: type: object properties: @@ -2300,7 +2500,7 @@ components: type: string nullable: true sequence_number: - type: number + type: integer required: - type - code @@ -2334,7 +2534,7 @@ components: enum: - response.output_item.added output_index: - type: number + type: integer item: oneOf: - $ref: '#/components/schemas/OutputMessage' @@ -2353,7 +2553,7 @@ components: file_search_call: '#/components/schemas/OutputItemFileSearchCall' image_generation_call: '#/components/schemas/OutputItemImageGenerationCall' sequence_number: - type: number + type: integer required: - type - output_index @@ -2370,6 +2570,24 @@ components: role: assistant content: [] sequence_number: 2 + StreamEventsResponseOutputItemAdded: + allOf: + - $ref: '#/components/schemas/OutputItemAddedEvent' + - type: object + properties: + item: + $ref: '#/components/schemas/OutputItems' + description: Event emitted when a new output item is added to the response + example: + type: response.output_item.added + output_index: 0 + item: + id: item-1 + type: message + status: in_progress + role: assistant + content: [] + sequence_number: 2 OutputItemDoneEvent: type: object properties: @@ -2378,7 +2596,7 @@ components: enum: - response.output_item.done output_index: - type: number + type: integer item: oneOf: - $ref: '#/components/schemas/OutputMessage' @@ -2397,7 +2615,7 @@ components: file_search_call: '#/components/schemas/OutputItemFileSearchCall' image_generation_call: '#/components/schemas/OutputItemImageGenerationCall' sequence_number: - type: number + type: integer required: - type - output_index @@ -2417,6 +2635,27 @@ components: text: Hello! How can I help you? annotations: [] sequence_number: 8 + StreamEventsResponseOutputItemDone: + allOf: + - $ref: '#/components/schemas/OutputItemDoneEvent' + - type: object + properties: + item: + $ref: '#/components/schemas/OutputItems' + description: Event emitted when an output item is complete + example: + type: response.output_item.done + output_index: 0 + item: + id: item-1 + type: message + status: completed + role: assistant + content: + - type: output_text + text: Hello! How can I help you? + annotations: [] + sequence_number: 8 BaseContentPartAddedEvent: type: object properties: @@ -2425,17 +2664,17 @@ components: enum: - response.content_part.added output_index: - type: number + type: integer item_id: type: string content_index: - type: number + type: integer part: anyOf: - $ref: '#/components/schemas/ResponseOutputText' - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' sequence_number: - type: number + type: integer required: - type - output_index @@ -2483,17 +2722,17 @@ components: enum: - response.content_part.done output_index: - type: number + type: integer item_id: type: string content_index: - type: number + type: integer part: anyOf: - $ref: '#/components/schemas/ResponseOutputText' - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' sequence_number: - type: number + type: integer required: - type - output_index @@ -2540,19 +2779,36 @@ components: type: string logprob: type: number + format: double bytes: type: array items: - type: number + type: integer description: Alternative token with its log probability example: token: hello logprob: -0.5 + StreamLogprobTopLogprob: + allOf: + - $ref: '#/components/schemas/OpenResponsesTopLogprobs' + - type: object + properties: {} + description: Alternative token with its log probability + example: + token: Hello + logprob: -0.5 + bytes: + - 72 + - 101 + - 108 + - 108 + - 111 OpenResponsesLogProbs: type: object properties: logprob: type: number + format: double token: type: string top_logprobs: @@ -2562,7 +2818,7 @@ components: bytes: type: array items: - type: number + type: integer required: - logprob - token @@ -2573,6 +2829,26 @@ components: top_logprobs: - token: hello logprob: -0.5 + StreamLogprob: + allOf: + - $ref: '#/components/schemas/OpenResponsesLogProbs' + - type: object + properties: + top_logprobs: + type: array + items: + $ref: '#/components/schemas/StreamLogprobTopLogprob' + description: Log probability information for a token + example: + token: Hello + logprob: -0.5 + bytes: + - 72 + - 101 + - 108 + - 108 + - 111 + top_logprobs: [] BaseTextDeltaEvent: type: object properties: @@ -2585,15 +2861,15 @@ components: items: $ref: '#/components/schemas/OpenResponsesLogProbs' output_index: - type: number + type: integer item_id: type: string content_index: - type: number + type: integer delta: type: string sequence_number: - type: number + type: integer required: - type - logprobs @@ -2619,28 +2895,7 @@ components: logprobs: type: array items: - allOf: - - $ref: '#/components/schemas/OpenResponsesLogProbs' - - type: object - properties: - top_logprobs: - type: array - items: - allOf: - - $ref: '#/components/schemas/OpenResponsesTopLogprobs' - - type: object - properties: {} - description: Alternative token with its log probability - example: - token: hello - logprob: -0.5 - description: Log probability information for a token - example: - logprob: -0.1 - token: world - top_logprobs: - - token: hello - logprob: -0.5 + $ref: '#/components/schemas/StreamLogprob' description: Event emitted when a text delta is streamed example: type: response.output_text.delta @@ -2658,15 +2913,15 @@ components: enum: - response.output_text.done output_index: - type: number + type: integer item_id: type: string content_index: - type: number + type: integer text: type: string sequence_number: - type: number + type: integer logprobs: type: array items: @@ -2696,28 +2951,7 @@ components: logprobs: type: array items: - allOf: - - $ref: '#/components/schemas/OpenResponsesLogProbs' - - type: object - properties: - top_logprobs: - type: array - items: - allOf: - - $ref: '#/components/schemas/OpenResponsesTopLogprobs' - - type: object - properties: {} - description: Alternative token with its log probability - example: - token: hello - logprob: -0.5 - description: Log probability information for a token - example: - logprob: -0.1 - token: world - top_logprobs: - - token: hello - logprob: -0.5 + $ref: '#/components/schemas/StreamLogprob' description: Event emitted when text streaming is complete example: type: response.output_text.done @@ -2735,15 +2969,15 @@ components: enum: - response.refusal.delta output_index: - type: number + type: integer item_id: type: string content_index: - type: number + type: integer delta: type: string sequence_number: - type: number + type: integer required: - type - output_index @@ -2780,15 +3014,15 @@ components: enum: - response.refusal.done output_index: - type: number + type: integer item_id: type: string content_index: - type: number + type: integer refusal: type: string sequence_number: - type: number + type: integer required: - type - output_index @@ -2825,15 +3059,15 @@ components: enum: - response.output_text.annotation.added output_index: - type: number + type: integer item_id: type: string content_index: - type: number + type: integer sequence_number: - type: number + type: integer annotation_index: - type: number + type: integer annotation: $ref: '#/components/schemas/OpenAIResponsesAnnotation' required: @@ -2887,11 +3121,11 @@ components: item_id: type: string output_index: - type: number + type: integer delta: type: string sequence_number: - type: number + type: integer required: - type - item_id @@ -2903,7 +3137,7 @@ components: type: response.function_call_arguments.delta item_id: item-1 output_index: 0 - delta: '{"city": "San' + delta: '{"city": "..."}' sequence_number: 4 FunctionCallArgsDeltaEvent: allOf: @@ -2915,7 +3149,7 @@ components: type: response.function_call_arguments.delta item_id: item-1 output_index: 0 - delta: '{"city": "San' + delta: '{"city": "..."}' sequence_number: 4 BaseFunctionCallArgsDoneEvent: type: object @@ -2927,13 +3161,13 @@ components: item_id: type: string output_index: - type: number + type: integer name: type: string arguments: type: string sequence_number: - type: number + type: integer required: - type - item_id @@ -2970,15 +3204,15 @@ components: enum: - response.reasoning_text.delta output_index: - type: number + type: integer item_id: type: string content_index: - type: number + type: integer delta: type: string sequence_number: - type: number + type: integer required: - type - output_index @@ -3015,15 +3249,15 @@ components: enum: - response.reasoning_text.done output_index: - type: number + type: integer item_id: type: string content_index: - type: number + type: integer text: type: string sequence_number: - type: number + type: integer required: - type - output_index @@ -3060,15 +3294,15 @@ components: enum: - response.reasoning_summary_part.added output_index: - type: number + type: integer item_id: type: string summary_index: - type: number + type: integer part: $ref: '#/components/schemas/ReasoningSummaryText' sequence_number: - type: number + type: integer required: - type - output_index @@ -3109,15 +3343,15 @@ components: enum: - response.reasoning_summary_part.done output_index: - type: number + type: integer item_id: type: string summary_index: - type: number + type: integer part: $ref: '#/components/schemas/ReasoningSummaryText' sequence_number: - type: number + type: integer required: - type - output_index @@ -3160,13 +3394,13 @@ components: item_id: type: string output_index: - type: number + type: integer summary_index: - type: number + type: integer delta: type: string sequence_number: - type: number + type: integer required: - type - item_id @@ -3205,13 +3439,13 @@ components: item_id: type: string output_index: - type: number + type: integer summary_index: - type: number + type: integer text: type: string sequence_number: - type: number + type: integer required: - type - item_id @@ -3250,25 +3484,30 @@ components: item_id: type: string output_index: - type: number + type: integer sequence_number: - type: number + type: integer required: - type - item_id - output_index - sequence_number + example: + type: response.image_generation_call.in_progress + item_id: ig_abc123 + output_index: 0 + sequence_number: 1 ImageGenCallInProgressEvent: allOf: - $ref: '#/components/schemas/OpenAIResponsesImageGenCallInProgress' - type: object properties: {} - description: Image generation call in progress example: type: response.image_generation_call.in_progress output_index: 0 sequence_number: 1 item_id: call-123 + description: Image generation call in progress OpenAIResponsesImageGenCallGenerating: type: object properties: @@ -3279,25 +3518,30 @@ components: item_id: type: string output_index: - type: number + type: integer sequence_number: - type: number + type: integer required: - type - item_id - output_index - sequence_number + example: + type: response.image_generation_call.generating + item_id: ig_abc123 + output_index: 0 + sequence_number: 2 ImageGenCallGeneratingEvent: allOf: - $ref: '#/components/schemas/OpenAIResponsesImageGenCallGenerating' - type: object properties: {} - description: Image generation call is generating example: type: response.image_generation_call.generating output_index: 0 sequence_number: 2 item_id: call-123 + description: Image generation call is generating OpenAIResponsesImageGenCallPartialImage: type: object properties: @@ -3308,13 +3552,13 @@ components: item_id: type: string output_index: - type: number + type: integer sequence_number: - type: number + type: integer partial_image_b64: type: string partial_image_index: - type: number + type: integer required: - type - item_id @@ -3322,12 +3566,18 @@ components: - sequence_number - partial_image_b64 - partial_image_index + example: + type: response.image_generation_call.partial_image + item_id: ig_abc123 + output_index: 0 + sequence_number: 3 + partial_image_b64: iVBORw0KGgo... + partial_image_index: 0 ImageGenCallPartialImageEvent: allOf: - $ref: '#/components/schemas/OpenAIResponsesImageGenCallPartialImage' - type: object properties: {} - description: Image generation call with partial image example: type: response.image_generation_call.partial_image output_index: 0 @@ -3335,6 +3585,7 @@ components: item_id: call-123 partial_image_b64: base64encodedimage... partial_image_index: 0 + description: Image generation call with partial image OpenAIResponsesImageGenCallCompleted: type: object properties: @@ -3345,25 +3596,30 @@ components: item_id: type: string output_index: - type: number + type: integer sequence_number: - type: number + type: integer required: - type - item_id - output_index - sequence_number + example: + type: response.image_generation_call.completed + item_id: ig_abc123 + output_index: 0 + sequence_number: 4 ImageGenCallCompletedEvent: allOf: - $ref: '#/components/schemas/OpenAIResponsesImageGenCallCompleted' - type: object properties: {} - description: Image generation call completed example: type: response.image_generation_call.completed output_index: 0 sequence_number: 4 item_id: call-123 + description: Image generation call completed OpenAIResponsesWebSearchCallInProgress: type: object properties: @@ -3374,25 +3630,30 @@ components: item_id: type: string output_index: - type: number + type: integer sequence_number: - type: number + type: integer required: - type - item_id - output_index - sequence_number + example: + type: response.web_search_call.in_progress + item_id: ws_abc123 + output_index: 0 + sequence_number: 1 WebSearchCallInProgressEvent: allOf: - $ref: '#/components/schemas/OpenAIResponsesWebSearchCallInProgress' - type: object properties: {} - description: Web search call in progress example: type: response.web_search_call.in_progress output_index: 0 sequence_number: 1 item_id: ws-123 + description: Web search call in progress OpenAIResponsesWebSearchCallSearching: type: object properties: @@ -3403,25 +3664,30 @@ components: item_id: type: string output_index: - type: number + type: integer sequence_number: - type: number + type: integer required: - type - item_id - output_index - sequence_number + example: + type: response.web_search_call.searching + item_id: ws_abc123 + output_index: 0 + sequence_number: 2 WebSearchCallSearchingEvent: allOf: - $ref: '#/components/schemas/OpenAIResponsesWebSearchCallSearching' - type: object properties: {} - description: Web search call is searching example: type: response.web_search_call.searching output_index: 0 sequence_number: 2 item_id: ws-123 + description: Web search call is searching OpenAIResponsesSearchCompleted: type: object properties: @@ -3432,208 +3698,40 @@ components: item_id: type: string output_index: - type: number + type: integer sequence_number: - type: number + type: integer required: - type - item_id - output_index - sequence_number + example: + type: response.web_search_call.completed + item_id: ws_abc123 + output_index: 0 + sequence_number: 5 WebSearchCallCompletedEvent: allOf: - $ref: '#/components/schemas/OpenAIResponsesSearchCompleted' - type: object properties: {} - description: Web search call completed example: type: response.web_search_call.completed output_index: 0 sequence_number: 3 item_id: ws-123 + description: Web search call completed StreamEvents: oneOf: - - allOf: - - $ref: '#/components/schemas/CreatedEvent' - - type: object - properties: - response: - $ref: '#/components/schemas/OpenResponsesResult' - description: Event emitted when a response is created - example: - type: response.created - response: - id: resp-abc123 - object: response - created_at: 1704067200 - model: gpt-4 - status: in_progress - output: [] - tools: [] - tool_choice: auto - parallel_tool_calls: true - error: null - incomplete_details: null - metadata: null - instructions: null - temperature: null - top_p: null - max_output_tokens: null - sequence_number: 0 - - allOf: - - $ref: '#/components/schemas/InProgressEvent' - - type: object - properties: - response: - $ref: '#/components/schemas/OpenResponsesResult' - description: Event emitted when a response is in progress - example: - type: response.in_progress - response: - id: resp-abc123 - object: response - created_at: 1704067200 - model: gpt-4 - status: in_progress - output: [] - tools: [] - tool_choice: auto - parallel_tool_calls: true - error: null - incomplete_details: null - metadata: null - instructions: null - temperature: null - top_p: null - max_output_tokens: null - sequence_number: 1 - - allOf: - - $ref: '#/components/schemas/CompletedEvent' - - type: object - properties: - response: - $ref: '#/components/schemas/OpenResponsesResult' - description: Event emitted when a response has completed successfully - example: - type: response.completed - response: - id: resp-abc123 - object: response - created_at: 1704067200 - model: gpt-4 - status: completed - output: - - id: item-1 - type: message - status: completed - role: assistant - content: - - type: output_text - text: Hello! How can I help you? - annotations: [] - tools: [] - tool_choice: auto - parallel_tool_calls: true - error: null - incomplete_details: null - metadata: null - instructions: null - temperature: null - top_p: null - max_output_tokens: null - sequence_number: 10 - - allOf: - - $ref: '#/components/schemas/IncompleteEvent' - - type: object - properties: - response: - $ref: '#/components/schemas/OpenResponsesResult' - description: Event emitted when a response is incomplete - example: - type: response.incomplete - response: - id: resp-abc123 - object: response - created_at: 1704067200 - model: gpt-4 - status: incomplete - output: [] - tools: [] - tool_choice: auto - parallel_tool_calls: true - error: null - incomplete_details: null - metadata: null - instructions: null - temperature: null - top_p: null - max_output_tokens: null - sequence_number: 5 - - allOf: - - $ref: '#/components/schemas/FailedEvent' - - type: object - properties: - response: - $ref: '#/components/schemas/OpenResponsesResult' - description: Event emitted when a response has failed - example: - type: response.failed - response: - id: resp-abc123 - object: response - created_at: 1704067200 - model: gpt-4 - status: failed - output: [] - tools: [] - tool_choice: auto - parallel_tool_calls: true - error: null - incomplete_details: null - metadata: null - instructions: null - temperature: null - top_p: null - max_output_tokens: null - sequence_number: 3 + - $ref: '#/components/schemas/OpenResponsesCreatedEvent' + - $ref: '#/components/schemas/OpenResponsesInProgressEvent' + - $ref: '#/components/schemas/StreamEventsResponseCompleted' + - $ref: '#/components/schemas/StreamEventsResponseIncomplete' + - $ref: '#/components/schemas/StreamEventsResponseFailed' - $ref: '#/components/schemas/ErrorEvent' - - allOf: - - $ref: '#/components/schemas/OutputItemAddedEvent' - - type: object - properties: - item: - $ref: '#/components/schemas/OutputItems' - description: Event emitted when a new output item is added to the response - example: - type: response.output_item.added - output_index: 0 - item: - id: item-1 - type: message - status: in_progress - role: assistant - content: [] - sequence_number: 2 - - allOf: - - $ref: '#/components/schemas/OutputItemDoneEvent' - - type: object - properties: - item: - $ref: '#/components/schemas/OutputItems' - description: Event emitted when an output item is complete - example: - type: response.output_item.done - output_index: 0 - item: - id: item-1 - type: message - status: completed - role: assistant - content: - - type: output_text - text: Hello! How can I help you? - annotations: [] - sequence_number: 8 + - $ref: '#/components/schemas/StreamEventsResponseOutputItemAdded' + - $ref: '#/components/schemas/StreamEventsResponseOutputItemDone' - $ref: '#/components/schemas/ContentPartAddedEvent' - $ref: '#/components/schemas/ContentPartDoneEvent' - $ref: '#/components/schemas/TextDeltaEvent' @@ -3656,6 +3754,39 @@ components: - $ref: '#/components/schemas/WebSearchCallInProgressEvent' - $ref: '#/components/schemas/WebSearchCallSearchingEvent' - $ref: '#/components/schemas/WebSearchCallCompletedEvent' + discriminator: + propertyName: type + mapping: + response.created: '#/components/schemas/OpenResponsesCreatedEvent' + response.in_progress: '#/components/schemas/OpenResponsesInProgressEvent' + response.completed: '#/components/schemas/StreamEventsResponseCompleted' + response.incomplete: '#/components/schemas/StreamEventsResponseIncomplete' + response.failed: '#/components/schemas/StreamEventsResponseFailed' + error: '#/components/schemas/ErrorEvent' + response.output_item.added: '#/components/schemas/StreamEventsResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/StreamEventsResponseOutputItemDone' + response.content_part.added: '#/components/schemas/ContentPartAddedEvent' + response.content_part.done: '#/components/schemas/ContentPartDoneEvent' + response.output_text.delta: '#/components/schemas/TextDeltaEvent' + response.output_text.done: '#/components/schemas/TextDoneEvent' + response.refusal.delta: '#/components/schemas/RefusalDeltaEvent' + response.refusal.done: '#/components/schemas/RefusalDoneEvent' + response.output_text.annotation.added: '#/components/schemas/AnnotationAddedEvent' + response.function_call_arguments.delta: '#/components/schemas/FunctionCallArgsDeltaEvent' + response.function_call_arguments.done: '#/components/schemas/FunctionCallArgsDoneEvent' + response.reasoning_text.delta: '#/components/schemas/ReasoningDeltaEvent' + response.reasoning_text.done: '#/components/schemas/ReasoningDoneEvent' + response.reasoning_summary_part.added: '#/components/schemas/ReasoningSummaryPartAddedEvent' + response.reasoning_summary_part.done: '#/components/schemas/ReasoningSummaryPartDoneEvent' + response.reasoning_summary_text.delta: '#/components/schemas/ReasoningSummaryTextDeltaEvent' + response.reasoning_summary_text.done: '#/components/schemas/ReasoningSummaryTextDoneEvent' + response.image_generation_call.in_progress: '#/components/schemas/ImageGenCallInProgressEvent' + response.image_generation_call.generating: '#/components/schemas/ImageGenCallGeneratingEvent' + response.image_generation_call.partial_image: '#/components/schemas/ImageGenCallPartialImageEvent' + response.image_generation_call.completed: '#/components/schemas/ImageGenCallCompletedEvent' + response.web_search_call.in_progress: '#/components/schemas/WebSearchCallInProgressEvent' + response.web_search_call.searching: '#/components/schemas/WebSearchCallSearchingEvent' + response.web_search_call.completed: '#/components/schemas/WebSearchCallCompletedEvent' description: Union of all possible event types emitted during response streaming example: type: response.created @@ -4133,16 +4264,7 @@ components: type: string nullable: true format: - type: string - nullable: true - enum: - - unknown - - openai-responses-v1 - - azure-openai-responses-v1 - - xai-responses-v1 - - anthropic-claude-v1 - - google-gemini-v1 - x-speakeasy-unknown-values: allow + $ref: '#/components/schemas/ReasoningFormat' example: type: reasoning id: reasoning-abc123 @@ -4222,6 +4344,9 @@ components: example: final_answer required: - role + example: + role: user + content: What is the weather today? InputMessageItem: type: object properties: @@ -4262,30 +4387,20 @@ components: - $ref: '#/components/schemas/InputVideo' required: - role + example: + id: msg-abc123 + type: message + role: user + content: + - type: input_text + text: Hello, how are you? FunctionCallItem: - type: object - properties: - type: - type: string - enum: - - function_call - call_id: - type: string - name: - type: string - arguments: - type: string - id: - type: string - status: - $ref: '#/components/schemas/ToolCallStatusEnum' - required: - - type - - call_id - - name - - arguments - - id - description: A function call initiated by the model + allOf: + - $ref: '#/components/schemas/OpenAIResponseFunctionToolCall' + - type: object + properties: {} + required: + - id example: id: call-abc123 type: function_call @@ -4293,48 +4408,36 @@ components: name: get_weather arguments: '{"location":"San Francisco"}' status: completed + description: A function call initiated by the model FunctionCallOutputItem: - type: object - properties: - type: - type: string - enum: - - function_call_output - id: - type: string - nullable: true - call_id: - type: string - output: - anyOf: - - type: string - - type: array - items: - oneOf: - - $ref: '#/components/schemas/InputText' - - allOf: - - $ref: '#/components/schemas/InputImage' - - type: object - properties: {} - description: Image input content item - example: - type: input_image - detail: auto - image_url: https://example.com/image.jpg - - $ref: '#/components/schemas/InputFile' - status: - $ref: '#/components/schemas/ToolCallStatusEnum' - required: - - type - - call_id - - output - description: The output from a function call execution + allOf: + - $ref: '#/components/schemas/OpenAIResponseFunctionToolCallOutput' + - type: object + properties: + output: + anyOf: + - type: string + - type: array + items: + oneOf: + - $ref: '#/components/schemas/InputText' + - allOf: + - $ref: '#/components/schemas/InputImage' + - type: object + properties: {} + description: Image input content item + example: + type: input_image + detail: auto + image_url: https://example.com/image.jpg + - $ref: '#/components/schemas/InputFile' example: type: function_call_output id: output-abc123 call_id: call-abc123 output: '{"temperature":72,"conditions":"sunny"}' status: completed + description: The output from a function call execution OutputDatetimeItem: type: object properties: @@ -4345,12 +4448,7 @@ components: id: type: string status: - type: string - enum: - - completed - - in_progress - - incomplete - x-speakeasy-unknown-values: allow + $ref: '#/components/schemas/ToolCallStatus' datetime: type: string description: ISO 8601 datetime string @@ -4467,14 +4565,11 @@ components: type: object properties: max_results: - type: number - minimum: 1 - maximum: 25 + type: integer description: Maximum number of search results to return per search call. Defaults to 5. example: 5 max_total_results: - type: number - minimum: 1 + type: integer description: >- Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. example: 20 @@ -4494,7 +4589,6 @@ components: example: format: type: text - verbosity: medium ReasoningConfig: allOf: - $ref: '#/components/schemas/BaseReasoningConfig' @@ -4502,20 +4596,20 @@ components: nullable: true properties: max_tokens: - type: number - nullable: true + type: integer enabled: type: boolean nullable: true - description: Configuration for reasoning mode in the response example: summary: auto enabled: true + description: Configuration for reasoning mode in the response OutputModalityEnum: type: string enum: - text - image + example: text x-speakeasy-unknown-values: allow ResponseIncludesEnum: type: string @@ -4525,6 +4619,7 @@ components: - computer_call_output.output.image_url - reasoning.encrypted_content - code_interpreter_call.outputs + example: file_search_call.results x-speakeasy-unknown-values: allow OpenAIResponsesTruncation: type: string @@ -4532,23 +4627,9 @@ components: enum: - auto - disabled + - null example: auto x-speakeasy-unknown-values: allow - DataCollection: - type: string - nullable: true - enum: - - deny - - allow - description: >- - Data collection setting. If no available model provider meets the requirement, your request will return an error. - - - allow: (default) allow providers which store user data non-transiently and may train on it - - - - deny: use only providers which do not collect user data. - example: allow - x-speakeasy-unknown-values: allow ProviderName: type: string enum: @@ -4665,6 +4746,7 @@ components: - throughput - latency - exacto + - null description: The provider sorting strategy (price, throughput, latency) example: price x-speakeasy-unknown-values: allow @@ -4674,6 +4756,7 @@ components: enum: - model - none + - null description: >- Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. example: model @@ -4691,19 +4774,19 @@ components: properties: p50: type: number - nullable: true + format: double description: Minimum p50 throughput (tokens/sec) p75: type: number - nullable: true + format: double description: Minimum p75 throughput (tokens/sec) p90: type: number - nullable: true + format: double description: Minimum p90 throughput (tokens/sec) p99: type: number - nullable: true + format: double description: Minimum p99 throughput (tokens/sec) description: Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred. example: @@ -4712,6 +4795,7 @@ components: PreferredMinThroughput: anyOf: - type: number + format: double - $ref: '#/components/schemas/PercentileThroughputCutoffs' - nullable: true description: >- @@ -4722,19 +4806,19 @@ components: properties: p50: type: number - nullable: true + format: double description: Maximum p50 latency (seconds) p75: type: number - nullable: true + format: double description: Maximum p75 latency (seconds) p90: type: number - nullable: true + format: double description: Maximum p90 latency (seconds) p99: type: number - nullable: true + format: double description: Maximum p99 latency (seconds) description: Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred. example: @@ -4743,46 +4827,348 @@ components: PreferredMaxLatency: anyOf: - type: number + format: double - $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 - - firecrawl - - parallel - description: The search engine to use for web search. - x-speakeasy-unknown-values: allow - PDFParserEngine: - anyOf: - - type: string - enum: - - mistral-ocr - - native - - cloudflare-ai - x-speakeasy-unknown-values: allow - - type: string - enum: - - pdf-text - description: >- - The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai". - PDFParserOptions: + ProviderPreferences: type: object + nullable: true properties: - engine: - $ref: '#/components/schemas/PDFParserEngine' - description: Options for PDF parsing. - ContextCompressionEngine: - type: string - enum: - - middle-out - description: The compression engine to use. Defaults to "middle-out". - ResponsesRequest: - type: object + 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: + type: string + nullable: true + enum: + - deny + - allow + - null + example: allow + description: >- + Data collection setting. If no available model provider meets the requirement, your request will return an error. + + - allow: (default) allow providers which store user data non-transiently and may train on it + + + - deny: use only providers which do not collect user data. + x-speakeasy-unknown-values: allow + 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. + example: + - openai + - anthropic + 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. + example: + - openai + - anthropic + 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. + example: + - openai + - anthropic + quantizations: + type: array + nullable: true + items: + $ref: '#/components/schemas/Quantization' + description: A list of quantization levels to filter the provider by. + sort: + anyOf: + - $ref: '#/components/schemas/ProviderSort' + - $ref: '#/components/schemas/ProviderSortConfig' + - nullable: true + description: >- + The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. + example: price + max_price: + type: object + properties: + prompt: + $ref: '#/components/schemas/BigNumberUnion' + completion: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: Price per million completion tokens + image: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: Price per image + audio: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: Price per audio unit + request: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: Price per request + 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' + additionalProperties: false + example: + allow_fallbacks: true + description: When multiple model providers are available, optionally indicate your routing preference. + AutoRouterPlugin: + 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 + example: + id: auto-router + enabled: true + allowed_models: + - anthropic/* + - openai/gpt-4o + ModerationPlugin: + type: object + properties: + id: + type: string + enum: + - moderation + required: + - id + example: + id: moderation + WebSearchEngine: + type: string + enum: + - native + - exa + - firecrawl + - parallel + description: The search engine to use for web search. + example: exa + x-speakeasy-unknown-values: allow + WebSearchPlugin: + type: object + properties: + id: + type: string + enum: + - web + enabled: + type: boolean + description: Set to false to disable the web-search plugin for this request. Defaults to true. + max_results: + type: integer + search_prompt: + type: string + engine: + $ref: '#/components/schemas/WebSearchEngine' + include_domains: + type: array + items: + type: string + description: >- + A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog + exclude_domains: + type: array + items: + type: string + description: >- + A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog + required: + - id + example: + id: web + enabled: true + max_results: 5 + PDFParserEngine: + anyOf: + - type: string + enum: + - mistral-ocr + - native + - cloudflare-ai + x-speakeasy-unknown-values: allow + - type: string + enum: + - pdf-text + description: >- + The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai". + example: cloudflare-ai + PDFParserOptions: + type: object + properties: + engine: + $ref: '#/components/schemas/PDFParserEngine' + description: Options for PDF parsing. + example: + engine: cloudflare-ai + FileParserPlugin: + type: object + properties: + id: + type: string + enum: + - file-parser + enabled: + type: boolean + description: Set to false to disable the file-parser plugin for this request. Defaults to true. + pdf: + $ref: '#/components/schemas/PDFParserOptions' + required: + - id + example: + id: file-parser + enabled: true + pdf: + engine: cloudflare-ai + ResponseHealingPlugin: + type: object + properties: + id: + type: string + enum: + - response-healing + enabled: + type: boolean + description: Set to false to disable the response-healing plugin for this request. Defaults to true. + required: + - id + example: + id: response-healing + enabled: true + ContextCompressionEngine: + type: string + enum: + - middle-out + description: The compression engine to use. Defaults to "middle-out". + example: middle-out + ContextCompressionPlugin: + type: object + properties: + id: + type: string + enum: + - context-compression + enabled: + type: boolean + description: Set to false to disable the context-compression plugin for this request. Defaults to true. + engine: + $ref: '#/components/schemas/ContextCompressionEngine' + required: + - id + example: + id: context-compression + enabled: true + engine: middle-out + DeprecatedRoute: + type: string + nullable: true + enum: + - fallback + - sort + - null + deprecated: true + description: >- + **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none"). + example: fallback + x-speakeasy-deprecation-message: Use providers.sort.partition instead. + x-speakeasy-ignore: true + x-fern-ignore: true + x-speakeasy-unknown-values: allow + TraceConfig: + type: object + properties: + trace_id: + type: string + trace_name: + type: string + span_name: + type: string + generation_name: + type: string + parent_span_id: + type: string + additionalProperties: + nullable: true + example: + trace_id: trace-abc123 + trace_name: my-app-trace + description: >- + Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + ResponsesRequest: + type: object properties: input: $ref: '#/components/schemas/Inputs' @@ -4849,43 +5235,32 @@ components: reasoning: $ref: '#/components/schemas/ReasoningConfig' max_output_tokens: - type: number - nullable: true + type: integer temperature: type: number - nullable: true - minimum: 0 - maximum: 2 + format: double top_p: type: number - nullable: true - minimum: 0 + format: double top_logprobs: type: integer - nullable: true - minimum: 0 - maximum: 20 max_tool_calls: type: integer - nullable: true presence_penalty: type: number - nullable: true - minimum: -2 - maximum: 2 + format: double frequency_penalty: type: number - nullable: true - minimum: -2 - maximum: 2 + format: double top_k: - type: number + type: integer image_config: type: object additionalProperties: anyOf: - type: string - type: number + format: double 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: @@ -4930,6 +5305,7 @@ components: - flex - priority - scale + - null default: auto x-speakeasy-unknown-values: allow truncation: @@ -4938,229 +5314,29 @@ components: type: boolean default: false provider: - type: object - nullable: true - 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: - anyOf: - - $ref: '#/components/schemas/ProviderSort' - - $ref: '#/components/schemas/ProviderSortConfig' - - nullable: true - description: >- - The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. - example: price - max_price: - type: object - properties: - prompt: - $ref: '#/components/schemas/BigNumberUnion' - completion: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per million completion tokens - image: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per image - audio: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per audio unit - request: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per request - 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' - additionalProperties: false - description: When multiple model providers are available, optionally indicate your routing preference. + $ref: '#/components/schemas/ProviderPreferences' plugins: type: array items: 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 - properties: - id: - type: string - enum: - - moderation - required: - - id - - type: object - properties: - id: - type: string - enum: - - web - enabled: - type: boolean - description: Set to false to disable the web-search plugin for this request. Defaults to true. - max_results: - type: number - search_prompt: - type: string - engine: - $ref: '#/components/schemas/WebSearchEngine' - include_domains: - type: array - items: - type: string - description: >- - A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). - example: - - example.com - - '*.substack.com' - - openai.com/blog - exclude_domains: - type: array - items: - type: string - description: >- - A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). - example: - - example.com - - '*.substack.com' - - openai.com/blog - required: - - id - - type: object - properties: - id: - type: string - enum: - - file-parser - enabled: - type: boolean - description: Set to false to disable the file-parser plugin for this request. Defaults to true. - pdf: - $ref: '#/components/schemas/PDFParserOptions' - required: - - id - - type: object - properties: - id: - type: string - enum: - - response-healing - enabled: - type: boolean - description: Set to false to disable the response-healing plugin for this request. Defaults to true. - required: - - id - - type: object - properties: - id: - type: string - enum: - - context-compression - enabled: - type: boolean - description: Set to false to disable the context-compression plugin for this request. Defaults to true. - engine: - $ref: '#/components/schemas/ContextCompressionEngine' - required: - - id + - $ref: '#/components/schemas/AutoRouterPlugin' + - $ref: '#/components/schemas/ModerationPlugin' + - $ref: '#/components/schemas/WebSearchPlugin' + - $ref: '#/components/schemas/FileParserPlugin' + - $ref: '#/components/schemas/ResponseHealingPlugin' + - $ref: '#/components/schemas/ContextCompressionPlugin' + discriminator: + propertyName: id + mapping: + auto-router: '#/components/schemas/AutoRouterPlugin' + moderation: '#/components/schemas/ModerationPlugin' + web: '#/components/schemas/WebSearchPlugin' + file-parser: '#/components/schemas/FileParserPlugin' + response-healing: '#/components/schemas/ResponseHealingPlugin' + context-compression: '#/components/schemas/ContextCompressionPlugin' description: Plugins you want to enable for this request, including their settings. route: - type: string - nullable: true - enum: - - fallback - - sort - deprecated: true - description: >- - **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none"). - x-speakeasy-deprecation-message: Use providers.sort.partition instead. - x-speakeasy-ignore: true - x-fern-ignore: true - x-speakeasy-unknown-values: allow + $ref: '#/components/schemas/DeprecatedRoute' user: type: string maxLength: 256 @@ -5172,22 +5348,7 @@ components: description: >- A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. trace: - type: object - properties: - trace_id: - type: string - trace_name: - type: string - span_name: - type: string - generation_name: - type: string - parent_span_id: - type: string - additionalProperties: - nullable: true - description: >- - Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + $ref: '#/components/schemas/TraceConfig' description: Request schema for Responses endpoint example: model: anthropic/claude-4.5-sonnet-20250929 @@ -5206,10090 +5367,7347 @@ components: properties: location: type: string - BaseMessagesResult: + AnthropicContainer: type: object + nullable: true properties: id: type: string + expires_at: + type: string + required: + - id + - expires_at + example: + id: ctr_01abc + expires_at: '2026-04-08T00:00:00Z' + AnthropicCitationCharLocation: + type: object + properties: type: type: string enum: - - message - role: + - char_location + cited_text: + type: string + document_index: + type: integer + document_title: + type: string + nullable: true + start_char_index: + type: integer + end_char_index: + type: integer + file_id: + type: string + nullable: true + required: + - type + - cited_text + - document_index + - document_title + - start_char_index + - end_char_index + - file_id + example: + type: char_location + cited_text: Example cited text + document_index: 0 + document_title: null + start_char_index: 0 + end_char_index: 18 + file_id: null + AnthropicCitationPageLocation: + type: object + properties: + type: type: string enum: - - assistant - container: - type: object + - page_location + cited_text: + type: string + document_index: + type: integer + document_title: + type: string nullable: true - properties: - id: - type: string - expires_at: - type: string - required: - - id - - expires_at - content: + start_page_number: + type: integer + end_page_number: + type: integer + file_id: + type: string + nullable: true + required: + - type + - cited_text + - document_index + - document_title + - start_page_number + - end_page_number + - file_id + example: + type: page_location + cited_text: Example cited text + document_index: 0 + document_title: null + start_page_number: 1 + end_page_number: 2 + file_id: null + AnthropicCitationContentBlockLocation: + type: object + properties: + type: + type: string + enum: + - content_block_location + cited_text: + type: string + document_index: + type: integer + document_title: + type: string + nullable: true + start_block_index: + type: integer + end_block_index: + type: integer + file_id: + type: string + nullable: true + required: + - type + - cited_text + - document_index + - document_title + - start_block_index + - end_block_index + - file_id + example: + type: content_block_location + cited_text: Example cited text + document_index: 0 + document_title: null + start_block_index: 0 + end_block_index: 1 + file_id: null + AnthropicCitationWebSearchResultLocation: + type: object + properties: + type: + type: string + enum: + - web_search_result_location + cited_text: + type: string + encrypted_index: + type: string + title: + type: string + nullable: true + url: + type: string + required: + - type + - cited_text + - encrypted_index + - title + - url + example: + type: web_search_result_location + cited_text: Example cited text + encrypted_index: enc_idx_0 + title: Example Page + url: https://example.com + AnthropicCitationSearchResultLocation: + type: object + properties: + type: + type: string + enum: + - search_result_location + cited_text: + type: string + search_result_index: + type: integer + source: + type: string + title: + type: string + nullable: true + start_block_index: + type: integer + end_block_index: + type: integer + required: + - type + - cited_text + - search_result_index + - source + - title + - start_block_index + - end_block_index + example: + type: search_result_location + cited_text: Example cited text + search_result_index: 0 + source: example_source + title: Example Result + start_block_index: 0 + end_block_index: 1 + AnthropicTextCitation: + oneOf: + - $ref: '#/components/schemas/AnthropicCitationCharLocation' + - $ref: '#/components/schemas/AnthropicCitationPageLocation' + - $ref: '#/components/schemas/AnthropicCitationContentBlockLocation' + - $ref: '#/components/schemas/AnthropicCitationWebSearchResultLocation' + - $ref: '#/components/schemas/AnthropicCitationSearchResultLocation' + discriminator: + propertyName: type + mapping: + char_location: '#/components/schemas/AnthropicCitationCharLocation' + page_location: '#/components/schemas/AnthropicCitationPageLocation' + content_block_location: '#/components/schemas/AnthropicCitationContentBlockLocation' + web_search_result_location: '#/components/schemas/AnthropicCitationWebSearchResultLocation' + search_result_location: '#/components/schemas/AnthropicCitationSearchResultLocation' + example: + type: char_location + cited_text: Example text + document_index: 0 + document_title: null + start_char_index: 0 + end_char_index: 10 + file_id: null + AnthropicTextBlock: + type: object + properties: + type: + type: string + enum: + - text + text: + type: string + citations: type: array + nullable: true items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - text - text: - type: string - citations: - type: array - nullable: true - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - char_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_char_index: - type: number - end_char_index: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_char_index - - end_char_index - - file_id - - type: object - properties: - type: - type: string - enum: - - page_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_page_number: - type: number - end_page_number: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_page_number - - end_page_number - - file_id - - type: object - properties: - type: - type: string - enum: - - content_block_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_block_index - - end_block_index - - file_id - - type: object - properties: - type: - type: string - enum: - - web_search_result_location - cited_text: - type: string - encrypted_index: - type: string - title: - type: string - nullable: true - url: - type: string - required: - - type - - cited_text - - encrypted_index - - title - - url - - type: object - properties: - type: - type: string - enum: - - search_result_location - cited_text: - type: string - search_result_index: - type: number - source: - type: string - title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - search_result_index - - source - - title - - start_block_index - - end_block_index - required: - - type - - text - - citations - - type: object - properties: - type: - type: string - enum: - - tool_use - id: - type: string - caller: - oneOf: - - type: object - properties: - type: - type: string - enum: - - direct - required: - - type - - type: object - properties: - type: - type: string - enum: - - code_execution_20250825 - tool_id: - type: string - required: - - type - - tool_id - - type: object - properties: - type: - type: string - enum: - - code_execution_20260120 - tool_id: - type: string - required: - - type - - tool_id - name: - type: string - input: - nullable: true - required: - - type - - id - - caller - - name - - type: object - properties: - type: - type: string - enum: - - thinking - thinking: - type: string - signature: - type: string - required: - - type - - thinking - - signature - - type: object - properties: - type: - type: string - enum: - - redacted_thinking - data: - type: string - required: - - type - - data - - type: object - properties: - type: - type: string - enum: - - server_tool_use - id: - type: string - caller: - oneOf: - - type: object - properties: - type: - type: string - enum: - - direct - required: - - type - - type: object - properties: - type: - type: string - enum: - - code_execution_20250825 - tool_id: - type: string - required: - - type - - tool_id - - type: object - properties: - type: - type: string - enum: - - code_execution_20260120 - tool_id: - type: string - required: - - type - - tool_id - name: - type: string - enum: - - web_search - - web_fetch - - code_execution - - bash_code_execution - - text_editor_code_execution - - tool_search_tool_regex - - tool_search_tool_bm25 - x-speakeasy-unknown-values: allow - input: - nullable: true - required: - - type - - id - - caller - - name - - type: object - properties: - type: - type: string - enum: - - web_search_tool_result - caller: - oneOf: - - type: object - properties: - type: - type: string - enum: - - direct - required: - - type - - type: object - properties: - type: - type: string - enum: - - code_execution_20250825 - tool_id: - type: string - required: - - type - - tool_id - - type: object - properties: - type: - type: string - enum: - - code_execution_20260120 - tool_id: - type: string - required: - - type - - tool_id - tool_use_id: - type: string - content: - anyOf: - - type: array - items: - type: object - properties: - type: - type: string - enum: - - web_search_result - encrypted_content: - type: string - page_age: - type: string - nullable: true - title: - type: string - url: - type: string - required: - - type - - encrypted_content - - page_age - - title - - url - - type: object - properties: - type: - type: string - enum: - - web_search_tool_result_error - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - max_uses_exceeded - - too_many_requests - - query_too_long - - request_too_large - x-speakeasy-unknown-values: allow - required: - - type - - error_code - required: - - type - - caller - - tool_use_id - - content - - type: object - properties: - type: - type: string - enum: - - web_fetch_tool_result - caller: - oneOf: - - type: object - properties: - type: - type: string - enum: - - direct - required: - - type - - type: object - properties: - type: - type: string - enum: - - code_execution_20250825 - tool_id: - type: string - required: - - type - - tool_id - - type: object - properties: - type: - type: string - enum: - - code_execution_20260120 - tool_id: - type: string - required: - - type - - tool_id - content: - oneOf: - - type: object - properties: - type: - type: string - enum: - - web_fetch_tool_result_error - error_code: - type: string - enum: - - invalid_tool_input - - url_too_long - - url_not_allowed - - url_not_accessible - - unsupported_content_type - - too_many_requests - - max_uses_exceeded - - unavailable - x-speakeasy-unknown-values: allow - required: - - type - - error_code - - type: object - properties: - content: - type: object - properties: - citations: - type: object - nullable: true - properties: - enabled: - type: boolean - required: - - enabled - source: - anyOf: - - type: object - properties: - data: - type: string - media_type: - type: string - enum: - - application/pdf - type: - type: string - enum: - - base64 - required: - - data - - media_type - - type - - type: object - properties: - data: - type: string - media_type: - type: string - enum: - - text/plain - type: - type: string - enum: - - text - required: - - data - - media_type - - type - title: - type: string - nullable: true - type: - type: string - enum: - - document - required: - - citations - - source - - title - - type - retrieved_at: - type: string - nullable: true - type: - type: string - enum: - - web_fetch_result - url: - type: string - required: - - content - - retrieved_at - - type - - url - tool_use_id: - type: string - required: - - type - - caller - - content - - tool_use_id - - type: object - properties: - type: - type: string - enum: - - code_execution_tool_result - content: - oneOf: - - type: object - properties: - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - too_many_requests - - execution_time_exceeded - x-speakeasy-unknown-values: allow - type: - type: string - enum: - - code_execution_tool_result_error - required: - - error_code - - type - - type: object - properties: - content: - type: array - items: - type: object - properties: - file_id: - type: string - type: - type: string - enum: - - code_execution_output - required: - - file_id - - type - return_code: - type: number - stderr: - type: string - stdout: - type: string - type: - type: string - enum: - - code_execution_result - required: - - content - - return_code - - stderr - - stdout - - type - - type: object - properties: - content: - type: array - items: - type: object - properties: - file_id: - type: string - type: - type: string - enum: - - code_execution_output - required: - - file_id - - type - encrypted_stdout: - type: string - return_code: - type: number - stderr: - type: string - type: - type: string - enum: - - encrypted_code_execution_result - required: - - content - - encrypted_stdout - - return_code - - stderr - - type - tool_use_id: - type: string - required: - - type - - content - - tool_use_id - - type: object - properties: - type: - type: string - enum: - - bash_code_execution_tool_result - content: - oneOf: - - type: object - properties: - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - too_many_requests - - execution_time_exceeded - - output_file_too_large - x-speakeasy-unknown-values: allow - type: - type: string - enum: - - bash_code_execution_tool_result_error - required: - - error_code - - type - - type: object - properties: - content: - type: array - items: - type: object - properties: - file_id: - type: string - type: - type: string - enum: - - bash_code_execution_output - required: - - file_id - - type - return_code: - type: number - stderr: - type: string - stdout: - type: string - type: - type: string - enum: - - bash_code_execution_result - required: - - content - - return_code - - stderr - - stdout - - type - tool_use_id: - type: string - required: - - type - - content - - tool_use_id - - type: object - properties: - type: - type: string - enum: - - text_editor_code_execution_tool_result - content: - oneOf: - - type: object - properties: - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - too_many_requests - - execution_time_exceeded - - file_not_found - x-speakeasy-unknown-values: allow - error_message: - type: string - nullable: true - type: - type: string - enum: - - text_editor_code_execution_tool_result_error - required: - - error_code - - error_message - - type - - type: object - properties: - content: - type: string - file_type: - type: string - enum: - - text - - image - - pdf - x-speakeasy-unknown-values: allow - num_lines: - type: number - nullable: true - start_line: - type: number - nullable: true - total_lines: - type: number - nullable: true - type: - type: string - enum: - - text_editor_code_execution_view_result - required: - - content - - file_type - - num_lines - - start_line - - total_lines - - type - - type: object - properties: - is_file_update: - type: boolean - type: - type: string - enum: - - text_editor_code_execution_create_result - required: - - is_file_update - - type - - type: object - properties: - lines: - type: array - nullable: true - items: - type: string - new_lines: - type: number - nullable: true - new_start: - type: number - nullable: true - old_lines: - type: number - nullable: true - old_start: - type: number - nullable: true - type: - type: string - enum: - - text_editor_code_execution_str_replace_result - required: - - lines - - new_lines - - new_start - - old_lines - - old_start - - type - tool_use_id: - type: string - required: - - type - - content - - tool_use_id - - type: object - properties: - type: - type: string - enum: - - tool_search_tool_result - content: - oneOf: - - type: object - properties: - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - too_many_requests - - execution_time_exceeded - x-speakeasy-unknown-values: allow - error_message: - type: string - nullable: true - type: - type: string - enum: - - tool_search_tool_result_error - required: - - error_code - - error_message - - type - - type: object - properties: - tool_references: - type: array - items: - type: object - properties: - tool_name: - type: string - type: - type: string - enum: - - tool_reference - required: - - tool_name - - type - type: - type: string - enum: - - tool_search_tool_search_result - required: - - tool_references - - type - tool_use_id: - type: string - required: - - type - - content - - tool_use_id - - type: object - properties: - type: - type: string - enum: - - container_upload - file_id: - type: string - required: - - type - - file_id - model: - type: string - stop_reason: - type: string - nullable: true - enum: - - end_turn - - max_tokens - - stop_sequence - - tool_use - - pause_turn - - refusal - x-speakeasy-unknown-values: allow - stop_sequence: - type: string - nullable: true - usage: - type: object - properties: - input_tokens: - type: number - output_tokens: - type: number - cache_creation_input_tokens: - type: number - nullable: true - cache_read_input_tokens: - type: number - nullable: true - cache_creation: - type: object - nullable: true - properties: - ephemeral_5m_input_tokens: - type: number - ephemeral_1h_input_tokens: - type: number - required: - - ephemeral_5m_input_tokens - - ephemeral_1h_input_tokens - inference_geo: - type: string - nullable: true - server_tool_use: - type: object - nullable: true - properties: - web_search_requests: - type: number - web_fetch_requests: - type: number - required: - - web_search_requests - - web_fetch_requests - service_tier: - type: string - nullable: true - enum: - - standard - - priority - - batch - x-speakeasy-unknown-values: allow - speed: - type: string - nullable: true - enum: - - fast - - standard - x-speakeasy-unknown-values: allow - required: - - input_tokens - - output_tokens - - cache_creation_input_tokens - - cache_read_input_tokens - - cache_creation - - inference_geo - - server_tool_use - - service_tier - required: - - id - - type - - role - - container - - content - - model - - stop_reason - - stop_sequence - - usage - MessagesResult: - allOf: - - $ref: '#/components/schemas/BaseMessagesResult' - - type: object - properties: - usage: - type: object - properties: - input_tokens: - type: number - output_tokens: - type: number - cache_creation_input_tokens: - type: number - nullable: true - cache_read_input_tokens: - type: number - nullable: true - cache_creation: - type: object - nullable: true - properties: - ephemeral_5m_input_tokens: - type: number - ephemeral_1h_input_tokens: - type: number - required: - - ephemeral_5m_input_tokens - - ephemeral_1h_input_tokens - inference_geo: - type: string - nullable: true - server_tool_use: - type: object - nullable: true - properties: - web_search_requests: - type: number - web_fetch_requests: - type: number - required: - - web_search_requests - - web_fetch_requests - service_tier: - type: string - nullable: true - speed: - type: string - nullable: true - enum: - - fast - - standard - x-speakeasy-unknown-values: allow - cost: - type: number - nullable: true - is_byok: - type: boolean - cost_details: - type: object - nullable: true - properties: - upstream_inference_cost: - type: number - nullable: true - upstream_inference_prompt_cost: - type: number - upstream_inference_completions_cost: - type: number - required: - - upstream_inference_prompt_cost - - upstream_inference_completions_cost - required: - - input_tokens - - output_tokens - - cache_creation_input_tokens - - cache_read_input_tokens - - cache_creation - - inference_geo - - server_tool_use - - service_tier - provider: - type: string - enum: - - AnyScale - - Atoma - - Cent-ML - - CrofAI - - Enfer - - GoPomelo - - HuggingFace - - Hyperbolic 2 - - InoCloud - - Kluster - - Lambda - - Lepton - - Lynn 2 - - Lynn - - Mancer - - Meta - - Modal - - Nineteen - - OctoAI - - Recursal - - Reflection - - Replicate - - SambaNova 2 - - SF Compute - - Targon - - Together 2 - - Ubicloud - - 01.AI - - AkashML - - AI21 - - AionLabs - - Alibaba - - Ambient - - 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 - - Google - - Google AI Studio - - Groq - - Hyperbolic - - Inception - - Inceptron - - InferenceNet - - Ionstream - - Infermatic - - Io Net - - Inflection - - Liquid - - Mara - - Mancer 2 - - Minimax - - ModelRun - - Mistral - - Modular - - Moonshot AI - - Morph - - NCompass - - Nebius - - NextBit - - Novita - - Nvidia - - OpenAI - - OpenInference - - Parasail - - Perplexity - - Phala - - Reka - - Relace - - SambaNova - - Seed - - SiliconFlow - - Sourceful - - StepFun - - Stealth - - StreamLake - - Switchpoint - - Together - - Upstage - - Venice - - WandB - - Xiaomi - - xAI - - Z.AI - - FakeProvider - x-speakeasy-unknown-values: allow - description: Non-streaming response from the Anthropic Messages API with OpenRouter extensions - example: - id: msg_01XFDUDYJgAACzvnptvVoYEL - type: message - role: assistant - container: null - content: - - type: text - text: Hello! I'm doing well, thank you for asking. - citations: null - model: claude-sonnet-4-5-20250929 - stop_reason: end_turn - stop_sequence: null - usage: - input_tokens: 12 - output_tokens: 15 - cache_creation_input_tokens: null - cache_read_input_tokens: null - cache_creation: null - inference_geo: null - server_tool_use: null - service_tier: standard - MessagesStartEvent: - type: object - properties: - type: - type: string - enum: - - message_start - message: - type: object - properties: - id: - type: string - type: - type: string - enum: - - message - role: - type: string - enum: - - assistant - container: - type: object - nullable: true - properties: - id: - type: string - expires_at: - type: string - required: - - id - - expires_at - content: - type: array - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - text - text: - type: string - citations: - type: array - nullable: true - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - char_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_char_index: - type: number - end_char_index: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_char_index - - end_char_index - - file_id - - type: object - properties: - type: - type: string - enum: - - page_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_page_number: - type: number - end_page_number: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_page_number - - end_page_number - - file_id - - type: object - properties: - type: - type: string - enum: - - content_block_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_block_index - - end_block_index - - file_id - - type: object - properties: - type: - type: string - enum: - - web_search_result_location - cited_text: - type: string - encrypted_index: - type: string - title: - type: string - nullable: true - url: - type: string - required: - - type - - cited_text - - encrypted_index - - title - - url - - type: object - properties: - type: - type: string - enum: - - search_result_location - cited_text: - type: string - search_result_index: - type: number - source: - type: string - title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - search_result_index - - source - - title - - start_block_index - - end_block_index - required: - - type - - text - - citations - - type: object - properties: - type: - type: string - enum: - - tool_use - id: - type: string - caller: - oneOf: - - type: object - properties: - type: - type: string - enum: - - direct - required: - - type - - type: object - properties: - type: - type: string - enum: - - code_execution_20250825 - tool_id: - type: string - required: - - type - - tool_id - - type: object - properties: - type: - type: string - enum: - - code_execution_20260120 - tool_id: - type: string - required: - - type - - tool_id - name: - type: string - input: - nullable: true - required: - - type - - id - - caller - - name - - type: object - properties: - type: - type: string - enum: - - thinking - thinking: - type: string - signature: - type: string - required: - - type - - thinking - - signature - - type: object - properties: - type: - type: string - enum: - - redacted_thinking - data: - type: string - required: - - type - - data - - type: object - properties: - type: - type: string - enum: - - server_tool_use - id: - type: string - caller: - oneOf: - - type: object - properties: - type: - type: string - enum: - - direct - required: - - type - - type: object - properties: - type: - type: string - enum: - - code_execution_20250825 - tool_id: - type: string - required: - - type - - tool_id - - type: object - properties: - type: - type: string - enum: - - code_execution_20260120 - tool_id: - type: string - required: - - type - - tool_id - name: - type: string - enum: - - web_search - - web_fetch - - code_execution - - bash_code_execution - - text_editor_code_execution - - tool_search_tool_regex - - tool_search_tool_bm25 - x-speakeasy-unknown-values: allow - input: - nullable: true - required: - - type - - id - - caller - - name - - type: object - properties: - type: - type: string - enum: - - web_search_tool_result - caller: - oneOf: - - type: object - properties: - type: - type: string - enum: - - direct - required: - - type - - type: object - properties: - type: - type: string - enum: - - code_execution_20250825 - tool_id: - type: string - required: - - type - - tool_id - - type: object - properties: - type: - type: string - enum: - - code_execution_20260120 - tool_id: - type: string - required: - - type - - tool_id - tool_use_id: - type: string - content: - anyOf: - - type: array - items: - type: object - properties: - type: - type: string - enum: - - web_search_result - encrypted_content: - type: string - page_age: - type: string - nullable: true - title: - type: string - url: - type: string - required: - - type - - encrypted_content - - page_age - - title - - url - - type: object - properties: - type: - type: string - enum: - - web_search_tool_result_error - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - max_uses_exceeded - - too_many_requests - - query_too_long - - request_too_large - x-speakeasy-unknown-values: allow - required: - - type - - error_code - required: - - type - - caller - - tool_use_id - - content - - type: object - properties: - type: - type: string - enum: - - web_fetch_tool_result - caller: - oneOf: - - type: object - properties: - type: - type: string - enum: - - direct - required: - - type - - type: object - properties: - type: - type: string - enum: - - code_execution_20250825 - tool_id: - type: string - required: - - type - - tool_id - - type: object - properties: - type: - type: string - enum: - - code_execution_20260120 - tool_id: - type: string - required: - - type - - tool_id - content: - oneOf: - - type: object - properties: - type: - type: string - enum: - - web_fetch_tool_result_error - error_code: - type: string - enum: - - invalid_tool_input - - url_too_long - - url_not_allowed - - url_not_accessible - - unsupported_content_type - - too_many_requests - - max_uses_exceeded - - unavailable - x-speakeasy-unknown-values: allow - required: - - type - - error_code - - type: object - properties: - content: - type: object - properties: - citations: - type: object - nullable: true - properties: - enabled: - type: boolean - required: - - enabled - source: - anyOf: - - type: object - properties: - data: - type: string - media_type: - type: string - enum: - - application/pdf - type: - type: string - enum: - - base64 - required: - - data - - media_type - - type - - type: object - properties: - data: - type: string - media_type: - type: string - enum: - - text/plain - type: - type: string - enum: - - text - required: - - data - - media_type - - type - title: - type: string - nullable: true - type: - type: string - enum: - - document - required: - - citations - - source - - title - - type - retrieved_at: - type: string - nullable: true - type: - type: string - enum: - - web_fetch_result - url: - type: string - required: - - content - - retrieved_at - - type - - url - tool_use_id: - type: string - required: - - type - - caller - - content - - tool_use_id - - type: object - properties: - type: - type: string - enum: - - code_execution_tool_result - content: - oneOf: - - type: object - properties: - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - too_many_requests - - execution_time_exceeded - x-speakeasy-unknown-values: allow - type: - type: string - enum: - - code_execution_tool_result_error - required: - - error_code - - type - - type: object - properties: - content: - type: array - items: - type: object - properties: - file_id: - type: string - type: - type: string - enum: - - code_execution_output - required: - - file_id - - type - return_code: - type: number - stderr: - type: string - stdout: - type: string - type: - type: string - enum: - - code_execution_result - required: - - content - - return_code - - stderr - - stdout - - type - - type: object - properties: - content: - type: array - items: - type: object - properties: - file_id: - type: string - type: - type: string - enum: - - code_execution_output - required: - - file_id - - type - encrypted_stdout: - type: string - return_code: - type: number - stderr: - type: string - type: - type: string - enum: - - encrypted_code_execution_result - required: - - content - - encrypted_stdout - - return_code - - stderr - - type - tool_use_id: - type: string - required: - - type - - content - - tool_use_id - - type: object - properties: - type: - type: string - enum: - - bash_code_execution_tool_result - content: - oneOf: - - type: object - properties: - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - too_many_requests - - execution_time_exceeded - - output_file_too_large - x-speakeasy-unknown-values: allow - type: - type: string - enum: - - bash_code_execution_tool_result_error - required: - - error_code - - type - - type: object - properties: - content: - type: array - items: - type: object - properties: - file_id: - type: string - type: - type: string - enum: - - bash_code_execution_output - required: - - file_id - - type - return_code: - type: number - stderr: - type: string - stdout: - type: string - type: - type: string - enum: - - bash_code_execution_result - required: - - content - - return_code - - stderr - - stdout - - type - tool_use_id: - type: string - required: - - type - - content - - tool_use_id - - type: object - properties: - type: - type: string - enum: - - text_editor_code_execution_tool_result - content: - oneOf: - - type: object - properties: - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - too_many_requests - - execution_time_exceeded - - file_not_found - x-speakeasy-unknown-values: allow - error_message: - type: string - nullable: true - type: - type: string - enum: - - text_editor_code_execution_tool_result_error - required: - - error_code - - error_message - - type - - type: object - properties: - content: - type: string - file_type: - type: string - enum: - - text - - image - - pdf - x-speakeasy-unknown-values: allow - num_lines: - type: number - nullable: true - start_line: - type: number - nullable: true - total_lines: - type: number - nullable: true - type: - type: string - enum: - - text_editor_code_execution_view_result - required: - - content - - file_type - - num_lines - - start_line - - total_lines - - type - - type: object - properties: - is_file_update: - type: boolean - type: - type: string - enum: - - text_editor_code_execution_create_result - required: - - is_file_update - - type - - type: object - properties: - lines: - type: array - nullable: true - items: - type: string - new_lines: - type: number - nullable: true - new_start: - type: number - nullable: true - old_lines: - type: number - nullable: true - old_start: - type: number - nullable: true - type: - type: string - enum: - - text_editor_code_execution_str_replace_result - required: - - lines - - new_lines - - new_start - - old_lines - - old_start - - type - tool_use_id: - type: string - required: - - type - - content - - tool_use_id - - type: object - properties: - type: - type: string - enum: - - tool_search_tool_result - content: - oneOf: - - type: object - properties: - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - too_many_requests - - execution_time_exceeded - x-speakeasy-unknown-values: allow - error_message: - type: string - nullable: true - type: - type: string - enum: - - tool_search_tool_result_error - required: - - error_code - - error_message - - type - - type: object - properties: - tool_references: - type: array - items: - type: object - properties: - tool_name: - type: string - type: - type: string - enum: - - tool_reference - required: - - tool_name - - type - type: - type: string - enum: - - tool_search_tool_search_result - required: - - tool_references - - type - tool_use_id: - type: string - required: - - type - - content - - tool_use_id - - type: object - properties: - type: - type: string - enum: - - container_upload - file_id: - type: string - required: - - type - - file_id - model: - type: string - stop_reason: - nullable: true - stop_sequence: - nullable: true - usage: - type: object - properties: - input_tokens: - type: number - output_tokens: - type: number - cache_creation_input_tokens: - type: number - nullable: true - cache_read_input_tokens: - type: number - nullable: true - cache_creation: - type: object - nullable: true - properties: - ephemeral_5m_input_tokens: - type: number - ephemeral_1h_input_tokens: - type: number - required: - - ephemeral_5m_input_tokens - - ephemeral_1h_input_tokens - inference_geo: - type: string - nullable: true - server_tool_use: - type: object - nullable: true - properties: - web_search_requests: - type: number - web_fetch_requests: - type: number - required: - - web_search_requests - - web_fetch_requests - service_tier: - type: string - nullable: true - enum: - - standard - - priority - - batch - x-speakeasy-unknown-values: allow - speed: - type: string - nullable: true - enum: - - fast - - standard - x-speakeasy-unknown-values: allow - required: - - input_tokens - - output_tokens - - cache_creation_input_tokens - - cache_read_input_tokens - - cache_creation - - inference_geo - - server_tool_use - - service_tier - provider: - type: string - enum: - - AnyScale - - Atoma - - Cent-ML - - CrofAI - - Enfer - - GoPomelo - - HuggingFace - - Hyperbolic 2 - - InoCloud - - Kluster - - Lambda - - Lepton - - Lynn 2 - - Lynn - - Mancer - - Meta - - Modal - - Nineteen - - OctoAI - - Recursal - - Reflection - - Replicate - - SambaNova 2 - - SF Compute - - Targon - - Together 2 - - Ubicloud - - 01.AI - - AkashML - - AI21 - - AionLabs - - Alibaba - - Ambient - - 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 - - Google - - Google AI Studio - - Groq - - Hyperbolic - - Inception - - Inceptron - - InferenceNet - - Ionstream - - Infermatic - - Io Net - - Inflection - - Liquid - - Mara - - Mancer 2 - - Minimax - - ModelRun - - Mistral - - Modular - - Moonshot AI - - Morph - - NCompass - - Nebius - - NextBit - - Novita - - Nvidia - - OpenAI - - OpenInference - - Parasail - - Perplexity - - Phala - - Reka - - Relace - - SambaNova - - Seed - - SiliconFlow - - Sourceful - - StepFun - - Stealth - - StreamLake - - Switchpoint - - Together - - Upstage - - Venice - - WandB - - Xiaomi - - xAI - - Z.AI - - FakeProvider - x-speakeasy-unknown-values: allow - required: - - id - - type - - role - - container - - content - - model - - stop_reason - - stop_sequence - - usage - required: - - type - - message - description: Event sent at the start of a streaming message - MessagesStreamEvents: - oneOf: - - $ref: '#/components/schemas/MessagesStartEvent' - - type: object - properties: - type: - type: string - enum: - - message_delta - delta: - type: object - properties: - container: - type: object - nullable: true - properties: - id: - type: string - expires_at: - type: string - required: - - id - - expires_at - stop_reason: - type: string - nullable: true - enum: - - end_turn - - max_tokens - - stop_sequence - - tool_use - - pause_turn - - refusal - x-speakeasy-unknown-values: allow - stop_sequence: - type: string - nullable: true - required: - - container - - stop_reason - - stop_sequence - usage: - type: object - properties: - input_tokens: - type: number - nullable: true - output_tokens: - type: number - cache_creation_input_tokens: - type: number - nullable: true - cache_read_input_tokens: - type: number - nullable: true - server_tool_use: - type: object - nullable: true - properties: - web_search_requests: - type: number - web_fetch_requests: - type: number - required: - - web_search_requests - - web_fetch_requests - required: - - input_tokens - - output_tokens - - cache_creation_input_tokens - - cache_read_input_tokens - - server_tool_use - required: - - type - - delta - - usage - - type: object - properties: - type: - type: string - enum: - - message_stop - required: - - type - - type: object - properties: - type: - type: string - enum: - - content_block_start - index: - type: number - content_block: - oneOf: - - type: object - properties: - type: - type: string - enum: - - text - text: - type: string - citations: - type: array - nullable: true - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - char_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_char_index: - type: number - end_char_index: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_char_index - - end_char_index - - file_id - - type: object - properties: - type: - type: string - enum: - - page_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_page_number: - type: number - end_page_number: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_page_number - - end_page_number - - file_id - - type: object - properties: - type: - type: string - enum: - - content_block_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_block_index - - end_block_index - - file_id - - type: object - properties: - type: - type: string - enum: - - web_search_result_location - cited_text: - type: string - encrypted_index: - type: string - title: - type: string - nullable: true - url: - type: string - required: - - type - - cited_text - - encrypted_index - - title - - url - - type: object - properties: - type: - type: string - enum: - - search_result_location - cited_text: - type: string - search_result_index: - type: number - source: - type: string - title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - search_result_index - - source - - title - - start_block_index - - end_block_index - required: - - type - - text - - citations - - type: object - properties: - type: - type: string - enum: - - tool_use - id: - type: string - caller: - oneOf: - - type: object - properties: - type: - type: string - enum: - - direct - required: - - type - - type: object - properties: - type: - type: string - enum: - - code_execution_20250825 - tool_id: - type: string - required: - - type - - tool_id - - type: object - properties: - type: - type: string - enum: - - code_execution_20260120 - tool_id: - type: string - required: - - type - - tool_id - name: - type: string - input: - nullable: true - required: - - type - - id - - caller - - name - - type: object - properties: - type: - type: string - enum: - - thinking - thinking: - type: string - signature: - type: string - required: - - type - - thinking - - signature - - type: object - properties: - type: - type: string - enum: - - redacted_thinking - data: - type: string - required: - - type - - data - - type: object - properties: - type: - type: string - enum: - - server_tool_use - id: - type: string - caller: - oneOf: - - type: object - properties: - type: - type: string - enum: - - direct - required: - - type - - type: object - properties: - type: - type: string - enum: - - code_execution_20250825 - tool_id: - type: string - required: - - type - - tool_id - - type: object - properties: - type: - type: string - enum: - - code_execution_20260120 - tool_id: - type: string - required: - - type - - tool_id - name: - type: string - enum: - - web_search - - web_fetch - - code_execution - - bash_code_execution - - text_editor_code_execution - - tool_search_tool_regex - - tool_search_tool_bm25 - x-speakeasy-unknown-values: allow - input: - nullable: true - required: - - type - - id - - caller - - name - - type: object - properties: - type: - type: string - enum: - - web_search_tool_result - caller: - oneOf: - - type: object - properties: - type: - type: string - enum: - - direct - required: - - type - - type: object - properties: - type: - type: string - enum: - - code_execution_20250825 - tool_id: - type: string - required: - - type - - tool_id - - type: object - properties: - type: - type: string - enum: - - code_execution_20260120 - tool_id: - type: string - required: - - type - - tool_id - tool_use_id: - type: string - content: - anyOf: - - type: array - items: - type: object - properties: - type: - type: string - enum: - - web_search_result - encrypted_content: - type: string - page_age: - type: string - nullable: true - title: - type: string - url: - type: string - required: - - type - - encrypted_content - - page_age - - title - - url - - type: object - properties: - type: - type: string - enum: - - web_search_tool_result_error - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - max_uses_exceeded - - too_many_requests - - query_too_long - - request_too_large - x-speakeasy-unknown-values: allow - required: - - type - - error_code - required: - - type - - caller - - tool_use_id - - content - - type: object - properties: - type: - type: string - enum: - - web_fetch_tool_result - caller: - oneOf: - - type: object - properties: - type: - type: string - enum: - - direct - required: - - type - - type: object - properties: - type: - type: string - enum: - - code_execution_20250825 - tool_id: - type: string - required: - - type - - tool_id - - type: object - properties: - type: - type: string - enum: - - code_execution_20260120 - tool_id: - type: string - required: - - type - - tool_id - content: - oneOf: - - type: object - properties: - type: - type: string - enum: - - web_fetch_tool_result_error - error_code: - type: string - enum: - - invalid_tool_input - - url_too_long - - url_not_allowed - - url_not_accessible - - unsupported_content_type - - too_many_requests - - max_uses_exceeded - - unavailable - x-speakeasy-unknown-values: allow - required: - - type - - error_code - - type: object - properties: - content: - type: object - properties: - citations: - type: object - nullable: true - properties: - enabled: - type: boolean - required: - - enabled - source: - anyOf: - - type: object - properties: - data: - type: string - media_type: - type: string - enum: - - application/pdf - type: - type: string - enum: - - base64 - required: - - data - - media_type - - type - - type: object - properties: - data: - type: string - media_type: - type: string - enum: - - text/plain - type: - type: string - enum: - - text - required: - - data - - media_type - - type - title: - type: string - nullable: true - type: - type: string - enum: - - document - required: - - citations - - source - - title - - type - retrieved_at: - type: string - nullable: true - type: - type: string - enum: - - web_fetch_result - url: - type: string - required: - - content - - retrieved_at - - type - - url - tool_use_id: - type: string - required: - - type - - caller - - content - - tool_use_id - - type: object - properties: - type: - type: string - enum: - - code_execution_tool_result - content: - oneOf: - - type: object - properties: - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - too_many_requests - - execution_time_exceeded - x-speakeasy-unknown-values: allow - type: - type: string - enum: - - code_execution_tool_result_error - required: - - error_code - - type - - type: object - properties: - content: - type: array - items: - type: object - properties: - file_id: - type: string - type: - type: string - enum: - - code_execution_output - required: - - file_id - - type - return_code: - type: number - stderr: - type: string - stdout: - type: string - type: - type: string - enum: - - code_execution_result - required: - - content - - return_code - - stderr - - stdout - - type - - type: object - properties: - content: - type: array - items: - type: object - properties: - file_id: - type: string - type: - type: string - enum: - - code_execution_output - required: - - file_id - - type - encrypted_stdout: - type: string - return_code: - type: number - stderr: - type: string - type: - type: string - enum: - - encrypted_code_execution_result - required: - - content - - encrypted_stdout - - return_code - - stderr - - type - tool_use_id: - type: string - required: - - type - - content - - tool_use_id - - type: object - properties: - type: - type: string - enum: - - bash_code_execution_tool_result - content: - oneOf: - - type: object - properties: - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - too_many_requests - - execution_time_exceeded - - output_file_too_large - x-speakeasy-unknown-values: allow - type: - type: string - enum: - - bash_code_execution_tool_result_error - required: - - error_code - - type - - type: object - properties: - content: - type: array - items: - type: object - properties: - file_id: - type: string - type: - type: string - enum: - - bash_code_execution_output - required: - - file_id - - type - return_code: - type: number - stderr: - type: string - stdout: - type: string - type: - type: string - enum: - - bash_code_execution_result - required: - - content - - return_code - - stderr - - stdout - - type - tool_use_id: - type: string - required: - - type - - content - - tool_use_id - - type: object - properties: - type: - type: string - enum: - - text_editor_code_execution_tool_result - content: - oneOf: - - type: object - properties: - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - too_many_requests - - execution_time_exceeded - - file_not_found - x-speakeasy-unknown-values: allow - error_message: - type: string - nullable: true - type: - type: string - enum: - - text_editor_code_execution_tool_result_error - required: - - error_code - - error_message - - type - - type: object - properties: - content: - type: string - file_type: - type: string - enum: - - text - - image - - pdf - x-speakeasy-unknown-values: allow - num_lines: - type: number - nullable: true - start_line: - type: number - nullable: true - total_lines: - type: number - nullable: true - type: - type: string - enum: - - text_editor_code_execution_view_result - required: - - content - - file_type - - num_lines - - start_line - - total_lines - - type - - type: object - properties: - is_file_update: - type: boolean - type: - type: string - enum: - - text_editor_code_execution_create_result - required: - - is_file_update - - type - - type: object - properties: - lines: - type: array - nullable: true - items: - type: string - new_lines: - type: number - nullable: true - new_start: - type: number - nullable: true - old_lines: - type: number - nullable: true - old_start: - type: number - nullable: true - type: - type: string - enum: - - text_editor_code_execution_str_replace_result - required: - - lines - - new_lines - - new_start - - old_lines - - old_start - - type - tool_use_id: - type: string - required: - - type - - content - - tool_use_id - - type: object - properties: - type: - type: string - enum: - - tool_search_tool_result - content: - oneOf: - - type: object - properties: - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - too_many_requests - - execution_time_exceeded - x-speakeasy-unknown-values: allow - error_message: - type: string - nullable: true - type: - type: string - enum: - - tool_search_tool_result_error - required: - - error_code - - error_message - - type - - type: object - properties: - tool_references: - type: array - items: - type: object - properties: - tool_name: - type: string - type: - type: string - enum: - - tool_reference - required: - - tool_name - - type - type: - type: string - enum: - - tool_search_tool_search_result - required: - - tool_references - - type - tool_use_id: - type: string - required: - - type - - content - - tool_use_id - - type: object - properties: - type: - type: string - enum: - - container_upload - file_id: - type: string - required: - - type - - file_id - required: - - type - - index - - content_block - - type: object - properties: - type: - type: string - enum: - - content_block_delta - index: - type: number - delta: - oneOf: - - type: object - properties: - type: - type: string - enum: - - text_delta - text: - type: string - required: - - type - - text - - type: object - properties: - type: - type: string - enum: - - input_json_delta - partial_json: - type: string - required: - - type - - partial_json - - type: object - properties: - type: - type: string - enum: - - thinking_delta - thinking: - type: string - required: - - type - - thinking - - type: object - properties: - type: - type: string - enum: - - signature_delta - signature: - type: string - required: - - type - - signature - - type: object - properties: - type: - type: string - enum: - - citations_delta - citation: - oneOf: - - type: object - properties: - type: - type: string - enum: - - char_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_char_index: - type: number - end_char_index: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_char_index - - end_char_index - - file_id - - type: object - properties: - type: - type: string - enum: - - page_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_page_number: - type: number - end_page_number: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_page_number - - end_page_number - - file_id - - type: object - properties: - type: - type: string - enum: - - content_block_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_block_index - - end_block_index - - file_id - - type: object - properties: - type: - type: string - enum: - - web_search_result_location - cited_text: - type: string - encrypted_index: - type: string - title: - type: string - nullable: true - url: - type: string - required: - - type - - cited_text - - encrypted_index - - title - - url - - type: object - properties: - type: - type: string - enum: - - search_result_location - cited_text: - type: string - search_result_index: - type: number - source: - type: string - title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - search_result_index - - source - - title - - start_block_index - - end_block_index - required: - - type - - citation - required: - - type - - index - - delta - - type: object - properties: - type: - type: string - enum: - - content_block_stop - index: - type: number - required: - - type - - index - - type: object - properties: - type: - type: string - enum: - - ping - required: - - type - - type: object - properties: - type: - type: string - enum: - - error - error: - type: object - properties: - type: - type: string - message: - type: string - required: - - type - - message - required: - - type - - error - description: Union of all possible streaming events - MessagesMessageParam: - type: object - properties: - role: - type: string - enum: - - user - - assistant - x-speakeasy-unknown-values: allow - content: - anyOf: - - type: string - - type: array - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - text - text: - type: string - citations: - type: array - nullable: true - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - char_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_char_index: - type: number - end_char_index: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_char_index - - end_char_index - - type: object - properties: - type: - type: string - enum: - - page_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_page_number: - type: number - end_page_number: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_page_number - - end_page_number - - type: object - properties: - type: - type: string - enum: - - content_block_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_block_index - - end_block_index - - type: object - properties: - type: - type: string - enum: - - web_search_result_location - cited_text: - type: string - encrypted_index: - type: string - title: - type: string - nullable: true - url: - type: string - required: - - type - - cited_text - - encrypted_index - - title - - url - - type: object - properties: - type: - type: string - enum: - - search_result_location - cited_text: - type: string - search_result_index: - type: number - source: - type: string - title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - search_result_index - - source - - title - - start_block_index - - end_block_index - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - text - - type: object - properties: - type: - type: string - enum: - - image - source: - oneOf: - - type: object - properties: - type: - type: string - enum: - - base64 - media_type: - type: string - enum: - - image/jpeg - - image/png - - image/gif - - image/webp - x-speakeasy-unknown-values: allow - data: - type: string - required: - - type - - media_type - - data - - type: object - properties: - type: - type: string - enum: - - url - url: - type: string - required: - - type - - url - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - source - - type: object - properties: - type: - type: string - enum: - - document - source: - oneOf: - - type: object - properties: - type: - type: string - enum: - - base64 - media_type: - type: string - enum: - - application/pdf - data: - type: string - required: - - type - - media_type - - data - - type: object - properties: - type: - type: string - enum: - - text - media_type: - type: string - enum: - - text/plain - data: - type: string - required: - - type - - media_type - - data - - type: object - properties: - type: - type: string - enum: - - content - content: - anyOf: - - type: string - - type: array - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - text - text: - type: string - citations: - type: array - nullable: true - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - char_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_char_index: - type: number - end_char_index: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_char_index - - end_char_index - - type: object - properties: - type: - type: string - enum: - - page_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_page_number: - type: number - end_page_number: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_page_number - - end_page_number - - type: object - properties: - type: - type: string - enum: - - content_block_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_block_index - - end_block_index - - type: object - properties: - type: - type: string - enum: - - web_search_result_location - cited_text: - type: string - encrypted_index: - type: string - title: - type: string - nullable: true - url: - type: string - required: - - type - - cited_text - - encrypted_index - - title - - url - - type: object - properties: - type: - type: string - enum: - - search_result_location - cited_text: - type: string - search_result_index: - type: number - source: - type: string - title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - search_result_index - - source - - title - - start_block_index - - end_block_index - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - text - - type: object - properties: - type: - type: string - enum: - - image - source: - oneOf: - - type: object - properties: - type: - type: string - enum: - - base64 - media_type: - type: string - enum: - - image/jpeg - - image/png - - image/gif - - image/webp - x-speakeasy-unknown-values: allow - data: - type: string - required: - - type - - media_type - - data - - type: object - properties: - type: - type: string - enum: - - url - url: - type: string - required: - - type - - url - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - source - required: - - type - - content - - type: object - properties: - type: - type: string - enum: - - url - url: - type: string - required: - - type - - url - citations: - type: object - nullable: true - properties: - enabled: - type: boolean - context: - type: string - nullable: true - title: - type: string - nullable: true - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - source - - type: object - properties: - type: - type: string - enum: - - tool_use - id: - type: string - name: - type: string - input: - nullable: true - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - id - - name - - type: object - properties: - type: - type: string - enum: - - tool_result - tool_use_id: - type: string - content: - anyOf: - - type: string - - type: array - items: - anyOf: - - type: object - properties: - type: - type: string - enum: - - text - text: - type: string - citations: - type: array - nullable: true - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - char_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_char_index: - type: number - end_char_index: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_char_index - - end_char_index - - type: object - properties: - type: - type: string - enum: - - page_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_page_number: - type: number - end_page_number: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_page_number - - end_page_number - - type: object - properties: - type: - type: string - enum: - - content_block_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_block_index - - end_block_index - - type: object - properties: - type: - type: string - enum: - - web_search_result_location - cited_text: - type: string - encrypted_index: - type: string - title: - type: string - nullable: true - url: - type: string - required: - - type - - cited_text - - encrypted_index - - title - - url - - type: object - properties: - type: - type: string - enum: - - search_result_location - cited_text: - type: string - search_result_index: - type: number - source: - type: string - title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - search_result_index - - source - - title - - start_block_index - - end_block_index - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - text - - type: object - properties: - type: - type: string - enum: - - image - source: - oneOf: - - type: object - properties: - type: - type: string - enum: - - base64 - media_type: - type: string - enum: - - image/jpeg - - image/png - - image/gif - - image/webp - x-speakeasy-unknown-values: allow - data: - type: string - required: - - type - - media_type - - data - - type: object - properties: - type: - type: string - enum: - - url - url: - type: string - required: - - type - - url - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - source - - type: object - properties: - type: - type: string - enum: - - tool_reference - tool_name: - type: string - required: - - type - - tool_name - - type: object - properties: - type: - type: string - enum: - - search_result - source: - type: string - title: - type: string - content: - type: array - items: - type: object - properties: - type: - type: string - enum: - - text - text: - type: string - citations: - type: array - nullable: true - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - char_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_char_index: - type: number - end_char_index: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_char_index - - end_char_index - - type: object - properties: - type: - type: string - enum: - - page_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_page_number: - type: number - end_page_number: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_page_number - - end_page_number - - type: object - properties: - type: - type: string - enum: - - content_block_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_block_index - - end_block_index - - type: object - properties: - type: - type: string - enum: - - web_search_result_location - cited_text: - type: string - encrypted_index: - type: string - title: - type: string - nullable: true - url: - type: string - required: - - type - - cited_text - - encrypted_index - - title - - url - - type: object - properties: - type: - type: string - enum: - - search_result_location - cited_text: - type: string - search_result_index: - type: number - source: - type: string - title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - search_result_index - - source - - title - - start_block_index - - end_block_index - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - text - citations: - type: object - properties: - enabled: - type: boolean - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - source - - title - - content - - type: object - properties: - type: - type: string - enum: - - document - source: - oneOf: - - type: object - properties: - type: - type: string - enum: - - base64 - media_type: - type: string - enum: - - application/pdf - data: - type: string - required: - - type - - media_type - - data - - type: object - properties: - type: - type: string - enum: - - text - media_type: - type: string - enum: - - text/plain - data: - type: string - required: - - type - - media_type - - data - - type: object - properties: - type: - type: string - enum: - - content - content: - anyOf: - - type: string - - type: array - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - text - text: - type: string - citations: - type: array - nullable: true - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - char_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_char_index: - type: number - end_char_index: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_char_index - - end_char_index - - type: object - properties: - type: - type: string - enum: - - page_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_page_number: - type: number - end_page_number: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_page_number - - end_page_number - - type: object - properties: - type: - type: string - enum: - - content_block_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_block_index - - end_block_index - - type: object - properties: - type: - type: string - enum: - - web_search_result_location - cited_text: - type: string - encrypted_index: - type: string - title: - type: string - nullable: true - url: - type: string - required: - - type - - cited_text - - encrypted_index - - title - - url - - type: object - properties: - type: - type: string - enum: - - search_result_location - cited_text: - type: string - search_result_index: - type: number - source: - type: string - title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - search_result_index - - source - - title - - start_block_index - - end_block_index - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - text - - type: object - properties: - type: - type: string - enum: - - image - source: - oneOf: - - type: object - properties: - type: - type: string - enum: - - base64 - media_type: - type: string - enum: - - image/jpeg - - image/png - - image/gif - - image/webp - x-speakeasy-unknown-values: allow - data: - type: string - required: - - type - - media_type - - data - - type: object - properties: - type: - type: string - enum: - - url - url: - type: string - required: - - type - - url - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - source - required: - - type - - content - - type: object - properties: - type: - type: string - enum: - - url - url: - type: string - required: - - type - - url - citations: - type: object - nullable: true - properties: - enabled: - type: boolean - context: - type: string - nullable: true - title: - type: string - nullable: true - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - source - is_error: - type: boolean - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - tool_use_id - - type: object - properties: - type: - type: string - enum: - - thinking - thinking: - type: string - signature: - type: string - required: - - type - - thinking - - signature - - type: object - properties: - type: - type: string - enum: - - redacted_thinking - data: - type: string - required: - - type - - data - - type: object - properties: - type: - type: string - enum: - - server_tool_use - id: - type: string - name: - type: string - enum: - - web_search - - web_fetch - - code_execution - - bash_code_execution - - text_editor_code_execution - - tool_search_tool_regex - - tool_search_tool_bm25 - x-speakeasy-unknown-values: allow - input: - nullable: true - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - id - - name - - type: object - properties: - type: - type: string - enum: - - web_search_tool_result - tool_use_id: - type: string - content: - anyOf: - - type: array - items: - type: object - properties: - type: - type: string - enum: - - web_search_result - encrypted_content: - type: string - title: - type: string - url: - type: string - page_age: - type: string - nullable: true - required: - - type - - encrypted_content - - title - - url - - type: object - properties: - type: - type: string - enum: - - web_search_tool_result_error - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - max_uses_exceeded - - too_many_requests - - query_too_long - x-speakeasy-unknown-values: allow - required: - - type - - error_code - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - tool_use_id - - content - - type: object - properties: - type: - type: string - enum: - - search_result - source: - type: string - title: - type: string - content: - type: array - items: - type: object - properties: - type: - type: string - enum: - - text - text: - type: string - citations: - type: array - nullable: true - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - char_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_char_index: - type: number - end_char_index: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_char_index - - end_char_index - - type: object - properties: - type: - type: string - enum: - - page_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_page_number: - type: number - end_page_number: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_page_number - - end_page_number - - type: object - properties: - type: - type: string - enum: - - content_block_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_block_index - - end_block_index - - type: object - properties: - type: - type: string - enum: - - web_search_result_location - cited_text: - type: string - encrypted_index: - type: string - title: - type: string - nullable: true - url: - type: string - required: - - type - - cited_text - - encrypted_index - - title - - url - - type: object - properties: - type: - type: string - enum: - - search_result_location - cited_text: - type: string - search_result_index: - type: number - source: - type: string - title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - search_result_index - - source - - title - - start_block_index - - end_block_index - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - text - citations: - type: object - properties: - enabled: - type: boolean - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - source - - title - - content - required: - - role - - content - description: Anthropic message with OpenRouter extensions - MessagesWebSearchServerTool: - type: object - properties: - type: - type: string - enum: - - openrouter:web_search - parameters: - type: object - properties: - engine: - type: string - enum: - - auto - - native - - exa - - firecrawl - - parallel - description: >- - Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - example: auto - x-speakeasy-unknown-values: allow - max_results: - type: number - minimum: 1 - maximum: 25 - description: >- - Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. - example: 5 - max_total_results: - type: number - minimum: 1 - description: >- - Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. - example: 20 - search_context_size: - type: string - enum: - - low - - medium - - high - description: >- - How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - x-speakeasy-unknown-values: allow - user_location: - type: object - properties: - type: - type: string - enum: - - approximate - city: - type: string - region: - type: string - country: - type: string - timezone: - type: string - description: Approximate user location for location-biased results. - allowed_domains: - type: array - items: - type: string - description: >- - Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. - excluded_domains: - type: array - items: - type: string - description: >- - Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. - required: - - type - description: 'OpenRouter built-in server tool: searches the web for current information' - example: - type: openrouter:web_search - parameters: - max_results: 5 - MessagesOutputConfig: - type: object - properties: - effort: - type: string - nullable: true - enum: - - low - - medium - - high - - max - description: >- - How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values are `low`, `medium`, `high`, or `max`. - example: medium - x-speakeasy-unknown-values: allow - format: - type: object - nullable: true - properties: - type: - type: string - enum: - - json_schema - schema: - type: object - additionalProperties: - nullable: true - required: - - type - - schema - description: >- - A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs). - description: Configuration for controlling output behavior. Supports the effort parameter and structured output format. - MessagesRequest: - type: object - properties: - model: - type: string - max_tokens: - type: number - messages: - type: array - nullable: true - items: - $ref: '#/components/schemas/MessagesMessageParam' - system: - anyOf: - - type: string - - type: array - items: - type: object - properties: - type: - type: string - enum: - - text - text: - type: string - citations: - type: array - nullable: true - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - char_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_char_index: - type: number - end_char_index: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_char_index - - end_char_index - - type: object - properties: - type: - type: string - enum: - - page_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_page_number: - type: number - end_page_number: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_page_number - - end_page_number - - type: object - properties: - type: - type: string - enum: - - content_block_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - document_index - - document_title - - start_block_index - - end_block_index - - type: object - properties: - type: - type: string - enum: - - web_search_result_location - cited_text: - type: string - encrypted_index: - type: string - title: - type: string - nullable: true - url: - type: string - required: - - type - - cited_text - - encrypted_index - - title - - url - - type: object - properties: - type: - type: string - enum: - - search_result_location - cited_text: - type: string - search_result_index: - type: number - source: - type: string - title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - search_result_index - - source - - title - - start_block_index - - end_block_index - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - text - metadata: - type: object - properties: - user_id: - type: string - nullable: true - stop_sequences: - type: array - items: - type: string - temperature: - type: number - top_p: - type: number - top_k: - type: number - tools: - type: array - items: - anyOf: - - type: object - properties: - name: - type: string - description: - type: string - input_schema: - type: object - properties: - type: - type: string - default: object - properties: - nullable: true - required: - type: array - nullable: true - items: - type: string - additionalProperties: - nullable: true - type: - type: string - enum: - - custom - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - name - - input_schema - - type: object - properties: - type: - type: string - enum: - - bash_20250124 - name: - type: string - enum: - - bash - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - name - - type: object - properties: - type: - type: string - enum: - - text_editor_20250124 - name: - type: string - enum: - - str_replace_editor - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - name - - type: object - properties: - type: - type: string - enum: - - web_search_20250305 - name: - type: string - enum: - - web_search - allowed_domains: - type: array - nullable: true - items: - type: string - blocked_domains: - type: array - nullable: true - items: - type: string - max_uses: - type: number - nullable: true - user_location: - type: object - nullable: true - properties: - type: - type: string - enum: - - approximate - city: - type: string - nullable: true - country: - type: string - nullable: true - region: - type: string - nullable: true - timezone: - type: string - nullable: true - required: - - type - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - name - - type: object - properties: - type: - type: string - enum: - - web_search_20260209 - name: - type: string - enum: - - web_search - allowed_callers: - type: array - items: - type: string - enum: - - direct - - code_execution_20250825 - - code_execution_20260120 - x-speakeasy-unknown-values: allow - allowed_domains: - type: array - nullable: true - items: - type: string - blocked_domains: - type: array - nullable: true - items: - type: string - max_uses: - type: number - nullable: true - user_location: - type: object - nullable: true - properties: - type: - type: string - enum: - - approximate - city: - type: string - nullable: true - country: - type: string - nullable: true - region: - type: string - nullable: true - timezone: - type: string - nullable: true - required: - - type - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - required: - - type - - name - - $ref: '#/components/schemas/DatetimeServerTool' - - $ref: '#/components/schemas/MessagesWebSearchServerTool' - tool_choice: - oneOf: - - type: object - properties: - type: - type: string - enum: - - auto - disable_parallel_tool_use: - type: boolean - required: - - type - - type: object - properties: - type: - type: string - enum: - - any - disable_parallel_tool_use: - type: boolean - required: - - type - - type: object - properties: - type: - type: string - enum: - - none - required: - - type - - type: object - properties: - type: - type: string - enum: - - tool - name: - type: string - disable_parallel_tool_use: - type: boolean - required: - - type - - name - thinking: - oneOf: - - type: object - properties: - type: - type: string - enum: - - enabled - budget_tokens: - type: number - required: - - type - - budget_tokens - - type: object - properties: - type: - type: string - enum: - - disabled - required: - - type - - type: object - properties: - type: - type: string - enum: - - adaptive - required: - - type - service_tier: + $ref: '#/components/schemas/AnthropicTextCitation' + required: + - type + - text + - citations + example: + type: text + text: Hello, world! + citations: null + AnthropicDirectCaller: + type: object + properties: + type: + type: string + enum: + - direct + required: + - type + example: + type: direct + AnthropicCodeExecution20250825Caller: + type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + example: + type: code_execution_20250825 + tool_id: toolu_01abc + AnthropicCodeExecution20260120Caller: + type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + example: + type: code_execution_20260120 + tool_id: toolu_01abc + AnthropicCaller: + oneOf: + - $ref: '#/components/schemas/AnthropicDirectCaller' + - $ref: '#/components/schemas/AnthropicCodeExecution20250825Caller' + - $ref: '#/components/schemas/AnthropicCodeExecution20260120Caller' + discriminator: + propertyName: type + mapping: + direct: '#/components/schemas/AnthropicDirectCaller' + code_execution_20250825: '#/components/schemas/AnthropicCodeExecution20250825Caller' + code_execution_20260120: '#/components/schemas/AnthropicCodeExecution20260120Caller' + example: + type: direct + AnthropicToolUseBlock: + type: object + properties: + type: + type: string + enum: + - tool_use + id: + type: string + caller: + $ref: '#/components/schemas/AnthropicCaller' + name: + type: string + input: + nullable: true + required: + - type + - id + - caller + - name + example: + type: tool_use + id: toolu_01abc + caller: + type: direct + name: get_weather + input: + location: San Francisco + AnthropicThinkingBlock: + type: object + properties: + type: type: string enum: - - auto - - standard_only - x-speakeasy-unknown-values: allow - output_config: - $ref: '#/components/schemas/MessagesOutputConfig' - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - stream: - type: boolean - context_management: - type: object + - thinking + thinking: + type: string + signature: + type: string + required: + - type + - thinking + - signature + example: + type: thinking + thinking: Let me think about this... + signature: sig_abc123 + AnthropicRedactedThinkingBlock: + type: object + properties: + type: + type: string + enum: + - redacted_thinking + data: + type: string + required: + - type + - data + example: + type: redacted_thinking + data: cmVkYWN0ZWQ= + AnthropicServerToolName: + type: string + enum: + - web_search + - web_fetch + - code_execution + - bash_code_execution + - text_editor_code_execution + - tool_search_tool_regex + - tool_search_tool_bm25 + example: web_search + x-speakeasy-unknown-values: allow + AnthropicServerToolUseBlock: + type: object + properties: + type: + type: string + enum: + - server_tool_use + id: + type: string + caller: + $ref: '#/components/schemas/AnthropicCaller' + name: + $ref: '#/components/schemas/AnthropicServerToolName' + input: nullable: true - properties: - edits: - type: array + required: + - type + - id + - caller + - name + example: + type: server_tool_use + id: srvtoolu_01abc + caller: + type: direct + name: web_search + input: + query: latest news + AnthropicWebSearchResult: + type: object + properties: + type: + type: string + enum: + - web_search_result + encrypted_content: + type: string + page_age: + type: string + nullable: true + title: + type: string + url: + type: string + required: + - type + - encrypted_content + - page_age + - title + - url + example: + type: web_search_result + encrypted_content: enc_content_0 + page_age: null + title: Example Page + url: https://example.com + AnthropicWebSearchToolResultError: + type: object + properties: + type: + type: string + enum: + - web_search_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - max_uses_exceeded + - too_many_requests + - query_too_long + - request_too_large + x-speakeasy-unknown-values: allow + required: + - type + - error_code + example: + type: web_search_tool_result_error + error_code: unavailable + AnthropicWebSearchToolResult: + type: object + properties: + type: + type: string + enum: + - web_search_tool_result + caller: + $ref: '#/components/schemas/AnthropicCaller' + tool_use_id: + type: string + content: + anyOf: + - type: array items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - clear_tool_uses_20250919 - clear_at_least: - type: object - nullable: true - properties: - type: - type: string - enum: - - input_tokens - value: - type: number - required: - - type - - value - clear_tool_inputs: - anyOf: - - type: boolean - - type: array - items: - type: string - - nullable: true - exclude_tools: - type: array - nullable: true - items: - type: string - keep: - type: object - properties: - type: - type: string - enum: - - tool_uses - value: - type: number - required: - - type - - value - trigger: - oneOf: - - type: object - properties: - type: - type: string - enum: - - input_tokens - value: - type: number - required: - - type - - value - - type: object - properties: - type: - type: string - enum: - - tool_uses - value: - type: number - required: - - type - - value - required: - - type - - type: object - properties: - type: - type: string - enum: - - clear_thinking_20251015 - keep: - anyOf: - - type: object - properties: - type: - type: string - enum: - - thinking_turns - value: - type: number - required: - - type - - value - - type: object - properties: - type: - type: string - enum: - - all - required: - - type - - type: string - enum: - - all - required: - - type - - type: object - properties: - type: - type: string - enum: - - compact_20260112 - instructions: - type: string - nullable: true - pause_after_compaction: - type: boolean - trigger: - type: object - nullable: true - properties: - type: - type: string - enum: - - input_tokens - value: - type: number - required: - - type - - value - required: - - type - provider: - type: object + $ref: '#/components/schemas/AnthropicWebSearchResult' + - $ref: '#/components/schemas/AnthropicWebSearchToolResultError' + required: + - type + - caller + - tool_use_id + - content + example: + type: web_search_tool_result + caller: + type: direct + tool_use_id: srvtoolu_01abc + content: [] + AnthropicWebFetchToolResultError: + type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - url_too_long + - url_not_allowed + - url_not_accessible + - unsupported_content_type + - too_many_requests + - max_uses_exceeded + - unavailable + x-speakeasy-unknown-values: allow + required: + - type + - error_code + example: + type: web_fetch_tool_result_error + error_code: unavailable + AnthropicCitationsConfig: + type: object + nullable: true + properties: + enabled: + type: boolean + required: + - enabled + example: + enabled: true + AnthropicBase64PdfSource: + type: object + properties: + type: + type: string + enum: + - base64 + media_type: + type: string + enum: + - application/pdf + data: + type: string + required: + - type + - media_type + - data + example: + type: base64 + media_type: application/pdf + data: JVBERi0x... + AnthropicPlainTextSource: + type: object + properties: + type: + type: string + enum: + - text + media_type: + type: string + enum: + - text/plain + data: + type: string + required: + - type + - media_type + - data + example: + type: text + media_type: text/plain + data: Hello, world! + AnthropicDocumentBlock: + type: object + properties: + citations: + $ref: '#/components/schemas/AnthropicCitationsConfig' + source: + anyOf: + - $ref: '#/components/schemas/AnthropicBase64PdfSource' + - $ref: '#/components/schemas/AnthropicPlainTextSource' + title: + type: string nullable: true - 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: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per million completion tokens - image: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per image - audio: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per audio unit - request: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per request - 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' - additionalProperties: false - description: When multiple model providers are available, optionally indicate your routing preference. - plugins: + type: + type: string + enum: + - document + required: + - citations + - source + - title + - type + example: + citations: null + source: + data: Hello, world! + media_type: text/plain + type: text + title: null + type: document + AnthropicWebFetchBlock: + type: object + properties: + content: + $ref: '#/components/schemas/AnthropicDocumentBlock' + retrieved_at: + type: string + nullable: true + type: + type: string + enum: + - web_fetch_result + url: + type: string + required: + - content + - retrieved_at + - type + - url + example: + content: + type: document + citations: null + source: + data: '' + media_type: text/plain + type: text + title: null + retrieved_at: null + type: web_fetch_result + url: https://example.com + AnthropicWebFetchContent: + oneOf: + - $ref: '#/components/schemas/AnthropicWebFetchToolResultError' + - $ref: '#/components/schemas/AnthropicWebFetchBlock' + discriminator: + propertyName: type + mapping: + web_fetch_tool_result_error: '#/components/schemas/AnthropicWebFetchToolResultError' + web_fetch_result: '#/components/schemas/AnthropicWebFetchBlock' + example: + type: web_fetch_result + content: + type: document + citations: null + source: + data: '' + media_type: text/plain + type: text + title: null + retrieved_at: null + url: https://example.com + AnthropicWebFetchToolResult: + type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result + caller: + $ref: '#/components/schemas/AnthropicCaller' + content: + $ref: '#/components/schemas/AnthropicWebFetchContent' + tool_use_id: + type: string + required: + - type + - caller + - content + - tool_use_id + example: + type: web_fetch_tool_result + caller: + type: direct + content: + type: web_fetch_result + content: + type: document + citations: null + source: + data: '' + media_type: text/plain + type: text + title: null + retrieved_at: null + url: https://example.com + tool_use_id: srvtoolu_01abc + AnthropicServerToolErrorCode: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + example: unavailable + x-speakeasy-unknown-values: allow + AnthropicCodeExecutionToolResultError: + type: object + properties: + error_code: + $ref: '#/components/schemas/AnthropicServerToolErrorCode' + type: + type: string + enum: + - code_execution_tool_result_error + required: + - error_code + - type + example: + error_code: unavailable + type: code_execution_tool_result_error + AnthropicCodeExecutionOutput: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + example: + file_id: file_01abc + type: code_execution_output + AnthropicCodeExecutionResult: + type: object + properties: + content: type: array items: - 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 - properties: - id: - type: string - enum: - - moderation - required: - - id - - type: object - properties: - id: - type: string - enum: - - web - enabled: - type: boolean - description: Set to false to disable the web-search plugin for this request. Defaults to true. - max_results: - type: number - search_prompt: - type: string - engine: - $ref: '#/components/schemas/WebSearchEngine' - include_domains: - type: array - items: - type: string - description: >- - A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). - example: - - example.com - - '*.substack.com' - - openai.com/blog - exclude_domains: - type: array - items: - type: string - description: >- - A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). - example: - - example.com - - '*.substack.com' - - openai.com/blog - required: - - id - - type: object - properties: - id: - type: string - enum: - - file-parser - enabled: - type: boolean - description: Set to false to disable the file-parser plugin for this request. Defaults to true. - pdf: - $ref: '#/components/schemas/PDFParserOptions' - required: - - id - - type: object - properties: - id: - type: string - enum: - - response-healing - enabled: - type: boolean - description: Set to false to disable the response-healing plugin for this request. Defaults to true. - required: - - id - - type: object - properties: - id: - type: string - enum: - - context-compression - enabled: - type: boolean - description: Set to false to disable the context-compression plugin for this request. Defaults to true. - engine: - $ref: '#/components/schemas/ContextCompressionEngine' - required: - - id - description: Plugins you want to enable for this request, including their settings. - route: + $ref: '#/components/schemas/AnthropicCodeExecutionOutput' + return_code: + type: integer + stderr: + type: string + stdout: + type: string + type: type: string - nullable: true enum: - - fallback - - sort - deprecated: true - description: >- - **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none"). - x-speakeasy-deprecation-message: Use providers.sort.partition instead. - x-speakeasy-ignore: true - x-fern-ignore: true + - code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + example: + content: [] + return_code: 0 + stderr: '' + stdout: Hello + type: code_execution_result + AnthropicEncryptedCodeExecutionResult: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/AnthropicCodeExecutionOutput' + encrypted_stdout: + type: string + return_code: + type: integer + stderr: + type: string + type: + type: string + enum: + - encrypted_code_execution_result + required: + - content + - encrypted_stdout + - return_code + - stderr + - type + example: + content: [] + encrypted_stdout: enc_stdout + return_code: 0 + stderr: '' + type: encrypted_code_execution_result + AnthropicCodeExecutionContent: + oneOf: + - $ref: '#/components/schemas/AnthropicCodeExecutionToolResultError' + - $ref: '#/components/schemas/AnthropicCodeExecutionResult' + - $ref: '#/components/schemas/AnthropicEncryptedCodeExecutionResult' + discriminator: + propertyName: type + mapping: + code_execution_tool_result_error: '#/components/schemas/AnthropicCodeExecutionToolResultError' + code_execution_result: '#/components/schemas/AnthropicCodeExecutionResult' + encrypted_code_execution_result: '#/components/schemas/AnthropicEncryptedCodeExecutionResult' + example: + type: code_execution_result + content: [] + return_code: 0 + stderr: '' + stdout: Hello + AnthropicCodeExecutionToolResult: + type: object + properties: + type: + type: string + enum: + - code_execution_tool_result + content: + $ref: '#/components/schemas/AnthropicCodeExecutionContent' + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + example: + type: code_execution_tool_result + content: + type: code_execution_result + content: [] + return_code: 0 + stderr: '' + stdout: Hello + tool_use_id: srvtoolu_01abc + AnthropicBashCodeExecutionToolResultError: + type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - output_file_too_large x-speakeasy-unknown-values: allow - user: + type: type: string - maxLength: 256 - description: >- - 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 256 characters. - session_id: + enum: + - bash_code_execution_tool_result_error + required: + - error_code + - type + example: + error_code: unavailable + type: bash_code_execution_tool_result_error + AnthropicBashCodeExecutionOutput: + type: object + properties: + file_id: type: string - maxLength: 256 - description: >- - A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. - trace: - type: object - properties: - trace_id: - type: string - trace_name: - type: string - span_name: - type: string - generation_name: - type: string - parent_span_id: - type: string - additionalProperties: - nullable: true - description: >- - Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. - models: + type: + type: string + enum: + - bash_code_execution_output + required: + - file_id + - type + example: + file_id: file_01abc + type: bash_code_execution_output + AnthropicBashCodeExecutionResult: + type: object + properties: + content: type: array items: - type: string - speed: + $ref: '#/components/schemas/AnthropicBashCodeExecutionOutput' + return_code: + type: integer + stderr: + type: string + stdout: + type: string + type: type: string enum: - - fast - - standard - description: >- - Controls output generation speed. When set to `fast`, uses a higher-speed inference configuration at premium pricing. Defaults to `standard` when omitted. - example: fast - x-speakeasy-unknown-values: allow + - bash_code_execution_result required: - - model - - messages - description: Request schema for Anthropic Messages API endpoint + - content + - return_code + - stderr + - stdout + - type example: - model: anthropic/claude-4.5-sonnet-20250929 - max_tokens: 1024 - messages: - - role: user - content: Hello, how are you? - temperature: 0.7 - ActivityItem: + content: [] + return_code: 0 + stderr: '' + stdout: Hello + type: bash_code_execution_result + AnthropicBashCodeExecutionContent: + oneOf: + - $ref: '#/components/schemas/AnthropicBashCodeExecutionToolResultError' + - $ref: '#/components/schemas/AnthropicBashCodeExecutionResult' + discriminator: + propertyName: type + mapping: + bash_code_execution_tool_result_error: '#/components/schemas/AnthropicBashCodeExecutionToolResultError' + bash_code_execution_result: '#/components/schemas/AnthropicBashCodeExecutionResult' + example: + type: bash_code_execution_result + content: [] + return_code: 0 + stderr: '' + stdout: Hello + AnthropicBashCodeExecutionToolResult: type: object properties: - date: + type: type: string - description: Date of the activity (YYYY-MM-DD format) - example: '2025-08-24' - model: + enum: + - bash_code_execution_tool_result + content: + $ref: '#/components/schemas/AnthropicBashCodeExecutionContent' + tool_use_id: type: string - description: Model slug (e.g., "openai/gpt-4.1") - example: openai/gpt-4.1 - model_permaslug: + required: + - type + - content + - tool_use_id + example: + type: bash_code_execution_tool_result + content: + type: bash_code_execution_result + content: [] + return_code: 0 + stderr: '' + stdout: Hello + tool_use_id: srvtoolu_01abc + AnthropicTextEditorCodeExecutionToolResultError: + type: object + properties: + error_code: type: string - description: Model permaslug (e.g., "openai/gpt-4.1-2025-04-14") - example: openai/gpt-4.1-2025-04-14 - endpoint_id: + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - file_not_found + x-speakeasy-unknown-values: allow + error_message: type: string - description: Unique identifier for the endpoint - example: 550e8400-e29b-41d4-a716-446655440000 - provider_name: + nullable: true + type: type: string - description: Name of the provider serving this endpoint - example: OpenAI - usage: - type: number - description: Total cost in USD (OpenRouter credits spent) - example: 0.015 - byok_usage_inference: - type: number - description: BYOK inference cost in USD (external credits spent) - example: 0.012 - requests: - type: number - description: Number of requests made - example: 5 - prompt_tokens: - type: number - description: Total prompt tokens used - example: 50 - completion_tokens: - type: number - description: Total completion tokens generated - example: 125 - reasoning_tokens: - type: number - description: Total reasoning tokens used - example: 25 + enum: + - text_editor_code_execution_tool_result_error required: - - date - - model - - model_permaslug - - endpoint_id - - provider_name - - usage - - byok_usage_inference - - requests - - prompt_tokens - - completion_tokens - - reasoning_tokens + - error_code + - error_message + - type example: - date: '2025-08-24' - model: openai/gpt-4.1 - model_permaslug: openai/gpt-4.1-2025-04-14 - endpoint_id: 550e8400-e29b-41d4-a716-446655440000 - provider_name: OpenAI - usage: 0.015 - byok_usage_inference: 0.012 - requests: 5 - prompt_tokens: 50 - completion_tokens: 125 - reasoning_tokens: 25 - ForbiddenResponseErrorData: + error_code: unavailable + error_message: null + type: text_editor_code_execution_tool_result_error + AnthropicTextEditorCodeExecutionViewResult: type: object properties: - code: + content: + type: string + file_type: + type: string + enum: + - text + - image + - pdf + x-speakeasy-unknown-values: allow + num_lines: type: integer - message: + start_line: + type: integer + total_lines: + type: integer + type: type: string - metadata: - type: object - nullable: true - additionalProperties: - nullable: true + enum: + - text_editor_code_execution_view_result required: - - code - - message - description: Error data for ForbiddenResponse + - content + - file_type + - num_lines + - start_line + - total_lines + - type example: - code: 403 - message: Only management keys can perform this operation - ForbiddenResponse: + content: file content + file_type: text + num_lines: 10 + start_line: 1 + total_lines: 10 + type: text_editor_code_execution_view_result + AnthropicTextEditorCodeExecutionCreateResult: type: object properties: - error: - $ref: '#/components/schemas/ForbiddenResponseErrorData' - user_id: + is_file_update: + type: boolean + type: type: string - nullable: true + enum: + - text_editor_code_execution_create_result required: - - error - description: Forbidden - Authentication successful but insufficient permissions + - is_file_update + - type example: - error: - code: 403 - message: Only management keys can perform this operation - ChatFinishReasonEnum: - type: string - enum: - - tool_calls - - stop - - length - - content_filter - - error - example: stop - x-speakeasy-unknown-values: allow - ChatContentCacheControl: + is_file_update: false + type: text_editor_code_execution_create_result + AnthropicTextEditorCodeExecutionStrReplaceResult: type: object properties: + lines: + type: array + nullable: true + items: + type: string + new_lines: + type: integer + new_start: + type: integer + old_lines: + type: integer + old_start: + type: integer type: type: string enum: - - ephemeral - ttl: + - text_editor_code_execution_str_replace_result + required: + - lines + - new_lines + - new_start + - old_lines + - old_start + - type + example: + lines: null + new_lines: null + new_start: null + old_lines: null + old_start: null + type: text_editor_code_execution_str_replace_result + AnthropicTextEditorCodeExecutionContent: + oneOf: + - $ref: '#/components/schemas/AnthropicTextEditorCodeExecutionToolResultError' + - $ref: '#/components/schemas/AnthropicTextEditorCodeExecutionViewResult' + - $ref: '#/components/schemas/AnthropicTextEditorCodeExecutionCreateResult' + - $ref: '#/components/schemas/AnthropicTextEditorCodeExecutionStrReplaceResult' + discriminator: + propertyName: type + mapping: + text_editor_code_execution_tool_result_error: '#/components/schemas/AnthropicTextEditorCodeExecutionToolResultError' + text_editor_code_execution_view_result: '#/components/schemas/AnthropicTextEditorCodeExecutionViewResult' + text_editor_code_execution_create_result: '#/components/schemas/AnthropicTextEditorCodeExecutionCreateResult' + text_editor_code_execution_str_replace_result: '#/components/schemas/AnthropicTextEditorCodeExecutionStrReplaceResult' + example: + type: text_editor_code_execution_view_result + content: file content + file_type: text + num_lines: 10 + start_line: 1 + total_lines: 10 + AnthropicTextEditorCodeExecutionToolResult: + type: object + properties: + type: type: string enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow + - text_editor_code_execution_tool_result + content: + $ref: '#/components/schemas/AnthropicTextEditorCodeExecutionContent' + tool_use_id: + type: string required: - type - description: Cache control for the content part + - content + - tool_use_id example: - type: ephemeral - ttl: 5m - ChatContentText: + type: text_editor_code_execution_tool_result + content: + type: text_editor_code_execution_view_result + content: file content + file_type: text + num_lines: 10 + start_line: 1 + total_lines: 10 + tool_use_id: srvtoolu_01abc + AnthropicToolSearchResultError: type: object properties: + error_code: + $ref: '#/components/schemas/AnthropicServerToolErrorCode' + error_message: + type: string + nullable: true type: type: string enum: - - text - text: - type: string - cache_control: - $ref: '#/components/schemas/ChatContentCacheControl' + - tool_search_tool_result_error required: + - error_code + - error_message - type - - text - description: Text content part example: - type: text - text: Hello, world! - ChatContentImage: + error_code: unavailable + error_message: null + type: tool_search_tool_result_error + AnthropicToolReference: type: object properties: + tool_name: + type: string type: type: string enum: - - image_url - image_url: - type: object - properties: - url: - type: string - description: 'URL of the image (data: URLs supported)' - detail: - type: string - enum: - - auto - - low - - high - description: Image detail level for vision models - x-speakeasy-unknown-values: allow - required: - - url + - tool_reference required: + - tool_name - type - - image_url - description: Image content part for vision models example: - type: image_url - image_url: - url: https://example.com/image.jpg - detail: auto - ChatContentAudio: + tool_name: my_tool + type: tool_reference + AnthropicToolSearchResult: type: object properties: + tool_references: + type: array + items: + $ref: '#/components/schemas/AnthropicToolReference' type: type: string enum: - - input_audio - input_audio: - type: object - properties: - data: - type: string - description: Base64 encoded audio data - format: - type: string - description: >- - Audio format (e.g., wav, mp3, flac, m4a, ogg, aiff, aac, pcm16, pcm24). Supported formats vary by provider. - required: - - data - - format + - tool_search_tool_search_result required: + - tool_references - type - - input_audio - description: Audio input content part. Supported audio formats vary by provider. example: - type: input_audio - input_audio: - data: SGVsbG8gV29ybGQ= - format: wav - Legacy_ChatContentVideo: + tool_references: + - tool_name: my_tool + type: tool_reference + type: tool_search_tool_search_result + AnthropicToolSearchContent: + oneOf: + - $ref: '#/components/schemas/AnthropicToolSearchResultError' + - $ref: '#/components/schemas/AnthropicToolSearchResult' + discriminator: + propertyName: type + mapping: + tool_search_tool_result_error: '#/components/schemas/AnthropicToolSearchResultError' + tool_search_tool_search_result: '#/components/schemas/AnthropicToolSearchResult' + example: + type: tool_search_tool_search_result + tool_references: + - tool_name: my_tool + type: tool_reference + AnthropicToolSearchToolResult: type: object properties: type: type: string enum: - - input_video - video_url: - $ref: '#/components/schemas/ChatContentVideoInput' + - tool_search_tool_result + content: + $ref: '#/components/schemas/AnthropicToolSearchContent' + tool_use_id: + type: string required: - type - - video_url - description: Video input content part (legacy format - deprecated) - deprecated: true + - content + - tool_use_id example: - type: input_video - video_url: - url: https://example.com/video.mp4 - ChatContentVideoInput: - type: object - properties: - url: - type: string - description: 'URL of the video (data: URLs supported)' - required: - - url - description: Video input object - ChatContentVideo: + type: tool_search_tool_result + content: + type: tool_search_tool_search_result + tool_references: + - tool_name: my_tool + type: tool_reference + tool_use_id: srvtoolu_01abc + AnthropicContainerUpload: type: object properties: type: type: string enum: - - video_url - video_url: - $ref: '#/components/schemas/ChatContentVideoInput' + - container_upload + file_id: + type: string required: - type - - video_url - description: Video input content part + - file_id example: - type: video_url - video_url: - url: https://example.com/video.mp4 - ChatContentFile: + type: container_upload + file_id: file_01abc + AnthropicCompactionBlock: type: object properties: type: type: string enum: - - file - file: - type: object - properties: - file_data: - type: string - description: File content as base64 data URL or URL - file_id: - type: string - description: File ID for previously uploaded files - filename: - type: string - description: Original filename + - compaction + content: + type: string + nullable: true required: - type - - file - description: File content part for document processing + - content example: - type: file - file: - file_data: https://example.com/document.pdf - filename: document.pdf - ChatContentItems: + type: compaction + content: Compacted summary of conversation. + ORAnthropicContentBlock: oneOf: - - $ref: '#/components/schemas/ChatContentText' - - $ref: '#/components/schemas/ChatContentImage' - - $ref: '#/components/schemas/ChatContentAudio' - - oneOf: - - $ref: '#/components/schemas/Legacy_ChatContentVideo' - - $ref: '#/components/schemas/ChatContentVideo' - discriminator: - propertyName: type - mapping: - input_video: '#/components/schemas/Legacy_ChatContentVideo' - video_url: '#/components/schemas/ChatContentVideo' - - $ref: '#/components/schemas/ChatContentFile' + - $ref: '#/components/schemas/AnthropicTextBlock' + - $ref: '#/components/schemas/AnthropicToolUseBlock' + - $ref: '#/components/schemas/AnthropicThinkingBlock' + - $ref: '#/components/schemas/AnthropicRedactedThinkingBlock' + - $ref: '#/components/schemas/AnthropicServerToolUseBlock' + - $ref: '#/components/schemas/AnthropicWebSearchToolResult' + - $ref: '#/components/schemas/AnthropicWebFetchToolResult' + - $ref: '#/components/schemas/AnthropicCodeExecutionToolResult' + - $ref: '#/components/schemas/AnthropicBashCodeExecutionToolResult' + - $ref: '#/components/schemas/AnthropicTextEditorCodeExecutionToolResult' + - $ref: '#/components/schemas/AnthropicToolSearchToolResult' + - $ref: '#/components/schemas/AnthropicContainerUpload' + - $ref: '#/components/schemas/AnthropicCompactionBlock' discriminator: propertyName: type - description: Content part for chat completion messages + mapping: + text: '#/components/schemas/AnthropicTextBlock' + tool_use: '#/components/schemas/AnthropicToolUseBlock' + thinking: '#/components/schemas/AnthropicThinkingBlock' + redacted_thinking: '#/components/schemas/AnthropicRedactedThinkingBlock' + server_tool_use: '#/components/schemas/AnthropicServerToolUseBlock' + web_search_tool_result: '#/components/schemas/AnthropicWebSearchToolResult' + web_fetch_tool_result: '#/components/schemas/AnthropicWebFetchToolResult' + code_execution_tool_result: '#/components/schemas/AnthropicCodeExecutionToolResult' + bash_code_execution_tool_result: '#/components/schemas/AnthropicBashCodeExecutionToolResult' + text_editor_code_execution_tool_result: '#/components/schemas/AnthropicTextEditorCodeExecutionToolResult' + tool_search_tool_result: '#/components/schemas/AnthropicToolSearchToolResult' + container_upload: '#/components/schemas/AnthropicContainerUpload' + compaction: '#/components/schemas/AnthropicCompactionBlock' example: type: text text: Hello, world! - ChatToolCall: + citations: null + ORAnthropicStopReason: + type: string + nullable: true + enum: + - end_turn + - max_tokens + - stop_sequence + - tool_use + - pause_turn + - refusal + - compaction + - null + example: end_turn + x-speakeasy-unknown-values: allow + AnthropicCacheCreation: type: object + nullable: true properties: - id: - type: string - description: Tool call identifier - type: - type: string - enum: - - function - function: - type: object + ephemeral_5m_input_tokens: + type: integer + ephemeral_1h_input_tokens: + type: integer + required: + - ephemeral_5m_input_tokens + - ephemeral_1h_input_tokens + example: + ephemeral_5m_input_tokens: 100 + ephemeral_1h_input_tokens: 0 + AnthropicServerToolUsage: + type: object + nullable: true + properties: + web_search_requests: + type: integer + web_fetch_requests: + type: integer + required: + - web_search_requests + - web_fetch_requests + example: + web_search_requests: 1 + web_fetch_requests: 0 + AnthropicSpeed: + type: string + nullable: true + enum: + - fast + - standard + - null + example: standard + x-speakeasy-unknown-values: allow + AnthropicIterationCacheCreation: + type: object + nullable: true + properties: + ephemeral_5m_input_tokens: + type: integer + ephemeral_1h_input_tokens: + type: integer + default: null + example: + ephemeral_5m_input_tokens: 0 + ephemeral_1h_input_tokens: 0 + AnthropicBaseUsageIteration: + type: object + properties: + input_tokens: + type: integer + output_tokens: + type: integer + cache_creation_input_tokens: + type: integer + cache_read_input_tokens: + type: integer + cache_creation: + $ref: '#/components/schemas/AnthropicIterationCacheCreation' + example: + input_tokens: 100 + output_tokens: 50 + cache_creation_input_tokens: 0 + cache_read_input_tokens: 0 + cache_creation: null + AnthropicCompactionUsageIteration: + allOf: + - $ref: '#/components/schemas/AnthropicBaseUsageIteration' + - type: object properties: - name: + type: type: string - description: Function name to call - arguments: + enum: + - compaction + required: + - type + example: + type: compaction + input_tokens: 50 + output_tokens: 25 + cache_creation_input_tokens: 0 + cache_read_input_tokens: 0 + cache_creation: null + AnthropicMessageUsageIteration: + allOf: + - $ref: '#/components/schemas/AnthropicBaseUsageIteration' + - type: object + properties: + type: type: string - description: Function arguments as JSON string + enum: + - message required: - - name - - arguments - required: - - id - - type - - function - description: Tool call made by the assistant + - type example: - id: call_abc123 - type: function - function: - name: get_current_weather - arguments: '{"location": "Boston, MA"}' - ReasoningDetailSummary: + type: message + input_tokens: 100 + output_tokens: 50 + cache_creation_input_tokens: 0 + cache_read_input_tokens: 0 + cache_creation: null + AnthropicUnknownUsageIteration: + allOf: + - $ref: '#/components/schemas/AnthropicBaseUsageIteration' + - type: object + properties: + type: + type: string + required: + - type + example: + type: unknown + input_tokens: 100 + output_tokens: 50 + cache_creation_input_tokens: 0 + cache_read_input_tokens: 0 + cache_creation: null + AnthropicUsageIteration: + anyOf: + - $ref: '#/components/schemas/AnthropicCompactionUsageIteration' + - $ref: '#/components/schemas/AnthropicMessageUsageIteration' + - $ref: '#/components/schemas/AnthropicUnknownUsageIteration' + example: + type: message + input_tokens: 100 + output_tokens: 50 + cache_creation_input_tokens: 0 + cache_read_input_tokens: 0 + cache_creation: null + AnthropicServiceTier: + type: string + nullable: true + enum: + - standard + - priority + - batch + - null + example: standard + x-speakeasy-unknown-values: allow + AnthropicUsage: type: object properties: - type: - type: string - enum: - - reasoning.summary - summary: - type: string - id: - type: string - nullable: true - format: + input_tokens: + type: integer + output_tokens: + type: integer + cache_creation_input_tokens: + type: integer + cache_read_input_tokens: + type: integer + cache_creation: + $ref: '#/components/schemas/AnthropicCacheCreation' + inference_geo: type: string nullable: true - enum: - - unknown - - openai-responses-v1 - - azure-openai-responses-v1 - - xai-responses-v1 - - anthropic-claude-v1 - - google-gemini-v1 - x-speakeasy-unknown-values: allow - index: - type: number + server_tool_use: + $ref: '#/components/schemas/AnthropicServerToolUsage' + service_tier: + $ref: '#/components/schemas/AnthropicServiceTier' required: - - type - - summary - description: Reasoning detail summary schema + - input_tokens + - output_tokens + - cache_creation_input_tokens + - cache_read_input_tokens + - cache_creation + - inference_geo + - server_tool_use + - service_tier example: - type: reasoning.summary - summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions... - ReasoningDetailEncrypted: + input_tokens: 100 + output_tokens: 50 + cache_creation_input_tokens: null + cache_read_input_tokens: null + cache_creation: null + inference_geo: null + server_tool_use: null + service_tier: standard + BaseMessagesResult: type: object properties: + id: + type: string type: type: string enum: - - reasoning.encrypted - data: + - message + role: type: string - id: + enum: + - assistant + container: + $ref: '#/components/schemas/AnthropicContainer' + content: + type: array + items: + $ref: '#/components/schemas/ORAnthropicContentBlock' + model: type: string - nullable: true - format: + stop_reason: + $ref: '#/components/schemas/ORAnthropicStopReason' + stop_sequence: type: string nullable: true - enum: - - unknown - - openai-responses-v1 - - azure-openai-responses-v1 - - xai-responses-v1 - - anthropic-claude-v1 - - google-gemini-v1 - x-speakeasy-unknown-values: allow - index: - type: number + usage: + allOf: + - $ref: '#/components/schemas/AnthropicUsage' + - type: object + properties: + speed: + $ref: '#/components/schemas/AnthropicSpeed' + iterations: + type: array + items: + $ref: '#/components/schemas/AnthropicUsageIteration' + example: + input_tokens: 100 + output_tokens: 50 + cache_creation_input_tokens: null + cache_read_input_tokens: null + cache_creation: null + inference_geo: null + server_tool_use: null + service_tier: standard required: + - id - type - - data - description: Reasoning detail encrypted schema + - role + - container + - content + - model + - stop_reason + - stop_sequence + - usage + description: Base Anthropic Messages API response before OpenRouter extensions + example: + id: msg_01XFDUDYJgAACzvnptvVoYEL + type: message + role: assistant + container: null + content: + - type: text + text: Hello! + citations: null + model: claude-sonnet-4-5-20250929 + stop_reason: end_turn + stop_sequence: null + usage: + input_tokens: 12 + output_tokens: 8 + cache_creation_input_tokens: null + cache_read_input_tokens: null + MessagesResult: + allOf: + - $ref: '#/components/schemas/BaseMessagesResult' + - type: object + properties: + usage: + allOf: + - $ref: '#/components/schemas/AnthropicUsage' + - type: object + properties: + service_tier: + type: string + nullable: true + speed: + $ref: '#/components/schemas/AnthropicSpeed' + iterations: + type: array + items: + $ref: '#/components/schemas/AnthropicUsageIteration' + cost: + type: number + format: double + is_byok: + type: boolean + cost_details: + type: object + nullable: true + properties: + upstream_inference_cost: + type: number + format: double + upstream_inference_prompt_cost: + type: number + format: double + upstream_inference_completions_cost: + type: number + format: double + required: + - upstream_inference_prompt_cost + - upstream_inference_completions_cost + example: + input_tokens: 100 + output_tokens: 50 + cache_creation_input_tokens: null + cache_read_input_tokens: null + cache_creation: null + inference_geo: null + server_tool_use: null + service_tier: standard + provider: + $ref: '#/components/schemas/ProviderName' + description: Non-streaming response from the Anthropic Messages API with OpenRouter extensions example: - type: reasoning.encrypted - data: encrypted data - ReasoningDetailText: + id: msg_01XFDUDYJgAACzvnptvVoYEL + type: message + role: assistant + container: null + content: + - type: text + text: Hello! I'm doing well, thank you for asking. + citations: null + model: claude-sonnet-4-5-20250929 + stop_reason: end_turn + stop_sequence: null + usage: + input_tokens: 12 + output_tokens: 15 + cache_creation_input_tokens: null + cache_read_input_tokens: null + cache_creation: null + inference_geo: null + server_tool_use: null + service_tier: standard + MessagesStartEvent: type: object properties: type: type: string enum: - - reasoning.text - text: - type: string - nullable: true - signature: - type: string - nullable: true - id: - type: string - nullable: true - format: - type: string - nullable: true - enum: - - unknown - - openai-responses-v1 - - azure-openai-responses-v1 - - xai-responses-v1 - - anthropic-claude-v1 - - google-gemini-v1 - x-speakeasy-unknown-values: allow - index: - type: number + - message_start + message: + type: object + properties: + id: + type: string + type: + type: string + enum: + - message + role: + type: string + enum: + - assistant + container: + $ref: '#/components/schemas/AnthropicContainer' + content: + type: array + items: + $ref: '#/components/schemas/ORAnthropicContentBlock' + model: + type: string + stop_reason: + nullable: true + stop_sequence: + nullable: true + usage: + allOf: + - $ref: '#/components/schemas/AnthropicUsage' + - type: object + properties: + speed: + $ref: '#/components/schemas/AnthropicSpeed' + iterations: + type: array + items: + $ref: '#/components/schemas/AnthropicUsageIteration' + example: + input_tokens: 100 + output_tokens: 50 + cache_creation_input_tokens: null + cache_read_input_tokens: null + cache_creation: null + inference_geo: null + server_tool_use: null + service_tier: standard + provider: + type: string + enum: + - AnyScale + - Atoma + - Cent-ML + - CrofAI + - Enfer + - GoPomelo + - HuggingFace + - Hyperbolic 2 + - InoCloud + - Kluster + - Lambda + - Lepton + - Lynn 2 + - Lynn + - Mancer + - Meta + - Modal + - Nineteen + - OctoAI + - Recursal + - Reflection + - Replicate + - SambaNova 2 + - SF Compute + - Targon + - Together 2 + - Ubicloud + - 01.AI + - AkashML + - AI21 + - AionLabs + - Alibaba + - Ambient + - 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 + - Google + - Google AI Studio + - Groq + - Hyperbolic + - Inception + - Inceptron + - InferenceNet + - Ionstream + - Infermatic + - Io Net + - Inflection + - Liquid + - Mara + - Mancer 2 + - Minimax + - ModelRun + - Mistral + - Modular + - Moonshot AI + - Morph + - NCompass + - Nebius + - NextBit + - Novita + - Nvidia + - OpenAI + - OpenInference + - Parasail + - Perplexity + - Phala + - Reka + - Relace + - SambaNova + - Seed + - SiliconFlow + - Sourceful + - StepFun + - Stealth + - StreamLake + - Switchpoint + - Together + - Upstage + - Venice + - WandB + - Xiaomi + - xAI + - Z.AI + - FakeProvider + x-speakeasy-unknown-values: allow + required: + - id + - type + - role + - container + - content + - model + - stop_reason + - stop_sequence + - usage required: - type - description: Reasoning detail text schema - example: - type: reasoning.text - text: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions... - signature: signature - ReasoningDetailUnion: - oneOf: - - $ref: '#/components/schemas/ReasoningDetailSummary' - - $ref: '#/components/schemas/ReasoningDetailEncrypted' - - $ref: '#/components/schemas/ReasoningDetailText' - discriminator: - propertyName: type - mapping: - reasoning.summary: '#/components/schemas/ReasoningDetailSummary' - reasoning.encrypted: '#/components/schemas/ReasoningDetailEncrypted' - reasoning.text: '#/components/schemas/ReasoningDetailText' - description: Reasoning detail union schema - example: - type: reasoning.summary - summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions... - ChatReasoningDetails: - type: array - items: - $ref: '#/components/schemas/ReasoningDetailUnion' - description: Reasoning details for extended thinking models - ChatAssistantImages: - type: array - items: - type: object - properties: - image_url: - type: object - properties: - url: - type: string - description: URL or base64-encoded data of the generated image - required: - - url - required: - - image_url - description: Generated images from image generation models - example: - - image_url: - url: data:image/png;base64,iVBORw0KGgo... - ChatAudioOutput: + - message + description: Event sent at the start of a streaming message + example: + type: message_start + message: + id: msg_01XFDUDYJgAACzvnptvVoYEL + type: message + role: assistant + content: [] + model: claude-sonnet-4-5-20250929 + stop_reason: null + stop_sequence: null + usage: + input_tokens: 12 + output_tokens: 0 + MessagesDeltaEvent: type: object properties: - id: - type: string - description: Audio output identifier - expires_at: - type: number - description: Audio expiration timestamp - data: - type: string - description: Base64 encoded audio data - transcript: + type: type: string - description: Audio transcript - description: Audio output data or reference + enum: + - message_delta + delta: + type: object + properties: + container: + $ref: '#/components/schemas/AnthropicContainer' + stop_reason: + $ref: '#/components/schemas/ORAnthropicStopReason' + stop_sequence: + type: string + nullable: true + required: + - container + - stop_reason + - stop_sequence + usage: + type: object + properties: + input_tokens: + type: integer + nullable: true + output_tokens: + type: integer + cache_creation_input_tokens: + type: integer + nullable: true + cache_read_input_tokens: + type: integer + nullable: true + server_tool_use: + type: object + nullable: true + properties: + web_search_requests: + type: integer + web_fetch_requests: + type: integer + required: + - web_search_requests + - web_fetch_requests + iterations: + type: array + items: + $ref: '#/components/schemas/AnthropicUsageIteration' + required: + - input_tokens + - output_tokens + - cache_creation_input_tokens + - cache_read_input_tokens + - server_tool_use + required: + - type + - delta + - usage + description: Event sent when the message metadata changes (e.g., stop_reason) example: - id: audio_abc123 - expires_at: 1677652400 - data: UklGRnoGAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQoGAACBhYqFbF1f - transcript: Hello! How can I help you today? - ChatAssistantMessage: + type: message_delta + delta: + stop_reason: end_turn + stop_sequence: null + usage: + output_tokens: 15 + MessagesStopEvent: type: object properties: - role: + type: type: string enum: - - assistant - content: - anyOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/ChatContentItems' - - nullable: true - description: Assistant message content - name: - type: string - description: Optional name for the assistant - tool_calls: - type: array - items: - $ref: '#/components/schemas/ChatToolCall' - description: Tool calls made by the assistant - refusal: - type: string - nullable: true - description: Refusal message if content was refused - reasoning: - type: string - nullable: true - description: Reasoning output - reasoning_details: - $ref: '#/components/schemas/ChatReasoningDetails' - images: - $ref: '#/components/schemas/ChatAssistantImages' - audio: - $ref: '#/components/schemas/ChatAudioOutput' + - message_stop required: - - role - description: Assistant message for requests and responses + - type + description: Event sent when the message is complete example: - role: assistant - content: The capital of France is Paris. - ChatTokenLogprob: + type: message_stop + MessagesContentBlockStartEvent: type: object properties: - token: + type: type: string - description: The token - logprob: - type: number - description: Log probability of the token - bytes: - type: array - nullable: true - items: - type: number - description: UTF-8 bytes of the token - top_logprobs: - type: array - items: - type: object - properties: - token: - type: string - logprob: - type: number - bytes: - type: array - nullable: true - items: - type: number - required: - - token - - logprob - - bytes - description: Top alternative tokens with probabilities + enum: + - content_block_start + index: + type: integer + content_block: + anyOf: + - $ref: '#/components/schemas/AnthropicTextBlock' + - $ref: '#/components/schemas/AnthropicToolUseBlock' + - $ref: '#/components/schemas/AnthropicThinkingBlock' + - $ref: '#/components/schemas/AnthropicRedactedThinkingBlock' + - $ref: '#/components/schemas/AnthropicServerToolUseBlock' + - $ref: '#/components/schemas/AnthropicWebSearchToolResult' + - $ref: '#/components/schemas/AnthropicWebFetchToolResult' + - $ref: '#/components/schemas/AnthropicCodeExecutionToolResult' + - $ref: '#/components/schemas/AnthropicBashCodeExecutionToolResult' + - $ref: '#/components/schemas/AnthropicTextEditorCodeExecutionToolResult' + - $ref: '#/components/schemas/AnthropicToolSearchToolResult' + - $ref: '#/components/schemas/AnthropicContainerUpload' + - $ref: '#/components/schemas/AnthropicCompactionBlock' + - type: object + properties: + type: + type: string + enum: + - compaction + content: + type: string + nullable: true + required: + - type + - content required: - - token - - logprob - - bytes - - top_logprobs - description: Token log probability information + - type + - index + - content_block + description: Event sent when a new content block starts example: - token: ' Hello' - logprob: -0.612345 - bytes: null - top_logprobs: - - token: ' Hello' - logprob: -0.612345 - bytes: null - ChatTokenLogprobs: + type: content_block_start + index: 0 + content_block: + type: text + text: '' + MessagesContentBlockDeltaEvent: type: object - nullable: true properties: - content: - type: array - nullable: true - items: - $ref: '#/components/schemas/ChatTokenLogprob' - description: Log probabilities for content tokens - refusal: - type: array - nullable: true - items: - $ref: '#/components/schemas/ChatTokenLogprob' - description: Log probabilities for refusal tokens + type: + type: string + enum: + - content_block_delta + index: + type: integer + delta: + oneOf: + - type: object + properties: + type: + type: string + enum: + - text_delta + text: + type: string + required: + - type + - text + - type: object + properties: + type: + type: string + enum: + - input_json_delta + partial_json: + type: string + required: + - type + - partial_json + - type: object + properties: + type: + type: string + enum: + - thinking_delta + thinking: + type: string + required: + - type + - thinking + - type: object + properties: + type: + type: string + enum: + - signature_delta + signature: + type: string + required: + - type + - signature + - type: object + properties: + type: + type: string + enum: + - citations_delta + citation: + oneOf: + - $ref: '#/components/schemas/AnthropicCitationCharLocation' + - $ref: '#/components/schemas/AnthropicCitationPageLocation' + - $ref: '#/components/schemas/AnthropicCitationContentBlockLocation' + - $ref: '#/components/schemas/AnthropicCitationWebSearchResultLocation' + - $ref: '#/components/schemas/AnthropicCitationSearchResultLocation' + discriminator: + propertyName: type + mapping: + char_location: '#/components/schemas/AnthropicCitationCharLocation' + page_location: '#/components/schemas/AnthropicCitationPageLocation' + content_block_location: '#/components/schemas/AnthropicCitationContentBlockLocation' + web_search_result_location: '#/components/schemas/AnthropicCitationWebSearchResultLocation' + search_result_location: '#/components/schemas/AnthropicCitationSearchResultLocation' + required: + - type + - citation + - type: object + properties: + type: + type: string + enum: + - compaction_delta + content: + type: string + nullable: true + required: + - type + - content required: - - content - description: Log probabilities for the completion + - type + - index + - delta + description: Event sent when content is added to a content block example: - content: - - token: ' Hello' - logprob: -0.612345 - bytes: null - top_logprobs: [] - refusal: null - ChatChoice: + type: content_block_delta + index: 0 + delta: + type: text_delta + text: Hello + MessagesContentBlockStopEvent: type: object properties: - finish_reason: - anyOf: - - $ref: '#/components/schemas/ChatFinishReasonEnum' - - nullable: true - - nullable: true + type: + type: string + enum: + - content_block_stop index: - type: number - description: Choice index - example: 0 - message: - $ref: '#/components/schemas/ChatAssistantMessage' - logprobs: - $ref: '#/components/schemas/ChatTokenLogprobs' + type: integer required: - - finish_reason + - type - index - - message - description: Chat completion choice + description: Event sent when a content block is complete example: - finish_reason: stop + type: content_block_stop index: 0 - message: - role: assistant - content: The capital of France is Paris. - logprobs: null - ChatUsage: + MessagesPingEvent: type: object properties: - completion_tokens: - type: number - description: Number of tokens in the completion - prompt_tokens: - type: number - description: Number of tokens in the prompt - total_tokens: - type: number - description: Total number of tokens - completion_tokens_details: - type: object - nullable: true - properties: - reasoning_tokens: - type: number - nullable: true - description: Tokens used for reasoning - audio_tokens: - type: number - nullable: true - description: Tokens used for audio output - accepted_prediction_tokens: - type: number - nullable: true - description: Accepted prediction tokens - rejected_prediction_tokens: - type: number - nullable: true - description: Rejected prediction tokens - description: Detailed completion token usage - prompt_tokens_details: + type: + type: string + enum: + - ping + required: + - type + description: Keep-alive ping event + example: + type: ping + MessagesErrorEvent: + type: object + properties: + type: + type: string + enum: + - error + error: type: object - nullable: true properties: - cached_tokens: - type: number - description: Cached prompt tokens - cache_write_tokens: - type: number - description: Tokens written to cache. Only returned for models with explicit caching and cache write pricing. - audio_tokens: - type: number - description: Audio input tokens - video_tokens: - type: number - description: Video input tokens - description: Detailed prompt token usage + type: + type: string + message: + type: string + required: + - type + - message required: - - completion_tokens - - prompt_tokens - - total_tokens - description: Token usage statistics + - type + - error + description: Error event in the stream example: - completion_tokens: 15 - prompt_tokens: 10 - total_tokens: 25 - completion_tokens_details: - reasoning_tokens: 5 - prompt_tokens_details: - cached_tokens: 2 - ChatResult: + type: error + error: + type: overloaded_error + message: Overloaded + MessagesStreamEvents: + oneOf: + - $ref: '#/components/schemas/MessagesStartEvent' + - $ref: '#/components/schemas/MessagesDeltaEvent' + - $ref: '#/components/schemas/MessagesStopEvent' + - $ref: '#/components/schemas/MessagesContentBlockStartEvent' + - $ref: '#/components/schemas/MessagesContentBlockDeltaEvent' + - $ref: '#/components/schemas/MessagesContentBlockStopEvent' + - $ref: '#/components/schemas/MessagesPingEvent' + - $ref: '#/components/schemas/MessagesErrorEvent' + discriminator: + propertyName: type + mapping: + message_start: '#/components/schemas/MessagesStartEvent' + message_delta: '#/components/schemas/MessagesDeltaEvent' + message_stop: '#/components/schemas/MessagesStopEvent' + content_block_start: '#/components/schemas/MessagesContentBlockStartEvent' + content_block_delta: '#/components/schemas/MessagesContentBlockDeltaEvent' + content_block_stop: '#/components/schemas/MessagesContentBlockStopEvent' + ping: '#/components/schemas/MessagesPingEvent' + error: '#/components/schemas/MessagesErrorEvent' + description: Union of all possible streaming events + example: + type: content_block_delta + index: 0 + delta: + type: text_delta + text: Hello + MessagesErrorDetail: type: object properties: - id: + type: type: string - description: Unique completion identifier - example: chatcmpl-123 - choices: - type: array - items: - $ref: '#/components/schemas/ChatChoice' - description: List of completion choices - created: - type: number - description: Unix timestamp of creation - example: 1677652288 - model: + message: type: string - description: Model used for completion - example: openai/gpt-4 - object: + required: + - type + - message + example: + type: invalid_request_error + message: Invalid request parameters + MessagesErrorResponse: + type: object + properties: + type: type: string enum: - - chat.completion - system_fingerprint: + - error + error: + $ref: '#/components/schemas/MessagesErrorDetail' + required: + - type + - error + example: + type: error + error: + type: invalid_request_error + message: Invalid request parameters + AnthropicCitationCharLocationParam: + type: object + properties: + type: + type: string + enum: + - char_location + cited_text: + type: string + document_index: + type: integer + document_title: type: string nullable: true - description: System fingerprint - example: fp_44709d6fcb - service_tier: + start_char_index: + type: integer + end_char_index: + type: integer + required: + - type + - cited_text + - document_index + - document_title + - start_char_index + - end_char_index + example: + type: char_location + cited_text: Example cited text + document_index: 0 + document_title: null + start_char_index: 0 + end_char_index: 18 + AnthropicCitationPageLocationParam: + type: object + properties: + type: + type: string + enum: + - page_location + cited_text: + type: string + document_index: + type: integer + document_title: type: string nullable: true - description: The service tier used by the upstream provider for this request - example: default - usage: - $ref: '#/components/schemas/ChatUsage' + start_page_number: + type: integer + end_page_number: + type: integer required: - - id - - choices - - created - - model - - object - - system_fingerprint - description: Chat completion response + - type + - cited_text + - document_index + - document_title + - start_page_number + - end_page_number example: - id: chatcmpl-123 - object: chat.completion - created: 1677652288 - model: openai/gpt-4 - choices: - - index: 0 - message: - role: assistant - content: The capital of France is Paris. - finish_reason: stop - usage: - prompt_tokens: 10 - completion_tokens: 15 - total_tokens: 25 - ChatStreamToolCall: + type: page_location + cited_text: Example cited text + document_index: 0 + document_title: null + start_page_number: 1 + end_page_number: 2 + AnthropicCitationContentBlockLocationParam: type: object properties: - index: - type: number - description: Tool call index in the array - example: 0 - id: + type: type: string - description: Tool call identifier - example: call_abc123 + enum: + - content_block_location + cited_text: + type: string + document_index: + type: integer + document_title: + type: string + nullable: true + start_block_index: + type: integer + end_block_index: + type: integer + required: + - type + - cited_text + - document_index + - document_title + - start_block_index + - end_block_index + example: + type: content_block_location + cited_text: Example cited text + document_index: 0 + document_title: null + start_block_index: 0 + end_block_index: 1 + AnthropicCacheControlTtl: + type: string + enum: + - 5m + - 1h + example: 5m + x-speakeasy-unknown-values: allow + AnthropicCacheControlDirective: + type: object + properties: type: type: string enum: - - function - description: Tool call type - example: function - function: - type: object - properties: - name: - type: string - description: Function name - example: get_weather - arguments: - type: string - description: Function arguments as JSON string - example: '{"location":' - description: Function call details + - ephemeral + ttl: + $ref: '#/components/schemas/AnthropicCacheControlTtl' + required: + - type + example: + type: ephemeral + AnthropicTextBlockParam: + type: object + properties: + type: + type: string + enum: + - text + text: + type: string + citations: + type: array + nullable: true + items: + oneOf: + - $ref: '#/components/schemas/AnthropicCitationCharLocationParam' + - $ref: '#/components/schemas/AnthropicCitationPageLocationParam' + - $ref: '#/components/schemas/AnthropicCitationContentBlockLocationParam' + - $ref: '#/components/schemas/AnthropicCitationWebSearchResultLocation' + - $ref: '#/components/schemas/AnthropicCitationSearchResultLocation' + discriminator: + propertyName: type + mapping: + char_location: '#/components/schemas/AnthropicCitationCharLocationParam' + page_location: '#/components/schemas/AnthropicCitationPageLocationParam' + content_block_location: '#/components/schemas/AnthropicCitationContentBlockLocationParam' + web_search_result_location: '#/components/schemas/AnthropicCitationWebSearchResultLocation' + search_result_location: '#/components/schemas/AnthropicCitationSearchResultLocation' + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' required: - - index - description: Tool call delta for streaming responses + - type + - text example: - index: 0 - id: call_abc123 - type: function - function: - name: get_weather - arguments: '{"location":' - ChatStreamDelta: + type: text + text: Hello, world! + AnthropicWebSearchToolUserLocation: type: object + nullable: true properties: - role: + type: type: string enum: - - assistant - description: The role of the message author - example: assistant - content: + - approximate + city: type: string nullable: true - description: Message content delta - example: Hello - reasoning: + country: type: string nullable: true - description: Reasoning content delta - example: I need to - refusal: + region: type: string nullable: true - description: Refusal message delta - example: null - tool_calls: - type: array - items: - $ref: '#/components/schemas/ChatStreamToolCall' - description: Tool calls delta - reasoning_details: - $ref: '#/components/schemas/ChatReasoningDetails' - audio: - allOf: - - $ref: '#/components/schemas/ChatAudioOutput' - - description: Audio output data - description: Delta changes in streaming response + timezone: + type: string + nullable: true + required: + - type example: - role: assistant - content: Hello - ChatStreamChoice: + type: approximate + city: San Francisco + country: US + region: California + timezone: America/Los_Angeles + SearchQualityLevel: + type: string + enum: + - low + - medium + - high + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + example: medium + x-speakeasy-unknown-values: allow + WebSearchUserLocationServerTool: type: object properties: - delta: - $ref: '#/components/schemas/ChatStreamDelta' - finish_reason: - anyOf: - - $ref: '#/components/schemas/ChatFinishReasonEnum' - - nullable: true - - nullable: true - index: - type: number - description: Choice index - example: 0 - logprobs: - $ref: '#/components/schemas/ChatTokenLogprobs' - required: - - delta - - finish_reason - - index - description: Streaming completion choice chunk + type: + type: string + enum: + - approximate + city: + type: string + region: + type: string + country: + type: string + timezone: + type: string + description: Approximate user location for location-biased results. example: - index: 0 - delta: - role: assistant - content: Hello - finish_reason: null - ChatStreamChunk: + type: approximate + city: San Francisco + region: California + country: US + timezone: America/Los_Angeles + WebSearchConfig: type: object properties: - id: - type: string - description: Unique chunk identifier - example: chatcmpl-123 - choices: + engine: + $ref: '#/components/schemas/WebSearchEngineEnum' + max_results: + type: integer + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. + example: 5 + max_total_results: + type: integer + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. + example: 20 + search_context_size: + $ref: '#/components/schemas/SearchQualityLevel' + user_location: + $ref: '#/components/schemas/WebSearchUserLocationServerTool' + allowed_domains: type: array items: - $ref: '#/components/schemas/ChatStreamChoice' - description: List of streaming chunk choices - created: - type: number - description: Unix timestamp of creation - example: 1677652288 - model: - type: string - description: Model used for completion - example: openai/gpt-4 - object: + type: string + description: >- + Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity. + example: + max_results: 5 + search_context_size: medium + OpenRouterWebSearchServerTool: + type: object + properties: + type: type: string enum: - - chat.completion.chunk - system_fingerprint: - type: string - description: System fingerprint - example: fp_44709d6fcb - service_tier: + - openrouter:web_search + parameters: + $ref: '#/components/schemas/WebSearchConfig' + required: + - type + description: 'OpenRouter built-in server tool: searches the web for current information' + example: + type: openrouter:web_search + parameters: + max_results: 5 + MessagesOutputConfig: + type: object + properties: + effort: type: string nullable: true - description: The service tier used by the upstream provider for this request - example: default - error: + enum: + - low + - medium + - high + - max + - null + description: >- + How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values are `low`, `medium`, `high`, or `max`. + example: medium + x-speakeasy-unknown-values: allow + format: type: object + nullable: true properties: - message: + type: type: string - description: Error message - example: Rate limit exceeded - code: - type: number - description: Error code - example: 429 + enum: + - json_schema + schema: + type: object + additionalProperties: + nullable: true required: - - message - - code - description: Error information - example: - message: Rate limit exceeded - code: 429 - usage: - $ref: '#/components/schemas/ChatUsage' - required: - - id - - choices - - created - - model - - object - description: Streaming chat completion chunk - x-speakeasy-entity: ChatStreamChunk + - type + - schema + description: >- + A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs). + description: Configuration for controlling output behavior. Supports the effort parameter and structured output format. example: - id: chatcmpl-123 - object: chat.completion.chunk - created: 1677652288 - model: openai/gpt-4 - choices: - - index: 0 - delta: - role: assistant - content: Hello - finish_reason: null - ChatSystemMessage: + effort: medium + AnthropicImageMimeType: + type: string + enum: + - image/jpeg + - image/png + - image/gif + - image/webp + example: image/jpeg + x-speakeasy-unknown-values: allow + AnthropicBase64ImageSource: type: object properties: - role: + type: type: string enum: - - system - content: - anyOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/ChatContentText' - description: System message content - example: You are a helpful assistant. - name: + - base64 + media_type: + $ref: '#/components/schemas/AnthropicImageMimeType' + data: type: string - description: Optional name for the system message - example: Assistant Config required: - - role - - content - description: System message for setting behavior - example: - role: system - content: You are a helpful assistant. - name: Assistant Config - ChatUserMessage: + - type + - media_type + - data + example: + type: base64 + media_type: image/jpeg + data: /9j/4AAQ... + AnthropicUrlImageSource: type: object properties: - role: + type: type: string enum: - - user - content: - anyOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/ChatContentItems' - description: User message content - example: What is the capital of France? - name: + - url + url: type: string - description: Optional name for the user - example: User required: - - role - - content - description: User message + - type + - url example: - role: user - content: What is the capital of France? - ChatDeveloperMessage: + type: url + url: https://example.com/image.jpg + AnthropicImageBlockParam: type: object properties: - role: + type: type: string enum: - - developer - content: - anyOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/ChatContentText' - description: Developer message content - example: This is a message from the developer. - name: - type: string - description: Optional name for the developer message - example: Developer + - image + source: + oneOf: + - $ref: '#/components/schemas/AnthropicBase64ImageSource' + - $ref: '#/components/schemas/AnthropicUrlImageSource' + discriminator: + propertyName: type + mapping: + base64: '#/components/schemas/AnthropicBase64ImageSource' + url: '#/components/schemas/AnthropicUrlImageSource' + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' required: - - role - - content - description: Developer message + - type + - source example: - role: developer - content: This is a message from the developer. - ChatToolMessage: + type: image + source: + type: base64 + media_type: image/jpeg + data: /9j/4AAQ... + AnthropicUrlPdfSource: type: object properties: - role: + type: type: string enum: - - tool - content: - anyOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/ChatContentItems' - description: Tool response content - example: The weather in San Francisco is 72°F and sunny. - tool_call_id: + - url + url: type: string - description: ID of the assistant message tool call this message responds to - example: call_abc123 required: - - role - - content - - tool_call_id - description: Tool response message - example: - role: tool - content: The weather in San Francisco is 72°F and sunny. - tool_call_id: call_abc123 - ChatMessages: - oneOf: - - $ref: '#/components/schemas/ChatSystemMessage' - - $ref: '#/components/schemas/ChatUserMessage' - - $ref: '#/components/schemas/ChatDeveloperMessage' - - $ref: '#/components/schemas/ChatAssistantMessage' - - $ref: '#/components/schemas/ChatToolMessage' - discriminator: - propertyName: role - description: Chat completion message with role-based discrimination - example: - role: user - content: What is the capital of France? - ModelName: - type: string - description: Model to use for completion - example: openai/gpt-4 - ChatModelNames: - type: array - items: - allOf: - - $ref: '#/components/schemas/ModelName' - - description: Available OpenRouter chat completion models - description: Models to use for completion + - type + - url example: - - openai/gpt-4 - - openai/gpt-4o - ChatReasoningSummaryVerbosityEnum: - type: string - enum: - - auto - - concise - - detailed - x-speakeasy-unknown-values: allow - ChatFormatTextConfig: + type: url + url: https://example.com/document.pdf + AnthropicDocumentBlockParam: type: object properties: type: type: string enum: - - text + - document + source: + oneOf: + - $ref: '#/components/schemas/AnthropicBase64PdfSource' + - $ref: '#/components/schemas/AnthropicPlainTextSource' + - type: object + properties: + type: + type: string + enum: + - content + content: + anyOf: + - type: string + - type: array + items: + oneOf: + - $ref: '#/components/schemas/AnthropicTextBlockParam' + - $ref: '#/components/schemas/AnthropicImageBlockParam' + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/AnthropicTextBlockParam' + image: '#/components/schemas/AnthropicImageBlockParam' + required: + - type + - content + - $ref: '#/components/schemas/AnthropicUrlPdfSource' + citations: + type: object + nullable: true + properties: + enabled: + type: boolean + context: + type: string + nullable: true + title: + type: string + nullable: true + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' required: - type - description: Default text response format + - source example: - type: text - ChatJsonSchemaConfig: + type: document + source: + type: text + media_type: text/plain + data: Hello, world! + AnthropicSearchResultBlockParam: type: object properties: - name: + type: type: string - maxLength: 64 - description: Schema name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) - example: math_response - description: + enum: + - search_result + source: type: string - description: Schema description for the model - example: A mathematical response - schema: + title: + type: string + content: + type: array + items: + $ref: '#/components/schemas/AnthropicTextBlockParam' + citations: type: object - additionalProperties: - nullable: true - description: JSON Schema object - example: - type: object - properties: - answer: - type: number - required: - - answer - strict: - type: boolean - nullable: true - description: Enable strict schema adherence - example: false + properties: + enabled: + type: boolean + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' required: - - name - description: JSON Schema configuration object + - type + - source + - title + - content example: - name: math_response - description: A mathematical response - schema: - type: object - properties: - answer: - type: number - required: - - answer - strict: true - ChatFormatJsonSchemaConfig: + type: search_result + source: example_source + title: Example Result + content: + - type: text + text: Result content + AnthropicWebSearchResultBlockParam: type: object properties: type: type: string enum: - - json_schema - json_schema: - $ref: '#/components/schemas/ChatJsonSchemaConfig' + - web_search_result + encrypted_content: + type: string + title: + type: string + url: + type: string + page_age: + type: string + nullable: true required: - type - - json_schema - description: JSON Schema response format for structured outputs + - encrypted_content + - title + - url example: - type: json_schema - json_schema: - name: math_response - schema: - type: object - properties: - answer: - type: number - required: - - answer - ChatFormatGrammarConfig: + type: web_search_result + encrypted_content: enc_content_0 + title: Example Page + url: https://example.com + MessagesMessageParam: type: object properties: - type: + role: type: string enum: - - grammar - grammar: - type: string - description: Custom grammar for text generation - example: root ::= "yes" | "no" + - user + - assistant + x-speakeasy-unknown-values: allow + content: + anyOf: + - type: string + - type: array + items: + oneOf: + - $ref: '#/components/schemas/AnthropicTextBlockParam' + - $ref: '#/components/schemas/AnthropicImageBlockParam' + - $ref: '#/components/schemas/AnthropicDocumentBlockParam' + - type: object + properties: + type: + type: string + enum: + - tool_use + id: + type: string + name: + type: string + input: + nullable: true + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' + required: + - type + - id + - name + - type: object + properties: + type: + type: string + enum: + - tool_result + tool_use_id: + type: string + content: + anyOf: + - type: string + - type: array + items: + anyOf: + - $ref: '#/components/schemas/AnthropicTextBlockParam' + - $ref: '#/components/schemas/AnthropicImageBlockParam' + - type: object + properties: + type: + type: string + enum: + - tool_reference + tool_name: + type: string + required: + - type + - tool_name + - $ref: '#/components/schemas/AnthropicSearchResultBlockParam' + - $ref: '#/components/schemas/AnthropicDocumentBlockParam' + is_error: + type: boolean + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' + required: + - type + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - thinking + thinking: + type: string + signature: + type: string + required: + - type + - thinking + - signature + - type: object + properties: + type: + type: string + enum: + - redacted_thinking + data: + type: string + required: + - type + - data + - type: object + properties: + type: + type: string + enum: + - server_tool_use + id: + type: string + name: + $ref: '#/components/schemas/AnthropicServerToolName' + input: + nullable: true + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' + required: + - type + - id + - name + - type: object + properties: + type: + type: string + enum: + - web_search_tool_result + tool_use_id: + type: string + content: + anyOf: + - type: array + items: + $ref: '#/components/schemas/AnthropicWebSearchResultBlockParam' + - type: object + properties: + type: + type: string + enum: + - web_search_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - max_uses_exceeded + - too_many_requests + - query_too_long + x-speakeasy-unknown-values: allow + required: + - type + - error_code + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' + required: + - type + - tool_use_id + - content + - $ref: '#/components/schemas/AnthropicSearchResultBlockParam' + - type: object + properties: + type: + type: string + enum: + - compaction + content: + type: string + nullable: true + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' + required: + - type + - content required: - - type - - grammar - description: Custom grammar response format + - role + - content + description: Anthropic message with OpenRouter extensions example: - type: grammar - grammar: root ::= "yes" | "no" - ChatFormatPythonConfig: + role: user + content: Hello, how are you? + AnthropicInputTokensClearAtLeast: type: object + nullable: true properties: type: type: string enum: - - python + - input_tokens + value: + type: integer required: - type - description: Python code response format - example: - type: python - ChatStreamOptions: - type: object - nullable: true - properties: - include_usage: - type: boolean - description: 'Deprecated: This field has no effect. Full usage details are always included.' - example: true - deprecated: true - description: Streaming configuration options + - value example: - include_usage: true - ChatNamedToolChoice: + type: input_tokens + value: 50000 + AnthropicToolUsesKeep: type: object properties: type: type: string enum: - - function - function: - type: object - properties: - name: - type: string - description: Function name to call - example: get_weather - required: - - name + - tool_uses + value: + type: integer required: - type - - function - description: Named tool choice for specific function + - value example: - type: function - function: - name: get_weather - ChatToolChoice: - anyOf: - - type: string - enum: - - none - - type: string - enum: - - auto - - type: string - enum: - - required - - $ref: '#/components/schemas/ChatNamedToolChoice' - description: Tool choice configuration - example: auto - ChatWebSearchServerTool: + type: tool_uses + value: 5 + AnthropicInputTokensTrigger: type: object properties: type: type: string enum: - - openrouter:web_search - parameters: - type: object - properties: - engine: - type: string - enum: - - auto - - native - - exa - - firecrawl - - parallel - description: >- - Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - example: auto - x-speakeasy-unknown-values: allow - max_results: - type: number - minimum: 1 - maximum: 25 - description: >- - Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. - example: 5 - max_total_results: - type: number - minimum: 1 - description: >- - Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. - example: 20 - search_context_size: - type: string - enum: - - low - - medium - - high - description: >- - How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - x-speakeasy-unknown-values: allow - user_location: - type: object - properties: - type: - type: string - enum: - - approximate - city: - type: string - region: - type: string - country: - type: string - timezone: - type: string - description: Approximate user location for location-biased results. - allowed_domains: - type: array - items: - type: string - description: >- - Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. - excluded_domains: - type: array - items: - type: string - description: >- - Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. + - input_tokens + value: + type: integer required: - type - description: 'OpenRouter built-in server tool: searches the web for current information' - example: - type: openrouter:web_search - parameters: - engine: auto - max_results: 5 - ChatWebSearchShorthand: - type: object - properties: - type: - type: string - enum: - - web_search - - web_search_preview - - web_search_preview_2025_03_11 - - web_search_2025_08_26 - x-speakeasy-unknown-values: allow - engine: - type: string - enum: - - auto - - native - - exa - - firecrawl - - parallel - description: >- - Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - example: auto - x-speakeasy-unknown-values: allow - max_results: - type: number - minimum: 1 - maximum: 25 - description: >- - Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. - example: 5 - max_total_results: - type: number - minimum: 1 - description: >- - Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. - example: 20 - search_context_size: + - value + example: + type: input_tokens + value: 100000 + AnthropicToolUsesTrigger: + type: object + properties: + type: type: string enum: - - low - - medium - - high - description: >- - How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - x-speakeasy-unknown-values: allow - user_location: - type: object - properties: - type: - type: string - enum: - - approximate - city: - type: string - region: - type: string - country: - type: string - timezone: - type: string - description: Approximate user location for location-biased results. - allowed_domains: - type: array - items: - type: string - description: >- - Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. - excluded_domains: - type: array - items: - type: string - description: >- - Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. - parameters: - type: object - properties: - engine: - type: string - enum: - - auto - - native - - exa - - firecrawl - - parallel - description: >- - Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - example: auto - x-speakeasy-unknown-values: allow - max_results: - type: number - minimum: 1 - maximum: 25 - description: >- - Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. - example: 5 - max_total_results: - type: number - minimum: 1 - description: >- - Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. - example: 20 - search_context_size: - type: string - enum: - - low - - medium - - high - description: >- - How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - x-speakeasy-unknown-values: allow - user_location: - type: object - properties: - type: - type: string - enum: - - approximate - city: - type: string - region: - type: string - country: - type: string - timezone: - type: string - description: Approximate user location for location-biased results. - allowed_domains: - type: array - items: - type: string - description: >- - Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. - excluded_domains: - type: array - items: - type: string - description: >- - Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. + - tool_uses + value: + type: integer required: - type - description: Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search. - ChatFunctionTool: - anyOf: - - type: object - properties: - type: - type: string - enum: - - function - function: - type: object - properties: - name: - type: string - maxLength: 64 - description: Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) - example: get_weather - description: - type: string - description: Function description for the model - example: Get the current weather for a location - parameters: - type: object - additionalProperties: - nullable: true - description: Function parameters as JSON Schema object - example: - type: object - properties: - location: - type: string - description: City name - required: - - location - strict: - type: boolean - nullable: true - description: Enable strict schema adherence - example: false - required: - - name - description: Function definition for tool calling - example: - name: get_weather - description: Get the current weather for a location - parameters: - type: object - properties: - location: - type: string - description: City name - required: - - location - cache_control: - $ref: '#/components/schemas/ChatContentCacheControl' - required: - - type - - function - - $ref: '#/components/schemas/DatetimeServerTool' - - $ref: '#/components/schemas/ChatWebSearchServerTool' - - $ref: '#/components/schemas/ChatWebSearchShorthand' - description: Tool definition for function calling (regular function or OpenRouter built-in server tool) + - value example: - type: function - function: - name: get_weather - description: Get the current weather for a location - parameters: - type: object - properties: - location: - type: string - description: City name - unit: - type: string - enum: - - celsius - - fahrenheit - x-speakeasy-unknown-values: allow - required: - - location - ChatDebugOptions: + type: tool_uses + value: 10 + AnthropicThinkingTurns: type: object properties: - echo_upstream_body: - type: boolean - description: >- - If true, includes the transformed upstream request body in a debug chunk at the start of the stream. Only works with streaming mode. - example: true - description: Debug options for inspecting request transformations (streaming only) + type: + type: string + enum: + - thinking_turns + value: + type: integer + required: + - type + - value example: - echo_upstream_body: true - ChatRequest: + type: thinking_turns + value: 3 + MessagesRequest: type: object properties: - provider: + model: + type: string + max_tokens: + type: integer + system: + anyOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/AnthropicTextBlockParam' + metadata: type: object - nullable: true 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 + user_id: + type: string 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: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per million completion tokens - image: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per image - audio: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per audio unit - request: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per request - 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' - additionalProperties: false - description: When multiple model providers are available, optionally indicate your routing preference. - plugins: + stop_sequences: type: array items: - oneOf: + type: string + temperature: + type: number + format: double + top_p: + type: number + format: double + top_k: + type: integer + tools: + type: array + items: + anyOf: + - type: object + properties: + name: + type: string + description: + type: string + input_schema: + type: object + properties: + type: + type: string + default: object + properties: + nullable: true + required: + type: array + nullable: true + items: + type: string + additionalProperties: + nullable: true + type: + type: string + enum: + - custom + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' + required: + - name + - input_schema - type: object properties: - id: + type: 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/* + - bash_20250124 + name: + type: string + enum: + - bash + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' required: - - id + - type + - name - type: object properties: - id: + type: + type: string + enum: + - text_editor_20250124 + name: type: string enum: - - moderation + - str_replace_editor + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' required: - - id + - type + - name - type: object properties: - id: + type: type: string enum: - - web - enabled: - type: boolean - description: Set to false to disable the web-search plugin for this request. Defaults to true. - max_results: - type: number - search_prompt: + - web_search_20250305 + name: type: string - engine: - $ref: '#/components/schemas/WebSearchEngine' - include_domains: + enum: + - web_search + allowed_domains: type: array + nullable: true items: type: string - description: >- - A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). - example: - - example.com - - '*.substack.com' - - openai.com/blog - exclude_domains: + blocked_domains: type: array + nullable: true items: type: string - description: >- - A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). - example: - - example.com - - '*.substack.com' - - openai.com/blog - required: - - id - - type: object - properties: - id: - type: string - enum: - - file-parser - enabled: - type: boolean - description: Set to false to disable the file-parser plugin for this request. Defaults to true. - pdf: - $ref: '#/components/schemas/PDFParserOptions' + max_uses: + type: integer + user_location: + $ref: '#/components/schemas/AnthropicWebSearchToolUserLocation' + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' required: - - id + - type + - name - type: object properties: - id: + type: type: string enum: - - response-healing - enabled: - type: boolean - description: Set to false to disable the response-healing plugin for this request. Defaults to true. - required: - - id - - type: object - properties: - id: + - web_search_20260209 + name: type: string enum: - - context-compression - enabled: - type: boolean - description: Set to false to disable the context-compression plugin for this request. Defaults to true. - engine: - $ref: '#/components/schemas/ContextCompressionEngine' + - web_search + allowed_callers: + type: array + items: + type: string + enum: + - direct + - code_execution_20250825 + - code_execution_20260120 + x-speakeasy-unknown-values: allow + allowed_domains: + type: array + nullable: true + items: + type: string + blocked_domains: + type: array + nullable: true + items: + type: string + max_uses: + type: integer + user_location: + $ref: '#/components/schemas/AnthropicWebSearchToolUserLocation' + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' required: - - id - description: Plugins you want to enable for this request, including their settings. - route: + - type + - name + - $ref: '#/components/schemas/DatetimeServerTool' + - $ref: '#/components/schemas/OpenRouterWebSearchServerTool' + tool_choice: + oneOf: + - type: object + properties: + type: + type: string + enum: + - auto + disable_parallel_tool_use: + type: boolean + required: + - type + - type: object + properties: + type: + type: string + enum: + - any + disable_parallel_tool_use: + type: boolean + required: + - type + - type: object + properties: + type: + type: string + enum: + - none + required: + - type + - type: object + properties: + type: + type: string + enum: + - tool + name: + type: string + disable_parallel_tool_use: + type: boolean + required: + - type + - name + thinking: + oneOf: + - type: object + properties: + type: + type: string + enum: + - enabled + budget_tokens: + type: integer + required: + - type + - budget_tokens + - type: object + properties: + type: + type: string + enum: + - disabled + required: + - type + - type: object + properties: + type: + type: string + enum: + - adaptive + required: + - type + service_tier: type: string - nullable: true enum: - - fallback - - sort - deprecated: true - description: >- - **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none"). - x-speakeasy-deprecation-message: Use providers.sort.partition instead. - x-speakeasy-ignore: true - x-fern-ignore: true + - auto + - standard_only x-speakeasy-unknown-values: allow + output_config: + $ref: '#/components/schemas/MessagesOutputConfig' + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' + messages: + type: array + nullable: true + items: + $ref: '#/components/schemas/MessagesMessageParam' + stream: + type: boolean + context_management: + type: object + nullable: true + properties: + edits: + type: array + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - clear_tool_uses_20250919 + clear_at_least: + $ref: '#/components/schemas/AnthropicInputTokensClearAtLeast' + clear_tool_inputs: + anyOf: + - type: boolean + - type: array + items: + type: string + - nullable: true + exclude_tools: + type: array + nullable: true + items: + type: string + keep: + $ref: '#/components/schemas/AnthropicToolUsesKeep' + trigger: + oneOf: + - $ref: '#/components/schemas/AnthropicInputTokensTrigger' + - $ref: '#/components/schemas/AnthropicToolUsesTrigger' + discriminator: + propertyName: type + mapping: + input_tokens: '#/components/schemas/AnthropicInputTokensTrigger' + tool_uses: '#/components/schemas/AnthropicToolUsesTrigger' + required: + - type + - type: object + properties: + type: + type: string + enum: + - clear_thinking_20251015 + keep: + anyOf: + - $ref: '#/components/schemas/AnthropicThinkingTurns' + - type: object + properties: + type: + type: string + enum: + - all + required: + - type + - type: string + enum: + - all + required: + - type + - type: object + properties: + type: + type: string + enum: + - compact_20260112 + instructions: + type: string + nullable: true + pause_after_compaction: + type: boolean + trigger: + allOf: + - $ref: '#/components/schemas/AnthropicInputTokensTrigger' + - type: object + nullable: true + properties: {} + example: + type: input_tokens + value: 100000 + required: + - type + provider: + $ref: '#/components/schemas/ProviderPreferences' + plugins: + type: array + items: + oneOf: + - $ref: '#/components/schemas/AutoRouterPlugin' + - $ref: '#/components/schemas/ModerationPlugin' + - $ref: '#/components/schemas/WebSearchPlugin' + - $ref: '#/components/schemas/FileParserPlugin' + - $ref: '#/components/schemas/ResponseHealingPlugin' + - $ref: '#/components/schemas/ContextCompressionPlugin' + discriminator: + propertyName: id + mapping: + auto-router: '#/components/schemas/AutoRouterPlugin' + moderation: '#/components/schemas/ModerationPlugin' + web: '#/components/schemas/WebSearchPlugin' + file-parser: '#/components/schemas/FileParserPlugin' + response-healing: '#/components/schemas/ResponseHealingPlugin' + context-compression: '#/components/schemas/ContextCompressionPlugin' + description: Plugins you want to enable for this request, including their settings. + route: + $ref: '#/components/schemas/DeprecatedRoute' user: type: string - description: Unique user identifier - example: user-123 + maxLength: 256 + description: >- + 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 256 characters. session_id: type: string maxLength: 256 description: >- A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. trace: - type: object - properties: - trace_id: - type: string - trace_name: - type: string - span_name: - type: string - generation_name: - type: string - parent_span_id: - type: string - additionalProperties: - nullable: true - description: >- - Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. - messages: + $ref: '#/components/schemas/TraceConfig' + models: type: array items: - $ref: '#/components/schemas/ChatMessages' - minItems: 1 - description: List of messages for the conversation - example: - - role: user - content: Hello! + type: string + speed: + allOf: + - $ref: '#/components/schemas/AnthropicSpeed' + - example: fast + description: >- + Controls output generation speed. When set to `fast`, uses a higher-speed inference configuration at premium pricing. Defaults to `standard` when omitted. + required: + - model + - messages + description: Request schema for Anthropic Messages API endpoint + example: + model: anthropic/claude-4.5-sonnet-20250929 + max_tokens: 1024 + messages: + - role: user + content: Hello, how are you? + temperature: 0.7 + ActivityItem: + type: object + properties: + date: + type: string + description: Date of the activity (YYYY-MM-DD format) + example: '2025-08-24' model: - $ref: '#/components/schemas/ModelName' - models: - $ref: '#/components/schemas/ChatModelNames' - frequency_penalty: + type: string + description: Model slug (e.g., "openai/gpt-4.1") + example: openai/gpt-4.1 + model_permaslug: + type: string + description: Model permaslug (e.g., "openai/gpt-4.1-2025-04-14") + example: openai/gpt-4.1-2025-04-14 + endpoint_id: + type: string + description: Unique identifier for the endpoint + example: 550e8400-e29b-41d4-a716-446655440000 + provider_name: + type: string + description: Name of the provider serving this endpoint + example: OpenAI + usage: type: number - nullable: true - minimum: -2 - maximum: 2 - description: Frequency penalty (-2.0 to 2.0) - example: 0 - logit_bias: - type: object - nullable: true - additionalProperties: - type: number - description: Token logit bias adjustments - example: - '50256': -100 - logprobs: - type: boolean - nullable: true - description: Return log probabilities - example: false - top_logprobs: + format: double + description: Total cost in USD (OpenRouter credits spent) + example: 0.015 + byok_usage_inference: type: number - nullable: true - minimum: 0 - maximum: 20 - description: Number of top log probabilities to return (0-20) + format: double + description: BYOK inference cost in USD (external credits spent) + example: 0.012 + requests: + type: integer + description: Number of requests made example: 5 - max_completion_tokens: - type: number - nullable: true - minimum: 1 - description: Maximum tokens in completion - example: 100 - max_tokens: - type: number - nullable: true - minimum: 1 - description: 'Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.' - example: 100 - metadata: - type: object - additionalProperties: - type: string - description: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) - example: - user_id: user-123 - session_id: session-456 - presence_penalty: - type: number - nullable: true - minimum: -2 - maximum: 2 - description: Presence penalty (-2.0 to 2.0) - example: 0 - reasoning: - type: object - properties: - effort: - type: string - nullable: true - enum: - - xhigh - - high - - medium - - low - - minimal - - none - description: Constrains effort on reasoning for reasoning models - example: medium - x-speakeasy-unknown-values: allow - summary: - anyOf: - - $ref: '#/components/schemas/ChatReasoningSummaryVerbosityEnum' - - nullable: true - - nullable: true - description: Configuration options for reasoning models - example: - effort: medium - summary: concise - response_format: - oneOf: - - $ref: '#/components/schemas/ChatFormatTextConfig' - - $ref: '#/components/schemas/FormatJsonObjectConfig' - - $ref: '#/components/schemas/ChatFormatJsonSchemaConfig' - - $ref: '#/components/schemas/ChatFormatGrammarConfig' - - $ref: '#/components/schemas/ChatFormatPythonConfig' - discriminator: - propertyName: type - description: Response format configuration - example: - type: json_object - seed: + prompt_tokens: type: integer - nullable: true - description: Random seed for deterministic outputs - example: 42 - stop: - anyOf: - - type: string - - type: array - items: - type: string - maxItems: 4 - - nullable: true - description: Stop sequences (up to 4) - example: - - "" - stream: - type: boolean - default: false - description: Enable streaming response - example: false - stream_options: - $ref: '#/components/schemas/ChatStreamOptions' - temperature: - type: number - nullable: true - minimum: 0 - maximum: 2 - default: 1 - description: Sampling temperature (0-2) - example: 0.7 - parallel_tool_calls: - type: boolean - nullable: true - tool_choice: - $ref: '#/components/schemas/ChatToolChoice' - tools: - type: array - items: - $ref: '#/components/schemas/ChatFunctionTool' - description: Available tools for function calling - example: - - type: function - function: - name: get_weather - description: Get weather - top_p: - type: number - nullable: true - minimum: 0 - maximum: 1 - default: 1 - description: Nucleus sampling parameter (0-1) - example: 1 - debug: - $ref: '#/components/schemas/ChatDebugOptions' - image_config: - type: object - additionalProperties: - anyOf: - - type: string - - type: number - - type: array - items: - nullable: true - description: >- - Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. - example: - aspect_ratio: '16:9' - modalities: + description: Total prompt tokens used + example: 50 + completion_tokens: + type: integer + description: Total completion tokens generated + example: 125 + reasoning_tokens: + type: integer + description: Total reasoning tokens used + example: 25 + required: + - date + - model + - model_permaslug + - endpoint_id + - provider_name + - usage + - byok_usage_inference + - requests + - prompt_tokens + - completion_tokens + - reasoning_tokens + example: + date: '2025-08-24' + model: openai/gpt-4.1 + model_permaslug: openai/gpt-4.1-2025-04-14 + endpoint_id: 550e8400-e29b-41d4-a716-446655440000 + provider_name: OpenAI + usage: 0.015 + byok_usage_inference: 0.012 + requests: 5 + prompt_tokens: 50 + completion_tokens: 125 + reasoning_tokens: 25 + ActivityResponse: + type: object + properties: + data: type: array items: - type: string - enum: - - text - - image - - audio - x-speakeasy-unknown-values: allow - description: Output modalities for the response. Supported values are "text", "image", and "audio". - example: - - text - - image - cache_control: - type: object - properties: - type: - type: string - enum: - - ephemeral - ttl: - type: string - enum: - - 5m - - 1h - x-speakeasy-unknown-values: allow - required: - - type - description: >- - Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. - service_tier: - type: string - nullable: true - enum: - - auto - - default - - flex - - priority - - scale - description: The service tier to use for processing this request. - example: auto - x-speakeasy-unknown-values: allow + $ref: '#/components/schemas/ActivityItem' + description: List of activity items required: - - messages - description: Chat completion request parameters + - data example: - messages: - - role: system - content: You are a helpful assistant. - - role: user - content: What is the capital of France? - model: openai/gpt-4 - temperature: 0.7 - max_tokens: 150 - CreateChargeRequest: + data: + - date: '2025-08-24' + model: openai/gpt-4.1 + model_permaslug: openai/gpt-4.1-2025-04-14 + endpoint_id: 550e8400-e29b-41d4-a716-446655440000 + provider_name: OpenAI + usage: 0.015 + byok_usage_inference: 0.012 + requests: 5 + prompt_tokens: 50 + completion_tokens: 125 + reasoning_tokens: 25 + ForbiddenResponseErrorData: type: object properties: - amount: - type: number - sender: - type: string - chain_id: + code: type: integer - enum: - - 1 - - 137 - - 8453 - x-speakeasy-unknown-values: allow + message: + type: string + metadata: + type: object + nullable: true + additionalProperties: + nullable: true required: - - amount - - sender - - chain_id - description: Create a Coinbase charge for crypto payment + - code + - message + description: Error data for ForbiddenResponse example: - amount: 100 - sender: '0x1234567890123456789012345678901234567890' - chain_id: 1 - ProviderPreferences: + code: 403 + message: Only management keys can perform this operation + ForbiddenResponse: 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 + error: + $ref: '#/components/schemas/ForbiddenResponseErrorData' + user_id: + type: string 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: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per million completion tokens - image: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per image - audio: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per audio unit - request: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per request - 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: - type: object - properties: - prompt: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - completion: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - request: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - image: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - image_token: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - image_output: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - audio: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - audio_output: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - input_audio_cache: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - web_search: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - internal_reasoning: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - input_cache_read: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - input_cache_write: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - discount: - type: number required: - - prompt - - completion - description: Pricing information for the model - example: - prompt: '0.00003' - completion: '0.00006' - request: '0' - image: '0' - ModelGroup: - type: string - enum: - - Router - - Media - - Other - - GPT - - Claude - - Gemini - - Grok - - Cohere - - Nova - - Qwen - - Yi - - DeepSeek - - Mistral - - Llama2 - - Llama3 - - Llama4 - - PaLM - - RWKV - - Qwen3 - example: GPT - description: Tokenizer type used by the model - x-speakeasy-unknown-values: allow - InputModality: + - error + description: Forbidden - Authentication successful but insufficient permissions + example: + error: + code: 403 + message: Only management keys can perform this operation + ChatFinishReasonEnum: type: string + nullable: true enum: - - text - - image - - file - - audio - - video - example: text + - tool_calls + - stop + - length + - content_filter + - error + - null + example: stop x-speakeasy-unknown-values: allow - OutputModality: - type: string - enum: + ChatContentCacheControl: + allOf: + - $ref: '#/components/schemas/AnthropicCacheControlDirective' + - type: object + properties: {} + example: + type: ephemeral + ttl: 5m + description: Cache control for the content part + ChatContentText: + type: object + properties: + type: + type: string + enum: + - text + text: + type: string + cache_control: + $ref: '#/components/schemas/ChatContentCacheControl' + required: + - type - text - - image - - embeddings - - audio - - video - example: text - x-speakeasy-unknown-values: allow - ModelArchitecture: + description: Text content part + example: + type: text + text: Hello, world! + ChatContentImage: type: object properties: - tokenizer: - $ref: '#/components/schemas/ModelGroup' - instruct_type: + type: type: string - nullable: true enum: - - none - - airoboros - - alpaca - - alpaca-modif - - chatml - - claude - - code-llama - - gemma - - llama2 - - llama3 - - mistral - - nemotron - - neural - - openchat - - phi3 - - rwkv - - vicuna - - zephyr - - deepseek-r1 - - deepseek-v3.1 - - qwq - - qwen3 - example: chatml - description: Instruction format type - x-speakeasy-unknown-values: allow - modality: + - image_url + image_url: + type: object + properties: + url: + type: string + description: 'URL of the image (data: URLs supported)' + detail: + type: string + enum: + - auto + - low + - high + description: Image detail level for vision models + x-speakeasy-unknown-values: allow + required: + - url + required: + - type + - image_url + description: Image content part for vision models + example: + type: image_url + image_url: + url: https://example.com/image.jpg + detail: auto + ChatContentAudio: + type: object + properties: + type: type: string - nullable: true - description: Primary modality of the model - example: text->text - input_modalities: - type: array - items: - $ref: '#/components/schemas/InputModality' - description: Supported input modalities - output_modalities: - type: array - items: - $ref: '#/components/schemas/OutputModality' - description: Supported output modalities + enum: + - input_audio + input_audio: + type: object + properties: + data: + type: string + description: Base64 encoded audio data + format: + type: string + description: >- + Audio format (e.g., wav, mp3, flac, m4a, ogg, aiff, aac, pcm16, pcm24). Supported formats vary by provider. + required: + - data + - format + required: + - type + - input_audio + description: Audio input content part. Supported audio formats vary by provider. + example: + type: input_audio + input_audio: + data: SGVsbG8gV29ybGQ= + format: wav + Legacy_ChatContentVideo: + type: object + properties: + type: + type: string + enum: + - input_video + video_url: + $ref: '#/components/schemas/ChatContentVideoInput' + required: + - type + - video_url + description: Video input content part (legacy format - deprecated) + deprecated: true + example: + type: input_video + video_url: + url: https://example.com/video.mp4 + ChatContentVideoInput: + type: object + properties: + url: + type: string + description: 'URL of the video (data: URLs supported)' + required: + - url + description: Video input object + example: + url: https://example.com/video.mp4 + ChatContentVideo: + type: object + properties: + type: + type: string + enum: + - video_url + video_url: + $ref: '#/components/schemas/ChatContentVideoInput' + required: + - type + - video_url + description: Video input content part + example: + type: video_url + video_url: + url: https://example.com/video.mp4 + ChatContentFile: + type: object + properties: + type: + type: string + enum: + - file + file: + type: object + properties: + file_data: + type: string + description: File content as base64 data URL or URL + file_id: + type: string + description: File ID for previously uploaded files + filename: + type: string + description: Original filename + required: + - type + - file + description: File content part for document processing + example: + type: file + file: + file_data: https://example.com/document.pdf + filename: document.pdf + ChatContentItems: + oneOf: + - $ref: '#/components/schemas/ChatContentText' + - $ref: '#/components/schemas/ChatContentImage' + - $ref: '#/components/schemas/ChatContentAudio' + - $ref: '#/components/schemas/Legacy_ChatContentVideo' + - $ref: '#/components/schemas/ChatContentVideo' + - $ref: '#/components/schemas/ChatContentFile' + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/ChatContentText' + image_url: '#/components/schemas/ChatContentImage' + input_audio: '#/components/schemas/ChatContentAudio' + input_video: '#/components/schemas/Legacy_ChatContentVideo' + video_url: '#/components/schemas/ChatContentVideo' + file: '#/components/schemas/ChatContentFile' + description: Content part for chat completion messages + example: + type: text + text: Hello, world! + ChatToolCall: + type: object + properties: + id: + type: string + description: Tool call identifier + type: + type: string + enum: + - function + function: + type: object + properties: + name: + type: string + description: Function name to call + arguments: + type: string + description: Function arguments as JSON string + required: + - name + - arguments required: - - modality - - input_modalities - - output_modalities - description: Model architecture information + - id + - type + - function + description: Tool call made by the assistant example: - tokenizer: GPT - instruct_type: chatml - modality: text->text - input_modalities: - - text - output_modalities: - - text - TopProviderInfo: + id: call_abc123 + type: function + function: + name: get_current_weather + arguments: '{"location": "Boston, MA"}' + ReasoningDetailSummary: type: object properties: - context_length: - type: number - nullable: true - description: Context length from the top provider - example: 8192 - max_completion_tokens: - type: number + type: + type: string + enum: + - reasoning.summary + summary: + type: string + id: + type: string nullable: true - description: Maximum completion tokens from the top provider - example: 4096 - is_moderated: - type: boolean - description: Whether the top provider moderates content - example: true + format: + $ref: '#/components/schemas/ReasoningFormat' + index: + type: integer required: - - is_moderated - description: Information about the top provider for this model + - type + - summary + description: Reasoning detail summary schema example: - context_length: 8192 - max_completion_tokens: 4096 - is_moderated: true - PerRequestLimits: + type: reasoning.summary + summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions... + ReasoningDetailEncrypted: type: object - nullable: true properties: - prompt_tokens: - type: number - example: 1000 - description: Maximum prompt tokens per request - completion_tokens: - type: number - example: 1000 - description: Maximum completion tokens per request + type: + type: string + enum: + - reasoning.encrypted + data: + type: string + id: + type: string + nullable: true + format: + $ref: '#/components/schemas/ReasoningFormat' + index: + type: integer required: - - prompt_tokens - - completion_tokens - description: Per-request token limits + - type + - data + description: Reasoning detail encrypted schema example: - prompt_tokens: 1000 - completion_tokens: 1000 - Parameter: - type: string - enum: - - temperature - - top_p - - top_k - - min_p - - top_a - - frequency_penalty - - presence_penalty - - repetition_penalty - - max_tokens - - logit_bias - - logprobs - - top_logprobs - - seed - - response_format - - structured_outputs - - stop - - tools - - tool_choice - - parallel_tool_calls - - include_reasoning - - reasoning - - reasoning_effort - - web_search_options - - verbosity - example: temperature - x-speakeasy-unknown-values: allow - DefaultParameters: + type: reasoning.encrypted + data: encrypted data + ReasoningDetailText: type: object - nullable: true properties: - temperature: - type: number - nullable: true - minimum: 0 - maximum: 2 - top_p: - type: number - nullable: true - minimum: 0 - maximum: 1 - top_k: - type: integer - nullable: true - minimum: 0 - frequency_penalty: - type: number + type: + type: string + enum: + - reasoning.text + text: + type: string nullable: true - minimum: -2 - maximum: 2 - presence_penalty: - type: number + signature: + type: string nullable: true - minimum: -2 - maximum: 2 - repetition_penalty: - type: number + id: + type: string nullable: true - minimum: 0 - maximum: 2 - additionalProperties: false - description: Default parameters for this model + format: + $ref: '#/components/schemas/ReasoningFormat' + index: + type: integer + required: + - type + description: Reasoning detail text schema example: - temperature: 0.7 - top_p: 0.9 - top_k: 0 - frequency_penalty: 0 - presence_penalty: 0 - repetition_penalty: 1 - Model: + type: reasoning.text + text: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions... + signature: signature + ReasoningDetailUnion: + oneOf: + - $ref: '#/components/schemas/ReasoningDetailSummary' + - $ref: '#/components/schemas/ReasoningDetailEncrypted' + - $ref: '#/components/schemas/ReasoningDetailText' + discriminator: + propertyName: type + mapping: + reasoning.summary: '#/components/schemas/ReasoningDetailSummary' + reasoning.encrypted: '#/components/schemas/ReasoningDetailEncrypted' + reasoning.text: '#/components/schemas/ReasoningDetailText' + description: Reasoning detail union schema + example: + type: reasoning.summary + summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions... + ChatReasoningDetails: + type: array + items: + $ref: '#/components/schemas/ReasoningDetailUnion' + description: Reasoning details for extended thinking models + example: + - type: thinking + thinking: Let me work through this step by step... + ChatAssistantImages: + type: array + items: + type: object + properties: + image_url: + type: object + properties: + url: + type: string + description: URL or base64-encoded data of the generated image + required: + - url + required: + - image_url + description: Generated images from image generation models + example: + - image_url: + url: data:image/png;base64,iVBORw0KGgo... + ChatAudioOutput: type: object properties: id: type: string - description: Unique identifier for the model - example: openai/gpt-4 - canonical_slug: + description: Audio output identifier + expires_at: + type: integer + description: Audio expiration timestamp + data: type: string - description: Canonical slug for the model - example: openai/gpt-4 - hugging_face_id: + description: Base64 encoded audio data + transcript: type: string - nullable: true - description: Hugging Face model identifier, if applicable - example: microsoft/DialoGPT-medium - name: + description: Audio transcript + description: Audio output data or reference + example: + id: audio_abc123 + expires_at: 1677652400 + data: UklGRnoGAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQoGAACBhYqFbF1f + transcript: Hello! How can I help you today? + ChatAssistantMessage: + type: object + properties: + role: type: string - description: Display name of the model - example: GPT-4 - created: - type: number - description: Unix timestamp of when the model was created - example: 1692901234 - description: + enum: + - assistant + content: + anyOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/ChatContentItems' + - nullable: true + description: Assistant message content + name: type: string - description: Description of the model - example: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. - pricing: - $ref: '#/components/schemas/PublicPricing' - context_length: - type: number - nullable: true - description: Maximum context length in tokens - example: 8192 - architecture: - $ref: '#/components/schemas/ModelArchitecture' - top_provider: - $ref: '#/components/schemas/TopProviderInfo' - per_request_limits: - $ref: '#/components/schemas/PerRequestLimits' - supported_parameters: + description: Optional name for the assistant + tool_calls: type: array items: - $ref: '#/components/schemas/Parameter' - description: List of supported parameters for this model - default_parameters: - $ref: '#/components/schemas/DefaultParameters' - knowledge_cutoff: + $ref: '#/components/schemas/ChatToolCall' + description: Tool calls made by the assistant + refusal: type: string nullable: true - description: The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. - example: '2024-10-01' - expiration_date: + description: Refusal message if content was refused + reasoning: type: string nullable: true - description: The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. - example: '2025-06-01' + description: Reasoning output + reasoning_details: + $ref: '#/components/schemas/ChatReasoningDetails' + images: + $ref: '#/components/schemas/ChatAssistantImages' + audio: + $ref: '#/components/schemas/ChatAudioOutput' required: - - id - - canonical_slug - - name - - created - - pricing - - context_length - - architecture - - top_provider - - per_request_limits - - supported_parameters - - default_parameters - description: Information about an AI model available on OpenRouter + - role + description: Assistant message for requests and responses example: - id: openai/gpt-4 - canonical_slug: openai/gpt-4 - name: GPT-4 - created: 1692901234 - description: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. - pricing: - prompt: '0.00003' - completion: '0.00006' - request: '0' - image: '0' - context_length: 8192 - architecture: - tokenizer: GPT - instruct_type: chatml - modality: text->text - input_modalities: - - text - output_modalities: - - text - top_provider: - context_length: 8192 - max_completion_tokens: 4096 - is_moderated: true - per_request_limits: null - supported_parameters: - - temperature - - top_p - - max_tokens - default_parameters: null - knowledge_cutoff: null - expiration_date: null - ModelsListResponseData: - type: array - items: - $ref: '#/components/schemas/Model' - description: List of available models - ModelsListResponse: + role: assistant + content: The capital of France is Paris. + ChatTokenLogprob: type: object properties: - data: - $ref: '#/components/schemas/ModelsListResponseData' + token: + type: string + description: The token + logprob: + type: number + format: double + description: Log probability of the token + bytes: + type: array + nullable: true + items: + type: integer + description: UTF-8 bytes of the token + top_logprobs: + type: array + items: + type: object + properties: + token: + type: string + logprob: + type: number + format: double + bytes: + type: array + nullable: true + items: + type: integer + required: + - token + - logprob + - bytes + description: Top alternative tokens with probabilities required: - - data - description: List of available models + - token + - logprob + - bytes + - top_logprobs + description: Token log probability information example: - data: - - id: openai/gpt-4 - canonical_slug: openai/gpt-4 - name: GPT-4 - created: 1692901234 - description: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. - pricing: - prompt: '0.00003' - completion: '0.00006' - request: '0' - image: '0' - context_length: 8192 - architecture: - tokenizer: GPT - instruct_type: chatml - modality: text->text - input_modalities: - - text - output_modalities: - - text - top_provider: - context_length: 8192 - max_completion_tokens: 4096 - is_moderated: true - per_request_limits: null - supported_parameters: - - temperature - - top_p - - max_tokens - - frequency_penalty - - presence_penalty - default_parameters: null - knowledge_cutoff: null - expiration_date: null - ModelsCountResponse: + token: ' Hello' + logprob: -0.612345 + bytes: null + top_logprobs: + - token: ' Hello' + logprob: -0.612345 + bytes: null + ChatTokenLogprobs: type: object + nullable: true properties: - data: - type: object - properties: - count: - type: number - description: Total number of available models - example: 150 - required: - - count - description: Model count data - example: - count: 150 + content: + type: array + nullable: true + items: + $ref: '#/components/schemas/ChatTokenLogprob' + description: Log probabilities for content tokens + refusal: + type: array + nullable: true + items: + $ref: '#/components/schemas/ChatTokenLogprob' + description: Log probabilities for refusal tokens required: - - data - description: Model count data + - content + description: Log probabilities for the completion example: - data: - count: 150 - InstructType: - type: string - nullable: true - enum: - - none - - airoboros - - alpaca - - alpaca-modif - - chatml - - claude - - code-llama - - gemma - - llama2 - - llama3 - - mistral - - nemotron - - neural - - openchat - - phi3 - - rwkv - - vicuna - - zephyr - - deepseek-r1 - - deepseek-v3.1 - - qwq - - qwen3 - description: Instruction format type - x-speakeasy-unknown-values: allow - EndpointStatus: - type: integer - enum: - - 0 - - -1 - - -2 - - -3 - - -5 - - -10 - example: 0 - x-speakeasy-unknown-values: allow - PercentileStats: + content: + - token: ' Hello' + logprob: -0.612345 + bytes: null + top_logprobs: [] + refusal: null + ChatChoice: 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 + finish_reason: + $ref: '#/components/schemas/ChatFinishReasonEnum' + index: + type: integer + description: Choice index + example: 0 + message: + $ref: '#/components/schemas/ChatAssistantMessage' + logprobs: + $ref: '#/components/schemas/ChatTokenLogprobs' required: - - p50 - - p75 - - p90 - - p99 - description: >- - Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. - PublicEndpoint: + - finish_reason + - index + - message + description: Chat completion choice + example: + finish_reason: stop + index: 0 + message: + role: assistant + content: The capital of France is Paris. + logprobs: null + ChatUsage: type: object properties: - name: + completion_tokens: + type: integer + description: Number of tokens in the completion + prompt_tokens: + type: integer + description: Number of tokens in the prompt + total_tokens: + type: integer + description: Total number of tokens + completion_tokens_details: + type: object + nullable: true + properties: + reasoning_tokens: + type: integer + description: Tokens used for reasoning + audio_tokens: + type: integer + description: Tokens used for audio output + accepted_prediction_tokens: + type: integer + description: Accepted prediction tokens + rejected_prediction_tokens: + type: integer + description: Rejected prediction tokens + description: Detailed completion token usage + prompt_tokens_details: + type: object + nullable: true + properties: + cached_tokens: + type: integer + description: Cached prompt tokens + cache_write_tokens: + type: integer + description: Tokens written to cache. Only returned for models with explicit caching and cache write pricing. + audio_tokens: + type: integer + description: Audio input tokens + video_tokens: + type: integer + description: Video input tokens + description: Detailed prompt token usage + required: + - completion_tokens + - prompt_tokens + - total_tokens + description: Token usage statistics + example: + completion_tokens: 15 + prompt_tokens: 10 + total_tokens: 25 + completion_tokens_details: + reasoning_tokens: 5 + prompt_tokens_details: + cached_tokens: 2 + ChatResult: + type: object + properties: + id: type: string - model_id: + description: Unique completion identifier + example: chatcmpl-123 + choices: + type: array + items: + $ref: '#/components/schemas/ChatChoice' + description: List of completion choices + created: + type: integer + description: Unix timestamp of creation + example: 1677652288 + model: type: string - description: The unique identifier for the model (permaslug) + description: Model used for completion example: openai/gpt-4 - model_name: + object: type: string - context_length: - type: number - pricing: + enum: + - chat.completion + system_fingerprint: + type: string + nullable: true + description: System fingerprint + example: fp_44709d6fcb + service_tier: + type: string + nullable: true + description: The service tier used by the upstream provider for this request + example: default + usage: + $ref: '#/components/schemas/ChatUsage' + required: + - id + - choices + - created + - model + - object + - system_fingerprint + description: Chat completion response + example: + id: chatcmpl-123 + object: chat.completion + created: 1677652288 + model: openai/gpt-4 + choices: + - index: 0 + message: + role: assistant + content: The capital of France is Paris. + finish_reason: stop + usage: + prompt_tokens: 10 + completion_tokens: 15 + total_tokens: 25 + ChatStreamToolCall: + type: object + properties: + index: + type: integer + description: Tool call index in the array + example: 0 + id: + type: string + description: Tool call identifier + example: call_abc123 + type: + type: string + enum: + - function + description: Tool call type + example: function + function: type: object properties: - prompt: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - completion: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - request: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - image: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - image_token: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - image_output: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - audio: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - audio_output: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - input_audio_cache: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - web_search: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - internal_reasoning: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - input_cache_read: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - input_cache_write: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - discount: - type: number - required: - - prompt - - completion - provider_name: - $ref: '#/components/schemas/ProviderName' - tag: + name: + type: string + description: Function name + example: get_weather + arguments: + type: string + description: Function arguments as JSON string + example: '{"location": "..."}' + description: Function call details + required: + - index + description: Tool call delta for streaming responses + example: + index: 0 + id: call_abc123 + type: function + function: + name: get_weather + arguments: '{"location": "..."}' + ChatStreamReasoningDetails: + type: array + items: + $ref: '#/components/schemas/ReasoningDetailUnion' + description: Reasoning details for extended thinking models + example: + - type: text + text: Let me think about this... + ChatStreamDelta: + type: object + properties: + role: + type: string + enum: + - assistant + description: The role of the message author + example: assistant + content: type: string - quantization: - allOf: - - $ref: '#/components/schemas/Quantization' - - nullable: true - max_completion_tokens: - type: number nullable: true - max_prompt_tokens: - type: number + description: Message content delta + example: Hello + reasoning: + type: string nullable: true - supported_parameters: + description: Reasoning content delta + example: I need to + refusal: + type: string + nullable: true + description: Refusal message delta + example: null + tool_calls: type: array items: - $ref: '#/components/schemas/Parameter' - status: - $ref: '#/components/schemas/EndpointStatus' - uptime_last_30m: - type: number - nullable: true - supports_implicit_caching: - type: boolean - latency_last_30m: - $ref: '#/components/schemas/PercentileStats' - throughput_last_30m: + $ref: '#/components/schemas/ChatStreamToolCall' + description: Tool calls delta + reasoning_details: + $ref: '#/components/schemas/ChatStreamReasoningDetails' + audio: allOf: - - $ref: '#/components/schemas/PercentileStats' - - description: >- - Throughput percentiles in tokens per second over the last 30 minutes. Throughput measures output token generation speed. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. + - $ref: '#/components/schemas/ChatAudioOutput' + - description: Audio output data + description: Delta changes in streaming response + example: + role: assistant + content: Hello + ChatStreamChoice: + type: object + properties: + delta: + $ref: '#/components/schemas/ChatStreamDelta' + finish_reason: + $ref: '#/components/schemas/ChatFinishReasonEnum' + index: + type: integer + description: Choice index + example: 0 + logprobs: + $ref: '#/components/schemas/ChatTokenLogprobs' required: - - name - - model_id - - model_name - - context_length - - pricing - - provider_name - - tag - - quantization - - max_completion_tokens - - max_prompt_tokens - - supported_parameters - - uptime_last_30m - - supports_implicit_caching - - latency_last_30m - - throughput_last_30m - description: Information about a specific model endpoint + - delta + - finish_reason + - index + description: Streaming completion choice chunk example: - name: 'OpenAI: GPT-4' - model_id: openai/gpt-4 - model_name: GPT-4 - context_length: 8192 - pricing: - prompt: '0.00003' - completion: '0.00006' - request: '0' - image: '0' - provider_name: OpenAI - tag: openai - quantization: fp16 - max_completion_tokens: 4096 - max_prompt_tokens: 8192 - supported_parameters: - - temperature - - top_p - - max_tokens - status: 0 - 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 - ListEndpointsResponse: + index: 0 + delta: + role: assistant + content: Hello + finish_reason: null + ChatStreamChunk: type: object properties: id: type: string - description: Unique identifier for the model - example: openai/gpt-4 - name: - type: string - description: Display name of the model - example: GPT-4 - created: - type: number - description: Unix timestamp of when the model was created - example: 1692901234 - description: - type: string - description: Description of the model - example: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. - architecture: - allOf: - - $ref: '#/components/schemas/ModelArchitecture' - - properties: - tokenizer: - allOf: - - $ref: '#/components/schemas/ModelGroup' - - nullable: true - instruct_type: - $ref: '#/components/schemas/InstructType' - modality: - type: string - nullable: true - description: Primary modality of the model - example: text - input_modalities: - type: array - items: - $ref: '#/components/schemas/InputModality' - description: Supported input modalities - output_modalities: - type: array - items: - $ref: '#/components/schemas/OutputModality' - description: Supported output modalities - required: - - tokenizer - - instruct_type - - modality - - input_modalities - - output_modalities - example: - tokenizer: GPT - instruct_type: chatml - modality: text - endpoints: + description: Unique chunk identifier + example: chatcmpl-123 + choices: type: array items: - $ref: '#/components/schemas/PublicEndpoint' - description: List of available endpoints for this model - required: - - id - - name - - created - - description - - architecture - - endpoints - description: List of available endpoints for a model - example: - 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' - request: '0' - image: '0' - 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 - status: default - 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 - ConflictResponseErrorData: - type: object - properties: - code: + $ref: '#/components/schemas/ChatStreamChoice' + description: List of streaming chunk choices + created: type: integer - message: + description: Unix timestamp of creation + example: 1677652288 + model: + type: string + description: Model used for completion + example: openai/gpt-4 + object: + type: string + enum: + - chat.completion.chunk + system_fingerprint: + type: string + description: System fingerprint + example: fp_44709d6fcb + service_tier: type: string - metadata: - type: object nullable: true - additionalProperties: - nullable: true + description: The service tier used by the upstream provider for this request + example: default + error: + type: object + properties: + message: + type: string + description: Error message + example: Rate limit exceeded + code: + type: integer + format: int32 + description: Error code + example: 429 + required: + - message + - code + description: Error information + example: + message: Rate limit exceeded + code: 429 + usage: + $ref: '#/components/schemas/ChatUsage' required: - - code - - message - description: Error data for ConflictResponse + - id + - choices + - created + - model + - object + description: Streaming chat completion chunk + x-speakeasy-entity: ChatStreamChunk example: - code: 409 - message: Resource conflict. Please try again later. - ConflictResponse: + id: chatcmpl-123 + object: chat.completion.chunk + created: 1677652288 + model: openai/gpt-4 + choices: + - index: 0 + delta: + role: assistant + content: Hello + finish_reason: null + ChatSystemMessage: type: object properties: - error: - $ref: '#/components/schemas/ConflictResponseErrorData' - user_id: + role: type: string - nullable: true + enum: + - system + content: + anyOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/ChatContentText' + description: System message content + example: You are a helpful assistant. + name: + type: string + description: Optional name for the system message + example: Assistant Config required: - - error - description: Conflict - Resource conflict or concurrent modification + - role + - content + description: System message for setting behavior example: - error: - code: 409 - message: Resource conflict. Please try again later. - parameters: - AppIdentifier: - name: HTTP-Referer - in: header - schema: - type: string - description: | - The app identifier should be your app's URL and is used as the primary identifier for rankings. - This is used to track API usage per application. - AppDisplayName: - name: X-OpenRouter-Title - in: header - x-speakeasy-name-override: appTitle - schema: - type: string - description: | - The app display name allows you to customize how your app appears in OpenRouter's dashboard. - AppCategories: - name: X-OpenRouter-Categories - in: header - x-speakeasy-name-override: appCategories - schema: - type: string - description: | - Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. - securitySchemes: - apiKey: - type: http - scheme: bearer - description: API key as bearer token in Authorization header - bearer: - type: http - scheme: bearer - description: API key as bearer token in Authorization header -paths: - /responses: - post: - x-speakeasy-name-override: send - x-speakeasy-stream-request-field: stream - tags: - - beta.responses - summary: Create a response - description: Creates a streaming or non-streaming response using OpenResponses API format - requestBody: + role: system + content: You are a helpful assistant. + name: Assistant Config + ChatUserMessage: + type: object + properties: + role: + type: string + enum: + - user content: - application/json: - schema: - $ref: '#/components/schemas/ResponsesRequest' - required: true - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/OpenResponsesResult' - text/event-stream: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/StreamEvents' - required: - - data - x-speakeasy-sse-sentinel: '[DONE]' - '400': - description: Bad Request - Invalid request parameters or malformed input - content: - application/json: - schema: - $ref: '#/components/schemas/BadRequestResponse' - '401': - description: Unauthorized - Authentication required or invalid credentials - content: - application/json: - schema: - $ref: '#/components/schemas/UnauthorizedResponse' - '402': - description: Payment Required - Insufficient credits or quota to complete request - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentRequiredResponse' - '404': - description: Not Found - Resource does not exist - content: - application/json: - schema: - $ref: '#/components/schemas/NotFoundResponse' - '408': - description: Request Timeout - Operation exceeded time limit - content: - application/json: - schema: - $ref: '#/components/schemas/RequestTimeoutResponse' - '413': - description: Payload Too Large - Request payload exceeds size limits - content: - application/json: - schema: - $ref: '#/components/schemas/PayloadTooLargeResponse' - '422': - description: Unprocessable Entity - Semantic validation failure - content: - application/json: - schema: - $ref: '#/components/schemas/UnprocessableEntityResponse' - '429': - description: Too Many Requests - Rate limit exceeded - content: - application/json: - schema: - $ref: '#/components/schemas/TooManyRequestsResponse' - '500': - description: Internal Server Error - Unexpected server error - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerResponse' - '502': - description: Bad Gateway - Provider/upstream API failure - content: - application/json: - schema: - $ref: '#/components/schemas/BadGatewayResponse' - '503': - description: Service Unavailable - Service temporarily unavailable - content: - application/json: - schema: - $ref: '#/components/schemas/ServiceUnavailableResponse' - '524': - description: Infrastructure Timeout - Request timed out at our edge network - content: - application/json: - schema: - $ref: '#/components/schemas/EdgeNetworkTimeoutResponse' - '529': - description: Provider Overloaded - Provider is temporarily overloaded - content: - application/json: - schema: - $ref: '#/components/schemas/ProviderOverloadedResponse' - operationId: createResponses - parameters: - - $ref: "#/components/parameters/AppIdentifier" - - $ref: "#/components/parameters/AppDisplayName" - - $ref: "#/components/parameters/AppCategories" - /messages: - post: - x-speakeasy-ignore: true - x-speakeasy-name-override: create - x-speakeasy-stream-request-field: stream - tags: - - Anthropic Messages - summary: Create a message - description: >- - Creates a message using the Anthropic Messages API format. Supports text, images, PDFs, tools, and extended thinking. - requestBody: + anyOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/ChatContentItems' + description: User message content + example: What is the capital of France? + name: + type: string + description: Optional name for the user + example: User + required: + - role + - content + description: User message + example: + role: user + content: What is the capital of France? + ChatDeveloperMessage: + type: object + properties: + role: + type: string + enum: + - developer content: - application/json: - schema: - $ref: '#/components/schemas/MessagesRequest' - required: true - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/MessagesResult' - text/event-stream: - schema: - type: object - properties: - event: - type: string - data: - $ref: '#/components/schemas/MessagesStreamEvents' - required: - - event - - data - x-speakeasy-sse-sentinel: '[DONE]' - '400': - description: Invalid request error - content: - application/json: - schema: - type: object - properties: - type: - type: string - enum: - - error - error: - type: object - properties: - type: - type: string - message: - type: string - required: - - type - - message - required: - - type - - error - '401': - description: Authentication error - content: - application/json: - schema: - type: object - properties: - type: - type: string - enum: - - error - error: - type: object - properties: - type: - type: string - message: - type: string - required: - - type - - message - required: - - type - - error - '403': - description: Permission denied error - content: - application/json: - schema: - type: object - properties: - type: - type: string - enum: - - error - error: - type: object - properties: - type: - type: string - message: - type: string - required: - - type - - message - required: - - type - - error - '404': - description: Not found error - content: - application/json: - schema: - type: object - properties: - type: - type: string - enum: - - error - error: - type: object - properties: - type: - type: string - message: - type: string - required: - - type - - message - required: - - type - - error - '429': - description: Rate limit error - content: - application/json: - schema: - type: object - properties: - type: - type: string - enum: - - error - error: - type: object - properties: - type: - type: string - message: - type: string - required: - - type - - message - required: - - type - - error - '500': - description: API error - content: - application/json: - schema: - type: object - properties: - type: - type: string - enum: - - error - error: - type: object - properties: - type: - type: string - message: - type: string - required: - - type - - message - required: - - type - - error - '503': - description: Overloaded error - content: - application/json: - schema: - type: object - properties: - type: - type: string - enum: - - error - error: - type: object - properties: - type: - type: string - message: - type: string - required: - - type - - message - required: - - type - - error - '529': - description: Overloaded error - content: - application/json: - schema: - type: object - properties: - type: - type: string - enum: - - error - error: - type: object - properties: - type: - type: string - message: - type: string - required: - - type - - message - required: - - type - - error - operationId: createMessages - parameters: - - $ref: "#/components/parameters/AppIdentifier" - - $ref: "#/components/parameters/AppDisplayName" - - $ref: "#/components/parameters/AppCategories" - /activity: - get: - tags: - - Analytics - operationId: getUserActivity - summary: Get user activity grouped by endpoint + anyOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/ChatContentText' + description: Developer message content + example: This is a message from the developer. + name: + type: string + description: Optional name for the developer message + example: Developer + required: + - role + - content + description: Developer message + example: + role: developer + content: This is a message from the developer. + ChatToolMessage: + type: object + properties: + role: + type: string + enum: + - tool + content: + anyOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/ChatContentItems' + description: Tool response content + example: The weather in San Francisco is 72°F and sunny. + tool_call_id: + type: string + description: ID of the assistant message tool call this message responds to + example: call_abc123 + required: + - role + - content + - tool_call_id + description: Tool response message + example: + role: tool + content: The weather in San Francisco is 72°F and sunny. + tool_call_id: call_abc123 + ChatMessages: + oneOf: + - $ref: '#/components/schemas/ChatSystemMessage' + - $ref: '#/components/schemas/ChatUserMessage' + - $ref: '#/components/schemas/ChatDeveloperMessage' + - $ref: '#/components/schemas/ChatAssistantMessage' + - $ref: '#/components/schemas/ChatToolMessage' + discriminator: + propertyName: role + mapping: + system: '#/components/schemas/ChatSystemMessage' + user: '#/components/schemas/ChatUserMessage' + developer: '#/components/schemas/ChatDeveloperMessage' + assistant: '#/components/schemas/ChatAssistantMessage' + tool: '#/components/schemas/ChatToolMessage' + description: Chat completion message with role-based discrimination + example: + role: user + content: What is the capital of France? + ModelName: + type: string + description: Model to use for completion + example: openai/gpt-4 + ChatModelNames: + type: array + items: + allOf: + - $ref: '#/components/schemas/ModelName' + - description: Available OpenRouter chat completion models + description: Models to use for completion + example: + - openai/gpt-4 + - openai/gpt-4o + ChatReasoningSummaryVerbosityEnum: + type: string + nullable: true + enum: + - auto + - concise + - detailed + - null + example: concise + x-speakeasy-unknown-values: allow + ChatFormatTextConfig: + type: object + properties: + type: + type: string + enum: + - text + required: + - type + description: Default text response format + example: + type: text + ChatJsonSchemaConfig: + type: object + properties: + name: + type: string + maxLength: 64 + description: Schema name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) + example: math_response + description: + type: string + description: Schema description for the model + example: A mathematical response + schema: + type: object + additionalProperties: + nullable: true + description: JSON Schema object + example: + type: object + properties: + answer: + type: number + required: + - answer + strict: + type: boolean + nullable: true + description: Enable strict schema adherence + example: false + required: + - name + description: JSON Schema configuration object + example: + name: math_response + description: A mathematical response + schema: + type: object + properties: + answer: + type: number + required: + - answer + strict: true + ChatFormatJsonSchemaConfig: + type: object + properties: + type: + type: string + enum: + - json_schema + json_schema: + $ref: '#/components/schemas/ChatJsonSchemaConfig' + required: + - type + - json_schema + description: JSON Schema response format for structured outputs + example: + type: json_schema + json_schema: + name: math_response + schema: + type: object + properties: + answer: + type: number + required: + - answer + ChatFormatGrammarConfig: + type: object + properties: + type: + type: string + enum: + - grammar + grammar: + type: string + description: Custom grammar for text generation + example: root ::= "yes" | "no" + required: + - type + - grammar + description: Custom grammar response format + example: + type: grammar + grammar: root ::= "yes" | "no" + ChatFormatPythonConfig: + type: object + properties: + type: + type: string + enum: + - python + required: + - type + description: Python code response format + example: + type: python + ChatStreamOptions: + type: object + nullable: true + properties: + include_usage: + type: boolean + description: 'Deprecated: This field has no effect. Full usage details are always included.' + example: true + deprecated: true + description: Streaming configuration options + example: + include_usage: true + ChatNamedToolChoice: + type: object + properties: + type: + type: string + enum: + - function + function: + type: object + properties: + name: + type: string + description: Function name to call + example: get_weather + required: + - name + required: + - type + - function + description: Named tool choice for specific function + example: + type: function + function: + name: get_weather + ChatToolChoice: + anyOf: + - type: string + enum: + - none + - type: string + enum: + - auto + - type: string + enum: + - required + - $ref: '#/components/schemas/ChatNamedToolChoice' + description: Tool choice configuration + example: auto + ChatWebSearchShorthand: + type: object + properties: + type: + type: string + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 + x-speakeasy-unknown-values: allow + engine: + $ref: '#/components/schemas/WebSearchEngineEnum' + max_results: + type: integer + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. + example: 5 + max_total_results: + type: integer + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. + example: 20 + search_context_size: + $ref: '#/components/schemas/SearchQualityLevel' + user_location: + $ref: '#/components/schemas/WebSearchUserLocationServerTool' + allowed_domains: + type: array + items: + type: string + description: >- + Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity. + parameters: + $ref: '#/components/schemas/WebSearchConfig' + required: + - type + description: Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search. + example: + type: web_search_preview + ChatFunctionTool: + anyOf: + - type: object + properties: + type: + type: string + enum: + - function + function: + type: object + properties: + name: + type: string + maxLength: 64 + description: Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) + example: get_weather + description: + type: string + description: Function description for the model + example: Get the current weather for a location + parameters: + type: object + additionalProperties: + nullable: true + description: Function parameters as JSON Schema object + example: + type: object + properties: + location: + type: string + description: City name + required: + - location + strict: + type: boolean + nullable: true + description: Enable strict schema adherence + example: false + required: + - name + description: Function definition for tool calling + example: + name: get_weather + description: Get the current weather for a location + parameters: + type: object + properties: + location: + type: string + description: City name + required: + - location + cache_control: + $ref: '#/components/schemas/ChatContentCacheControl' + required: + - type + - function + - $ref: '#/components/schemas/DatetimeServerTool' + - $ref: '#/components/schemas/OpenRouterWebSearchServerTool' + - $ref: '#/components/schemas/ChatWebSearchShorthand' + description: Tool definition for function calling (regular function or OpenRouter built-in server tool) + example: + type: function + function: + name: get_weather + description: Get the current weather for a location + parameters: + type: object + properties: + location: + type: string + description: City name + unit: + type: string + enum: + - celsius + - fahrenheit + x-speakeasy-unknown-values: allow + required: + - location + ChatDebugOptions: + type: object + properties: + echo_upstream_body: + type: boolean + description: >- + If true, includes the transformed upstream request body in a debug chunk at the start of the stream. Only works with streaming mode. + example: true + description: Debug options for inspecting request transformations (streaming only) + example: + echo_upstream_body: true + ChatRequest: + type: object + properties: + provider: + $ref: '#/components/schemas/ProviderPreferences' + plugins: + type: array + items: + oneOf: + - $ref: '#/components/schemas/AutoRouterPlugin' + - $ref: '#/components/schemas/ModerationPlugin' + - $ref: '#/components/schemas/WebSearchPlugin' + - $ref: '#/components/schemas/FileParserPlugin' + - $ref: '#/components/schemas/ResponseHealingPlugin' + - $ref: '#/components/schemas/ContextCompressionPlugin' + discriminator: + propertyName: id + mapping: + auto-router: '#/components/schemas/AutoRouterPlugin' + moderation: '#/components/schemas/ModerationPlugin' + web: '#/components/schemas/WebSearchPlugin' + file-parser: '#/components/schemas/FileParserPlugin' + response-healing: '#/components/schemas/ResponseHealingPlugin' + context-compression: '#/components/schemas/ContextCompressionPlugin' + description: Plugins you want to enable for this request, including their settings. + route: + $ref: '#/components/schemas/DeprecatedRoute' + user: + type: string + description: Unique user identifier + example: user-123 + session_id: + type: string + maxLength: 256 + description: >- + A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + trace: + $ref: '#/components/schemas/TraceConfig' + messages: + type: array + items: + $ref: '#/components/schemas/ChatMessages' + minItems: 1 + description: List of messages for the conversation + example: + - role: user + content: Hello! + model: + $ref: '#/components/schemas/ModelName' + models: + $ref: '#/components/schemas/ChatModelNames' + frequency_penalty: + type: number + format: double + description: Frequency penalty (-2.0 to 2.0) + example: 0 + logit_bias: + type: object + nullable: true + additionalProperties: + type: number + format: double + description: Token logit bias adjustments + example: + '50256': -100 + logprobs: + type: boolean + nullable: true + description: Return log probabilities + example: false + top_logprobs: + type: integer + description: Number of top log probabilities to return (0-20) + example: 5 + max_completion_tokens: + type: integer + description: Maximum tokens in completion + example: 100 + max_tokens: + type: integer + description: 'Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.' + example: 100 + metadata: + type: object + additionalProperties: + type: string + description: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) + example: + user_id: user-123 + session_id: session-456 + presence_penalty: + type: number + format: double + description: Presence penalty (-2.0 to 2.0) + example: 0 + reasoning: + type: object + properties: + effort: + type: string + nullable: true + enum: + - xhigh + - high + - medium + - low + - minimal + - none + - null + description: Constrains effort on reasoning for reasoning models + example: medium + x-speakeasy-unknown-values: allow + summary: + $ref: '#/components/schemas/ChatReasoningSummaryVerbosityEnum' + description: Configuration options for reasoning models + example: + effort: medium + summary: concise + response_format: + oneOf: + - $ref: '#/components/schemas/ChatFormatTextConfig' + - $ref: '#/components/schemas/FormatJsonObjectConfig' + - $ref: '#/components/schemas/ChatFormatJsonSchemaConfig' + - $ref: '#/components/schemas/ChatFormatGrammarConfig' + - $ref: '#/components/schemas/ChatFormatPythonConfig' + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/ChatFormatTextConfig' + json_object: '#/components/schemas/FormatJsonObjectConfig' + json_schema: '#/components/schemas/ChatFormatJsonSchemaConfig' + grammar: '#/components/schemas/ChatFormatGrammarConfig' + python: '#/components/schemas/ChatFormatPythonConfig' + description: Response format configuration + example: + type: json_object + seed: + type: integer + description: Random seed for deterministic outputs + example: 42 + stop: + anyOf: + - type: string + - type: array + items: + type: string + maxItems: 4 + - nullable: true + description: Stop sequences (up to 4) + example: + - "" + stream: + type: boolean + default: false + description: Enable streaming response + example: false + stream_options: + $ref: '#/components/schemas/ChatStreamOptions' + temperature: + type: number + format: double + description: Sampling temperature (0-2) + example: 0.7 + parallel_tool_calls: + type: boolean + nullable: true + description: >- + Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response. + example: true + tool_choice: + $ref: '#/components/schemas/ChatToolChoice' + tools: + type: array + items: + $ref: '#/components/schemas/ChatFunctionTool' + description: Available tools for function calling + example: + - type: function + function: + name: get_weather + description: Get weather + top_p: + type: number + format: double + description: Nucleus sampling parameter (0-1) + example: 1 + debug: + $ref: '#/components/schemas/ChatDebugOptions' + image_config: + type: object + additionalProperties: + anyOf: + - type: string + - type: number + format: double + - type: array + items: + nullable: true + description: >- + Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. + example: + aspect_ratio: '16:9' + modalities: + type: array + items: + type: string + enum: + - text + - image + - audio + x-speakeasy-unknown-values: allow + description: Output modalities for the response. Supported values are "text", "image", and "audio". + example: + - text + - image + cache_control: + allOf: + - $ref: '#/components/schemas/AnthropicCacheControlDirective' + - description: >- + Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. + service_tier: + type: string + nullable: true + enum: + - auto + - default + - flex + - priority + - scale + - null + description: The service tier to use for processing this request. + example: auto + x-speakeasy-unknown-values: allow + required: + - messages + description: Chat completion request parameters + example: + messages: + - role: system + content: You are a helpful assistant. + - role: user + content: What is the capital of France? + model: openai/gpt-4 + temperature: 0.7 + max_tokens: 150 + GoneResponseErrorData: + type: object + properties: + code: + type: integer + message: + type: string + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + required: + - code + - message + description: Error data for GoneResponse + example: + code: 410 + message: >- + The Coinbase APIs used by this endpoint have been deprecated, so the Coinbase Commerce credits API has been removed. Use the web credits purchase flow instead. + GoneResponse: + type: object + properties: + error: + $ref: '#/components/schemas/GoneResponseErrorData' + user_id: + type: string + nullable: true + required: + - error + description: Gone - Endpoint has been permanently removed or deprecated + example: + error: + code: 410 + message: >- + The Coinbase APIs used by this endpoint have been deprecated, so the Coinbase Commerce credits API has been removed. Use the web credits purchase flow instead. + ProviderResponse: + type: object + properties: + id: + type: string + description: Upstream provider response identifier + example: chatcmpl-abc123 + endpoint_id: + type: string + description: Internal endpoint identifier + example: ep_abc123 + model_permaslug: + type: string + description: Canonical model slug + example: openai/gpt-4 + provider_name: + type: string + enum: + - AnyScale + - Atoma + - Cent-ML + - CrofAI + - Enfer + - GoPomelo + - HuggingFace + - Hyperbolic 2 + - InoCloud + - Kluster + - Lambda + - Lepton + - Lynn 2 + - Lynn + - Mancer + - Meta + - Modal + - Nineteen + - OctoAI + - Recursal + - Reflection + - Replicate + - SambaNova 2 + - SF Compute + - Targon + - Together 2 + - Ubicloud + - 01.AI + - AkashML + - AI21 + - AionLabs + - Alibaba + - Ambient + - 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 + - Google + - Google AI Studio + - Groq + - Hyperbolic + - Inception + - Inceptron + - InferenceNet + - Ionstream + - Infermatic + - Io Net + - Inflection + - Liquid + - Mara + - Mancer 2 + - Minimax + - ModelRun + - Mistral + - Modular + - Moonshot AI + - Morph + - NCompass + - Nebius + - NextBit + - Novita + - Nvidia + - OpenAI + - OpenInference + - Parasail + - Perplexity + - Phala + - Reka + - Relace + - SambaNova + - Seed + - SiliconFlow + - Sourceful + - StepFun + - Stealth + - StreamLake + - Switchpoint + - Together + - Upstage + - Venice + - WandB + - Xiaomi + - xAI + - Z.AI + - FakeProvider + description: Name of the provider + example: OpenAI + x-speakeasy-unknown-values: allow + status: + type: number + nullable: true + description: HTTP status code from the provider + example: 200 + latency: + type: number + description: Response latency in milliseconds + example: 1200 + is_byok: + type: boolean + description: Whether the request used a bring-your-own-key + example: false + required: + - status + description: Details of a provider response for a generation attempt + example: + id: chatcmpl-abc123 + endpoint_id: ep_abc123 + model_permaslug: openai/gpt-4 + provider_name: OpenAI + status: 200 + latency: 1200 + is_byok: false + ModelsCountResponse: + type: object + properties: + data: + type: object + properties: + count: + type: integer + description: Total number of available models + example: 150 + required: + - count + description: Model count data + example: + count: 150 + required: + - data + description: Model count data + example: + data: + count: 150 + PublicPricing: + type: object + properties: + prompt: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + completion: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + request: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + image: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + image_token: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + image_output: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + audio: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + audio_output: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + input_audio_cache: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + web_search: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + internal_reasoning: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + input_cache_read: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + input_cache_write: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + discount: + type: number + required: + - prompt + - completion + description: Pricing information for the model + example: + prompt: '0.00003' + completion: '0.00006' + request: '0' + image: '0' + ModelGroup: + type: string + enum: + - Router + - Media + - Other + - GPT + - Claude + - Gemini + - Gemma + - Grok + - Cohere + - Nova + - Qwen + - Yi + - DeepSeek + - Mistral + - Llama2 + - Llama3 + - Llama4 + - PaLM + - RWKV + - Qwen3 + example: GPT + description: Tokenizer type used by the model + x-speakeasy-unknown-values: allow + InputModality: + type: string + enum: + - text + - image + - file + - audio + - video + example: text + x-speakeasy-unknown-values: allow + OutputModality: + type: string + enum: + - text + - image + - embeddings + - audio + - video + - rerank + example: text + x-speakeasy-unknown-values: allow + ModelArchitecture: + type: object + properties: + tokenizer: + $ref: '#/components/schemas/ModelGroup' + instruct_type: + type: string + nullable: true + enum: + - none + - airoboros + - alpaca + - alpaca-modif + - chatml + - claude + - code-llama + - gemma + - llama2 + - llama3 + - mistral + - nemotron + - neural + - openchat + - phi3 + - rwkv + - vicuna + - zephyr + - deepseek-r1 + - deepseek-v3.1 + - qwq + - qwen3 + - null + example: chatml + description: Instruction format type + x-speakeasy-unknown-values: allow + modality: + type: string + nullable: true + description: Primary modality of the model + example: text->text + input_modalities: + type: array + items: + $ref: '#/components/schemas/InputModality' + description: Supported input modalities + output_modalities: + type: array + items: + $ref: '#/components/schemas/OutputModality' + description: Supported output modalities + required: + - modality + - input_modalities + - output_modalities + description: Model architecture information + example: + tokenizer: GPT + instruct_type: chatml + modality: text->text + input_modalities: + - text + output_modalities: + - text + TopProviderInfo: + type: object + properties: + context_length: + type: integer + description: Context length from the top provider + example: 8192 + max_completion_tokens: + type: integer + description: Maximum completion tokens from the top provider + example: 4096 + is_moderated: + type: boolean + description: Whether the top provider moderates content + example: true + required: + - is_moderated + description: Information about the top provider for this model + example: + context_length: 8192 + max_completion_tokens: 4096 + is_moderated: true + PerRequestLimits: + type: object + nullable: true + properties: + prompt_tokens: + type: number + example: 1000 + description: Maximum prompt tokens per request + completion_tokens: + type: number + example: 1000 + description: Maximum completion tokens per request + required: + - prompt_tokens + - completion_tokens + description: Per-request token limits + example: + prompt_tokens: 1000 + completion_tokens: 1000 + Parameter: + type: string + enum: + - temperature + - top_p + - top_k + - min_p + - top_a + - frequency_penalty + - presence_penalty + - repetition_penalty + - max_tokens + - logit_bias + - logprobs + - top_logprobs + - seed + - response_format + - structured_outputs + - stop + - tools + - tool_choice + - parallel_tool_calls + - include_reasoning + - reasoning + - reasoning_effort + - web_search_options + - verbosity + example: temperature + x-speakeasy-unknown-values: allow + DefaultParameters: + type: object + nullable: true + properties: + temperature: + type: number + format: double + top_p: + type: number + format: double + top_k: + type: integer + nullable: true + minimum: 0 + frequency_penalty: + type: number + format: double + presence_penalty: + type: number + format: double + repetition_penalty: + type: number + format: double + additionalProperties: false + description: Default parameters for this model + example: + temperature: 0.7 + top_p: 0.9 + top_k: 0 + frequency_penalty: 0 + presence_penalty: 0 + repetition_penalty: 1 + ModelLinks: + type: object + properties: + details: + type: string + description: URL for the model details/endpoints API + example: /api/v1/models/openai/gpt-5.4/endpoints + required: + - details + description: Related API endpoints and resources for this model. + example: + details: /api/v1/models/openai/gpt-5.4/endpoints + Model: + type: object + properties: + id: + type: string + description: Unique identifier for the model + example: openai/gpt-4 + canonical_slug: + type: string + description: Canonical slug for the model + example: openai/gpt-4 + hugging_face_id: + type: string + nullable: true + description: Hugging Face model identifier, if applicable + example: microsoft/DialoGPT-medium + name: + type: string + description: Display name of the model + example: GPT-4 + created: + type: integer + description: Unix timestamp of when the model was created + example: 1692901234 + description: + type: string + description: Description of the model + example: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. + pricing: + $ref: '#/components/schemas/PublicPricing' + context_length: + type: integer + description: Maximum context length in tokens + example: 8192 + architecture: + $ref: '#/components/schemas/ModelArchitecture' + top_provider: + $ref: '#/components/schemas/TopProviderInfo' + per_request_limits: + $ref: '#/components/schemas/PerRequestLimits' + supported_parameters: + type: array + items: + $ref: '#/components/schemas/Parameter' + description: List of supported parameters for this model + default_parameters: + $ref: '#/components/schemas/DefaultParameters' + knowledge_cutoff: + type: string + nullable: true + description: The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. + example: '2024-10-01' + expiration_date: + type: string + nullable: true + description: The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. + example: '2025-06-01' + links: + $ref: '#/components/schemas/ModelLinks' + required: + - id + - canonical_slug + - name + - created + - pricing + - context_length + - architecture + - top_provider + - per_request_limits + - supported_parameters + - default_parameters + - links + description: Information about an AI model available on OpenRouter + example: + id: openai/gpt-4 + canonical_slug: openai/gpt-4 + name: GPT-4 + created: 1692901234 + description: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. + pricing: + prompt: '0.00003' + completion: '0.00006' + request: '0' + image: '0' + context_length: 8192 + architecture: + tokenizer: GPT + instruct_type: chatml + modality: text->text + input_modalities: + - text + output_modalities: + - text + top_provider: + context_length: 8192 + max_completion_tokens: 4096 + is_moderated: true + per_request_limits: null + supported_parameters: + - temperature + - top_p + - max_tokens + default_parameters: null + knowledge_cutoff: null + expiration_date: null + links: + details: /api/v1/models/openai/gpt-5.4/endpoints + ModelsListResponseData: + type: array + items: + $ref: '#/components/schemas/Model' + description: List of available models + example: + - id: openai/gpt-4 + canonical_slug: openai/gpt-4 + name: GPT-4 + created: 1692901234 + description: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. + pricing: + prompt: '0.00003' + completion: '0.00006' + request: '0' + image: '0' + context_length: 8192 + architecture: + tokenizer: GPT + instruct_type: chatml + modality: text->text + input_modalities: + - text + output_modalities: + - text + top_provider: + context_length: 8192 + max_completion_tokens: 4096 + is_moderated: true + per_request_limits: null + supported_parameters: + - temperature + - top_p + - max_tokens + default_parameters: null + knowledge_cutoff: null + expiration_date: null + links: + details: /api/v1/models/openai/gpt-5.4/endpoints + ModelsListResponse: + type: object + properties: + data: + $ref: '#/components/schemas/ModelsListResponseData' + required: + - data + description: List of available models + example: + data: + - id: openai/gpt-4 + canonical_slug: openai/gpt-4 + name: GPT-4 + created: 1692901234 + description: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. + pricing: + prompt: '0.00003' + completion: '0.00006' + request: '0' + image: '0' + context_length: 8192 + architecture: + tokenizer: GPT + instruct_type: chatml + modality: text->text + input_modalities: + - text + output_modalities: + - text + top_provider: + context_length: 8192 + max_completion_tokens: 4096 + is_moderated: true + per_request_limits: null + supported_parameters: + - temperature + - top_p + - max_tokens + - frequency_penalty + - presence_penalty + default_parameters: null + knowledge_cutoff: null + expiration_date: null + links: + details: /api/v1/models/openai/gpt-5.4/endpoints + InstructType: + type: string + nullable: true + enum: + - none + - airoboros + - alpaca + - alpaca-modif + - chatml + - claude + - code-llama + - gemma + - llama2 + - llama3 + - mistral + - nemotron + - neural + - openchat + - phi3 + - rwkv + - vicuna + - zephyr + - deepseek-r1 + - deepseek-v3.1 + - qwq + - qwen3 + - null + example: chatml + description: Instruction format type + x-speakeasy-unknown-values: allow + EndpointStatus: + type: integer + enum: + - 0 + - -1 + - -2 + - -3 + - -5 + - -10 + example: 0 + x-speakeasy-unknown-values: allow + PercentileStats: + type: object + nullable: true + properties: + p50: + type: number + format: double + description: Median (50th percentile) + example: 25.5 + p75: + type: number + format: double + description: 75th percentile + example: 35.2 + p90: + type: number + format: double + description: 90th percentile + example: 48.7 + p99: + type: number + format: double + description: 99th percentile + example: 85.3 + required: + - p50 + - p75 + - p90 + - p99 + example: + p50: 25.5 + p75: 35.2 + p90: 48.7 + p99: 85.3 description: >- - Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Management key](/docs/guides/overview/auth/management-api-keys) required. - parameters: - - schema: + Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. + PublicEndpoint: + type: object + properties: + name: + type: string + model_id: + type: string + description: The unique identifier for the model (permaslug) + example: openai/gpt-4 + model_name: + type: string + context_length: + type: integer + pricing: + type: object + properties: + prompt: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + completion: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + request: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + image: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + image_token: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + image_output: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + audio: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + audio_output: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + input_audio_cache: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + web_search: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + internal_reasoning: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + input_cache_read: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + input_cache_write: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + discount: + type: number + required: + - prompt + - completion + provider_name: + $ref: '#/components/schemas/ProviderName' + tag: + type: string + quantization: + allOf: + - $ref: '#/components/schemas/Quantization' + - nullable: true + max_completion_tokens: + type: integer + max_prompt_tokens: + type: integer + supported_parameters: + type: array + items: + $ref: '#/components/schemas/Parameter' + status: + $ref: '#/components/schemas/EndpointStatus' + uptime_last_30m: + type: number + format: double + uptime_last_5m: + type: number + format: double + description: >- + Uptime percentage over the last 5 minutes, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data. + uptime_last_1d: + type: number + format: double + description: >- + Uptime percentage over the last 1 day, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data. + supports_implicit_caching: + 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. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. + required: + - name + - model_id + - model_name + - context_length + - pricing + - provider_name + - tag + - quantization + - max_completion_tokens + - max_prompt_tokens + - supported_parameters + - uptime_last_30m + - uptime_last_5m + - uptime_last_1d + - supports_implicit_caching + - latency_last_30m + - throughput_last_30m + description: Information about a specific model endpoint + example: + name: 'OpenAI: GPT-4' + model_id: openai/gpt-4 + model_name: GPT-4 + context_length: 8192 + pricing: + prompt: '0.00003' + completion: '0.00006' + request: '0' + image: '0' + provider_name: OpenAI + tag: openai + quantization: fp16 + max_completion_tokens: 4096 + max_prompt_tokens: 8192 + supported_parameters: + - temperature + - top_p + - max_tokens + status: 0 + uptime_last_30m: 99.5 + uptime_last_5m: 100 + uptime_last_1d: 99.8 + 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: + type: object + properties: + id: + type: string + description: Unique identifier for the model + example: openai/gpt-4 + name: + type: string + description: Display name of the model + example: GPT-4 + created: + type: integer + description: Unix timestamp of when the model was created + example: 1692901234 + description: + type: string + description: Description of the model + example: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. + architecture: + allOf: + - $ref: '#/components/schemas/ModelArchitecture' + - properties: + tokenizer: + allOf: + - $ref: '#/components/schemas/ModelGroup' + - nullable: true + instruct_type: + $ref: '#/components/schemas/InstructType' + modality: + type: string + nullable: true + description: Primary modality of the model + example: text + input_modalities: + type: array + items: + $ref: '#/components/schemas/InputModality' + description: Supported input modalities + output_modalities: + type: array + items: + $ref: '#/components/schemas/OutputModality' + description: Supported output modalities + required: + - tokenizer + - instruct_type + - modality + - input_modalities + - output_modalities + example: + tokenizer: GPT + instruct_type: chatml + modality: text + endpoints: + type: array + items: + $ref: '#/components/schemas/PublicEndpoint' + description: List of available endpoints for this model + required: + - id + - name + - created + - description + - architecture + - endpoints + description: List of available endpoints for a model + example: + 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' + request: '0' + image: '0' + 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 + status: default + uptime_last_30m: 99.5 + uptime_last_5m: 100 + uptime_last_1d: 99.8 + 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 + GuardrailInterval: + type: string + nullable: true + enum: + - daily + - weekly + - monthly + - null + description: Interval at which the limit resets (daily, weekly, monthly) + example: monthly + x-speakeasy-unknown-values: allow + Guardrail: + type: object + properties: + id: + type: string + format: uuid + description: Unique identifier for the guardrail + example: 550e8400-e29b-41d4-a716-446655440000 + name: + type: string + description: Name of the guardrail + example: Production Guardrail + description: + type: string + nullable: true + description: Description of the guardrail + example: Guardrail for production environment + limit_usd: + type: number + format: double + description: Spending limit in USD + example: 100 + reset_interval: + $ref: '#/components/schemas/GuardrailInterval' + allowed_providers: + type: array + nullable: true + items: + type: string + description: List of allowed provider IDs + example: + - openai + - anthropic + - google + ignored_providers: + type: array + nullable: true + items: + type: string + description: List of provider IDs to exclude from routing + example: + - azure + allowed_models: + type: array + nullable: true + items: + type: string + description: Array of model canonical_slugs (immutable identifiers) + example: + - openai/gpt-5.2-20251211 + - anthropic/claude-4.5-opus-20251124 + - deepseek/deepseek-r1-0528:free + enforce_zdr: + type: boolean + nullable: true + description: Whether to enforce zero data retention + example: false + created_at: + type: string + description: ISO 8601 timestamp of when the guardrail was created + example: '2025-08-24T10:30:00Z' + updated_at: + type: string + nullable: true + description: ISO 8601 timestamp of when the guardrail was last updated + example: '2025-08-24T15:45:00Z' + required: + - id + - name + - created_at + example: + id: 550e8400-e29b-41d4-a716-446655440000 + name: Production Guardrail + description: Guardrail for production environment + limit_usd: 100 + reset_interval: monthly + allowed_providers: + - openai + - anthropic + - google + ignored_providers: null + allowed_models: null + enforce_zdr: false + created_at: '2025-08-24T10:30:00Z' + updated_at: '2025-08-24T15:45:00Z' + ListGuardrailsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Guardrail' + description: List of guardrails + total_count: + type: integer + description: Total number of guardrails + example: 25 + required: + - data + - total_count + example: + data: + - id: 550e8400-e29b-41d4-a716-446655440000 + name: Production Guardrail + description: Guardrail for production environment + limit_usd: 100 + reset_interval: monthly + allowed_providers: + - openai + - anthropic + - google + ignored_providers: null + allowed_models: null + enforce_zdr: false + created_at: '2025-08-24T10:30:00Z' + updated_at: '2025-08-24T15:45:00Z' + total_count: 1 + CreateGuardrailResponse: + type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/Guardrail' + - description: The created guardrail + required: + - data + example: + data: + id: 550e8400-e29b-41d4-a716-446655440000 + name: My New Guardrail + description: A guardrail for limiting API usage + limit_usd: 50 + reset_interval: monthly + allowed_providers: + - openai + - anthropic + - google + ignored_providers: null + allowed_models: null + enforce_zdr: false + created_at: '2025-08-24T10:30:00Z' + updated_at: null + CreateGuardrailRequest: + type: object + properties: + name: + type: string + minLength: 1 + maxLength: 200 + description: Name for the new guardrail + example: My New Guardrail + description: + type: string + nullable: true + maxLength: 1000 + description: Description of the guardrail + example: A guardrail for limiting API usage + limit_usd: + type: number + format: double + description: Spending limit in USD + example: 50 + reset_interval: + $ref: '#/components/schemas/GuardrailInterval' + allowed_providers: + type: array + nullable: true + items: + type: string + minItems: 1 + description: List of allowed provider IDs + example: + - openai + - anthropic + - deepseek + ignored_providers: + type: array + nullable: true + items: + type: string + minItems: 1 + description: List of provider IDs to exclude from routing + example: + - azure + allowed_models: + type: array + nullable: true + items: + type: string + minItems: 1 + description: Array of model identifiers (slug or canonical_slug accepted) + example: + - openai/gpt-5.2 + - anthropic/claude-4.5-opus-20251124 + - deepseek/deepseek-r1-0528:free + enforce_zdr: + type: boolean + nullable: true + description: Whether to enforce zero data retention + example: false + required: + - name + example: + name: My New Guardrail + description: A guardrail for limiting API usage + limit_usd: 50 + reset_interval: monthly + allowed_providers: + - openai + - anthropic + - deepseek + ignored_providers: null + allowed_models: null + enforce_zdr: false + GetGuardrailResponse: + type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/Guardrail' + - description: The guardrail + required: + - data + example: + data: + id: 550e8400-e29b-41d4-a716-446655440000 + name: Production Guardrail + description: Guardrail for production environment + limit_usd: 100 + reset_interval: monthly + allowed_providers: + - openai + - anthropic + - google + ignored_providers: null + allowed_models: null + enforce_zdr: false + created_at: '2025-08-24T10:30:00Z' + updated_at: '2025-08-24T15:45:00Z' + UpdateGuardrailResponse: + type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/Guardrail' + - description: The updated guardrail + required: + - data + example: + data: + id: 550e8400-e29b-41d4-a716-446655440000 + name: Updated Guardrail Name + description: Updated description + limit_usd: 75 + reset_interval: weekly + allowed_providers: + - openai + ignored_providers: null + allowed_models: null + enforce_zdr: true + created_at: '2025-08-24T10:30:00Z' + updated_at: '2025-08-24T16:00:00Z' + UpdateGuardrailRequest: + type: object + properties: + name: + type: string + minLength: 1 + maxLength: 200 + description: New name for the guardrail + example: Updated Guardrail Name + description: + type: string + nullable: true + maxLength: 1000 + description: New description for the guardrail + example: Updated description + limit_usd: + type: number + format: double + description: New spending limit in USD + example: 75 + reset_interval: + $ref: '#/components/schemas/GuardrailInterval' + allowed_providers: + type: array + nullable: true + items: + type: string + minItems: 1 + description: New list of allowed provider IDs + example: + - openai + - anthropic + - deepseek + ignored_providers: + type: array + nullable: true + items: + type: string + minItems: 1 + description: List of provider IDs to exclude from routing + example: + - azure + allowed_models: + type: array + nullable: true + items: + type: string + minItems: 1 + description: Array of model identifiers (slug or canonical_slug accepted) + example: + - openai/gpt-5.2 + enforce_zdr: + type: boolean + nullable: true + description: Whether to enforce zero data retention + example: true + example: + name: Updated Guardrail Name + description: Updated description + limit_usd: 75 + reset_interval: weekly + DeleteGuardrailResponse: + type: object + properties: + deleted: + type: boolean + const: true + description: Confirmation that the guardrail was deleted + example: true + required: + - deleted + example: + deleted: true + KeyAssignment: + type: object + properties: + id: + type: string + format: uuid + description: Unique identifier for the assignment + example: 550e8400-e29b-41d4-a716-446655440000 + key_hash: + type: string + description: Hash of the assigned API key + example: c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 + guardrail_id: + type: string + format: uuid + description: ID of the guardrail + example: 550e8400-e29b-41d4-a716-446655440001 + key_name: + type: string + description: Name of the API key + example: Production Key + key_label: + type: string + description: Label of the API key + example: prod-key + assigned_by: + type: string + nullable: true + description: User ID of who made the assignment + example: user_abc123 + created_at: + type: string + description: ISO 8601 timestamp of when the assignment was created + example: '2025-08-24T10:30:00Z' + required: + - id + - key_hash + - guardrail_id + - key_name + - key_label + - assigned_by + - created_at + example: + id: 550e8400-e29b-41d4-a716-446655440000 + key_hash: c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 + guardrail_id: 550e8400-e29b-41d4-a716-446655440001 + key_name: Production Key + key_label: prod-key + assigned_by: user_abc123 + created_at: '2025-08-24T10:30:00Z' + ListKeyAssignmentsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/KeyAssignment' + description: List of key assignments + total_count: + type: integer + description: Total number of key assignments for this guardrail + example: 25 + required: + - data + - total_count + example: + data: + - id: 550e8400-e29b-41d4-a716-446655440000 + key_hash: c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 + guardrail_id: 550e8400-e29b-41d4-a716-446655440001 + key_name: Production Key + key_label: prod-key + assigned_by: user_abc123 + created_at: '2025-08-24T10:30:00Z' + total_count: 1 + MemberAssignment: + type: object + properties: + id: + type: string + format: uuid + description: Unique identifier for the assignment + example: 550e8400-e29b-41d4-a716-446655440000 + user_id: + type: string + description: Clerk user ID of the assigned member + example: user_abc123 + organization_id: + type: string + description: Organization ID + example: org_xyz789 + guardrail_id: + type: string + format: uuid + description: ID of the guardrail + example: 550e8400-e29b-41d4-a716-446655440001 + assigned_by: + type: string + nullable: true + description: User ID of who made the assignment + example: user_abc123 + created_at: + type: string + description: ISO 8601 timestamp of when the assignment was created + example: '2025-08-24T10:30:00Z' + required: + - id + - user_id + - organization_id + - guardrail_id + - assigned_by + - created_at + example: + id: 550e8400-e29b-41d4-a716-446655440000 + user_id: user_abc123 + organization_id: org_xyz789 + guardrail_id: 550e8400-e29b-41d4-a716-446655440001 + assigned_by: user_abc123 + created_at: '2025-08-24T10:30:00Z' + ListMemberAssignmentsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/MemberAssignment' + description: List of member assignments + total_count: + type: integer + description: Total number of member assignments + example: 10 + required: + - data + - total_count + example: + data: + - id: 550e8400-e29b-41d4-a716-446655440000 + user_id: user_abc123 + organization_id: org_xyz789 + guardrail_id: 550e8400-e29b-41d4-a716-446655440001 + assigned_by: user_abc123 + created_at: '2025-08-24T10:30:00Z' + total_count: 1 + BulkAssignKeysResponse: + type: object + properties: + assigned_count: + type: integer + description: Number of keys successfully assigned + example: 3 + required: + - assigned_count + example: + assigned_count: 3 + BulkAssignKeysRequest: + type: object + properties: + key_hashes: + type: array + items: type: string - description: Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). - example: '2025-08-24' - required: false - description: Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). - name: date - in: query - responses: - '200': - description: Returns user activity data grouped by endpoint - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ActivityItem' - description: List of activity items - required: - - data - example: - data: - - date: '2025-08-24' - model: openai/gpt-4.1 - model_permaslug: openai/gpt-4.1-2025-04-14 - endpoint_id: 550e8400-e29b-41d4-a716-446655440000 - provider_name: OpenAI - usage: 0.015 - byok_usage_inference: 0.012 - requests: 5 - prompt_tokens: 50 - completion_tokens: 125 - reasoning_tokens: 25 - '400': - description: Bad Request - Invalid date format or date range - content: - application/json: - schema: - $ref: '#/components/schemas/BadRequestResponse' - '401': - description: Unauthorized - Authentication required or invalid credentials - content: - application/json: - schema: - $ref: '#/components/schemas/UnauthorizedResponse' - '403': - description: Forbidden - Only management keys can fetch activity - content: - application/json: - schema: - $ref: '#/components/schemas/ForbiddenResponse' - '500': - description: Internal Server Error - Unexpected server error - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerResponse' - parameters: - - $ref: "#/components/parameters/AppIdentifier" - - $ref: "#/components/parameters/AppDisplayName" - - $ref: "#/components/parameters/AppCategories" - /chat/completions: + minLength: 1 + minItems: 1 + description: Array of API key hashes to assign to the guardrail + example: + - c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 + required: + - key_hashes + example: + key_hashes: + - c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 + BulkAssignMembersResponse: + type: object + properties: + assigned_count: + type: integer + description: Number of members successfully assigned + example: 2 + required: + - assigned_count + example: + assigned_count: 2 + BulkAssignMembersRequest: + type: object + properties: + member_user_ids: + type: array + items: + type: string + minLength: 1 + minItems: 1 + description: Array of member user IDs to assign to the guardrail + example: + - user_abc123 + - user_def456 + required: + - member_user_ids + example: + member_user_ids: + - user_abc123 + - user_def456 + BulkUnassignKeysResponse: + type: object + properties: + unassigned_count: + type: integer + description: Number of keys successfully unassigned + example: 3 + required: + - unassigned_count + example: + unassigned_count: 3 + BulkUnassignKeysRequest: + type: object + properties: + key_hashes: + type: array + items: + type: string + minLength: 1 + minItems: 1 + description: Array of API key hashes to unassign from the guardrail + example: + - c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 + required: + - key_hashes + example: + key_hashes: + - c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 + BulkUnassignMembersResponse: + type: object + properties: + unassigned_count: + type: integer + description: Number of members successfully unassigned + example: 2 + required: + - unassigned_count + example: + unassigned_count: 2 + BulkUnassignMembersRequest: + type: object + properties: + member_user_ids: + type: array + items: + type: string + minLength: 1 + minItems: 1 + description: Array of member user IDs to unassign from the guardrail + example: + - user_abc123 + - user_def456 + required: + - member_user_ids + example: + member_user_ids: + - user_abc123 + - user_def456 + ConflictResponseErrorData: + type: object + properties: + code: + type: integer + message: + type: string + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + required: + - code + - message + description: Error data for ConflictResponse + example: + code: 409 + message: Resource conflict. Please try again later. + ConflictResponse: + type: object + properties: + error: + $ref: '#/components/schemas/ConflictResponseErrorData' + user_id: + type: string + nullable: true + required: + - error + description: Conflict - Resource conflict or concurrent modification + example: + error: + code: 409 + message: Resource conflict. Please try again later. + parameters: + AppIdentifier: + name: HTTP-Referer + in: header + schema: + type: string + description: | + The app identifier should be your app's URL and is used as the primary identifier for rankings. + This is used to track API usage per application. + AppDisplayName: + name: X-OpenRouter-Title + in: header + x-speakeasy-name-override: appTitle + schema: + type: string + description: | + The app display name allows you to customize how your app appears in OpenRouter's dashboard. + AppCategories: + name: X-OpenRouter-Categories + in: header + x-speakeasy-name-override: appCategories + schema: + type: string + description: | + Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + securitySchemes: + apiKey: + type: http + scheme: bearer + description: API key as bearer token in Authorization header + bearer: + type: http + scheme: bearer + description: API key as bearer token in Authorization header +paths: + /responses: post: - x-speakeasy-group: chat x-speakeasy-name-override: send x-speakeasy-stream-request-field: stream tags: - - Chat - summary: Create a chat completion - operationId: sendChatCompletionRequest - description: >- - Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes. + - beta.responses + summary: Create a response + description: Creates a streaming or non-streaming response using OpenResponses API format requestBody: content: application/json: schema: - $ref: '#/components/schemas/ChatRequest' + $ref: '#/components/schemas/ResponsesRequest' + example: + model: openai/gpt-4o + input: Tell me a joke required: true responses: '200': - description: Successful chat completion response + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/ChatResult' + $ref: '#/components/schemas/OpenResponsesResult' + example: + id: resp_abc123 + object: response + created_at: 1700000000 + status: completed + output: + - type: message + role: assistant + content: + - type: output_text + text: Why did the chicken cross the road? To get to the other side! + model: openai/gpt-4o + usage: + prompt_tokens: 10 + completion_tokens: 20 + total_tokens: 30 text/event-stream: schema: type: object properties: data: - $ref: '#/components/schemas/ChatStreamChunk' + $ref: '#/components/schemas/StreamEvents' required: - data x-speakeasy-sse-sentinel: '[DONE]' + example: + data: + type: response.output_text.delta + delta: Hello '400': description: Bad Request - Invalid request parameters or malformed input content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' + example: + error: + code: 400 + message: Invalid request parameters '401': description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header '402': description: Payment Required - Insufficient credits or quota to complete request content: application/json: schema: $ref: '#/components/schemas/PaymentRequiredResponse' + example: + error: + code: 402 + message: Insufficient credits. Add more using https://openrouter.ai/credits '404': description: Not Found - Resource does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found '408': description: Request Timeout - Operation exceeded time limit content: application/json: schema: $ref: '#/components/schemas/RequestTimeoutResponse' + example: + error: + code: 408 + message: Operation timed out. Please try again later. '413': description: Payload Too Large - Request payload exceeds size limits content: application/json: schema: $ref: '#/components/schemas/PayloadTooLargeResponse' + example: + error: + code: 413 + message: Request payload too large '422': description: Unprocessable Entity - Semantic validation failure content: application/json: schema: $ref: '#/components/schemas/UnprocessableEntityResponse' + example: + error: + code: 422 + message: Invalid argument '429': description: Too Many Requests - Rate limit exceeded content: application/json: schema: $ref: '#/components/schemas/TooManyRequestsResponse' + example: + error: + code: 429 + message: Rate limit exceeded '500': description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error '502': description: Bad Gateway - Provider/upstream API failure content: application/json: schema: $ref: '#/components/schemas/BadGatewayResponse' + example: + error: + code: 502 + message: Provider returned error '503': description: Service Unavailable - Service temporarily unavailable content: application/json: schema: $ref: '#/components/schemas/ServiceUnavailableResponse' + example: + error: + code: 503 + message: Service temporarily unavailable '524': - description: Infrastructure Timeout - Request timed out at our edge network + description: Infrastructure Timeout - Provider request timed out at edge network content: application/json: schema: $ref: '#/components/schemas/EdgeNetworkTimeoutResponse' + example: + error: + code: 524 + message: Request timed out. Please try again later. '529': description: Provider Overloaded - Provider is temporarily overloaded content: application/json: schema: $ref: '#/components/schemas/ProviderOverloadedResponse' + example: + error: + code: 529 + message: Provider returned error + operationId: createResponses parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /credits: - get: - x-speakeasy-name-override: getCredits + /messages: + post: + x-speakeasy-ignore: true + x-speakeasy-name-override: create + x-speakeasy-stream-request-field: stream tags: - - Credits - summary: Get remaining credits - operationId: getCredits + - Anthropic Messages + summary: Create a message description: >- - Get total credits purchased and used for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + Creates a message using the Anthropic Messages API format. Supports text, images, PDFs, tools, and extended thinking. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MessagesRequest' + example: + model: anthropic/claude-sonnet-4 + max_tokens: 1024 + messages: + - role: user + content: Hello, how are you? + required: true responses: '200': - description: Returns the total credits purchased and used + description: Successful response content: application/json: + schema: + $ref: '#/components/schemas/MessagesResult' + example: + id: msg_abc123 + type: message + role: assistant + content: + - type: text + text: I'm doing well, thank you for asking! How can I help you today? + model: anthropic/claude-sonnet-4 + stop_reason: end_turn + usage: + input_tokens: 12 + output_tokens: 18 + text/event-stream: schema: type: object properties: + event: + type: string data: - type: object - properties: - total_credits: - type: number - description: Total credits purchased - example: 100.5 - total_usage: - type: number - description: Total credits used - example: 25.75 - required: - - total_credits - - total_usage - example: - total_credits: 100.5 - total_usage: 25.75 + $ref: '#/components/schemas/MessagesStreamEvents' required: + - event - data - description: Total credits purchased and used - example: - data: - total_credits: 100.5 - total_usage: 25.75 + x-speakeasy-sse-sentinel: '[DONE]' + example: + event: content_block_delta + data: + type: content_block_delta + index: 0 + delta: + type: text_delta + text: Hello + '400': + description: Invalid request error + content: + application/json: + schema: + $ref: '#/components/schemas/MessagesErrorResponse' + example: + type: error + error: + type: invalid_request_error + message: 'Invalid request: messages is required' '401': - description: Unauthorized - Authentication required or invalid credentials + description: Authentication error content: application/json: schema: - $ref: '#/components/schemas/UnauthorizedResponse' + $ref: '#/components/schemas/MessagesErrorResponse' + example: + type: error + error: + type: authentication_error + message: Invalid API key '403': - description: Forbidden - Only management keys can fetch credits + description: Permission denied error content: application/json: schema: - $ref: '#/components/schemas/ForbiddenResponse' + $ref: '#/components/schemas/MessagesErrorResponse' + example: + type: error + error: + type: permission_error + message: Permission denied + '404': + description: Not found error + content: + application/json: + schema: + $ref: '#/components/schemas/MessagesErrorResponse' + example: + type: error + error: + type: not_found_error + message: Model not found + '429': + description: Rate limit error + content: + application/json: + schema: + $ref: '#/components/schemas/MessagesErrorResponse' + example: + type: error + error: + type: rate_limit_error + message: Rate limit exceeded '500': - description: Internal Server Error - Unexpected server error + description: API error content: application/json: schema: - $ref: '#/components/schemas/InternalServerResponse' + $ref: '#/components/schemas/MessagesErrorResponse' + example: + type: error + error: + type: api_error + message: Internal server error + '503': + description: Overloaded error + content: + application/json: + schema: + $ref: '#/components/schemas/MessagesErrorResponse' + example: + type: error + error: + type: overloaded_error + message: Service temporarily overloaded + '529': + description: Overloaded error + content: + application/json: + schema: + $ref: '#/components/schemas/MessagesErrorResponse' + example: + type: error + error: + type: overloaded_error + message: Provider is temporarily overloaded + operationId: createMessages parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /credits/coinbase: - post: - security: - - bearer: [] - x-speakeasy-name-override: createCoinbaseCharge + /activity: + get: tags: - - Credits - summary: Create a Coinbase charge for crypto payment - operationId: createCoinbaseCharge - description: Create a Coinbase charge for crypto payment - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateChargeRequest' - required: true + - Analytics + operationId: getUserActivity + summary: Get user activity grouped by endpoint + description: >- + Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Management key](/docs/guides/overview/auth/management-api-keys) required. + parameters: + - schema: + type: string + description: Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). + example: '2025-08-24' + required: false + description: Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). + name: date + in: query + - schema: + type: string + description: Filter by API key hash (SHA-256 hex string, as returned by the keys API). + example: abc123def456... + required: false + description: Filter by API key hash (SHA-256 hex string, as returned by the keys API). + name: api_key_hash + in: query + - schema: + type: string + description: Filter by org member user ID. Only applicable for organization accounts. + example: user_abc123 + required: false + description: Filter by org member user ID. Only applicable for organization accounts. + name: user_id + in: query responses: '200': - description: Returns the calldata to fulfill the transaction + description: Returns user activity data grouped by endpoint content: application/json: schema: - type: object - properties: - data: - type: object - properties: - id: - type: string - created_at: - type: string - expires_at: - type: string - web3_data: - type: object - properties: - transfer_intent: - type: object - properties: - call_data: - type: object - properties: - deadline: - type: string - fee_amount: - type: string - id: - type: string - operator: - type: string - prefix: - type: string - recipient: - type: string - recipient_amount: - type: string - recipient_currency: - type: string - refund_destination: - type: string - signature: - type: string - required: - - deadline - - fee_amount - - id - - operator - - prefix - - recipient - - recipient_amount - - recipient_currency - - refund_destination - - signature - metadata: - type: object - properties: - chain_id: - type: number - contract_address: - type: string - sender: - type: string - required: - - chain_id - - contract_address - - sender - required: - - call_data - - metadata - required: - - transfer_intent - required: - - id - - created_at - - expires_at - - web3_data - required: - - data + $ref: '#/components/schemas/ActivityResponse' + example: + data: + - date: '2025-08-24' + model: openai/gpt-4.1 + model_permaslug: openai/gpt-4.1-2025-04-14 + endpoint_id: 550e8400-e29b-41d4-a716-446655440000 + provider_name: OpenAI + usage: 0.015 + byok_usage_inference: 0.012 + requests: 5 + prompt_tokens: 50 + completion_tokens: 125 + reasoning_tokens: 25 '400': - description: Bad Request - Invalid credit amount or request body + description: Bad Request - Invalid request parameters or malformed input content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' + example: + error: + code: 400 + message: Invalid request parameters '401': description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' - '429': - description: Too Many Requests - Rate limit exceeded + example: + error: + code: 401 + message: Missing Authentication header + '403': + description: Forbidden - Authentication successful but insufficient permissions content: application/json: schema: - $ref: '#/components/schemas/TooManyRequestsResponse' + $ref: '#/components/schemas/ForbiddenResponse' + example: + error: + code: 403 + message: Only management keys can perform this operation + '404': + description: Not Found - Resource does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found '500': description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /embeddings: + /chat/completions: post: - x-speakeasy-name-override: generate + x-speakeasy-group: chat + x-speakeasy-name-override: send + x-speakeasy-stream-request-field: stream tags: - - Embeddings - summary: Submit an embedding request - description: Submits an embedding request to the embeddings router + - Chat + summary: Create a chat completion + operationId: sendChatCompletionRequest + description: >- + Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes. requestBody: content: application/json: schema: - type: object - properties: - input: - anyOf: - - type: string - - type: array - items: - type: string - - type: array - items: - type: number - - type: array - items: - type: array - items: - type: number - - type: array - items: - type: object - properties: - content: - type: array - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - text - text: - type: string - required: - - type - - text - - type: object - properties: - type: - type: string - enum: - - image_url - image_url: - type: object - properties: - url: - type: string - required: - - url - required: - - type - - image_url - required: - - content - model: - type: string - encoding_format: - type: string - enum: - - float - - base64 - x-speakeasy-unknown-values: allow - dimensions: - type: integer - minimum: 0 - exclusiveMinimum: true - user: - type: string - provider: - $ref: '#/components/schemas/ProviderPreferences' - input_type: - type: string - required: - - input - - model + $ref: '#/components/schemas/ChatRequest' + example: + model: openai/gpt-4 + messages: + - role: system + content: You are a helpful assistant. + - role: user + content: What is the capital of France? + temperature: 0.7 + max_tokens: 150 required: true responses: '200': - description: Embedding response + description: Successful chat completion response content: application/json: + schema: + $ref: '#/components/schemas/ChatResult' + example: + id: chatcmpl-123 + object: chat.completion + created: 1677652288 + model: openai/gpt-4 + choices: + - index: 0 + message: + role: assistant + content: The capital of France is Paris. + finish_reason: stop + usage: + prompt_tokens: 25 + completion_tokens: 10 + total_tokens: 35 + text/event-stream: schema: type: object properties: - id: - type: string - object: - type: string - enum: - - list data: - type: array - items: - type: object - properties: - object: - type: string - enum: - - embedding - embedding: - anyOf: - - type: array - items: - type: number - - type: string - index: - type: number - required: - - object - - embedding - model: - type: string - usage: - type: object - properties: - prompt_tokens: - type: number - total_tokens: - type: number - cost: - type: number - required: - - prompt_tokens - - total_tokens + $ref: '#/components/schemas/ChatStreamChunk' required: - - object - data - - model - text/event-stream: - schema: - type: string - description: Not used for embeddings - embeddings do not support streaming x-speakeasy-sse-sentinel: '[DONE]' + example: + data: + id: chatcmpl-123 + object: chat.completion.chunk + created: 1677652288 + model: openai/gpt-4 + choices: + - index: 0 + delta: + role: assistant + content: Hello + finish_reason: null '400': description: Bad Request - Invalid request parameters or malformed input content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' + example: + error: + code: 400 + message: Invalid request parameters '401': description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header '402': description: Payment Required - Insufficient credits or quota to complete request content: application/json: schema: $ref: '#/components/schemas/PaymentRequiredResponse' + example: + error: + code: 402 + message: Insufficient credits. Add more using https://openrouter.ai/credits '404': description: Not Found - Resource does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found + '408': + description: Request Timeout - Operation exceeded time limit + content: + application/json: + schema: + $ref: '#/components/schemas/RequestTimeoutResponse' + example: + error: + code: 408 + message: Operation timed out. Please try again later. + '413': + description: Payload Too Large - Request payload exceeds size limits + content: + application/json: + schema: + $ref: '#/components/schemas/PayloadTooLargeResponse' + example: + error: + code: 413 + message: Request payload too large + '422': + description: Unprocessable Entity - Semantic validation failure + content: + application/json: + schema: + $ref: '#/components/schemas/UnprocessableEntityResponse' + example: + error: + code: 422 + message: Invalid argument '429': description: Too Many Requests - Rate limit exceeded content: application/json: schema: $ref: '#/components/schemas/TooManyRequestsResponse' + example: + error: + code: 429 + message: Rate limit exceeded '500': description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error '502': description: Bad Gateway - Provider/upstream API failure content: application/json: schema: $ref: '#/components/schemas/BadGatewayResponse' + example: + error: + code: 502 + message: Provider returned error '503': description: Service Unavailable - Service temporarily unavailable content: application/json: schema: $ref: '#/components/schemas/ServiceUnavailableResponse' + example: + error: + code: 503 + message: Service temporarily unavailable '524': - description: Cloudflare Timeout - Provider request timed out at CDN edge + description: Infrastructure Timeout - Provider request timed out at edge network content: application/json: schema: $ref: '#/components/schemas/EdgeNetworkTimeoutResponse' + example: + error: + code: 524 + message: Request timed out. Please try again later. '529': description: Provider Overloaded - Provider is temporarily overloaded content: application/json: schema: $ref: '#/components/schemas/ProviderOverloadedResponse' - operationId: createEmbeddings + example: + error: + code: 529 + message: Provider returned error parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /embeddings/models: + /credits: get: + x-speakeasy-name-override: getCredits tags: - - Embeddings - x-speakeasy-name-override: listModels - summary: List all embeddings models - description: Returns a list of all available embeddings models and their properties + - Credits + summary: Get remaining credits + operationId: getCredits + description: >- + Get total credits purchased and used for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. responses: '200': - description: Returns a list of embeddings models + description: Returns the total credits purchased and used content: application/json: schema: - $ref: '#/components/schemas/ModelsListResponse' - '400': - description: Bad Request - Invalid request parameters + type: object + properties: + data: + type: object + properties: + total_credits: + type: number + format: double + description: Total credits purchased + example: 100.5 + total_usage: + type: number + format: double + description: Total credits used + example: 25.75 + required: + - total_credits + - total_usage + example: + total_credits: 100.5 + total_usage: 25.75 + required: + - data + description: Total credits purchased and used + example: + data: + total_credits: 100.5 + total_usage: 25.75 + example: + data: + total_credits: 100.5 + total_usage: 25.75 + '401': + description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: - $ref: '#/components/schemas/BadRequestResponse' + $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header + '403': + description: Forbidden - Authentication successful but insufficient permissions + content: + application/json: + schema: + $ref: '#/components/schemas/ForbiddenResponse' + example: + error: + code: 403 + message: Only management keys can perform this operation '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' - operationId: listEmbeddingsModels + example: + error: + code: 500 + message: Internal Server Error + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /credits/coinbase: + post: + security: [] + x-speakeasy-name-override: createCoinbaseCharge + x-speakeasy-ignore: true + x-fern-ignore: true + deprecated: true + tags: + - Credits + summary: Deprecated Coinbase Commerce charge endpoint + operationId: createCoinbaseCharge + description: >- + Deprecated. The Coinbase APIs used by this endpoint have been deprecated, so Coinbase Commerce charges have been removed. Use the web credits purchase flow instead. + responses: + '200': + description: This endpoint is deprecated and will never return a 200 response. + '410': + description: Gone - Endpoint has been permanently removed or deprecated + content: + application/json: + schema: + $ref: '#/components/schemas/GoneResponse' + example: + error: + code: 410 + message: >- + The Coinbase APIs used by this endpoint have been deprecated, so the Coinbase Commerce credits API has been removed. Use the web credits purchase flow instead. parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" @@ -15303,7 +12721,10 @@ paths: - schema: type: string minLength: 1 + description: The generation ID + example: gen-1234567890 required: true + description: The generation ID name: id in: query responses: @@ -15328,16 +12749,17 @@ paths: example: chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946 total_cost: type: number + format: double description: Total cost of the generation in USD example: 0.0015 cache_discount: type: number - nullable: true + format: double description: Discount applied due to caching example: 0.0002 upstream_inference_cost: type: number - nullable: true + format: double description: Cost charged by the upstream provider example: 0.0012 created_at: @@ -15349,8 +12771,7 @@ paths: description: Model used for the generation example: sao10k/l3-stheno-8b app_id: - type: number - nullable: true + type: integer description: ID of the app that made the request example: 12345 streamed: @@ -15370,17 +12791,17 @@ paths: example: Infermatic latency: type: number - nullable: true + format: double description: Total latency in milliseconds example: 1250 moderation_latency: type: number - nullable: true + format: double description: Moderation latency in milliseconds example: 50 generation_time: type: number - nullable: true + format: double description: Time taken for generation in milliseconds example: 1200 finish_reason: @@ -15389,58 +12810,47 @@ paths: description: Reason the generation finished example: stop tokens_prompt: - type: number - nullable: true + type: integer description: Number of tokens in the prompt example: 10 tokens_completion: - type: number - nullable: true + type: integer description: Number of tokens in the completion example: 25 native_tokens_prompt: - type: number - nullable: true + type: integer description: Native prompt tokens as reported by provider example: 10 native_tokens_completion: - type: number - nullable: true + type: integer description: Native completion tokens as reported by provider example: 25 native_tokens_completion_images: - type: number - nullable: true + type: integer description: Native completion image tokens as reported by provider example: 0 native_tokens_reasoning: - type: number - nullable: true + type: integer description: Native reasoning tokens as reported by provider example: 5 native_tokens_cached: - type: number - nullable: true + type: integer description: Native cached tokens as reported by provider example: 3 num_media_prompt: - type: number - nullable: true + type: integer description: Number of media items in the prompt example: 1 num_input_audio_prompt: - type: number - nullable: true + type: integer description: Number of audio inputs in the prompt example: 0 num_media_completion: - type: number - nullable: true + type: integer description: Number of media items in the completion example: 0 num_search_results: - type: number - nullable: true + type: integer description: Number of search results included example: 5 origin: @@ -15449,6 +12859,7 @@ paths: example: https://openrouter.ai/ usage: type: number + format: double description: Usage amount in USD example: 0.0015 is_byok: @@ -15471,7 +12882,9 @@ paths: enum: - completions - embeddings + - rerank - video + - null description: Type of API used for the generation x-speakeasy-unknown-values: allow router: @@ -15483,131 +12896,7 @@ paths: type: array nullable: true items: - type: object - properties: - id: - type: string - endpoint_id: - type: string - model_permaslug: - type: string - provider_name: - type: string - enum: - - AnyScale - - Atoma - - Cent-ML - - CrofAI - - Enfer - - GoPomelo - - HuggingFace - - Hyperbolic 2 - - InoCloud - - Kluster - - Lambda - - Lepton - - Lynn 2 - - Lynn - - Mancer - - Meta - - Modal - - Nineteen - - OctoAI - - Recursal - - Reflection - - Replicate - - SambaNova 2 - - SF Compute - - Targon - - Together 2 - - Ubicloud - - 01.AI - - AkashML - - AI21 - - AionLabs - - Alibaba - - Ambient - - 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 - - Google - - Google AI Studio - - Groq - - Hyperbolic - - Inception - - Inceptron - - InferenceNet - - Ionstream - - Infermatic - - Io Net - - Inflection - - Liquid - - Mara - - Mancer 2 - - Minimax - - ModelRun - - Mistral - - Modular - - Moonshot AI - - Morph - - NCompass - - Nebius - - NextBit - - Novita - - Nvidia - - OpenAI - - OpenInference - - Parasail - - Perplexity - - Phala - - Reka - - Relace - - SambaNova - - Seed - - SiliconFlow - - Sourceful - - StepFun - - Stealth - - StreamLake - - Switchpoint - - Together - - Upstage - - Venice - - WandB - - Xiaomi - - xAI - - Z.AI - - FakeProvider - x-speakeasy-unknown-values: allow - status: - type: number - nullable: true - latency: - type: number - is_byok: - type: boolean - required: - - status + $ref: '#/components/schemas/ProviderResponse' description: List of provider responses for this generation, including fallback attempts user_agent: type: string @@ -15617,6 +12906,15 @@ paths: type: string nullable: true description: Referer header from the request + request_id: + type: string + nullable: true + description: Unique identifier grouping all generations from a single API request + example: req-1727282430-aBcDeFgHiJkLmNoPqRsT + session_id: + type: string + nullable: true + description: Session identifier grouping multiple generations in the same session required: - id - upstream_id @@ -15658,54 +12956,125 @@ paths: required: - data description: Generation response + example: + data: + id: gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG + upstream_id: chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946 + total_cost: 0.0015 + cache_discount: 0.0002 + upstream_inference_cost: 0.0012 + created_at: '2024-07-15T23:33:19.433273+00:00' + model: sao10k/l3-stheno-8b + app_id: 12345 + streamed: true + cancelled: false + provider_name: Infermatic + latency: 1250 + moderation_latency: 50 + generation_time: 1200 + finish_reason: stop + tokens_prompt: 10 + tokens_completion: 25 + native_tokens_prompt: 10 + native_tokens_completion: 25 + native_tokens_completion_images: 0 + native_tokens_reasoning: 5 + native_tokens_cached: 3 + num_media_prompt: 1 + num_input_audio_prompt: 0 + num_media_completion: 0 + num_search_results: 5 + origin: https://openrouter.ai/ + usage: 0.0015 + is_byok: false + native_finish_reason: stop + external_user: user-123 + api_type: null + router: null + provider_responses: null + user_agent: null + http_referer: null + request_id: req-1727282430-aBcDeFgHiJkLmNoPqRsT '401': description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header '402': description: Payment Required - Insufficient credits or quota to complete request content: application/json: schema: $ref: '#/components/schemas/PaymentRequiredResponse' + example: + error: + code: 402 + message: Insufficient credits. Add more using https://openrouter.ai/credits '404': - description: Not Found - Generation not found + description: Not Found - Resource does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found '429': description: Too Many Requests - Rate limit exceeded content: application/json: schema: $ref: '#/components/schemas/TooManyRequestsResponse' + example: + error: + code: 429 + message: Rate limit exceeded '500': description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error '502': description: Bad Gateway - Provider/upstream API failure content: application/json: schema: $ref: '#/components/schemas/BadGatewayResponse' + example: + error: + code: 502 + message: Provider returned error '524': - description: Infrastructure Timeout - Request timed out at our edge network + description: Infrastructure Timeout - Provider request timed out at edge network content: application/json: schema: $ref: '#/components/schemas/EdgeNetworkTimeoutResponse' + example: + error: + code: 524 + message: Request timed out. Please try again later. '529': description: Provider Overloaded - Provider is temporarily overloaded content: application/json: schema: $ref: '#/components/schemas/ProviderOverloadedResponse' + example: + error: + code: 529 + message: Provider returned error operationId: getGeneration parameters: - $ref: "#/components/parameters/AppIdentifier" @@ -15735,18 +13104,29 @@ paths: application/json: schema: $ref: '#/components/schemas/ModelsCountResponse' + example: + data: + count: 150 '400': - description: Bad Request - Invalid output_modalities value + description: Bad Request - Invalid request parameters or malformed input content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' + example: + error: + code: 400 + message: Invalid request parameters '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error operationId: listModelsCount parameters: - $ref: "#/components/parameters/AppIdentifier" @@ -15783,7 +13163,10 @@ paths: in: query - schema: type: string + description: Filter models by supported parameter (comma-separated) + example: temperature required: false + description: Filter models by supported parameter (comma-separated) name: supported_parameters in: query - schema: @@ -15803,18 +13186,61 @@ paths: application/json: schema: $ref: '#/components/schemas/ModelsListResponse' + example: + data: + - id: openai/gpt-4 + canonical_slug: openai/gpt-4 + name: GPT-4 + created: 1692901234 + description: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. + pricing: + prompt: '0.00003' + completion: '0.00006' + request: '0' + image: '0' + context_length: 8192 + architecture: + tokenizer: GPT + instruct_type: chatml + modality: text->text + input_modalities: + - text + output_modalities: + - text + top_provider: + context_length: 8192 + max_completion_tokens: 4096 + is_moderated: true + per_request_limits: null + supported_parameters: + - temperature + - top_p + - max_tokens + default_parameters: null + knowledge_cutoff: null + expiration_date: null + links: + details: /api/v1/models/openai/gpt-5.4/endpoints '400': - description: Bad Request - Invalid request parameters + description: Bad Request - Invalid request parameters or malformed input content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' + example: + error: + code: 400 + message: Invalid request parameters '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error operationId: getModels parameters: - $ref: "#/components/parameters/AppIdentifier" @@ -15837,24 +13263,71 @@ paths: application/json: schema: $ref: '#/components/schemas/ModelsListResponse' + example: + data: + - id: openai/gpt-4 + canonical_slug: openai/gpt-4 + name: GPT-4 + created: 1692901234 + description: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. + pricing: + prompt: '0.00003' + completion: '0.00006' + request: '0' + image: '0' + context_length: 8192 + architecture: + tokenizer: GPT + instruct_type: chatml + modality: text->text + input_modalities: + - text + output_modalities: + - text + top_provider: + context_length: 8192 + max_completion_tokens: 4096 + is_moderated: true + per_request_limits: null + supported_parameters: + - temperature + - top_p + - max_tokens + default_parameters: null + knowledge_cutoff: null + expiration_date: null + links: + details: /api/v1/models/openai/gpt-5.4/endpoints '401': - description: Unauthorized - Missing or invalid authentication + description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header '404': - description: Not Found - No eligible endpoints found + description: Not Found - Resource does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error operationId: listModelsUser parameters: - $ref: "#/components/parameters/AppIdentifier" @@ -15870,12 +13343,18 @@ paths: parameters: - schema: type: string + description: The author/organization of the model + example: openai required: true + description: The author/organization of the model name: author in: path - schema: type: string + description: The model slug + example: gpt-4 required: true + description: The model slug name: slug in: path responses: @@ -15890,18 +13369,89 @@ paths: $ref: '#/components/schemas/ListEndpointsResponse' required: - data + example: + 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_id: openai/gpt-4 + model_name: GPT-4 + context_length: 8192 + pricing: + prompt: '0.00003' + completion: '0.00006' + request: '0' + image: '0' + provider_name: OpenAI + tag: openai + quantization: fp16 + max_completion_tokens: 4096 + max_prompt_tokens: 8192 + supported_parameters: + - temperature + - top_p + - max_tokens + status: default + uptime_last_30m: 99.5 + uptime_last_5m: 100 + uptime_last_1d: 99.8 + 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 + example: + data: + id: openai/gpt-4 + name: GPT-4 + created: 1692901234 + description: GPT-4 is a large multimodal model. + architecture: + tokenizer: GPT + instruct_type: chatml + modality: text->text + input_modalities: + - text + output_modalities: + - text + endpoints: [] '404': - description: Not Found - Model does not exist + description: Not Found - Resource does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found '500': description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" @@ -15926,12 +13476,86 @@ paths: $ref: '#/components/schemas/PublicEndpoint' required: - data + example: + data: + - name: 'OpenAI: GPT-4' + model_id: openai/gpt-4 + model_name: GPT-4 + context_length: 8192 + pricing: + prompt: '0.00003' + completion: '0.00006' + request: '0' + image: '0' + provider_name: OpenAI + tag: openai + quantization: fp16 + max_completion_tokens: 4096 + max_prompt_tokens: 8192 + supported_parameters: + - temperature + - top_p + - max_tokens + status: default + uptime_last_30m: 99.5 + uptime_last_5m: 100 + uptime_last_1d: 99.8 + 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 + example: + data: + - name: 'OpenAI: GPT-4' + model_id: openai/gpt-4 + model_name: GPT-4 + context_length: 8192 + pricing: + prompt: '0.00003' + completion: '0.00006' + request: '0' + image: '0' + provider_name: OpenAI + tag: openai + quantization: fp16 + max_completion_tokens: 4096 + max_prompt_tokens: 8192 + supported_parameters: + - temperature + - top_p + - max_tokens + status: default + uptime_last_30m: 99.5 + uptime_last_5m: 100 + uptime_last_1d: 99.8 + 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 '500': description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error operationId: listEndpointsZdr parameters: - $ref: "#/components/parameters/AppIdentifier" @@ -16233,6 +13857,7 @@ paths: - ZA - ZM - ZW + - null description: ISO 3166-1 Alpha-2 country code of the provider headquarters example: US x-speakeasy-unknown-values: allow @@ -16512,12 +14137,38 @@ paths: - IE required: - data + example: + data: + - name: OpenAI + slug: openai + privacy_policy_url: https://openai.com/privacy + terms_of_service_url: https://openai.com/terms + status_page_url: https://status.openai.com + headquarters: US + datacenters: + - US + - IE + example: + data: + - name: OpenAI + slug: openai + privacy_policy_url: https://openai.com/privacy + terms_of_service_url: https://openai.com/terms + status_page_url: https://status.openai.com + headquarters: US + datacenters: + - US + - IE '500': description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" @@ -16541,9 +14192,10 @@ paths: name: include_disabled in: query - schema: - type: string + type: integer + minimum: 0 description: Number of API keys to skip for pagination - example: '0' + example: 0 required: false description: Number of API keys to skip for pagination name: offset @@ -16579,12 +14231,12 @@ paths: example: false limit: type: number - nullable: true + format: double description: Spending limit for the API key in USD example: 100 limit_remaining: type: number - nullable: true + format: double description: Remaining spending limit in USD example: 74.5 limit_reset: @@ -16598,34 +14250,42 @@ paths: example: false usage: type: number + format: double description: Total OpenRouter credit usage (in USD) for the API key example: 25.5 usage_daily: type: number + format: double description: OpenRouter credit usage (in USD) for the current UTC day example: 25.5 usage_weekly: type: number + format: double description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) example: 25.5 usage_monthly: type: number + format: double description: OpenRouter credit usage (in USD) for the current UTC month example: 25.5 byok_usage: type: number + format: double description: Total external BYOK usage (in USD) for the API key example: 17.38 byok_usage_daily: type: number + format: double description: External BYOK usage (in USD) for the current UTC day example: 17.38 byok_usage_weekly: type: number + format: double description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday) example: 17.38 byok_usage_monthly: type: number + format: double description: External BYOK usage (in USD) for current UTC month example: 17.38 created_at: @@ -16715,31 +14375,389 @@ paths: updated_at: '2025-08-24T15:45:00Z' expires_at: '2027-12-31T23:59:59Z' creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 + example: + data: + - hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 + name: My Production Key + label: Production API Key + disabled: false + limit: 100 + limit_remaining: 74.5 + limit_reset: monthly + include_byok_in_limit: false + usage: 25.5 + usage_daily: 25.5 + usage_weekly: 25.5 + usage_monthly: 25.5 + byok_usage: 17.38 + byok_usage_daily: 17.38 + byok_usage_weekly: 17.38 + byok_usage_monthly: 17.38 + created_at: '2025-08-24T10:30:00Z' + updated_at: '2025-08-24T15:45:00Z' + expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 + '401': + description: Unauthorized - Authentication required or invalid credentials + content: + application/json: + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header + '429': + description: Too Many Requests - Rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + example: + error: + code: 429 + message: Rate limit exceeded + '500': + description: Internal Server Error - Unexpected server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error + post: + x-speakeasy-name-override: create + tags: + - API Keys + summary: Create a new API key + description: >- + Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + requestBody: + content: + application/json: + schema: + type: object + properties: + name: + type: string + minLength: 1 + description: Name for the new API key + example: My New API Key + limit: + type: number + format: double + description: Optional spending limit for the API key in USD + example: 50 + limit_reset: + type: string + nullable: true + enum: + - daily + - weekly + - monthly + - null + description: >- + Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. + example: monthly + x-speakeasy-unknown-values: allow + include_byok_in_limit: + type: boolean + description: Whether to include BYOK usage in the limit + example: true + expires_at: + type: string + nullable: true + format: date-time + description: >- + Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected + example: '2027-12-31T23:59:59Z' + creator_user_id: + type: string + nullable: true + minLength: 1 + description: >- + Optional user ID of the key creator. Only meaningful for organization-owned keys where a specific member is creating the key. + example: user_2dHFtVWx2n56w6HkM0000000000 + required: + - name + example: + name: My New API Key + limit: 50 + limit_reset: monthly + include_byok_in_limit: true + expires_at: '2027-12-31T23:59:59Z' + example: + name: My New API Key + limit: 50 + limit_reset: monthly + include_byok_in_limit: true + expires_at: '2027-12-31T23:59:59Z' + required: true + responses: + '201': + description: API key created successfully + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + hash: + type: string + description: Unique hash identifier for the API key + example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 + name: + type: string + description: Name of the API key + example: My Production Key + label: + type: string + description: Human-readable label for the API key + example: sk-or-v1-0e6...1c96 + disabled: + type: boolean + description: Whether the API key is disabled + example: false + limit: + type: number + format: double + description: Spending limit for the API key in USD + example: 100 + limit_remaining: + type: number + format: double + description: Remaining spending limit in USD + example: 74.5 + limit_reset: + type: string + nullable: true + description: Type of limit reset for the API key + example: monthly + include_byok_in_limit: + type: boolean + description: Whether to include external BYOK usage in the credit limit + example: false + usage: + type: number + format: double + description: Total OpenRouter credit usage (in USD) for the API key + example: 25.5 + usage_daily: + type: number + format: double + description: OpenRouter credit usage (in USD) for the current UTC day + example: 25.5 + usage_weekly: + type: number + format: double + description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) + example: 25.5 + usage_monthly: + type: number + format: double + description: OpenRouter credit usage (in USD) for the current UTC month + example: 25.5 + byok_usage: + type: number + format: double + description: Total external BYOK usage (in USD) for the API key + example: 17.38 + byok_usage_daily: + type: number + format: double + description: External BYOK usage (in USD) for the current UTC day + example: 17.38 + byok_usage_weekly: + type: number + format: double + description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday) + example: 17.38 + byok_usage_monthly: + type: number + format: double + description: External BYOK usage (in USD) for current UTC month + example: 17.38 + created_at: + type: string + description: ISO 8601 timestamp of when the API key was created + example: '2025-08-24T10:30:00Z' + updated_at: + type: string + nullable: true + description: ISO 8601 timestamp of when the API key was last updated + example: '2025-08-24T15:45:00Z' + expires_at: + type: string + nullable: true + format: date-time + description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration + example: '2027-12-31T23:59:59Z' + creator_user_id: + type: string + nullable: true + description: >- + The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. + example: user_2dHFtVWx2n56w6HkM0000000000 + required: + - hash + - name + - label + - disabled + - limit + - limit_remaining + - limit_reset + - include_byok_in_limit + - usage + - usage_daily + - usage_weekly + - usage_monthly + - byok_usage + - byok_usage_daily + - byok_usage_weekly + - byok_usage_monthly + - created_at + - updated_at + - creator_user_id + example: + hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 + name: My Production Key + label: sk-or-v1-0e6...1c96 + disabled: false + limit: 100 + limit_remaining: 74.5 + limit_reset: monthly + include_byok_in_limit: false + usage: 25.5 + usage_daily: 25.5 + usage_weekly: 25.5 + usage_monthly: 25.5 + byok_usage: 17.38 + byok_usage_daily: 17.38 + byok_usage_weekly: 17.38 + byok_usage_monthly: 17.38 + created_at: '2025-08-24T10:30:00Z' + updated_at: '2025-08-24T15:45:00Z' + expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 + description: The created API key information + key: + type: string + description: The actual API key string (only shown once) + example: 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 + required: + - data + - key + example: + data: + hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 + name: My New API Key + label: My New API Key + disabled: false + limit: 50 + limit_remaining: 50 + limit_reset: monthly + include_byok_in_limit: true + usage: 0 + usage_daily: 0 + usage_weekly: 0 + usage_monthly: 0 + byok_usage: 0 + byok_usage_daily: 0 + byok_usage_weekly: 0 + byok_usage_monthly: 0 + created_at: '2025-08-24T10:30:00Z' + updated_at: null + expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 + key: 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 + example: + data: + hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 + name: My New API Key + label: My New API Key + disabled: false + limit: 50 + limit_remaining: 50 + limit_reset: monthly + include_byok_in_limit: true + usage: 0 + usage_daily: 0 + usage_weekly: 0 + usage_monthly: 0 + byok_usage: 0 + byok_usage_daily: 0 + byok_usage_weekly: 0 + byok_usage_monthly: 0 + created_at: '2025-08-24T10:30:00Z' + updated_at: null + expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 + key: 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 + '400': + description: Bad Request - Invalid request parameters or malformed input + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestResponse' + example: + error: + code: 400 + message: Invalid request parameters '401': - description: Unauthorized - Missing or invalid authentication + description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header '429': description: Too Many Requests - Rate limit exceeded content: application/json: schema: $ref: '#/components/schemas/TooManyRequestsResponse' + example: + error: + code: 429 + message: Rate limit exceeded '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' - post: - x-speakeasy-name-override: create + example: + error: + code: 500 + message: Internal Server Error + operationId: createKeys + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /keys/{hash}: + patch: + x-speakeasy-name-override: update tags: - API Keys - summary: Create a new API key - description: >- - Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + summary: Update an API key + description: Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required. + parameters: + - schema: + type: string + description: The hash identifier of the API key to update + example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 + required: true + description: The hash identifier of the API key to update + name: hash + in: path requestBody: content: application/json: @@ -16748,14 +14766,17 @@ paths: properties: name: type: string - minLength: 1 - description: Name for the new API key - example: My New API Key + description: New name for the API key + example: Updated API Key Name + disabled: + type: boolean + description: Whether to disable the API key + example: false limit: type: number - nullable: true - description: Optional spending limit for the API key in USD - example: 50 + format: double + description: New spending limit for the API key in USD + example: 75 limit_reset: type: string nullable: true @@ -16763,33 +14784,31 @@ paths: - daily - weekly - monthly + - null description: >- - Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. - example: monthly + New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. + example: daily x-speakeasy-unknown-values: allow include_byok_in_limit: type: boolean description: Whether to include BYOK usage in the limit example: true - expires_at: - type: string - nullable: true - format: date-time - description: >- - Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected - example: '2027-12-31T23:59:59Z' - required: - - name example: - name: My New API Key - limit: 50 - limit_reset: monthly + name: Updated API Key Name + disabled: false + limit: 75 + limit_reset: daily include_byok_in_limit: true - expires_at: '2027-12-31T23:59:59Z' + example: + name: Updated API Key Name + disabled: false + limit: 75 + limit_reset: daily + include_byok_in_limit: true required: true responses: - '201': - description: API key created successfully + '200': + description: API key updated successfully content: application/json: schema: @@ -16816,12 +14835,12 @@ paths: example: false limit: type: number - nullable: true + format: double description: Spending limit for the API key in USD example: 100 limit_remaining: type: number - nullable: true + format: double description: Remaining spending limit in USD example: 74.5 limit_reset: @@ -16835,34 +14854,42 @@ paths: example: false usage: type: number + format: double description: Total OpenRouter credit usage (in USD) for the API key example: 25.5 usage_daily: type: number + format: double description: OpenRouter credit usage (in USD) for the current UTC day example: 25.5 usage_weekly: type: number + format: double description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) example: 25.5 usage_monthly: type: number + format: double description: OpenRouter credit usage (in USD) for the current UTC month example: 25.5 byok_usage: type: number + format: double description: Total external BYOK usage (in USD) for the API key example: 17.38 byok_usage_daily: type: number + format: double description: External BYOK usage (in USD) for the current UTC day example: 17.38 byok_usage_weekly: type: number + format: double description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday) example: 17.38 byok_usage_monthly: type: number + format: double description: External BYOK usage (in USD) for current UTC month example: 17.38 created_at: @@ -16927,126 +14954,198 @@ paths: updated_at: '2025-08-24T15:45:00Z' expires_at: '2027-12-31T23:59:59Z' creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 - description: The created API key information - key: - type: string - description: The actual API key string (only shown once) - example: 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 + description: The updated API key information required: - data - - key example: data: hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 - name: My New API Key - label: My New API Key + name: Updated API Key Name + label: Updated API Key Name disabled: false - limit: 50 - limit_remaining: 50 - limit_reset: monthly + limit: 75 + limit_remaining: 49.5 + limit_reset: daily include_byok_in_limit: true - usage: 0 - usage_daily: 0 - usage_weekly: 0 - usage_monthly: 0 - byok_usage: 0 - byok_usage_daily: 0 - byok_usage_weekly: 0 - byok_usage_monthly: 0 + usage: 25.5 + usage_daily: 25.5 + usage_weekly: 25.5 + usage_monthly: 25.5 + byok_usage: 17.38 + byok_usage_daily: 17.38 + byok_usage_weekly: 17.38 + byok_usage_monthly: 17.38 created_at: '2025-08-24T10:30:00Z' - updated_at: null - expires_at: '2027-12-31T23:59:59Z' + updated_at: '2025-08-24T16:00:00Z' + expires_at: null creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 - key: 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 + example: + data: + hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 + name: Updated API Key Name + label: Updated API Key Name + disabled: false + limit: 75 + limit_remaining: 49.5 + limit_reset: daily + include_byok_in_limit: true + usage: 25.5 + usage_daily: 25.5 + usage_weekly: 25.5 + usage_monthly: 25.5 + byok_usage: 17.38 + byok_usage_daily: 17.38 + byok_usage_weekly: 17.38 + byok_usage_monthly: 17.38 + created_at: '2025-08-24T10:30:00Z' + updated_at: '2025-08-24T16:00:00Z' + expires_at: null + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 '400': - description: Bad Request - Invalid request parameters + description: Bad Request - Invalid request parameters or malformed input content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' + example: + error: + code: 400 + message: Invalid request parameters '401': - description: Unauthorized - Missing or invalid authentication + description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header + '404': + description: Not Found - Resource does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found '429': description: Too Many Requests - Rate limit exceeded content: application/json: schema: $ref: '#/components/schemas/TooManyRequestsResponse' + example: + error: + code: 429 + message: Rate limit exceeded '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' - operationId: createKeys - parameters: - - $ref: "#/components/parameters/AppIdentifier" - - $ref: "#/components/parameters/AppDisplayName" - - $ref: "#/components/parameters/AppCategories" - /keys/{hash}: - patch: - x-speakeasy-name-override: update + example: + error: + code: 500 + message: Internal Server Error + operationId: updateKeys + delete: + x-speakeasy-name-override: delete tags: - API Keys - summary: Update an API key - description: Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required. + summary: Delete an API key + description: Delete an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required. parameters: - schema: type: string - description: The hash identifier of the API key to update + description: The hash identifier of the API key to delete example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 required: true - description: The hash identifier of the API key to update + description: The hash identifier of the API key to delete name: hash in: path - requestBody: - content: - application/json: - schema: - type: object - properties: - name: - type: string - description: New name for the API key - example: Updated API Key Name - disabled: - type: boolean - description: Whether to disable the API key - example: false - limit: - type: number - nullable: true - description: New spending limit for the API key in USD - example: 75 - limit_reset: - type: string - nullable: true - enum: - - daily - - weekly - - monthly - description: >- - New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. - example: daily - x-speakeasy-unknown-values: allow - include_byok_in_limit: - type: boolean - description: Whether to include BYOK usage in the limit - example: true + responses: + '200': + description: API key deleted successfully + content: + application/json: + schema: + type: object + properties: + deleted: + type: boolean + const: true + description: Confirmation that the API key was deleted + example: true + required: + - deleted + example: + deleted: true example: - name: Updated API Key Name - disabled: false - limit: 75 - limit_reset: daily - include_byok_in_limit: true - required: true + deleted: true + '401': + description: Unauthorized - Authentication required or invalid credentials + content: + application/json: + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header + '404': + description: Not Found - Resource does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found + '429': + description: Too Many Requests - Rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + example: + error: + code: 429 + message: Rate limit exceeded + '500': + description: Internal Server Error - Unexpected server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error + operationId: deleteKeys + get: + operationId: getKey + x-speakeasy-name-override: get + tags: + - API Keys + summary: Get a single API key + description: Get a single API key by hash. [Management key](/docs/guides/overview/auth/management-api-keys) required. + parameters: + - schema: + type: string + description: The hash identifier of the API key to retrieve + example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 + required: true + description: The hash identifier of the API key to retrieve + name: hash + in: path responses: '200': - description: API key updated successfully + description: API key details content: application/json: schema: @@ -17073,12 +15172,12 @@ paths: example: false limit: type: number - nullable: true + format: double description: Spending limit for the API key in USD example: 100 limit_remaining: type: number - nullable: true + format: double description: Remaining spending limit in USD example: 74.5 limit_reset: @@ -17092,34 +15191,42 @@ paths: example: false usage: type: number + format: double description: Total OpenRouter credit usage (in USD) for the API key example: 25.5 usage_daily: type: number + format: double description: OpenRouter credit usage (in USD) for the current UTC day example: 25.5 usage_weekly: type: number + format: double description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) example: 25.5 usage_monthly: type: number + format: double description: OpenRouter credit usage (in USD) for the current UTC month example: 25.5 byok_usage: type: number + format: double description: Total external BYOK usage (in USD) for the API key example: 17.38 byok_usage_daily: type: number + format: double description: External BYOK usage (in USD) for the current UTC day example: 17.38 byok_usage_weekly: type: number + format: double description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday) example: 17.38 byok_usage_monthly: type: number + format: double description: External BYOK usage (in USD) for current UTC month example: 17.38 created_at: @@ -17184,19 +15291,19 @@ paths: updated_at: '2025-08-24T15:45:00Z' expires_at: '2027-12-31T23:59:59Z' creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 - description: The updated API key information + description: The API key information required: - data example: data: hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 - name: Updated API Key Name - label: Updated API Key Name + name: My Production Key + label: Production API Key disabled: false - limit: 75 - limit_remaining: 49.5 - limit_reset: daily - include_byok_in_limit: true + limit: 100 + limit_remaining: 74.5 + limit_reset: monthly + include_byok_in_limit: false usage: 25.5 usage_daily: 25.5 usage_weekly: 25.5 @@ -17206,1370 +15313,1200 @@ paths: byok_usage_weekly: 17.38 byok_usage_monthly: 17.38 created_at: '2025-08-24T10:30:00Z' - updated_at: '2025-08-24T16:00:00Z' - expires_at: null + updated_at: '2025-08-24T15:45:00Z' + expires_at: '2027-12-31T23:59:59Z' creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 + example: + data: + hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 + name: My Production Key + label: Production API Key + disabled: false + limit: 100 + limit_remaining: 74.5 + limit_reset: monthly + include_byok_in_limit: false + usage: 25.5 + usage_daily: 25.5 + usage_weekly: 25.5 + usage_monthly: 25.5 + byok_usage: 17.38 + byok_usage_daily: 17.38 + byok_usage_weekly: 17.38 + byok_usage_monthly: 17.38 + created_at: '2025-08-24T10:30:00Z' + updated_at: '2025-08-24T15:45:00Z' + expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 + '401': + description: Unauthorized - Authentication required or invalid credentials + content: + application/json: + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header + '404': + description: Not Found - Resource does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found + '429': + description: Too Many Requests - Rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + example: + error: + code: 429 + message: Rate limit exceeded + '500': + description: Internal Server Error - Unexpected server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /organization/members: + get: + operationId: listOrganizationMembers + x-speakeasy-name-override: listMembers + tags: + - Organization + summary: List organization members + description: >- + List all members of the organization associated with the authenticated management key. [Management key](/docs/guides/overview/auth/management-api-keys) required. + x-speakeasy-pagination: + type: offsetLimit + inputs: + - name: offset + in: parameters + type: offset + - name: limit + in: parameters + type: limit + outputs: + results: $.data + parameters: + - schema: + type: integer + minimum: 0 + description: Number of records to skip for pagination + example: 0 + required: false + description: Number of records to skip for pagination + name: offset + in: query + - schema: + type: integer + minimum: 1 + maximum: 100 + description: Maximum number of records to return (max 100) + example: 50 + required: false + description: Maximum number of records to return (max 100) + name: limit + in: query + responses: + '200': + description: List of organization members + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + type: object + properties: + id: + type: string + description: User ID of the organization member + example: user_2dHFtVWx2n56w6HkM0000000000 + first_name: + type: string + nullable: true + description: First name of the member + example: Jane + last_name: + type: string + nullable: true + description: Last name of the member + example: Doe + email: + type: string + description: Email address of the member + example: jane.doe@example.com + role: + type: string + enum: + - org:admin + - org:member + description: Role of the member in the organization + example: org:member + x-speakeasy-unknown-values: allow + required: + - id + - first_name + - last_name + - email + - role + description: List of organization members + total_count: + type: integer + description: Total number of members in the organization + example: 25 + required: + - data + - total_count + example: + data: + - id: user_2dHFtVWx2n56w6HkM0000000000 + first_name: Jane + last_name: Doe + email: jane.doe@example.com + role: member + total_count: 25 + '401': + description: Unauthorized - Authentication required or invalid credentials + content: + application/json: + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header + '404': + description: Not Found - Resource does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found + '500': + description: Internal Server Error - Unexpected server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /guardrails: + get: + operationId: listGuardrails + x-speakeasy-name-override: list + tags: + - Guardrails + summary: List guardrails + description: >- + List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + x-speakeasy-pagination: + type: offsetLimit + inputs: + - name: offset + in: parameters + type: offset + - name: limit + in: parameters + type: limit + outputs: + results: $.data + parameters: + - schema: + type: integer + minimum: 0 + description: Number of records to skip for pagination + example: 0 + required: false + description: Number of records to skip for pagination + name: offset + in: query + - schema: + type: integer + minimum: 1 + maximum: 100 + description: Maximum number of records to return (max 100) + example: 50 + required: false + description: Maximum number of records to return (max 100) + name: limit + in: query + responses: + '200': + description: List of guardrails + content: + application/json: + schema: + $ref: '#/components/schemas/ListGuardrailsResponse' + example: + data: + - id: 550e8400-e29b-41d4-a716-446655440000 + name: Production Guardrail + description: Guardrail for production environment + limit_usd: 100 + reset_interval: monthly + allowed_providers: + - openai + - anthropic + - google + ignored_providers: null + allowed_models: null + enforce_zdr: false + created_at: '2025-08-24T10:30:00Z' + updated_at: '2025-08-24T15:45:00Z' + total_count: 1 + '401': + description: Unauthorized - Authentication required or invalid credentials + content: + application/json: + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header + '500': + description: Internal Server Error - Unexpected server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error + post: + operationId: createGuardrail + x-speakeasy-name-override: create + tags: + - Guardrails + summary: Create a guardrail + description: >- + Create a new guardrail for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateGuardrailRequest' + example: + name: My New Guardrail + description: A guardrail for limiting API usage + limit_usd: 50 + reset_interval: monthly + allowed_providers: + - openai + - anthropic + - deepseek + ignored_providers: null + allowed_models: null + enforce_zdr: false + required: true + responses: + '201': + description: Guardrail created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/CreateGuardrailResponse' + example: + data: + id: 550e8400-e29b-41d4-a716-446655440000 + name: My New Guardrail + description: A guardrail for limiting API usage + limit_usd: 50 + reset_interval: monthly + allowed_providers: + - openai + - anthropic + - google + ignored_providers: null + allowed_models: null + enforce_zdr: false + created_at: '2025-08-24T10:30:00Z' + updated_at: null '400': - description: Bad Request - Invalid request parameters + description: Bad Request - Invalid request parameters or malformed input content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' + example: + error: + code: 400 + message: Invalid request parameters + '401': + description: Unauthorized - Authentication required or invalid credentials + content: + application/json: + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header + '500': + description: Internal Server Error - Unexpected server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /guardrails/{id}: + get: + operationId: getGuardrail + x-speakeasy-name-override: get + tags: + - Guardrails + summary: Get a guardrail + description: Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required. + parameters: + - schema: + type: string + format: uuid + description: The unique identifier of the guardrail to retrieve + example: 550e8400-e29b-41d4-a716-446655440000 + required: true + description: The unique identifier of the guardrail to retrieve + name: id + in: path + responses: + '200': + description: Guardrail details + content: + application/json: + schema: + $ref: '#/components/schemas/GetGuardrailResponse' + example: + data: + id: 550e8400-e29b-41d4-a716-446655440000 + name: Production Guardrail + description: Guardrail for production environment + limit_usd: 100 + reset_interval: monthly + allowed_providers: + - openai + - anthropic + - google + ignored_providers: null + allowed_models: null + enforce_zdr: false + created_at: '2025-08-24T10:30:00Z' + updated_at: '2025-08-24T15:45:00Z' '401': - description: Unauthorized - Missing or invalid authentication + description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header '404': - description: Not Found - API key does not exist + description: Not Found - Resource does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' - '429': - description: Too Many Requests - Rate limit exceeded - content: - application/json: - schema: - $ref: '#/components/schemas/TooManyRequestsResponse' + example: + error: + code: 404 + message: Resource not found '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' - operationId: updateKeys - delete: - x-speakeasy-name-override: delete + example: + error: + code: 500 + message: Internal Server Error + patch: + operationId: updateGuardrail + x-speakeasy-name-override: update tags: - - API Keys - summary: Delete an API key - description: Delete an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required. + - Guardrails + summary: Update a guardrail + description: Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. parameters: - schema: type: string - description: The hash identifier of the API key to delete - example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 + format: uuid + description: The unique identifier of the guardrail to update + example: 550e8400-e29b-41d4-a716-446655440000 required: true - description: The hash identifier of the API key to delete - name: hash + description: The unique identifier of the guardrail to update + name: id in: path + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateGuardrailRequest' + example: + name: Updated Guardrail Name + description: Updated description + limit_usd: 75 + reset_interval: weekly + required: true responses: '200': - description: API key deleted successfully + description: Guardrail updated successfully content: application/json: schema: - type: object - properties: - deleted: - type: boolean - const: true - description: Confirmation that the API key was deleted - example: true - required: - - deleted - example: - deleted: true + $ref: '#/components/schemas/UpdateGuardrailResponse' + example: + data: + id: 550e8400-e29b-41d4-a716-446655440000 + name: Updated Guardrail Name + description: Updated description + limit_usd: 75 + reset_interval: weekly + allowed_providers: + - openai + ignored_providers: null + allowed_models: null + enforce_zdr: true + created_at: '2025-08-24T10:30:00Z' + updated_at: '2025-08-24T16:00:00Z' + '400': + description: Bad Request - Invalid request parameters or malformed input + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestResponse' + example: + error: + code: 400 + message: Invalid request parameters '401': - description: Unauthorized - Missing or invalid authentication + description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header '404': - description: Not Found - API key does not exist + description: Not Found - Resource does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' - '429': - description: Too Many Requests - Rate limit exceeded - content: - application/json: - schema: - $ref: '#/components/schemas/TooManyRequestsResponse' + example: + error: + code: 404 + message: Resource not found '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' - operationId: deleteKeys - get: - operationId: getKey - x-speakeasy-name-override: get - tags: - - API Keys - summary: Get a single API key - description: Get a single API key by hash. [Management key](/docs/guides/overview/auth/management-api-keys) required. - parameters: - - schema: - type: string - description: The hash identifier of the API key to retrieve - example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 - required: true - description: The hash identifier of the API key to retrieve - name: hash - in: path - responses: - '200': - description: API key details - content: - application/json: - schema: - type: object - properties: - data: - type: object - properties: - hash: - type: string - description: Unique hash identifier for the API key - example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 - name: - type: string - description: Name of the API key - example: My Production Key - label: - type: string - description: Human-readable label for the API key - example: sk-or-v1-0e6...1c96 - disabled: - type: boolean - description: Whether the API key is disabled - example: false - limit: - type: number - nullable: true - description: Spending limit for the API key in USD - example: 100 - limit_remaining: - type: number - nullable: true - description: Remaining spending limit in USD - example: 74.5 - limit_reset: - type: string - nullable: true - description: Type of limit reset for the API key - example: monthly - include_byok_in_limit: - type: boolean - description: Whether to include external BYOK usage in the credit limit - example: false - usage: - type: number - description: Total OpenRouter credit usage (in USD) for the API key - example: 25.5 - usage_daily: - type: number - description: OpenRouter credit usage (in USD) for the current UTC day - example: 25.5 - usage_weekly: - type: number - description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) - example: 25.5 - usage_monthly: - type: number - description: OpenRouter credit usage (in USD) for the current UTC month - example: 25.5 - byok_usage: - type: number - description: Total external BYOK usage (in USD) for the API key - example: 17.38 - byok_usage_daily: - type: number - description: External BYOK usage (in USD) for the current UTC day - example: 17.38 - byok_usage_weekly: - type: number - description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday) - example: 17.38 - byok_usage_monthly: - type: number - description: External BYOK usage (in USD) for current UTC month - example: 17.38 - created_at: - type: string - description: ISO 8601 timestamp of when the API key was created - example: '2025-08-24T10:30:00Z' - updated_at: - type: string - nullable: true - description: ISO 8601 timestamp of when the API key was last updated - example: '2025-08-24T15:45:00Z' - expires_at: - type: string - nullable: true - format: date-time - description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration - example: '2027-12-31T23:59:59Z' - creator_user_id: - type: string - nullable: true - description: >- - The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. - example: user_2dHFtVWx2n56w6HkM0000000000 - required: - - hash - - name - - label - - disabled - - limit - - limit_remaining - - limit_reset - - include_byok_in_limit - - usage - - usage_daily - - usage_weekly - - usage_monthly - - byok_usage - - byok_usage_daily - - byok_usage_weekly - - byok_usage_monthly - - created_at - - updated_at - - creator_user_id - example: - hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 - name: My Production Key - label: sk-or-v1-0e6...1c96 - disabled: false - limit: 100 - limit_remaining: 74.5 - limit_reset: monthly - include_byok_in_limit: false - usage: 25.5 - usage_daily: 25.5 - usage_weekly: 25.5 - usage_monthly: 25.5 - byok_usage: 17.38 - byok_usage_daily: 17.38 - byok_usage_weekly: 17.38 - byok_usage_monthly: 17.38 - created_at: '2025-08-24T10:30:00Z' - updated_at: '2025-08-24T15:45:00Z' - expires_at: '2027-12-31T23:59:59Z' - creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 - description: The API key information - required: - - data - example: - data: - hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 - name: My Production Key - label: Production API Key - disabled: false - limit: 100 - limit_remaining: 74.5 - limit_reset: monthly - include_byok_in_limit: false - usage: 25.5 - usage_daily: 25.5 - usage_weekly: 25.5 - usage_monthly: 25.5 - byok_usage: 17.38 - byok_usage_daily: 17.38 - byok_usage_weekly: 17.38 - byok_usage_monthly: 17.38 - created_at: '2025-08-24T10:30:00Z' - updated_at: '2025-08-24T15:45:00Z' - expires_at: '2027-12-31T23:59:59Z' - creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 + example: + error: + code: 500 + message: Internal Server Error + delete: + operationId: deleteGuardrail + x-speakeasy-name-override: delete + tags: + - Guardrails + summary: Delete a guardrail + description: Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. + parameters: + - schema: + type: string + format: uuid + description: The unique identifier of the guardrail to delete + example: 550e8400-e29b-41d4-a716-446655440000 + required: true + description: The unique identifier of the guardrail to delete + name: id + in: path + responses: + '200': + description: Guardrail deleted successfully + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteGuardrailResponse' + example: + deleted: true '401': - description: Unauthorized - Missing or invalid authentication + description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header '404': - description: Not Found - API key does not exist + description: Not Found - Resource does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' - '429': - description: Too Many Requests - Rate limit exceeded - content: - application/json: - schema: - $ref: '#/components/schemas/TooManyRequestsResponse' + example: + error: + code: 404 + message: Resource not found '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /guardrails: + /guardrails/assignments/keys: get: - operationId: listGuardrails - x-speakeasy-name-override: list + operationId: listKeyAssignments + x-speakeasy-name-override: listKeyAssignments tags: - Guardrails - summary: List guardrails + summary: List all key assignments description: >- - List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + x-speakeasy-pagination: + type: offsetLimit + inputs: + - name: offset + in: parameters + type: offset + - name: limit + in: parameters + type: limit + outputs: + results: $.data parameters: - schema: - type: string + type: integer + minimum: 0 description: Number of records to skip for pagination - example: '0' + example: 0 required: false description: Number of records to skip for pagination name: offset in: query - schema: - type: string + type: integer + minimum: 1 + maximum: 100 description: Maximum number of records to return (max 100) - example: '50' + example: 50 required: false description: Maximum number of records to return (max 100) name: limit - in: query - responses: - '200': - description: List of guardrails - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - type: object - properties: - id: - type: string - format: uuid - description: Unique identifier for the guardrail - example: 550e8400-e29b-41d4-a716-446655440000 - name: - type: string - description: Name of the guardrail - example: Production Guardrail - description: - type: string - nullable: true - description: Description of the guardrail - example: Guardrail for production environment - limit_usd: - type: number - nullable: true - minimum: 0 - exclusiveMinimum: true - description: Spending limit in USD - example: 100 - reset_interval: - type: string - nullable: true - enum: - - daily - - weekly - - monthly - description: Interval at which the limit resets (daily, weekly, monthly) - example: monthly - x-speakeasy-unknown-values: allow - allowed_providers: - type: array - nullable: true - items: - type: string - description: List of allowed provider IDs - example: - - openai - - anthropic - - google - ignored_providers: - type: array - nullable: true - items: - type: string - description: List of provider IDs to exclude from routing - example: - - azure - allowed_models: - type: array - nullable: true - items: - type: string - description: Array of model canonical_slugs (immutable identifiers) - example: - - openai/gpt-5.2-20251211 - - anthropic/claude-4.5-opus-20251124 - - deepseek/deepseek-r1-0528:free - enforce_zdr: - type: boolean - nullable: true - description: Whether to enforce zero data retention - example: false - created_at: - type: string - description: ISO 8601 timestamp of when the guardrail was created - example: '2025-08-24T10:30:00Z' - updated_at: - type: string - nullable: true - description: ISO 8601 timestamp of when the guardrail was last updated - example: '2025-08-24T15:45:00Z' - required: - - id - - name - - created_at - example: - id: 550e8400-e29b-41d4-a716-446655440000 - name: Production Guardrail - description: Guardrail for production environment - limit_usd: 100 - reset_interval: monthly - allowed_providers: - - openai - - anthropic - - google - ignored_providers: null - allowed_models: null - enforce_zdr: false - created_at: '2025-08-24T10:30:00Z' - updated_at: '2025-08-24T15:45:00Z' - description: List of guardrails - total_count: - type: number - description: Total number of guardrails - example: 25 - required: - - data - - total_count - example: - data: - - id: 550e8400-e29b-41d4-a716-446655440000 - name: Production Guardrail - description: Guardrail for production environment - limit_usd: 100 - reset_interval: monthly - allowed_providers: - - openai - - anthropic - - google - ignored_providers: null - allowed_models: null - enforce_zdr: false - created_at: '2025-08-24T10:30:00Z' - updated_at: '2025-08-24T15:45:00Z' - total_count: 1 - '401': - description: Unauthorized - Missing or invalid authentication - content: - application/json: - schema: - $ref: '#/components/schemas/UnauthorizedResponse' - '500': - description: Internal Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerResponse' - post: - operationId: createGuardrail - x-speakeasy-name-override: create - tags: - - Guardrails - summary: Create a guardrail - description: >- - Create a new guardrail for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. - requestBody: - content: - application/json: - schema: - type: object - properties: - name: - type: string - minLength: 1 - maxLength: 200 - description: Name for the new guardrail - example: My New Guardrail - description: - type: string - nullable: true - maxLength: 1000 - description: Description of the guardrail - example: A guardrail for limiting API usage - limit_usd: - type: number - nullable: true - minimum: 0 - exclusiveMinimum: true - description: Spending limit in USD - example: 50 - reset_interval: - type: string - nullable: true - enum: - - daily - - weekly - - monthly - description: Interval at which the limit resets (daily, weekly, monthly) - example: monthly - x-speakeasy-unknown-values: allow - allowed_providers: - type: array - nullable: true - items: - type: string - minItems: 1 - description: List of allowed provider IDs - example: - - openai - - anthropic - - deepseek - ignored_providers: - type: array - nullable: true - items: - type: string - minItems: 1 - description: List of provider IDs to exclude from routing - example: - - azure - allowed_models: - type: array - nullable: true - items: - type: string - minItems: 1 - description: Array of model identifiers (slug or canonical_slug accepted) - example: - - openai/gpt-5.2 - - anthropic/claude-4.5-opus-20251124 - - deepseek/deepseek-r1-0528:free - enforce_zdr: - type: boolean - nullable: true - description: Whether to enforce zero data retention - example: false - required: - - name - example: - name: My New Guardrail - description: A guardrail for limiting API usage - limit_usd: 50 - reset_interval: monthly - allowed_providers: - - openai - - anthropic - - deepseek - ignored_providers: null - allowed_models: null - enforce_zdr: false - required: true - responses: - '201': - description: Guardrail created successfully - content: - application/json: - schema: - type: object - properties: - data: - type: object - properties: - id: - type: string - format: uuid - description: Unique identifier for the guardrail - example: 550e8400-e29b-41d4-a716-446655440000 - name: - type: string - description: Name of the guardrail - example: Production Guardrail - description: - type: string - nullable: true - description: Description of the guardrail - example: Guardrail for production environment - limit_usd: - type: number - nullable: true - minimum: 0 - exclusiveMinimum: true - description: Spending limit in USD - example: 100 - reset_interval: - type: string - nullable: true - enum: - - daily - - weekly - - monthly - description: Interval at which the limit resets (daily, weekly, monthly) - example: monthly - x-speakeasy-unknown-values: allow - allowed_providers: - type: array - nullable: true - items: - type: string - description: List of allowed provider IDs - example: - - openai - - anthropic - - google - ignored_providers: - type: array - nullable: true - items: - type: string - description: List of provider IDs to exclude from routing - example: - - azure - allowed_models: - type: array - nullable: true - items: - type: string - description: Array of model canonical_slugs (immutable identifiers) - example: - - openai/gpt-5.2-20251211 - - anthropic/claude-4.5-opus-20251124 - - deepseek/deepseek-r1-0528:free - enforce_zdr: - type: boolean - nullable: true - description: Whether to enforce zero data retention - example: false - created_at: - type: string - description: ISO 8601 timestamp of when the guardrail was created - example: '2025-08-24T10:30:00Z' - updated_at: - type: string - nullable: true - description: ISO 8601 timestamp of when the guardrail was last updated - example: '2025-08-24T15:45:00Z' - required: - - id - - name - - created_at - example: - id: 550e8400-e29b-41d4-a716-446655440000 - name: Production Guardrail - description: Guardrail for production environment - limit_usd: 100 - reset_interval: monthly - allowed_providers: - - openai - - anthropic - - google - ignored_providers: null - allowed_models: null - enforce_zdr: false - created_at: '2025-08-24T10:30:00Z' - updated_at: '2025-08-24T15:45:00Z' - description: The created guardrail - required: - - data - example: - data: - id: 550e8400-e29b-41d4-a716-446655440000 - name: My New Guardrail - description: A guardrail for limiting API usage - limit_usd: 50 - reset_interval: monthly - allowed_providers: - - openai - - anthropic - - google - ignored_providers: null - allowed_models: null - enforce_zdr: false - created_at: '2025-08-24T10:30:00Z' - updated_at: null - '400': - description: Bad Request - Invalid request parameters + in: query + responses: + '200': + description: List of key assignments content: application/json: schema: - $ref: '#/components/schemas/BadRequestResponse' + $ref: '#/components/schemas/ListKeyAssignmentsResponse' + example: + data: + - id: 550e8400-e29b-41d4-a716-446655440000 + key_hash: c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 + guardrail_id: 550e8400-e29b-41d4-a716-446655440001 + key_name: Production Key + key_label: prod-key + assigned_by: user_abc123 + created_at: '2025-08-24T10:30:00Z' + total_count: 1 '401': - description: Unauthorized - Missing or invalid authentication + description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /guardrails/{id}: + /guardrails/assignments/members: get: - operationId: getGuardrail - x-speakeasy-name-override: get + operationId: listMemberAssignments + x-speakeasy-name-override: listMemberAssignments tags: - Guardrails - summary: Get a guardrail - description: Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required. + summary: List all member assignments + description: >- + List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + x-speakeasy-pagination: + type: offsetLimit + inputs: + - name: offset + in: parameters + type: offset + - name: limit + in: parameters + type: limit + outputs: + results: $.data parameters: - schema: - type: string - format: uuid - description: The unique identifier of the guardrail to retrieve - example: 550e8400-e29b-41d4-a716-446655440000 - required: true - description: The unique identifier of the guardrail to retrieve - name: id - in: path + type: integer + minimum: 0 + description: Number of records to skip for pagination + example: 0 + required: false + description: Number of records to skip for pagination + name: offset + in: query + - schema: + type: integer + minimum: 1 + maximum: 100 + description: Maximum number of records to return (max 100) + example: 50 + required: false + description: Maximum number of records to return (max 100) + name: limit + in: query responses: '200': - description: Guardrail details + description: List of member assignments content: application/json: schema: - type: object - properties: - data: - type: object - properties: - id: - type: string - format: uuid - description: Unique identifier for the guardrail - example: 550e8400-e29b-41d4-a716-446655440000 - name: - type: string - description: Name of the guardrail - example: Production Guardrail - description: - type: string - nullable: true - description: Description of the guardrail - example: Guardrail for production environment - limit_usd: - type: number - nullable: true - minimum: 0 - exclusiveMinimum: true - description: Spending limit in USD - example: 100 - reset_interval: - type: string - nullable: true - enum: - - daily - - weekly - - monthly - description: Interval at which the limit resets (daily, weekly, monthly) - example: monthly - x-speakeasy-unknown-values: allow - allowed_providers: - type: array - nullable: true - items: - type: string - description: List of allowed provider IDs - example: - - openai - - anthropic - - google - ignored_providers: - type: array - nullable: true - items: - type: string - description: List of provider IDs to exclude from routing - example: - - azure - allowed_models: - type: array - nullable: true - items: - type: string - description: Array of model canonical_slugs (immutable identifiers) - example: - - openai/gpt-5.2-20251211 - - anthropic/claude-4.5-opus-20251124 - - deepseek/deepseek-r1-0528:free - enforce_zdr: - type: boolean - nullable: true - description: Whether to enforce zero data retention - example: false - created_at: - type: string - description: ISO 8601 timestamp of when the guardrail was created - example: '2025-08-24T10:30:00Z' - updated_at: - type: string - nullable: true - description: ISO 8601 timestamp of when the guardrail was last updated - example: '2025-08-24T15:45:00Z' - required: - - id - - name - - created_at - example: - id: 550e8400-e29b-41d4-a716-446655440000 - name: Production Guardrail - description: Guardrail for production environment - limit_usd: 100 - reset_interval: monthly - allowed_providers: - - openai - - anthropic - - google - ignored_providers: null - allowed_models: null - enforce_zdr: false - created_at: '2025-08-24T10:30:00Z' - updated_at: '2025-08-24T15:45:00Z' - description: The guardrail - required: - - data - example: - data: - id: 550e8400-e29b-41d4-a716-446655440000 - name: Production Guardrail - description: Guardrail for production environment - limit_usd: 100 - reset_interval: monthly - allowed_providers: - - openai - - anthropic - - google - ignored_providers: null - allowed_models: null - enforce_zdr: false + $ref: '#/components/schemas/ListMemberAssignmentsResponse' + example: + data: + - id: 550e8400-e29b-41d4-a716-446655440000 + user_id: user_abc123 + organization_id: org_xyz789 + guardrail_id: 550e8400-e29b-41d4-a716-446655440001 + assigned_by: user_abc123 created_at: '2025-08-24T10:30:00Z' - updated_at: '2025-08-24T15:45:00Z' + total_count: 1 '401': - description: Unauthorized - Missing or invalid authentication + description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' - '404': - description: Not Found - Guardrail does not exist - content: - application/json: - schema: - $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 401 + message: Missing Authentication header '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' - patch: - operationId: updateGuardrail - x-speakeasy-name-override: update + example: + error: + code: 500 + message: Internal Server Error + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /guardrails/{id}/assignments/keys: + get: + operationId: listGuardrailKeyAssignments + x-speakeasy-name-override: listGuardrailKeyAssignments tags: - Guardrails - summary: Update a guardrail - description: Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. + summary: List key assignments for a guardrail + description: >- + List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. + x-speakeasy-pagination: + type: offsetLimit + inputs: + - name: offset + in: parameters + type: offset + - name: limit + in: parameters + type: limit + outputs: + results: $.data parameters: - schema: type: string format: uuid - description: The unique identifier of the guardrail to update + description: The unique identifier of the guardrail example: 550e8400-e29b-41d4-a716-446655440000 required: true - description: The unique identifier of the guardrail to update + description: The unique identifier of the guardrail name: id in: path - requestBody: - content: - application/json: - schema: - type: object - properties: - name: - type: string - minLength: 1 - maxLength: 200 - description: New name for the guardrail - example: Updated Guardrail Name - description: - type: string - nullable: true - maxLength: 1000 - description: New description for the guardrail - example: Updated description - limit_usd: - type: number - nullable: true - minimum: 0 - exclusiveMinimum: true - description: New spending limit in USD - example: 75 - reset_interval: - type: string - nullable: true - enum: - - daily - - weekly - - monthly - description: Interval at which the limit resets (daily, weekly, monthly) - example: monthly - x-speakeasy-unknown-values: allow - allowed_providers: - type: array - nullable: true - items: - type: string - minItems: 1 - description: New list of allowed provider IDs - example: - - openai - - anthropic - - deepseek - ignored_providers: - type: array - nullable: true - items: - type: string - minItems: 1 - description: List of provider IDs to exclude from routing - example: - - azure - allowed_models: - type: array - nullable: true - items: - type: string - minItems: 1 - description: Array of model identifiers (slug or canonical_slug accepted) - example: - - openai/gpt-5.2 - enforce_zdr: - type: boolean - nullable: true - description: Whether to enforce zero data retention - example: true - example: - name: Updated Guardrail Name - description: Updated description - limit_usd: 75 - reset_interval: weekly - required: true - responses: - '200': - description: Guardrail updated successfully - content: - application/json: - schema: - type: object - properties: - data: - type: object - properties: - id: - type: string - format: uuid - description: Unique identifier for the guardrail - example: 550e8400-e29b-41d4-a716-446655440000 - name: - type: string - description: Name of the guardrail - example: Production Guardrail - description: - type: string - nullable: true - description: Description of the guardrail - example: Guardrail for production environment - limit_usd: - type: number - nullable: true - minimum: 0 - exclusiveMinimum: true - description: Spending limit in USD - example: 100 - reset_interval: - type: string - nullable: true - enum: - - daily - - weekly - - monthly - description: Interval at which the limit resets (daily, weekly, monthly) - example: monthly - x-speakeasy-unknown-values: allow - allowed_providers: - type: array - nullable: true - items: - type: string - description: List of allowed provider IDs - example: - - openai - - anthropic - - google - ignored_providers: - type: array - nullable: true - items: - type: string - description: List of provider IDs to exclude from routing - example: - - azure - allowed_models: - type: array - nullable: true - items: - type: string - description: Array of model canonical_slugs (immutable identifiers) - example: - - openai/gpt-5.2-20251211 - - anthropic/claude-4.5-opus-20251124 - - deepseek/deepseek-r1-0528:free - enforce_zdr: - type: boolean - nullable: true - description: Whether to enforce zero data retention - example: false - created_at: - type: string - description: ISO 8601 timestamp of when the guardrail was created - example: '2025-08-24T10:30:00Z' - updated_at: - type: string - nullable: true - description: ISO 8601 timestamp of when the guardrail was last updated - example: '2025-08-24T15:45:00Z' - required: - - id - - name - - created_at - example: - id: 550e8400-e29b-41d4-a716-446655440000 - name: Production Guardrail - description: Guardrail for production environment - limit_usd: 100 - reset_interval: monthly - allowed_providers: - - openai - - anthropic - - google - ignored_providers: null - allowed_models: null - enforce_zdr: false - created_at: '2025-08-24T10:30:00Z' - updated_at: '2025-08-24T15:45:00Z' - description: The updated guardrail - required: - - data - example: - data: - id: 550e8400-e29b-41d4-a716-446655440000 - name: Updated Guardrail Name - description: Updated description - limit_usd: 75 - reset_interval: weekly - allowed_providers: - - openai - ignored_providers: null - allowed_models: null - enforce_zdr: true - created_at: '2025-08-24T10:30:00Z' - updated_at: '2025-08-24T16:00:00Z' - '400': - description: Bad Request - Invalid request parameters + - schema: + type: integer + minimum: 0 + description: Number of records to skip for pagination + example: 0 + required: false + description: Number of records to skip for pagination + name: offset + in: query + - schema: + type: integer + minimum: 1 + maximum: 100 + description: Maximum number of records to return (max 100) + example: 50 + required: false + description: Maximum number of records to return (max 100) + name: limit + in: query + responses: + '200': + description: List of key assignments content: application/json: schema: - $ref: '#/components/schemas/BadRequestResponse' + $ref: '#/components/schemas/ListKeyAssignmentsResponse' + example: + data: + - id: 550e8400-e29b-41d4-a716-446655440000 + key_hash: c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 + guardrail_id: 550e8400-e29b-41d4-a716-446655440001 + key_name: Production Key + key_label: prod-key + assigned_by: user_abc123 + created_at: '2025-08-24T10:30:00Z' + total_count: 1 '401': - description: Unauthorized - Missing or invalid authentication + description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header '404': - description: Not Found - Guardrail does not exist + description: Not Found - Resource does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' - delete: - operationId: deleteGuardrail - x-speakeasy-name-override: delete + example: + error: + code: 500 + message: Internal Server Error + post: + operationId: bulkAssignKeysToGuardrail + x-speakeasy-name-override: bulkAssignKeys tags: - Guardrails - summary: Delete a guardrail - description: Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. + summary: Bulk assign keys to a guardrail + description: >- + Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. parameters: - schema: type: string format: uuid - description: The unique identifier of the guardrail to delete + description: The unique identifier of the guardrail example: 550e8400-e29b-41d4-a716-446655440000 required: true - description: The unique identifier of the guardrail to delete + description: The unique identifier of the guardrail name: id in: path + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BulkAssignKeysRequest' + example: + key_hashes: + - c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 + required: true responses: '200': - description: Guardrail deleted successfully + description: Assignment result content: application/json: schema: - type: object - properties: - deleted: - type: boolean - const: true - description: Confirmation that the guardrail was deleted - example: true - required: - - deleted - example: - deleted: true + $ref: '#/components/schemas/BulkAssignKeysResponse' + example: + assigned_count: 3 + '400': + description: Bad Request - Invalid request parameters or malformed input + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestResponse' + example: + error: + code: 400 + message: Invalid request parameters '401': - description: Unauthorized - Missing or invalid authentication + description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header '404': - description: Not Found - Guardrail does not exist + description: Not Found - Resource does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /guardrails/assignments/keys: + /guardrails/{id}/assignments/members: get: - operationId: listKeyAssignments - x-speakeasy-name-override: listKeyAssignments + operationId: listGuardrailMemberAssignments + x-speakeasy-name-override: listGuardrailMemberAssignments tags: - Guardrails - summary: List all key assignments + summary: List member assignments for a guardrail description: >- - List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. + x-speakeasy-pagination: + type: offsetLimit + inputs: + - name: offset + in: parameters + type: offset + - name: limit + in: parameters + type: limit + outputs: + results: $.data parameters: - schema: type: string + format: uuid + description: The unique identifier of the guardrail + example: 550e8400-e29b-41d4-a716-446655440000 + required: true + description: The unique identifier of the guardrail + name: id + in: path + - schema: + type: integer + minimum: 0 description: Number of records to skip for pagination - example: '0' + example: 0 required: false description: Number of records to skip for pagination name: offset in: query - schema: - type: string + type: integer + minimum: 1 + maximum: 100 description: Maximum number of records to return (max 100) - example: '50' + example: 50 required: false description: Maximum number of records to return (max 100) name: limit in: query responses: '200': - description: List of key assignments + description: List of member assignments content: application/json: schema: - type: object - properties: - data: - type: array - items: - type: object - properties: - id: - type: string - format: uuid - description: Unique identifier for the assignment - example: 550e8400-e29b-41d4-a716-446655440000 - key_hash: - type: string - description: Hash of the assigned API key - example: c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 - guardrail_id: - type: string - format: uuid - description: ID of the guardrail - example: 550e8400-e29b-41d4-a716-446655440001 - key_name: - type: string - description: Name of the API key - example: Production Key - key_label: - type: string - description: Label of the API key - example: prod-key - assigned_by: - type: string - nullable: true - description: User ID of who made the assignment - example: user_abc123 - created_at: - type: string - description: ISO 8601 timestamp of when the assignment was created - example: '2025-08-24T10:30:00Z' - required: - - id - - key_hash - - guardrail_id - - key_name - - key_label - - assigned_by - - created_at - description: List of key assignments - total_count: - type: number - description: Total number of key assignments for this guardrail - example: 25 - required: - - data - - total_count + $ref: '#/components/schemas/ListMemberAssignmentsResponse' + example: + data: + - id: 550e8400-e29b-41d4-a716-446655440000 + user_id: user_abc123 + organization_id: org_xyz789 + guardrail_id: 550e8400-e29b-41d4-a716-446655440001 + assigned_by: user_abc123 + created_at: '2025-08-24T10:30:00Z' + total_count: 1 + '401': + description: Unauthorized - Authentication required or invalid credentials + content: + application/json: + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header + '404': + description: Not Found - Resource does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found + '500': + description: Internal Server Error - Unexpected server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error + post: + operationId: bulkAssignMembersToGuardrail + x-speakeasy-name-override: bulkAssignMembers + tags: + - Guardrails + summary: Bulk assign members to a guardrail + description: >- + Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. + parameters: + - schema: + type: string + format: uuid + description: The unique identifier of the guardrail + example: 550e8400-e29b-41d4-a716-446655440000 + required: true + description: The unique identifier of the guardrail + name: id + in: path + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BulkAssignMembersRequest' + example: + member_user_ids: + - user_abc123 + - user_def456 + required: true + responses: + '200': + description: Assignment result + content: + application/json: + schema: + $ref: '#/components/schemas/BulkAssignMembersResponse' + example: + assigned_count: 2 + '400': + description: Bad Request - Invalid request parameters or malformed input + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestResponse' + example: + error: + code: 400 + message: Invalid request parameters '401': - description: Unauthorized - Missing or invalid authentication + description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header + '404': + description: Not Found - Resource does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /guardrails/assignments/members: - get: - operationId: listMemberAssignments - x-speakeasy-name-override: listMemberAssignments + /guardrails/{id}/assignments/keys/remove: + post: + operationId: bulkUnassignKeysFromGuardrail + x-speakeasy-name-override: bulkUnassignKeys tags: - Guardrails - summary: List all member assignments + summary: Bulk unassign keys from a guardrail description: >- - List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. parameters: - schema: type: string - description: Number of records to skip for pagination - example: '0' - required: false - description: Number of records to skip for pagination - name: offset - in: query - - schema: - type: string - description: Maximum number of records to return (max 100) - example: '50' - required: false - description: Maximum number of records to return (max 100) - name: limit - in: query + format: uuid + description: The unique identifier of the guardrail + example: 550e8400-e29b-41d4-a716-446655440000 + required: true + description: The unique identifier of the guardrail + name: id + in: path + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BulkUnassignKeysRequest' + example: + key_hashes: + - c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 + required: true responses: '200': - description: List of member assignments + description: Unassignment result content: application/json: schema: - type: object - properties: - data: - type: array - items: - type: object - properties: - id: - type: string - format: uuid - description: Unique identifier for the assignment - example: 550e8400-e29b-41d4-a716-446655440000 - user_id: - type: string - description: Clerk user ID of the assigned member - example: user_abc123 - organization_id: - type: string - description: Organization ID - example: org_xyz789 - guardrail_id: - type: string - format: uuid - description: ID of the guardrail - example: 550e8400-e29b-41d4-a716-446655440001 - assigned_by: - type: string - nullable: true - description: User ID of who made the assignment - example: user_abc123 - created_at: - type: string - description: ISO 8601 timestamp of when the assignment was created - example: '2025-08-24T10:30:00Z' - required: - - id - - user_id - - organization_id - - guardrail_id - - assigned_by - - created_at - description: List of member assignments - total_count: - type: number - description: Total number of member assignments - example: 10 - required: - - data - - total_count + $ref: '#/components/schemas/BulkUnassignKeysResponse' + example: + unassigned_count: 3 + '400': + description: Bad Request - Invalid request parameters or malformed input + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestResponse' + example: + error: + code: 400 + message: Invalid request parameters '401': - description: Unauthorized - Missing or invalid authentication + description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header + '404': + description: Not Found - Resource does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /guardrails/{id}/assignments/keys: - get: - operationId: listGuardrailKeyAssignments - x-speakeasy-name-override: listGuardrailKeyAssignments + /guardrails/{id}/assignments/members/remove: + post: + operationId: bulkUnassignMembersFromGuardrail + x-speakeasy-name-override: bulkUnassignMembers tags: - Guardrails - summary: List key assignments for a guardrail + summary: Bulk unassign members from a guardrail description: >- - List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. + Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. parameters: - schema: type: string @@ -18580,946 +16517,1269 @@ paths: description: The unique identifier of the guardrail name: id in: path - - schema: - type: string - description: Number of records to skip for pagination - example: '0' - required: false - description: Number of records to skip for pagination - name: offset - in: query - - schema: - type: string - description: Maximum number of records to return (max 100) - example: '50' - required: false - description: Maximum number of records to return (max 100) - name: limit - in: query + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BulkUnassignMembersRequest' + example: + member_user_ids: + - user_abc123 + - user_def456 + required: true responses: '200': - description: List of key assignments + description: Unassignment result + content: + application/json: + schema: + $ref: '#/components/schemas/BulkUnassignMembersResponse' + example: + unassigned_count: 2 + '400': + description: Bad Request - Invalid request parameters or malformed input + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestResponse' + example: + error: + code: 400 + message: Invalid request parameters + '401': + description: Unauthorized - Authentication required or invalid credentials + content: + application/json: + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header + '404': + description: Not Found - Resource does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found + '500': + description: Internal Server Error - Unexpected server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /key: + get: + operationId: getCurrentKey + x-speakeasy-name-override: getCurrentKeyMetadata + tags: + - API Keys + summary: Get current API key + description: Get information on the API key associated with the current authentication session + responses: + '200': + description: API key details content: application/json: schema: type: object properties: data: - type: array - items: - type: object - properties: - id: - type: string - format: uuid - description: Unique identifier for the assignment - example: 550e8400-e29b-41d4-a716-446655440000 - key_hash: - type: string - description: Hash of the assigned API key - example: c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 - guardrail_id: - type: string - format: uuid - description: ID of the guardrail - example: 550e8400-e29b-41d4-a716-446655440001 - key_name: - type: string - description: Name of the API key - example: Production Key - key_label: - type: string - description: Label of the API key - example: prod-key - assigned_by: - type: string - nullable: true - description: User ID of who made the assignment - example: user_abc123 - created_at: - type: string - description: ISO 8601 timestamp of when the assignment was created - example: '2025-08-24T10:30:00Z' - required: - - id - - key_hash - - guardrail_id - - key_name - - key_label - - assigned_by - - created_at - description: List of key assignments - total_count: - type: number - description: Total number of key assignments for this guardrail - example: 25 + type: object + properties: + label: + type: string + description: Human-readable label for the API key + example: sk-or-v1-0e6...1c96 + limit: + type: number + format: double + description: Spending limit for the API key in USD + example: 100 + usage: + type: number + format: double + description: Total OpenRouter credit usage (in USD) for the API key + example: 25.5 + usage_daily: + type: number + format: double + description: OpenRouter credit usage (in USD) for the current UTC day + example: 25.5 + usage_weekly: + type: number + format: double + description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) + example: 25.5 + usage_monthly: + type: number + format: double + description: OpenRouter credit usage (in USD) for the current UTC month + example: 25.5 + byok_usage: + type: number + format: double + description: Total external BYOK usage (in USD) for the API key + example: 17.38 + byok_usage_daily: + type: number + format: double + description: External BYOK usage (in USD) for the current UTC day + example: 17.38 + byok_usage_weekly: + type: number + format: double + description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday) + example: 17.38 + byok_usage_monthly: + type: number + format: double + description: External BYOK usage (in USD) for current UTC month + example: 17.38 + is_free_tier: + type: boolean + description: Whether this is a free tier API key + example: false + is_management_key: + type: boolean + description: Whether this is a management key + example: false + is_provisioning_key: + type: boolean + description: Whether this is a management key + deprecated: true + example: false + limit_remaining: + type: number + format: double + description: Remaining spending limit in USD + example: 74.5 + limit_reset: + type: string + nullable: true + description: Type of limit reset for the API key + example: monthly + include_byok_in_limit: + type: boolean + description: Whether to include external BYOK usage in the credit limit + example: false + expires_at: + type: string + nullable: true + format: date-time + description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration + example: '2027-12-31T23:59:59Z' + creator_user_id: + type: string + nullable: true + description: >- + The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. + example: user_2dHFtVWx2n56w6HkM0000000000 + rate_limit: + type: object + properties: + requests: + type: integer + description: Number of requests allowed per interval + example: 1000 + interval: + type: string + description: Rate limit interval + example: 1h + note: + type: string + description: Note about the rate limit + example: This field is deprecated and safe to ignore. + required: + - requests + - interval + - note + description: Legacy rate limit information about a key. Will always return -1. + deprecated: true + example: + requests: 1000 + interval: 1h + note: This field is deprecated and safe to ignore. + required: + - label + - limit + - usage + - usage_daily + - usage_weekly + - usage_monthly + - byok_usage + - byok_usage_daily + - byok_usage_weekly + - byok_usage_monthly + - is_free_tier + - is_management_key + - is_provisioning_key + - limit_remaining + - limit_reset + - include_byok_in_limit + - creator_user_id + - rate_limit + description: Current API key information + example: + label: sk-or-v1-au7...890 + limit: 100 + usage: 25.5 + usage_daily: 25.5 + usage_weekly: 25.5 + usage_monthly: 25.5 + byok_usage: 17.38 + byok_usage_daily: 17.38 + byok_usage_weekly: 17.38 + byok_usage_monthly: 17.38 + is_free_tier: false + is_management_key: false + is_provisioning_key: false + limit_remaining: 74.5 + limit_reset: monthly + include_byok_in_limit: false + expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 + rate_limit: + requests: 1000 + interval: 1h + note: This field is deprecated and safe to ignore. required: - data - - total_count - '401': - description: Unauthorized - Missing or invalid authentication - content: - application/json: - schema: - $ref: '#/components/schemas/UnauthorizedResponse' - '404': - description: Guardrail not found - content: - application/json: - schema: - $ref: '#/components/schemas/NotFoundResponse' - '500': - description: Internal Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerResponse' - post: - operationId: bulkAssignKeysToGuardrail - x-speakeasy-name-override: bulkAssignKeys - tags: - - Guardrails - summary: Bulk assign keys to a guardrail - description: >- - Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. - parameters: - - schema: - type: string - format: uuid - description: The unique identifier of the guardrail - example: 550e8400-e29b-41d4-a716-446655440000 - required: true - description: The unique identifier of the guardrail - name: id - in: path - requestBody: - content: - application/json: - schema: - type: object - properties: - key_hashes: - type: array - items: - type: string - minLength: 1 - minItems: 1 - description: Array of API key hashes to assign to the guardrail - example: - - c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 - required: - - key_hashes - required: true - responses: - '200': - description: Assignment result - content: - application/json: - schema: - type: object - properties: - assigned_count: - type: number - description: Number of keys successfully assigned - example: 3 - required: - - assigned_count - '400': - description: Bad Request - Invalid input - content: - application/json: - schema: - $ref: '#/components/schemas/BadRequestResponse' + example: + data: + label: sk-or-v1-au7...890 + limit: 100 + usage: 25.5 + usage_daily: 25.5 + usage_weekly: 25.5 + usage_monthly: 25.5 + byok_usage: 17.38 + byok_usage_daily: 17.38 + byok_usage_weekly: 17.38 + byok_usage_monthly: 17.38 + is_free_tier: false + is_management_key: false + is_provisioning_key: false + limit_remaining: 74.5 + limit_reset: monthly + include_byok_in_limit: false + expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 + rate_limit: + requests: 1000 + interval: 1h + note: This field is deprecated and safe to ignore. + example: + data: + label: sk-or-v1-au7...890 + limit: 100 + usage: 25.5 + usage_daily: 25.5 + usage_weekly: 25.5 + usage_monthly: 25.5 + byok_usage: 17.38 + byok_usage_daily: 17.38 + byok_usage_weekly: 17.38 + byok_usage_monthly: 17.38 + is_free_tier: false + is_management_key: false + is_provisioning_key: false + limit_remaining: 74.5 + limit_reset: monthly + include_byok_in_limit: false + expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 + rate_limit: + requests: 1000 + interval: 1h + note: This field is deprecated and safe to ignore. '401': - description: Unauthorized - Missing or invalid authentication + description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' - '404': - description: Guardrail not found - content: - application/json: - schema: - $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 401 + message: Missing Authentication header '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /guardrails/{id}/assignments/members: - get: - operationId: listGuardrailMemberAssignments - x-speakeasy-name-override: listGuardrailMemberAssignments - tags: - - Guardrails - summary: List member assignments for a guardrail - description: >- - List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. - parameters: - - schema: - type: string - format: uuid - description: The unique identifier of the guardrail - example: 550e8400-e29b-41d4-a716-446655440000 - required: true - description: The unique identifier of the guardrail - name: id - in: path - - schema: - type: string - description: Number of records to skip for pagination - example: '0' - required: false - description: Number of records to skip for pagination - name: offset - in: query - - schema: - type: string - description: Maximum number of records to return (max 100) - example: '50' - required: false - description: Maximum number of records to return (max 100) - name: limit - in: query - responses: - '200': - description: List of member assignments - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - type: object - properties: - id: - type: string - format: uuid - description: Unique identifier for the assignment - example: 550e8400-e29b-41d4-a716-446655440000 - user_id: - type: string - description: Clerk user ID of the assigned member - example: user_abc123 - organization_id: - type: string - description: Organization ID - example: org_xyz789 - guardrail_id: - type: string - format: uuid - description: ID of the guardrail - example: 550e8400-e29b-41d4-a716-446655440001 - assigned_by: - type: string - nullable: true - description: User ID of who made the assignment - example: user_abc123 - created_at: - type: string - description: ISO 8601 timestamp of when the assignment was created - example: '2025-08-24T10:30:00Z' - required: - - id - - user_id - - organization_id - - guardrail_id - - assigned_by - - created_at - description: List of member assignments - total_count: - type: number - description: Total number of member assignments - example: 10 - required: - - data - - total_count - '401': - description: Unauthorized - Missing or invalid authentication - content: - application/json: - schema: - $ref: '#/components/schemas/UnauthorizedResponse' - '404': - description: Guardrail not found - content: - application/json: - schema: - $ref: '#/components/schemas/NotFoundResponse' - '500': - description: Internal Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerResponse' + /auth/keys: post: - operationId: bulkAssignMembersToGuardrail - x-speakeasy-name-override: bulkAssignMembers + operationId: exchangeAuthCodeForAPIKey tags: - - Guardrails - summary: Bulk assign members to a guardrail - description: >- - Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. - parameters: - - schema: - type: string - format: uuid - description: The unique identifier of the guardrail - example: 550e8400-e29b-41d4-a716-446655440000 - required: true - description: The unique identifier of the guardrail - name: id - in: path + - OAuth + summary: Exchange authorization code for API key + description: Exchange an authorization code from the PKCE flow for a user-controlled API key requestBody: content: application/json: schema: type: object properties: - member_user_ids: - type: array - items: - type: string - minLength: 1 - minItems: 1 - description: Array of member user IDs to assign to the guardrail - example: - - user_abc123 - - user_def456 + code: + type: string + description: The authorization code received from the OAuth redirect + example: auth_code_abc123def456 + code_verifier: + type: string + description: The code verifier if code_challenge was used in the authorization request + example: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk + code_challenge_method: + type: string + nullable: true + enum: + - S256 + - plain + - null + description: The method used to generate the code challenge + example: S256 + x-speakeasy-unknown-values: allow required: - - member_user_ids + - code + example: + code: auth_code_abc123def456 + code_verifier: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk + code_challenge_method: S256 + example: + code: auth_code_abc123def456 + code_verifier: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk + code_challenge_method: S256 required: true responses: '200': - description: Assignment result + description: Successfully exchanged code for an API key content: application/json: schema: type: object properties: - assigned_count: - type: number - description: Number of members successfully assigned - example: 2 + key: + type: string + description: The API key to use for OpenRouter requests + example: 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 + user_id: + type: string + nullable: true + description: User ID associated with the API key + example: user_2yOPcMpKoQhcd4bVgSMlELRaIah required: - - assigned_count + - key + - user_id + example: + key: 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 + user_id: user_2yOPcMpKoQhcd4bVgSMlELRaIah + example: + key: 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 + user_id: user_2yOPcMpKoQhcd4bVgSMlELRaIah '400': - description: Bad Request - Invalid input + description: Bad Request - Invalid request parameters or malformed input content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' - '401': - description: Unauthorized - Missing or invalid authentication - content: - application/json: - schema: - $ref: '#/components/schemas/UnauthorizedResponse' - '404': - description: Guardrail not found + example: + error: + code: 400 + message: Invalid request parameters + '403': + description: Forbidden - Authentication successful but insufficient permissions content: application/json: schema: - $ref: '#/components/schemas/NotFoundResponse' + $ref: '#/components/schemas/ForbiddenResponse' + example: + error: + code: 403 + message: Only management keys can perform this operation '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /guardrails/{id}/assignments/keys/remove: + /auth/keys/code: post: - operationId: bulkUnassignKeysFromGuardrail - x-speakeasy-name-override: bulkUnassignKeys + x-speakeasy-name-override: createAuthCode tags: - - Guardrails - summary: Bulk unassign keys from a guardrail - description: >- - Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. - parameters: - - schema: - type: string - format: uuid - description: The unique identifier of the guardrail - example: 550e8400-e29b-41d4-a716-446655440000 - required: true - description: The unique identifier of the guardrail - name: id - in: path + - OAuth + summary: Create authorization code + description: Create an authorization code for the PKCE flow to generate a user-controlled API key requestBody: content: application/json: schema: type: object properties: - key_hashes: - type: array - items: - type: string - minLength: 1 - minItems: 1 - description: Array of API key hashes to unassign from the guardrail - example: - - c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 + callback_url: + type: string + format: uri + description: >- + The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed. + example: https://myapp.com/auth/callback + code_challenge: + type: string + description: PKCE code challenge for enhanced security + example: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM + code_challenge_method: + type: string + enum: + - S256 + - plain + description: The method used to generate the code challenge + example: S256 + x-speakeasy-unknown-values: allow + limit: + type: number + format: double + description: Credit limit for the API key to be created + example: 100 + expires_at: + type: string + nullable: true + format: date-time + description: Optional expiration time for the API key to be created + example: '2027-12-31T23:59:59Z' + key_label: + type: string + maxLength: 100 + description: Optional custom label for the API key. Defaults to the app name if not provided. + example: My Custom Key + usage_limit_type: + type: string + enum: + - daily + - weekly + - monthly + description: Optional credit limit reset interval. When set, the credit limit resets on this interval. + example: monthly + x-speakeasy-unknown-values: allow + spawn_agent: + type: string + description: Agent identifier for spawn telemetry + example: my-agent + x-speakeasy-ignore: true + x-fern-ignore: true + spawn_cloud: + type: string + description: Cloud identifier for spawn telemetry + example: aws-us-east-1 + x-speakeasy-ignore: true + x-fern-ignore: true required: - - key_hashes + - callback_url + example: + callback_url: https://myapp.com/auth/callback + code_challenge: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM + code_challenge_method: S256 + limit: 100 + example: + callback_url: https://myapp.com/auth/callback + code_challenge: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM + code_challenge_method: S256 + limit: 100 required: true responses: '200': - description: Unassignment result + description: Successfully created authorization code content: application/json: schema: type: object properties: - unassigned_count: - type: number - description: Number of keys successfully unassigned - example: 3 + data: + type: object + properties: + id: + type: string + description: The authorization code ID to use in the exchange request + example: auth_code_xyz789 + app_id: + type: integer + description: The application ID associated with this auth code + example: 12345 + created_at: + type: string + description: ISO 8601 timestamp of when the auth code was created + example: '2025-08-24T10:30:00Z' + required: + - id + - app_id + - created_at + description: Auth code data + example: + id: auth_code_xyz789 + app_id: 12345 + created_at: '2025-08-24T10:30:00Z' required: - - unassigned_count + - data + example: + data: + id: auth_code_xyz789 + app_id: 12345 + created_at: '2025-08-24T10:30:00Z' + example: + data: + id: auth_code_xyz789 + app_id: 12345 + created_at: '2025-08-24T10:30:00Z' '400': - description: Bad Request - Invalid input + description: Bad Request - Invalid request parameters or malformed input content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' + example: + error: + code: 400 + message: Invalid request parameters '401': - description: Unauthorized - Missing or invalid authentication + description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' - '404': - description: Guardrail not found + example: + error: + code: 401 + message: Missing Authentication header + '409': + description: Conflict - Resource conflict or concurrent modification content: application/json: schema: - $ref: '#/components/schemas/NotFoundResponse' + $ref: '#/components/schemas/ConflictResponse' + example: + error: + code: 409 + message: Resource conflict. Please try again later. '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error + operationId: createAuthKeysCode parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /guardrails/{id}/assignments/members/remove: + /embeddings: post: - operationId: bulkUnassignMembersFromGuardrail - x-speakeasy-name-override: bulkUnassignMembers + x-speakeasy-name-override: generate tags: - - Guardrails - summary: Bulk unassign members from a guardrail - description: >- - Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. - parameters: - - schema: - type: string - format: uuid - description: The unique identifier of the guardrail - example: 550e8400-e29b-41d4-a716-446655440000 - required: true - description: The unique identifier of the guardrail - name: id - in: path + - Embeddings + summary: Submit an embedding request + description: Submits an embedding request to the embeddings router requestBody: content: application/json: schema: type: object properties: - member_user_ids: - type: array - items: - type: string - minLength: 1 - minItems: 1 - description: Array of member user IDs to unassign from the guardrail - example: - - user_abc123 - - user_def456 + input: + anyOf: + - type: string + - type: array + items: + type: string + - type: array + items: + type: number + - type: array + items: + type: array + items: + type: number + - type: array + items: + type: object + properties: + content: + type: array + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - text + text: + type: string + required: + - type + - text + - type: object + properties: + type: + type: string + enum: + - image_url + image_url: + type: object + properties: + url: + type: string + required: + - url + required: + - type + - image_url + required: + - content + description: Text, token, or multimodal input(s) to embed + example: The quick brown fox jumps over the lazy dog + model: + type: string + description: The model to use for embeddings + example: openai/text-embedding-3-small + encoding_format: + type: string + enum: + - float + - base64 + description: The format of the output embeddings + example: float + x-speakeasy-unknown-values: allow + dimensions: + type: integer + minimum: 0 + exclusiveMinimum: 0 + description: The number of dimensions for the output embeddings + example: 1536 + user: + type: string + description: A unique identifier for the end-user + example: user-1234 + provider: + allOf: + - $ref: '#/components/schemas/ProviderPreferences' + - description: Provider routing preferences for the request. + input_type: + type: string + description: The type of input (e.g. search_query, search_document) + example: search_query required: - - member_user_ids + - input + - model + description: Embeddings request input + example: + model: openai/text-embedding-3-small + input: The quick brown fox jumps over the lazy dog + dimensions: 1536 + example: + model: openai/text-embedding-3-small + input: The quick brown fox jumps over the lazy dog required: true responses: '200': - description: Unassignment result + description: Embedding response content: application/json: schema: type: object properties: - unassigned_count: - type: number - description: Number of members successfully unassigned - example: 2 + id: + type: string + description: Unique identifier for the embeddings response + example: embd-1234567890 + object: + type: string + enum: + - list + data: + type: array + items: + type: object + properties: + object: + type: string + enum: + - embedding + embedding: + anyOf: + - type: array + items: + type: number + - type: string + description: Embedding vector as an array of floats or a base64 string + example: + - 0.0023064255 + - -0.009327292 + - 0.015797347 + index: + type: integer + description: Index of the embedding in the input list + example: 0 + required: + - object + - embedding + description: A single embedding object + example: + object: embedding + embedding: + - 0.0023064255 + - -0.009327292 + - 0.015797347 + index: 0 + description: List of embedding objects + example: + - object: embedding + embedding: + - 0.0023064255 + - -0.009327292 + - 0.015797347 + index: 0 + model: + type: string + description: The model used for embeddings + example: openai/text-embedding-3-small + usage: + type: object + properties: + prompt_tokens: + type: integer + description: Number of tokens in the input + example: 8 + total_tokens: + type: integer + description: Total number of tokens used + example: 8 + cost: + type: number + format: double + description: Cost of the request in credits + example: 0.0001 + required: + - prompt_tokens + - total_tokens + description: Token usage statistics + example: + prompt_tokens: 8 + total_tokens: 8 required: - - unassigned_count + - object + - data + - model + description: Embeddings response containing embedding vectors + example: + object: list + data: + - object: embedding + embedding: + - 0.0023064255 + - -0.009327292 + - 0.015797347 + index: 0 + model: openai/text-embedding-3-small + usage: + prompt_tokens: 8 + total_tokens: 8 + example: + object: list + data: + - object: embedding + embedding: + - 0.0023064255 + - -0.009327292 + - 0.015797347 + index: 0 + model: openai/text-embedding-3-small + usage: + prompt_tokens: 8 + total_tokens: 8 + text/event-stream: + schema: + type: string + description: Not used for embeddings - embeddings do not support streaming + example: 'data: [DONE]' + x-speakeasy-sse-sentinel: '[DONE]' '400': - description: Bad Request - Invalid input + description: Bad Request - Invalid request parameters or malformed input content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' + example: + error: + code: 400 + message: Invalid request parameters '401': - description: Unauthorized - Missing or invalid authentication + description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + example: + error: + code: 401 + message: Missing Authentication header + '402': + description: Payment Required - Insufficient credits or quota to complete request + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequiredResponse' + example: + error: + code: 402 + message: Insufficient credits. Add more using https://openrouter.ai/credits '404': - description: Guardrail not found + description: Not Found - Resource does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found + '429': + description: Too Many Requests - Rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + example: + error: + code: 429 + message: Rate limit exceeded '500': - description: Internal Server Error + description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' - parameters: - - $ref: "#/components/parameters/AppIdentifier" - - $ref: "#/components/parameters/AppDisplayName" - - $ref: "#/components/parameters/AppCategories" - /key: - get: - operationId: getCurrentKey - x-speakeasy-name-override: getCurrentKeyMetadata - tags: - - API Keys - summary: Get current API key - description: Get information on the API key associated with the current authentication session - responses: - '200': - description: API key details + example: + error: + code: 500 + message: Internal Server Error + '502': + description: Bad Gateway - Provider/upstream API failure content: application/json: schema: - type: object - properties: - data: - type: object - properties: - label: - type: string - description: Human-readable label for the API key - example: sk-or-v1-0e6...1c96 - limit: - type: number - nullable: true - description: Spending limit for the API key in USD - example: 100 - usage: - type: number - description: Total OpenRouter credit usage (in USD) for the API key - example: 25.5 - usage_daily: - type: number - description: OpenRouter credit usage (in USD) for the current UTC day - example: 25.5 - usage_weekly: - type: number - description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) - example: 25.5 - usage_monthly: - type: number - description: OpenRouter credit usage (in USD) for the current UTC month - example: 25.5 - byok_usage: - type: number - description: Total external BYOK usage (in USD) for the API key - example: 17.38 - byok_usage_daily: - type: number - description: External BYOK usage (in USD) for the current UTC day - example: 17.38 - byok_usage_weekly: - type: number - description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday) - example: 17.38 - byok_usage_monthly: - type: number - description: External BYOK usage (in USD) for current UTC month - example: 17.38 - is_free_tier: - type: boolean - description: Whether this is a free tier API key - example: false - is_management_key: - type: boolean - description: Whether this is a management key - example: false - is_provisioning_key: - type: boolean - description: Whether this is a management key - deprecated: true - example: false - limit_remaining: - type: number - nullable: true - description: Remaining spending limit in USD - example: 74.5 - limit_reset: - type: string - nullable: true - description: Type of limit reset for the API key - example: monthly - include_byok_in_limit: - type: boolean - description: Whether to include external BYOK usage in the credit limit - example: false - expires_at: - type: string - nullable: true - format: date-time - description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration - example: '2027-12-31T23:59:59Z' - creator_user_id: - type: string - nullable: true - description: >- - The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. - example: user_2dHFtVWx2n56w6HkM0000000000 - rate_limit: - type: object - properties: - requests: - type: number - description: Number of requests allowed per interval - example: 1000 - interval: - type: string - description: Rate limit interval - example: 1h - note: - type: string - description: Note about the rate limit - example: This field is deprecated and safe to ignore. - required: - - requests - - interval - - note - description: Legacy rate limit information about a key. Will always return -1. - deprecated: true - example: - requests: 1000 - interval: 1h - note: This field is deprecated and safe to ignore. - required: - - label - - limit - - usage - - usage_daily - - usage_weekly - - usage_monthly - - byok_usage - - byok_usage_daily - - byok_usage_weekly - - byok_usage_monthly - - is_free_tier - - is_management_key - - is_provisioning_key - - limit_remaining - - limit_reset - - include_byok_in_limit - - creator_user_id - - rate_limit - description: Current API key information - example: - label: sk-or-v1-au7...890 - limit: 100 - usage: 25.5 - usage_daily: 25.5 - usage_weekly: 25.5 - usage_monthly: 25.5 - byok_usage: 17.38 - byok_usage_daily: 17.38 - byok_usage_weekly: 17.38 - byok_usage_monthly: 17.38 - is_free_tier: false - is_management_key: false - is_provisioning_key: false - limit_remaining: 74.5 - limit_reset: monthly - include_byok_in_limit: false - expires_at: '2027-12-31T23:59:59Z' - creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 - rate_limit: - requests: 1000 - interval: 1h - note: This field is deprecated and safe to ignore. - required: - - data - example: - data: - label: sk-or-v1-au7...890 - limit: 100 - usage: 25.5 - usage_daily: 25.5 - usage_weekly: 25.5 - usage_monthly: 25.5 - byok_usage: 17.38 - byok_usage_daily: 17.38 - byok_usage_weekly: 17.38 - byok_usage_monthly: 17.38 - is_free_tier: false - is_management_key: false - is_provisioning_key: false - limit_remaining: 74.5 - limit_reset: monthly - include_byok_in_limit: false - expires_at: '2027-12-31T23:59:59Z' - creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 - rate_limit: - requests: 1000 - interval: 1h - note: This field is deprecated and safe to ignore. - '401': - description: Unauthorized - Authentication required or invalid credentials + $ref: '#/components/schemas/BadGatewayResponse' + example: + error: + code: 502 + message: Provider returned error + '503': + description: Service Unavailable - Service temporarily unavailable content: application/json: schema: - $ref: '#/components/schemas/UnauthorizedResponse' - '500': - description: Internal Server Error - Unexpected server error + $ref: '#/components/schemas/ServiceUnavailableResponse' + example: + error: + code: 503 + message: Service temporarily unavailable + '524': + description: Infrastructure Timeout - Provider request timed out at edge network + content: + application/json: + schema: + $ref: '#/components/schemas/EdgeNetworkTimeoutResponse' + example: + error: + code: 524 + message: Request timed out. Please try again later. + '529': + description: Provider Overloaded - Provider is temporarily overloaded content: application/json: schema: - $ref: '#/components/schemas/InternalServerResponse' + $ref: '#/components/schemas/ProviderOverloadedResponse' + example: + error: + code: 529 + message: Provider returned error + operationId: createEmbeddings parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /auth/keys: - post: - operationId: exchangeAuthCodeForAPIKey + /embeddings/models: + get: tags: - - OAuth - summary: Exchange authorization code for API key - description: Exchange an authorization code from the PKCE flow for a user-controlled API key - requestBody: - content: - application/json: - schema: - type: object - properties: - code: - type: string - description: The authorization code received from the OAuth redirect - example: auth_code_abc123def456 - code_verifier: - type: string - description: The code verifier if code_challenge was used in the authorization request - example: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk - code_challenge_method: - type: string - nullable: true - enum: - - S256 - - plain - description: The method used to generate the code challenge - example: S256 - x-speakeasy-unknown-values: allow - required: - - code - example: - code: auth_code_abc123def456 - code_verifier: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk - code_challenge_method: S256 - required: true + - Embeddings + x-speakeasy-name-override: listModels + summary: List all embeddings models + description: Returns a list of all available embeddings models and their properties responses: '200': - description: Successfully exchanged code for an API key + description: Returns a list of embeddings models content: application/json: schema: - type: object - properties: - key: - type: string - description: The API key to use for OpenRouter requests - example: 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 - user_id: - type: string - nullable: true - description: User ID associated with the API key - example: user_2yOPcMpKoQhcd4bVgSMlELRaIah - required: - - key - - user_id - example: - key: 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 - user_id: user_2yOPcMpKoQhcd4bVgSMlELRaIah + $ref: '#/components/schemas/ModelsListResponse' + example: + data: + - id: openai/text-embedding-3-small + canonical_slug: openai/text-embedding-3-small + name: Text Embedding 3 Small + created: 1692901234 + description: OpenAI text embedding model optimized for performance. + pricing: + prompt: '0.00000002' + completion: '0' + request: '0' + image: '0' + context_length: 8192 + architecture: + tokenizer: GPT + instruct_type: null + modality: text->text + input_modalities: + - text + output_modalities: + - embeddings + top_provider: + context_length: 8192 + max_completion_tokens: null + is_moderated: false + per_request_limits: null + supported_parameters: [] + default_parameters: null + knowledge_cutoff: null + expiration_date: null + links: + details: /api/v1/models/openai/text-embedding-3-small/endpoints '400': description: Bad Request - Invalid request parameters or malformed input content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' - '403': - description: Forbidden - Authentication successful but insufficient permissions - content: - application/json: - schema: - $ref: '#/components/schemas/ForbiddenResponse' + example: + error: + code: 400 + message: Invalid request parameters '500': description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + example: + error: + code: 500 + message: Internal Server Error + operationId: listEmbeddingsModels parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /auth/keys/code: + /rerank: post: - x-speakeasy-name-override: createAuthCode + x-speakeasy-name-override: rerank tags: - - OAuth - summary: Create authorization code - description: Create an authorization code for the PKCE flow to generate a user-controlled API key + - Rerank + summary: Submit a rerank request + description: Submits a rerank request to the rerank router requestBody: content: application/json: schema: type: object properties: - callback_url: - type: string - format: uri - description: >- - The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed. - example: https://myapp.com/auth/callback - code_challenge: - type: string - description: PKCE code challenge for enhanced security - example: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM - code_challenge_method: - type: string - enum: - - S256 - - plain - description: The method used to generate the code challenge - example: S256 - x-speakeasy-unknown-values: allow - limit: - type: number - description: Credit limit for the API key to be created - example: 100 - expires_at: - type: string - nullable: true - format: date-time - description: Optional expiration time for the API key to be created - key_label: - type: string - maxLength: 100 - description: Optional custom label for the API key. Defaults to the app name if not provided. - example: My Custom Key - usage_limit_type: - type: string - enum: - - daily - - weekly - - monthly - description: Optional credit limit reset interval. When set, the credit limit resets on this interval. - example: monthly - x-speakeasy-unknown-values: allow - spawn_agent: + model: type: string - description: Agent identifier for spawn telemetry - x-speakeasy-ignore: true - x-fern-ignore: true - spawn_cloud: + description: The rerank model to use + example: cohere/rerank-v3.5 + query: type: string - description: Cloud identifier for spawn telemetry - x-speakeasy-ignore: true - x-fern-ignore: true + description: The search query to rerank documents against + example: What is the capital of France? + documents: + type: array + items: + type: string + description: The list of documents to rerank + example: + - Paris is the capital of France. + - Berlin is the capital of Germany. + top_n: + type: integer + minimum: 0 + exclusiveMinimum: 0 + description: Number of most relevant documents to return + example: 3 + provider: + allOf: + - $ref: '#/components/schemas/ProviderPreferences' + - description: Provider routing preferences for the request. required: - - callback_url + - model + - query + - documents + description: Rerank request input example: - callback_url: https://myapp.com/auth/callback - code_challenge: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM - code_challenge_method: S256 - limit: 100 + model: cohere/rerank-v3.5 + query: What is the capital of France? + documents: + - Paris is the capital of France. + - Berlin is the capital of Germany. + top_n: 3 + example: + model: cohere/rerank-v3.5 + query: What is the capital of France? + documents: + - Paris is the capital of France. + - Berlin is the capital of Germany. + - Madrid is the capital of Spain. required: true responses: '200': - description: Successfully created authorization code + description: Rerank response content: application/json: schema: type: object properties: - data: + id: + type: string + description: Unique identifier for the rerank response (ORID format) + example: gen-rerank-1234567890-abc + model: + type: string + description: The model used for reranking + example: cohere/rerank-v3.5 + provider: + type: string + description: The provider that served the rerank request + example: Cohere + results: + type: array + items: + type: object + properties: + index: + type: integer + description: Index of the document in the original input list + example: 0 + relevance_score: + type: number + format: double + description: Relevance score of the document to the query + example: 0.98 + document: + type: object + properties: + text: + type: string + description: The document text + example: Paris is the capital of France. + required: + - text + description: The document object containing the original text + required: + - index + - relevance_score + - document + description: A single rerank result + example: + index: 0 + relevance_score: 0.98 + document: + text: Paris is the capital of France. + description: List of rerank results sorted by relevance + example: + - index: 0 + relevance_score: 0.98 + document: + text: Paris is the capital of France. + usage: type: object properties: - id: - type: string - description: The authorization code ID to use in the exchange request - example: auth_code_xyz789 - app_id: + total_tokens: + type: integer + description: Total number of tokens used + example: 150 + search_units: + type: integer + description: Number of search units consumed (Cohere billing) + example: 1 + cost: type: number - description: The application ID associated with this auth code - example: 12345 - created_at: - type: string - description: ISO 8601 timestamp of when the auth code was created - example: '2025-08-24T10:30:00Z' - required: - - id - - app_id - - created_at - description: Auth code data + format: double + description: Cost of the request in credits + example: 0.001 + description: Usage statistics example: - id: auth_code_xyz789 - app_id: 12345 - created_at: '2025-08-24T10:30:00Z' + total_tokens: 150 + search_units: 1 required: - - data + - model + - results + description: Rerank response containing ranked results + example: + id: gen-rerank-1234567890-abc + model: cohere/rerank-v3.5 + results: + - index: 0 + relevance_score: 0.98 + document: + text: Paris is the capital of France. + usage: + total_tokens: 150 + search_units: 1 + example: + id: gen-rerank-1234567890-abc + model: cohere/rerank-v3.5 + results: + - index: 0 + relevance_score: 0.98 + document: + text: Paris is the capital of France. + usage: + total_tokens: 150 + search_units: 1 + text/event-stream: + schema: + type: string + description: Not used for rerank - rerank does not support streaming + example: 'data: [DONE]' + x-speakeasy-sse-sentinel: '[DONE]' '400': description: Bad Request - Invalid request parameters or malformed input content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' + example: + error: + code: 400 + message: Invalid request parameters '401': description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' - '409': - description: Conflict - App upsert conflict during auth code creation + example: + error: + code: 401 + message: Missing Authentication header + '402': + description: Payment Required - Insufficient credits or quota to complete request content: application/json: schema: - $ref: '#/components/schemas/ConflictResponse' + $ref: '#/components/schemas/PaymentRequiredResponse' + example: + error: + code: 402 + message: Insufficient credits. Add more using https://openrouter.ai/credits + '404': + description: Not Found - Resource does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundResponse' + example: + error: + code: 404 + message: Resource not found + '429': + description: Too Many Requests - Rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + example: + error: + code: 429 + message: Rate limit exceeded '500': description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' - operationId: createAuthKeysCode + example: + error: + code: 500 + message: Internal Server Error + '502': + description: Bad Gateway - Provider/upstream API failure + content: + application/json: + schema: + $ref: '#/components/schemas/BadGatewayResponse' + example: + error: + code: 502 + message: Provider returned error + '503': + description: Service Unavailable - Service temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceUnavailableResponse' + example: + error: + code: 503 + message: Service temporarily unavailable + '524': + description: Infrastructure Timeout - Provider request timed out at edge network + content: + application/json: + schema: + $ref: '#/components/schemas/EdgeNetworkTimeoutResponse' + example: + error: + code: 524 + message: Request timed out. Please try again later. + '529': + description: Provider Overloaded - Provider is temporarily overloaded + content: + application/json: + schema: + $ref: '#/components/schemas/ProviderOverloadedResponse' + example: + error: + code: 529 + message: Provider returned error + operationId: createRerank parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" @@ -19547,8 +17807,12 @@ tags: description: Model information endpoints - name: OAuth description: OAuth authentication endpoints + - name: Organization + description: Organization endpoints - name: Providers description: Provider information endpoints + - name: Rerank + description: Reranking endpoints - name: beta.responses description: beta.responses endpoints x-fern-base-path: / @@ -19557,6 +17821,16 @@ x-retry-strategy: initialDelay: 500 maxDelay: 60000 maxAttempts: 3 +x-speakeasy-retries: + strategy: backoff + backoff: + initialInterval: 500 + maxInterval: 60000 + maxElapsedTime: 3600000 + exponent: 1.5 + statusCodes: + - 5XX + retryConnectionErrors: true x-speakeasy-globals: parameters: - $ref: "#/components/parameters/AppIdentifier" diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c6780f09..0d56bc19 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.761.0 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:87266665422e9d6e5e28cda694187c2ce383c3a43c4f808668a7b17b4e129a22 - sourceBlobDigest: sha256:79bd9c141c4e9a9838681324981fdfe076c21753cedee1f948707687ae45f1bd + sourceRevisionDigest: sha256:65b8051652f92dcbb5bc7bf899f010b6941cdbdcd63542da008baf32318d0f27 + sourceBlobDigest: sha256:e58665d6dcc59b686b3ffa2943b6cfcd1bbd7ca250aaaeeb97a86d0bfa099e76 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:87266665422e9d6e5e28cda694187c2ce383c3a43c4f808668a7b17b4e129a22 - sourceBlobDigest: sha256:79bd9c141c4e9a9838681324981fdfe076c21753cedee1f948707687ae45f1bd + sourceRevisionDigest: sha256:65b8051652f92dcbb5bc7bf899f010b6941cdbdcd63542da008baf32318d0f27 + sourceBlobDigest: sha256:e58665d6dcc59b686b3ffa2943b6cfcd1bbd7ca250aaaeeb97a86d0bfa099e76 codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:9a832d36ae2ccf77b0f32fc8f6b84e621e9664d18dbedcfb148b061ceafd38f9 + codeSamplesRevisionDigest: sha256:aeb93620a6a1ffb8bd66def9518d3a2d732c0a6eed50e01eda7339c9d9375824 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.761.0 @@ -26,6 +26,8 @@ workflow: - location: .speakeasy/overlays/open-enums.overlay.yaml - location: .speakeasy/overlays/remove-rss-responses.overlay.yaml - location: .speakeasy/overlays/add-headers.overlay.yaml + - location: .speakeasy/overlays/allof-simplify.overlay.yaml + - location: .speakeasy/overlays/boolean-query-params.overlay.yaml output: .speakeasy/out.openapi.yaml registry: location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api diff --git a/FUNCTIONS.md b/FUNCTIONS.md index 567e560b..a4ada74e 100644 --- a/FUNCTIONS.md +++ b/FUNCTIONS.md @@ -33,7 +33,10 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await betaResponsesSend(openRouter, { - responsesRequest: {}, + responsesRequest: { + input: "Tell me a joke", + model: "openai/gpt-4o", + }, }); if (res.ok) { const { value: result } = res; diff --git a/README.md b/README.md index 3b757808..9fff87de 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,41 @@ for await (const chunk of result) { + +## Pagination + +Some of the endpoints in this SDK support pagination. To use pagination, you +make your SDK calls as usual, but the returned response object will also be an +async iterable that can be consumed using the [`for await...of`][for-await-of] +syntax. + +[for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of + +Here's an example of one such pagination call: + +```typescript +import { OpenRouter } from "@openrouter/sdk"; + +const openRouter = new OpenRouter({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const result = await openRouter.organization.listMembers(); + + for await (const page of result) { + console.log(page); + } +} + +run(); + +``` + + ## Debugging diff --git a/USAGE.md b/USAGE.md index 69c81d0d..c01b12b9 100644 --- a/USAGE.md +++ b/USAGE.md @@ -11,7 +11,10 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.beta.responses.send({ - responsesRequest: {}, + responsesRequest: { + input: "Tell me a joke", + model: "openai/gpt-4o", + }, }); console.log(result); diff --git a/docs/models/architecture.md b/docs/models/architecture.md index a79153a0..f5634988 100644 --- a/docs/models/architecture.md +++ b/docs/models/architecture.md @@ -25,7 +25,7 @@ let value: Architecture = { | Field | Type | Required | Description | Example | | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | | `tokenizer` | [models.Tokenizer](../models/tokenizer.md) | :heavy_check_mark: | N/A | GPT | -| `instructType` | [models.InstructType](../models/instructtype.md) | :heavy_check_mark: | Instruction format type | | +| `instructType` | [models.InstructType](../models/instructtype.md) | :heavy_check_mark: | Instruction format type | chatml | | `modality` | *string* | :heavy_check_mark: | Primary modality of the model | text | | `inputModalities` | [models.InputModality](../models/inputmodality.md)[] | :heavy_check_mark: | Supported input modalities | | | `outputModalities` | [models.OutputModality](../models/outputmodality.md)[] | :heavy_check_mark: | Supported output modalities | | \ No newline at end of file diff --git a/docs/models/chainid.md b/docs/models/chainid.md deleted file mode 100644 index f6f7a85f..00000000 --- a/docs/models/chainid.md +++ /dev/null @@ -1,17 +0,0 @@ -# ChainId - -## Example Usage - -```typescript -import { ChainId } from "@openrouter/sdk/models"; - -let value: ChainId = 137; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -1 | 137 | 8453 | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/createchargerequest.md b/docs/models/createchargerequest.md deleted file mode 100644 index 096fdbbc..00000000 --- a/docs/models/createchargerequest.md +++ /dev/null @@ -1,23 +0,0 @@ -# CreateChargeRequest - -Create a Coinbase charge for crypto payment - -## Example Usage - -```typescript -import { CreateChargeRequest } from "@openrouter/sdk/models"; - -let value: CreateChargeRequest = { - amount: 100, - sender: "0x1234567890123456789012345678901234567890", - chainId: 1, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `amount` | *number* | :heavy_check_mark: | N/A | -| `sender` | *string* | :heavy_check_mark: | N/A | -| `chainId` | [models.ChainId](../models/chainid.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/filepath.md b/docs/models/filepath.md index 1401b28f..22fa7521 100644 --- a/docs/models/filepath.md +++ b/docs/models/filepath.md @@ -7,7 +7,7 @@ import { FilePath } from "@openrouter/sdk/models"; let value: FilePath = { type: "file_path", - fileId: "file-xyz789", + fileId: "file-abc123", index: 0, }; ``` diff --git a/docs/models/inputtokensdetails.md b/docs/models/inputtokensdetails.md index 613d3c8c..5887fac2 100644 --- a/docs/models/inputtokensdetails.md +++ b/docs/models/inputtokensdetails.md @@ -6,7 +6,7 @@ import { InputTokensDetails } from "@openrouter/sdk/models"; let value: InputTokensDetails = { - cachedTokens: 229.09, + cachedTokens: 22909, }; ``` diff --git a/docs/models/instructtype.md b/docs/models/instructtype.md index 4a40bcdf..d11ac515 100644 --- a/docs/models/instructtype.md +++ b/docs/models/instructtype.md @@ -7,7 +7,7 @@ Instruction format type ```typescript import { InstructType } from "@openrouter/sdk/models"; -let value: InstructType = "claude"; +let value: InstructType = "chatml"; // Open enum: unrecognized values are captured as Unrecognized ``` diff --git a/docs/models/listendpointsresponse.md b/docs/models/listendpointsresponse.md index 1dad57e0..1ae3b34a 100644 --- a/docs/models/listendpointsresponse.md +++ b/docs/models/listendpointsresponse.md @@ -47,6 +47,8 @@ let value: ListEndpointsResponse = { "presence_penalty", ], uptimeLast30m: 99.5, + uptimeLast5m: 100, + uptimeLast1d: 99.8, supportsImplicitCaching: true, latencyLast30m: { p50: 0.25, diff --git a/docs/models/model.md b/docs/models/model.md index e493176e..f339d0a5 100644 --- a/docs/models/model.md +++ b/docs/models/model.md @@ -36,6 +36,9 @@ let value: Model = { "max_tokens", ], defaultParameters: null, + links: { + details: "/api/v1/models/openai/gpt-5.4/endpoints", + }, }; ``` @@ -57,4 +60,5 @@ let value: Model = { | `supportedParameters` | [models.Parameter](../models/parameter.md)[] | :heavy_check_mark: | List of supported parameters for this model | | | `defaultParameters` | [models.DefaultParameters](../models/defaultparameters.md) | :heavy_check_mark: | Default parameters for this model | {
"temperature": 0.7,
"top_p": 0.9,
"top_k": 0,
"frequency_penalty": 0,
"presence_penalty": 0,
"repetition_penalty": 1
} | | `knowledgeCutoff` | *string* | :heavy_minus_sign: | The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. | 2024-10-01 | -| `expirationDate` | *string* | :heavy_minus_sign: | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 | \ No newline at end of file +| `expirationDate` | *string* | :heavy_minus_sign: | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 | +| `links` | [models.ModelLinks](../models/modellinks.md) | :heavy_check_mark: | Related API endpoints and resources for this model. | {
"details": "/api/v1/models/openai/gpt-5.4/endpoints"
} | \ No newline at end of file diff --git a/docs/models/modelgroup.md b/docs/models/modelgroup.md index a2c121bb..008f0705 100644 --- a/docs/models/modelgroup.md +++ b/docs/models/modelgroup.md @@ -15,5 +15,5 @@ let value: ModelGroup = "GPT"; ## Values ```typescript -"Router" | "Media" | "Other" | "GPT" | "Claude" | "Gemini" | "Grok" | "Cohere" | "Nova" | "Qwen" | "Yi" | "DeepSeek" | "Mistral" | "Llama2" | "Llama3" | "Llama4" | "PaLM" | "RWKV" | "Qwen3" | Unrecognized +"Router" | "Media" | "Other" | "GPT" | "Claude" | "Gemini" | "Gemma" | "Grok" | "Cohere" | "Nova" | "Qwen" | "Yi" | "DeepSeek" | "Mistral" | "Llama2" | "Llama3" | "Llama4" | "PaLM" | "RWKV" | "Qwen3" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/modelslistresponse.md b/docs/models/modelslistresponse.md index 30173e62..5baa83bd 100644 --- a/docs/models/modelslistresponse.md +++ b/docs/models/modelslistresponse.md @@ -40,6 +40,9 @@ let value: ModelsListResponse = { "presence_penalty", ], defaultParameters: null, + links: { + details: "/api/v1/models/openai/gpt-5.4/endpoints", + }, }, ], }; @@ -47,6 +50,6 @@ let value: ModelsListResponse = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `data` | [models.Model](../models/model.md)[] | :heavy_check_mark: | List of available models | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [models.Model](../models/model.md)[] | :heavy_check_mark: | List of available models | [
{
"id": "openai/gpt-4",
"canonical_slug": "openai/gpt-4",
"name": "GPT-4",
"created": 1692901234,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"pricing": {
"prompt": "0.00003",
"completion": "0.00006",
"request": "0",
"image": "0"
},
"context_length": 8192,
"architecture": {
"tokenizer": "GPT",
"instruct_type": "chatml",
"modality": "text-\u003etext",
"input_modalities": [
"text"
],
"output_modalities": [
"text"
]
},
"top_provider": {
"context_length": 8192,
"max_completion_tokens": 4096,
"is_moderated": true
},
"per_request_limits": null,
"supported_parameters": [
"temperature",
"top_p",
"max_tokens"
],
"default_parameters": null,
"knowledge_cutoff": null,
"expiration_date": null,
"links": {
"details": "/api/v1/models/openai/gpt-5.4/endpoints"
}
}
] | \ No newline at end of file diff --git a/docs/models/openairesponsesannotation.md b/docs/models/openairesponsesannotation.md index f4b8b964..7f882058 100644 --- a/docs/models/openairesponsesannotation.md +++ b/docs/models/openairesponsesannotation.md @@ -19,10 +19,10 @@ const value: models.FileCitation = { ```typescript const value: models.URLCitation = { type: "url_citation", - url: "https://openrouter.ai/docs", - title: "OpenRouter Documentation", - startIndex: 0, - endIndex: 42, + url: "https://classic-citizen.biz", + title: "", + startIndex: 485813, + endIndex: 302701, }; ``` @@ -31,7 +31,7 @@ const value: models.URLCitation = { ```typescript const value: models.FilePath = { type: "file_path", - fileId: "file-xyz789", + fileId: "file-abc123", index: 0, }; ``` diff --git a/docs/models/openairesponsesresponsestatus.md b/docs/models/openairesponsesresponsestatus.md index f0b38faf..44ff0f74 100644 --- a/docs/models/openairesponsesresponsestatus.md +++ b/docs/models/openairesponsesresponsestatus.md @@ -5,7 +5,7 @@ ```typescript import { OpenAIResponsesResponseStatus } from "@openrouter/sdk/models"; -let value: OpenAIResponsesResponseStatus = "failed"; +let value: OpenAIResponsesResponseStatus = "completed"; // Open enum: unrecognized values are captured as Unrecognized ``` diff --git a/docs/models/openairesponsestoolchoiceunion.md b/docs/models/openairesponsestoolchoiceunion.md index f394b526..8a3a5964 100644 --- a/docs/models/openairesponsestoolchoiceunion.md +++ b/docs/models/openairesponsestoolchoiceunion.md @@ -38,3 +38,18 @@ const value: models.OpenAIResponsesToolChoice = { }; ``` +### `models.ToolChoiceAllowed` + +```typescript +const value: models.ToolChoiceAllowed = { + type: "allowed_tools", + mode: "auto", + tools: [ + { + "type": "function", + "name": "get_weather", + }, + ], +}; +``` + diff --git a/docs/models/operations/apitype.md b/docs/models/operations/apitype.md index d01ad30e..4758d05b 100644 --- a/docs/models/operations/apitype.md +++ b/docs/models/operations/apitype.md @@ -7,7 +7,7 @@ Type of API used for the generation ```typescript import { ApiType } from "@openrouter/sdk/models/operations"; -let value: ApiType = "embeddings"; +let value: ApiType = "rerank"; // Open enum: unrecognized values are captured as Unrecognized ``` @@ -15,5 +15,5 @@ let value: ApiType = "embeddings"; ## Values ```typescript -"completions" | "embeddings" | "video" | Unrecognized +"completions" | "embeddings" | "rerank" | "video" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/operations/bulkassignkeystoguardrailrequest.md b/docs/models/operations/bulkassignkeystoguardrailrequest.md index bc5eaf71..fa34230d 100644 --- a/docs/models/operations/bulkassignkeystoguardrailrequest.md +++ b/docs/models/operations/bulkassignkeystoguardrailrequest.md @@ -7,7 +7,7 @@ import { BulkAssignKeysToGuardrailRequest } from "@openrouter/sdk/models/operati let value: BulkAssignKeysToGuardrailRequest = { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkAssignKeysRequest: { keyHashes: [ "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", ], @@ -23,4 +23,4 @@ let value: BulkAssignKeysToGuardrailRequest = { | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `requestBody` | [operations.BulkAssignKeysToGuardrailRequestBody](../../models/operations/bulkassignkeystoguardrailrequestbody.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `bulkAssignKeysRequest` | [models.BulkAssignKeysRequest](../../models/bulkassignkeysrequest.md) | :heavy_check_mark: | N/A | {
"key_hashes": [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
]
} | \ No newline at end of file diff --git a/docs/models/operations/bulkassignkeystoguardrailrequestbody.md b/docs/models/operations/bulkassignkeystoguardrailrequestbody.md deleted file mode 100644 index a7ed0dcf..00000000 --- a/docs/models/operations/bulkassignkeystoguardrailrequestbody.md +++ /dev/null @@ -1,19 +0,0 @@ -# BulkAssignKeysToGuardrailRequestBody - -## Example Usage - -```typescript -import { BulkAssignKeysToGuardrailRequestBody } from "@openrouter/sdk/models/operations"; - -let value: BulkAssignKeysToGuardrailRequestBody = { - keyHashes: [ - "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `keyHashes` | *string*[] | :heavy_check_mark: | Array of API key hashes to assign to the guardrail | [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
] | \ No newline at end of file diff --git a/docs/models/operations/bulkassignkeystoguardrailresponse.md b/docs/models/operations/bulkassignkeystoguardrailresponse.md deleted file mode 100644 index a9b6b30c..00000000 --- a/docs/models/operations/bulkassignkeystoguardrailresponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# BulkAssignKeysToGuardrailResponse - -Assignment result - -## Example Usage - -```typescript -import { BulkAssignKeysToGuardrailResponse } from "@openrouter/sdk/models/operations"; - -let value: BulkAssignKeysToGuardrailResponse = { - assignedCount: 3, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `assignedCount` | *number* | :heavy_check_mark: | Number of keys successfully assigned | 3 | \ No newline at end of file diff --git a/docs/models/operations/bulkassignmemberstoguardrailrequest.md b/docs/models/operations/bulkassignmemberstoguardrailrequest.md index fa8bb4ca..c36a00c0 100644 --- a/docs/models/operations/bulkassignmemberstoguardrailrequest.md +++ b/docs/models/operations/bulkassignmemberstoguardrailrequest.md @@ -7,7 +7,7 @@ import { BulkAssignMembersToGuardrailRequest } from "@openrouter/sdk/models/oper let value: BulkAssignMembersToGuardrailRequest = { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkAssignMembersRequest: { memberUserIds: [ "user_abc123", "user_def456", @@ -24,4 +24,4 @@ let value: BulkAssignMembersToGuardrailRequest = { | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `requestBody` | [operations.BulkAssignMembersToGuardrailRequestBody](../../models/operations/bulkassignmemberstoguardrailrequestbody.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `bulkAssignMembersRequest` | [models.BulkAssignMembersRequest](../../models/bulkassignmembersrequest.md) | :heavy_check_mark: | N/A | {
"member_user_ids": [
"user_abc123",
"user_def456"
]
} | \ No newline at end of file diff --git a/docs/models/operations/bulkassignmemberstoguardrailrequestbody.md b/docs/models/operations/bulkassignmemberstoguardrailrequestbody.md deleted file mode 100644 index a1b88827..00000000 --- a/docs/models/operations/bulkassignmemberstoguardrailrequestbody.md +++ /dev/null @@ -1,20 +0,0 @@ -# BulkAssignMembersToGuardrailRequestBody - -## Example Usage - -```typescript -import { BulkAssignMembersToGuardrailRequestBody } from "@openrouter/sdk/models/operations"; - -let value: BulkAssignMembersToGuardrailRequestBody = { - memberUserIds: [ - "user_abc123", - "user_def456", - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `memberUserIds` | *string*[] | :heavy_check_mark: | Array of member user IDs to assign to the guardrail | [
"user_abc123",
"user_def456"
] | \ No newline at end of file diff --git a/docs/models/operations/bulkassignmemberstoguardrailresponse.md b/docs/models/operations/bulkassignmemberstoguardrailresponse.md deleted file mode 100644 index 6f83d903..00000000 --- a/docs/models/operations/bulkassignmemberstoguardrailresponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# BulkAssignMembersToGuardrailResponse - -Assignment result - -## Example Usage - -```typescript -import { BulkAssignMembersToGuardrailResponse } from "@openrouter/sdk/models/operations"; - -let value: BulkAssignMembersToGuardrailResponse = { - assignedCount: 2, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `assignedCount` | *number* | :heavy_check_mark: | Number of members successfully assigned | 2 | \ No newline at end of file diff --git a/docs/models/operations/bulkunassignkeysfromguardrailrequest.md b/docs/models/operations/bulkunassignkeysfromguardrailrequest.md index a57fdea5..44f7f4a4 100644 --- a/docs/models/operations/bulkunassignkeysfromguardrailrequest.md +++ b/docs/models/operations/bulkunassignkeysfromguardrailrequest.md @@ -7,7 +7,7 @@ import { BulkUnassignKeysFromGuardrailRequest } from "@openrouter/sdk/models/ope let value: BulkUnassignKeysFromGuardrailRequest = { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkUnassignKeysRequest: { keyHashes: [ "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", ], @@ -23,4 +23,4 @@ let value: BulkUnassignKeysFromGuardrailRequest = { | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `requestBody` | [operations.BulkUnassignKeysFromGuardrailRequestBody](../../models/operations/bulkunassignkeysfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `bulkUnassignKeysRequest` | [models.BulkUnassignKeysRequest](../../models/bulkunassignkeysrequest.md) | :heavy_check_mark: | N/A | {
"key_hashes": [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
]
} | \ No newline at end of file diff --git a/docs/models/operations/bulkunassignkeysfromguardrailrequestbody.md b/docs/models/operations/bulkunassignkeysfromguardrailrequestbody.md deleted file mode 100644 index 5a1b1ad3..00000000 --- a/docs/models/operations/bulkunassignkeysfromguardrailrequestbody.md +++ /dev/null @@ -1,19 +0,0 @@ -# BulkUnassignKeysFromGuardrailRequestBody - -## Example Usage - -```typescript -import { BulkUnassignKeysFromGuardrailRequestBody } from "@openrouter/sdk/models/operations"; - -let value: BulkUnassignKeysFromGuardrailRequestBody = { - keyHashes: [ - "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `keyHashes` | *string*[] | :heavy_check_mark: | Array of API key hashes to unassign from the guardrail | [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
] | \ No newline at end of file diff --git a/docs/models/operations/bulkunassignkeysfromguardrailresponse.md b/docs/models/operations/bulkunassignkeysfromguardrailresponse.md deleted file mode 100644 index c77c8c77..00000000 --- a/docs/models/operations/bulkunassignkeysfromguardrailresponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# BulkUnassignKeysFromGuardrailResponse - -Unassignment result - -## Example Usage - -```typescript -import { BulkUnassignKeysFromGuardrailResponse } from "@openrouter/sdk/models/operations"; - -let value: BulkUnassignKeysFromGuardrailResponse = { - unassignedCount: 3, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `unassignedCount` | *number* | :heavy_check_mark: | Number of keys successfully unassigned | 3 | \ No newline at end of file diff --git a/docs/models/operations/bulkunassignmembersfromguardrailrequest.md b/docs/models/operations/bulkunassignmembersfromguardrailrequest.md index 668117d9..0d825994 100644 --- a/docs/models/operations/bulkunassignmembersfromguardrailrequest.md +++ b/docs/models/operations/bulkunassignmembersfromguardrailrequest.md @@ -7,7 +7,7 @@ import { BulkUnassignMembersFromGuardrailRequest } from "@openrouter/sdk/models/ let value: BulkUnassignMembersFromGuardrailRequest = { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkUnassignMembersRequest: { memberUserIds: [ "user_abc123", "user_def456", @@ -24,4 +24,4 @@ let value: BulkUnassignMembersFromGuardrailRequest = { | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `requestBody` | [operations.BulkUnassignMembersFromGuardrailRequestBody](../../models/operations/bulkunassignmembersfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `bulkUnassignMembersRequest` | [models.BulkUnassignMembersRequest](../../models/bulkunassignmembersrequest.md) | :heavy_check_mark: | N/A | {
"member_user_ids": [
"user_abc123",
"user_def456"
]
} | \ No newline at end of file diff --git a/docs/models/operations/bulkunassignmembersfromguardrailrequestbody.md b/docs/models/operations/bulkunassignmembersfromguardrailrequestbody.md deleted file mode 100644 index 82ae5400..00000000 --- a/docs/models/operations/bulkunassignmembersfromguardrailrequestbody.md +++ /dev/null @@ -1,20 +0,0 @@ -# BulkUnassignMembersFromGuardrailRequestBody - -## Example Usage - -```typescript -import { BulkUnassignMembersFromGuardrailRequestBody } from "@openrouter/sdk/models/operations"; - -let value: BulkUnassignMembersFromGuardrailRequestBody = { - memberUserIds: [ - "user_abc123", - "user_def456", - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `memberUserIds` | *string*[] | :heavy_check_mark: | Array of member user IDs to unassign from the guardrail | [
"user_abc123",
"user_def456"
] | \ No newline at end of file diff --git a/docs/models/operations/bulkunassignmembersfromguardrailresponse.md b/docs/models/operations/bulkunassignmembersfromguardrailresponse.md deleted file mode 100644 index a3568670..00000000 --- a/docs/models/operations/bulkunassignmembersfromguardrailresponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# BulkUnassignMembersFromGuardrailResponse - -Unassignment result - -## Example Usage - -```typescript -import { BulkUnassignMembersFromGuardrailResponse } from "@openrouter/sdk/models/operations"; - -let value: BulkUnassignMembersFromGuardrailResponse = { - unassignedCount: 2, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| `unassignedCount` | *number* | :heavy_check_mark: | Number of members successfully unassigned | 2 | \ No newline at end of file diff --git a/docs/models/operations/calldata.md b/docs/models/operations/calldata.md deleted file mode 100644 index d630cf8a..00000000 --- a/docs/models/operations/calldata.md +++ /dev/null @@ -1,35 +0,0 @@ -# CallData - -## Example Usage - -```typescript -import { CallData } from "@openrouter/sdk/models/operations"; - -let value: CallData = { - deadline: "", - feeAmount: "", - id: "", - operator: "", - prefix: "", - recipient: "", - recipientAmount: "", - recipientCurrency: "", - refundDestination: "", - signature: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------- | ------------------- | ------------------- | ------------------- | -| `deadline` | *string* | :heavy_check_mark: | N/A | -| `feeAmount` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_check_mark: | N/A | -| `operator` | *string* | :heavy_check_mark: | N/A | -| `prefix` | *string* | :heavy_check_mark: | N/A | -| `recipient` | *string* | :heavy_check_mark: | N/A | -| `recipientAmount` | *string* | :heavy_check_mark: | N/A | -| `recipientCurrency` | *string* | :heavy_check_mark: | N/A | -| `refundDestination` | *string* | :heavy_check_mark: | N/A | -| `signature` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createauthkeyscoderequestbody.md b/docs/models/operations/createauthkeyscoderequestbody.md index 9e51f134..54c55968 100644 --- a/docs/models/operations/createauthkeyscoderequestbody.md +++ b/docs/models/operations/createauthkeyscoderequestbody.md @@ -18,6 +18,6 @@ let value: CreateAuthKeysCodeRequestBody = { | `codeChallenge` | *string* | :heavy_minus_sign: | PKCE code challenge for enhanced security | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM | | `codeChallengeMethod` | [operations.CreateAuthKeysCodeCodeChallengeMethod](../../models/operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 | | `limit` | *number* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 | -| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Optional expiration time for the API key to be created | | +| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Optional expiration time for the API key to be created | 2027-12-31T23:59:59Z | | `keyLabel` | *string* | :heavy_minus_sign: | Optional custom label for the API key. Defaults to the app name if not provided. | My Custom Key | | `usageLimitType` | [operations.UsageLimitType](../../models/operations/usagelimittype.md) | :heavy_minus_sign: | Optional credit limit reset interval. When set, the credit limit resets on this interval. | monthly | \ No newline at end of file diff --git a/docs/models/operations/createcoinbasechargedata.md b/docs/models/operations/createcoinbasechargedata.md deleted file mode 100644 index 9acb63a0..00000000 --- a/docs/models/operations/createcoinbasechargedata.md +++ /dev/null @@ -1,43 +0,0 @@ -# CreateCoinbaseChargeData - -## Example Usage - -```typescript -import { CreateCoinbaseChargeData } from "@openrouter/sdk/models/operations"; - -let value: CreateCoinbaseChargeData = { - id: "", - createdAt: "1730810681036", - expiresAt: "1742058293127", - web3Data: { - transferIntent: { - callData: { - deadline: "", - feeAmount: "", - id: "", - operator: "", - prefix: "", - recipient: "", - recipientAmount: "", - recipientCurrency: "", - refundDestination: "", - signature: "", - }, - metadata: { - chainId: 7497.17, - contractAddress: "", - sender: "", - }, - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `createdAt` | *string* | :heavy_check_mark: | N/A | -| `expiresAt` | *string* | :heavy_check_mark: | N/A | -| `web3Data` | [operations.Web3Data](../../models/operations/web3data.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createcoinbasechargeglobals.md b/docs/models/operations/createcoinbasechargeglobals.md deleted file mode 100644 index 8a57aaa6..00000000 --- a/docs/models/operations/createcoinbasechargeglobals.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreateCoinbaseChargeGlobals - -## Example Usage - -```typescript -import { CreateCoinbaseChargeGlobals } from "@openrouter/sdk/models/operations"; - -let value: CreateCoinbaseChargeGlobals = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| -| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/createcoinbasechargerequest.md b/docs/models/operations/createcoinbasechargerequest.md deleted file mode 100644 index 7427ed1d..00000000 --- a/docs/models/operations/createcoinbasechargerequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# CreateCoinbaseChargeRequest - -## Example Usage - -```typescript -import { CreateCoinbaseChargeRequest } from "@openrouter/sdk/models/operations"; - -let value: CreateCoinbaseChargeRequest = { - createChargeRequest: { - amount: 100, - sender: "0x1234567890123456789012345678901234567890", - chainId: 1, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `createChargeRequest` | [models.CreateChargeRequest](../../models/createchargerequest.md) | :heavy_check_mark: | N/A | {
"amount": 100,
"sender": "0x1234567890123456789012345678901234567890",
"chain_id": 1
} | \ No newline at end of file diff --git a/docs/models/operations/createcoinbasechargeresponse.md b/docs/models/operations/createcoinbasechargeresponse.md deleted file mode 100644 index 48df4424..00000000 --- a/docs/models/operations/createcoinbasechargeresponse.md +++ /dev/null @@ -1,44 +0,0 @@ -# CreateCoinbaseChargeResponse - -Returns the calldata to fulfill the transaction - -## Example Usage - -```typescript -import { CreateCoinbaseChargeResponse } from "@openrouter/sdk/models/operations"; - -let value: CreateCoinbaseChargeResponse = { - data: { - id: "", - createdAt: "1723897831264", - expiresAt: "1744713163031", - web3Data: { - transferIntent: { - callData: { - deadline: "", - feeAmount: "", - id: "", - operator: "", - prefix: "", - recipient: "", - recipientAmount: "", - recipientCurrency: "", - refundDestination: "", - signature: "", - }, - metadata: { - chainId: 7497.17, - contractAddress: "", - sender: "", - }, - }, - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `data` | [operations.CreateCoinbaseChargeData](../../models/operations/createcoinbasechargedata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createcoinbasechargesecurity.md b/docs/models/operations/createcoinbasechargesecurity.md deleted file mode 100644 index 9de595c8..00000000 --- a/docs/models/operations/createcoinbasechargesecurity.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreateCoinbaseChargeSecurity - -## Example Usage - -```typescript -import { CreateCoinbaseChargeSecurity } from "@openrouter/sdk/models/operations"; - -let value: CreateCoinbaseChargeSecurity = { - bearer: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `bearer` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createembeddingsdata.md b/docs/models/operations/createembeddingsdata.md index b6acb226..43c86a30 100644 --- a/docs/models/operations/createembeddingsdata.md +++ b/docs/models/operations/createembeddingsdata.md @@ -1,5 +1,7 @@ # CreateEmbeddingsData +A single embedding object + ## Example Usage ```typescript @@ -7,14 +9,18 @@ import { CreateEmbeddingsData } from "@openrouter/sdk/models/operations"; let value: CreateEmbeddingsData = { object: "embedding", - embedding: "", + embedding: [ + 0.0023064255, + -0.009327292, + 0.015797347, + ], }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `object` | [operations.ObjectEmbedding](../../models/operations/objectembedding.md) | :heavy_check_mark: | N/A | -| `embedding` | *operations.Embedding* | :heavy_check_mark: | N/A | -| `index` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `object` | [operations.ObjectEmbedding](../../models/operations/objectembedding.md) | :heavy_check_mark: | N/A | | +| `embedding` | *operations.Embedding* | :heavy_check_mark: | Embedding vector as an array of floats or a base64 string | [
0.0023064255,
-0.009327292,
0.015797347
] | +| `index` | *number* | :heavy_minus_sign: | Index of the embedding in the input list | 0 | \ No newline at end of file diff --git a/docs/models/operations/createembeddingsrequest.md b/docs/models/operations/createembeddingsrequest.md index 2768e50f..427405db 100644 --- a/docs/models/operations/createembeddingsrequest.md +++ b/docs/models/operations/createembeddingsrequest.md @@ -7,23 +7,17 @@ import { CreateEmbeddingsRequest } from "@openrouter/sdk/models/operations"; let value: CreateEmbeddingsRequest = { requestBody: { - input: [ - [], - [ - 3849.69, - ], - [], - ], - model: "Model Y", + input: "The quick brown fox jumps over the lazy dog", + model: "openai/text-embedding-3-small", }, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| -| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| -| `requestBody` | [operations.CreateEmbeddingsRequestBody](../../models/operations/createembeddingsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `requestBody` | [operations.CreateEmbeddingsRequestBody](../../models/operations/createembeddingsrequestbody.md) | :heavy_check_mark: | N/A | {
"model": "openai/text-embedding-3-small",
"input": "The quick brown fox jumps over the lazy dog",
"dimensions": 1536
} | \ No newline at end of file diff --git a/docs/models/operations/createembeddingsrequestbody.md b/docs/models/operations/createembeddingsrequestbody.md index 37b54605..2c5e4371 100644 --- a/docs/models/operations/createembeddingsrequestbody.md +++ b/docs/models/operations/createembeddingsrequestbody.md @@ -1,24 +1,26 @@ # CreateEmbeddingsRequestBody +Embeddings request input + ## Example Usage ```typescript import { CreateEmbeddingsRequestBody } from "@openrouter/sdk/models/operations"; let value: CreateEmbeddingsRequestBody = { - input: [], - model: "Focus", + input: "The quick brown fox jumps over the lazy dog", + model: "openai/text-embedding-3-small", }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `input` | *operations.InputUnion* | :heavy_check_mark: | N/A | -| `model` | *string* | :heavy_check_mark: | N/A | -| `encodingFormat` | [operations.EncodingFormat](../../models/operations/encodingformat.md) | :heavy_minus_sign: | N/A | -| `dimensions` | *number* | :heavy_minus_sign: | N/A | -| `user` | *string* | :heavy_minus_sign: | N/A | -| `provider` | [models.ProviderPreferences](../../models/providerpreferences.md) | :heavy_minus_sign: | Provider routing preferences for the request. | -| `inputType` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `input` | *operations.InputUnion* | :heavy_check_mark: | Text, token, or multimodal input(s) to embed | The quick brown fox jumps over the lazy dog | +| `model` | *string* | :heavy_check_mark: | The model to use for embeddings | openai/text-embedding-3-small | +| `encodingFormat` | [operations.EncodingFormat](../../models/operations/encodingformat.md) | :heavy_minus_sign: | The format of the output embeddings | float | +| `dimensions` | *number* | :heavy_minus_sign: | The number of dimensions for the output embeddings | 1536 | +| `user` | *string* | :heavy_minus_sign: | A unique identifier for the end-user | user-1234 | +| `provider` | [models.ProviderPreferences](../../models/providerpreferences.md) | :heavy_minus_sign: | N/A | {
"allow_fallbacks": true
} | +| `inputType` | *string* | :heavy_minus_sign: | The type of input (e.g. search_query, search_document) | search_query | \ No newline at end of file diff --git a/docs/models/operations/createembeddingsresponse.md b/docs/models/operations/createembeddingsresponse.md index cfc7f402..8ab9f0ee 100644 --- a/docs/models/operations/createembeddingsresponse.md +++ b/docs/models/operations/createembeddingsresponse.md @@ -8,8 +8,17 @@ ```typescript const value: operations.CreateEmbeddingsResponseBody = { object: "list", - data: [], - model: "Focus", + data: [ + { + object: "embedding", + embedding: [ + 0.0023064255, + -0.009327292, + 0.015797347, + ], + }, + ], + model: "openai/text-embedding-3-small", }; ``` diff --git a/docs/models/operations/createembeddingsresponsebody.md b/docs/models/operations/createembeddingsresponsebody.md index 18423c1d..3b5e0486 100644 --- a/docs/models/operations/createembeddingsresponsebody.md +++ b/docs/models/operations/createembeddingsresponsebody.md @@ -1,6 +1,6 @@ # CreateEmbeddingsResponseBody -Embedding response +Embeddings response containing embedding vectors ## Example Usage @@ -9,17 +9,26 @@ import { CreateEmbeddingsResponseBody } from "@openrouter/sdk/models/operations" let value: CreateEmbeddingsResponseBody = { object: "list", - data: [], - model: "Focus", + data: [ + { + object: "embedding", + embedding: [ + 0.0023064255, + -0.009327292, + 0.015797347, + ], + }, + ], + model: "openai/text-embedding-3-small", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `object` | [operations.ObjectT](../../models/operations/objectt.md) | :heavy_check_mark: | N/A | -| `data` | [operations.CreateEmbeddingsData](../../models/operations/createembeddingsdata.md)[] | :heavy_check_mark: | N/A | -| `model` | *string* | :heavy_check_mark: | N/A | -| `usage` | [operations.Usage](../../models/operations/usage.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Unique identifier for the embeddings response | embd-1234567890 | +| `object` | [operations.ObjectT](../../models/operations/objectt.md) | :heavy_check_mark: | N/A | | +| `data` | [operations.CreateEmbeddingsData](../../models/operations/createembeddingsdata.md)[] | :heavy_check_mark: | List of embedding objects | [
{
"object": "embedding",
"embedding": [
0.0023064255,
-0.009327292,
0.015797347
],
"index": 0
}
] | +| `model` | *string* | :heavy_check_mark: | The model used for embeddings | openai/text-embedding-3-small | +| `usage` | [operations.CreateEmbeddingsUsage](../../models/operations/createembeddingsusage.md) | :heavy_minus_sign: | Token usage statistics | {
"prompt_tokens": 8,
"total_tokens": 8
} | \ No newline at end of file diff --git a/docs/models/operations/createguardraildata.md b/docs/models/operations/createguardraildata.md deleted file mode 100644 index e914c2f7..00000000 --- a/docs/models/operations/createguardraildata.md +++ /dev/null @@ -1,31 +0,0 @@ -# CreateGuardrailData - -The created guardrail - -## Example Usage - -```typescript -import { CreateGuardrailData } from "@openrouter/sdk/models/operations"; - -let value: CreateGuardrailData = { - id: "550e8400-e29b-41d4-a716-446655440000", - name: "Production Guardrail", - createdAt: "2025-08-24T10:30:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `name` | *string* | :heavy_check_mark: | Name of the guardrail | Production Guardrail | -| `description` | *string* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment | -| `limitUsd` | *number* | :heavy_minus_sign: | Spending limit in USD | 100 | -| `resetInterval` | [operations.CreateGuardrailResetIntervalResponse](../../models/operations/createguardrailresetintervalresponse.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | -| `allowedProviders` | *string*[] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] | -| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | -| `allowedModels` | *string*[] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | -| `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | false | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z | -| `updatedAt` | *string* | :heavy_minus_sign: | ISO 8601 timestamp of when the guardrail was last updated | 2025-08-24T15:45:00Z | \ No newline at end of file diff --git a/docs/models/operations/createguardrailrequest.md b/docs/models/operations/createguardrailrequest.md index 2d9de582..9c3d3ea5 100644 --- a/docs/models/operations/createguardrailrequest.md +++ b/docs/models/operations/createguardrailrequest.md @@ -6,7 +6,7 @@ import { CreateGuardrailRequest } from "@openrouter/sdk/models/operations"; let value: CreateGuardrailRequest = { - requestBody: { + createGuardrailRequest: { name: "My New Guardrail", }, }; @@ -19,4 +19,4 @@ let value: CreateGuardrailRequest = { | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `requestBody` | [operations.CreateGuardrailRequestBody](../../models/operations/createguardrailrequestbody.md) | :heavy_check_mark: | N/A | {
"name": "My New Guardrail",
"description": "A guardrail for limiting API usage",
"limit_usd": 50,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"deepseek"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false
} | \ No newline at end of file +| `createGuardrailRequest` | [models.CreateGuardrailRequest](../../models/createguardrailrequest.md) | :heavy_check_mark: | N/A | {
"name": "My New Guardrail",
"description": "A guardrail for limiting API usage",
"limit_usd": 50,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"deepseek"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false
} | \ No newline at end of file diff --git a/docs/models/operations/createguardrailrequestbody.md b/docs/models/operations/createguardrailrequestbody.md deleted file mode 100644 index c55fc131..00000000 --- a/docs/models/operations/createguardrailrequestbody.md +++ /dev/null @@ -1,24 +0,0 @@ -# CreateGuardrailRequestBody - -## Example Usage - -```typescript -import { CreateGuardrailRequestBody } from "@openrouter/sdk/models/operations"; - -let value: CreateGuardrailRequestBody = { - name: "My New Guardrail", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail | -| `description` | *string* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage | -| `limitUsd` | *number* | :heavy_minus_sign: | Spending limit in USD | 50 | -| `resetInterval` | [operations.CreateGuardrailResetIntervalRequest](../../models/operations/createguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | -| `allowedProviders` | *string*[] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] | -| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | -| `allowedModels` | *string*[] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | -| `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | false | \ No newline at end of file diff --git a/docs/models/operations/createguardrailresetintervalrequest.md b/docs/models/operations/createguardrailresetintervalrequest.md deleted file mode 100644 index f13dca34..00000000 --- a/docs/models/operations/createguardrailresetintervalrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# CreateGuardrailResetIntervalRequest - -Interval at which the limit resets (daily, weekly, monthly) - -## Example Usage - -```typescript -import { CreateGuardrailResetIntervalRequest } from "@openrouter/sdk/models/operations"; - -let value: CreateGuardrailResetIntervalRequest = "monthly"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"daily" | "weekly" | "monthly" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/operations/createguardrailresetintervalresponse.md b/docs/models/operations/createguardrailresetintervalresponse.md deleted file mode 100644 index 81c6a47c..00000000 --- a/docs/models/operations/createguardrailresetintervalresponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# CreateGuardrailResetIntervalResponse - -Interval at which the limit resets (daily, weekly, monthly) - -## Example Usage - -```typescript -import { CreateGuardrailResetIntervalResponse } from "@openrouter/sdk/models/operations"; - -let value: CreateGuardrailResetIntervalResponse = "monthly"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"daily" | "weekly" | "monthly" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/operations/createguardrailresponse.md b/docs/models/operations/createguardrailresponse.md deleted file mode 100644 index 82ab5e0c..00000000 --- a/docs/models/operations/createguardrailresponse.md +++ /dev/null @@ -1,23 +0,0 @@ -# CreateGuardrailResponse - -Guardrail created successfully - -## Example Usage - -```typescript -import { CreateGuardrailResponse } from "@openrouter/sdk/models/operations"; - -let value: CreateGuardrailResponse = { - data: { - id: "550e8400-e29b-41d4-a716-446655440000", - name: "My New Guardrail", - createdAt: "2025-08-24T10:30:00Z", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.CreateGuardrailData](../../models/operations/createguardraildata.md) | :heavy_check_mark: | The created guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} | \ No newline at end of file diff --git a/docs/models/operations/createkeysrequestbody.md b/docs/models/operations/createkeysrequestbody.md index dbf3e43f..d02b37e9 100644 --- a/docs/models/operations/createkeysrequestbody.md +++ b/docs/models/operations/createkeysrequestbody.md @@ -18,4 +18,5 @@ let value: CreateKeysRequestBody = { | `limit` | *number* | :heavy_minus_sign: | Optional spending limit for the API key in USD | 50 | | `limitReset` | [operations.CreateKeysLimitReset](../../models/operations/createkeyslimitreset.md) | :heavy_minus_sign: | Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. | monthly | | `includeByokInLimit` | *boolean* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true | -| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected | 2027-12-31T23:59:59Z | \ No newline at end of file +| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected | 2027-12-31T23:59:59Z | +| `creatorUserId` | *string* | :heavy_minus_sign: | Optional user ID of the key creator. Only meaningful for organization-owned keys where a specific member is creating the key. | user_2dHFtVWx2n56w6HkM0000000000 | \ No newline at end of file diff --git a/docs/models/operations/createresponsesresponse.md b/docs/models/operations/createresponsesresponse.md index 05a6aa2b..bffa7a53 100644 --- a/docs/models/operations/createresponsesresponse.md +++ b/docs/models/operations/createresponsesresponse.md @@ -12,7 +12,7 @@ const value: models.OpenResponsesResult = { createdAt: 1704067200, model: "gpt-4", status: "completed", - completedAt: 7286.67, + completedAt: 311936, output: [ { type: "message", @@ -21,10 +21,10 @@ const value: models.OpenResponsesResult = { ], error: null, incompleteDetails: null, - temperature: null, - topP: null, + temperature: 7286.67, + topP: 3737.69, presencePenalty: 9990.37, - frequencyPenalty: null, + frequencyPenalty: 461.05, instructions: null, metadata: null, tools: [], diff --git a/docs/models/operations/createresponsesresponsebody.md b/docs/models/operations/createresponsesresponsebody.md index 9a44a658..c8fb8cb3 100644 --- a/docs/models/operations/createresponsesresponsebody.md +++ b/docs/models/operations/createresponsesresponsebody.md @@ -16,14 +16,14 @@ let value: CreateResponsesResponseBody = { createdAt: 1704067200, model: "gpt-4", status: "in_progress", - completedAt: 8101.12, + completedAt: 798483, output: [], error: null, incompleteDetails: null, - temperature: null, - topP: null, + temperature: 8101.12, + topP: 9758.23, presencePenalty: 8087.26, - frequencyPenalty: 4886.88, + frequencyPenalty: 4800.08, instructions: null, metadata: null, tools: [], diff --git a/docs/models/operations/deleteguardrailresponse.md b/docs/models/operations/deleteguardrailresponse.md deleted file mode 100644 index ef931107..00000000 --- a/docs/models/operations/deleteguardrailresponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# DeleteGuardrailResponse - -Guardrail deleted successfully - -## Example Usage - -```typescript -import { DeleteGuardrailResponse } from "@openrouter/sdk/models/operations"; - -let value: DeleteGuardrailResponse = { - deleted: true, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `deleted` | *true* | :heavy_check_mark: | Confirmation that the guardrail was deleted | true | \ No newline at end of file diff --git a/docs/models/operations/embedding.md b/docs/models/operations/embedding.md index 840767b6..34cea4b9 100644 --- a/docs/models/operations/embedding.md +++ b/docs/models/operations/embedding.md @@ -1,5 +1,7 @@ # Embedding +Embedding vector as an array of floats or a base64 string + ## Supported Types @@ -7,9 +9,9 @@ ```typescript const value: number[] = [ - 3390.48, - 1336.21, - 9437.99, + 0.0023064255, + -0.009327292, + 0.015797347, ]; ``` diff --git a/docs/models/operations/encodingformat.md b/docs/models/operations/encodingformat.md index 02594e25..78efaae2 100644 --- a/docs/models/operations/encodingformat.md +++ b/docs/models/operations/encodingformat.md @@ -1,5 +1,7 @@ # EncodingFormat +The format of the output embeddings + ## Example Usage ```typescript diff --git a/docs/models/operations/getgenerationdata.md b/docs/models/operations/getgenerationdata.md index 500816da..46754729 100644 --- a/docs/models/operations/getgenerationdata.md +++ b/docs/models/operations/getgenerationdata.md @@ -39,11 +39,11 @@ let value: GetGenerationData = { isByok: false, nativeFinishReason: "stop", externalUser: "user-123", - apiType: "completions", + apiType: "embeddings", router: "openrouter/auto", providerResponses: [ { - status: 9669.26, + status: 200, }, ], userAgent: "", @@ -53,41 +53,43 @@ let value: GetGenerationData = { ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the generation | gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG | -| `upstreamId` | *string* | :heavy_check_mark: | Upstream provider's identifier for this generation | chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946 | -| `totalCost` | *number* | :heavy_check_mark: | Total cost of the generation in USD | 0.0015 | -| `cacheDiscount` | *number* | :heavy_check_mark: | Discount applied due to caching | 0.0002 | -| `upstreamInferenceCost` | *number* | :heavy_check_mark: | Cost charged by the upstream provider | 0.0012 | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the generation was created | 2024-07-15T23:33:19.433273+00:00 | -| `model` | *string* | :heavy_check_mark: | Model used for the generation | sao10k/l3-stheno-8b | -| `appId` | *number* | :heavy_check_mark: | ID of the app that made the request | 12345 | -| `streamed` | *boolean* | :heavy_check_mark: | Whether the response was streamed | true | -| `cancelled` | *boolean* | :heavy_check_mark: | Whether the generation was cancelled | false | -| `providerName` | *string* | :heavy_check_mark: | Name of the provider that served the request | Infermatic | -| `latency` | *number* | :heavy_check_mark: | Total latency in milliseconds | 1250 | -| `moderationLatency` | *number* | :heavy_check_mark: | Moderation latency in milliseconds | 50 | -| `generationTime` | *number* | :heavy_check_mark: | Time taken for generation in milliseconds | 1200 | -| `finishReason` | *string* | :heavy_check_mark: | Reason the generation finished | stop | -| `tokensPrompt` | *number* | :heavy_check_mark: | Number of tokens in the prompt | 10 | -| `tokensCompletion` | *number* | :heavy_check_mark: | Number of tokens in the completion | 25 | -| `nativeTokensPrompt` | *number* | :heavy_check_mark: | Native prompt tokens as reported by provider | 10 | -| `nativeTokensCompletion` | *number* | :heavy_check_mark: | Native completion tokens as reported by provider | 25 | -| `nativeTokensCompletionImages` | *number* | :heavy_check_mark: | Native completion image tokens as reported by provider | 0 | -| `nativeTokensReasoning` | *number* | :heavy_check_mark: | Native reasoning tokens as reported by provider | 5 | -| `nativeTokensCached` | *number* | :heavy_check_mark: | Native cached tokens as reported by provider | 3 | -| `numMediaPrompt` | *number* | :heavy_check_mark: | Number of media items in the prompt | 1 | -| `numInputAudioPrompt` | *number* | :heavy_check_mark: | Number of audio inputs in the prompt | 0 | -| `numMediaCompletion` | *number* | :heavy_check_mark: | Number of media items in the completion | 0 | -| `numSearchResults` | *number* | :heavy_check_mark: | Number of search results included | 5 | -| `origin` | *string* | :heavy_check_mark: | Origin URL of the request | https://openrouter.ai/ | -| `usage` | *number* | :heavy_check_mark: | Usage amount in USD | 0.0015 | -| `isByok` | *boolean* | :heavy_check_mark: | Whether this used bring-your-own-key | false | -| `nativeFinishReason` | *string* | :heavy_check_mark: | Native finish reason as reported by provider | stop | -| `externalUser` | *string* | :heavy_check_mark: | External user identifier | user-123 | -| `apiType` | [operations.ApiType](../../models/operations/apitype.md) | :heavy_check_mark: | Type of API used for the generation | | -| `router` | *string* | :heavy_check_mark: | Router used for the request (e.g., openrouter/auto) | openrouter/auto | -| `providerResponses` | [operations.ProviderResponse](../../models/operations/providerresponse.md)[] | :heavy_check_mark: | List of provider responses for this generation, including fallback attempts | | -| `userAgent` | *string* | :heavy_check_mark: | User-Agent header from the request | | -| `httpReferer` | *string* | :heavy_check_mark: | Referer header from the request | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique identifier for the generation | gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG | +| `upstreamId` | *string* | :heavy_check_mark: | Upstream provider's identifier for this generation | chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946 | +| `totalCost` | *number* | :heavy_check_mark: | Total cost of the generation in USD | 0.0015 | +| `cacheDiscount` | *number* | :heavy_check_mark: | Discount applied due to caching | 0.0002 | +| `upstreamInferenceCost` | *number* | :heavy_check_mark: | Cost charged by the upstream provider | 0.0012 | +| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the generation was created | 2024-07-15T23:33:19.433273+00:00 | +| `model` | *string* | :heavy_check_mark: | Model used for the generation | sao10k/l3-stheno-8b | +| `appId` | *number* | :heavy_check_mark: | ID of the app that made the request | 12345 | +| `streamed` | *boolean* | :heavy_check_mark: | Whether the response was streamed | true | +| `cancelled` | *boolean* | :heavy_check_mark: | Whether the generation was cancelled | false | +| `providerName` | *string* | :heavy_check_mark: | Name of the provider that served the request | Infermatic | +| `latency` | *number* | :heavy_check_mark: | Total latency in milliseconds | 1250 | +| `moderationLatency` | *number* | :heavy_check_mark: | Moderation latency in milliseconds | 50 | +| `generationTime` | *number* | :heavy_check_mark: | Time taken for generation in milliseconds | 1200 | +| `finishReason` | *string* | :heavy_check_mark: | Reason the generation finished | stop | +| `tokensPrompt` | *number* | :heavy_check_mark: | Number of tokens in the prompt | 10 | +| `tokensCompletion` | *number* | :heavy_check_mark: | Number of tokens in the completion | 25 | +| `nativeTokensPrompt` | *number* | :heavy_check_mark: | Native prompt tokens as reported by provider | 10 | +| `nativeTokensCompletion` | *number* | :heavy_check_mark: | Native completion tokens as reported by provider | 25 | +| `nativeTokensCompletionImages` | *number* | :heavy_check_mark: | Native completion image tokens as reported by provider | 0 | +| `nativeTokensReasoning` | *number* | :heavy_check_mark: | Native reasoning tokens as reported by provider | 5 | +| `nativeTokensCached` | *number* | :heavy_check_mark: | Native cached tokens as reported by provider | 3 | +| `numMediaPrompt` | *number* | :heavy_check_mark: | Number of media items in the prompt | 1 | +| `numInputAudioPrompt` | *number* | :heavy_check_mark: | Number of audio inputs in the prompt | 0 | +| `numMediaCompletion` | *number* | :heavy_check_mark: | Number of media items in the completion | 0 | +| `numSearchResults` | *number* | :heavy_check_mark: | Number of search results included | 5 | +| `origin` | *string* | :heavy_check_mark: | Origin URL of the request | https://openrouter.ai/ | +| `usage` | *number* | :heavy_check_mark: | Usage amount in USD | 0.0015 | +| `isByok` | *boolean* | :heavy_check_mark: | Whether this used bring-your-own-key | false | +| `nativeFinishReason` | *string* | :heavy_check_mark: | Native finish reason as reported by provider | stop | +| `externalUser` | *string* | :heavy_check_mark: | External user identifier | user-123 | +| `apiType` | [operations.ApiType](../../models/operations/apitype.md) | :heavy_check_mark: | Type of API used for the generation | | +| `router` | *string* | :heavy_check_mark: | Router used for the request (e.g., openrouter/auto) | openrouter/auto | +| `providerResponses` | [models.ProviderResponse](../../models/providerresponse.md)[] | :heavy_check_mark: | List of provider responses for this generation, including fallback attempts | | +| `userAgent` | *string* | :heavy_check_mark: | User-Agent header from the request | | +| `httpReferer` | *string* | :heavy_check_mark: | Referer header from the request | | +| `requestId` | *string* | :heavy_minus_sign: | Unique identifier grouping all generations from a single API request | req-1727282430-aBcDeFgHiJkLmNoPqRsT | +| `sessionId` | *string* | :heavy_minus_sign: | Session identifier grouping multiple generations in the same session | | \ No newline at end of file diff --git a/docs/models/operations/getgenerationrequest.md b/docs/models/operations/getgenerationrequest.md index 721877b0..ab182ccd 100644 --- a/docs/models/operations/getgenerationrequest.md +++ b/docs/models/operations/getgenerationrequest.md @@ -6,15 +6,15 @@ import { GetGenerationRequest } from "@openrouter/sdk/models/operations"; let value: GetGenerationRequest = { - id: "", + id: "gen-1234567890", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| -| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| -| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `id` | *string* | :heavy_check_mark: | The generation ID | gen-1234567890 | \ No newline at end of file diff --git a/docs/models/operations/getguardraildata.md b/docs/models/operations/getguardraildata.md deleted file mode 100644 index ed56bce7..00000000 --- a/docs/models/operations/getguardraildata.md +++ /dev/null @@ -1,31 +0,0 @@ -# GetGuardrailData - -The guardrail - -## Example Usage - -```typescript -import { GetGuardrailData } from "@openrouter/sdk/models/operations"; - -let value: GetGuardrailData = { - id: "550e8400-e29b-41d4-a716-446655440000", - name: "Production Guardrail", - createdAt: "2025-08-24T10:30:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `name` | *string* | :heavy_check_mark: | Name of the guardrail | Production Guardrail | -| `description` | *string* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment | -| `limitUsd` | *number* | :heavy_minus_sign: | Spending limit in USD | 100 | -| `resetInterval` | [operations.GetGuardrailResetInterval](../../models/operations/getguardrailresetinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | -| `allowedProviders` | *string*[] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] | -| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | -| `allowedModels` | *string*[] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | -| `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | false | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z | -| `updatedAt` | *string* | :heavy_minus_sign: | ISO 8601 timestamp of when the guardrail was last updated | 2025-08-24T15:45:00Z | \ No newline at end of file diff --git a/docs/models/operations/getguardrailresetinterval.md b/docs/models/operations/getguardrailresetinterval.md deleted file mode 100644 index 3b74eace..00000000 --- a/docs/models/operations/getguardrailresetinterval.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetGuardrailResetInterval - -Interval at which the limit resets (daily, weekly, monthly) - -## Example Usage - -```typescript -import { GetGuardrailResetInterval } from "@openrouter/sdk/models/operations"; - -let value: GetGuardrailResetInterval = "monthly"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"daily" | "weekly" | "monthly" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/operations/getguardrailresponse.md b/docs/models/operations/getguardrailresponse.md deleted file mode 100644 index 1f501c88..00000000 --- a/docs/models/operations/getguardrailresponse.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetGuardrailResponse - -Guardrail details - -## Example Usage - -```typescript -import { GetGuardrailResponse } from "@openrouter/sdk/models/operations"; - -let value: GetGuardrailResponse = { - data: { - id: "550e8400-e29b-41d4-a716-446655440000", - name: "Production Guardrail", - createdAt: "2025-08-24T10:30:00Z", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.GetGuardrailData](../../models/operations/getguardraildata.md) | :heavy_check_mark: | The guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} | \ No newline at end of file diff --git a/docs/models/operations/getmodelsrequest.md b/docs/models/operations/getmodelsrequest.md index 584f2c71..2b9e2e53 100644 --- a/docs/models/operations/getmodelsrequest.md +++ b/docs/models/operations/getmodelsrequest.md @@ -16,5 +16,5 @@ let value: GetModelsRequest = {}; | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `category` | [operations.Category](../../models/operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming | -| `supportedParameters` | *string* | :heavy_minus_sign: | N/A | | +| `supportedParameters` | *string* | :heavy_minus_sign: | Filter models by supported parameter (comma-separated) | temperature | | `outputModalities` | *string* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text | \ No newline at end of file diff --git a/docs/models/operations/getuseractivityrequest.md b/docs/models/operations/getuseractivityrequest.md index b42df01f..3761cd02 100644 --- a/docs/models/operations/getuseractivityrequest.md +++ b/docs/models/operations/getuseractivityrequest.md @@ -15,4 +15,6 @@ let value: GetUserActivityRequest = {}; | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `date` | *string* | :heavy_minus_sign: | Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). | 2025-08-24 | \ No newline at end of file +| `date` | *string* | :heavy_minus_sign: | Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). | 2025-08-24 | +| `apiKeyHash` | *string* | :heavy_minus_sign: | Filter by API key hash (SHA-256 hex string, as returned by the keys API). | abc123def456... | +| `userId` | *string* | :heavy_minus_sign: | Filter by org member user ID. Only applicable for organization accounts. | user_abc123 | \ No newline at end of file diff --git a/docs/models/operations/getuseractivityresponse.md b/docs/models/operations/getuseractivityresponse.md deleted file mode 100644 index 6276d5ef..00000000 --- a/docs/models/operations/getuseractivityresponse.md +++ /dev/null @@ -1,33 +0,0 @@ -# GetUserActivityResponse - -Returns user activity data grouped by endpoint - -## Example Usage - -```typescript -import { GetUserActivityResponse } from "@openrouter/sdk/models/operations"; - -let value: GetUserActivityResponse = { - data: [ - { - date: "2025-08-24", - model: "openai/gpt-4.1", - modelPermaslug: "openai/gpt-4.1-2025-04-14", - endpointId: "550e8400-e29b-41d4-a716-446655440000", - providerName: "OpenAI", - usage: 0.015, - byokUsageInference: 0.012, - requests: 5, - promptTokens: 50, - completionTokens: 125, - reasoningTokens: 25, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `data` | [models.ActivityItem](../../models/activityitem.md)[] | :heavy_check_mark: | List of activity items | \ No newline at end of file diff --git a/docs/models/operations/inputunion.md b/docs/models/operations/inputunion.md index d9f8b763..0989515a 100644 --- a/docs/models/operations/inputunion.md +++ b/docs/models/operations/inputunion.md @@ -1,12 +1,14 @@ # InputUnion +Text, token, or multimodal input(s) to embed + ## Supported Types ### `string` ```typescript -const value: string = ""; +const value: string = "The quick brown fox jumps over the lazy dog"; ``` ### `string[]` diff --git a/docs/models/operations/listendpointsrequest.md b/docs/models/operations/listendpointsrequest.md index a5eecdd5..6298ca21 100644 --- a/docs/models/operations/listendpointsrequest.md +++ b/docs/models/operations/listendpointsrequest.md @@ -6,17 +6,17 @@ import { ListEndpointsRequest } from "@openrouter/sdk/models/operations"; let value: ListEndpointsRequest = { - author: "", - slug: "", + author: "openai", + slug: "gpt-4", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| -| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| -| `author` | *string* | :heavy_check_mark: | N/A | -| `slug` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `author` | *string* | :heavy_check_mark: | The author/organization of the model | openai | +| `slug` | *string* | :heavy_check_mark: | The model slug | gpt-4 | \ No newline at end of file diff --git a/docs/models/operations/listendpointsresponse.md b/docs/models/operations/listendpointsresponse.md index cd366c60..a97e086b 100644 --- a/docs/models/operations/listendpointsresponse.md +++ b/docs/models/operations/listendpointsresponse.md @@ -44,10 +44,10 @@ let value: ListEndpointsResponse = { "temperature", "top_p", "max_tokens", - "frequency_penalty", - "presence_penalty", ], uptimeLast30m: 99.5, + uptimeLast5m: 100, + uptimeLast1d: 99.8, supportsImplicitCaching: true, latencyLast30m: { p50: 0.25, @@ -69,6 +69,6 @@ let value: ListEndpointsResponse = { ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [models.ListEndpointsResponse](../../models/listendpointsresponse.md) | :heavy_check_mark: | List of available endpoints for a model | {
"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-\u003etext",
"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",
"request": "0",
"image": "0"
},
"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"
],
"status": "default",
"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
}
}
]
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [models.ListEndpointsResponse](../../models/listendpointsresponse.md) | :heavy_check_mark: | List of available endpoints for a model | {
"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-\u003etext",
"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",
"request": "0",
"image": "0"
},
"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"
],
"status": "default",
"uptime_last_30m": 99.5,
"uptime_last_5m": 100,
"uptime_last_1d": 99.8,
"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
}
}
]
} | \ No newline at end of file diff --git a/docs/models/operations/listendpointszdrresponse.md b/docs/models/operations/listendpointszdrresponse.md index 92153e5a..4c8d2ef2 100644 --- a/docs/models/operations/listendpointszdrresponse.md +++ b/docs/models/operations/listendpointszdrresponse.md @@ -29,6 +29,8 @@ let value: ListEndpointsZdrResponse = { "max_tokens", ], uptimeLast30m: 99.5, + uptimeLast5m: 100, + uptimeLast1d: 99.8, supportsImplicitCaching: true, latencyLast30m: { p50: 0.25, diff --git a/docs/models/operations/listguardrailkeyassignmentsdata.md b/docs/models/operations/listguardrailkeyassignmentsdata.md deleted file mode 100644 index 14a67512..00000000 --- a/docs/models/operations/listguardrailkeyassignmentsdata.md +++ /dev/null @@ -1,29 +0,0 @@ -# ListGuardrailKeyAssignmentsData - -## Example Usage - -```typescript -import { ListGuardrailKeyAssignmentsData } from "@openrouter/sdk/models/operations"; - -let value: ListGuardrailKeyAssignmentsData = { - id: "550e8400-e29b-41d4-a716-446655440000", - keyHash: "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", - guardrailId: "550e8400-e29b-41d4-a716-446655440001", - keyName: "Production Key", - keyLabel: "prod-key", - assignedBy: "user_abc123", - createdAt: "2025-08-24T10:30:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the assignment | 550e8400-e29b-41d4-a716-446655440000 | -| `keyHash` | *string* | :heavy_check_mark: | Hash of the assigned API key | c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 | -| `guardrailId` | *string* | :heavy_check_mark: | ID of the guardrail | 550e8400-e29b-41d4-a716-446655440001 | -| `keyName` | *string* | :heavy_check_mark: | Name of the API key | Production Key | -| `keyLabel` | *string* | :heavy_check_mark: | Label of the API key | prod-key | -| `assignedBy` | *string* | :heavy_check_mark: | User ID of who made the assignment | user_abc123 | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the assignment was created | 2025-08-24T10:30:00Z | \ No newline at end of file diff --git a/docs/models/operations/listguardrailkeyassignmentsrequest.md b/docs/models/operations/listguardrailkeyassignmentsrequest.md index ea9fca67..98960de4 100644 --- a/docs/models/operations/listguardrailkeyassignmentsrequest.md +++ b/docs/models/operations/listguardrailkeyassignmentsrequest.md @@ -18,5 +18,5 @@ let value: ListGuardrailKeyAssignmentsRequest = { | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `offset` | *string* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | -| `limit` | *string* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file +| `offset` | *number* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | +| `limit` | *number* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/models/operations/listguardrailkeyassignmentsresponse.md b/docs/models/operations/listguardrailkeyassignmentsresponse.md index 386a0775..b88efeb7 100644 --- a/docs/models/operations/listguardrailkeyassignmentsresponse.md +++ b/docs/models/operations/listguardrailkeyassignmentsresponse.md @@ -1,32 +1,31 @@ # ListGuardrailKeyAssignmentsResponse -List of key assignments - ## Example Usage ```typescript import { ListGuardrailKeyAssignmentsResponse } from "@openrouter/sdk/models/operations"; let value: ListGuardrailKeyAssignmentsResponse = { - data: [ - { - id: "550e8400-e29b-41d4-a716-446655440000", - keyHash: - "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", - guardrailId: "550e8400-e29b-41d4-a716-446655440001", - keyName: "Production Key", - keyLabel: "prod-key", - assignedBy: "user_abc123", - createdAt: "2025-08-24T10:30:00Z", - }, - ], - totalCount: 25, + result: { + data: [ + { + id: "550e8400-e29b-41d4-a716-446655440000", + keyHash: + "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", + guardrailId: "550e8400-e29b-41d4-a716-446655440001", + keyName: "Production Key", + keyLabel: "prod-key", + assignedBy: "user_abc123", + createdAt: "2025-08-24T10:30:00Z", + }, + ], + totalCount: 1, + }, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `data` | [operations.ListGuardrailKeyAssignmentsData](../../models/operations/listguardrailkeyassignmentsdata.md)[] | :heavy_check_mark: | List of key assignments | | -| `totalCount` | *number* | :heavy_check_mark: | Total number of key assignments for this guardrail | 25 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `result` | [models.ListKeyAssignmentsResponse](../../models/listkeyassignmentsresponse.md) | :heavy_check_mark: | N/A | {
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"key_hash": "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93",
"guardrail_id": "550e8400-e29b-41d4-a716-446655440001",
"key_name": "Production Key",
"key_label": "prod-key",
"assigned_by": "user_abc123",
"created_at": "2025-08-24T10:30:00Z"
}
],
"total_count": 1
} | \ No newline at end of file diff --git a/docs/models/operations/listguardrailmemberassignmentsdata.md b/docs/models/operations/listguardrailmemberassignmentsdata.md deleted file mode 100644 index bccd30f3..00000000 --- a/docs/models/operations/listguardrailmemberassignmentsdata.md +++ /dev/null @@ -1,27 +0,0 @@ -# ListGuardrailMemberAssignmentsData - -## Example Usage - -```typescript -import { ListGuardrailMemberAssignmentsData } from "@openrouter/sdk/models/operations"; - -let value: ListGuardrailMemberAssignmentsData = { - id: "550e8400-e29b-41d4-a716-446655440000", - userId: "user_abc123", - organizationId: "org_xyz789", - guardrailId: "550e8400-e29b-41d4-a716-446655440001", - assignedBy: "user_abc123", - createdAt: "2025-08-24T10:30:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the assignment | 550e8400-e29b-41d4-a716-446655440000 | -| `userId` | *string* | :heavy_check_mark: | Clerk user ID of the assigned member | user_abc123 | -| `organizationId` | *string* | :heavy_check_mark: | Organization ID | org_xyz789 | -| `guardrailId` | *string* | :heavy_check_mark: | ID of the guardrail | 550e8400-e29b-41d4-a716-446655440001 | -| `assignedBy` | *string* | :heavy_check_mark: | User ID of who made the assignment | user_abc123 | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the assignment was created | 2025-08-24T10:30:00Z | \ No newline at end of file diff --git a/docs/models/operations/listguardrailmemberassignmentsrequest.md b/docs/models/operations/listguardrailmemberassignmentsrequest.md index 6c3d33e2..c8c6940d 100644 --- a/docs/models/operations/listguardrailmemberassignmentsrequest.md +++ b/docs/models/operations/listguardrailmemberassignmentsrequest.md @@ -18,5 +18,5 @@ let value: ListGuardrailMemberAssignmentsRequest = { | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `offset` | *string* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | -| `limit` | *string* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file +| `offset` | *number* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | +| `limit` | *number* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/models/operations/listguardrailmemberassignmentsresponse.md b/docs/models/operations/listguardrailmemberassignmentsresponse.md index 297a6a89..e0dc5243 100644 --- a/docs/models/operations/listguardrailmemberassignmentsresponse.md +++ b/docs/models/operations/listguardrailmemberassignmentsresponse.md @@ -1,30 +1,29 @@ # ListGuardrailMemberAssignmentsResponse -List of member assignments - ## Example Usage ```typescript import { ListGuardrailMemberAssignmentsResponse } from "@openrouter/sdk/models/operations"; let value: ListGuardrailMemberAssignmentsResponse = { - data: [ - { - id: "550e8400-e29b-41d4-a716-446655440000", - userId: "user_abc123", - organizationId: "org_xyz789", - guardrailId: "550e8400-e29b-41d4-a716-446655440001", - assignedBy: "user_abc123", - createdAt: "2025-08-24T10:30:00Z", - }, - ], - totalCount: 10, + result: { + data: [ + { + id: "550e8400-e29b-41d4-a716-446655440000", + userId: "user_abc123", + organizationId: "org_xyz789", + guardrailId: "550e8400-e29b-41d4-a716-446655440001", + assignedBy: "user_abc123", + createdAt: "2025-08-24T10:30:00Z", + }, + ], + totalCount: 1, + }, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.ListGuardrailMemberAssignmentsData](../../models/operations/listguardrailmemberassignmentsdata.md)[] | :heavy_check_mark: | List of member assignments | | -| `totalCount` | *number* | :heavy_check_mark: | Total number of member assignments | 10 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `result` | [models.ListMemberAssignmentsResponse](../../models/listmemberassignmentsresponse.md) | :heavy_check_mark: | N/A | {
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "user_abc123",
"organization_id": "org_xyz789",
"guardrail_id": "550e8400-e29b-41d4-a716-446655440001",
"assigned_by": "user_abc123",
"created_at": "2025-08-24T10:30:00Z"
}
],
"total_count": 1
} | \ No newline at end of file diff --git a/docs/models/operations/listguardrailsdata.md b/docs/models/operations/listguardrailsdata.md deleted file mode 100644 index d0b8b4e9..00000000 --- a/docs/models/operations/listguardrailsdata.md +++ /dev/null @@ -1,29 +0,0 @@ -# ListGuardrailsData - -## Example Usage - -```typescript -import { ListGuardrailsData } from "@openrouter/sdk/models/operations"; - -let value: ListGuardrailsData = { - id: "550e8400-e29b-41d4-a716-446655440000", - name: "Production Guardrail", - createdAt: "2025-08-24T10:30:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `name` | *string* | :heavy_check_mark: | Name of the guardrail | Production Guardrail | -| `description` | *string* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment | -| `limitUsd` | *number* | :heavy_minus_sign: | Spending limit in USD | 100 | -| `resetInterval` | [operations.ListGuardrailsResetInterval](../../models/operations/listguardrailsresetinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | -| `allowedProviders` | *string*[] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] | -| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | -| `allowedModels` | *string*[] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | -| `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | false | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z | -| `updatedAt` | *string* | :heavy_minus_sign: | ISO 8601 timestamp of when the guardrail was last updated | 2025-08-24T15:45:00Z | \ No newline at end of file diff --git a/docs/models/operations/listguardrailsrequest.md b/docs/models/operations/listguardrailsrequest.md index fd4c9ded..1d9c1ad9 100644 --- a/docs/models/operations/listguardrailsrequest.md +++ b/docs/models/operations/listguardrailsrequest.md @@ -15,5 +15,5 @@ let value: ListGuardrailsRequest = {}; | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `offset` | *string* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | -| `limit` | *string* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file +| `offset` | *number* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | +| `limit` | *number* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/models/operations/listguardrailsresetinterval.md b/docs/models/operations/listguardrailsresetinterval.md deleted file mode 100644 index 4295722e..00000000 --- a/docs/models/operations/listguardrailsresetinterval.md +++ /dev/null @@ -1,19 +0,0 @@ -# ListGuardrailsResetInterval - -Interval at which the limit resets (daily, weekly, monthly) - -## Example Usage - -```typescript -import { ListGuardrailsResetInterval } from "@openrouter/sdk/models/operations"; - -let value: ListGuardrailsResetInterval = "monthly"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"daily" | "weekly" | "monthly" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/operations/listguardrailsresponse.md b/docs/models/operations/listguardrailsresponse.md index f32e01e8..b2a857e8 100644 --- a/docs/models/operations/listguardrailsresponse.md +++ b/docs/models/operations/listguardrailsresponse.md @@ -1,27 +1,26 @@ # ListGuardrailsResponse -List of guardrails - ## Example Usage ```typescript import { ListGuardrailsResponse } from "@openrouter/sdk/models/operations"; let value: ListGuardrailsResponse = { - data: [ - { - id: "550e8400-e29b-41d4-a716-446655440000", - name: "Production Guardrail", - createdAt: "2025-08-24T10:30:00Z", - }, - ], - totalCount: 1, + result: { + data: [ + { + id: "550e8400-e29b-41d4-a716-446655440000", + name: "Production Guardrail", + createdAt: "2025-08-24T10:30:00Z", + }, + ], + totalCount: 1, + }, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `data` | [operations.ListGuardrailsData](../../models/operations/listguardrailsdata.md)[] | :heavy_check_mark: | List of guardrails | | -| `totalCount` | *number* | :heavy_check_mark: | Total number of guardrails | 25 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `result` | [models.ListGuardrailsResponse](../../models/listguardrailsresponse.md) | :heavy_check_mark: | N/A | {
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
}
],
"total_count": 1
} | \ No newline at end of file diff --git a/docs/models/operations/listkeyassignmentsdata.md b/docs/models/operations/listkeyassignmentsdata.md deleted file mode 100644 index e30d8132..00000000 --- a/docs/models/operations/listkeyassignmentsdata.md +++ /dev/null @@ -1,29 +0,0 @@ -# ListKeyAssignmentsData - -## Example Usage - -```typescript -import { ListKeyAssignmentsData } from "@openrouter/sdk/models/operations"; - -let value: ListKeyAssignmentsData = { - id: "550e8400-e29b-41d4-a716-446655440000", - keyHash: "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", - guardrailId: "550e8400-e29b-41d4-a716-446655440001", - keyName: "Production Key", - keyLabel: "prod-key", - assignedBy: "user_abc123", - createdAt: "2025-08-24T10:30:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the assignment | 550e8400-e29b-41d4-a716-446655440000 | -| `keyHash` | *string* | :heavy_check_mark: | Hash of the assigned API key | c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 | -| `guardrailId` | *string* | :heavy_check_mark: | ID of the guardrail | 550e8400-e29b-41d4-a716-446655440001 | -| `keyName` | *string* | :heavy_check_mark: | Name of the API key | Production Key | -| `keyLabel` | *string* | :heavy_check_mark: | Label of the API key | prod-key | -| `assignedBy` | *string* | :heavy_check_mark: | User ID of who made the assignment | user_abc123 | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the assignment was created | 2025-08-24T10:30:00Z | \ No newline at end of file diff --git a/docs/models/operations/listkeyassignmentsrequest.md b/docs/models/operations/listkeyassignmentsrequest.md index aee7f115..5c3f8d71 100644 --- a/docs/models/operations/listkeyassignmentsrequest.md +++ b/docs/models/operations/listkeyassignmentsrequest.md @@ -15,5 +15,5 @@ let value: ListKeyAssignmentsRequest = {}; | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `offset` | *string* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | -| `limit` | *string* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file +| `offset` | *number* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | +| `limit` | *number* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/models/operations/listkeyassignmentsresponse.md b/docs/models/operations/listkeyassignmentsresponse.md index bdce9b8e..884f706d 100644 --- a/docs/models/operations/listkeyassignmentsresponse.md +++ b/docs/models/operations/listkeyassignmentsresponse.md @@ -1,32 +1,31 @@ # ListKeyAssignmentsResponse -List of key assignments - ## Example Usage ```typescript import { ListKeyAssignmentsResponse } from "@openrouter/sdk/models/operations"; let value: ListKeyAssignmentsResponse = { - data: [ - { - id: "550e8400-e29b-41d4-a716-446655440000", - keyHash: - "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", - guardrailId: "550e8400-e29b-41d4-a716-446655440001", - keyName: "Production Key", - keyLabel: "prod-key", - assignedBy: "user_abc123", - createdAt: "2025-08-24T10:30:00Z", - }, - ], - totalCount: 25, + result: { + data: [ + { + id: "550e8400-e29b-41d4-a716-446655440000", + keyHash: + "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", + guardrailId: "550e8400-e29b-41d4-a716-446655440001", + keyName: "Production Key", + keyLabel: "prod-key", + assignedBy: "user_abc123", + createdAt: "2025-08-24T10:30:00Z", + }, + ], + totalCount: 1, + }, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `data` | [operations.ListKeyAssignmentsData](../../models/operations/listkeyassignmentsdata.md)[] | :heavy_check_mark: | List of key assignments | | -| `totalCount` | *number* | :heavy_check_mark: | Total number of key assignments for this guardrail | 25 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `result` | [models.ListKeyAssignmentsResponse](../../models/listkeyassignmentsresponse.md) | :heavy_check_mark: | N/A | {
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"key_hash": "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93",
"guardrail_id": "550e8400-e29b-41d4-a716-446655440001",
"key_name": "Production Key",
"key_label": "prod-key",
"assigned_by": "user_abc123",
"created_at": "2025-08-24T10:30:00Z"
}
],
"total_count": 1
} | \ No newline at end of file diff --git a/docs/models/operations/listmemberassignmentsdata.md b/docs/models/operations/listmemberassignmentsdata.md deleted file mode 100644 index 52d09761..00000000 --- a/docs/models/operations/listmemberassignmentsdata.md +++ /dev/null @@ -1,27 +0,0 @@ -# ListMemberAssignmentsData - -## Example Usage - -```typescript -import { ListMemberAssignmentsData } from "@openrouter/sdk/models/operations"; - -let value: ListMemberAssignmentsData = { - id: "550e8400-e29b-41d4-a716-446655440000", - userId: "user_abc123", - organizationId: "org_xyz789", - guardrailId: "550e8400-e29b-41d4-a716-446655440001", - assignedBy: "user_abc123", - createdAt: "2025-08-24T10:30:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the assignment | 550e8400-e29b-41d4-a716-446655440000 | -| `userId` | *string* | :heavy_check_mark: | Clerk user ID of the assigned member | user_abc123 | -| `organizationId` | *string* | :heavy_check_mark: | Organization ID | org_xyz789 | -| `guardrailId` | *string* | :heavy_check_mark: | ID of the guardrail | 550e8400-e29b-41d4-a716-446655440001 | -| `assignedBy` | *string* | :heavy_check_mark: | User ID of who made the assignment | user_abc123 | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the assignment was created | 2025-08-24T10:30:00Z | \ No newline at end of file diff --git a/docs/models/operations/listmemberassignmentsrequest.md b/docs/models/operations/listmemberassignmentsrequest.md index 9d8e2840..c8c39bf7 100644 --- a/docs/models/operations/listmemberassignmentsrequest.md +++ b/docs/models/operations/listmemberassignmentsrequest.md @@ -15,5 +15,5 @@ let value: ListMemberAssignmentsRequest = {}; | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `offset` | *string* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | -| `limit` | *string* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file +| `offset` | *number* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | +| `limit` | *number* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/models/operations/listmemberassignmentsresponse.md b/docs/models/operations/listmemberassignmentsresponse.md index d9d9bb77..cf85071e 100644 --- a/docs/models/operations/listmemberassignmentsresponse.md +++ b/docs/models/operations/listmemberassignmentsresponse.md @@ -1,21 +1,29 @@ # ListMemberAssignmentsResponse -List of member assignments - ## Example Usage ```typescript import { ListMemberAssignmentsResponse } from "@openrouter/sdk/models/operations"; let value: ListMemberAssignmentsResponse = { - data: [], - totalCount: 10, + result: { + data: [ + { + id: "550e8400-e29b-41d4-a716-446655440000", + userId: "user_abc123", + organizationId: "org_xyz789", + guardrailId: "550e8400-e29b-41d4-a716-446655440001", + assignedBy: "user_abc123", + createdAt: "2025-08-24T10:30:00Z", + }, + ], + totalCount: 1, + }, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `data` | [operations.ListMemberAssignmentsData](../../models/operations/listmemberassignmentsdata.md)[] | :heavy_check_mark: | List of member assignments | | -| `totalCount` | *number* | :heavy_check_mark: | Total number of member assignments | 10 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `result` | [models.ListMemberAssignmentsResponse](../../models/listmemberassignmentsresponse.md) | :heavy_check_mark: | N/A | {
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "user_abc123",
"organization_id": "org_xyz789",
"guardrail_id": "550e8400-e29b-41d4-a716-446655440001",
"assigned_by": "user_abc123",
"created_at": "2025-08-24T10:30:00Z"
}
],
"total_count": 1
} | \ No newline at end of file diff --git a/docs/models/operations/listrequest.md b/docs/models/operations/listrequest.md index a29359f4..3104d412 100644 --- a/docs/models/operations/listrequest.md +++ b/docs/models/operations/listrequest.md @@ -16,4 +16,4 @@ let value: ListRequest = {}; | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `includeDisabled` | *string* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false | -| `offset` | *string* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 | \ No newline at end of file +| `offset` | *number* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 | \ No newline at end of file diff --git a/docs/models/operations/metadata.md b/docs/models/operations/metadata.md deleted file mode 100644 index 597c48b5..00000000 --- a/docs/models/operations/metadata.md +++ /dev/null @@ -1,21 +0,0 @@ -# Metadata - -## Example Usage - -```typescript -import { Metadata } from "@openrouter/sdk/models/operations"; - -let value: Metadata = { - chainId: 5773.31, - contractAddress: "", - sender: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `chainId` | *number* | :heavy_check_mark: | N/A | -| `contractAddress` | *string* | :heavy_check_mark: | N/A | -| `sender` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/providername.md b/docs/models/operations/providername.md deleted file mode 100644 index 37cc7202..00000000 --- a/docs/models/operations/providername.md +++ /dev/null @@ -1,17 +0,0 @@ -# ProviderName - -## Example Usage - -```typescript -import { ProviderName } from "@openrouter/sdk/models/operations"; - -let value: ProviderName = "Lambda"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"AnyScale" | "Atoma" | "Cent-ML" | "CrofAI" | "Enfer" | "GoPomelo" | "HuggingFace" | "Hyperbolic 2" | "InoCloud" | "Kluster" | "Lambda" | "Lepton" | "Lynn 2" | "Lynn" | "Mancer" | "Meta" | "Modal" | "Nineteen" | "OctoAI" | "Recursal" | "Reflection" | "Replicate" | "SambaNova 2" | "SF Compute" | "Targon" | "Together 2" | "Ubicloud" | "01.AI" | "AkashML" | "AI21" | "AionLabs" | "Alibaba" | "Ambient" | "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" | "Google" | "Google AI Studio" | "Groq" | "Hyperbolic" | "Inception" | "Inceptron" | "InferenceNet" | "Ionstream" | "Infermatic" | "Io Net" | "Inflection" | "Liquid" | "Mara" | "Mancer 2" | "Minimax" | "ModelRun" | "Mistral" | "Modular" | "Moonshot AI" | "Morph" | "NCompass" | "Nebius" | "NextBit" | "Novita" | "Nvidia" | "OpenAI" | "OpenInference" | "Parasail" | "Perplexity" | "Phala" | "Reka" | "Relace" | "SambaNova" | "Seed" | "SiliconFlow" | "Sourceful" | "StepFun" | "Stealth" | "StreamLake" | "Switchpoint" | "Together" | "Upstage" | "Venice" | "WandB" | "Xiaomi" | "xAI" | "Z.AI" | "FakeProvider" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/operations/providerresponse.md b/docs/models/operations/providerresponse.md deleted file mode 100644 index f4c34c04..00000000 --- a/docs/models/operations/providerresponse.md +++ /dev/null @@ -1,23 +0,0 @@ -# ProviderResponse - -## Example Usage - -```typescript -import { ProviderResponse } from "@openrouter/sdk/models/operations"; - -let value: ProviderResponse = { - status: 9155.58, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `endpointId` | *string* | :heavy_minus_sign: | N/A | -| `modelPermaslug` | *string* | :heavy_minus_sign: | N/A | -| `providerName` | [operations.ProviderName](../../models/operations/providername.md) | :heavy_minus_sign: | N/A | -| `status` | *number* | :heavy_check_mark: | N/A | -| `latency` | *number* | :heavy_minus_sign: | N/A | -| `isByok` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/sendchatcompletionrequestrequest.md b/docs/models/operations/sendchatcompletionrequestrequest.md index ae5e2912..1539973a 100644 --- a/docs/models/operations/sendchatcompletionrequestrequest.md +++ b/docs/models/operations/sendchatcompletionrequestrequest.md @@ -17,7 +17,6 @@ let value: SendChatCompletionRequestRequest = { content: "What is the capital of France?", }, ], - temperature: 0.7, }, }; ``` diff --git a/docs/models/operations/transferintent.md b/docs/models/operations/transferintent.md deleted file mode 100644 index be14c3de..00000000 --- a/docs/models/operations/transferintent.md +++ /dev/null @@ -1,34 +0,0 @@ -# TransferIntent - -## Example Usage - -```typescript -import { TransferIntent } from "@openrouter/sdk/models/operations"; - -let value: TransferIntent = { - callData: { - deadline: "", - feeAmount: "", - id: "", - operator: "", - prefix: "", - recipient: "", - recipientAmount: "", - recipientCurrency: "", - refundDestination: "", - signature: "", - }, - metadata: { - chainId: 7497.17, - contractAddress: "", - sender: "", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `callData` | [operations.CallData](../../models/operations/calldata.md) | :heavy_check_mark: | N/A | -| `metadata` | [operations.Metadata](../../models/operations/metadata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateguardraildata.md b/docs/models/operations/updateguardraildata.md deleted file mode 100644 index 22cbd14e..00000000 --- a/docs/models/operations/updateguardraildata.md +++ /dev/null @@ -1,31 +0,0 @@ -# UpdateGuardrailData - -The updated guardrail - -## Example Usage - -```typescript -import { UpdateGuardrailData } from "@openrouter/sdk/models/operations"; - -let value: UpdateGuardrailData = { - id: "550e8400-e29b-41d4-a716-446655440000", - name: "Production Guardrail", - createdAt: "2025-08-24T10:30:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `name` | *string* | :heavy_check_mark: | Name of the guardrail | Production Guardrail | -| `description` | *string* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment | -| `limitUsd` | *number* | :heavy_minus_sign: | Spending limit in USD | 100 | -| `resetInterval` | [operations.UpdateGuardrailResetIntervalResponse](../../models/operations/updateguardrailresetintervalresponse.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | -| `allowedProviders` | *string*[] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] | -| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | -| `allowedModels` | *string*[] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | -| `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | false | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z | -| `updatedAt` | *string* | :heavy_minus_sign: | ISO 8601 timestamp of when the guardrail was last updated | 2025-08-24T15:45:00Z | \ No newline at end of file diff --git a/docs/models/operations/updateguardrailrequest.md b/docs/models/operations/updateguardrailrequest.md index 1a3aa633..32c1938d 100644 --- a/docs/models/operations/updateguardrailrequest.md +++ b/docs/models/operations/updateguardrailrequest.md @@ -7,7 +7,7 @@ import { UpdateGuardrailRequest } from "@openrouter/sdk/models/operations"; let value: UpdateGuardrailRequest = { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: {}, + updateGuardrailRequest: {}, }; ``` @@ -19,4 +19,4 @@ let value: UpdateGuardrailRequest = { | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 | -| `requestBody` | [operations.UpdateGuardrailRequestBody](../../models/operations/updateguardrailrequestbody.md) | :heavy_check_mark: | N/A | {
"name": "Updated Guardrail Name",
"description": "Updated description",
"limit_usd": 75,
"reset_interval": "weekly"
} | \ No newline at end of file +| `updateGuardrailRequest` | [models.UpdateGuardrailRequest](../../models/updateguardrailrequest.md) | :heavy_check_mark: | N/A | {
"name": "Updated Guardrail Name",
"description": "Updated description",
"limit_usd": 75,
"reset_interval": "weekly"
} | \ No newline at end of file diff --git a/docs/models/operations/updateguardrailrequestbody.md b/docs/models/operations/updateguardrailrequestbody.md deleted file mode 100644 index 02e8d2bc..00000000 --- a/docs/models/operations/updateguardrailrequestbody.md +++ /dev/null @@ -1,22 +0,0 @@ -# UpdateGuardrailRequestBody - -## Example Usage - -```typescript -import { UpdateGuardrailRequestBody } from "@openrouter/sdk/models/operations"; - -let value: UpdateGuardrailRequestBody = {}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | New name for the guardrail | Updated Guardrail Name | -| `description` | *string* | :heavy_minus_sign: | New description for the guardrail | Updated description | -| `limitUsd` | *number* | :heavy_minus_sign: | New spending limit in USD | 75 | -| `resetInterval` | [operations.UpdateGuardrailResetIntervalRequest](../../models/operations/updateguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | -| `allowedProviders` | *string*[] | :heavy_minus_sign: | New list of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] | -| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | -| `allowedModels` | *string*[] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2"
] | -| `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | true | \ No newline at end of file diff --git a/docs/models/operations/updateguardrailresetintervalrequest.md b/docs/models/operations/updateguardrailresetintervalrequest.md deleted file mode 100644 index 8e6f6716..00000000 --- a/docs/models/operations/updateguardrailresetintervalrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# UpdateGuardrailResetIntervalRequest - -Interval at which the limit resets (daily, weekly, monthly) - -## Example Usage - -```typescript -import { UpdateGuardrailResetIntervalRequest } from "@openrouter/sdk/models/operations"; - -let value: UpdateGuardrailResetIntervalRequest = "monthly"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"daily" | "weekly" | "monthly" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/operations/updateguardrailresetintervalresponse.md b/docs/models/operations/updateguardrailresetintervalresponse.md deleted file mode 100644 index c4c13495..00000000 --- a/docs/models/operations/updateguardrailresetintervalresponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# UpdateGuardrailResetIntervalResponse - -Interval at which the limit resets (daily, weekly, monthly) - -## Example Usage - -```typescript -import { UpdateGuardrailResetIntervalResponse } from "@openrouter/sdk/models/operations"; - -let value: UpdateGuardrailResetIntervalResponse = "monthly"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"daily" | "weekly" | "monthly" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/operations/updateguardrailresponse.md b/docs/models/operations/updateguardrailresponse.md deleted file mode 100644 index 51f061f5..00000000 --- a/docs/models/operations/updateguardrailresponse.md +++ /dev/null @@ -1,23 +0,0 @@ -# UpdateGuardrailResponse - -Guardrail updated successfully - -## Example Usage - -```typescript -import { UpdateGuardrailResponse } from "@openrouter/sdk/models/operations"; - -let value: UpdateGuardrailResponse = { - data: { - id: "550e8400-e29b-41d4-a716-446655440000", - name: "Updated Guardrail Name", - createdAt: "2025-08-24T10:30:00Z", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.UpdateGuardrailData](../../models/operations/updateguardraildata.md) | :heavy_check_mark: | The updated guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} | \ No newline at end of file diff --git a/docs/models/operations/usage.md b/docs/models/operations/usage.md deleted file mode 100644 index 9fd02485..00000000 --- a/docs/models/operations/usage.md +++ /dev/null @@ -1,20 +0,0 @@ -# Usage - -## Example Usage - -```typescript -import { Usage } from "@openrouter/sdk/models/operations"; - -let value: Usage = { - promptTokens: 9797.96, - totalTokens: 7874.4, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `promptTokens` | *number* | :heavy_check_mark: | N/A | -| `totalTokens` | *number* | :heavy_check_mark: | N/A | -| `cost` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/web3data.md b/docs/models/operations/web3data.md deleted file mode 100644 index a47730ad..00000000 --- a/docs/models/operations/web3data.md +++ /dev/null @@ -1,35 +0,0 @@ -# Web3Data - -## Example Usage - -```typescript -import { Web3Data } from "@openrouter/sdk/models/operations"; - -let value: Web3Data = { - transferIntent: { - callData: { - deadline: "", - feeAmount: "", - id: "", - operator: "", - prefix: "", - recipient: "", - recipientAmount: "", - recipientCurrency: "", - refundDestination: "", - signature: "", - }, - metadata: { - chainId: 7497.17, - contractAddress: "", - sender: "", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `transferIntent` | [operations.TransferIntent](../../models/operations/transferintent.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/outputmodality.md b/docs/models/outputmodality.md index 1efcd8a3..8552be6c 100644 --- a/docs/models/outputmodality.md +++ b/docs/models/outputmodality.md @@ -13,5 +13,5 @@ let value: OutputModality = "text"; ## Values ```typescript -"text" | "image" | "embeddings" | "audio" | "video" | Unrecognized +"text" | "image" | "embeddings" | "audio" | "video" | "rerank" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/outputtokensdetails.md b/docs/models/outputtokensdetails.md index 294456ad..7d5103ff 100644 --- a/docs/models/outputtokensdetails.md +++ b/docs/models/outputtokensdetails.md @@ -6,7 +6,7 @@ import { OutputTokensDetails } from "@openrouter/sdk/models"; let value: OutputTokensDetails = { - reasoningTokens: 4785.27, + reasoningTokens: 478527, }; ``` diff --git a/docs/models/pdfparserengine.md b/docs/models/pdfparserengine.md index 99aa61a7..dad11a13 100644 --- a/docs/models/pdfparserengine.md +++ b/docs/models/pdfparserengine.md @@ -8,7 +8,7 @@ The engine to use for parsing PDF files. "pdf-text" is deprecated and automatica ### `models.PDFParserEngineEnum` ```typescript -const value: models.PDFParserEngineEnum = "native"; +const value: models.PDFParserEngineEnum = "cloudflare-ai"; ``` ### `models.PDFParserEnginePDFText` diff --git a/docs/models/pdfparseroptions.md b/docs/models/pdfparseroptions.md index 6868a31d..b51efdb5 100644 --- a/docs/models/pdfparseroptions.md +++ b/docs/models/pdfparseroptions.md @@ -12,6 +12,6 @@ let value: PDFParserOptions = {}; ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `engine` | *models.PDFParserEngine* | :heavy_minus_sign: | The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai". | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `engine` | *models.PDFParserEngine* | :heavy_minus_sign: | The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai". | cloudflare-ai | \ No newline at end of file diff --git a/docs/models/providerpreferences.md b/docs/models/providerpreferences.md index 306c9db4..f42d7dbb 100644 --- a/docs/models/providerpreferences.md +++ b/docs/models/providerpreferences.md @@ -1,6 +1,6 @@ # ProviderPreferences -Provider routing preferences for the request. +When multiple model providers are available, optionally indicate your routing preference. ## Example Usage @@ -19,11 +19,11 @@ let value: ProviderPreferences = {}; | `dataCollection` | [models.DataCollection](../models/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.
- allow: (default) allow providers which store user data non-transiently and may train on it

- deny: use only providers which do not collect user data. | allow | | `zdr` | *boolean* | :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 | | `enforceDistillableText` | *boolean* | :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` | *models.ProviderPreferencesOrder*[] | :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` | *models.ProviderPreferencesOnly*[] | :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` | *models.ProviderPreferencesIgnore*[] | :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. | | +| `order` | *models.Order*[] | :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. | [
"openai",
"anthropic"
] | +| `only` | *models.Only*[] | :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. | [
"openai",
"anthropic"
] | +| `ignore` | *models.Ignore*[] | :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. | [
"openai",
"anthropic"
] | | `quantizations` | [models.Quantization](../models/quantization.md)[] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | | -| `sort` | *models.ProviderPreferencesSortUnion* | :heavy_minus_sign: | N/A | price | -| `maxPrice` | [models.ProviderPreferencesMaxPrice](../models/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. | | +| `sort` | *models.Sort* | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | price | +| `maxPrice` | [models.MaxPrice](../models/maxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | | | `preferredMinThroughput` | *models.PreferredMinThroughput* | :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 | | `preferredMaxLatency` | *models.PreferredMaxLatency* | :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 | \ No newline at end of file diff --git a/docs/models/providerpreferencesby.md b/docs/models/providerpreferencesby.md deleted file mode 100644 index 8fa6b2fc..00000000 --- a/docs/models/providerpreferencesby.md +++ /dev/null @@ -1,19 +0,0 @@ -# ProviderPreferencesBy - -The provider sorting strategy (price, throughput, latency) - -## Example Usage - -```typescript -import { ProviderPreferencesBy } from "@openrouter/sdk/models"; - -let value: ProviderPreferencesBy = "price"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"price" | "throughput" | "latency" | "exacto" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/providerpreferencesignore.md b/docs/models/providerpreferencesignore.md deleted file mode 100644 index d14a7d5e..00000000 --- a/docs/models/providerpreferencesignore.md +++ /dev/null @@ -1,17 +0,0 @@ -# ProviderPreferencesIgnore - - -## Supported Types - -### `models.ProviderName` - -```typescript -const value: models.ProviderName = "OpenAI"; -``` - -### `string` - -```typescript -const value: string = ""; -``` - diff --git a/docs/models/providerpreferencesmaxprice.md b/docs/models/providerpreferencesmaxprice.md deleted file mode 100644 index 329af3fb..00000000 --- a/docs/models/providerpreferencesmaxprice.md +++ /dev/null @@ -1,21 +0,0 @@ -# ProviderPreferencesMaxPrice - -The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. - -## Example Usage - -```typescript -import { ProviderPreferencesMaxPrice } from "@openrouter/sdk/models"; - -let value: ProviderPreferencesMaxPrice = {}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `prompt` | *string* | :heavy_minus_sign: | Price per million prompt tokens | 1000 | -| `completion` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `image` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `audio` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `request` | *string* | :heavy_minus_sign: | N/A | 1000 | \ No newline at end of file diff --git a/docs/models/providerpreferencesonly.md b/docs/models/providerpreferencesonly.md deleted file mode 100644 index 9240a5ee..00000000 --- a/docs/models/providerpreferencesonly.md +++ /dev/null @@ -1,17 +0,0 @@ -# ProviderPreferencesOnly - - -## Supported Types - -### `models.ProviderName` - -```typescript -const value: models.ProviderName = "OpenAI"; -``` - -### `string` - -```typescript -const value: string = ""; -``` - diff --git a/docs/models/providerpreferencesorder.md b/docs/models/providerpreferencesorder.md deleted file mode 100644 index 0937f38f..00000000 --- a/docs/models/providerpreferencesorder.md +++ /dev/null @@ -1,17 +0,0 @@ -# ProviderPreferencesOrder - - -## Supported Types - -### `models.ProviderName` - -```typescript -const value: models.ProviderName = "OpenAI"; -``` - -### `string` - -```typescript -const value: string = ""; -``` - diff --git a/docs/models/providerpreferencespartition.md b/docs/models/providerpreferencespartition.md deleted file mode 100644 index 3c1d3ffe..00000000 --- a/docs/models/providerpreferencespartition.md +++ /dev/null @@ -1,19 +0,0 @@ -# ProviderPreferencesPartition - -Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. - -## Example Usage - -```typescript -import { ProviderPreferencesPartition } from "@openrouter/sdk/models"; - -let value: ProviderPreferencesPartition = "model"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"model" | "none" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/providerpreferencesprovidersort.md b/docs/models/providerpreferencesprovidersort.md deleted file mode 100644 index e9b44bf1..00000000 --- a/docs/models/providerpreferencesprovidersort.md +++ /dev/null @@ -1,19 +0,0 @@ -# ProviderPreferencesProviderSort - -The provider sorting strategy (price, throughput, latency) - -## Example Usage - -```typescript -import { ProviderPreferencesProviderSort } from "@openrouter/sdk/models"; - -let value: ProviderPreferencesProviderSort = "price"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"price" | "throughput" | "latency" | "exacto" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/providerpreferencesprovidersortconfig.md b/docs/models/providerpreferencesprovidersortconfig.md deleted file mode 100644 index 5fe0b816..00000000 --- a/docs/models/providerpreferencesprovidersortconfig.md +++ /dev/null @@ -1,16 +0,0 @@ -# ProviderPreferencesProviderSortConfig - -## Example Usage - -```typescript -import { ProviderPreferencesProviderSortConfig } from "@openrouter/sdk/models"; - -let value: ProviderPreferencesProviderSortConfig = {}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `by` | [models.ProviderPreferencesBy](../models/providerpreferencesby.md) | :heavy_minus_sign: | The provider sorting strategy (price, throughput, latency) | price | -| `partition` | [models.ProviderPreferencesPartition](../models/providerpreferencespartition.md) | :heavy_minus_sign: | Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. | model | \ No newline at end of file diff --git a/docs/models/providerpreferencesprovidersortconfigenum.md b/docs/models/providerpreferencesprovidersortconfigenum.md deleted file mode 100644 index 488f7814..00000000 --- a/docs/models/providerpreferencesprovidersortconfigenum.md +++ /dev/null @@ -1,15 +0,0 @@ -# ProviderPreferencesProviderSortConfigEnum - -## Example Usage - -```typescript -import { ProviderPreferencesProviderSortConfigEnum } from "@openrouter/sdk/models"; - -let value: ProviderPreferencesProviderSortConfigEnum = "price"; -``` - -## Values - -```typescript -"price" | "throughput" | "latency" | "exacto" -``` \ No newline at end of file diff --git a/docs/models/providerpreferencesprovidersortconfigunion.md b/docs/models/providerpreferencesprovidersortconfigunion.md deleted file mode 100644 index ae0d8d18..00000000 --- a/docs/models/providerpreferencesprovidersortconfigunion.md +++ /dev/null @@ -1,19 +0,0 @@ -# ProviderPreferencesProviderSortConfigUnion - -The provider sorting strategy (price, throughput, latency) - - -## Supported Types - -### `models.ProviderPreferencesProviderSortConfig` - -```typescript -const value: models.ProviderPreferencesProviderSortConfig = {}; -``` - -### `models.ProviderPreferencesProviderSortConfigEnum` - -```typescript -const value: models.ProviderPreferencesProviderSortConfigEnum = "exacto"; -``` - diff --git a/docs/models/providerpreferencessortenum.md b/docs/models/providerpreferencessortenum.md deleted file mode 100644 index ed6e30ea..00000000 --- a/docs/models/providerpreferencessortenum.md +++ /dev/null @@ -1,17 +0,0 @@ -# ProviderPreferencesSortEnum - -## Example Usage - -```typescript -import { ProviderPreferencesSortEnum } from "@openrouter/sdk/models"; - -let value: ProviderPreferencesSortEnum = "price"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"price" | "throughput" | "latency" | "exacto" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/providerpreferencessortunion.md b/docs/models/providerpreferencessortunion.md deleted file mode 100644 index c71c5597..00000000 --- a/docs/models/providerpreferencessortunion.md +++ /dev/null @@ -1,25 +0,0 @@ -# ProviderPreferencesSortUnion - -The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. - - -## Supported Types - -### `models.ProviderPreferencesProviderSort` - -```typescript -const value: models.ProviderPreferencesProviderSort = "price"; -``` - -### `models.ProviderPreferencesProviderSortConfigUnion` - -```typescript -const value: models.ProviderPreferencesProviderSortConfigUnion = "price"; -``` - -### `models.ProviderPreferencesSortEnum` - -```typescript -const value: models.ProviderPreferencesSortEnum = "price"; -``` - diff --git a/docs/models/publicendpoint.md b/docs/models/publicendpoint.md index d334bf19..5e05689b 100644 --- a/docs/models/publicendpoint.md +++ b/docs/models/publicendpoint.md @@ -27,6 +27,8 @@ let value: PublicEndpoint = { "max_tokens", ], uptimeLast30m: 99.5, + uptimeLast5m: 100, + uptimeLast1d: 99.8, supportsImplicitCaching: true, latencyLast30m: { p50: 0.25, @@ -60,6 +62,8 @@ let value: PublicEndpoint = { | `supportedParameters` | [models.Parameter](../models/parameter.md)[] | :heavy_check_mark: | N/A | | | `status` | [models.EndpointStatus](../models/endpointstatus.md) | :heavy_minus_sign: | N/A | 0 | | `uptimeLast30m` | *number* | :heavy_check_mark: | N/A | | +| `uptimeLast5m` | *number* | :heavy_check_mark: | Uptime percentage over the last 5 minutes, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data. | | +| `uptimeLast1d` | *number* | :heavy_check_mark: | Uptime percentage over the last 1 day, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data. | | | `supportsImplicitCaching` | *boolean* | :heavy_check_mark: | N/A | | -| `latencyLast30m` | [models.PercentileStats](../models/percentilestats.md) | :heavy_check_mark: | Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. | | -| `throughputLast30m` | [models.PercentileStats](../models/percentilestats.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `latencyLast30m` | [models.PercentileStats](../models/percentilestats.md) | :heavy_check_mark: | Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. | {
"p50": 25.5,
"p75": 35.2,
"p90": 48.7,
"p99": 85.3
} | +| `throughputLast30m` | [models.PercentileStats](../models/percentilestats.md) | :heavy_check_mark: | N/A | {
"p50": 25.5,
"p75": 35.2,
"p90": 48.7,
"p99": 85.3
} | \ No newline at end of file diff --git a/docs/models/reasoning.md b/docs/models/reasoning.md index f595b98f..f3909245 100644 --- a/docs/models/reasoning.md +++ b/docs/models/reasoning.md @@ -12,7 +12,7 @@ let value: Reasoning = {}; ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `effort` | [models.Effort](../models/effort.md) | :heavy_minus_sign: | Constrains effort on reasoning for reasoning models | medium | -| `summary` | *any* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `effort` | [models.Effort](../models/effort.md) | :heavy_minus_sign: | Constrains effort on reasoning for reasoning models | medium | +| `summary` | [models.ChatReasoningSummaryVerbosityEnum](../models/chatreasoningsummaryverbosityenum.md) | :heavy_minus_sign: | N/A | concise | \ No newline at end of file diff --git a/docs/models/reasoningdetailencrypted.md b/docs/models/reasoningdetailencrypted.md index 42f226cb..517ea722 100644 --- a/docs/models/reasoningdetailencrypted.md +++ b/docs/models/reasoningdetailencrypted.md @@ -15,10 +15,10 @@ let value: ReasoningDetailEncrypted = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `type` | *"reasoning.encrypted"* | :heavy_check_mark: | N/A | -| `data` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `format` | [models.ReasoningDetailEncryptedFormat](../models/reasoningdetailencryptedformat.md) | :heavy_minus_sign: | N/A | -| `index` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `type` | *"reasoning.encrypted"* | :heavy_check_mark: | N/A | | +| `data` | *string* | :heavy_check_mark: | N/A | | +| `id` | *string* | :heavy_minus_sign: | N/A | | +| `format` | [models.ReasoningFormat](../models/reasoningformat.md) | :heavy_minus_sign: | N/A | unknown | +| `index` | *number* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/reasoningdetailencryptedformat.md b/docs/models/reasoningdetailencryptedformat.md deleted file mode 100644 index 6a53e623..00000000 --- a/docs/models/reasoningdetailencryptedformat.md +++ /dev/null @@ -1,17 +0,0 @@ -# ReasoningDetailEncryptedFormat - -## Example Usage - -```typescript -import { ReasoningDetailEncryptedFormat } from "@openrouter/sdk/models"; - -let value: ReasoningDetailEncryptedFormat = "xai-responses-v1"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"unknown" | "openai-responses-v1" | "azure-openai-responses-v1" | "xai-responses-v1" | "anthropic-claude-v1" | "google-gemini-v1" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/reasoningdetailsummary.md b/docs/models/reasoningdetailsummary.md index 85c377e2..083bcc39 100644 --- a/docs/models/reasoningdetailsummary.md +++ b/docs/models/reasoningdetailsummary.md @@ -16,10 +16,10 @@ let value: ReasoningDetailSummary = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `type` | *"reasoning.summary"* | :heavy_check_mark: | N/A | -| `summary` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `format` | [models.ReasoningDetailSummaryFormat](../models/reasoningdetailsummaryformat.md) | :heavy_minus_sign: | N/A | -| `index` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `type` | *"reasoning.summary"* | :heavy_check_mark: | N/A | | +| `summary` | *string* | :heavy_check_mark: | N/A | | +| `id` | *string* | :heavy_minus_sign: | N/A | | +| `format` | [models.ReasoningFormat](../models/reasoningformat.md) | :heavy_minus_sign: | N/A | unknown | +| `index` | *number* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/reasoningdetailsummaryformat.md b/docs/models/reasoningdetailsummaryformat.md deleted file mode 100644 index 62cf8a26..00000000 --- a/docs/models/reasoningdetailsummaryformat.md +++ /dev/null @@ -1,17 +0,0 @@ -# ReasoningDetailSummaryFormat - -## Example Usage - -```typescript -import { ReasoningDetailSummaryFormat } from "@openrouter/sdk/models"; - -let value: ReasoningDetailSummaryFormat = "unknown"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"unknown" | "openai-responses-v1" | "azure-openai-responses-v1" | "xai-responses-v1" | "anthropic-claude-v1" | "google-gemini-v1" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/reasoningdetailtext.md b/docs/models/reasoningdetailtext.md index 0a428c24..4396b4e1 100644 --- a/docs/models/reasoningdetailtext.md +++ b/docs/models/reasoningdetailtext.md @@ -14,11 +14,11 @@ let value: ReasoningDetailText = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `type` | *"reasoning.text"* | :heavy_check_mark: | N/A | -| `text` | *string* | :heavy_minus_sign: | N/A | -| `signature` | *string* | :heavy_minus_sign: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `format` | [models.ReasoningDetailTextFormat](../models/reasoningdetailtextformat.md) | :heavy_minus_sign: | N/A | -| `index` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `type` | *"reasoning.text"* | :heavy_check_mark: | N/A | | +| `text` | *string* | :heavy_minus_sign: | N/A | | +| `signature` | *string* | :heavy_minus_sign: | N/A | | +| `id` | *string* | :heavy_minus_sign: | N/A | | +| `format` | [models.ReasoningFormat](../models/reasoningformat.md) | :heavy_minus_sign: | N/A | unknown | +| `index` | *number* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/reasoningdetailtextformat.md b/docs/models/reasoningdetailtextformat.md deleted file mode 100644 index b1a3b686..00000000 --- a/docs/models/reasoningdetailtextformat.md +++ /dev/null @@ -1,17 +0,0 @@ -# ReasoningDetailTextFormat - -## Example Usage - -```typescript -import { ReasoningDetailTextFormat } from "@openrouter/sdk/models"; - -let value: ReasoningDetailTextFormat = "xai-responses-v1"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"unknown" | "openai-responses-v1" | "azure-openai-responses-v1" | "xai-responses-v1" | "anthropic-claude-v1" | "google-gemini-v1" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/responseoutputtext.md b/docs/models/responseoutputtext.md index 76338eb3..c0d9c093 100644 --- a/docs/models/responseoutputtext.md +++ b/docs/models/responseoutputtext.md @@ -13,9 +13,9 @@ let value: ResponseOutputText = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `type` | *"output_text"* | :heavy_check_mark: | N/A | -| `text` | *string* | :heavy_check_mark: | N/A | -| `annotations` | *models.OpenAIResponsesAnnotation*[] | :heavy_minus_sign: | N/A | -| `logprobs` | [models.ResponseOutputTextLogprob](../models/responseoutputtextlogprob.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `type` | *"output_text"* | :heavy_check_mark: | N/A | +| `text` | *string* | :heavy_check_mark: | N/A | +| `annotations` | *models.OpenAIResponsesAnnotation*[] | :heavy_minus_sign: | N/A | +| `logprobs` | [models.Logprob](../models/logprob.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/responseoutputtexttoplogprob.md b/docs/models/responseoutputtexttoplogprob.md index 9e5fada5..353ea6cf 100644 --- a/docs/models/responseoutputtexttoplogprob.md +++ b/docs/models/responseoutputtexttoplogprob.md @@ -8,8 +8,8 @@ import { ResponseOutputTextTopLogprob } from "@openrouter/sdk/models"; let value: ResponseOutputTextTopLogprob = { token: "", bytes: [ - 3036.17, - 344.14, + 303617, + 34414, ], logprob: 1976.4, }; diff --git a/docs/models/tokenizer.md b/docs/models/tokenizer.md index 38a08a8f..c8cb31d3 100644 --- a/docs/models/tokenizer.md +++ b/docs/models/tokenizer.md @@ -15,5 +15,5 @@ let value: Tokenizer = "GPT"; ## Values ```typescript -"Router" | "Media" | "Other" | "GPT" | "Claude" | "Gemini" | "Grok" | "Cohere" | "Nova" | "Qwen" | "Yi" | "DeepSeek" | "Mistral" | "Llama2" | "Llama3" | "Llama4" | "PaLM" | "RWKV" | "Qwen3" | Unrecognized +"Router" | "Media" | "Other" | "GPT" | "Claude" | "Gemini" | "Gemma" | "Grok" | "Cohere" | "Nova" | "Qwen" | "Yi" | "DeepSeek" | "Mistral" | "Llama2" | "Llama3" | "Llama4" | "PaLM" | "RWKV" | "Qwen3" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/urlcitation.md b/docs/models/urlcitation.md index 284cac10..0e621668 100644 --- a/docs/models/urlcitation.md +++ b/docs/models/urlcitation.md @@ -7,10 +7,10 @@ import { URLCitation } from "@openrouter/sdk/models"; let value: URLCitation = { type: "url_citation", - url: "https://openrouter.ai/docs", - title: "OpenRouter Documentation", - startIndex: 0, - endIndex: 42, + url: "https://self-reliant-other.net", + title: "", + startIndex: 222525, + endIndex: 287418, }; ``` diff --git a/docs/models/websearchengine.md b/docs/models/websearchengine.md index cc70585e..142e52f7 100644 --- a/docs/models/websearchengine.md +++ b/docs/models/websearchengine.md @@ -7,7 +7,7 @@ The search engine to use for web search. ```typescript import { WebSearchEngine } from "@openrouter/sdk/models"; -let value: WebSearchEngine = "native"; +let value: WebSearchEngine = "exa"; // Open enum: unrecognized values are captured as Unrecognized ``` diff --git a/docs/sdks/analytics/README.md b/docs/sdks/analytics/README.md index d74a2206..ffc84727 100644 --- a/docs/sdks/analytics/README.md +++ b/docs/sdks/analytics/README.md @@ -75,7 +75,7 @@ run(); ### Response -**Promise\<[operations.GetUserActivityResponse](../../models/operations/getuseractivityresponse.md)\>** +**Promise\<[models.ActivityResponse](../../models/activityresponse.md)\>** ### Errors @@ -84,5 +84,6 @@ run(); | errors.BadRequestResponseError | 400 | application/json | | errors.UnauthorizedResponseError | 401 | application/json | | errors.ForbiddenResponseError | 403 | application/json | +| errors.NotFoundResponseError | 404 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/apikeys/README.md b/docs/sdks/apikeys/README.md index d5424399..1d2e7c4f 100644 --- a/docs/sdks/apikeys/README.md +++ b/docs/sdks/apikeys/README.md @@ -112,6 +112,10 @@ async function run() { const result = await openRouter.apiKeys.create({ requestBody: { name: "My New API Key", + limit: 50, + limitReset: "monthly", + includeByokInLimit: true, + expiresAt: new Date("2027-12-31T23:59:59Z"), }, }); @@ -142,6 +146,10 @@ async function run() { const res = await apiKeysCreate(openRouter, { requestBody: { name: "My New API Key", + limit: 50, + limitReset: "monthly", + includeByokInLimit: true, + expiresAt: new Date("2027-12-31T23:59:59Z"), }, }); if (res.ok) { @@ -198,7 +206,13 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.apiKeys.update({ hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", - requestBody: {}, + requestBody: { + name: "Updated API Key Name", + disabled: false, + limit: 75, + limitReset: "daily", + includeByokInLimit: true, + }, }); console.log(result); @@ -227,7 +241,13 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await apiKeysUpdate(openRouter, { hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", - requestBody: {}, + requestBody: { + name: "Updated API Key Name", + disabled: false, + limit: 75, + limitReset: "daily", + includeByokInLimit: true, + }, }); if (res.ok) { const { value: result } = res; diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index bebcd579..9151ae34 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -36,6 +36,8 @@ async function run() { content: "What is the capital of France?", }, ], + model: "openai/gpt-4", + maxTokens: 150, temperature: 0.7, }, }); @@ -76,6 +78,8 @@ async function run() { content: "What is the capital of France?", }, ], + model: "openai/gpt-4", + maxTokens: 150, temperature: 0.7, }, }); diff --git a/docs/sdks/credits/README.md b/docs/sdks/credits/README.md index ee5a6600..a902be6f 100644 --- a/docs/sdks/credits/README.md +++ b/docs/sdks/credits/README.md @@ -7,7 +7,6 @@ Credit management endpoints ### Available Operations * [getCredits](#getcredits) - Get remaining credits -* [createCoinbaseCharge](#createcoinbasecharge) - Create a Coinbase charge for crypto payment ## getCredits @@ -85,98 +84,4 @@ run(); | errors.UnauthorizedResponseError | 401 | application/json | | errors.ForbiddenResponseError | 403 | application/json | | errors.InternalServerResponseError | 500 | application/json | -| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | - -## createCoinbaseCharge - -Create a Coinbase charge for crypto payment - -### Example Usage - - -```typescript -import { OpenRouter } from "@openrouter/sdk"; - -const openRouter = new OpenRouter({ - httpReferer: "", - appTitle: "", - appCategories: "", -}); - -async function run() { - const result = await openRouter.credits.createCoinbaseCharge({ - bearer: process.env["OPENROUTER_BEARER"] ?? "", - }, { - createChargeRequest: { - amount: 100, - sender: "0x1234567890123456789012345678901234567890", - chainId: 1, - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { creditsCreateCoinbaseCharge } from "@openrouter/sdk/funcs/creditsCreateCoinbaseCharge.js"; - -// Use `OpenRouterCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const openRouter = new OpenRouterCore({ - httpReferer: "", - appTitle: "", - appCategories: "", -}); - -async function run() { - const res = await creditsCreateCoinbaseCharge(openRouter, { - bearer: process.env["OPENROUTER_BEARER"] ?? "", - }, { - createChargeRequest: { - amount: 100, - sender: "0x1234567890123456789012345678901234567890", - chainId: 1, - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("creditsCreateCoinbaseCharge failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateCoinbaseChargeRequest](../../models/operations/createcoinbasechargerequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `security` | [operations.CreateCoinbaseChargeSecurity](../../models/operations/createcoinbasechargesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.CreateCoinbaseChargeResponse](../../models/operations/createcoinbasechargeresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.BadRequestResponseError | 400 | application/json | -| errors.UnauthorizedResponseError | 401 | application/json | -| errors.TooManyRequestsResponseError | 429 | application/json | -| errors.InternalServerResponseError | 500 | application/json | -| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/embeddings/README.md b/docs/sdks/embeddings/README.md index 286acc1a..835b2250 100644 --- a/docs/sdks/embeddings/README.md +++ b/docs/sdks/embeddings/README.md @@ -29,8 +29,8 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.embeddings.generate({ requestBody: { - input: "", - model: "Taurus", + input: "The quick brown fox jumps over the lazy dog", + model: "openai/text-embedding-3-small", }, }); @@ -60,8 +60,8 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await embeddingsGenerate(openRouter, { requestBody: { - input: "", - model: "Taurus", + input: "The quick brown fox jumps over the lazy dog", + model: "openai/text-embedding-3-small", }, }); if (res.ok) { diff --git a/docs/sdks/guardrails/README.md b/docs/sdks/guardrails/README.md index e55ef8b0..472a89c8 100644 --- a/docs/sdks/guardrails/README.md +++ b/docs/sdks/guardrails/README.md @@ -40,7 +40,9 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.guardrails.list(); - console.log(result); + for await (const page of result) { + console.log(page); + } } run(); @@ -67,7 +69,9 @@ async function run() { const res = await guardrailsList(openRouter); if (res.ok) { const { value: result } = res; - console.log(result); + for await (const page of result) { + console.log(page); + } } else { console.log("guardrailsList failed:", res.error); } @@ -116,8 +120,19 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.guardrails.create({ - requestBody: { + createGuardrailRequest: { name: "My New Guardrail", + description: "A guardrail for limiting API usage", + limitUsd: 50, + resetInterval: "monthly", + allowedProviders: [ + "openai", + "anthropic", + "deepseek", + ], + ignoredProviders: null, + allowedModels: null, + enforceZdr: false, }, }); @@ -146,8 +161,19 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await guardrailsCreate(openRouter, { - requestBody: { + createGuardrailRequest: { name: "My New Guardrail", + description: "A guardrail for limiting API usage", + limitUsd: 50, + resetInterval: "monthly", + allowedProviders: [ + "openai", + "anthropic", + "deepseek", + ], + ignoredProviders: null, + allowedModels: null, + enforceZdr: false, }, }); if (res.ok) { @@ -172,7 +198,7 @@ run(); ### Response -**Promise\<[operations.CreateGuardrailResponse](../../models/operations/createguardrailresponse.md)\>** +**Promise\<[models.CreateGuardrailResponse](../../models/createguardrailresponse.md)\>** ### Errors @@ -254,7 +280,7 @@ run(); ### Response -**Promise\<[operations.GetGuardrailResponse](../../models/operations/getguardrailresponse.md)\>** +**Promise\<[models.GetGuardrailResponse](../../models/getguardrailresponse.md)\>** ### Errors @@ -285,7 +311,12 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.guardrails.update({ id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: {}, + updateGuardrailRequest: { + name: "Updated Guardrail Name", + description: "Updated description", + limitUsd: 75, + resetInterval: "weekly", + }, }); console.log(result); @@ -314,7 +345,12 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await guardrailsUpdate(openRouter, { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: {}, + updateGuardrailRequest: { + name: "Updated Guardrail Name", + description: "Updated description", + limitUsd: 75, + resetInterval: "weekly", + }, }); if (res.ok) { const { value: result } = res; @@ -338,7 +374,7 @@ run(); ### Response -**Promise\<[operations.UpdateGuardrailResponse](../../models/operations/updateguardrailresponse.md)\>** +**Promise\<[models.UpdateGuardrailResponse](../../models/updateguardrailresponse.md)\>** ### Errors @@ -421,7 +457,7 @@ run(); ### Response -**Promise\<[operations.DeleteGuardrailResponse](../../models/operations/deleteguardrailresponse.md)\>** +**Promise\<[models.DeleteGuardrailResponse](../../models/deleteguardrailresponse.md)\>** ### Errors @@ -452,7 +488,9 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.guardrails.listKeyAssignments(); - console.log(result); + for await (const page of result) { + console.log(page); + } } run(); @@ -479,7 +517,9 @@ async function run() { const res = await guardrailsListKeyAssignments(openRouter); if (res.ok) { const { value: result } = res; - console.log(result); + for await (const page of result) { + console.log(page); + } } else { console.log("guardrailsListKeyAssignments failed:", res.error); } @@ -529,7 +569,9 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.guardrails.listMemberAssignments(); - console.log(result); + for await (const page of result) { + console.log(page); + } } run(); @@ -556,7 +598,9 @@ async function run() { const res = await guardrailsListMemberAssignments(openRouter); if (res.ok) { const { value: result } = res; - console.log(result); + for await (const page of result) { + console.log(page); + } } else { console.log("guardrailsListMemberAssignments failed:", res.error); } @@ -608,7 +652,9 @@ async function run() { id: "550e8400-e29b-41d4-a716-446655440000", }); - console.log(result); + for await (const page of result) { + console.log(page); + } } run(); @@ -637,7 +683,9 @@ async function run() { }); if (res.ok) { const { value: result } = res; - console.log(result); + for await (const page of result) { + console.log(page); + } } else { console.log("guardrailsListGuardrailKeyAssignments failed:", res.error); } @@ -688,7 +736,7 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.guardrails.bulkAssignKeys({ id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkAssignKeysRequest: { keyHashes: [ "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", ], @@ -721,7 +769,7 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await guardrailsBulkAssignKeys(openRouter, { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkAssignKeysRequest: { keyHashes: [ "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", ], @@ -749,7 +797,7 @@ run(); ### Response -**Promise\<[operations.BulkAssignKeysToGuardrailResponse](../../models/operations/bulkassignkeystoguardrailresponse.md)\>** +**Promise\<[models.BulkAssignKeysResponse](../../models/bulkassignkeysresponse.md)\>** ### Errors @@ -783,7 +831,9 @@ async function run() { id: "550e8400-e29b-41d4-a716-446655440000", }); - console.log(result); + for await (const page of result) { + console.log(page); + } } run(); @@ -812,7 +862,9 @@ async function run() { }); if (res.ok) { const { value: result } = res; - console.log(result); + for await (const page of result) { + console.log(page); + } } else { console.log("guardrailsListGuardrailMemberAssignments failed:", res.error); } @@ -863,7 +915,7 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.guardrails.bulkAssignMembers({ id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkAssignMembersRequest: { memberUserIds: [ "user_abc123", "user_def456", @@ -897,7 +949,7 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await guardrailsBulkAssignMembers(openRouter, { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkAssignMembersRequest: { memberUserIds: [ "user_abc123", "user_def456", @@ -926,7 +978,7 @@ run(); ### Response -**Promise\<[operations.BulkAssignMembersToGuardrailResponse](../../models/operations/bulkassignmemberstoguardrailresponse.md)\>** +**Promise\<[models.BulkAssignMembersResponse](../../models/bulkassignmembersresponse.md)\>** ### Errors @@ -958,7 +1010,7 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.guardrails.bulkUnassignKeys({ id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkUnassignKeysRequest: { keyHashes: [ "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", ], @@ -991,7 +1043,7 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await guardrailsBulkUnassignKeys(openRouter, { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkUnassignKeysRequest: { keyHashes: [ "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", ], @@ -1019,7 +1071,7 @@ run(); ### Response -**Promise\<[operations.BulkUnassignKeysFromGuardrailResponse](../../models/operations/bulkunassignkeysfromguardrailresponse.md)\>** +**Promise\<[models.BulkUnassignKeysResponse](../../models/bulkunassignkeysresponse.md)\>** ### Errors @@ -1051,7 +1103,7 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.guardrails.bulkUnassignMembers({ id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkUnassignMembersRequest: { memberUserIds: [ "user_abc123", "user_def456", @@ -1085,7 +1137,7 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await guardrailsBulkUnassignMembers(openRouter, { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkUnassignMembersRequest: { memberUserIds: [ "user_abc123", "user_def456", @@ -1114,7 +1166,7 @@ run(); ### Response -**Promise\<[operations.BulkUnassignMembersFromGuardrailResponse](../../models/operations/bulkunassignmembersfromguardrailresponse.md)\>** +**Promise\<[models.BulkUnassignMembersResponse](../../models/bulkunassignmembersresponse.md)\>** ### Errors diff --git a/docs/sdks/oauth/README.md b/docs/sdks/oauth/README.md index c3e6fb2b..6d1bb8cb 100644 --- a/docs/sdks/oauth/README.md +++ b/docs/sdks/oauth/README.md @@ -30,6 +30,8 @@ async function run() { const result = await openRouter.oAuth.exchangeAuthCodeForAPIKey({ requestBody: { code: "auth_code_abc123def456", + codeVerifier: "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", + codeChallengeMethod: "S256", }, }); @@ -60,6 +62,8 @@ async function run() { const res = await oAuthExchangeAuthCodeForAPIKey(openRouter, { requestBody: { code: "auth_code_abc123def456", + codeVerifier: "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", + codeChallengeMethod: "S256", }, }); if (res.ok) { @@ -116,6 +120,9 @@ async function run() { const result = await openRouter.oAuth.createAuthCode({ requestBody: { callbackUrl: "https://myapp.com/auth/callback", + codeChallenge: "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM", + codeChallengeMethod: "S256", + limit: 100, }, }); @@ -146,6 +153,9 @@ async function run() { const res = await oAuthCreateAuthCode(openRouter, { requestBody: { callbackUrl: "https://myapp.com/auth/callback", + codeChallenge: "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM", + codeChallengeMethod: "S256", + limit: 100, }, }); if (res.ok) { diff --git a/docs/sdks/responses/README.md b/docs/sdks/responses/README.md index 20c266d3..7002690c 100644 --- a/docs/sdks/responses/README.md +++ b/docs/sdks/responses/README.md @@ -27,7 +27,10 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.beta.responses.send({ - responsesRequest: {}, + responsesRequest: { + input: "Tell me a joke", + model: "openai/gpt-4o", + }, }); console.log(result); @@ -55,7 +58,10 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await betaResponsesSend(openRouter, { - responsesRequest: {}, + responsesRequest: { + input: "Tell me a joke", + model: "openai/gpt-4o", + }, }); if (res.ok) { const { value: result } = res; diff --git a/examples/betaResponsesSend.example.ts b/examples/betaResponsesSend.example.ts index b14adcbe..a86eda34 100644 --- a/examples/betaResponsesSend.example.ts +++ b/examples/betaResponsesSend.example.ts @@ -23,7 +23,10 @@ const openRouter = new OpenRouter({ async function main() { const result = await openRouter.beta.responses.send({ - responsesRequest: {}, + responsesRequest: { + input: "Tell me a joke", + model: "openai/gpt-4o", + }, }); console.log(result); diff --git a/jsr.json b/jsr.json index 701d990f..b88f6d3b 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@openrouter/sdk", - "version": "0.11.2", + "version": "0.12.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package.json b/package.json index b1d5bfbd..27e12bd3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/sdk", - "version": "0.11.2", + "version": "0.12.0", "author": "OpenRouter", "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.", "keywords": [ @@ -65,15 +65,15 @@ "lint": "eslint --cache --max-warnings=0 src", "build": "tsc", "prepublishOnly": "npm run build", + "prepare": "npm run build", + "test:e2e": "vitest --run --project e2e", + "test:transit": "exit 0", "compile": "tsc", "postinstall": "node scripts/check-types.js || true", "test": "vitest --run --project unit", - "test:e2e": "vitest --run --project e2e", "test:watch": "vitest --watch --project unit", "typecheck": "tsc --noEmit", - "typecheck:transit": "exit 0", - "test:transit": "exit 0", - "prepare": "npm run build" + "typecheck:transit": "exit 0" }, "peerDependencies": {}, "devDependencies": { diff --git a/src/funcs/analyticsGetUserActivity.ts b/src/funcs/analyticsGetUserActivity.ts index 3fb172c2..ff4692c7 100644 --- a/src/funcs/analyticsGetUserActivity.ts +++ b/src/funcs/analyticsGetUserActivity.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,10 +39,11 @@ export function analyticsGetUserActivity( options?: RequestOptions, ): APIPromise< Result< - operations.GetUserActivityResponse, + models.ActivityResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError + | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError @@ -67,10 +69,11 @@ async function $do( ): Promise< [ Result< - operations.GetUserActivityResponse, + models.ActivityResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError + | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError @@ -99,7 +102,9 @@ async function $do( const path = pathToFunc("/activity")(); const query = encodeFormQuery({ + "api_key_hash": payload?.api_key_hash, "date": payload?.date, + "user_id": payload?.user_id, }); const headers = new Headers(compactMap({ @@ -136,8 +141,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -158,7 +173,7 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["400", "401", "403", "4XX", "500", "5XX"], + errorCodes: ["400", "401", "403", "404", "4XX", "500", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -172,10 +187,11 @@ async function $do( }; const [result] = await M.match< - operations.GetUserActivityResponse, + models.ActivityResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError + | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError @@ -186,10 +202,11 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.GetUserActivityResponse$inboundSchema), + M.json(200, models.ActivityResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"), diff --git a/src/funcs/apiKeysCreate.ts b/src/funcs/apiKeysCreate.ts index 15302b5b..b0e0b488 100644 --- a/src/funcs/apiKeysCreate.ts +++ b/src/funcs/apiKeysCreate.ts @@ -132,8 +132,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/apiKeysDelete.ts b/src/funcs/apiKeysDelete.ts index 65e8e4d2..ce7428d9 100644 --- a/src/funcs/apiKeysDelete.ts +++ b/src/funcs/apiKeysDelete.ts @@ -137,8 +137,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/apiKeysGet.ts b/src/funcs/apiKeysGet.ts index 48102f93..a8c7fa6c 100644 --- a/src/funcs/apiKeysGet.ts +++ b/src/funcs/apiKeysGet.ts @@ -137,8 +137,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/apiKeysGetCurrentKeyMetadata.ts b/src/funcs/apiKeysGetCurrentKeyMetadata.ts index 56890099..d953da31 100644 --- a/src/funcs/apiKeysGetCurrentKeyMetadata.ts +++ b/src/funcs/apiKeysGetCurrentKeyMetadata.ts @@ -128,8 +128,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/apiKeysList.ts b/src/funcs/apiKeysList.ts index 8b2d00b5..96a1d04f 100644 --- a/src/funcs/apiKeysList.ts +++ b/src/funcs/apiKeysList.ts @@ -134,8 +134,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/apiKeysUpdate.ts b/src/funcs/apiKeysUpdate.ts index b971db8b..baba4cd7 100644 --- a/src/funcs/apiKeysUpdate.ts +++ b/src/funcs/apiKeysUpdate.ts @@ -140,8 +140,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/betaResponsesSend.ts b/src/funcs/betaResponsesSend.ts index 9bfaa837..753f20ec 100644 --- a/src/funcs/betaResponsesSend.ts +++ b/src/funcs/betaResponsesSend.ts @@ -248,8 +248,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/chatSend.ts b/src/funcs/chatSend.ts index e6dc03e8..a77f61dd 100644 --- a/src/funcs/chatSend.ts +++ b/src/funcs/chatSend.ts @@ -249,8 +249,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/creditsGetCredits.ts b/src/funcs/creditsGetCredits.ts index 81708b67..fd128513 100644 --- a/src/funcs/creditsGetCredits.ts +++ b/src/funcs/creditsGetCredits.ts @@ -130,8 +130,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/embeddingsGenerate.ts b/src/funcs/embeddingsGenerate.ts index 0b51ab86..1cf355c9 100644 --- a/src/funcs/embeddingsGenerate.ts +++ b/src/funcs/embeddingsGenerate.ts @@ -144,8 +144,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/embeddingsListModels.ts b/src/funcs/embeddingsListModels.ts index 03ed629f..edb75a8d 100644 --- a/src/funcs/embeddingsListModels.ts +++ b/src/funcs/embeddingsListModels.ts @@ -131,8 +131,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/endpointsList.ts b/src/funcs/endpointsList.ts index 5934a726..207bee76 100644 --- a/src/funcs/endpointsList.ts +++ b/src/funcs/endpointsList.ts @@ -134,8 +134,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/endpointsListZdrEndpoints.ts b/src/funcs/endpointsListZdrEndpoints.ts index 2b319a71..8346d4fd 100644 --- a/src/funcs/endpointsListZdrEndpoints.ts +++ b/src/funcs/endpointsListZdrEndpoints.ts @@ -123,8 +123,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/generationsGetGeneration.ts b/src/funcs/generationsGetGeneration.ts index 8e6648d6..88f41e8a 100644 --- a/src/funcs/generationsGetGeneration.ts +++ b/src/funcs/generationsGetGeneration.ts @@ -140,8 +140,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/guardrailsBulkAssignKeys.ts b/src/funcs/guardrailsBulkAssignKeys.ts index 7c26b9a8..cc0ef63b 100644 --- a/src/funcs/guardrailsBulkAssignKeys.ts +++ b/src/funcs/guardrailsBulkAssignKeys.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,7 +39,7 @@ export function guardrailsBulkAssignKeys( options?: RequestOptions, ): APIPromise< Result< - operations.BulkAssignKeysToGuardrailResponse, + models.BulkAssignKeysResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -67,7 +68,7 @@ async function $do( ): Promise< [ Result< - operations.BulkAssignKeysToGuardrailResponse, + models.BulkAssignKeysResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -94,7 +95,9 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); + const body = encodeJSON("body", payload.BulkAssignKeysRequest, { + explode: true, + }); const pathParams = { id: encodeSimple("id", payload.id, { @@ -139,8 +142,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -174,7 +187,7 @@ async function $do( }; const [result] = await M.match< - operations.BulkAssignKeysToGuardrailResponse, + models.BulkAssignKeysResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -188,7 +201,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.BulkAssignKeysToGuardrailResponse$inboundSchema), + M.json(200, models.BulkAssignKeysResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), diff --git a/src/funcs/guardrailsBulkAssignMembers.ts b/src/funcs/guardrailsBulkAssignMembers.ts index 9dc855c6..74ca9327 100644 --- a/src/funcs/guardrailsBulkAssignMembers.ts +++ b/src/funcs/guardrailsBulkAssignMembers.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,7 +39,7 @@ export function guardrailsBulkAssignMembers( options?: RequestOptions, ): APIPromise< Result< - operations.BulkAssignMembersToGuardrailResponse, + models.BulkAssignMembersResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -67,7 +68,7 @@ async function $do( ): Promise< [ Result< - operations.BulkAssignMembersToGuardrailResponse, + models.BulkAssignMembersResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -96,7 +97,9 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); + const body = encodeJSON("body", payload.BulkAssignMembersRequest, { + explode: true, + }); const pathParams = { id: encodeSimple("id", payload.id, { @@ -141,8 +144,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -176,7 +189,7 @@ async function $do( }; const [result] = await M.match< - operations.BulkAssignMembersToGuardrailResponse, + models.BulkAssignMembersResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -190,7 +203,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.BulkAssignMembersToGuardrailResponse$inboundSchema), + M.json(200, models.BulkAssignMembersResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), diff --git a/src/funcs/guardrailsBulkUnassignKeys.ts b/src/funcs/guardrailsBulkUnassignKeys.ts index b9fa7e71..67e7a75f 100644 --- a/src/funcs/guardrailsBulkUnassignKeys.ts +++ b/src/funcs/guardrailsBulkUnassignKeys.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,7 +39,7 @@ export function guardrailsBulkUnassignKeys( options?: RequestOptions, ): APIPromise< Result< - operations.BulkUnassignKeysFromGuardrailResponse, + models.BulkUnassignKeysResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -67,7 +68,7 @@ async function $do( ): Promise< [ Result< - operations.BulkUnassignKeysFromGuardrailResponse, + models.BulkUnassignKeysResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -96,7 +97,9 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); + const body = encodeJSON("body", payload.BulkUnassignKeysRequest, { + explode: true, + }); const pathParams = { id: encodeSimple("id", payload.id, { @@ -143,8 +146,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -178,7 +191,7 @@ async function $do( }; const [result] = await M.match< - operations.BulkUnassignKeysFromGuardrailResponse, + models.BulkUnassignKeysResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -192,7 +205,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.BulkUnassignKeysFromGuardrailResponse$inboundSchema), + M.json(200, models.BulkUnassignKeysResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), diff --git a/src/funcs/guardrailsBulkUnassignMembers.ts b/src/funcs/guardrailsBulkUnassignMembers.ts index 16939d93..d0ec8d8b 100644 --- a/src/funcs/guardrailsBulkUnassignMembers.ts +++ b/src/funcs/guardrailsBulkUnassignMembers.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,7 +39,7 @@ export function guardrailsBulkUnassignMembers( options?: RequestOptions, ): APIPromise< Result< - operations.BulkUnassignMembersFromGuardrailResponse, + models.BulkUnassignMembersResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -67,7 +68,7 @@ async function $do( ): Promise< [ Result< - operations.BulkUnassignMembersFromGuardrailResponse, + models.BulkUnassignMembersResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -96,7 +97,9 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); + const body = encodeJSON("body", payload.BulkUnassignMembersRequest, { + explode: true, + }); const pathParams = { id: encodeSimple("id", payload.id, { @@ -143,8 +146,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -178,7 +191,7 @@ async function $do( }; const [result] = await M.match< - operations.BulkUnassignMembersFromGuardrailResponse, + models.BulkUnassignMembersResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -192,10 +205,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json( - 200, - operations.BulkUnassignMembersFromGuardrailResponse$inboundSchema, - ), + M.json(200, models.BulkUnassignMembersResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), diff --git a/src/funcs/guardrailsCreate.ts b/src/funcs/guardrailsCreate.ts index ec426bd1..57dc9e00 100644 --- a/src/funcs/guardrailsCreate.ts +++ b/src/funcs/guardrailsCreate.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,7 +39,7 @@ export function guardrailsCreate( options?: RequestOptions, ): APIPromise< Result< - operations.CreateGuardrailResponse, + models.CreateGuardrailResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.InternalServerResponseError @@ -66,7 +67,7 @@ async function $do( ): Promise< [ Result< - operations.CreateGuardrailResponse, + models.CreateGuardrailResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.InternalServerResponseError @@ -91,7 +92,9 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); + const body = encodeJSON("body", payload.CreateGuardrailRequest, { + explode: true, + }); const path = pathToFunc("/guardrails")(); @@ -130,8 +133,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -165,7 +178,7 @@ async function $do( }; const [result] = await M.match< - operations.CreateGuardrailResponse, + models.CreateGuardrailResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.InternalServerResponseError @@ -178,7 +191,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(201, operations.CreateGuardrailResponse$inboundSchema), + M.json(201, models.CreateGuardrailResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), diff --git a/src/funcs/guardrailsDelete.ts b/src/funcs/guardrailsDelete.ts index ce2562e8..1f983138 100644 --- a/src/funcs/guardrailsDelete.ts +++ b/src/funcs/guardrailsDelete.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,7 +39,7 @@ export function guardrailsDelete( options?: RequestOptions, ): APIPromise< Result< - operations.DeleteGuardrailResponse, + models.DeleteGuardrailResponse, | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError @@ -66,7 +67,7 @@ async function $do( ): Promise< [ Result< - operations.DeleteGuardrailResponse, + models.DeleteGuardrailResponse, | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError @@ -135,8 +136,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -170,7 +181,7 @@ async function $do( }; const [result] = await M.match< - operations.DeleteGuardrailResponse, + models.DeleteGuardrailResponse, | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError @@ -183,7 +194,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.DeleteGuardrailResponse$inboundSchema), + M.json(200, models.DeleteGuardrailResponse$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), diff --git a/src/funcs/guardrailsGet.ts b/src/funcs/guardrailsGet.ts index ff2003a1..bed357f5 100644 --- a/src/funcs/guardrailsGet.ts +++ b/src/funcs/guardrailsGet.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,7 +39,7 @@ export function guardrailsGet( options?: RequestOptions, ): APIPromise< Result< - operations.GetGuardrailResponse, + models.GetGuardrailResponse, | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError @@ -66,7 +67,7 @@ async function $do( ): Promise< [ Result< - operations.GetGuardrailResponse, + models.GetGuardrailResponse, | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError @@ -135,8 +136,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -170,7 +181,7 @@ async function $do( }; const [result] = await M.match< - operations.GetGuardrailResponse, + models.GetGuardrailResponse, | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError @@ -183,7 +194,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.GetGuardrailResponse$inboundSchema), + M.json(200, models.GetGuardrailResponse$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), diff --git a/src/funcs/guardrailsList.ts b/src/funcs/guardrailsList.ts index e181e7f4..78bd226b 100644 --- a/src/funcs/guardrailsList.ts +++ b/src/funcs/guardrailsList.ts @@ -4,6 +4,7 @@ */ import { OpenRouterCore } from "../core.js"; +import { dlv } from "../lib/dlv.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -25,6 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List guardrails @@ -37,18 +44,21 @@ export function guardrailsList( request?: operations.ListGuardrailsRequest | undefined, options?: RequestOptions, ): APIPromise< - Result< - operations.ListGuardrailsResponse, - | errors.UnauthorizedResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListGuardrailsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } > > { return new APIPromise($do( @@ -64,18 +74,21 @@ async function $do( options?: RequestOptions, ): Promise< [ - Result< - operations.ListGuardrailsResponse, - | errors.UnauthorizedResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListGuardrailsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } >, APICall, ] @@ -87,7 +100,7 @@ async function $do( "Input validation failed", ); if (!parsed.ok) { - return [parsed, { status: "invalid" }]; + return [haltIterator(parsed), { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -133,8 +146,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -149,7 +172,7 @@ async function $do( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; + return [haltIterator(requestRes), { status: "invalid" }]; } const req = requestRes.value; @@ -160,7 +183,7 @@ async function $do( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; + return [haltIterator(doResult), { status: "request-error", request: req }]; } const response = doResult.value; @@ -168,7 +191,7 @@ async function $do( HttpMeta: { Response: response, Request: req }, }; - const [result] = await M.match< + const [result, raw] = await M.match< operations.ListGuardrailsResponse, | errors.UnauthorizedResponseError | errors.InternalServerResponseError @@ -181,15 +204,74 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.ListGuardrailsResponse$inboundSchema), + M.json(200, operations.ListGuardrailsResponse$inboundSchema, { + key: "Result", + }), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); if (!result.ok) { - return [result, { status: "complete", request: req, response }]; + return [haltIterator(result), { + status: "complete", + request: req, + response, + }]; } - return [result, { status: "complete", request: req, response }]; + const nextFunc = ( + responseData: unknown, + ): { + next: Paginator< + Result< + operations.ListGuardrailsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > + >; + "~next"?: { offset: number }; + } => { + const offset = request?.offset ?? 0; + + if (!responseData) { + return { next: () => null }; + } + const results = dlv(responseData, "data"); + if (!Array.isArray(results) || !results.length) { + return { next: () => null }; + } + const limit = request?.limit ?? 0; + if (results.length < limit) { + return { next: () => null }; + } + const nextOffset = offset + results.length; + + const nextVal = () => + guardrailsList( + client, + { + ...request!, + offset: nextOffset, + }, + options, + ); + + return { next: nextVal, "~next": { offset: nextOffset } }; + }; + + const page = { ...result, ...nextFunc(raw) }; + return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, { + status: "complete", + request: req, + response, + }]; } diff --git a/src/funcs/guardrailsListGuardrailKeyAssignments.ts b/src/funcs/guardrailsListGuardrailKeyAssignments.ts index 39da0b68..72bf3125 100644 --- a/src/funcs/guardrailsListGuardrailKeyAssignments.ts +++ b/src/funcs/guardrailsListGuardrailKeyAssignments.ts @@ -4,6 +4,7 @@ */ import { OpenRouterCore } from "../core.js"; +import { dlv } from "../lib/dlv.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -25,6 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List key assignments for a guardrail @@ -37,19 +44,22 @@ export function guardrailsListGuardrailKeyAssignments( request: operations.ListGuardrailKeyAssignmentsRequest, options?: RequestOptions, ): APIPromise< - Result< - operations.ListGuardrailKeyAssignmentsResponse, - | errors.UnauthorizedResponseError - | errors.NotFoundResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListGuardrailKeyAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } > > { return new APIPromise($do( @@ -65,19 +75,22 @@ async function $do( options?: RequestOptions, ): Promise< [ - Result< - operations.ListGuardrailKeyAssignmentsResponse, - | errors.UnauthorizedResponseError - | errors.NotFoundResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListGuardrailKeyAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } >, APICall, ] @@ -89,7 +102,7 @@ async function $do( "Input validation failed", ); if (!parsed.ok) { - return [parsed, { status: "invalid" }]; + return [haltIterator(parsed), { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -141,8 +154,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -157,7 +180,7 @@ async function $do( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; + return [haltIterator(requestRes), { status: "invalid" }]; } const req = requestRes.value; @@ -168,7 +191,7 @@ async function $do( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; + return [haltIterator(doResult), { status: "request-error", request: req }]; } const response = doResult.value; @@ -176,7 +199,7 @@ async function $do( HttpMeta: { Response: response, Request: req }, }; - const [result] = await M.match< + const [result, raw] = await M.match< operations.ListGuardrailKeyAssignmentsResponse, | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -190,7 +213,9 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.ListGuardrailKeyAssignmentsResponse$inboundSchema), + M.json(200, operations.ListGuardrailKeyAssignmentsResponse$inboundSchema, { + key: "Result", + }), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), @@ -198,8 +223,66 @@ async function $do( M.fail("5XX"), )(response, req, { extraFields: responseFields }); if (!result.ok) { - return [result, { status: "complete", request: req, response }]; + return [haltIterator(result), { + status: "complete", + request: req, + response, + }]; } - return [result, { status: "complete", request: req, response }]; + const nextFunc = ( + responseData: unknown, + ): { + next: Paginator< + Result< + operations.ListGuardrailKeyAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > + >; + "~next"?: { offset: number }; + } => { + const offset = request?.offset ?? 0; + + if (!responseData) { + return { next: () => null }; + } + const results = dlv(responseData, "data"); + if (!Array.isArray(results) || !results.length) { + return { next: () => null }; + } + const limit = request?.limit ?? 0; + if (results.length < limit) { + return { next: () => null }; + } + const nextOffset = offset + results.length; + + const nextVal = () => + guardrailsListGuardrailKeyAssignments( + client, + { + ...request, + offset: nextOffset, + }, + options, + ); + + return { next: nextVal, "~next": { offset: nextOffset } }; + }; + + const page = { ...result, ...nextFunc(raw) }; + return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, { + status: "complete", + request: req, + response, + }]; } diff --git a/src/funcs/guardrailsListGuardrailMemberAssignments.ts b/src/funcs/guardrailsListGuardrailMemberAssignments.ts index a4d6a854..88cbd772 100644 --- a/src/funcs/guardrailsListGuardrailMemberAssignments.ts +++ b/src/funcs/guardrailsListGuardrailMemberAssignments.ts @@ -4,6 +4,7 @@ */ import { OpenRouterCore } from "../core.js"; +import { dlv } from "../lib/dlv.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -25,6 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List member assignments for a guardrail @@ -37,19 +44,22 @@ export function guardrailsListGuardrailMemberAssignments( request: operations.ListGuardrailMemberAssignmentsRequest, options?: RequestOptions, ): APIPromise< - Result< - operations.ListGuardrailMemberAssignmentsResponse, - | errors.UnauthorizedResponseError - | errors.NotFoundResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListGuardrailMemberAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } > > { return new APIPromise($do( @@ -65,19 +75,22 @@ async function $do( options?: RequestOptions, ): Promise< [ - Result< - operations.ListGuardrailMemberAssignmentsResponse, - | errors.UnauthorizedResponseError - | errors.NotFoundResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListGuardrailMemberAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } >, APICall, ] @@ -91,7 +104,7 @@ async function $do( "Input validation failed", ); if (!parsed.ok) { - return [parsed, { status: "invalid" }]; + return [haltIterator(parsed), { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -143,8 +156,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -159,7 +182,7 @@ async function $do( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; + return [haltIterator(requestRes), { status: "invalid" }]; } const req = requestRes.value; @@ -170,7 +193,7 @@ async function $do( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; + return [haltIterator(doResult), { status: "request-error", request: req }]; } const response = doResult.value; @@ -178,7 +201,7 @@ async function $do( HttpMeta: { Response: response, Request: req }, }; - const [result] = await M.match< + const [result, raw] = await M.match< operations.ListGuardrailMemberAssignmentsResponse, | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -195,6 +218,7 @@ async function $do( M.json( 200, operations.ListGuardrailMemberAssignmentsResponse$inboundSchema, + { key: "Result" }, ), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), @@ -203,8 +227,66 @@ async function $do( M.fail("5XX"), )(response, req, { extraFields: responseFields }); if (!result.ok) { - return [result, { status: "complete", request: req, response }]; + return [haltIterator(result), { + status: "complete", + request: req, + response, + }]; } - return [result, { status: "complete", request: req, response }]; + const nextFunc = ( + responseData: unknown, + ): { + next: Paginator< + Result< + operations.ListGuardrailMemberAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > + >; + "~next"?: { offset: number }; + } => { + const offset = request?.offset ?? 0; + + if (!responseData) { + return { next: () => null }; + } + const results = dlv(responseData, "data"); + if (!Array.isArray(results) || !results.length) { + return { next: () => null }; + } + const limit = request?.limit ?? 0; + if (results.length < limit) { + return { next: () => null }; + } + const nextOffset = offset + results.length; + + const nextVal = () => + guardrailsListGuardrailMemberAssignments( + client, + { + ...request, + offset: nextOffset, + }, + options, + ); + + return { next: nextVal, "~next": { offset: nextOffset } }; + }; + + const page = { ...result, ...nextFunc(raw) }; + return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, { + status: "complete", + request: req, + response, + }]; } diff --git a/src/funcs/guardrailsListKeyAssignments.ts b/src/funcs/guardrailsListKeyAssignments.ts index b1f56504..2f9ce0e1 100644 --- a/src/funcs/guardrailsListKeyAssignments.ts +++ b/src/funcs/guardrailsListKeyAssignments.ts @@ -4,6 +4,7 @@ */ import { OpenRouterCore } from "../core.js"; +import { dlv } from "../lib/dlv.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -25,6 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List all key assignments @@ -37,18 +44,21 @@ export function guardrailsListKeyAssignments( request?: operations.ListKeyAssignmentsRequest | undefined, options?: RequestOptions, ): APIPromise< - Result< - operations.ListKeyAssignmentsResponse, - | errors.UnauthorizedResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListKeyAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } > > { return new APIPromise($do( @@ -64,18 +74,21 @@ async function $do( options?: RequestOptions, ): Promise< [ - Result< - operations.ListKeyAssignmentsResponse, - | errors.UnauthorizedResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListKeyAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } >, APICall, ] @@ -89,7 +102,7 @@ async function $do( "Input validation failed", ); if (!parsed.ok) { - return [parsed, { status: "invalid" }]; + return [haltIterator(parsed), { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -135,8 +148,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -151,7 +174,7 @@ async function $do( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; + return [haltIterator(requestRes), { status: "invalid" }]; } const req = requestRes.value; @@ -162,7 +185,7 @@ async function $do( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; + return [haltIterator(doResult), { status: "request-error", request: req }]; } const response = doResult.value; @@ -170,7 +193,7 @@ async function $do( HttpMeta: { Response: response, Request: req }, }; - const [result] = await M.match< + const [result, raw] = await M.match< operations.ListKeyAssignmentsResponse, | errors.UnauthorizedResponseError | errors.InternalServerResponseError @@ -183,15 +206,74 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.ListKeyAssignmentsResponse$inboundSchema), + M.json(200, operations.ListKeyAssignmentsResponse$inboundSchema, { + key: "Result", + }), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); if (!result.ok) { - return [result, { status: "complete", request: req, response }]; + return [haltIterator(result), { + status: "complete", + request: req, + response, + }]; } - return [result, { status: "complete", request: req, response }]; + const nextFunc = ( + responseData: unknown, + ): { + next: Paginator< + Result< + operations.ListKeyAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > + >; + "~next"?: { offset: number }; + } => { + const offset = request?.offset ?? 0; + + if (!responseData) { + return { next: () => null }; + } + const results = dlv(responseData, "data"); + if (!Array.isArray(results) || !results.length) { + return { next: () => null }; + } + const limit = request?.limit ?? 0; + if (results.length < limit) { + return { next: () => null }; + } + const nextOffset = offset + results.length; + + const nextVal = () => + guardrailsListKeyAssignments( + client, + { + ...request!, + offset: nextOffset, + }, + options, + ); + + return { next: nextVal, "~next": { offset: nextOffset } }; + }; + + const page = { ...result, ...nextFunc(raw) }; + return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, { + status: "complete", + request: req, + response, + }]; } diff --git a/src/funcs/guardrailsListMemberAssignments.ts b/src/funcs/guardrailsListMemberAssignments.ts index 44f3e6f2..2d1e79ab 100644 --- a/src/funcs/guardrailsListMemberAssignments.ts +++ b/src/funcs/guardrailsListMemberAssignments.ts @@ -4,6 +4,7 @@ */ import { OpenRouterCore } from "../core.js"; +import { dlv } from "../lib/dlv.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -25,6 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List all member assignments @@ -37,18 +44,21 @@ export function guardrailsListMemberAssignments( request?: operations.ListMemberAssignmentsRequest | undefined, options?: RequestOptions, ): APIPromise< - Result< - operations.ListMemberAssignmentsResponse, - | errors.UnauthorizedResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListMemberAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } > > { return new APIPromise($do( @@ -64,18 +74,21 @@ async function $do( options?: RequestOptions, ): Promise< [ - Result< - operations.ListMemberAssignmentsResponse, - | errors.UnauthorizedResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListMemberAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } >, APICall, ] @@ -89,7 +102,7 @@ async function $do( "Input validation failed", ); if (!parsed.ok) { - return [parsed, { status: "invalid" }]; + return [haltIterator(parsed), { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -135,8 +148,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -151,7 +174,7 @@ async function $do( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; + return [haltIterator(requestRes), { status: "invalid" }]; } const req = requestRes.value; @@ -162,7 +185,7 @@ async function $do( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; + return [haltIterator(doResult), { status: "request-error", request: req }]; } const response = doResult.value; @@ -170,7 +193,7 @@ async function $do( HttpMeta: { Response: response, Request: req }, }; - const [result] = await M.match< + const [result, raw] = await M.match< operations.ListMemberAssignmentsResponse, | errors.UnauthorizedResponseError | errors.InternalServerResponseError @@ -183,15 +206,74 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.ListMemberAssignmentsResponse$inboundSchema), + M.json(200, operations.ListMemberAssignmentsResponse$inboundSchema, { + key: "Result", + }), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); if (!result.ok) { - return [result, { status: "complete", request: req, response }]; + return [haltIterator(result), { + status: "complete", + request: req, + response, + }]; } - return [result, { status: "complete", request: req, response }]; + const nextFunc = ( + responseData: unknown, + ): { + next: Paginator< + Result< + operations.ListMemberAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > + >; + "~next"?: { offset: number }; + } => { + const offset = request?.offset ?? 0; + + if (!responseData) { + return { next: () => null }; + } + const results = dlv(responseData, "data"); + if (!Array.isArray(results) || !results.length) { + return { next: () => null }; + } + const limit = request?.limit ?? 0; + if (results.length < limit) { + return { next: () => null }; + } + const nextOffset = offset + results.length; + + const nextVal = () => + guardrailsListMemberAssignments( + client, + { + ...request!, + offset: nextOffset, + }, + options, + ); + + return { next: nextVal, "~next": { offset: nextOffset } }; + }; + + const page = { ...result, ...nextFunc(raw) }; + return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, { + status: "complete", + request: req, + response, + }]; } diff --git a/src/funcs/guardrailsUpdate.ts b/src/funcs/guardrailsUpdate.ts index 47262b78..5187613c 100644 --- a/src/funcs/guardrailsUpdate.ts +++ b/src/funcs/guardrailsUpdate.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,7 +39,7 @@ export function guardrailsUpdate( options?: RequestOptions, ): APIPromise< Result< - operations.UpdateGuardrailResponse, + models.UpdateGuardrailResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -67,7 +68,7 @@ async function $do( ): Promise< [ Result< - operations.UpdateGuardrailResponse, + models.UpdateGuardrailResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -93,7 +94,9 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); + const body = encodeJSON("body", payload.UpdateGuardrailRequest, { + explode: true, + }); const pathParams = { id: encodeSimple("id", payload.id, { @@ -138,8 +141,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -173,7 +186,7 @@ async function $do( }; const [result] = await M.match< - operations.UpdateGuardrailResponse, + models.UpdateGuardrailResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -187,7 +200,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.UpdateGuardrailResponse$inboundSchema), + M.json(200, models.UpdateGuardrailResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), diff --git a/src/funcs/modelsCount.ts b/src/funcs/modelsCount.ts index 37341fe9..0d1f8b2a 100644 --- a/src/funcs/modelsCount.ts +++ b/src/funcs/modelsCount.ts @@ -130,8 +130,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/modelsList.ts b/src/funcs/modelsList.ts index fcae3864..926d79e6 100644 --- a/src/funcs/modelsList.ts +++ b/src/funcs/modelsList.ts @@ -132,8 +132,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/modelsListForUser.ts b/src/funcs/modelsListForUser.ts index 9b406a7f..cba796d8 100644 --- a/src/funcs/modelsListForUser.ts +++ b/src/funcs/modelsListForUser.ts @@ -140,8 +140,18 @@ async function $do( securitySource: security, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/oAuthCreateAuthCode.ts b/src/funcs/oAuthCreateAuthCode.ts index deb51c7d..7f7c14a3 100644 --- a/src/funcs/oAuthCreateAuthCode.ts +++ b/src/funcs/oAuthCreateAuthCode.ts @@ -132,8 +132,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/oAuthExchangeAuthCodeForAPIKey.ts b/src/funcs/oAuthExchangeAuthCodeForAPIKey.ts index ba520ded..c4720a20 100644 --- a/src/funcs/oAuthExchangeAuthCodeForAPIKey.ts +++ b/src/funcs/oAuthExchangeAuthCodeForAPIKey.ts @@ -131,8 +131,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/organizationListMembers.ts b/src/funcs/organizationListMembers.ts new file mode 100644 index 00000000..4ef0a3fa --- /dev/null +++ b/src/funcs/organizationListMembers.ts @@ -0,0 +1,284 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: dc6644106a4d + */ + +import { OpenRouterCore } from "../core.js"; +import { dlv } from "../lib/dlv.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; + +/** + * List organization members + * + * @remarks + * List all members of the organization associated with the authenticated management key. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ +export function organizationListMembers( + client: OpenRouterCore, + request?: operations.ListOrganizationMembersRequest | undefined, + options?: RequestOptions, +): APIPromise< + PageIterator< + Result< + operations.ListOrganizationMembersResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request?: operations.ListOrganizationMembersRequest | undefined, + options?: RequestOptions, +): Promise< + [ + PageIterator< + Result< + operations.ListOrganizationMembersResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListOrganizationMembersRequest$outboundSchema.optional().parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [haltIterator(parsed), { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/organization/members")(); + + const query = encodeFormQuery({ + "limit": payload?.limit, + "offset": payload?.offset, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "HTTP-Referer": encodeSimple( + "HTTP-Referer", + payload?.["HTTP-Referer"] ?? client._options.httpReferer, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload?.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload?.appTitle ?? client._options.appTitle, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listOrganizationMembers", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [haltIterator(requestRes), { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["401", "404", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [haltIterator(doResult), { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result, raw] = await M.match< + operations.ListOrganizationMembersResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListOrganizationMembersResponse$inboundSchema, { + key: "Result", + }), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [haltIterator(result), { + status: "complete", + request: req, + response, + }]; + } + + const nextFunc = ( + responseData: unknown, + ): { + next: Paginator< + Result< + operations.ListOrganizationMembersResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > + >; + "~next"?: { offset: number }; + } => { + const offset = request?.offset ?? 0; + + if (!responseData) { + return { next: () => null }; + } + const results = dlv(responseData, "data"); + if (!Array.isArray(results) || !results.length) { + return { next: () => null }; + } + const limit = request?.limit ?? 0; + if (results.length < limit) { + return { next: () => null }; + } + const nextOffset = offset + results.length; + + const nextVal = () => + organizationListMembers( + client, + { + ...request!, + offset: nextOffset, + }, + options, + ); + + return { next: nextVal, "~next": { offset: nextOffset } }; + }; + + const page = { ...result, ...nextFunc(raw) }; + return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, { + status: "complete", + request: req, + response, + }]; +} diff --git a/src/funcs/providersList.ts b/src/funcs/providersList.ts index f37022cd..503bef3d 100644 --- a/src/funcs/providersList.ts +++ b/src/funcs/providersList.ts @@ -123,8 +123,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/creditsCreateCoinbaseCharge.ts b/src/funcs/rerankRerank.ts similarity index 64% rename from src/funcs/creditsCreateCoinbaseCharge.ts rename to src/funcs/rerankRerank.ts index 702ad6f5..f39c3bac 100644 --- a/src/funcs/creditsCreateCoinbaseCharge.ts +++ b/src/funcs/rerankRerank.ts @@ -1,6 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: e07ee6831da3 + * @generated-id: 915c20e147a4 */ import { OpenRouterCore } from "../core.js"; @@ -9,7 +9,7 @@ import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; -import { resolveSecurity } from "../lib/security.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { ConnectionError, @@ -27,23 +27,28 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Create a Coinbase charge for crypto payment + * Submit a rerank request * * @remarks - * Create a Coinbase charge for crypto payment + * Submits a rerank request to the rerank router */ -export function creditsCreateCoinbaseCharge( +export function rerankRerank( client: OpenRouterCore, - security: operations.CreateCoinbaseChargeSecurity, - request: operations.CreateCoinbaseChargeRequest, + request: operations.CreateRerankRequest, options?: RequestOptions, ): APIPromise< Result< - operations.CreateCoinbaseChargeResponse, + operations.CreateRerankResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError + | errors.PaymentRequiredResponseError + | errors.NotFoundResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | errors.ServiceUnavailableResponseError + | errors.EdgeNetworkTimeoutResponseError + | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError @@ -56,7 +61,6 @@ export function creditsCreateCoinbaseCharge( > { return new APIPromise($do( client, - security, request, options, )); @@ -64,17 +68,22 @@ export function creditsCreateCoinbaseCharge( async function $do( client: OpenRouterCore, - security: operations.CreateCoinbaseChargeSecurity, - request: operations.CreateCoinbaseChargeRequest, + request: operations.CreateRerankRequest, options?: RequestOptions, ): Promise< [ Result< - operations.CreateCoinbaseChargeResponse, + operations.CreateRerankResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError + | errors.PaymentRequiredResponseError + | errors.NotFoundResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | errors.ServiceUnavailableResponseError + | errors.EdgeNetworkTimeoutResponseError + | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError @@ -89,23 +98,20 @@ async function $do( > { const parsed = safeParse( request, - (value) => - operations.CreateCoinbaseChargeRequest$outboundSchema.parse(value), + (value) => operations.CreateRerankRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.CreateChargeRequest, { - explode: true, - }); + const body = encodeJSON("body", payload.RequestBody, { explode: true }); - const path = pathToFunc("/credits/coinbase")(); + const path = pathToFunc("/rerank")(); const headers = new Headers(compactMap({ "Content-Type": "application/json", - Accept: "application/json", + Accept: "application/json;q=1, text/event-stream;q=0", "HTTP-Referer": encodeSimple( "HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, @@ -123,29 +129,33 @@ async function $do( ), })); - const requestSecurity = resolveSecurity( - [ - { - fieldName: "Authorization", - type: "http:bearer", - value: security?.bearer, - }, - ], - ); + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); const context = { options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "createCoinbaseCharge", + operationID: "createRerank", oAuth2Scopes: null, resolvedSecurity: requestSecurity, - securitySource: security, + securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -165,7 +175,20 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["400", "401", "429", "4XX", "500", "5XX"], + errorCodes: [ + "400", + "401", + "402", + "404", + "429", + "4XX", + "500", + "502", + "503", + "524", + "529", + "5XX", + ], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -179,11 +202,17 @@ async function $do( }; const [result] = await M.match< - operations.CreateCoinbaseChargeResponse, + operations.CreateRerankResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError + | errors.PaymentRequiredResponseError + | errors.NotFoundResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | errors.ServiceUnavailableResponseError + | errors.EdgeNetworkTimeoutResponseError + | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError @@ -193,11 +222,20 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.CreateCoinbaseChargeResponse$inboundSchema), + M.json(200, operations.CreateRerankResponse$inboundSchema), + M.text(200, operations.CreateRerankResponse$inboundSchema, { + ctype: "text/event-stream", + }), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), + M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), + M.jsonErr(524, errors.EdgeNetworkTimeoutResponseError$inboundSchema), + M.jsonErr(529, errors.ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/lib/config.ts b/src/lib/config.ts index ad74991a..591743c2 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -75,7 +75,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "0.11.2", + sdkVersion: "0.12.0", genVersion: "2.879.1", - userAgent: "speakeasy-sdk/typescript 0.11.2 2.879.1 1.0.0 @openrouter/sdk", + userAgent: "speakeasy-sdk/typescript 0.12.0 2.879.1 1.0.0 @openrouter/sdk", } as const; diff --git a/src/models/activityitem.ts b/src/models/activityitem.ts index c13ce725..3e8158dc 100644 --- a/src/models/activityitem.ts +++ b/src/models/activityitem.ts @@ -66,10 +66,10 @@ export const ActivityItem$inboundSchema: z.ZodType = z provider_name: z.string(), usage: z.number(), byok_usage_inference: z.number(), - requests: z.number(), - prompt_tokens: z.number(), - completion_tokens: z.number(), - reasoning_tokens: z.number(), + requests: z.int(), + prompt_tokens: z.int(), + completion_tokens: z.int(), + reasoning_tokens: z.int(), }).transform((v) => { return remap$(v, { "model_permaslug": "modelPermaslug", diff --git a/src/models/activityresponse.ts b/src/models/activityresponse.ts new file mode 100644 index 00000000..41223fe4 --- /dev/null +++ b/src/models/activityresponse.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c535306a4318 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { ActivityItem, ActivityItem$inboundSchema } from "./activityitem.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type ActivityResponse = { + /** + * List of activity items + */ + data: Array; +}; + +/** @internal */ +export const ActivityResponse$inboundSchema: z.ZodType< + ActivityResponse, + unknown +> = z.object({ + data: z.array(ActivityItem$inboundSchema), +}); + +export function activityResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ActivityResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ActivityResponse' from JSON`, + ); +} diff --git a/src/models/annotationaddedevent.ts b/src/models/annotationaddedevent.ts index 5a81c33b..22e406b8 100644 --- a/src/models/annotationaddedevent.ts +++ b/src/models/annotationaddedevent.ts @@ -32,11 +32,11 @@ export const AnnotationAddedEvent$inboundSchema: z.ZodType< unknown > = z.object({ type: z.literal("response.output_text.annotation.added"), - output_index: z.number(), + output_index: z.int(), item_id: z.string(), - content_index: z.number(), - sequence_number: z.number(), - annotation_index: z.number(), + content_index: z.int(), + sequence_number: z.int(), + annotation_index: z.int(), annotation: OpenAIResponsesAnnotation$inboundSchema, }).transform((v) => { return remap$(v, { diff --git a/src/models/anthropiccachecontroldirective.ts b/src/models/anthropiccachecontroldirective.ts new file mode 100644 index 00000000..9386ba23 --- /dev/null +++ b/src/models/anthropiccachecontroldirective.ts @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e8b49d71cdd5 + */ + +import * as z from "zod/v4"; +import { ClosedEnum } from "../types/enums.js"; +import { + AnthropicCacheControlTtl, + AnthropicCacheControlTtl$outboundSchema, +} from "./anthropiccachecontrolttl.js"; + +export const AnthropicCacheControlDirectiveType = { + Ephemeral: "ephemeral", +} as const; +export type AnthropicCacheControlDirectiveType = ClosedEnum< + typeof AnthropicCacheControlDirectiveType +>; + +/** + * Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. + */ +export type AnthropicCacheControlDirective = { + type: AnthropicCacheControlDirectiveType; + ttl?: AnthropicCacheControlTtl | undefined; +}; + +/** @internal */ +export const AnthropicCacheControlDirectiveType$outboundSchema: z.ZodEnum< + typeof AnthropicCacheControlDirectiveType +> = z.enum(AnthropicCacheControlDirectiveType); + +/** @internal */ +export type AnthropicCacheControlDirective$Outbound = { + type: string; + ttl?: string | undefined; +}; + +/** @internal */ +export const AnthropicCacheControlDirective$outboundSchema: z.ZodType< + AnthropicCacheControlDirective$Outbound, + AnthropicCacheControlDirective +> = z.object({ + type: AnthropicCacheControlDirectiveType$outboundSchema, + ttl: AnthropicCacheControlTtl$outboundSchema.optional(), +}); + +export function anthropicCacheControlDirectiveToJSON( + anthropicCacheControlDirective: AnthropicCacheControlDirective, +): string { + return JSON.stringify( + AnthropicCacheControlDirective$outboundSchema.parse( + anthropicCacheControlDirective, + ), + ); +} diff --git a/src/models/anthropiccachecontrolttl.ts b/src/models/anthropiccachecontrolttl.ts new file mode 100644 index 00000000..1e06de28 --- /dev/null +++ b/src/models/anthropiccachecontrolttl.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d6c8b6f13cb1 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +export const AnthropicCacheControlTtl = { + Fivem: "5m", + Oneh: "1h", +} as const; +export type AnthropicCacheControlTtl = OpenEnum< + typeof AnthropicCacheControlTtl +>; + +/** @internal */ +export const AnthropicCacheControlTtl$inboundSchema: z.ZodType< + AnthropicCacheControlTtl, + unknown +> = openEnums.inboundSchema(AnthropicCacheControlTtl); +/** @internal */ +export const AnthropicCacheControlTtl$outboundSchema: z.ZodType< + string, + AnthropicCacheControlTtl +> = openEnums.outboundSchema(AnthropicCacheControlTtl); diff --git a/src/models/autorouterplugin.ts b/src/models/autorouterplugin.ts new file mode 100644 index 00000000..b66bba1d --- /dev/null +++ b/src/models/autorouterplugin.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e3853c83720d + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; + +export type AutoRouterPlugin = { + id: "auto-router"; + /** + * Set to false to disable the auto-router plugin for this request. Defaults to true. + */ + enabled?: boolean | undefined; + /** + * 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. + */ + allowedModels?: Array | undefined; +}; + +/** @internal */ +export type AutoRouterPlugin$Outbound = { + id: "auto-router"; + enabled?: boolean | undefined; + allowed_models?: Array | undefined; +}; + +/** @internal */ +export const AutoRouterPlugin$outboundSchema: z.ZodType< + AutoRouterPlugin$Outbound, + AutoRouterPlugin +> = z.object({ + id: z.literal("auto-router"), + enabled: z.boolean().optional(), + allowedModels: z.array(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + allowedModels: "allowed_models", + }); +}); + +export function autoRouterPluginToJSON( + autoRouterPlugin: AutoRouterPlugin, +): string { + return JSON.stringify( + AutoRouterPlugin$outboundSchema.parse(autoRouterPlugin), + ); +} diff --git a/src/models/baseinputsunion.ts b/src/models/baseinputsunion.ts index 36e5c40d..cd534c96 100644 --- a/src/models/baseinputsunion.ts +++ b/src/models/baseinputsunion.ts @@ -4,8 +4,9 @@ */ import * as z from "zod/v4"; -import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; @@ -13,110 +14,34 @@ import { InputAudio, InputAudio$inboundSchema } from "./inputaudio.js"; import { InputFile, InputFile$inboundSchema } from "./inputfile.js"; import { InputImage, InputImage$inboundSchema } from "./inputimage.js"; import { InputText, InputText$inboundSchema } from "./inputtext.js"; +import { + OpenAIResponseFunctionToolCall, + OpenAIResponseFunctionToolCall$inboundSchema, +} from "./openairesponsefunctiontoolcall.js"; +import { + OpenAIResponseFunctionToolCallOutput, + OpenAIResponseFunctionToolCallOutput$inboundSchema, +} from "./openairesponsefunctiontoolcalloutput.js"; +import { + OpenAIResponseInputMessageItem, + OpenAIResponseInputMessageItem$inboundSchema, +} from "./openairesponseinputmessageitem.js"; import { OutputItemImageGenerationCall, OutputItemImageGenerationCall$inboundSchema, } from "./outputitemimagegenerationcall.js"; import { OutputMessage, OutputMessage$inboundSchema } from "./outputmessage.js"; -import { - ToolCallStatusEnum, - ToolCallStatusEnum$inboundSchema, -} from "./toolcallstatusenum.js"; -export const BaseInputsTypeFunctionCall = { - FunctionCall: "function_call", -} as const; -export type BaseInputsTypeFunctionCall = ClosedEnum< - typeof BaseInputsTypeFunctionCall ->; - -export type BaseInputsFunctionCall = { - type: BaseInputsTypeFunctionCall; - callId: string; - name: string; - arguments: string; - id?: string | undefined; - status?: ToolCallStatusEnum | null | undefined; -}; - -export const BaseInputsTypeFunctionCallOutput = { - FunctionCallOutput: "function_call_output", -} as const; -export type BaseInputsTypeFunctionCallOutput = ClosedEnum< - typeof BaseInputsTypeFunctionCallOutput ->; - -export type BaseInputsOutput1 = - | InputText - | (InputImage & { type: "input_image" }) - | InputFile; - -export type BaseInputsOutput2 = - | string - | Array; - -export type BaseInputsFunctionCallOutput = { - type: BaseInputsTypeFunctionCallOutput; - id?: string | null | undefined; - callId: string; - output: - | string - | Array; - status?: ToolCallStatusEnum | null | undefined; -}; - -export const BaseInputsTypeMessage2 = { +export const BaseInputsType = { Message: "message", } as const; -export type BaseInputsTypeMessage2 = ClosedEnum; +export type BaseInputsType = ClosedEnum; -export const BaseInputsRoleDeveloper2 = { +export const BaseInputsRoleDeveloper = { Developer: "developer", } as const; -export type BaseInputsRoleDeveloper2 = ClosedEnum< - typeof BaseInputsRoleDeveloper2 ->; - -export const BaseInputsRoleSystem2 = { - System: "system", -} as const; -export type BaseInputsRoleSystem2 = ClosedEnum; - -export const BaseInputsRoleUser2 = { - User: "user", -} as const; -export type BaseInputsRoleUser2 = ClosedEnum; - -export type BaseInputsRoleUnion2 = - | BaseInputsRoleUser2 - | BaseInputsRoleSystem2 - | BaseInputsRoleDeveloper2; - -export type BaseInputsContent3 = - | InputText - | (InputImage & { type: "input_image" }) - | InputFile - | InputAudio; - -export type BaseInputsMessage2 = { - id: string; - type?: BaseInputsTypeMessage2 | undefined; - role: BaseInputsRoleUser2 | BaseInputsRoleSystem2 | BaseInputsRoleDeveloper2; - content: Array< - InputText | (InputImage & { type: "input_image" }) | InputFile | InputAudio - >; -}; - -export const BaseInputsTypeMessage1 = { - Message: "message", -} as const; -export type BaseInputsTypeMessage1 = ClosedEnum; - -export const BaseInputsRoleDeveloper1 = { - Developer: "developer", -} as const; -export type BaseInputsRoleDeveloper1 = ClosedEnum< - typeof BaseInputsRoleDeveloper1 +export type BaseInputsRoleDeveloper = ClosedEnum< + typeof BaseInputsRoleDeveloper >; export const BaseInputsRoleAssistant = { @@ -126,31 +51,36 @@ export type BaseInputsRoleAssistant = ClosedEnum< typeof BaseInputsRoleAssistant >; -export const BaseInputsRoleSystem1 = { +export const BaseInputsRoleSystem = { System: "system", } as const; -export type BaseInputsRoleSystem1 = ClosedEnum; +export type BaseInputsRoleSystem = ClosedEnum; -export const BaseInputsRoleUser1 = { +export const BaseInputsRoleUser = { User: "user", } as const; -export type BaseInputsRoleUser1 = ClosedEnum; +export type BaseInputsRoleUser = ClosedEnum; -export type BaseInputsRoleUnion1 = - | BaseInputsRoleUser1 - | BaseInputsRoleSystem1 +export type BaseInputsRoleUnion = + | BaseInputsRoleUser + | BaseInputsRoleSystem | BaseInputsRoleAssistant - | BaseInputsRoleDeveloper1; + | BaseInputsRoleDeveloper; export type BaseInputsContent1 = | InputText | (InputImage & { type: "input_image" }) | InputFile - | InputAudio; + | InputAudio + | discriminatedUnionTypes.Unknown<"type">; export type BaseInputsContent2 = | Array< - InputText | (InputImage & { type: "input_image" }) | InputFile | InputAudio + | InputText + | (InputImage & { type: "input_image" }) + | InputFile + | InputAudio + | discriminatedUnionTypes.Unknown<"type"> > | string; @@ -173,19 +103,20 @@ export type BaseInputsPhaseUnion = | BaseInputsPhaseFinalAnswer | any; -export type BaseInputsMessage1 = { - type?: BaseInputsTypeMessage1 | undefined; +export type BaseInputsMessage = { + type?: BaseInputsType | undefined; role: - | BaseInputsRoleUser1 - | BaseInputsRoleSystem1 + | BaseInputsRoleUser + | BaseInputsRoleSystem | BaseInputsRoleAssistant - | BaseInputsRoleDeveloper1; + | BaseInputsRoleDeveloper; content: | Array< | InputText | (InputImage & { type: "input_image" }) | InputFile | InputAudio + | discriminatedUnionTypes.Unknown<"type"> > | string; phase?: @@ -197,250 +128,33 @@ export type BaseInputsMessage1 = { }; export type BaseInputsUnion1 = - | BaseInputsFunctionCall + | OpenAIResponseFunctionToolCall | OutputMessage - | BaseInputsMessage2 - | BaseInputsFunctionCallOutput + | OpenAIResponseInputMessageItem + | OpenAIResponseFunctionToolCallOutput | OutputItemImageGenerationCall - | BaseInputsMessage1; + | BaseInputsMessage; export type BaseInputsUnion = | string | Array< - | BaseInputsFunctionCall + | OpenAIResponseFunctionToolCall | OutputMessage - | BaseInputsMessage2 - | BaseInputsFunctionCallOutput + | OpenAIResponseInputMessageItem + | OpenAIResponseFunctionToolCallOutput | OutputItemImageGenerationCall - | BaseInputsMessage1 + | BaseInputsMessage > | any; /** @internal */ -export const BaseInputsTypeFunctionCall$inboundSchema: z.ZodEnum< - typeof BaseInputsTypeFunctionCall -> = z.enum(BaseInputsTypeFunctionCall); +export const BaseInputsType$inboundSchema: z.ZodEnum = z + .enum(BaseInputsType); /** @internal */ -export const BaseInputsFunctionCall$inboundSchema: z.ZodType< - BaseInputsFunctionCall, - unknown -> = z.object({ - type: BaseInputsTypeFunctionCall$inboundSchema, - call_id: z.string(), - name: z.string(), - arguments: z.string(), - id: z.string().optional(), - status: z.nullable(ToolCallStatusEnum$inboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - "call_id": "callId", - }); -}); - -export function baseInputsFunctionCallFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BaseInputsFunctionCall$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsFunctionCall' from JSON`, - ); -} - -/** @internal */ -export const BaseInputsTypeFunctionCallOutput$inboundSchema: z.ZodEnum< - typeof BaseInputsTypeFunctionCallOutput -> = z.enum(BaseInputsTypeFunctionCallOutput); - -/** @internal */ -export const BaseInputsOutput1$inboundSchema: z.ZodType< - BaseInputsOutput1, - unknown -> = z.union([ - InputText$inboundSchema, - InputImage$inboundSchema.and(z.object({ type: z.literal("input_image") })), - InputFile$inboundSchema, -]); - -export function baseInputsOutput1FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BaseInputsOutput1$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsOutput1' from JSON`, - ); -} - -/** @internal */ -export const BaseInputsOutput2$inboundSchema: z.ZodType< - BaseInputsOutput2, - unknown -> = z.union([ - z.string(), - z.array( - z.union([ - InputText$inboundSchema, - InputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - InputFile$inboundSchema, - ]), - ), -]); - -export function baseInputsOutput2FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BaseInputsOutput2$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsOutput2' from JSON`, - ); -} - -/** @internal */ -export const BaseInputsFunctionCallOutput$inboundSchema: z.ZodType< - BaseInputsFunctionCallOutput, - unknown -> = z.object({ - type: BaseInputsTypeFunctionCallOutput$inboundSchema, - id: z.nullable(z.string()).optional(), - call_id: z.string(), - output: z.union([ - z.string(), - z.array( - z.union([ - InputText$inboundSchema, - InputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - InputFile$inboundSchema, - ]), - ), - ]), - status: z.nullable(ToolCallStatusEnum$inboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - "call_id": "callId", - }); -}); - -export function baseInputsFunctionCallOutputFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BaseInputsFunctionCallOutput$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsFunctionCallOutput' from JSON`, - ); -} - -/** @internal */ -export const BaseInputsTypeMessage2$inboundSchema: z.ZodEnum< - typeof BaseInputsTypeMessage2 -> = z.enum(BaseInputsTypeMessage2); - -/** @internal */ -export const BaseInputsRoleDeveloper2$inboundSchema: z.ZodEnum< - typeof BaseInputsRoleDeveloper2 -> = z.enum(BaseInputsRoleDeveloper2); - -/** @internal */ -export const BaseInputsRoleSystem2$inboundSchema: z.ZodEnum< - typeof BaseInputsRoleSystem2 -> = z.enum(BaseInputsRoleSystem2); - -/** @internal */ -export const BaseInputsRoleUser2$inboundSchema: z.ZodEnum< - typeof BaseInputsRoleUser2 -> = z.enum(BaseInputsRoleUser2); - -/** @internal */ -export const BaseInputsRoleUnion2$inboundSchema: z.ZodType< - BaseInputsRoleUnion2, - unknown -> = z.union([ - BaseInputsRoleUser2$inboundSchema, - BaseInputsRoleSystem2$inboundSchema, - BaseInputsRoleDeveloper2$inboundSchema, -]); - -export function baseInputsRoleUnion2FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BaseInputsRoleUnion2$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsRoleUnion2' from JSON`, - ); -} - -/** @internal */ -export const BaseInputsContent3$inboundSchema: z.ZodType< - BaseInputsContent3, - unknown -> = z.union([ - InputText$inboundSchema, - InputImage$inboundSchema.and(z.object({ type: z.literal("input_image") })), - InputFile$inboundSchema, - InputAudio$inboundSchema, -]); - -export function baseInputsContent3FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BaseInputsContent3$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsContent3' from JSON`, - ); -} - -/** @internal */ -export const BaseInputsMessage2$inboundSchema: z.ZodType< - BaseInputsMessage2, - unknown -> = z.object({ - id: z.string(), - type: BaseInputsTypeMessage2$inboundSchema.optional(), - role: z.union([ - BaseInputsRoleUser2$inboundSchema, - BaseInputsRoleSystem2$inboundSchema, - BaseInputsRoleDeveloper2$inboundSchema, - ]), - content: z.array( - z.union([ - InputText$inboundSchema, - InputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - InputFile$inboundSchema, - InputAudio$inboundSchema, - ]), - ), -}); - -export function baseInputsMessage2FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BaseInputsMessage2$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsMessage2' from JSON`, - ); -} - -/** @internal */ -export const BaseInputsTypeMessage1$inboundSchema: z.ZodEnum< - typeof BaseInputsTypeMessage1 -> = z.enum(BaseInputsTypeMessage1); - -/** @internal */ -export const BaseInputsRoleDeveloper1$inboundSchema: z.ZodEnum< - typeof BaseInputsRoleDeveloper1 -> = z.enum(BaseInputsRoleDeveloper1); +export const BaseInputsRoleDeveloper$inboundSchema: z.ZodEnum< + typeof BaseInputsRoleDeveloper +> = z.enum(BaseInputsRoleDeveloper); /** @internal */ export const BaseInputsRoleAssistant$inboundSchema: z.ZodEnum< @@ -448,33 +162,33 @@ export const BaseInputsRoleAssistant$inboundSchema: z.ZodEnum< > = z.enum(BaseInputsRoleAssistant); /** @internal */ -export const BaseInputsRoleSystem1$inboundSchema: z.ZodEnum< - typeof BaseInputsRoleSystem1 -> = z.enum(BaseInputsRoleSystem1); +export const BaseInputsRoleSystem$inboundSchema: z.ZodEnum< + typeof BaseInputsRoleSystem +> = z.enum(BaseInputsRoleSystem); /** @internal */ -export const BaseInputsRoleUser1$inboundSchema: z.ZodEnum< - typeof BaseInputsRoleUser1 -> = z.enum(BaseInputsRoleUser1); +export const BaseInputsRoleUser$inboundSchema: z.ZodEnum< + typeof BaseInputsRoleUser +> = z.enum(BaseInputsRoleUser); /** @internal */ -export const BaseInputsRoleUnion1$inboundSchema: z.ZodType< - BaseInputsRoleUnion1, +export const BaseInputsRoleUnion$inboundSchema: z.ZodType< + BaseInputsRoleUnion, unknown > = z.union([ - BaseInputsRoleUser1$inboundSchema, - BaseInputsRoleSystem1$inboundSchema, + BaseInputsRoleUser$inboundSchema, + BaseInputsRoleSystem$inboundSchema, BaseInputsRoleAssistant$inboundSchema, - BaseInputsRoleDeveloper1$inboundSchema, + BaseInputsRoleDeveloper$inboundSchema, ]); -export function baseInputsRoleUnion1FromJSON( +export function baseInputsRoleUnionFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => BaseInputsRoleUnion1$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsRoleUnion1' from JSON`, + (x) => BaseInputsRoleUnion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BaseInputsRoleUnion' from JSON`, ); } @@ -482,12 +196,14 @@ export function baseInputsRoleUnion1FromJSON( export const BaseInputsContent1$inboundSchema: z.ZodType< BaseInputsContent1, unknown -> = z.union([ - InputText$inboundSchema, - InputImage$inboundSchema.and(z.object({ type: z.literal("input_image") })), - InputFile$inboundSchema, - InputAudio$inboundSchema, -]); +> = discriminatedUnion("type", { + input_text: InputText$inboundSchema, + input_image: InputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + input_file: InputFile$inboundSchema, + input_audio: InputAudio$inboundSchema, +}); export function baseInputsContent1FromJSON( jsonString: string, @@ -504,16 +220,14 @@ export const BaseInputsContent2$inboundSchema: z.ZodType< BaseInputsContent2, unknown > = z.union([ - z.array( - z.union([ - InputText$inboundSchema, - InputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - InputFile$inboundSchema, - InputAudio$inboundSchema, - ]), - ), + z.array(discriminatedUnion("type", { + input_text: InputText$inboundSchema, + input_image: InputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + input_file: InputFile$inboundSchema, + input_audio: InputAudio$inboundSchema, + })), z.string(), ]); @@ -558,28 +272,26 @@ export function baseInputsPhaseUnionFromJSON( } /** @internal */ -export const BaseInputsMessage1$inboundSchema: z.ZodType< - BaseInputsMessage1, +export const BaseInputsMessage$inboundSchema: z.ZodType< + BaseInputsMessage, unknown > = z.object({ - type: BaseInputsTypeMessage1$inboundSchema.optional(), + type: BaseInputsType$inboundSchema.optional(), role: z.union([ - BaseInputsRoleUser1$inboundSchema, - BaseInputsRoleSystem1$inboundSchema, + BaseInputsRoleUser$inboundSchema, + BaseInputsRoleSystem$inboundSchema, BaseInputsRoleAssistant$inboundSchema, - BaseInputsRoleDeveloper1$inboundSchema, + BaseInputsRoleDeveloper$inboundSchema, ]), content: z.union([ - z.array( - z.union([ - InputText$inboundSchema, - InputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - InputFile$inboundSchema, - InputAudio$inboundSchema, - ]), - ), + z.array(discriminatedUnion("type", { + input_text: InputText$inboundSchema, + input_image: InputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + input_file: InputFile$inboundSchema, + input_audio: InputAudio$inboundSchema, + })), z.string(), ]), phase: z.nullable( @@ -591,13 +303,13 @@ export const BaseInputsMessage1$inboundSchema: z.ZodType< ).optional(), }); -export function baseInputsMessage1FromJSON( +export function baseInputsMessageFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => BaseInputsMessage1$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsMessage1' from JSON`, + (x) => BaseInputsMessage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BaseInputsMessage' from JSON`, ); } @@ -606,12 +318,12 @@ export const BaseInputsUnion1$inboundSchema: z.ZodType< BaseInputsUnion1, unknown > = z.union([ - z.lazy(() => BaseInputsFunctionCall$inboundSchema), + OpenAIResponseFunctionToolCall$inboundSchema, OutputMessage$inboundSchema, - z.lazy(() => BaseInputsMessage2$inboundSchema), - z.lazy(() => BaseInputsFunctionCallOutput$inboundSchema), + OpenAIResponseInputMessageItem$inboundSchema, + OpenAIResponseFunctionToolCallOutput$inboundSchema, OutputItemImageGenerationCall$inboundSchema, - z.lazy(() => BaseInputsMessage1$inboundSchema), + z.lazy(() => BaseInputsMessage$inboundSchema), ]); export function baseInputsUnion1FromJSON( @@ -630,14 +342,16 @@ export const BaseInputsUnion$inboundSchema: z.ZodType< unknown > = z.union([ z.string(), - z.array(z.union([ - z.lazy(() => BaseInputsFunctionCall$inboundSchema), - OutputMessage$inboundSchema, - z.lazy(() => BaseInputsMessage2$inboundSchema), - z.lazy(() => BaseInputsFunctionCallOutput$inboundSchema), - OutputItemImageGenerationCall$inboundSchema, - z.lazy(() => BaseInputsMessage1$inboundSchema), - ])), + z.array( + z.union([ + OpenAIResponseFunctionToolCall$inboundSchema, + OutputMessage$inboundSchema, + OpenAIResponseInputMessageItem$inboundSchema, + OpenAIResponseFunctionToolCallOutput$inboundSchema, + OutputItemImageGenerationCall$inboundSchema, + z.lazy(() => BaseInputsMessage$inboundSchema), + ]), + ), z.any(), ]); diff --git a/src/models/basereasoningconfig.ts b/src/models/basereasoningconfig.ts index 2fe05d1b..2d487fb5 100644 --- a/src/models/basereasoningconfig.ts +++ b/src/models/basereasoningconfig.ts @@ -8,17 +8,17 @@ import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { - ReasoningEffortEnum, - ReasoningEffortEnum$inboundSchema, -} from "./reasoningeffortenum.js"; + ReasoningEffort, + ReasoningEffort$inboundSchema, +} from "./reasoningeffort.js"; import { - ReasoningSummaryVerbosityEnum, - ReasoningSummaryVerbosityEnum$inboundSchema, -} from "./reasoningsummaryverbosityenum.js"; + ReasoningSummaryVerbosity, + ReasoningSummaryVerbosity$inboundSchema, +} from "./reasoningsummaryverbosity.js"; export type BaseReasoningConfig = { - effort?: ReasoningEffortEnum | null | undefined; - summary?: ReasoningSummaryVerbosityEnum | null | undefined; + effort?: ReasoningEffort | null | undefined; + summary?: ReasoningSummaryVerbosity | null | undefined; }; /** @internal */ @@ -26,8 +26,8 @@ export const BaseReasoningConfig$inboundSchema: z.ZodType< BaseReasoningConfig, unknown > = z.object({ - effort: z.nullable(ReasoningEffortEnum$inboundSchema).optional(), - summary: z.nullable(ReasoningSummaryVerbosityEnum$inboundSchema).optional(), + effort: z.nullable(ReasoningEffort$inboundSchema).optional(), + summary: z.nullable(ReasoningSummaryVerbosity$inboundSchema).optional(), }); export function baseReasoningConfigFromJSON( diff --git a/src/models/bulkassignkeysrequest.ts b/src/models/bulkassignkeysrequest.ts new file mode 100644 index 00000000..fa499133 --- /dev/null +++ b/src/models/bulkassignkeysrequest.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: ad0c5e35d467 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; + +export type BulkAssignKeysRequest = { + /** + * Array of API key hashes to assign to the guardrail + */ + keyHashes: Array; +}; + +/** @internal */ +export type BulkAssignKeysRequest$Outbound = { + key_hashes: Array; +}; + +/** @internal */ +export const BulkAssignKeysRequest$outboundSchema: z.ZodType< + BulkAssignKeysRequest$Outbound, + BulkAssignKeysRequest +> = z.object({ + keyHashes: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + keyHashes: "key_hashes", + }); +}); + +export function bulkAssignKeysRequestToJSON( + bulkAssignKeysRequest: BulkAssignKeysRequest, +): string { + return JSON.stringify( + BulkAssignKeysRequest$outboundSchema.parse(bulkAssignKeysRequest), + ); +} diff --git a/src/models/bulkassignkeysresponse.ts b/src/models/bulkassignkeysresponse.ts new file mode 100644 index 00000000..24c5ab30 --- /dev/null +++ b/src/models/bulkassignkeysresponse.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c8f692e7b579 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type BulkAssignKeysResponse = { + /** + * Number of keys successfully assigned + */ + assignedCount: number; +}; + +/** @internal */ +export const BulkAssignKeysResponse$inboundSchema: z.ZodType< + BulkAssignKeysResponse, + unknown +> = z.object({ + assigned_count: z.int(), +}).transform((v) => { + return remap$(v, { + "assigned_count": "assignedCount", + }); +}); + +export function bulkAssignKeysResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BulkAssignKeysResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BulkAssignKeysResponse' from JSON`, + ); +} diff --git a/src/models/bulkassignmembersrequest.ts b/src/models/bulkassignmembersrequest.ts new file mode 100644 index 00000000..f7710317 --- /dev/null +++ b/src/models/bulkassignmembersrequest.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 502ee2c0e36a + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; + +export type BulkAssignMembersRequest = { + /** + * Array of member user IDs to assign to the guardrail + */ + memberUserIds: Array; +}; + +/** @internal */ +export type BulkAssignMembersRequest$Outbound = { + member_user_ids: Array; +}; + +/** @internal */ +export const BulkAssignMembersRequest$outboundSchema: z.ZodType< + BulkAssignMembersRequest$Outbound, + BulkAssignMembersRequest +> = z.object({ + memberUserIds: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + memberUserIds: "member_user_ids", + }); +}); + +export function bulkAssignMembersRequestToJSON( + bulkAssignMembersRequest: BulkAssignMembersRequest, +): string { + return JSON.stringify( + BulkAssignMembersRequest$outboundSchema.parse(bulkAssignMembersRequest), + ); +} diff --git a/src/models/bulkassignmembersresponse.ts b/src/models/bulkassignmembersresponse.ts new file mode 100644 index 00000000..53292cf5 --- /dev/null +++ b/src/models/bulkassignmembersresponse.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e54fe72a28b7 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type BulkAssignMembersResponse = { + /** + * Number of members successfully assigned + */ + assignedCount: number; +}; + +/** @internal */ +export const BulkAssignMembersResponse$inboundSchema: z.ZodType< + BulkAssignMembersResponse, + unknown +> = z.object({ + assigned_count: z.int(), +}).transform((v) => { + return remap$(v, { + "assigned_count": "assignedCount", + }); +}); + +export function bulkAssignMembersResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BulkAssignMembersResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BulkAssignMembersResponse' from JSON`, + ); +} diff --git a/src/models/bulkunassignkeysrequest.ts b/src/models/bulkunassignkeysrequest.ts new file mode 100644 index 00000000..05516b4e --- /dev/null +++ b/src/models/bulkunassignkeysrequest.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e773f6f68c24 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; + +export type BulkUnassignKeysRequest = { + /** + * Array of API key hashes to unassign from the guardrail + */ + keyHashes: Array; +}; + +/** @internal */ +export type BulkUnassignKeysRequest$Outbound = { + key_hashes: Array; +}; + +/** @internal */ +export const BulkUnassignKeysRequest$outboundSchema: z.ZodType< + BulkUnassignKeysRequest$Outbound, + BulkUnassignKeysRequest +> = z.object({ + keyHashes: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + keyHashes: "key_hashes", + }); +}); + +export function bulkUnassignKeysRequestToJSON( + bulkUnassignKeysRequest: BulkUnassignKeysRequest, +): string { + return JSON.stringify( + BulkUnassignKeysRequest$outboundSchema.parse(bulkUnassignKeysRequest), + ); +} diff --git a/src/models/bulkunassignkeysresponse.ts b/src/models/bulkunassignkeysresponse.ts new file mode 100644 index 00000000..dd2278eb --- /dev/null +++ b/src/models/bulkunassignkeysresponse.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5906bcf3a524 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type BulkUnassignKeysResponse = { + /** + * Number of keys successfully unassigned + */ + unassignedCount: number; +}; + +/** @internal */ +export const BulkUnassignKeysResponse$inboundSchema: z.ZodType< + BulkUnassignKeysResponse, + unknown +> = z.object({ + unassigned_count: z.int(), +}).transform((v) => { + return remap$(v, { + "unassigned_count": "unassignedCount", + }); +}); + +export function bulkUnassignKeysResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BulkUnassignKeysResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BulkUnassignKeysResponse' from JSON`, + ); +} diff --git a/src/models/bulkunassignmembersrequest.ts b/src/models/bulkunassignmembersrequest.ts new file mode 100644 index 00000000..e37e7553 --- /dev/null +++ b/src/models/bulkunassignmembersrequest.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3443354340f5 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; + +export type BulkUnassignMembersRequest = { + /** + * Array of member user IDs to unassign from the guardrail + */ + memberUserIds: Array; +}; + +/** @internal */ +export type BulkUnassignMembersRequest$Outbound = { + member_user_ids: Array; +}; + +/** @internal */ +export const BulkUnassignMembersRequest$outboundSchema: z.ZodType< + BulkUnassignMembersRequest$Outbound, + BulkUnassignMembersRequest +> = z.object({ + memberUserIds: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + memberUserIds: "member_user_ids", + }); +}); + +export function bulkUnassignMembersRequestToJSON( + bulkUnassignMembersRequest: BulkUnassignMembersRequest, +): string { + return JSON.stringify( + BulkUnassignMembersRequest$outboundSchema.parse(bulkUnassignMembersRequest), + ); +} diff --git a/src/models/bulkunassignmembersresponse.ts b/src/models/bulkunassignmembersresponse.ts new file mode 100644 index 00000000..fbf53dfb --- /dev/null +++ b/src/models/bulkunassignmembersresponse.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4d3857aa5f6c + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type BulkUnassignMembersResponse = { + /** + * Number of members successfully unassigned + */ + unassignedCount: number; +}; + +/** @internal */ +export const BulkUnassignMembersResponse$inboundSchema: z.ZodType< + BulkUnassignMembersResponse, + unknown +> = z.object({ + unassigned_count: z.int(), +}).transform((v) => { + return remap$(v, { + "unassigned_count": "unassignedCount", + }); +}); + +export function bulkUnassignMembersResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BulkUnassignMembersResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BulkUnassignMembersResponse' from JSON`, + ); +} diff --git a/src/models/chataudiooutput.ts b/src/models/chataudiooutput.ts index 848f5f6f..fcb5af04 100644 --- a/src/models/chataudiooutput.ts +++ b/src/models/chataudiooutput.ts @@ -37,7 +37,7 @@ export const ChatAudioOutput$inboundSchema: z.ZodType< unknown > = z.object({ id: z.string().optional(), - expires_at: z.number().optional(), + expires_at: z.int().optional(), data: z.string().optional(), transcript: z.string().optional(), }).transform((v) => { @@ -59,7 +59,7 @@ export const ChatAudioOutput$outboundSchema: z.ZodType< ChatAudioOutput > = z.object({ id: z.string().optional(), - expiresAt: z.number().optional(), + expiresAt: z.int().optional(), data: z.string().optional(), transcript: z.string().optional(), }).transform((v) => { diff --git a/src/models/chatchoice.ts b/src/models/chatchoice.ts index 18d99a37..bb8b94e3 100644 --- a/src/models/chatchoice.ts +++ b/src/models/chatchoice.ts @@ -11,6 +11,10 @@ import { ChatAssistantMessage, ChatAssistantMessage$inboundSchema, } from "./chatassistantmessage.js"; +import { + ChatFinishReasonEnum, + ChatFinishReasonEnum$inboundSchema, +} from "./chatfinishreasonenum.js"; import { ChatTokenLogprobs, ChatTokenLogprobs$inboundSchema, @@ -21,7 +25,7 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Chat completion choice */ export type ChatChoice = { - finishReason: any | null; + finishReason: ChatFinishReasonEnum | null; /** * Choice index */ @@ -39,8 +43,8 @@ export type ChatChoice = { /** @internal */ export const ChatChoice$inboundSchema: z.ZodType = z .object({ - finish_reason: z.nullable(z.any()), - index: z.number(), + finish_reason: z.nullable(ChatFinishReasonEnum$inboundSchema), + index: z.int(), message: ChatAssistantMessage$inboundSchema, logprobs: z.nullable(ChatTokenLogprobs$inboundSchema).optional(), }).transform((v) => { diff --git a/src/models/chatcontentaudio.ts b/src/models/chatcontentaudio.ts index 2719c9b9..9ac36b34 100644 --- a/src/models/chatcontentaudio.ts +++ b/src/models/chatcontentaudio.ts @@ -6,15 +6,9 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const ChatContentAudioType = { - InputAudio: "input_audio", -} as const; -export type ChatContentAudioType = ClosedEnum; - export type ChatContentAudioInputAudio = { /** * Base64 encoded audio data @@ -30,19 +24,10 @@ export type ChatContentAudioInputAudio = { * Audio input content part. Supported audio formats vary by provider. */ export type ChatContentAudio = { - type: ChatContentAudioType; + type: "input_audio"; inputAudio: ChatContentAudioInputAudio; }; -/** @internal */ -export const ChatContentAudioType$inboundSchema: z.ZodEnum< - typeof ChatContentAudioType -> = z.enum(ChatContentAudioType); -/** @internal */ -export const ChatContentAudioType$outboundSchema: z.ZodEnum< - typeof ChatContentAudioType -> = ChatContentAudioType$inboundSchema; - /** @internal */ export const ChatContentAudioInputAudio$inboundSchema: z.ZodType< ChatContentAudioInputAudio, @@ -88,7 +73,7 @@ export const ChatContentAudio$inboundSchema: z.ZodType< ChatContentAudio, unknown > = z.object({ - type: ChatContentAudioType$inboundSchema, + type: z.literal("input_audio"), input_audio: z.lazy(() => ChatContentAudioInputAudio$inboundSchema), }).transform((v) => { return remap$(v, { @@ -97,7 +82,7 @@ export const ChatContentAudio$inboundSchema: z.ZodType< }); /** @internal */ export type ChatContentAudio$Outbound = { - type: string; + type: "input_audio"; input_audio: ChatContentAudioInputAudio$Outbound; }; @@ -106,7 +91,7 @@ export const ChatContentAudio$outboundSchema: z.ZodType< ChatContentAudio$Outbound, ChatContentAudio > = z.object({ - type: ChatContentAudioType$outboundSchema, + type: z.literal("input_audio"), inputAudio: z.lazy(() => ChatContentAudioInputAudio$outboundSchema), }).transform((v) => { return remap$(v, { diff --git a/src/models/chatcontentcachecontrol.ts b/src/models/chatcontentcachecontrol.ts index 19802719..ebd79142 100644 --- a/src/models/chatcontentcachecontrol.ts +++ b/src/models/chatcontentcachecontrol.ts @@ -5,9 +5,13 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; +import { + AnthropicCacheControlTtl, + AnthropicCacheControlTtl$inboundSchema, + AnthropicCacheControlTtl$outboundSchema, +} from "./anthropiccachecontrolttl.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export const ChatContentCacheControlType = { @@ -17,20 +21,12 @@ export type ChatContentCacheControlType = ClosedEnum< typeof ChatContentCacheControlType >; -export const ChatContentCacheControlTtl = { - Fivem: "5m", - Oneh: "1h", -} as const; -export type ChatContentCacheControlTtl = OpenEnum< - typeof ChatContentCacheControlTtl ->; - /** * Cache control for the content part */ export type ChatContentCacheControl = { type: ChatContentCacheControlType; - ttl?: ChatContentCacheControlTtl | undefined; + ttl?: AnthropicCacheControlTtl | undefined; }; /** @internal */ @@ -42,24 +38,13 @@ export const ChatContentCacheControlType$outboundSchema: z.ZodEnum< typeof ChatContentCacheControlType > = ChatContentCacheControlType$inboundSchema; -/** @internal */ -export const ChatContentCacheControlTtl$inboundSchema: z.ZodType< - ChatContentCacheControlTtl, - unknown -> = openEnums.inboundSchema(ChatContentCacheControlTtl); -/** @internal */ -export const ChatContentCacheControlTtl$outboundSchema: z.ZodType< - string, - ChatContentCacheControlTtl -> = openEnums.outboundSchema(ChatContentCacheControlTtl); - /** @internal */ export const ChatContentCacheControl$inboundSchema: z.ZodType< ChatContentCacheControl, unknown > = z.object({ type: ChatContentCacheControlType$inboundSchema, - ttl: ChatContentCacheControlTtl$inboundSchema.optional(), + ttl: AnthropicCacheControlTtl$inboundSchema.optional(), }); /** @internal */ export type ChatContentCacheControl$Outbound = { @@ -73,7 +58,7 @@ export const ChatContentCacheControl$outboundSchema: z.ZodType< ChatContentCacheControl > = z.object({ type: ChatContentCacheControlType$outboundSchema, - ttl: ChatContentCacheControlTtl$outboundSchema.optional(), + ttl: AnthropicCacheControlTtl$outboundSchema.optional(), }); export function chatContentCacheControlToJSON( diff --git a/src/models/chatcontentfile.ts b/src/models/chatcontentfile.ts index 9011ad27..87f8c2d2 100644 --- a/src/models/chatcontentfile.ts +++ b/src/models/chatcontentfile.ts @@ -6,15 +6,9 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const ChatContentFileType = { - File: "file", -} as const; -export type ChatContentFileType = ClosedEnum; - export type FileT = { /** * File content as base64 data URL or URL @@ -34,19 +28,10 @@ export type FileT = { * File content part for document processing */ export type ChatContentFile = { - type: ChatContentFileType; + type: "file"; file: FileT; }; -/** @internal */ -export const ChatContentFileType$inboundSchema: z.ZodEnum< - typeof ChatContentFileType -> = z.enum(ChatContentFileType); -/** @internal */ -export const ChatContentFileType$outboundSchema: z.ZodEnum< - typeof ChatContentFileType -> = ChatContentFileType$inboundSchema; - /** @internal */ export const FileT$inboundSchema: z.ZodType = z.object({ file_data: z.string().optional(), @@ -95,12 +80,12 @@ export const ChatContentFile$inboundSchema: z.ZodType< ChatContentFile, unknown > = z.object({ - type: ChatContentFileType$inboundSchema, + type: z.literal("file"), file: z.lazy(() => FileT$inboundSchema), }); /** @internal */ export type ChatContentFile$Outbound = { - type: string; + type: "file"; file: FileT$Outbound; }; @@ -109,7 +94,7 @@ export const ChatContentFile$outboundSchema: z.ZodType< ChatContentFile$Outbound, ChatContentFile > = z.object({ - type: ChatContentFileType$outboundSchema, + type: z.literal("file"), file: z.lazy(() => FileT$outboundSchema), }); diff --git a/src/models/chatcontentimage.ts b/src/models/chatcontentimage.ts index 88e500bb..642dfb6b 100644 --- a/src/models/chatcontentimage.ts +++ b/src/models/chatcontentimage.ts @@ -7,15 +7,10 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const ChatContentImageType = { - ImageUrl: "image_url", -} as const; -export type ChatContentImageType = ClosedEnum; - /** * Image detail level for vision models */ @@ -44,19 +39,10 @@ export type ChatContentImageImageUrl = { * Image content part for vision models */ export type ChatContentImage = { - type: ChatContentImageType; + type: "image_url"; imageUrl: ChatContentImageImageUrl; }; -/** @internal */ -export const ChatContentImageType$inboundSchema: z.ZodEnum< - typeof ChatContentImageType -> = z.enum(ChatContentImageType); -/** @internal */ -export const ChatContentImageType$outboundSchema: z.ZodEnum< - typeof ChatContentImageType -> = ChatContentImageType$inboundSchema; - /** @internal */ export const ChatContentImageDetail$inboundSchema: z.ZodType< ChatContentImageDetail, @@ -113,7 +99,7 @@ export const ChatContentImage$inboundSchema: z.ZodType< ChatContentImage, unknown > = z.object({ - type: ChatContentImageType$inboundSchema, + type: z.literal("image_url"), image_url: z.lazy(() => ChatContentImageImageUrl$inboundSchema), }).transform((v) => { return remap$(v, { @@ -122,7 +108,7 @@ export const ChatContentImage$inboundSchema: z.ZodType< }); /** @internal */ export type ChatContentImage$Outbound = { - type: string; + type: "image_url"; image_url: ChatContentImageImageUrl$Outbound; }; @@ -131,7 +117,7 @@ export const ChatContentImage$outboundSchema: z.ZodType< ChatContentImage$Outbound, ChatContentImage > = z.object({ - type: ChatContentImageType$outboundSchema, + type: z.literal("image_url"), imageUrl: z.lazy(() => ChatContentImageImageUrl$outboundSchema), }).transform((v) => { return remap$(v, { diff --git a/src/models/chatcontentitems.ts b/src/models/chatcontentitems.ts index 94b65745..2efd5a78 100644 --- a/src/models/chatcontentitems.ts +++ b/src/models/chatcontentitems.ts @@ -5,6 +5,8 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { ChatContentAudio, @@ -44,94 +46,52 @@ import { LegacyChatContentVideo$outboundSchema, } from "./legacychatcontentvideo.js"; -export type ChatContentItems1 = LegacyChatContentVideo | ChatContentVideo; - /** * Content part for chat completion messages */ export type ChatContentItems = - | ChatContentText + | (ChatContentText & { type: "text" }) | ChatContentImage | ChatContentAudio - | ChatContentFile | LegacyChatContentVideo - | ChatContentVideo; - -/** @internal */ -export const ChatContentItems1$inboundSchema: z.ZodType< - ChatContentItems1, - unknown -> = z.union([ - LegacyChatContentVideo$inboundSchema, - ChatContentVideo$inboundSchema, -]); -/** @internal */ -export type ChatContentItems1$Outbound = - | LegacyChatContentVideo$Outbound - | ChatContentVideo$Outbound; - -/** @internal */ -export const ChatContentItems1$outboundSchema: z.ZodType< - ChatContentItems1$Outbound, - ChatContentItems1 -> = z.union([ - LegacyChatContentVideo$outboundSchema, - ChatContentVideo$outboundSchema, -]); - -export function chatContentItems1ToJSON( - chatContentItems1: ChatContentItems1, -): string { - return JSON.stringify( - ChatContentItems1$outboundSchema.parse(chatContentItems1), - ); -} -export function chatContentItems1FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ChatContentItems1$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ChatContentItems1' from JSON`, - ); -} + | ChatContentVideo + | ChatContentFile + | discriminatedUnionTypes.Unknown<"type">; /** @internal */ export const ChatContentItems$inboundSchema: z.ZodType< ChatContentItems, unknown -> = z.union([ - ChatContentText$inboundSchema, - ChatContentImage$inboundSchema, - ChatContentAudio$inboundSchema, - ChatContentFile$inboundSchema, - z.union([ - LegacyChatContentVideo$inboundSchema, - ChatContentVideo$inboundSchema, - ]), -]); +> = discriminatedUnion("type", { + text: ChatContentText$inboundSchema.and( + z.object({ type: z.literal("text") }), + ), + image_url: ChatContentImage$inboundSchema, + input_audio: ChatContentAudio$inboundSchema, + input_video: LegacyChatContentVideo$inboundSchema, + video_url: ChatContentVideo$inboundSchema, + file: ChatContentFile$inboundSchema, +}); /** @internal */ export type ChatContentItems$Outbound = - | ChatContentText$Outbound + | (ChatContentText$Outbound & { type: "text" }) | ChatContentImage$Outbound | ChatContentAudio$Outbound - | ChatContentFile$Outbound | LegacyChatContentVideo$Outbound - | ChatContentVideo$Outbound; + | ChatContentVideo$Outbound + | ChatContentFile$Outbound; /** @internal */ export const ChatContentItems$outboundSchema: z.ZodType< ChatContentItems$Outbound, ChatContentItems > = z.union([ - ChatContentText$outboundSchema, + ChatContentText$outboundSchema.and(z.object({ type: z.literal("text") })), ChatContentImage$outboundSchema, ChatContentAudio$outboundSchema, + LegacyChatContentVideo$outboundSchema, + ChatContentVideo$outboundSchema, ChatContentFile$outboundSchema, - z.union([ - LegacyChatContentVideo$outboundSchema, - ChatContentVideo$outboundSchema, - ]), ]); export function chatContentItemsToJSON( diff --git a/src/models/chatfunctiontool.ts b/src/models/chatfunctiontool.ts index 01c555d7..d217be1d 100644 --- a/src/models/chatfunctiontool.ts +++ b/src/models/chatfunctiontool.ts @@ -11,11 +11,6 @@ import { ChatContentCacheControl$Outbound, ChatContentCacheControl$outboundSchema, } from "./chatcontentcachecontrol.js"; -import { - ChatWebSearchServerTool, - ChatWebSearchServerTool$Outbound, - ChatWebSearchServerTool$outboundSchema, -} from "./chatwebsearchservertool.js"; import { ChatWebSearchShorthand, ChatWebSearchShorthand$Outbound, @@ -26,6 +21,11 @@ import { DatetimeServerTool$Outbound, DatetimeServerTool$outboundSchema, } from "./datetimeservertool.js"; +import { + OpenRouterWebSearchServerTool, + OpenRouterWebSearchServerTool$Outbound, + OpenRouterWebSearchServerTool$outboundSchema, +} from "./openrouterwebsearchservertool.js"; export const ChatFunctionToolType = { Function: "function", @@ -72,7 +72,7 @@ export type ChatFunctionToolFunction = { export type ChatFunctionTool = | ChatFunctionToolFunction | DatetimeServerTool - | ChatWebSearchServerTool + | OpenRouterWebSearchServerTool | ChatWebSearchShorthand; /** @internal */ @@ -142,7 +142,7 @@ export function chatFunctionToolFunctionToJSON( export type ChatFunctionTool$Outbound = | ChatFunctionToolFunction$Outbound | DatetimeServerTool$Outbound - | ChatWebSearchServerTool$Outbound + | OpenRouterWebSearchServerTool$Outbound | ChatWebSearchShorthand$Outbound; /** @internal */ @@ -152,7 +152,7 @@ export const ChatFunctionTool$outboundSchema: z.ZodType< > = z.union([ z.lazy(() => ChatFunctionToolFunction$outboundSchema), DatetimeServerTool$outboundSchema, - ChatWebSearchServerTool$outboundSchema, + OpenRouterWebSearchServerTool$outboundSchema, ChatWebSearchShorthand$outboundSchema, ]); diff --git a/src/models/chatrequest.ts b/src/models/chatrequest.ts index fd8c3ee3..c198f713 100644 --- a/src/models/chatrequest.ts +++ b/src/models/chatrequest.ts @@ -6,7 +6,17 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { + AnthropicCacheControlDirective, + AnthropicCacheControlDirective$Outbound, + AnthropicCacheControlDirective$outboundSchema, +} from "./anthropiccachecontroldirective.js"; +import { + AutoRouterPlugin, + AutoRouterPlugin$Outbound, + AutoRouterPlugin$outboundSchema, +} from "./autorouterplugin.js"; import { ChatDebugOptions, ChatDebugOptions$Outbound, @@ -42,6 +52,10 @@ import { ChatMessages$Outbound, ChatMessages$outboundSchema, } from "./chatmessages.js"; +import { + ChatReasoningSummaryVerbosityEnum, + ChatReasoningSummaryVerbosityEnum$outboundSchema, +} from "./chatreasoningsummaryverbosityenum.js"; import { ChatStreamOptions, ChatStreamOptions$Outbound, @@ -53,304 +67,53 @@ import { ChatToolChoice$outboundSchema, } from "./chattoolchoice.js"; import { - ContextCompressionEngine, - ContextCompressionEngine$outboundSchema, -} from "./contextcompressionengine.js"; + ContextCompressionPlugin, + ContextCompressionPlugin$Outbound, + ContextCompressionPlugin$outboundSchema, +} from "./contextcompressionplugin.js"; import { - DataCollection, - DataCollection$outboundSchema, -} from "./datacollection.js"; + FileParserPlugin, + FileParserPlugin$Outbound, + FileParserPlugin$outboundSchema, +} from "./fileparserplugin.js"; import { FormatJsonObjectConfig, FormatJsonObjectConfig$Outbound, FormatJsonObjectConfig$outboundSchema, } from "./formatjsonobjectconfig.js"; import { - PDFParserOptions, - PDFParserOptions$Outbound, - PDFParserOptions$outboundSchema, -} from "./pdfparseroptions.js"; + ModerationPlugin, + ModerationPlugin$Outbound, + ModerationPlugin$outboundSchema, +} from "./moderationplugin.js"; import { - PreferredMaxLatency, - PreferredMaxLatency$Outbound, - PreferredMaxLatency$outboundSchema, -} from "./preferredmaxlatency.js"; + ProviderPreferences, + ProviderPreferences$Outbound, + ProviderPreferences$outboundSchema, +} from "./providerpreferences.js"; import { - PreferredMinThroughput, - PreferredMinThroughput$Outbound, - PreferredMinThroughput$outboundSchema, -} from "./preferredminthroughput.js"; -import { ProviderName, ProviderName$outboundSchema } from "./providername.js"; -import { Quantization, Quantization$outboundSchema } from "./quantization.js"; + ResponseHealingPlugin, + ResponseHealingPlugin$Outbound, + ResponseHealingPlugin$outboundSchema, +} from "./responsehealingplugin.js"; import { - WebSearchEngine, - WebSearchEngine$outboundSchema, -} from "./websearchengine.js"; - -export type ChatRequestOrder = ProviderName | string; - -export type ChatRequestOnly = ProviderName | string; - -export type ChatRequestIgnore = ProviderName | string; - -export const ChatRequestSortEnum = { - Price: "price", - Throughput: "throughput", - Latency: "latency", - Exacto: "exacto", -} as const; -export type ChatRequestSortEnum = OpenEnum; - -export const ChatRequestProviderSortConfigEnum = { - Price: "price", - Throughput: "throughput", - Latency: "latency", - Exacto: "exacto", -} as const; -export type ChatRequestProviderSortConfigEnum = ClosedEnum< - typeof ChatRequestProviderSortConfigEnum ->; - -/** - * The provider sorting strategy (price, throughput, latency) - */ -export const ChatRequestBy = { - Price: "price", - Throughput: "throughput", - Latency: "latency", - Exacto: "exacto", -} as const; -/** - * The provider sorting strategy (price, throughput, latency) - */ -export type ChatRequestBy = OpenEnum; - -/** - * Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. - */ -export const ChatRequestPartition = { - Model: "model", - None: "none", -} as const; -/** - * Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. - */ -export type ChatRequestPartition = OpenEnum; - -export type ChatRequestProviderSortConfig = { - /** - * The provider sorting strategy (price, throughput, latency) - */ - by?: ChatRequestBy | null | undefined; - /** - * Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. - */ - partition?: ChatRequestPartition | null | undefined; -}; - -/** - * The provider sorting strategy (price, throughput, latency) - */ -export type ChatRequestProviderSortConfigUnion = - | ChatRequestProviderSortConfig - | ChatRequestProviderSortConfigEnum; - -/** - * The provider sorting strategy (price, throughput, latency) - */ -export const ChatRequestProviderSort = { - Price: "price", - Throughput: "throughput", - Latency: "latency", - Exacto: "exacto", -} as const; -/** - * The provider sorting strategy (price, throughput, latency) - */ -export type ChatRequestProviderSort = OpenEnum; - -/** - * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. - */ -export type ChatRequestSortUnion = - | ChatRequestProviderSort - | ChatRequestProviderSortConfig - | ChatRequestProviderSortConfigEnum - | ChatRequestSortEnum; - -/** - * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. - */ -export type ChatRequestMaxPrice = { - /** - * Price per million prompt tokens - */ - prompt?: string | undefined; - completion?: string | undefined; - image?: string | undefined; - audio?: string | undefined; - request?: string | undefined; -}; - -/** - * When multiple model providers are available, optionally indicate your routing preference. - */ -export type ChatRequestProvider = { - /** - * Whether to allow backup providers to serve requests - * - * @remarks - * - 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. - */ - allowFallbacks?: boolean | null | undefined; - /** - * 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. - */ - requireParameters?: boolean | null | undefined; - /** - * Data collection setting. If no available model provider meets the requirement, your request will return an error. - * - * @remarks - * - allow: (default) allow providers which store user data non-transiently and may train on it - * - * - deny: use only providers which do not collect user data. - */ - dataCollection?: DataCollection | null | undefined; - /** - * Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. - */ - zdr?: boolean | null | undefined; - /** - * Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. - */ - enforceDistillableText?: boolean | null | undefined; - /** - * 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?: Array | null | undefined; - /** - * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. - */ - only?: Array | null | undefined; - /** - * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. - */ - ignore?: Array | null | undefined; - /** - * A list of quantization levels to filter the provider by. - */ - quantizations?: Array | null | undefined; - sort?: - | ChatRequestProviderSort - | ChatRequestProviderSortConfig - | ChatRequestProviderSortConfigEnum - | ChatRequestSortEnum - | null - | undefined; - /** - * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. - */ - maxPrice?: ChatRequestMaxPrice | undefined; - /** - * 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. - */ - preferredMinThroughput?: PreferredMinThroughput | null | undefined; - /** - * 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. - */ - preferredMaxLatency?: PreferredMaxLatency | null | undefined; -}; - -export type ChatRequestPluginContextCompression = { - id: "context-compression"; - /** - * Set to false to disable the context-compression plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; - /** - * The compression engine to use. Defaults to "middle-out". - */ - engine?: ContextCompressionEngine | undefined; -}; - -export type ChatRequestPluginResponseHealing = { - id: "response-healing"; - /** - * Set to false to disable the response-healing plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; -}; - -export type ChatRequestPluginFileParser = { - id: "file-parser"; - /** - * Set to false to disable the file-parser plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; - /** - * Options for PDF parsing. - */ - pdf?: PDFParserOptions | undefined; -}; - -export type ChatRequestPluginWeb = { - id: "web"; - /** - * Set to false to disable the web-search plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; - maxResults?: number | undefined; - searchPrompt?: string | undefined; - /** - * The search engine to use for web search. - */ - engine?: WebSearchEngine | undefined; - /** - * A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). - */ - includeDomains?: Array | undefined; - /** - * A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). - */ - excludeDomains?: Array | undefined; -}; - -export type ChatRequestPluginModeration = { - id: "moderation"; -}; - -export type ChatRequestPluginAutoRouter = { - id: "auto-router"; - /** - * Set to false to disable the auto-router plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; - /** - * 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. - */ - allowedModels?: Array | undefined; -}; - -export type ChatRequestPluginUnion = - | ChatRequestPluginAutoRouter - | ChatRequestPluginModeration - | ChatRequestPluginWeb - | ChatRequestPluginFileParser - | ChatRequestPluginResponseHealing - | ChatRequestPluginContextCompression; - -/** - * Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. - */ -export type ChatRequestTrace = { - traceId?: string | undefined; - traceName?: string | undefined; - spanName?: string | undefined; - generationName?: string | undefined; - parentSpanId?: string | undefined; - additionalProperties?: { [k: string]: any | null } | undefined; -}; + TraceConfig, + TraceConfig$Outbound, + TraceConfig$outboundSchema, +} from "./traceconfig.js"; +import { + WebSearchPlugin, + WebSearchPlugin$Outbound, + WebSearchPlugin$outboundSchema, +} from "./websearchplugin.js"; + +export type ChatRequestPlugin = + | AutoRouterPlugin + | ModerationPlugin + | WebSearchPlugin + | FileParserPlugin + | ResponseHealingPlugin + | ContextCompressionPlugin; /** * Constrains effort on reasoning for reasoning models @@ -376,7 +139,7 @@ export type Reasoning = { * Constrains effort on reasoning for reasoning models */ effort?: Effort | null | undefined; - summary?: any | null | undefined; + summary?: ChatReasoningSummaryVerbosityEnum | null | undefined; }; /** @@ -403,25 +166,6 @@ export const Modality = { } as const; export type Modality = OpenEnum; -export const ChatRequestType = { - Ephemeral: "ephemeral", -} as const; -export type ChatRequestType = ClosedEnum; - -export const ChatRequestTtl = { - Fivem: "5m", - Oneh: "1h", -} as const; -export type ChatRequestTtl = OpenEnum; - -/** - * Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. - */ -export type CacheControl = { - type: ChatRequestType; - ttl?: ChatRequestTtl | undefined; -}; - /** * The service tier to use for processing this request. */ @@ -444,18 +188,18 @@ export type ChatRequest = { /** * When multiple model providers are available, optionally indicate your routing preference. */ - provider?: ChatRequestProvider | null | undefined; + provider?: ProviderPreferences | null | undefined; /** * Plugins you want to enable for this request, including their settings. */ plugins?: | Array< - | ChatRequestPluginAutoRouter - | ChatRequestPluginModeration - | ChatRequestPluginWeb - | ChatRequestPluginFileParser - | ChatRequestPluginResponseHealing - | ChatRequestPluginContextCompression + | AutoRouterPlugin + | ModerationPlugin + | WebSearchPlugin + | FileParserPlugin + | ResponseHealingPlugin + | ContextCompressionPlugin > | undefined; /** @@ -469,7 +213,7 @@ export type ChatRequest = { /** * Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. */ - trace?: ChatRequestTrace | undefined; + trace?: TraceConfig | undefined; /** * List of messages for the conversation */ @@ -485,7 +229,7 @@ export type ChatRequest = { /** * Frequency penalty (-2.0 to 2.0) */ - frequencyPenalty?: number | null | undefined; + frequencyPenalty?: number | undefined; /** * Token logit bias adjustments */ @@ -497,15 +241,15 @@ export type ChatRequest = { /** * Number of top log probabilities to return (0-20) */ - topLogprobs?: number | null | undefined; + topLogprobs?: number | undefined; /** * Maximum tokens in completion */ - maxCompletionTokens?: number | null | undefined; + maxCompletionTokens?: number | undefined; /** * Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. */ - maxTokens?: number | null | undefined; + maxTokens?: number | undefined; /** * Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) */ @@ -513,7 +257,7 @@ export type ChatRequest = { /** * Presence penalty (-2.0 to 2.0) */ - presencePenalty?: number | null | undefined; + presencePenalty?: number | undefined; /** * Configuration options for reasoning models */ @@ -531,7 +275,7 @@ export type ChatRequest = { /** * Random seed for deterministic outputs */ - seed?: number | null | undefined; + seed?: number | undefined; /** * Stop sequences (up to 4) */ @@ -547,7 +291,10 @@ export type ChatRequest = { /** * Sampling temperature (0-2) */ - temperature?: number | null | undefined; + temperature?: number | undefined; + /** + * Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response. + */ parallelToolCalls?: boolean | null | undefined; /** * Tool choice configuration @@ -560,7 +307,7 @@ export type ChatRequest = { /** * Nucleus sampling parameter (0-1) */ - topP?: number | null | undefined; + topP?: number | undefined; /** * Debug options for inspecting request transformations (streaming only) */ @@ -575,10 +322,7 @@ export type ChatRequest = { * Output modalities for the response. Supported values are "text", "image", and "audio". */ modalities?: Array | undefined; - /** - * Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. - */ - cacheControl?: CacheControl | undefined; + cacheControl?: AnthropicCacheControlDirective | undefined; /** * The service tier to use for processing this request. */ @@ -586,506 +330,32 @@ export type ChatRequest = { }; /** @internal */ -export type ChatRequestOrder$Outbound = string | string; - -/** @internal */ -export const ChatRequestOrder$outboundSchema: z.ZodType< - ChatRequestOrder$Outbound, - ChatRequestOrder -> = z.union([ProviderName$outboundSchema, z.string()]); - -export function chatRequestOrderToJSON( - chatRequestOrder: ChatRequestOrder, -): string { - return JSON.stringify( - ChatRequestOrder$outboundSchema.parse(chatRequestOrder), - ); -} - -/** @internal */ -export type ChatRequestOnly$Outbound = string | string; - -/** @internal */ -export const ChatRequestOnly$outboundSchema: z.ZodType< - ChatRequestOnly$Outbound, - ChatRequestOnly -> = z.union([ProviderName$outboundSchema, z.string()]); - -export function chatRequestOnlyToJSON( - chatRequestOnly: ChatRequestOnly, -): string { - return JSON.stringify(ChatRequestOnly$outboundSchema.parse(chatRequestOnly)); -} - -/** @internal */ -export type ChatRequestIgnore$Outbound = string | string; - -/** @internal */ -export const ChatRequestIgnore$outboundSchema: z.ZodType< - ChatRequestIgnore$Outbound, - ChatRequestIgnore -> = z.union([ProviderName$outboundSchema, z.string()]); - -export function chatRequestIgnoreToJSON( - chatRequestIgnore: ChatRequestIgnore, -): string { - return JSON.stringify( - ChatRequestIgnore$outboundSchema.parse(chatRequestIgnore), - ); -} - -/** @internal */ -export const ChatRequestSortEnum$outboundSchema: z.ZodType< - string, - ChatRequestSortEnum -> = openEnums.outboundSchema(ChatRequestSortEnum); - -/** @internal */ -export const ChatRequestProviderSortConfigEnum$outboundSchema: z.ZodEnum< - typeof ChatRequestProviderSortConfigEnum -> = z.enum(ChatRequestProviderSortConfigEnum); - -/** @internal */ -export const ChatRequestBy$outboundSchema: z.ZodType = - openEnums.outboundSchema(ChatRequestBy); - -/** @internal */ -export const ChatRequestPartition$outboundSchema: z.ZodType< - string, - ChatRequestPartition -> = openEnums.outboundSchema(ChatRequestPartition); - -/** @internal */ -export type ChatRequestProviderSortConfig$Outbound = { - by?: string | null | undefined; - partition?: string | null | undefined; -}; - -/** @internal */ -export const ChatRequestProviderSortConfig$outboundSchema: z.ZodType< - ChatRequestProviderSortConfig$Outbound, - ChatRequestProviderSortConfig -> = z.object({ - by: z.nullable(ChatRequestBy$outboundSchema).optional(), - partition: z.nullable(ChatRequestPartition$outboundSchema).optional(), -}); - -export function chatRequestProviderSortConfigToJSON( - chatRequestProviderSortConfig: ChatRequestProviderSortConfig, -): string { - return JSON.stringify( - ChatRequestProviderSortConfig$outboundSchema.parse( - chatRequestProviderSortConfig, - ), - ); -} - -/** @internal */ -export type ChatRequestProviderSortConfigUnion$Outbound = - | ChatRequestProviderSortConfig$Outbound - | string; - -/** @internal */ -export const ChatRequestProviderSortConfigUnion$outboundSchema: z.ZodType< - ChatRequestProviderSortConfigUnion$Outbound, - ChatRequestProviderSortConfigUnion -> = z.union([ - z.lazy(() => ChatRequestProviderSortConfig$outboundSchema), - ChatRequestProviderSortConfigEnum$outboundSchema, -]); - -export function chatRequestProviderSortConfigUnionToJSON( - chatRequestProviderSortConfigUnion: ChatRequestProviderSortConfigUnion, -): string { - return JSON.stringify( - ChatRequestProviderSortConfigUnion$outboundSchema.parse( - chatRequestProviderSortConfigUnion, - ), - ); -} - -/** @internal */ -export const ChatRequestProviderSort$outboundSchema: z.ZodType< - string, - ChatRequestProviderSort -> = openEnums.outboundSchema(ChatRequestProviderSort); - -/** @internal */ -export type ChatRequestSortUnion$Outbound = - | string - | ChatRequestProviderSortConfig$Outbound - | string - | string; - -/** @internal */ -export const ChatRequestSortUnion$outboundSchema: z.ZodType< - ChatRequestSortUnion$Outbound, - ChatRequestSortUnion -> = z.union([ - ChatRequestProviderSort$outboundSchema, - z.union([ - z.lazy(() => ChatRequestProviderSortConfig$outboundSchema), - ChatRequestProviderSortConfigEnum$outboundSchema, - ]), - ChatRequestSortEnum$outboundSchema, -]); - -export function chatRequestSortUnionToJSON( - chatRequestSortUnion: ChatRequestSortUnion, -): string { - return JSON.stringify( - ChatRequestSortUnion$outboundSchema.parse(chatRequestSortUnion), - ); -} - -/** @internal */ -export type ChatRequestMaxPrice$Outbound = { - prompt?: string | undefined; - completion?: string | undefined; - image?: string | undefined; - audio?: string | undefined; - request?: string | undefined; -}; - -/** @internal */ -export const ChatRequestMaxPrice$outboundSchema: z.ZodType< - ChatRequestMaxPrice$Outbound, - ChatRequestMaxPrice -> = z.object({ - prompt: z.string().optional(), - completion: z.string().optional(), - image: z.string().optional(), - audio: z.string().optional(), - request: z.string().optional(), -}); - -export function chatRequestMaxPriceToJSON( - chatRequestMaxPrice: ChatRequestMaxPrice, -): string { - return JSON.stringify( - ChatRequestMaxPrice$outboundSchema.parse(chatRequestMaxPrice), - ); -} - -/** @internal */ -export type ChatRequestProvider$Outbound = { - allow_fallbacks?: boolean | null | undefined; - require_parameters?: boolean | null | undefined; - data_collection?: string | null | undefined; - zdr?: boolean | null | undefined; - enforce_distillable_text?: boolean | null | undefined; - order?: Array | null | undefined; - only?: Array | null | undefined; - ignore?: Array | null | undefined; - quantizations?: Array | null | undefined; - sort?: - | string - | ChatRequestProviderSortConfig$Outbound - | string - | string - | null - | undefined; - max_price?: ChatRequestMaxPrice$Outbound | undefined; - preferred_min_throughput?: PreferredMinThroughput$Outbound | null | undefined; - preferred_max_latency?: PreferredMaxLatency$Outbound | null | undefined; -}; - -/** @internal */ -export const ChatRequestProvider$outboundSchema: z.ZodType< - ChatRequestProvider$Outbound, - ChatRequestProvider -> = z.object({ - allowFallbacks: z.nullable(z.boolean()).optional(), - requireParameters: z.nullable(z.boolean()).optional(), - dataCollection: z.nullable(DataCollection$outboundSchema).optional(), - zdr: z.nullable(z.boolean()).optional(), - enforceDistillableText: z.nullable(z.boolean()).optional(), - order: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()]))) - .optional(), - only: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()]))) - .optional(), - ignore: z.nullable( - z.array(z.union([ProviderName$outboundSchema, z.string()])), - ).optional(), - quantizations: z.nullable(z.array(Quantization$outboundSchema)).optional(), - sort: z.nullable( - z.union([ - ChatRequestProviderSort$outboundSchema, - z.union([ - z.lazy(() => ChatRequestProviderSortConfig$outboundSchema), - ChatRequestProviderSortConfigEnum$outboundSchema, - ]), - ChatRequestSortEnum$outboundSchema, - ]), - ).optional(), - maxPrice: z.lazy(() => ChatRequestMaxPrice$outboundSchema).optional(), - preferredMinThroughput: z.nullable(PreferredMinThroughput$outboundSchema) - .optional(), - preferredMaxLatency: z.nullable(PreferredMaxLatency$outboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - allowFallbacks: "allow_fallbacks", - requireParameters: "require_parameters", - dataCollection: "data_collection", - enforceDistillableText: "enforce_distillable_text", - maxPrice: "max_price", - preferredMinThroughput: "preferred_min_throughput", - preferredMaxLatency: "preferred_max_latency", - }); -}); - -export function chatRequestProviderToJSON( - chatRequestProvider: ChatRequestProvider, -): string { - return JSON.stringify( - ChatRequestProvider$outboundSchema.parse(chatRequestProvider), - ); -} - -/** @internal */ -export type ChatRequestPluginContextCompression$Outbound = { - id: "context-compression"; - enabled?: boolean | undefined; - engine?: string | undefined; -}; - -/** @internal */ -export const ChatRequestPluginContextCompression$outboundSchema: z.ZodType< - ChatRequestPluginContextCompression$Outbound, - ChatRequestPluginContextCompression -> = z.object({ - id: z.literal("context-compression"), - enabled: z.boolean().optional(), - engine: ContextCompressionEngine$outboundSchema.optional(), -}); - -export function chatRequestPluginContextCompressionToJSON( - chatRequestPluginContextCompression: ChatRequestPluginContextCompression, -): string { - return JSON.stringify( - ChatRequestPluginContextCompression$outboundSchema.parse( - chatRequestPluginContextCompression, - ), - ); -} - -/** @internal */ -export type ChatRequestPluginResponseHealing$Outbound = { - id: "response-healing"; - enabled?: boolean | undefined; -}; - -/** @internal */ -export const ChatRequestPluginResponseHealing$outboundSchema: z.ZodType< - ChatRequestPluginResponseHealing$Outbound, - ChatRequestPluginResponseHealing -> = z.object({ - id: z.literal("response-healing"), - enabled: z.boolean().optional(), -}); - -export function chatRequestPluginResponseHealingToJSON( - chatRequestPluginResponseHealing: ChatRequestPluginResponseHealing, -): string { - return JSON.stringify( - ChatRequestPluginResponseHealing$outboundSchema.parse( - chatRequestPluginResponseHealing, - ), - ); -} - -/** @internal */ -export type ChatRequestPluginFileParser$Outbound = { - id: "file-parser"; - enabled?: boolean | undefined; - pdf?: PDFParserOptions$Outbound | undefined; -}; - -/** @internal */ -export const ChatRequestPluginFileParser$outboundSchema: z.ZodType< - ChatRequestPluginFileParser$Outbound, - ChatRequestPluginFileParser -> = z.object({ - id: z.literal("file-parser"), - enabled: z.boolean().optional(), - pdf: PDFParserOptions$outboundSchema.optional(), -}); - -export function chatRequestPluginFileParserToJSON( - chatRequestPluginFileParser: ChatRequestPluginFileParser, -): string { - return JSON.stringify( - ChatRequestPluginFileParser$outboundSchema.parse( - chatRequestPluginFileParser, - ), - ); -} - -/** @internal */ -export type ChatRequestPluginWeb$Outbound = { - id: "web"; - enabled?: boolean | undefined; - max_results?: number | undefined; - search_prompt?: string | undefined; - engine?: string | undefined; - include_domains?: Array | undefined; - exclude_domains?: Array | undefined; -}; - -/** @internal */ -export const ChatRequestPluginWeb$outboundSchema: z.ZodType< - ChatRequestPluginWeb$Outbound, - ChatRequestPluginWeb -> = z.object({ - id: z.literal("web"), - enabled: z.boolean().optional(), - maxResults: z.number().optional(), - searchPrompt: z.string().optional(), - engine: WebSearchEngine$outboundSchema.optional(), - includeDomains: z.array(z.string()).optional(), - excludeDomains: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - maxResults: "max_results", - searchPrompt: "search_prompt", - includeDomains: "include_domains", - excludeDomains: "exclude_domains", - }); -}); - -export function chatRequestPluginWebToJSON( - chatRequestPluginWeb: ChatRequestPluginWeb, -): string { - return JSON.stringify( - ChatRequestPluginWeb$outboundSchema.parse(chatRequestPluginWeb), - ); -} - -/** @internal */ -export type ChatRequestPluginModeration$Outbound = { - id: "moderation"; -}; - -/** @internal */ -export const ChatRequestPluginModeration$outboundSchema: z.ZodType< - ChatRequestPluginModeration$Outbound, - ChatRequestPluginModeration -> = z.object({ - id: z.literal("moderation"), -}); - -export function chatRequestPluginModerationToJSON( - chatRequestPluginModeration: ChatRequestPluginModeration, -): string { - return JSON.stringify( - ChatRequestPluginModeration$outboundSchema.parse( - chatRequestPluginModeration, - ), - ); -} - -/** @internal */ -export type ChatRequestPluginAutoRouter$Outbound = { - id: "auto-router"; - enabled?: boolean | undefined; - allowed_models?: Array | undefined; -}; - -/** @internal */ -export const ChatRequestPluginAutoRouter$outboundSchema: z.ZodType< - ChatRequestPluginAutoRouter$Outbound, - ChatRequestPluginAutoRouter -> = z.object({ - id: z.literal("auto-router"), - enabled: z.boolean().optional(), - allowedModels: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - allowedModels: "allowed_models", - }); -}); - -export function chatRequestPluginAutoRouterToJSON( - chatRequestPluginAutoRouter: ChatRequestPluginAutoRouter, -): string { - return JSON.stringify( - ChatRequestPluginAutoRouter$outboundSchema.parse( - chatRequestPluginAutoRouter, - ), - ); -} - -/** @internal */ -export type ChatRequestPluginUnion$Outbound = - | ChatRequestPluginAutoRouter$Outbound - | ChatRequestPluginModeration$Outbound - | ChatRequestPluginWeb$Outbound - | ChatRequestPluginFileParser$Outbound - | ChatRequestPluginResponseHealing$Outbound - | ChatRequestPluginContextCompression$Outbound; +export type ChatRequestPlugin$Outbound = + | AutoRouterPlugin$Outbound + | ModerationPlugin$Outbound + | WebSearchPlugin$Outbound + | FileParserPlugin$Outbound + | ResponseHealingPlugin$Outbound + | ContextCompressionPlugin$Outbound; /** @internal */ -export const ChatRequestPluginUnion$outboundSchema: z.ZodType< - ChatRequestPluginUnion$Outbound, - ChatRequestPluginUnion +export const ChatRequestPlugin$outboundSchema: z.ZodType< + ChatRequestPlugin$Outbound, + ChatRequestPlugin > = z.union([ - z.lazy(() => ChatRequestPluginAutoRouter$outboundSchema), - z.lazy(() => ChatRequestPluginModeration$outboundSchema), - z.lazy(() => ChatRequestPluginWeb$outboundSchema), - z.lazy(() => ChatRequestPluginFileParser$outboundSchema), - z.lazy(() => ChatRequestPluginResponseHealing$outboundSchema), - z.lazy(() => ChatRequestPluginContextCompression$outboundSchema), + AutoRouterPlugin$outboundSchema, + ModerationPlugin$outboundSchema, + WebSearchPlugin$outboundSchema, + FileParserPlugin$outboundSchema, + ResponseHealingPlugin$outboundSchema, + ContextCompressionPlugin$outboundSchema, ]); -export function chatRequestPluginUnionToJSON( - chatRequestPluginUnion: ChatRequestPluginUnion, +export function chatRequestPluginToJSON( + chatRequestPlugin: ChatRequestPlugin, ): string { return JSON.stringify( - ChatRequestPluginUnion$outboundSchema.parse(chatRequestPluginUnion), - ); -} - -/** @internal */ -export type ChatRequestTrace$Outbound = { - trace_id?: string | undefined; - trace_name?: string | undefined; - span_name?: string | undefined; - generation_name?: string | undefined; - parent_span_id?: string | undefined; - [additionalProperties: string]: unknown; -}; - -/** @internal */ -export const ChatRequestTrace$outboundSchema: z.ZodType< - ChatRequestTrace$Outbound, - ChatRequestTrace -> = z.object({ - traceId: z.string().optional(), - traceName: z.string().optional(), - spanName: z.string().optional(), - generationName: z.string().optional(), - parentSpanId: z.string().optional(), - additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(), -}).transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - traceId: "trace_id", - traceName: "trace_name", - spanName: "span_name", - generationName: "generation_name", - parentSpanId: "parent_span_id", - additionalProperties: null, - }), - }; -}); - -export function chatRequestTraceToJSON( - chatRequestTrace: ChatRequestTrace, -): string { - return JSON.stringify( - ChatRequestTrace$outboundSchema.parse(chatRequestTrace), + ChatRequestPlugin$outboundSchema.parse(chatRequestPlugin), ); } @@ -1096,7 +366,7 @@ export const Effort$outboundSchema: z.ZodType = openEnums /** @internal */ export type Reasoning$Outbound = { effort?: string | null | undefined; - summary?: any | null | undefined; + summary?: string | null | undefined; }; /** @internal */ @@ -1105,7 +375,8 @@ export const Reasoning$outboundSchema: z.ZodType< Reasoning > = z.object({ effort: z.nullable(Effort$outboundSchema).optional(), - summary: z.nullable(z.any()).optional(), + summary: z.nullable(ChatReasoningSummaryVerbosityEnum$outboundSchema) + .optional(), }); export function reasoningToJSON(reasoning: Reasoning): string { @@ -1174,33 +445,6 @@ export function chatRequestImageConfigToJSON( export const Modality$outboundSchema: z.ZodType = openEnums .outboundSchema(Modality); -/** @internal */ -export const ChatRequestType$outboundSchema: z.ZodEnum = - z.enum(ChatRequestType); - -/** @internal */ -export const ChatRequestTtl$outboundSchema: z.ZodType = - openEnums.outboundSchema(ChatRequestTtl); - -/** @internal */ -export type CacheControl$Outbound = { - type: string; - ttl?: string | undefined; -}; - -/** @internal */ -export const CacheControl$outboundSchema: z.ZodType< - CacheControl$Outbound, - CacheControl -> = z.object({ - type: ChatRequestType$outboundSchema, - ttl: ChatRequestTtl$outboundSchema.optional(), -}); - -export function cacheControlToJSON(cacheControl: CacheControl): string { - return JSON.stringify(CacheControl$outboundSchema.parse(cacheControl)); -} - /** @internal */ export const ChatRequestServiceTier$outboundSchema: z.ZodType< string, @@ -1209,31 +453,31 @@ export const ChatRequestServiceTier$outboundSchema: z.ZodType< /** @internal */ export type ChatRequest$Outbound = { - provider?: ChatRequestProvider$Outbound | null | undefined; + provider?: ProviderPreferences$Outbound | null | undefined; plugins?: | Array< - | ChatRequestPluginAutoRouter$Outbound - | ChatRequestPluginModeration$Outbound - | ChatRequestPluginWeb$Outbound - | ChatRequestPluginFileParser$Outbound - | ChatRequestPluginResponseHealing$Outbound - | ChatRequestPluginContextCompression$Outbound + | AutoRouterPlugin$Outbound + | ModerationPlugin$Outbound + | WebSearchPlugin$Outbound + | FileParserPlugin$Outbound + | ResponseHealingPlugin$Outbound + | ContextCompressionPlugin$Outbound > | undefined; user?: string | undefined; session_id?: string | undefined; - trace?: ChatRequestTrace$Outbound | undefined; + trace?: TraceConfig$Outbound | undefined; messages: Array; model?: string | undefined; models?: Array | undefined; - frequency_penalty?: number | null | undefined; + frequency_penalty?: number | undefined; logit_bias?: { [k: string]: number } | null | undefined; logprobs?: boolean | null | undefined; - top_logprobs?: number | null | undefined; - max_completion_tokens?: number | null | undefined; - max_tokens?: number | null | undefined; + top_logprobs?: number | undefined; + max_completion_tokens?: number | undefined; + max_tokens?: number | undefined; metadata?: { [k: string]: string } | undefined; - presence_penalty?: number | null | undefined; + presence_penalty?: number | undefined; reasoning?: Reasoning$Outbound | undefined; response_format?: | ChatFormatTextConfig$Outbound @@ -1242,21 +486,21 @@ export type ChatRequest$Outbound = { | ChatFormatGrammarConfig$Outbound | ChatFormatPythonConfig$Outbound | undefined; - seed?: number | null | undefined; + seed?: number | undefined; stop?: string | Array | any | null | undefined; stream: boolean; stream_options?: ChatStreamOptions$Outbound | null | undefined; - temperature: number | null; + temperature?: number | undefined; parallel_tool_calls?: boolean | null | undefined; tool_choice?: ChatToolChoice$Outbound | undefined; tools?: Array | undefined; - top_p: number | null; + top_p?: number | undefined; debug?: ChatDebugOptions$Outbound | undefined; image_config?: | { [k: string]: string | number | Array } | undefined; modalities?: Array | undefined; - cache_control?: CacheControl$Outbound | undefined; + cache_control?: AnthropicCacheControlDirective$Outbound | undefined; service_tier?: string | null | undefined; }; @@ -1265,32 +509,31 @@ export const ChatRequest$outboundSchema: z.ZodType< ChatRequest$Outbound, ChatRequest > = z.object({ - provider: z.nullable(z.lazy(() => ChatRequestProvider$outboundSchema)) - .optional(), + provider: z.nullable(ProviderPreferences$outboundSchema).optional(), plugins: z.array( z.union([ - z.lazy(() => ChatRequestPluginAutoRouter$outboundSchema), - z.lazy(() => ChatRequestPluginModeration$outboundSchema), - z.lazy(() => ChatRequestPluginWeb$outboundSchema), - z.lazy(() => ChatRequestPluginFileParser$outboundSchema), - z.lazy(() => ChatRequestPluginResponseHealing$outboundSchema), - z.lazy(() => ChatRequestPluginContextCompression$outboundSchema), + AutoRouterPlugin$outboundSchema, + ModerationPlugin$outboundSchema, + WebSearchPlugin$outboundSchema, + FileParserPlugin$outboundSchema, + ResponseHealingPlugin$outboundSchema, + ContextCompressionPlugin$outboundSchema, ]), ).optional(), user: z.string().optional(), sessionId: z.string().optional(), - trace: z.lazy(() => ChatRequestTrace$outboundSchema).optional(), + trace: TraceConfig$outboundSchema.optional(), messages: z.array(ChatMessages$outboundSchema), model: z.string().optional(), models: z.array(z.string()).optional(), - frequencyPenalty: z.nullable(z.number()).optional(), + frequencyPenalty: z.number().optional(), logitBias: z.nullable(z.record(z.string(), z.number())).optional(), logprobs: z.nullable(z.boolean()).optional(), - topLogprobs: z.nullable(z.number()).optional(), - maxCompletionTokens: z.nullable(z.number()).optional(), - maxTokens: z.nullable(z.number()).optional(), + topLogprobs: z.int().optional(), + maxCompletionTokens: z.int().optional(), + maxTokens: z.int().optional(), metadata: z.record(z.string(), z.string()).optional(), - presencePenalty: z.nullable(z.number()).optional(), + presencePenalty: z.number().optional(), reasoning: z.lazy(() => Reasoning$outboundSchema).optional(), responseFormat: z.union([ ChatFormatTextConfig$outboundSchema, @@ -1299,23 +542,23 @@ export const ChatRequest$outboundSchema: z.ZodType< ChatFormatGrammarConfig$outboundSchema, ChatFormatPythonConfig$outboundSchema, ]).optional(), - seed: z.nullable(z.int()).optional(), + seed: z.int().optional(), stop: z.nullable(z.union([z.string(), z.array(z.string()), z.any()])) .optional(), stream: z.boolean().default(false), streamOptions: z.nullable(ChatStreamOptions$outboundSchema).optional(), - temperature: z.nullable(z.number().default(1)), + temperature: z.number().optional(), parallelToolCalls: z.nullable(z.boolean()).optional(), toolChoice: ChatToolChoice$outboundSchema.optional(), tools: z.array(ChatFunctionTool$outboundSchema).optional(), - topP: z.nullable(z.number().default(1)), + topP: z.number().optional(), debug: ChatDebugOptions$outboundSchema.optional(), imageConfig: z.record( z.string(), z.union([z.string(), z.number(), z.array(z.nullable(z.any()))]), ).optional(), modalities: z.array(Modality$outboundSchema).optional(), - cacheControl: z.lazy(() => CacheControl$outboundSchema).optional(), + cacheControl: AnthropicCacheControlDirective$outboundSchema.optional(), serviceTier: z.nullable(ChatRequestServiceTier$outboundSchema).optional(), }).transform((v) => { return remap$(v, { diff --git a/src/models/chatresult.ts b/src/models/chatresult.ts index c5a18849..97077873 100644 --- a/src/models/chatresult.ts +++ b/src/models/chatresult.ts @@ -62,7 +62,7 @@ export const ChatResult$inboundSchema: z.ZodType = z .object({ id: z.string(), choices: z.array(ChatChoice$inboundSchema), - created: z.number(), + created: z.int(), model: z.string(), object: ChatResultObject$inboundSchema, system_fingerprint: z.nullable(z.string()), diff --git a/src/models/chatstreamchoice.ts b/src/models/chatstreamchoice.ts index ca617a80..a31c5fa9 100644 --- a/src/models/chatstreamchoice.ts +++ b/src/models/chatstreamchoice.ts @@ -7,6 +7,10 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; +import { + ChatFinishReasonEnum, + ChatFinishReasonEnum$inboundSchema, +} from "./chatfinishreasonenum.js"; import { ChatStreamDelta, ChatStreamDelta$inboundSchema, @@ -25,7 +29,7 @@ export type ChatStreamChoice = { * Delta changes in streaming response */ delta: ChatStreamDelta; - finishReason: any | null; + finishReason: ChatFinishReasonEnum | null; /** * Choice index */ @@ -42,8 +46,8 @@ export const ChatStreamChoice$inboundSchema: z.ZodType< unknown > = z.object({ delta: ChatStreamDelta$inboundSchema, - finish_reason: z.nullable(z.any()), - index: z.number(), + finish_reason: z.nullable(ChatFinishReasonEnum$inboundSchema), + index: z.int(), logprobs: z.nullable(ChatTokenLogprobs$inboundSchema).optional(), }).transform((v) => { return remap$(v, { diff --git a/src/models/chatstreamchunk.ts b/src/models/chatstreamchunk.ts index f1503f3f..e393dcff 100644 --- a/src/models/chatstreamchunk.ts +++ b/src/models/chatstreamchunk.ts @@ -81,7 +81,7 @@ export const ChatStreamChunkObject$inboundSchema: z.ZodEnum< /** @internal */ export const ErrorT$inboundSchema: z.ZodType = z.object({ message: z.string(), - code: z.number(), + code: z.int(), }); export function errorFromJSON( @@ -101,7 +101,7 @@ export const ChatStreamChunk$inboundSchema: z.ZodType< > = z.object({ id: z.string(), choices: z.array(ChatStreamChoice$inboundSchema), - created: z.number(), + created: z.int(), model: z.string(), object: ChatStreamChunkObject$inboundSchema, system_fingerprint: z.string().optional(), diff --git a/src/models/chatstreamtoolcall.ts b/src/models/chatstreamtoolcall.ts index f46ead55..83c22e84 100644 --- a/src/models/chatstreamtoolcall.ts +++ b/src/models/chatstreamtoolcall.ts @@ -85,7 +85,7 @@ export const ChatStreamToolCall$inboundSchema: z.ZodType< ChatStreamToolCall, unknown > = z.object({ - index: z.number(), + index: z.int(), id: z.string().optional(), type: ChatStreamToolCallType$inboundSchema.optional(), function: z.lazy(() => ChatStreamToolCallFunction$inboundSchema).optional(), diff --git a/src/models/chattokenlogprob.ts b/src/models/chattokenlogprob.ts index c99af343..0d1472a0 100644 --- a/src/models/chattokenlogprob.ts +++ b/src/models/chattokenlogprob.ts @@ -44,7 +44,7 @@ export const ChatTokenLogprobTopLogprob$inboundSchema: z.ZodType< > = z.object({ token: z.string(), logprob: z.number(), - bytes: z.nullable(z.array(z.number())), + bytes: z.nullable(z.array(z.int())), }); export function chatTokenLogprobTopLogprobFromJSON( @@ -64,7 +64,7 @@ export const ChatTokenLogprob$inboundSchema: z.ZodType< > = z.object({ token: z.string(), logprob: z.number(), - bytes: z.nullable(z.array(z.number())), + bytes: z.nullable(z.array(z.int())), top_logprobs: z.array(z.lazy(() => ChatTokenLogprobTopLogprob$inboundSchema)), }).transform((v) => { return remap$(v, { diff --git a/src/models/chatusage.ts b/src/models/chatusage.ts index 439206d0..0e44d04d 100644 --- a/src/models/chatusage.ts +++ b/src/models/chatusage.ts @@ -16,19 +16,19 @@ export type CompletionTokensDetails = { /** * Tokens used for reasoning */ - reasoningTokens?: number | null | undefined; + reasoningTokens?: number | undefined; /** * Tokens used for audio output */ - audioTokens?: number | null | undefined; + audioTokens?: number | undefined; /** * Accepted prediction tokens */ - acceptedPredictionTokens?: number | null | undefined; + acceptedPredictionTokens?: number | undefined; /** * Rejected prediction tokens */ - rejectedPredictionTokens?: number | null | undefined; + rejectedPredictionTokens?: number | undefined; }; /** @@ -84,10 +84,10 @@ export const CompletionTokensDetails$inboundSchema: z.ZodType< CompletionTokensDetails, unknown > = z.object({ - reasoning_tokens: z.nullable(z.number()).optional(), - audio_tokens: z.nullable(z.number()).optional(), - accepted_prediction_tokens: z.nullable(z.number()).optional(), - rejected_prediction_tokens: z.nullable(z.number()).optional(), + reasoning_tokens: z.int().optional(), + audio_tokens: z.int().optional(), + accepted_prediction_tokens: z.int().optional(), + rejected_prediction_tokens: z.int().optional(), }).transform((v) => { return remap$(v, { "reasoning_tokens": "reasoningTokens", @@ -112,10 +112,10 @@ export const PromptTokensDetails$inboundSchema: z.ZodType< PromptTokensDetails, unknown > = z.object({ - cached_tokens: z.number().optional(), - cache_write_tokens: z.number().optional(), - audio_tokens: z.number().optional(), - video_tokens: z.number().optional(), + cached_tokens: z.int().optional(), + cache_write_tokens: z.int().optional(), + audio_tokens: z.int().optional(), + video_tokens: z.int().optional(), }).transform((v) => { return remap$(v, { "cached_tokens": "cachedTokens", @@ -137,9 +137,9 @@ export function promptTokensDetailsFromJSON( /** @internal */ export const ChatUsage$inboundSchema: z.ZodType = z.object({ - completion_tokens: z.number(), - prompt_tokens: z.number(), - total_tokens: z.number(), + completion_tokens: z.int(), + prompt_tokens: z.int(), + total_tokens: z.int(), completion_tokens_details: z.nullable( z.lazy(() => CompletionTokensDetails$inboundSchema), ).optional(), diff --git a/src/models/chatwebsearchservertool.ts b/src/models/chatwebsearchservertool.ts deleted file mode 100644 index 34a2183b..00000000 --- a/src/models/chatwebsearchservertool.ts +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: ae822f875178 - */ - -import * as z from "zod/v4"; -import { remap as remap$ } from "../lib/primitives.js"; -import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; - -export const ChatWebSearchServerToolTypeOpenrouterWebSearch = { - OpenrouterWebSearch: "openrouter:web_search", -} as const; -export type ChatWebSearchServerToolTypeOpenrouterWebSearch = ClosedEnum< - typeof ChatWebSearchServerToolTypeOpenrouterWebSearch ->; - -/** - * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - */ -export const ChatWebSearchServerToolEngine = { - Auto: "auto", - Native: "native", - Exa: "exa", - Firecrawl: "firecrawl", - Parallel: "parallel", -} as const; -/** - * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - */ -export type ChatWebSearchServerToolEngine = OpenEnum< - typeof ChatWebSearchServerToolEngine ->; - -/** - * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - */ -export const ChatWebSearchServerToolSearchContextSize = { - Low: "low", - Medium: "medium", - High: "high", -} as const; -/** - * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - */ -export type ChatWebSearchServerToolSearchContextSize = OpenEnum< - typeof ChatWebSearchServerToolSearchContextSize ->; - -export const ChatWebSearchServerToolParametersType = { - Approximate: "approximate", -} as const; -export type ChatWebSearchServerToolParametersType = ClosedEnum< - typeof ChatWebSearchServerToolParametersType ->; - -/** - * Approximate user location for location-biased results. - */ -export type ChatWebSearchServerToolUserLocation = { - type?: ChatWebSearchServerToolParametersType | undefined; - city?: string | undefined; - region?: string | undefined; - country?: string | undefined; - timezone?: string | undefined; -}; - -export type ChatWebSearchServerToolParameters = { - /** - * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - */ - engine?: ChatWebSearchServerToolEngine | undefined; - /** - * Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. - */ - maxResults?: number | undefined; - /** - * Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. - */ - maxTotalResults?: number | undefined; - /** - * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - */ - searchContextSize?: ChatWebSearchServerToolSearchContextSize | undefined; - /** - * Approximate user location for location-biased results. - */ - userLocation?: ChatWebSearchServerToolUserLocation | undefined; - /** - * Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. - */ - allowedDomains?: Array | undefined; - /** - * Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. - */ - excludedDomains?: Array | undefined; -}; - -/** - * OpenRouter built-in server tool: searches the web for current information - */ -export type ChatWebSearchServerTool = { - type: ChatWebSearchServerToolTypeOpenrouterWebSearch; - parameters?: ChatWebSearchServerToolParameters | undefined; -}; - -/** @internal */ -export const ChatWebSearchServerToolTypeOpenrouterWebSearch$outboundSchema: - z.ZodEnum = z.enum( - ChatWebSearchServerToolTypeOpenrouterWebSearch, - ); - -/** @internal */ -export const ChatWebSearchServerToolEngine$outboundSchema: z.ZodType< - string, - ChatWebSearchServerToolEngine -> = openEnums.outboundSchema(ChatWebSearchServerToolEngine); - -/** @internal */ -export const ChatWebSearchServerToolSearchContextSize$outboundSchema: z.ZodType< - string, - ChatWebSearchServerToolSearchContextSize -> = openEnums.outboundSchema(ChatWebSearchServerToolSearchContextSize); - -/** @internal */ -export const ChatWebSearchServerToolParametersType$outboundSchema: z.ZodEnum< - typeof ChatWebSearchServerToolParametersType -> = z.enum(ChatWebSearchServerToolParametersType); - -/** @internal */ -export type ChatWebSearchServerToolUserLocation$Outbound = { - type?: string | undefined; - city?: string | undefined; - region?: string | undefined; - country?: string | undefined; - timezone?: string | undefined; -}; - -/** @internal */ -export const ChatWebSearchServerToolUserLocation$outboundSchema: z.ZodType< - ChatWebSearchServerToolUserLocation$Outbound, - ChatWebSearchServerToolUserLocation -> = z.object({ - type: ChatWebSearchServerToolParametersType$outboundSchema.optional(), - city: z.string().optional(), - region: z.string().optional(), - country: z.string().optional(), - timezone: z.string().optional(), -}); - -export function chatWebSearchServerToolUserLocationToJSON( - chatWebSearchServerToolUserLocation: ChatWebSearchServerToolUserLocation, -): string { - return JSON.stringify( - ChatWebSearchServerToolUserLocation$outboundSchema.parse( - chatWebSearchServerToolUserLocation, - ), - ); -} - -/** @internal */ -export type ChatWebSearchServerToolParameters$Outbound = { - engine?: string | undefined; - max_results?: number | undefined; - max_total_results?: number | undefined; - search_context_size?: string | undefined; - user_location?: ChatWebSearchServerToolUserLocation$Outbound | undefined; - allowed_domains?: Array | undefined; - excluded_domains?: Array | undefined; -}; - -/** @internal */ -export const ChatWebSearchServerToolParameters$outboundSchema: z.ZodType< - ChatWebSearchServerToolParameters$Outbound, - ChatWebSearchServerToolParameters -> = z.object({ - engine: ChatWebSearchServerToolEngine$outboundSchema.optional(), - maxResults: z.number().optional(), - maxTotalResults: z.number().optional(), - searchContextSize: ChatWebSearchServerToolSearchContextSize$outboundSchema - .optional(), - userLocation: z.lazy(() => ChatWebSearchServerToolUserLocation$outboundSchema) - .optional(), - allowedDomains: z.array(z.string()).optional(), - excludedDomains: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - maxResults: "max_results", - maxTotalResults: "max_total_results", - searchContextSize: "search_context_size", - userLocation: "user_location", - allowedDomains: "allowed_domains", - excludedDomains: "excluded_domains", - }); -}); - -export function chatWebSearchServerToolParametersToJSON( - chatWebSearchServerToolParameters: ChatWebSearchServerToolParameters, -): string { - return JSON.stringify( - ChatWebSearchServerToolParameters$outboundSchema.parse( - chatWebSearchServerToolParameters, - ), - ); -} - -/** @internal */ -export type ChatWebSearchServerTool$Outbound = { - type: string; - parameters?: ChatWebSearchServerToolParameters$Outbound | undefined; -}; - -/** @internal */ -export const ChatWebSearchServerTool$outboundSchema: z.ZodType< - ChatWebSearchServerTool$Outbound, - ChatWebSearchServerTool -> = z.object({ - type: ChatWebSearchServerToolTypeOpenrouterWebSearch$outboundSchema, - parameters: z.lazy(() => ChatWebSearchServerToolParameters$outboundSchema) - .optional(), -}); - -export function chatWebSearchServerToolToJSON( - chatWebSearchServerTool: ChatWebSearchServerTool, -): string { - return JSON.stringify( - ChatWebSearchServerTool$outboundSchema.parse(chatWebSearchServerTool), - ); -} diff --git a/src/models/chatwebsearchshorthand.ts b/src/models/chatwebsearchshorthand.ts index 9ba2ce00..8c4d7ef0 100644 --- a/src/models/chatwebsearchshorthand.ts +++ b/src/models/chatwebsearchshorthand.ts @@ -6,7 +6,25 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { + SearchQualityLevel, + SearchQualityLevel$outboundSchema, +} from "./searchqualitylevel.js"; +import { + WebSearchConfig, + WebSearchConfig$Outbound, + WebSearchConfig$outboundSchema, +} from "./websearchconfig.js"; +import { + WebSearchEngineEnum, + WebSearchEngineEnum$outboundSchema, +} from "./websearchengineenum.js"; +import { + WebSearchUserLocationServerTool, + WebSearchUserLocationServerTool$Outbound, + WebSearchUserLocationServerTool$outboundSchema, +} from "./websearchuserlocationservertool.js"; export const ChatWebSearchShorthandType = { WebSearch: "web_search", @@ -18,139 +36,6 @@ export type ChatWebSearchShorthandType = OpenEnum< typeof ChatWebSearchShorthandType >; -/** - * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - */ -export const ChatWebSearchShorthandEngine = { - Auto: "auto", - Native: "native", - Exa: "exa", - Firecrawl: "firecrawl", - Parallel: "parallel", -} as const; -/** - * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - */ -export type ChatWebSearchShorthandEngine = OpenEnum< - typeof ChatWebSearchShorthandEngine ->; - -/** - * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - */ -export const ChatWebSearchShorthandSearchContextSize = { - Low: "low", - Medium: "medium", - High: "high", -} as const; -/** - * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - */ -export type ChatWebSearchShorthandSearchContextSize = OpenEnum< - typeof ChatWebSearchShorthandSearchContextSize ->; - -export const ChatWebSearchShorthandTypeApproximate = { - Approximate: "approximate", -} as const; -export type ChatWebSearchShorthandTypeApproximate = ClosedEnum< - typeof ChatWebSearchShorthandTypeApproximate ->; - -/** - * Approximate user location for location-biased results. - */ -export type ChatWebSearchShorthandUserLocation = { - type?: ChatWebSearchShorthandTypeApproximate | undefined; - city?: string | undefined; - region?: string | undefined; - country?: string | undefined; - timezone?: string | undefined; -}; - -/** - * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - */ -export const ChatWebSearchShorthandParametersEngine = { - Auto: "auto", - Native: "native", - Exa: "exa", - Firecrawl: "firecrawl", - Parallel: "parallel", -} as const; -/** - * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - */ -export type ChatWebSearchShorthandParametersEngine = OpenEnum< - typeof ChatWebSearchShorthandParametersEngine ->; - -/** - * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - */ -export const ChatWebSearchShorthandParametersSearchContextSize = { - Low: "low", - Medium: "medium", - High: "high", -} as const; -/** - * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - */ -export type ChatWebSearchShorthandParametersSearchContextSize = OpenEnum< - typeof ChatWebSearchShorthandParametersSearchContextSize ->; - -export const ChatWebSearchShorthandParametersType = { - Approximate: "approximate", -} as const; -export type ChatWebSearchShorthandParametersType = ClosedEnum< - typeof ChatWebSearchShorthandParametersType ->; - -/** - * Approximate user location for location-biased results. - */ -export type ChatWebSearchShorthandParametersUserLocation = { - type?: ChatWebSearchShorthandParametersType | undefined; - city?: string | undefined; - region?: string | undefined; - country?: string | undefined; - timezone?: string | undefined; -}; - -export type ChatWebSearchShorthandParameters = { - /** - * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - */ - engine?: ChatWebSearchShorthandParametersEngine | undefined; - /** - * Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. - */ - maxResults?: number | undefined; - /** - * Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. - */ - maxTotalResults?: number | undefined; - /** - * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - */ - searchContextSize?: - | ChatWebSearchShorthandParametersSearchContextSize - | undefined; - /** - * Approximate user location for location-biased results. - */ - userLocation?: ChatWebSearchShorthandParametersUserLocation | undefined; - /** - * Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. - */ - allowedDomains?: Array | undefined; - /** - * Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. - */ - excludedDomains?: Array | undefined; -}; - /** * Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search. */ @@ -159,7 +44,7 @@ export type ChatWebSearchShorthand = { /** * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. */ - engine?: ChatWebSearchShorthandEngine | undefined; + engine?: WebSearchEngineEnum | undefined; /** * Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. */ @@ -171,20 +56,20 @@ export type ChatWebSearchShorthand = { /** * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. */ - searchContextSize?: ChatWebSearchShorthandSearchContextSize | undefined; + searchContextSize?: SearchQualityLevel | undefined; /** * Approximate user location for location-biased results. */ - userLocation?: ChatWebSearchShorthandUserLocation | undefined; + userLocation?: WebSearchUserLocationServerTool | undefined; /** - * Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. + * Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity. */ allowedDomains?: Array | undefined; /** - * Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. + * Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity. */ excludedDomains?: Array | undefined; - parameters?: ChatWebSearchShorthandParameters | undefined; + parameters?: WebSearchConfig | undefined; }; /** @internal */ @@ -193,152 +78,6 @@ export const ChatWebSearchShorthandType$outboundSchema: z.ZodType< ChatWebSearchShorthandType > = openEnums.outboundSchema(ChatWebSearchShorthandType); -/** @internal */ -export const ChatWebSearchShorthandEngine$outboundSchema: z.ZodType< - string, - ChatWebSearchShorthandEngine -> = openEnums.outboundSchema(ChatWebSearchShorthandEngine); - -/** @internal */ -export const ChatWebSearchShorthandSearchContextSize$outboundSchema: z.ZodType< - string, - ChatWebSearchShorthandSearchContextSize -> = openEnums.outboundSchema(ChatWebSearchShorthandSearchContextSize); - -/** @internal */ -export const ChatWebSearchShorthandTypeApproximate$outboundSchema: z.ZodEnum< - typeof ChatWebSearchShorthandTypeApproximate -> = z.enum(ChatWebSearchShorthandTypeApproximate); - -/** @internal */ -export type ChatWebSearchShorthandUserLocation$Outbound = { - type?: string | undefined; - city?: string | undefined; - region?: string | undefined; - country?: string | undefined; - timezone?: string | undefined; -}; - -/** @internal */ -export const ChatWebSearchShorthandUserLocation$outboundSchema: z.ZodType< - ChatWebSearchShorthandUserLocation$Outbound, - ChatWebSearchShorthandUserLocation -> = z.object({ - type: ChatWebSearchShorthandTypeApproximate$outboundSchema.optional(), - city: z.string().optional(), - region: z.string().optional(), - country: z.string().optional(), - timezone: z.string().optional(), -}); - -export function chatWebSearchShorthandUserLocationToJSON( - chatWebSearchShorthandUserLocation: ChatWebSearchShorthandUserLocation, -): string { - return JSON.stringify( - ChatWebSearchShorthandUserLocation$outboundSchema.parse( - chatWebSearchShorthandUserLocation, - ), - ); -} - -/** @internal */ -export const ChatWebSearchShorthandParametersEngine$outboundSchema: z.ZodType< - string, - ChatWebSearchShorthandParametersEngine -> = openEnums.outboundSchema(ChatWebSearchShorthandParametersEngine); - -/** @internal */ -export const ChatWebSearchShorthandParametersSearchContextSize$outboundSchema: - z.ZodType = - openEnums.outboundSchema(ChatWebSearchShorthandParametersSearchContextSize); - -/** @internal */ -export const ChatWebSearchShorthandParametersType$outboundSchema: z.ZodEnum< - typeof ChatWebSearchShorthandParametersType -> = z.enum(ChatWebSearchShorthandParametersType); - -/** @internal */ -export type ChatWebSearchShorthandParametersUserLocation$Outbound = { - type?: string | undefined; - city?: string | undefined; - region?: string | undefined; - country?: string | undefined; - timezone?: string | undefined; -}; - -/** @internal */ -export const ChatWebSearchShorthandParametersUserLocation$outboundSchema: - z.ZodType< - ChatWebSearchShorthandParametersUserLocation$Outbound, - ChatWebSearchShorthandParametersUserLocation - > = z.object({ - type: ChatWebSearchShorthandParametersType$outboundSchema.optional(), - city: z.string().optional(), - region: z.string().optional(), - country: z.string().optional(), - timezone: z.string().optional(), - }); - -export function chatWebSearchShorthandParametersUserLocationToJSON( - chatWebSearchShorthandParametersUserLocation: - ChatWebSearchShorthandParametersUserLocation, -): string { - return JSON.stringify( - ChatWebSearchShorthandParametersUserLocation$outboundSchema.parse( - chatWebSearchShorthandParametersUserLocation, - ), - ); -} - -/** @internal */ -export type ChatWebSearchShorthandParameters$Outbound = { - engine?: string | undefined; - max_results?: number | undefined; - max_total_results?: number | undefined; - search_context_size?: string | undefined; - user_location?: - | ChatWebSearchShorthandParametersUserLocation$Outbound - | undefined; - allowed_domains?: Array | undefined; - excluded_domains?: Array | undefined; -}; - -/** @internal */ -export const ChatWebSearchShorthandParameters$outboundSchema: z.ZodType< - ChatWebSearchShorthandParameters$Outbound, - ChatWebSearchShorthandParameters -> = z.object({ - engine: ChatWebSearchShorthandParametersEngine$outboundSchema.optional(), - maxResults: z.number().optional(), - maxTotalResults: z.number().optional(), - searchContextSize: - ChatWebSearchShorthandParametersSearchContextSize$outboundSchema.optional(), - userLocation: z.lazy(() => - ChatWebSearchShorthandParametersUserLocation$outboundSchema - ).optional(), - allowedDomains: z.array(z.string()).optional(), - excludedDomains: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - maxResults: "max_results", - maxTotalResults: "max_total_results", - searchContextSize: "search_context_size", - userLocation: "user_location", - allowedDomains: "allowed_domains", - excludedDomains: "excluded_domains", - }); -}); - -export function chatWebSearchShorthandParametersToJSON( - chatWebSearchShorthandParameters: ChatWebSearchShorthandParameters, -): string { - return JSON.stringify( - ChatWebSearchShorthandParameters$outboundSchema.parse( - chatWebSearchShorthandParameters, - ), - ); -} - /** @internal */ export type ChatWebSearchShorthand$Outbound = { type: string; @@ -346,10 +85,10 @@ export type ChatWebSearchShorthand$Outbound = { max_results?: number | undefined; max_total_results?: number | undefined; search_context_size?: string | undefined; - user_location?: ChatWebSearchShorthandUserLocation$Outbound | undefined; + user_location?: WebSearchUserLocationServerTool$Outbound | undefined; allowed_domains?: Array | undefined; excluded_domains?: Array | undefined; - parameters?: ChatWebSearchShorthandParameters$Outbound | undefined; + parameters?: WebSearchConfig$Outbound | undefined; }; /** @internal */ @@ -358,17 +97,14 @@ export const ChatWebSearchShorthand$outboundSchema: z.ZodType< ChatWebSearchShorthand > = z.object({ type: ChatWebSearchShorthandType$outboundSchema, - engine: ChatWebSearchShorthandEngine$outboundSchema.optional(), - maxResults: z.number().optional(), - maxTotalResults: z.number().optional(), - searchContextSize: ChatWebSearchShorthandSearchContextSize$outboundSchema - .optional(), - userLocation: z.lazy(() => ChatWebSearchShorthandUserLocation$outboundSchema) - .optional(), + engine: WebSearchEngineEnum$outboundSchema.optional(), + maxResults: z.int().optional(), + maxTotalResults: z.int().optional(), + searchContextSize: SearchQualityLevel$outboundSchema.optional(), + userLocation: WebSearchUserLocationServerTool$outboundSchema.optional(), allowedDomains: z.array(z.string()).optional(), excludedDomains: z.array(z.string()).optional(), - parameters: z.lazy(() => ChatWebSearchShorthandParameters$outboundSchema) - .optional(), + parameters: WebSearchConfig$outboundSchema.optional(), }).transform((v) => { return remap$(v, { maxResults: "max_results", diff --git a/src/models/computeruseservertool.ts b/src/models/computeruseservertool.ts index 3af58e15..cf10a81d 100644 --- a/src/models/computeruseservertool.ts +++ b/src/models/computeruseservertool.ts @@ -43,8 +43,8 @@ export const ComputerUseServerTool$inboundSchema: z.ZodType< unknown > = z.object({ type: z.literal("computer_use_preview"), - display_height: z.number(), - display_width: z.number(), + display_height: z.int(), + display_width: z.int(), environment: Environment$inboundSchema, }).transform((v) => { return remap$(v, { @@ -66,8 +66,8 @@ export const ComputerUseServerTool$outboundSchema: z.ZodType< ComputerUseServerTool > = z.object({ type: z.literal("computer_use_preview"), - displayHeight: z.number(), - displayWidth: z.number(), + displayHeight: z.int(), + displayWidth: z.int(), environment: Environment$outboundSchema, }).transform((v) => { return remap$(v, { diff --git a/src/models/contentpartaddedevent.ts b/src/models/contentpartaddedevent.ts index 3bad02f6..21ab0f4d 100644 --- a/src/models/contentpartaddedevent.ts +++ b/src/models/contentpartaddedevent.ts @@ -6,6 +6,8 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -24,7 +26,8 @@ import { export type ContentPartAddedEventPart = | ResponseOutputText | (ReasoningTextContent & { type: "reasoning_text" }) - | OpenAIResponsesRefusalContent; + | OpenAIResponsesRefusalContent + | discriminatedUnionTypes.Unknown<"type">; /** * Event emitted when a new content part is added to an output item @@ -37,7 +40,8 @@ export type ContentPartAddedEvent = { part: | ResponseOutputText | (ReasoningTextContent & { type: "reasoning_text" }) - | OpenAIResponsesRefusalContent; + | OpenAIResponsesRefusalContent + | discriminatedUnionTypes.Unknown<"type">; sequenceNumber: number; }; @@ -45,13 +49,13 @@ export type ContentPartAddedEvent = { export const ContentPartAddedEventPart$inboundSchema: z.ZodType< ContentPartAddedEventPart, unknown -> = z.union([ - ResponseOutputText$inboundSchema, - ReasoningTextContent$inboundSchema.and( +> = discriminatedUnion("type", { + output_text: ResponseOutputText$inboundSchema, + reasoning_text: ReasoningTextContent$inboundSchema.and( z.object({ type: z.literal("reasoning_text") }), ), - OpenAIResponsesRefusalContent$inboundSchema, -]); + refusal: OpenAIResponsesRefusalContent$inboundSchema, +}); export function contentPartAddedEventPartFromJSON( jsonString: string, @@ -69,17 +73,17 @@ export const ContentPartAddedEvent$inboundSchema: z.ZodType< unknown > = z.object({ type: z.literal("response.content_part.added"), - output_index: z.number(), + output_index: z.int(), item_id: z.string(), - content_index: z.number(), - part: z.union([ - ResponseOutputText$inboundSchema, - ReasoningTextContent$inboundSchema.and( + content_index: z.int(), + part: discriminatedUnion("type", { + output_text: ResponseOutputText$inboundSchema, + reasoning_text: ReasoningTextContent$inboundSchema.and( z.object({ type: z.literal("reasoning_text") }), ), - OpenAIResponsesRefusalContent$inboundSchema, - ]), - sequence_number: z.number(), + refusal: OpenAIResponsesRefusalContent$inboundSchema, + }), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "output_index": "outputIndex", diff --git a/src/models/contentpartdoneevent.ts b/src/models/contentpartdoneevent.ts index ced429f9..8553f649 100644 --- a/src/models/contentpartdoneevent.ts +++ b/src/models/contentpartdoneevent.ts @@ -6,6 +6,8 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -24,7 +26,8 @@ import { export type ContentPartDoneEventPart = | ResponseOutputText | (ReasoningTextContent & { type: "reasoning_text" }) - | OpenAIResponsesRefusalContent; + | OpenAIResponsesRefusalContent + | discriminatedUnionTypes.Unknown<"type">; /** * Event emitted when a content part is complete @@ -37,7 +40,8 @@ export type ContentPartDoneEvent = { part: | ResponseOutputText | (ReasoningTextContent & { type: "reasoning_text" }) - | OpenAIResponsesRefusalContent; + | OpenAIResponsesRefusalContent + | discriminatedUnionTypes.Unknown<"type">; sequenceNumber: number; }; @@ -45,13 +49,13 @@ export type ContentPartDoneEvent = { export const ContentPartDoneEventPart$inboundSchema: z.ZodType< ContentPartDoneEventPart, unknown -> = z.union([ - ResponseOutputText$inboundSchema, - ReasoningTextContent$inboundSchema.and( +> = discriminatedUnion("type", { + output_text: ResponseOutputText$inboundSchema, + reasoning_text: ReasoningTextContent$inboundSchema.and( z.object({ type: z.literal("reasoning_text") }), ), - OpenAIResponsesRefusalContent$inboundSchema, -]); + refusal: OpenAIResponsesRefusalContent$inboundSchema, +}); export function contentPartDoneEventPartFromJSON( jsonString: string, @@ -69,17 +73,17 @@ export const ContentPartDoneEvent$inboundSchema: z.ZodType< unknown > = z.object({ type: z.literal("response.content_part.done"), - output_index: z.number(), + output_index: z.int(), item_id: z.string(), - content_index: z.number(), - part: z.union([ - ResponseOutputText$inboundSchema, - ReasoningTextContent$inboundSchema.and( + content_index: z.int(), + part: discriminatedUnion("type", { + output_text: ResponseOutputText$inboundSchema, + reasoning_text: ReasoningTextContent$inboundSchema.and( z.object({ type: z.literal("reasoning_text") }), ), - OpenAIResponsesRefusalContent$inboundSchema, - ]), - sequence_number: z.number(), + refusal: OpenAIResponsesRefusalContent$inboundSchema, + }), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "output_index": "outputIndex", diff --git a/src/models/contextcompressionplugin.ts b/src/models/contextcompressionplugin.ts new file mode 100644 index 00000000..7a74c30d --- /dev/null +++ b/src/models/contextcompressionplugin.ts @@ -0,0 +1,47 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e3e073b472a1 + */ + +import * as z from "zod/v4"; +import { + ContextCompressionEngine, + ContextCompressionEngine$outboundSchema, +} from "./contextcompressionengine.js"; + +export type ContextCompressionPlugin = { + id: "context-compression"; + /** + * Set to false to disable the context-compression plugin for this request. Defaults to true. + */ + enabled?: boolean | undefined; + /** + * The compression engine to use. Defaults to "middle-out". + */ + engine?: ContextCompressionEngine | undefined; +}; + +/** @internal */ +export type ContextCompressionPlugin$Outbound = { + id: "context-compression"; + enabled?: boolean | undefined; + engine?: string | undefined; +}; + +/** @internal */ +export const ContextCompressionPlugin$outboundSchema: z.ZodType< + ContextCompressionPlugin$Outbound, + ContextCompressionPlugin +> = z.object({ + id: z.literal("context-compression"), + enabled: z.boolean().optional(), + engine: ContextCompressionEngine$outboundSchema.optional(), +}); + +export function contextCompressionPluginToJSON( + contextCompressionPlugin: ContextCompressionPlugin, +): string { + return JSON.stringify( + ContextCompressionPlugin$outboundSchema.parse(contextCompressionPlugin), + ); +} diff --git a/src/models/createchargerequest.ts b/src/models/createchargerequest.ts deleted file mode 100644 index bd6860c3..00000000 --- a/src/models/createchargerequest.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: c342dc72d1f4 - */ - -import * as z from "zod/v4"; -import { remap as remap$ } from "../lib/primitives.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; - -export const ChainId = { - One: 1, - OneHundredAndThirtySeven: 137, - EightThousandFourHundredAndFiftyThree: 8453, -} as const; -export type ChainId = OpenEnum; - -/** - * Create a Coinbase charge for crypto payment - */ -export type CreateChargeRequest = { - amount: number; - sender: string; - chainId: ChainId; -}; - -/** @internal */ -export const ChainId$outboundSchema: z.ZodType = openEnums - .outboundSchemaInt(ChainId); - -/** @internal */ -export type CreateChargeRequest$Outbound = { - amount: number; - sender: string; - chain_id: number; -}; - -/** @internal */ -export const CreateChargeRequest$outboundSchema: z.ZodType< - CreateChargeRequest$Outbound, - CreateChargeRequest -> = z.object({ - amount: z.number(), - sender: z.string(), - chainId: ChainId$outboundSchema, -}).transform((v) => { - return remap$(v, { - chainId: "chain_id", - }); -}); - -export function createChargeRequestToJSON( - createChargeRequest: CreateChargeRequest, -): string { - return JSON.stringify( - CreateChargeRequest$outboundSchema.parse(createChargeRequest), - ); -} diff --git a/src/models/createguardrailrequest.ts b/src/models/createguardrailrequest.ts new file mode 100644 index 00000000..af15767f --- /dev/null +++ b/src/models/createguardrailrequest.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: fbf07f1435fd + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { + GuardrailInterval, + GuardrailInterval$outboundSchema, +} from "./guardrailinterval.js"; + +export type CreateGuardrailRequest = { + /** + * Name for the new guardrail + */ + name: string; + /** + * Description of the guardrail + */ + description?: string | null | undefined; + /** + * Spending limit in USD + */ + limitUsd?: number | undefined; + /** + * Interval at which the limit resets (daily, weekly, monthly) + */ + resetInterval?: GuardrailInterval | null | undefined; + /** + * List of allowed provider IDs + */ + allowedProviders?: Array | null | undefined; + /** + * List of provider IDs to exclude from routing + */ + ignoredProviders?: Array | null | undefined; + /** + * Array of model identifiers (slug or canonical_slug accepted) + */ + allowedModels?: Array | null | undefined; + /** + * Whether to enforce zero data retention + */ + enforceZdr?: boolean | null | undefined; +}; + +/** @internal */ +export type CreateGuardrailRequest$Outbound = { + name: string; + description?: string | null | undefined; + limit_usd?: number | undefined; + reset_interval?: string | null | undefined; + allowed_providers?: Array | null | undefined; + ignored_providers?: Array | null | undefined; + allowed_models?: Array | null | undefined; + enforce_zdr?: boolean | null | undefined; +}; + +/** @internal */ +export const CreateGuardrailRequest$outboundSchema: z.ZodType< + CreateGuardrailRequest$Outbound, + CreateGuardrailRequest +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + limitUsd: z.number().optional(), + resetInterval: z.nullable(GuardrailInterval$outboundSchema).optional(), + allowedProviders: z.nullable(z.array(z.string())).optional(), + ignoredProviders: z.nullable(z.array(z.string())).optional(), + allowedModels: z.nullable(z.array(z.string())).optional(), + enforceZdr: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + limitUsd: "limit_usd", + resetInterval: "reset_interval", + allowedProviders: "allowed_providers", + ignoredProviders: "ignored_providers", + allowedModels: "allowed_models", + enforceZdr: "enforce_zdr", + }); +}); + +export function createGuardrailRequestToJSON( + createGuardrailRequest: CreateGuardrailRequest, +): string { + return JSON.stringify( + CreateGuardrailRequest$outboundSchema.parse(createGuardrailRequest), + ); +} diff --git a/src/models/createguardrailresponse.ts b/src/models/createguardrailresponse.ts new file mode 100644 index 00000000..2329ce81 --- /dev/null +++ b/src/models/createguardrailresponse.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f0b6f29656b5 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { Guardrail, Guardrail$inboundSchema } from "./guardrail.js"; + +export type CreateGuardrailResponse = { + data: Guardrail; +}; + +/** @internal */ +export const CreateGuardrailResponse$inboundSchema: z.ZodType< + CreateGuardrailResponse, + unknown +> = z.object({ + data: Guardrail$inboundSchema, +}); + +export function createGuardrailResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateGuardrailResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateGuardrailResponse' from JSON`, + ); +} diff --git a/src/models/customtool.ts b/src/models/customtool.ts index c9dc3b4f..9f04d801 100644 --- a/src/models/customtool.ts +++ b/src/models/customtool.ts @@ -5,6 +5,8 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import * as openEnums from "../types/enums.js"; import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; @@ -26,7 +28,10 @@ export type FormatText = { type: "text"; }; -export type Format = FormatText | FormatGrammar; +export type Format = + | FormatText + | FormatGrammar + | discriminatedUnionTypes.Unknown<"type">; /** * Custom tool configuration @@ -35,7 +40,11 @@ export type CustomTool = { type: "custom"; name: string; description?: string | undefined; - format?: FormatText | FormatGrammar | undefined; + format?: + | FormatText + | FormatGrammar + | discriminatedUnionTypes.Unknown<"type"> + | undefined; }; /** @internal */ @@ -114,10 +123,11 @@ export function formatTextFromJSON( } /** @internal */ -export const Format$inboundSchema: z.ZodType = z.union([ - z.lazy(() => FormatText$inboundSchema), - z.lazy(() => FormatGrammar$inboundSchema), -]); +export const Format$inboundSchema: z.ZodType = + discriminatedUnion("type", { + text: z.lazy(() => FormatText$inboundSchema), + grammar: z.lazy(() => FormatGrammar$inboundSchema), + }); /** @internal */ export type Format$Outbound = FormatText$Outbound | FormatGrammar$Outbound; @@ -147,10 +157,10 @@ export const CustomTool$inboundSchema: z.ZodType = z type: z.literal("custom"), name: z.string(), description: z.string().optional(), - format: z.union([ - z.lazy(() => FormatText$inboundSchema), - z.lazy(() => FormatGrammar$inboundSchema), - ]).optional(), + format: discriminatedUnion("type", { + text: z.lazy(() => FormatText$inboundSchema), + grammar: z.lazy(() => FormatGrammar$inboundSchema), + }).optional(), }); /** @internal */ export type CustomTool$Outbound = { diff --git a/src/models/datacollection.ts b/src/models/datacollection.ts deleted file mode 100644 index e075ba95..00000000 --- a/src/models/datacollection.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: fa417e9ad79a - */ - -import * as z from "zod/v4"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; - -/** - * Data collection setting. If no available model provider meets the requirement, your request will return an error. - * - * @remarks - * - allow: (default) allow providers which store user data non-transiently and may train on it - * - * - deny: use only providers which do not collect user data. - */ -export const DataCollection = { - Deny: "deny", - Allow: "allow", -} as const; -/** - * Data collection setting. If no available model provider meets the requirement, your request will return an error. - * - * @remarks - * - allow: (default) allow providers which store user data non-transiently and may train on it - * - * - deny: use only providers which do not collect user data. - */ -export type DataCollection = OpenEnum; - -/** @internal */ -export const DataCollection$outboundSchema: z.ZodType = - openEnums.outboundSchema(DataCollection); diff --git a/src/models/defaultparameters.ts b/src/models/defaultparameters.ts index b2603a4d..131372a4 100644 --- a/src/models/defaultparameters.ts +++ b/src/models/defaultparameters.ts @@ -13,12 +13,12 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Default parameters for this model */ export type DefaultParameters = { - temperature?: number | null | undefined; - topP?: number | null | undefined; + temperature?: number | undefined; + topP?: number | undefined; topK?: number | null | undefined; - frequencyPenalty?: number | null | undefined; - presencePenalty?: number | null | undefined; - repetitionPenalty?: number | null | undefined; + frequencyPenalty?: number | undefined; + presencePenalty?: number | undefined; + repetitionPenalty?: number | undefined; }; /** @internal */ @@ -26,12 +26,12 @@ export const DefaultParameters$inboundSchema: z.ZodType< DefaultParameters, unknown > = z.object({ - temperature: z.nullable(z.number()).optional(), - top_p: z.nullable(z.number()).optional(), + temperature: z.number().optional(), + top_p: z.number().optional(), top_k: z.nullable(z.int()).optional(), - frequency_penalty: z.nullable(z.number()).optional(), - presence_penalty: z.nullable(z.number()).optional(), - repetition_penalty: z.nullable(z.number()).optional(), + frequency_penalty: z.number().optional(), + presence_penalty: z.number().optional(), + repetition_penalty: z.number().optional(), }).transform((v) => { return remap$(v, { "top_p": "topP", diff --git a/src/models/deleteguardrailresponse.ts b/src/models/deleteguardrailresponse.ts new file mode 100644 index 00000000..943415e3 --- /dev/null +++ b/src/models/deleteguardrailresponse.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 1369f013fe1a + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type DeleteGuardrailResponse = { + /** + * Confirmation that the guardrail was deleted + */ + deleted: true; +}; + +/** @internal */ +export const DeleteGuardrailResponse$inboundSchema: z.ZodType< + DeleteGuardrailResponse, + unknown +> = z.object({ + deleted: z.literal(true), +}); + +export function deleteGuardrailResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteGuardrailResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteGuardrailResponse' from JSON`, + ); +} diff --git a/src/models/errorevent.ts b/src/models/errorevent.ts index 13b3a6a9..6f4cfe3e 100644 --- a/src/models/errorevent.ts +++ b/src/models/errorevent.ts @@ -27,7 +27,7 @@ export const ErrorEvent$inboundSchema: z.ZodType = z code: z.nullable(z.string()), message: z.string(), param: z.nullable(z.string()), - sequence_number: z.number(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "sequence_number": "sequenceNumber", diff --git a/src/models/filecitation.ts b/src/models/filecitation.ts index 665445c5..c77b8a67 100644 --- a/src/models/filecitation.ts +++ b/src/models/filecitation.ts @@ -22,7 +22,7 @@ export const FileCitation$inboundSchema: z.ZodType = z type: z.literal("file_citation"), file_id: z.string(), filename: z.string(), - index: z.number(), + index: z.int(), }).transform((v) => { return remap$(v, { "file_id": "fileId", @@ -44,7 +44,7 @@ export const FileCitation$outboundSchema: z.ZodType< type: z.literal("file_citation"), fileId: z.string(), filename: z.string(), - index: z.number(), + index: z.int(), }).transform((v) => { return remap$(v, { fileId: "file_id", diff --git a/src/models/fileparserplugin.ts b/src/models/fileparserplugin.ts new file mode 100644 index 00000000..891f6ebf --- /dev/null +++ b/src/models/fileparserplugin.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 04e61b333ea7 + */ + +import * as z from "zod/v4"; +import { + PDFParserOptions, + PDFParserOptions$Outbound, + PDFParserOptions$outboundSchema, +} from "./pdfparseroptions.js"; + +export type FileParserPlugin = { + id: "file-parser"; + /** + * Set to false to disable the file-parser plugin for this request. Defaults to true. + */ + enabled?: boolean | undefined; + /** + * Options for PDF parsing. + */ + pdf?: PDFParserOptions | undefined; +}; + +/** @internal */ +export type FileParserPlugin$Outbound = { + id: "file-parser"; + enabled?: boolean | undefined; + pdf?: PDFParserOptions$Outbound | undefined; +}; + +/** @internal */ +export const FileParserPlugin$outboundSchema: z.ZodType< + FileParserPlugin$Outbound, + FileParserPlugin +> = z.object({ + id: z.literal("file-parser"), + enabled: z.boolean().optional(), + pdf: PDFParserOptions$outboundSchema.optional(), +}); + +export function fileParserPluginToJSON( + fileParserPlugin: FileParserPlugin, +): string { + return JSON.stringify( + FileParserPlugin$outboundSchema.parse(fileParserPlugin), + ); +} diff --git a/src/models/filepath.ts b/src/models/filepath.ts index 90ff601b..2705a098 100644 --- a/src/models/filepath.ts +++ b/src/models/filepath.ts @@ -19,7 +19,7 @@ export type FilePath = { export const FilePath$inboundSchema: z.ZodType = z.object({ type: z.literal("file_path"), file_id: z.string(), - index: z.number(), + index: z.int(), }).transform((v) => { return remap$(v, { "file_id": "fileId", @@ -37,7 +37,7 @@ export const FilePath$outboundSchema: z.ZodType = z .object({ type: z.literal("file_path"), fileId: z.string(), - index: z.number(), + index: z.int(), }).transform((v) => { return remap$(v, { fileId: "file_id", diff --git a/src/models/filesearchservertool.ts b/src/models/filesearchservertool.ts index 885c0437..d8c1c028 100644 --- a/src/models/filesearchservertool.ts +++ b/src/models/filesearchservertool.ts @@ -31,13 +31,13 @@ export type Value1 = string | number; export type Value2 = string | number | boolean | Array; -export type FileSearchServerToolFilters = { +export type Filters = { key: string; type: FiltersType; value: string | number | boolean | Array; }; -export type Filters = FileSearchServerToolFilters | CompoundFilter | any; +export type FiltersUnion = Filters | CompoundFilter | any; export const Ranker = { Auto: "auto", @@ -56,12 +56,7 @@ export type RankingOptions = { export type FileSearchServerTool = { type: "file_search"; vectorStoreIds: Array; - filters?: - | FileSearchServerToolFilters - | CompoundFilter - | any - | null - | undefined; + filters?: Filters | CompoundFilter | any | null | undefined; maxNumResults?: number | undefined; rankingOptions?: RankingOptions | undefined; }; @@ -135,10 +130,7 @@ export function value2FromJSON( } /** @internal */ -export const FileSearchServerToolFilters$inboundSchema: z.ZodType< - FileSearchServerToolFilters, - unknown -> = z.object({ +export const Filters$inboundSchema: z.ZodType = z.object({ key: z.string(), type: FiltersType$inboundSchema, value: z.union([ @@ -149,76 +141,71 @@ export const FileSearchServerToolFilters$inboundSchema: z.ZodType< ]), }); /** @internal */ -export type FileSearchServerToolFilters$Outbound = { +export type Filters$Outbound = { key: string; type: string; value: string | number | boolean | Array; }; /** @internal */ -export const FileSearchServerToolFilters$outboundSchema: z.ZodType< - FileSearchServerToolFilters$Outbound, - FileSearchServerToolFilters -> = z.object({ - key: z.string(), - type: FiltersType$outboundSchema, - value: z.union([ - z.string(), - z.number(), - z.boolean(), - z.array(z.union([z.string(), z.number()])), - ]), -}); +export const Filters$outboundSchema: z.ZodType = z + .object({ + key: z.string(), + type: FiltersType$outboundSchema, + value: z.union([ + z.string(), + z.number(), + z.boolean(), + z.array(z.union([z.string(), z.number()])), + ]), + }); -export function fileSearchServerToolFiltersToJSON( - fileSearchServerToolFilters: FileSearchServerToolFilters, -): string { - return JSON.stringify( - FileSearchServerToolFilters$outboundSchema.parse( - fileSearchServerToolFilters, - ), - ); +export function filtersToJSON(filters: Filters): string { + return JSON.stringify(Filters$outboundSchema.parse(filters)); } -export function fileSearchServerToolFiltersFromJSON( +export function filtersFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => FileSearchServerToolFilters$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'FileSearchServerToolFilters' from JSON`, + (x) => Filters$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Filters' from JSON`, ); } /** @internal */ -export const Filters$inboundSchema: z.ZodType = z.union([ - z.lazy(() => FileSearchServerToolFilters$inboundSchema), - CompoundFilter$inboundSchema, - z.any(), -]); +export const FiltersUnion$inboundSchema: z.ZodType = z + .union([ + z.lazy(() => Filters$inboundSchema), + CompoundFilter$inboundSchema, + z.any(), + ]); /** @internal */ -export type Filters$Outbound = - | FileSearchServerToolFilters$Outbound +export type FiltersUnion$Outbound = + | Filters$Outbound | CompoundFilter$Outbound | any; /** @internal */ -export const Filters$outboundSchema: z.ZodType = z - .union([ - z.lazy(() => FileSearchServerToolFilters$outboundSchema), - CompoundFilter$outboundSchema, - z.any(), - ]); +export const FiltersUnion$outboundSchema: z.ZodType< + FiltersUnion$Outbound, + FiltersUnion +> = z.union([ + z.lazy(() => Filters$outboundSchema), + CompoundFilter$outboundSchema, + z.any(), +]); -export function filtersToJSON(filters: Filters): string { - return JSON.stringify(Filters$outboundSchema.parse(filters)); +export function filtersUnionToJSON(filtersUnion: FiltersUnion): string { + return JSON.stringify(FiltersUnion$outboundSchema.parse(filtersUnion)); } -export function filtersFromJSON( +export function filtersUnionFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => Filters$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Filters' from JSON`, + (x) => FiltersUnion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'FiltersUnion' from JSON`, ); } @@ -280,7 +267,7 @@ export const FileSearchServerTool$inboundSchema: z.ZodType< vector_store_ids: z.array(z.string()), filters: z.nullable( z.union([ - z.lazy(() => FileSearchServerToolFilters$inboundSchema), + z.lazy(() => Filters$inboundSchema), CompoundFilter$inboundSchema, z.any(), ]), @@ -298,12 +285,7 @@ export const FileSearchServerTool$inboundSchema: z.ZodType< export type FileSearchServerTool$Outbound = { type: "file_search"; vector_store_ids: Array; - filters?: - | FileSearchServerToolFilters$Outbound - | CompoundFilter$Outbound - | any - | null - | undefined; + filters?: Filters$Outbound | CompoundFilter$Outbound | any | null | undefined; max_num_results?: number | undefined; ranking_options?: RankingOptions$Outbound | undefined; }; @@ -317,7 +299,7 @@ export const FileSearchServerTool$outboundSchema: z.ZodType< vectorStoreIds: z.array(z.string()), filters: z.nullable( z.union([ - z.lazy(() => FileSearchServerToolFilters$outboundSchema), + z.lazy(() => Filters$outboundSchema), CompoundFilter$outboundSchema, z.any(), ]), diff --git a/src/models/formats.ts b/src/models/formats.ts index 3dbb1905..7f9ca8e7 100644 --- a/src/models/formats.ts +++ b/src/models/formats.ts @@ -5,6 +5,8 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -32,14 +34,16 @@ import { export type Formats = | FormatTextConfig | FormatJsonObjectConfig - | FormatJsonSchemaConfig; + | FormatJsonSchemaConfig + | discriminatedUnionTypes.Unknown<"type">; /** @internal */ -export const Formats$inboundSchema: z.ZodType = z.union([ - FormatTextConfig$inboundSchema, - FormatJsonObjectConfig$inboundSchema, - FormatJsonSchemaConfig$inboundSchema, -]); +export const Formats$inboundSchema: z.ZodType = + discriminatedUnion("type", { + text: FormatTextConfig$inboundSchema, + json_object: FormatJsonObjectConfig$inboundSchema, + json_schema: FormatJsonSchemaConfig$inboundSchema, + }); /** @internal */ export type Formats$Outbound = | FormatTextConfig$Outbound diff --git a/src/models/functioncallargsdeltaevent.ts b/src/models/functioncallargsdeltaevent.ts index f170a417..e2ca44f1 100644 --- a/src/models/functioncallargsdeltaevent.ts +++ b/src/models/functioncallargsdeltaevent.ts @@ -27,9 +27,9 @@ export const FunctionCallArgsDeltaEvent$inboundSchema: z.ZodType< > = z.object({ type: z.literal("response.function_call_arguments.delta"), item_id: z.string(), - output_index: z.number(), + output_index: z.int(), delta: z.string(), - sequence_number: z.number(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/functioncallargsdoneevent.ts b/src/models/functioncallargsdoneevent.ts index 6db82e3c..e64080fa 100644 --- a/src/models/functioncallargsdoneevent.ts +++ b/src/models/functioncallargsdoneevent.ts @@ -28,10 +28,10 @@ export const FunctionCallArgsDoneEvent$inboundSchema: z.ZodType< > = z.object({ type: z.literal("response.function_call_arguments.done"), item_id: z.string(), - output_index: z.number(), + output_index: z.int(), name: z.string(), arguments: z.string(), - sequence_number: z.number(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/functioncallitem.ts b/src/models/functioncallitem.ts index 95e4b01f..144a56e6 100644 --- a/src/models/functioncallitem.ts +++ b/src/models/functioncallitem.ts @@ -7,9 +7,9 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { ClosedEnum } from "../types/enums.js"; import { - ToolCallStatusEnum, - ToolCallStatusEnum$outboundSchema, -} from "./toolcallstatusenum.js"; + ToolCallStatus, + ToolCallStatus$outboundSchema, +} from "./toolcallstatus.js"; export const FunctionCallItemType = { FunctionCall: "function_call", @@ -25,7 +25,7 @@ export type FunctionCallItem = { name: string; arguments: string; id: string; - status?: ToolCallStatusEnum | null | undefined; + status?: ToolCallStatus | undefined; }; /** @internal */ @@ -40,7 +40,7 @@ export type FunctionCallItem$Outbound = { name: string; arguments: string; id: string; - status?: string | null | undefined; + status?: string | undefined; }; /** @internal */ @@ -53,7 +53,7 @@ export const FunctionCallItem$outboundSchema: z.ZodType< name: z.string(), arguments: z.string(), id: z.string(), - status: z.nullable(ToolCallStatusEnum$outboundSchema).optional(), + status: ToolCallStatus$outboundSchema.optional(), }).transform((v) => { return remap$(v, { callId: "call_id", diff --git a/src/models/functioncalloutputitem.ts b/src/models/functioncalloutputitem.ts index 9507b1da..c67de54e 100644 --- a/src/models/functioncalloutputitem.ts +++ b/src/models/functioncalloutputitem.ts @@ -17,10 +17,6 @@ import { InputText$Outbound, InputText$outboundSchema, } from "./inputtext.js"; -import { - ToolCallStatusEnum, - ToolCallStatusEnum$outboundSchema, -} from "./toolcallstatusenum.js"; export const FunctionCallOutputItemTypeFunctionCallOutput = { FunctionCallOutput: "function_call_output", @@ -56,6 +52,15 @@ export type FunctionCallOutputItemOutputUnion2 = | string | Array; +export const FunctionCallOutputItemStatus = { + InProgress: "in_progress", + Completed: "completed", + Incomplete: "incomplete", +} as const; +export type FunctionCallOutputItemStatus = OpenEnum< + typeof FunctionCallOutputItemStatus +>; + /** * The output from a function call execution */ @@ -64,7 +69,7 @@ export type FunctionCallOutputItem = { id?: string | null | undefined; callId: string; output: string | Array; - status?: ToolCallStatusEnum | null | undefined; + status?: FunctionCallOutputItemStatus | null | undefined; }; /** @internal */ @@ -162,6 +167,12 @@ export function functionCallOutputItemOutputUnion2ToJSON( ); } +/** @internal */ +export const FunctionCallOutputItemStatus$outboundSchema: z.ZodType< + string, + FunctionCallOutputItemStatus +> = openEnums.outboundSchema(FunctionCallOutputItemStatus); + /** @internal */ export type FunctionCallOutputItem$Outbound = { type: string; @@ -191,7 +202,7 @@ export const FunctionCallOutputItem$outboundSchema: z.ZodType< InputFile$outboundSchema, ])), ]), - status: z.nullable(ToolCallStatusEnum$outboundSchema).optional(), + status: z.nullable(FunctionCallOutputItemStatus$outboundSchema).optional(), }).transform((v) => { return remap$(v, { callId: "call_id", diff --git a/src/models/getguardrailresponse.ts b/src/models/getguardrailresponse.ts new file mode 100644 index 00000000..bf3d99d7 --- /dev/null +++ b/src/models/getguardrailresponse.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3103b978871a + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { Guardrail, Guardrail$inboundSchema } from "./guardrail.js"; + +export type GetGuardrailResponse = { + data: Guardrail; +}; + +/** @internal */ +export const GetGuardrailResponse$inboundSchema: z.ZodType< + GetGuardrailResponse, + unknown +> = z.object({ + data: Guardrail$inboundSchema, +}); + +export function getGuardrailResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetGuardrailResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetGuardrailResponse' from JSON`, + ); +} diff --git a/src/models/guardrail.ts b/src/models/guardrail.ts new file mode 100644 index 00000000..3e16001d --- /dev/null +++ b/src/models/guardrail.ts @@ -0,0 +1,97 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 240a4b8d7a7d + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + GuardrailInterval, + GuardrailInterval$inboundSchema, +} from "./guardrailinterval.js"; + +export type Guardrail = { + /** + * Unique identifier for the guardrail + */ + id: string; + /** + * Name of the guardrail + */ + name: string; + /** + * Description of the guardrail + */ + description?: string | null | undefined; + /** + * Spending limit in USD + */ + limitUsd?: number | undefined; + /** + * Interval at which the limit resets (daily, weekly, monthly) + */ + resetInterval?: GuardrailInterval | null | undefined; + /** + * List of allowed provider IDs + */ + allowedProviders?: Array | null | undefined; + /** + * List of provider IDs to exclude from routing + */ + ignoredProviders?: Array | null | undefined; + /** + * Array of model canonical_slugs (immutable identifiers) + */ + allowedModels?: Array | null | undefined; + /** + * Whether to enforce zero data retention + */ + enforceZdr?: boolean | null | undefined; + /** + * ISO 8601 timestamp of when the guardrail was created + */ + createdAt: string; + /** + * ISO 8601 timestamp of when the guardrail was last updated + */ + updatedAt?: string | null | undefined; +}; + +/** @internal */ +export const Guardrail$inboundSchema: z.ZodType = z.object({ + id: z.string(), + name: z.string(), + description: z.nullable(z.string()).optional(), + limit_usd: z.number().optional(), + reset_interval: z.nullable(GuardrailInterval$inboundSchema).optional(), + allowed_providers: z.nullable(z.array(z.string())).optional(), + ignored_providers: z.nullable(z.array(z.string())).optional(), + allowed_models: z.nullable(z.array(z.string())).optional(), + enforce_zdr: z.nullable(z.boolean()).optional(), + created_at: z.string(), + updated_at: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "limit_usd": "limitUsd", + "reset_interval": "resetInterval", + "allowed_providers": "allowedProviders", + "ignored_providers": "ignoredProviders", + "allowed_models": "allowedModels", + "enforce_zdr": "enforceZdr", + "created_at": "createdAt", + "updated_at": "updatedAt", + }); +}); + +export function guardrailFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Guardrail$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Guardrail' from JSON`, + ); +} diff --git a/src/models/guardrailinterval.ts b/src/models/guardrailinterval.ts new file mode 100644 index 00000000..381964d9 --- /dev/null +++ b/src/models/guardrailinterval.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: a8a819c013c0 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +/** + * Interval at which the limit resets (daily, weekly, monthly) + */ +export const GuardrailInterval = { + Daily: "daily", + Weekly: "weekly", + Monthly: "monthly", +} as const; +/** + * Interval at which the limit resets (daily, weekly, monthly) + */ +export type GuardrailInterval = OpenEnum; + +/** @internal */ +export const GuardrailInterval$inboundSchema: z.ZodType< + GuardrailInterval, + unknown +> = openEnums.inboundSchema(GuardrailInterval); +/** @internal */ +export const GuardrailInterval$outboundSchema: z.ZodType< + string, + GuardrailInterval +> = openEnums.outboundSchema(GuardrailInterval); diff --git a/src/models/imagegencallcompletedevent.ts b/src/models/imagegencallcompletedevent.ts index b581483d..7985d956 100644 --- a/src/models/imagegencallcompletedevent.ts +++ b/src/models/imagegencallcompletedevent.ts @@ -26,8 +26,8 @@ export const ImageGenCallCompletedEvent$inboundSchema: z.ZodType< > = z.object({ type: z.literal("response.image_generation_call.completed"), item_id: z.string(), - output_index: z.number(), - sequence_number: z.number(), + output_index: z.int(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/imagegencallgeneratingevent.ts b/src/models/imagegencallgeneratingevent.ts index ae0ae8f4..5c1a930f 100644 --- a/src/models/imagegencallgeneratingevent.ts +++ b/src/models/imagegencallgeneratingevent.ts @@ -26,8 +26,8 @@ export const ImageGenCallGeneratingEvent$inboundSchema: z.ZodType< > = z.object({ type: z.literal("response.image_generation_call.generating"), item_id: z.string(), - output_index: z.number(), - sequence_number: z.number(), + output_index: z.int(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/imagegencallinprogressevent.ts b/src/models/imagegencallinprogressevent.ts index 78a23a98..20f9f64e 100644 --- a/src/models/imagegencallinprogressevent.ts +++ b/src/models/imagegencallinprogressevent.ts @@ -26,8 +26,8 @@ export const ImageGenCallInProgressEvent$inboundSchema: z.ZodType< > = z.object({ type: z.literal("response.image_generation_call.in_progress"), item_id: z.string(), - output_index: z.number(), - sequence_number: z.number(), + output_index: z.int(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/imagegencallpartialimageevent.ts b/src/models/imagegencallpartialimageevent.ts index 2fc2883c..802ea6c2 100644 --- a/src/models/imagegencallpartialimageevent.ts +++ b/src/models/imagegencallpartialimageevent.ts @@ -28,10 +28,10 @@ export const ImageGenCallPartialImageEvent$inboundSchema: z.ZodType< > = z.object({ type: z.literal("response.image_generation_call.partial_image"), item_id: z.string(), - output_index: z.number(), - sequence_number: z.number(), + output_index: z.int(), + sequence_number: z.int(), partial_image_b64: z.string(), - partial_image_index: z.number(), + partial_image_index: z.int(), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/imagegenerationservertool.ts b/src/models/imagegenerationservertool.ts index a740f320..03ccd92d 100644 --- a/src/models/imagegenerationservertool.ts +++ b/src/models/imagegenerationservertool.ts @@ -185,9 +185,9 @@ export const ImageGenerationServerTool$inboundSchema: z.ZodType< input_image_mask: z.lazy(() => InputImageMask$inboundSchema).optional(), model: ModelEnum$inboundSchema.optional(), moderation: Moderation$inboundSchema.optional(), - output_compression: z.number().optional(), + output_compression: z.int().optional(), output_format: OutputFormat$inboundSchema.optional(), - partial_images: z.number().optional(), + partial_images: z.int().optional(), quality: Quality$inboundSchema.optional(), size: Size$inboundSchema.optional(), }).transform((v) => { @@ -225,9 +225,9 @@ export const ImageGenerationServerTool$outboundSchema: z.ZodType< inputImageMask: z.lazy(() => InputImageMask$outboundSchema).optional(), model: ModelEnum$outboundSchema.optional(), moderation: Moderation$outboundSchema.optional(), - outputCompression: z.number().optional(), + outputCompression: z.int().optional(), outputFormat: OutputFormat$outboundSchema.optional(), - partialImages: z.number().optional(), + partialImages: z.int().optional(), quality: Quality$outboundSchema.optional(), size: Size$outboundSchema.optional(), }).transform((v) => { diff --git a/src/models/index.ts b/src/models/index.ts index 393ef681..c7fa26ce 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -4,12 +4,24 @@ */ export * from "./activityitem.js"; +export * from "./activityresponse.js"; export * from "./annotationaddedevent.js"; +export * from "./anthropiccachecontroldirective.js"; +export * from "./anthropiccachecontrolttl.js"; export * from "./applypatchservertool.js"; +export * from "./autorouterplugin.js"; export * from "./badgatewayresponseerrordata.js"; export * from "./badrequestresponseerrordata.js"; export * from "./baseinputsunion.js"; export * from "./basereasoningconfig.js"; +export * from "./bulkassignkeysrequest.js"; +export * from "./bulkassignkeysresponse.js"; +export * from "./bulkassignmembersrequest.js"; +export * from "./bulkassignmembersresponse.js"; +export * from "./bulkunassignkeysrequest.js"; +export * from "./bulkunassignkeysresponse.js"; +export * from "./bulkunassignmembersrequest.js"; +export * from "./bulkunassignmembersresponse.js"; export * from "./chatassistantimages.js"; export * from "./chatassistantmessage.js"; export * from "./chataudiooutput.js"; @@ -49,7 +61,6 @@ export * from "./chattoolchoice.js"; export * from "./chattoolmessage.js"; export * from "./chatusage.js"; export * from "./chatusermessage.js"; -export * from "./chatwebsearchservertool.js"; export * from "./chatwebsearchshorthand.js"; export * from "./codeinterpreterservertool.js"; export * from "./codexlocalshelltool.js"; @@ -59,16 +70,19 @@ export * from "./conflictresponseerrordata.js"; export * from "./contentpartaddedevent.js"; export * from "./contentpartdoneevent.js"; export * from "./contextcompressionengine.js"; -export * from "./createchargerequest.js"; +export * from "./contextcompressionplugin.js"; +export * from "./createguardrailrequest.js"; +export * from "./createguardrailresponse.js"; export * from "./customtool.js"; -export * from "./datacollection.js"; export * from "./datetimeservertool.js"; export * from "./defaultparameters.js"; +export * from "./deleteguardrailresponse.js"; export * from "./easyinputmessage.js"; export * from "./edgenetworktimeoutresponseerrordata.js"; export * from "./endpointstatus.js"; export * from "./errorevent.js"; export * from "./filecitation.js"; +export * from "./fileparserplugin.js"; export * from "./filepath.js"; export * from "./filesearchservertool.js"; export * from "./forbiddenresponseerrordata.js"; @@ -80,6 +94,9 @@ export * from "./functioncallargsdeltaevent.js"; export * from "./functioncallargsdoneevent.js"; export * from "./functioncallitem.js"; export * from "./functioncalloutputitem.js"; +export * from "./getguardrailresponse.js"; +export * from "./guardrail.js"; +export * from "./guardrailinterval.js"; export * from "./imagegencallcompletedevent.js"; export * from "./imagegencallgeneratingevent.js"; export * from "./imagegencallinprogressevent.js"; @@ -97,22 +114,35 @@ export * from "./inputtext.js"; export * from "./inputvideo.js"; export * from "./instructtype.js"; export * from "./internalserverresponseerrordata.js"; +export * from "./keyassignment.js"; export * from "./legacychatcontentvideo.js"; export * from "./legacywebsearchservertool.js"; export * from "./listendpointsresponse.js"; +export * from "./listguardrailsresponse.js"; +export * from "./listkeyassignmentsresponse.js"; +export * from "./listmemberassignmentsresponse.js"; export * from "./mcpservertool.js"; +export * from "./memberassignment.js"; export * from "./model.js"; export * from "./modelarchitecture.js"; export * from "./modelgroup.js"; +export * from "./modellinks.js"; export * from "./modelscountresponse.js"; export * from "./modelslistresponse.js"; +export * from "./moderationplugin.js"; export * from "./notfoundresponseerrordata.js"; +export * from "./openairesponsefunctiontoolcall.js"; +export * from "./openairesponsefunctiontoolcalloutput.js"; +export * from "./openairesponseinputmessageitem.js"; export * from "./openairesponsesannotation.js"; export * from "./openairesponsesrefusalcontent.js"; export * from "./openairesponsesresponsestatus.js"; export * from "./openairesponsestoolchoiceunion.js"; export * from "./openairesponsestruncation.js"; +export * from "./openresponsescreatedevent.js"; +export * from "./openresponsesinprogressevent.js"; export * from "./openresponsesresult.js"; +export * from "./openrouterwebsearchservertool.js"; export * from "./outputdatetimeitem.js"; export * from "./outputfilesearchcallitem.js"; export * from "./outputfunctioncallitem.js"; @@ -143,6 +173,7 @@ export * from "./previewwebsearchuserlocation.js"; export * from "./providername.js"; export * from "./provideroverloadedresponseerrordata.js"; export * from "./providerpreferences.js"; +export * from "./providerresponse.js"; export * from "./providersort.js"; export * from "./providersortconfig.js"; export * from "./publicendpoint.js"; @@ -155,45 +186,65 @@ export * from "./reasoningdetailsummary.js"; export * from "./reasoningdetailtext.js"; export * from "./reasoningdetailunion.js"; export * from "./reasoningdoneevent.js"; -export * from "./reasoningeffortenum.js"; +export * from "./reasoningeffort.js"; +export * from "./reasoningformat.js"; export * from "./reasoningitem.js"; export * from "./reasoningsummarypartaddedevent.js"; export * from "./reasoningsummarypartdoneevent.js"; export * from "./reasoningsummarytext.js"; export * from "./reasoningsummarytextdeltaevent.js"; export * from "./reasoningsummarytextdoneevent.js"; -export * from "./reasoningsummaryverbosityenum.js"; +export * from "./reasoningsummaryverbosity.js"; export * from "./reasoningtextcontent.js"; export * from "./refusaldeltaevent.js"; export * from "./refusaldoneevent.js"; export * from "./requesttimeoutresponseerrordata.js"; +export * from "./responsehealingplugin.js"; export * from "./responseincludesenum.js"; export * from "./responseoutputtext.js"; export * from "./responseserrorfield.js"; export * from "./responsesrequest.js"; export * from "./searchcontextsizeenum.js"; +export * from "./searchqualitylevel.js"; export * from "./security.js"; export * from "./serviceunavailableresponseerrordata.js"; export * from "./shellservertool.js"; export * from "./storedprompttemplate.js"; export * from "./streamevents.js"; +export * from "./streameventsresponsecompleted.js"; +export * from "./streameventsresponsefailed.js"; +export * from "./streameventsresponseincomplete.js"; +export * from "./streameventsresponseoutputitemadded.js"; +export * from "./streameventsresponseoutputitemdone.js"; +export * from "./streamlogprob.js"; +export * from "./streamlogprobtoplogprob.js"; export * from "./textconfig.js"; export * from "./textdeltaevent.js"; export * from "./textdoneevent.js"; export * from "./textextendedconfig.js"; -export * from "./toolcallstatusenum.js"; +export * from "./toolcallstatus.js"; +export * from "./toolchoiceallowed.js"; export * from "./toomanyrequestsresponseerrordata.js"; export * from "./topproviderinfo.js"; -export * from "./truncationenum.js"; +export * from "./traceconfig.js"; +export * from "./truncation.js"; export * from "./unauthorizedresponseerrordata.js"; export * from "./unprocessableentityresponseerrordata.js"; +export * from "./updateguardrailrequest.js"; +export * from "./updateguardrailresponse.js"; export * from "./urlcitation.js"; export * from "./usage.js"; export * from "./websearchcallcompletedevent.js"; export * from "./websearchcallinprogressevent.js"; export * from "./websearchcallsearchingevent.js"; +export * from "./websearchconfig.js"; +export * from "./websearchdomainfilter.js"; export * from "./websearchengine.js"; +export * from "./websearchengineenum.js"; +export * from "./websearchplugin.js"; export * from "./websearchservertool.js"; export * from "./websearchservertoolopenrouter.js"; +export * from "./websearchsource.js"; export * from "./websearchstatus.js"; export * from "./websearchuserlocation.js"; +export * from "./websearchuserlocationservertool.js"; diff --git a/src/models/inputaudio.ts b/src/models/inputaudio.ts index 7c21e4a0..99262f07 100644 --- a/src/models/inputaudio.ts +++ b/src/models/inputaudio.ts @@ -11,15 +11,15 @@ import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const InputAudioFormat = { +export const FormatEnum = { Mp3: "mp3", Wav: "wav", } as const; -export type InputAudioFormat = OpenEnum; +export type FormatEnum = OpenEnum; export type InputAudioInputAudio = { data: string; - format: InputAudioFormat; + format: FormatEnum; }; /** @@ -31,15 +31,11 @@ export type InputAudio = { }; /** @internal */ -export const InputAudioFormat$inboundSchema: z.ZodType< - InputAudioFormat, - unknown -> = openEnums.inboundSchema(InputAudioFormat); +export const FormatEnum$inboundSchema: z.ZodType = + openEnums.inboundSchema(FormatEnum); /** @internal */ -export const InputAudioFormat$outboundSchema: z.ZodType< - string, - InputAudioFormat -> = openEnums.outboundSchema(InputAudioFormat); +export const FormatEnum$outboundSchema: z.ZodType = + openEnums.outboundSchema(FormatEnum); /** @internal */ export const InputAudioInputAudio$inboundSchema: z.ZodType< @@ -47,7 +43,7 @@ export const InputAudioInputAudio$inboundSchema: z.ZodType< unknown > = z.object({ data: z.string(), - format: InputAudioFormat$inboundSchema, + format: FormatEnum$inboundSchema, }); /** @internal */ export type InputAudioInputAudio$Outbound = { @@ -61,7 +57,7 @@ export const InputAudioInputAudio$outboundSchema: z.ZodType< InputAudioInputAudio > = z.object({ data: z.string(), - format: InputAudioFormat$outboundSchema, + format: FormatEnum$outboundSchema, }); export function inputAudioInputAudioToJSON( diff --git a/src/models/inputsunion.ts b/src/models/inputsunion.ts index 0a4daef9..c4ef1276 100644 --- a/src/models/inputsunion.ts +++ b/src/models/inputsunion.ts @@ -5,8 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { ClosedEnum } from "../types/enums.js"; import { EasyInputMessage, EasyInputMessage$Outbound, @@ -62,6 +61,10 @@ import { OutputWebSearchCallItem$Outbound, OutputWebSearchCallItem$outboundSchema, } from "./outputwebsearchcallitem.js"; +import { + ReasoningFormat, + ReasoningFormat$outboundSchema, +} from "./reasoningformat.js"; import { ReasoningItem, ReasoningItem$Outbound, @@ -112,22 +115,6 @@ export type InputsStatusUnion2 = | InputsStatusIncomplete2 | InputsStatusInProgress2; -/** - * The format of the reasoning content - */ -export const InputsFormat = { - Unknown: "unknown", - OpenaiResponsesV1: "openai-responses-v1", - AzureOpenaiResponsesV1: "azure-openai-responses-v1", - XaiResponsesV1: "xai-responses-v1", - AnthropicClaudeV1: "anthropic-claude-v1", - GoogleGeminiV1: "google-gemini-v1", -} as const; -/** - * The format of the reasoning content - */ -export type InputsFormat = OpenEnum; - /** * An output item containing reasoning */ @@ -146,10 +133,7 @@ export type InputsReasoning = { * A signature for the reasoning content, used for verification */ signature?: string | null | undefined; - /** - * The format of the reasoning content - */ - format?: InputsFormat | null | undefined; + format?: ReasoningFormat | null | undefined; }; export const InputsRole = { @@ -316,10 +300,6 @@ export function inputsStatusUnion2ToJSON( ); } -/** @internal */ -export const InputsFormat$outboundSchema: z.ZodType = - openEnums.outboundSchema(InputsFormat); - /** @internal */ export type InputsReasoning$Outbound = { type: string; @@ -348,7 +328,7 @@ export const InputsReasoning$outboundSchema: z.ZodType< InputsStatusInProgress2$outboundSchema, ]).optional(), signature: z.nullable(z.string()).optional(), - format: z.nullable(InputsFormat$outboundSchema).optional(), + format: z.nullable(ReasoningFormat$outboundSchema).optional(), }).transform((v) => { return remap$(v, { encryptedContent: "encrypted_content", diff --git a/src/models/keyassignment.ts b/src/models/keyassignment.ts new file mode 100644 index 00000000..41d187bd --- /dev/null +++ b/src/models/keyassignment.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 0daee4bf9653 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type KeyAssignment = { + /** + * Unique identifier for the assignment + */ + id: string; + /** + * Hash of the assigned API key + */ + keyHash: string; + /** + * ID of the guardrail + */ + guardrailId: string; + /** + * Name of the API key + */ + keyName: string; + /** + * Label of the API key + */ + keyLabel: string; + /** + * User ID of who made the assignment + */ + assignedBy: string | null; + /** + * ISO 8601 timestamp of when the assignment was created + */ + createdAt: string; +}; + +/** @internal */ +export const KeyAssignment$inboundSchema: z.ZodType = z + .object({ + id: z.string(), + key_hash: z.string(), + guardrail_id: z.string(), + key_name: z.string(), + key_label: z.string(), + assigned_by: z.nullable(z.string()), + created_at: z.string(), + }).transform((v) => { + return remap$(v, { + "key_hash": "keyHash", + "guardrail_id": "guardrailId", + "key_name": "keyName", + "key_label": "keyLabel", + "assigned_by": "assignedBy", + "created_at": "createdAt", + }); + }); + +export function keyAssignmentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => KeyAssignment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'KeyAssignment' from JSON`, + ); +} diff --git a/src/models/legacywebsearchservertool.ts b/src/models/legacywebsearchservertool.ts index 14b3583c..01d0b631 100644 --- a/src/models/legacywebsearchservertool.ts +++ b/src/models/legacywebsearchservertool.ts @@ -6,8 +6,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -15,6 +13,17 @@ import { SearchContextSizeEnum$inboundSchema, SearchContextSizeEnum$outboundSchema, } from "./searchcontextsizeenum.js"; +import { + WebSearchDomainFilter, + WebSearchDomainFilter$inboundSchema, + WebSearchDomainFilter$Outbound, + WebSearchDomainFilter$outboundSchema, +} from "./websearchdomainfilter.js"; +import { + WebSearchEngineEnum, + WebSearchEngineEnum$inboundSchema, + WebSearchEngineEnum$outboundSchema, +} from "./websearchengineenum.js"; import { WebSearchUserLocation, WebSearchUserLocation$inboundSchema, @@ -22,34 +31,12 @@ import { WebSearchUserLocation$outboundSchema, } from "./websearchuserlocation.js"; -export type LegacyWebSearchServerToolFilters = { - allowedDomains?: Array | null | undefined; - excludedDomains?: Array | null | undefined; -}; - -/** - * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - */ -export const LegacyWebSearchServerToolEngine = { - Auto: "auto", - Native: "native", - Exa: "exa", - Firecrawl: "firecrawl", - Parallel: "parallel", -} as const; -/** - * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - */ -export type LegacyWebSearchServerToolEngine = OpenEnum< - typeof LegacyWebSearchServerToolEngine ->; - /** * Web search tool configuration */ export type LegacyWebSearchServerTool = { type: "web_search"; - filters?: LegacyWebSearchServerToolFilters | null | undefined; + filters?: WebSearchDomainFilter | null | undefined; /** * Size of the search context for web search tools */ @@ -61,89 +48,24 @@ export type LegacyWebSearchServerTool = { /** * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. */ - engine?: LegacyWebSearchServerToolEngine | undefined; + engine?: WebSearchEngineEnum | undefined; /** * Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. */ maxResults?: number | undefined; }; -/** @internal */ -export const LegacyWebSearchServerToolFilters$inboundSchema: z.ZodType< - LegacyWebSearchServerToolFilters, - unknown -> = z.object({ - allowed_domains: z.nullable(z.array(z.string())).optional(), - excluded_domains: z.nullable(z.array(z.string())).optional(), -}).transform((v) => { - return remap$(v, { - "allowed_domains": "allowedDomains", - "excluded_domains": "excludedDomains", - }); -}); -/** @internal */ -export type LegacyWebSearchServerToolFilters$Outbound = { - allowed_domains?: Array | null | undefined; - excluded_domains?: Array | null | undefined; -}; - -/** @internal */ -export const LegacyWebSearchServerToolFilters$outboundSchema: z.ZodType< - LegacyWebSearchServerToolFilters$Outbound, - LegacyWebSearchServerToolFilters -> = z.object({ - allowedDomains: z.nullable(z.array(z.string())).optional(), - excludedDomains: z.nullable(z.array(z.string())).optional(), -}).transform((v) => { - return remap$(v, { - allowedDomains: "allowed_domains", - excludedDomains: "excluded_domains", - }); -}); - -export function legacyWebSearchServerToolFiltersToJSON( - legacyWebSearchServerToolFilters: LegacyWebSearchServerToolFilters, -): string { - return JSON.stringify( - LegacyWebSearchServerToolFilters$outboundSchema.parse( - legacyWebSearchServerToolFilters, - ), - ); -} -export function legacyWebSearchServerToolFiltersFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => LegacyWebSearchServerToolFilters$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'LegacyWebSearchServerToolFilters' from JSON`, - ); -} - -/** @internal */ -export const LegacyWebSearchServerToolEngine$inboundSchema: z.ZodType< - LegacyWebSearchServerToolEngine, - unknown -> = openEnums.inboundSchema(LegacyWebSearchServerToolEngine); -/** @internal */ -export const LegacyWebSearchServerToolEngine$outboundSchema: z.ZodType< - string, - LegacyWebSearchServerToolEngine -> = openEnums.outboundSchema(LegacyWebSearchServerToolEngine); - /** @internal */ export const LegacyWebSearchServerTool$inboundSchema: z.ZodType< LegacyWebSearchServerTool, unknown > = z.object({ type: z.literal("web_search"), - filters: z.nullable( - z.lazy(() => LegacyWebSearchServerToolFilters$inboundSchema), - ).optional(), + filters: z.nullable(WebSearchDomainFilter$inboundSchema).optional(), search_context_size: SearchContextSizeEnum$inboundSchema.optional(), user_location: z.nullable(WebSearchUserLocation$inboundSchema).optional(), - engine: LegacyWebSearchServerToolEngine$inboundSchema.optional(), - max_results: z.number().optional(), + engine: WebSearchEngineEnum$inboundSchema.optional(), + max_results: z.int().optional(), }).transform((v) => { return remap$(v, { "search_context_size": "searchContextSize", @@ -154,7 +76,7 @@ export const LegacyWebSearchServerTool$inboundSchema: z.ZodType< /** @internal */ export type LegacyWebSearchServerTool$Outbound = { type: "web_search"; - filters?: LegacyWebSearchServerToolFilters$Outbound | null | undefined; + filters?: WebSearchDomainFilter$Outbound | null | undefined; search_context_size?: string | undefined; user_location?: WebSearchUserLocation$Outbound | null | undefined; engine?: string | undefined; @@ -167,13 +89,11 @@ export const LegacyWebSearchServerTool$outboundSchema: z.ZodType< LegacyWebSearchServerTool > = z.object({ type: z.literal("web_search"), - filters: z.nullable( - z.lazy(() => LegacyWebSearchServerToolFilters$outboundSchema), - ).optional(), + filters: z.nullable(WebSearchDomainFilter$outboundSchema).optional(), searchContextSize: SearchContextSizeEnum$outboundSchema.optional(), userLocation: z.nullable(WebSearchUserLocation$outboundSchema).optional(), - engine: LegacyWebSearchServerToolEngine$outboundSchema.optional(), - maxResults: z.number().optional(), + engine: WebSearchEngineEnum$outboundSchema.optional(), + maxResults: z.int().optional(), }).transform((v) => { return remap$(v, { searchContextSize: "search_context_size", diff --git a/src/models/listendpointsresponse.ts b/src/models/listendpointsresponse.ts index b6d6af83..cc59156e 100644 --- a/src/models/listendpointsresponse.ts +++ b/src/models/listendpointsresponse.ts @@ -31,6 +31,7 @@ export const Tokenizer = { Gpt: "GPT", Claude: "Claude", Gemini: "Gemini", + Gemma: "Gemma", Grok: "Grok", Cohere: "Cohere", Nova: "Nova", @@ -137,7 +138,7 @@ export const ListEndpointsResponse$inboundSchema: z.ZodType< > = z.object({ id: z.string(), name: z.string(), - created: z.number(), + created: z.int(), description: z.string(), architecture: z.lazy(() => Architecture$inboundSchema), endpoints: z.array(PublicEndpoint$inboundSchema), diff --git a/src/models/listguardrailsresponse.ts b/src/models/listguardrailsresponse.ts new file mode 100644 index 00000000..1600636f --- /dev/null +++ b/src/models/listguardrailsresponse.ts @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 281c3f73d27b + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { Guardrail, Guardrail$inboundSchema } from "./guardrail.js"; + +export type ListGuardrailsResponse = { + /** + * List of guardrails + */ + data: Array; + /** + * Total number of guardrails + */ + totalCount: number; +}; + +/** @internal */ +export const ListGuardrailsResponse$inboundSchema: z.ZodType< + ListGuardrailsResponse, + unknown +> = z.object({ + data: z.array(Guardrail$inboundSchema), + total_count: z.int(), +}).transform((v) => { + return remap$(v, { + "total_count": "totalCount", + }); +}); + +export function listGuardrailsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListGuardrailsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListGuardrailsResponse' from JSON`, + ); +} diff --git a/src/models/listkeyassignmentsresponse.ts b/src/models/listkeyassignmentsresponse.ts new file mode 100644 index 00000000..e7f6f8be --- /dev/null +++ b/src/models/listkeyassignmentsresponse.ts @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 6c14372c6290 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { KeyAssignment, KeyAssignment$inboundSchema } from "./keyassignment.js"; + +export type ListKeyAssignmentsResponse = { + /** + * List of key assignments + */ + data: Array; + /** + * Total number of key assignments for this guardrail + */ + totalCount: number; +}; + +/** @internal */ +export const ListKeyAssignmentsResponse$inboundSchema: z.ZodType< + ListKeyAssignmentsResponse, + unknown +> = z.object({ + data: z.array(KeyAssignment$inboundSchema), + total_count: z.int(), +}).transform((v) => { + return remap$(v, { + "total_count": "totalCount", + }); +}); + +export function listKeyAssignmentsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListKeyAssignmentsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListKeyAssignmentsResponse' from JSON`, + ); +} diff --git a/src/models/listmemberassignmentsresponse.ts b/src/models/listmemberassignmentsresponse.ts new file mode 100644 index 00000000..c6211224 --- /dev/null +++ b/src/models/listmemberassignmentsresponse.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: bbd89d5e9f3f + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + MemberAssignment, + MemberAssignment$inboundSchema, +} from "./memberassignment.js"; + +export type ListMemberAssignmentsResponse = { + /** + * List of member assignments + */ + data: Array; + /** + * Total number of member assignments + */ + totalCount: number; +}; + +/** @internal */ +export const ListMemberAssignmentsResponse$inboundSchema: z.ZodType< + ListMemberAssignmentsResponse, + unknown +> = z.object({ + data: z.array(MemberAssignment$inboundSchema), + total_count: z.int(), +}).transform((v) => { + return remap$(v, { + "total_count": "totalCount", + }); +}); + +export function listMemberAssignmentsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListMemberAssignmentsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListMemberAssignmentsResponse' from JSON`, + ); +} diff --git a/src/models/mcpservertool.ts b/src/models/mcpservertool.ts index 65d62229..448f9ecf 100644 --- a/src/models/mcpservertool.ts +++ b/src/models/mcpservertool.ts @@ -16,6 +16,8 @@ export type AllowedTools = { readOnly?: boolean | undefined; }; +export type AllowedToolsUnion = Array | AllowedTools | any; + export const ConnectorId = { ConnectorDropbox: "connector_dropbox", ConnectorGmail: "connector_gmail", @@ -51,17 +53,29 @@ export type RequireApproval = { always?: Always | undefined; }; +export type RequireApprovalUnion = + | RequireApproval + | RequireApprovalAlways + | RequireApprovalNever + | any; + /** * MCP (Model Context Protocol) tool configuration */ export type McpServerTool = { type: "mcp"; serverLabel: string; - allowedTools?: any | null | undefined; + allowedTools?: Array | AllowedTools | any | null | undefined; authorization?: string | undefined; connectorId?: ConnectorId | undefined; headers?: { [k: string]: string } | null | undefined; - requireApproval?: any | null | undefined; + requireApproval?: + | RequireApproval + | RequireApprovalAlways + | RequireApprovalNever + | any + | null + | undefined; serverDescription?: string | undefined; serverUrl?: string | undefined; }; @@ -110,6 +124,48 @@ export function allowedToolsFromJSON( ); } +/** @internal */ +export const AllowedToolsUnion$inboundSchema: z.ZodType< + AllowedToolsUnion, + unknown +> = z.union([ + z.array(z.string()), + z.lazy(() => AllowedTools$inboundSchema), + z.any(), +]); +/** @internal */ +export type AllowedToolsUnion$Outbound = + | Array + | AllowedTools$Outbound + | any; + +/** @internal */ +export const AllowedToolsUnion$outboundSchema: z.ZodType< + AllowedToolsUnion$Outbound, + AllowedToolsUnion +> = z.union([ + z.array(z.string()), + z.lazy(() => AllowedTools$outboundSchema), + z.any(), +]); + +export function allowedToolsUnionToJSON( + allowedToolsUnion: AllowedToolsUnion, +): string { + return JSON.stringify( + AllowedToolsUnion$outboundSchema.parse(allowedToolsUnion), + ); +} +export function allowedToolsUnionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AllowedToolsUnion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AllowedToolsUnion' from JSON`, + ); +} + /** @internal */ export const ConnectorId$inboundSchema: z.ZodType = openEnums.inboundSchema(ConnectorId); @@ -244,16 +300,74 @@ export function requireApprovalFromJSON( ); } +/** @internal */ +export const RequireApprovalUnion$inboundSchema: z.ZodType< + RequireApprovalUnion, + unknown +> = z.union([ + z.lazy(() => RequireApproval$inboundSchema), + RequireApprovalAlways$inboundSchema, + RequireApprovalNever$inboundSchema, + z.any(), +]); +/** @internal */ +export type RequireApprovalUnion$Outbound = + | RequireApproval$Outbound + | string + | string + | any; + +/** @internal */ +export const RequireApprovalUnion$outboundSchema: z.ZodType< + RequireApprovalUnion$Outbound, + RequireApprovalUnion +> = z.union([ + z.lazy(() => RequireApproval$outboundSchema), + RequireApprovalAlways$outboundSchema, + RequireApprovalNever$outboundSchema, + z.any(), +]); + +export function requireApprovalUnionToJSON( + requireApprovalUnion: RequireApprovalUnion, +): string { + return JSON.stringify( + RequireApprovalUnion$outboundSchema.parse(requireApprovalUnion), + ); +} +export function requireApprovalUnionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RequireApprovalUnion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RequireApprovalUnion' from JSON`, + ); +} + /** @internal */ export const McpServerTool$inboundSchema: z.ZodType = z .object({ type: z.literal("mcp"), server_label: z.string(), - allowed_tools: z.nullable(z.any()).optional(), + allowed_tools: z.nullable( + z.union([ + z.array(z.string()), + z.lazy(() => AllowedTools$inboundSchema), + z.any(), + ]), + ).optional(), authorization: z.string().optional(), connector_id: ConnectorId$inboundSchema.optional(), headers: z.nullable(z.record(z.string(), z.string())).optional(), - require_approval: z.nullable(z.any()).optional(), + require_approval: z.nullable( + z.union([ + z.lazy(() => RequireApproval$inboundSchema), + RequireApprovalAlways$inboundSchema, + RequireApprovalNever$inboundSchema, + z.any(), + ]), + ).optional(), server_description: z.string().optional(), server_url: z.string().optional(), }).transform((v) => { @@ -270,11 +384,22 @@ export const McpServerTool$inboundSchema: z.ZodType = z export type McpServerTool$Outbound = { type: "mcp"; server_label: string; - allowed_tools?: any | null | undefined; + allowed_tools?: + | Array + | AllowedTools$Outbound + | any + | null + | undefined; authorization?: string | undefined; connector_id?: string | undefined; headers?: { [k: string]: string } | null | undefined; - require_approval?: any | null | undefined; + require_approval?: + | RequireApproval$Outbound + | string + | string + | any + | null + | undefined; server_description?: string | undefined; server_url?: string | undefined; }; @@ -286,11 +411,24 @@ export const McpServerTool$outboundSchema: z.ZodType< > = z.object({ type: z.literal("mcp"), serverLabel: z.string(), - allowedTools: z.nullable(z.any()).optional(), + allowedTools: z.nullable( + z.union([ + z.array(z.string()), + z.lazy(() => AllowedTools$outboundSchema), + z.any(), + ]), + ).optional(), authorization: z.string().optional(), connectorId: ConnectorId$outboundSchema.optional(), headers: z.nullable(z.record(z.string(), z.string())).optional(), - requireApproval: z.nullable(z.any()).optional(), + requireApproval: z.nullable( + z.union([ + z.lazy(() => RequireApproval$outboundSchema), + RequireApprovalAlways$outboundSchema, + RequireApprovalNever$outboundSchema, + z.any(), + ]), + ).optional(), serverDescription: z.string().optional(), serverUrl: z.string().optional(), }).transform((v) => { diff --git a/src/models/memberassignment.ts b/src/models/memberassignment.ts new file mode 100644 index 00000000..4f354b8e --- /dev/null +++ b/src/models/memberassignment.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5e100b48823e + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type MemberAssignment = { + /** + * Unique identifier for the assignment + */ + id: string; + /** + * Clerk user ID of the assigned member + */ + userId: string; + /** + * Organization ID + */ + organizationId: string; + /** + * ID of the guardrail + */ + guardrailId: string; + /** + * User ID of who made the assignment + */ + assignedBy: string | null; + /** + * ISO 8601 timestamp of when the assignment was created + */ + createdAt: string; +}; + +/** @internal */ +export const MemberAssignment$inboundSchema: z.ZodType< + MemberAssignment, + unknown +> = z.object({ + id: z.string(), + user_id: z.string(), + organization_id: z.string(), + guardrail_id: z.string(), + assigned_by: z.nullable(z.string()), + created_at: z.string(), +}).transform((v) => { + return remap$(v, { + "user_id": "userId", + "organization_id": "organizationId", + "guardrail_id": "guardrailId", + "assigned_by": "assignedBy", + "created_at": "createdAt", + }); +}); + +export function memberAssignmentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MemberAssignment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MemberAssignment' from JSON`, + ); +} diff --git a/src/models/model.ts b/src/models/model.ts index 35c99ed0..4125ab3a 100644 --- a/src/models/model.ts +++ b/src/models/model.ts @@ -16,6 +16,7 @@ import { ModelArchitecture, ModelArchitecture$inboundSchema, } from "./modelarchitecture.js"; +import { ModelLinks, ModelLinks$inboundSchema } from "./modellinks.js"; import { Parameter, Parameter$inboundSchema } from "./parameter.js"; import { PerRequestLimits, @@ -62,7 +63,7 @@ export type Model = { /** * Maximum context length in tokens */ - contextLength: number | null; + contextLength: number; /** * Model architecture information */ @@ -91,6 +92,10 @@ export type Model = { * The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. */ expirationDate?: string | null | undefined; + /** + * Related API endpoints and resources for this model. + */ + links: ModelLinks; }; /** @internal */ @@ -99,10 +104,10 @@ export const Model$inboundSchema: z.ZodType = z.object({ canonical_slug: z.string(), hugging_face_id: z.nullable(z.string()).optional(), name: z.string(), - created: z.number(), + created: z.int(), description: z.string().optional(), pricing: PublicPricing$inboundSchema, - context_length: z.nullable(z.number()), + context_length: z.int(), architecture: ModelArchitecture$inboundSchema, top_provider: TopProviderInfo$inboundSchema, per_request_limits: z.nullable(PerRequestLimits$inboundSchema), @@ -110,6 +115,7 @@ export const Model$inboundSchema: z.ZodType = z.object({ default_parameters: z.nullable(DefaultParameters$inboundSchema), knowledge_cutoff: z.nullable(z.string()).optional(), expiration_date: z.nullable(z.string()).optional(), + links: ModelLinks$inboundSchema, }).transform((v) => { return remap$(v, { "canonical_slug": "canonicalSlug", diff --git a/src/models/modelgroup.ts b/src/models/modelgroup.ts index 9c40d281..c34631d3 100644 --- a/src/models/modelgroup.ts +++ b/src/models/modelgroup.ts @@ -17,6 +17,7 @@ export const ModelGroup = { Gpt: "GPT", Claude: "Claude", Gemini: "Gemini", + Gemma: "Gemma", Grok: "Grok", Cohere: "Cohere", Nova: "Nova", diff --git a/src/models/modellinks.ts b/src/models/modellinks.ts new file mode 100644 index 00000000..dd5fb557 --- /dev/null +++ b/src/models/modellinks.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 965b10bc40c4 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +/** + * Related API endpoints and resources for this model. + */ +export type ModelLinks = { + /** + * URL for the model details/endpoints API + */ + details: string; +}; + +/** @internal */ +export const ModelLinks$inboundSchema: z.ZodType = z + .object({ + details: z.string(), + }); + +export function modelLinksFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ModelLinks$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ModelLinks' from JSON`, + ); +} diff --git a/src/models/modelscountresponse.ts b/src/models/modelscountresponse.ts index 950a3f92..c511ac5b 100644 --- a/src/models/modelscountresponse.ts +++ b/src/models/modelscountresponse.ts @@ -30,7 +30,7 @@ export type ModelsCountResponse = { /** @internal */ export const Data$inboundSchema: z.ZodType = z.object({ - count: z.number(), + count: z.int(), }); export function dataFromJSON( diff --git a/src/models/moderationplugin.ts b/src/models/moderationplugin.ts new file mode 100644 index 00000000..276357bd --- /dev/null +++ b/src/models/moderationplugin.ts @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 309bb6cfc394 + */ + +import * as z from "zod/v4"; + +export type ModerationPlugin = { + id: "moderation"; +}; + +/** @internal */ +export type ModerationPlugin$Outbound = { + id: "moderation"; +}; + +/** @internal */ +export const ModerationPlugin$outboundSchema: z.ZodType< + ModerationPlugin$Outbound, + ModerationPlugin +> = z.object({ + id: z.literal("moderation"), +}); + +export function moderationPluginToJSON( + moderationPlugin: ModerationPlugin, +): string { + return JSON.stringify( + ModerationPlugin$outboundSchema.parse(moderationPlugin), + ); +} diff --git a/src/models/openairesponsefunctiontoolcall.ts b/src/models/openairesponsefunctiontoolcall.ts new file mode 100644 index 00000000..a7dc5bb1 --- /dev/null +++ b/src/models/openairesponsefunctiontoolcall.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d27a63e0fb93 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { ClosedEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolCallStatus, + ToolCallStatus$inboundSchema, +} from "./toolcallstatus.js"; + +export const OpenAIResponseFunctionToolCallType = { + FunctionCall: "function_call", +} as const; +export type OpenAIResponseFunctionToolCallType = ClosedEnum< + typeof OpenAIResponseFunctionToolCallType +>; + +export type OpenAIResponseFunctionToolCall = { + type: OpenAIResponseFunctionToolCallType; + callId: string; + name: string; + arguments: string; + id?: string | undefined; + status?: ToolCallStatus | undefined; +}; + +/** @internal */ +export const OpenAIResponseFunctionToolCallType$inboundSchema: z.ZodEnum< + typeof OpenAIResponseFunctionToolCallType +> = z.enum(OpenAIResponseFunctionToolCallType); + +/** @internal */ +export const OpenAIResponseFunctionToolCall$inboundSchema: z.ZodType< + OpenAIResponseFunctionToolCall, + unknown +> = z.object({ + type: OpenAIResponseFunctionToolCallType$inboundSchema, + call_id: z.string(), + name: z.string(), + arguments: z.string(), + id: z.string().optional(), + status: ToolCallStatus$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "call_id": "callId", + }); +}); + +export function openAIResponseFunctionToolCallFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenAIResponseFunctionToolCall$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenAIResponseFunctionToolCall' from JSON`, + ); +} diff --git a/src/models/openairesponsefunctiontoolcalloutput.ts b/src/models/openairesponsefunctiontoolcalloutput.ts new file mode 100644 index 00000000..8a32ba94 --- /dev/null +++ b/src/models/openairesponsefunctiontoolcalloutput.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 78c25d89c63e + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; +import * as openEnums from "../types/enums.js"; +import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { InputFile, InputFile$inboundSchema } from "./inputfile.js"; +import { InputImage, InputImage$inboundSchema } from "./inputimage.js"; +import { InputText, InputText$inboundSchema } from "./inputtext.js"; + +export const OpenAIResponseFunctionToolCallOutputType = { + FunctionCallOutput: "function_call_output", +} as const; +export type OpenAIResponseFunctionToolCallOutputType = ClosedEnum< + typeof OpenAIResponseFunctionToolCallOutputType +>; + +export type OpenAIResponseFunctionToolCallOutputOutput1 = + | InputText + | (InputImage & { type: "input_image" }) + | InputFile + | discriminatedUnionTypes.Unknown<"type">; + +export type OpenAIResponseFunctionToolCallOutputOutput2 = + | string + | Array< + | InputText + | (InputImage & { type: "input_image" }) + | InputFile + | discriminatedUnionTypes.Unknown<"type"> + >; + +export const OpenAIResponseFunctionToolCallOutputStatus = { + InProgress: "in_progress", + Completed: "completed", + Incomplete: "incomplete", +} as const; +export type OpenAIResponseFunctionToolCallOutputStatus = OpenEnum< + typeof OpenAIResponseFunctionToolCallOutputStatus +>; + +export type OpenAIResponseFunctionToolCallOutput = { + type: OpenAIResponseFunctionToolCallOutputType; + id?: string | null | undefined; + callId: string; + output: + | string + | Array< + | InputText + | (InputImage & { type: "input_image" }) + | InputFile + | discriminatedUnionTypes.Unknown<"type"> + >; + status?: OpenAIResponseFunctionToolCallOutputStatus | null | undefined; +}; + +/** @internal */ +export const OpenAIResponseFunctionToolCallOutputType$inboundSchema: z.ZodEnum< + typeof OpenAIResponseFunctionToolCallOutputType +> = z.enum(OpenAIResponseFunctionToolCallOutputType); + +/** @internal */ +export const OpenAIResponseFunctionToolCallOutputOutput1$inboundSchema: + z.ZodType = + discriminatedUnion("type", { + input_text: InputText$inboundSchema, + input_image: InputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + input_file: InputFile$inboundSchema, + }); + +export function openAIResponseFunctionToolCallOutputOutput1FromJSON( + jsonString: string, +): SafeParseResult< + OpenAIResponseFunctionToolCallOutputOutput1, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + OpenAIResponseFunctionToolCallOutputOutput1$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'OpenAIResponseFunctionToolCallOutputOutput1' from JSON`, + ); +} + +/** @internal */ +export const OpenAIResponseFunctionToolCallOutputOutput2$inboundSchema: + z.ZodType = z.union([ + z.string(), + z.array( + discriminatedUnion("type", { + input_text: InputText$inboundSchema, + input_image: InputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + input_file: InputFile$inboundSchema, + }), + ), + ]); + +export function openAIResponseFunctionToolCallOutputOutput2FromJSON( + jsonString: string, +): SafeParseResult< + OpenAIResponseFunctionToolCallOutputOutput2, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + OpenAIResponseFunctionToolCallOutputOutput2$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'OpenAIResponseFunctionToolCallOutputOutput2' from JSON`, + ); +} + +/** @internal */ +export const OpenAIResponseFunctionToolCallOutputStatus$inboundSchema: + z.ZodType = openEnums + .inboundSchema(OpenAIResponseFunctionToolCallOutputStatus); + +/** @internal */ +export const OpenAIResponseFunctionToolCallOutput$inboundSchema: z.ZodType< + OpenAIResponseFunctionToolCallOutput, + unknown +> = z.object({ + type: OpenAIResponseFunctionToolCallOutputType$inboundSchema, + id: z.nullable(z.string()).optional(), + call_id: z.string(), + output: z.union([ + z.string(), + z.array( + discriminatedUnion("type", { + input_text: InputText$inboundSchema, + input_image: InputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + input_file: InputFile$inboundSchema, + }), + ), + ]), + status: z.nullable(OpenAIResponseFunctionToolCallOutputStatus$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "call_id": "callId", + }); +}); + +export function openAIResponseFunctionToolCallOutputFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + OpenAIResponseFunctionToolCallOutput$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenAIResponseFunctionToolCallOutput' from JSON`, + ); +} diff --git a/src/models/openairesponseinputmessageitem.ts b/src/models/openairesponseinputmessageitem.ts new file mode 100644 index 00000000..bdd8605d --- /dev/null +++ b/src/models/openairesponseinputmessageitem.ts @@ -0,0 +1,175 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 67004da2ad5c + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; +import { ClosedEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { InputAudio, InputAudio$inboundSchema } from "./inputaudio.js"; +import { InputFile, InputFile$inboundSchema } from "./inputfile.js"; +import { InputImage, InputImage$inboundSchema } from "./inputimage.js"; +import { InputText, InputText$inboundSchema } from "./inputtext.js"; + +export const OpenAIResponseInputMessageItemType = { + Message: "message", +} as const; +export type OpenAIResponseInputMessageItemType = ClosedEnum< + typeof OpenAIResponseInputMessageItemType +>; + +export const OpenAIResponseInputMessageItemRoleDeveloper = { + Developer: "developer", +} as const; +export type OpenAIResponseInputMessageItemRoleDeveloper = ClosedEnum< + typeof OpenAIResponseInputMessageItemRoleDeveloper +>; + +export const OpenAIResponseInputMessageItemRoleSystem = { + System: "system", +} as const; +export type OpenAIResponseInputMessageItemRoleSystem = ClosedEnum< + typeof OpenAIResponseInputMessageItemRoleSystem +>; + +export const OpenAIResponseInputMessageItemRoleUser = { + User: "user", +} as const; +export type OpenAIResponseInputMessageItemRoleUser = ClosedEnum< + typeof OpenAIResponseInputMessageItemRoleUser +>; + +export type OpenAIResponseInputMessageItemRoleUnion = + | OpenAIResponseInputMessageItemRoleUser + | OpenAIResponseInputMessageItemRoleSystem + | OpenAIResponseInputMessageItemRoleDeveloper; + +export type OpenAIResponseInputMessageItemContent = + | InputText + | (InputImage & { type: "input_image" }) + | InputFile + | InputAudio + | discriminatedUnionTypes.Unknown<"type">; + +export type OpenAIResponseInputMessageItem = { + id: string; + type?: OpenAIResponseInputMessageItemType | undefined; + role: + | OpenAIResponseInputMessageItemRoleUser + | OpenAIResponseInputMessageItemRoleSystem + | OpenAIResponseInputMessageItemRoleDeveloper; + content: Array< + | InputText + | (InputImage & { type: "input_image" }) + | InputFile + | InputAudio + | discriminatedUnionTypes.Unknown<"type"> + >; +}; + +/** @internal */ +export const OpenAIResponseInputMessageItemType$inboundSchema: z.ZodEnum< + typeof OpenAIResponseInputMessageItemType +> = z.enum(OpenAIResponseInputMessageItemType); + +/** @internal */ +export const OpenAIResponseInputMessageItemRoleDeveloper$inboundSchema: + z.ZodEnum = z.enum( + OpenAIResponseInputMessageItemRoleDeveloper, + ); + +/** @internal */ +export const OpenAIResponseInputMessageItemRoleSystem$inboundSchema: z.ZodEnum< + typeof OpenAIResponseInputMessageItemRoleSystem +> = z.enum(OpenAIResponseInputMessageItemRoleSystem); + +/** @internal */ +export const OpenAIResponseInputMessageItemRoleUser$inboundSchema: z.ZodEnum< + typeof OpenAIResponseInputMessageItemRoleUser +> = z.enum(OpenAIResponseInputMessageItemRoleUser); + +/** @internal */ +export const OpenAIResponseInputMessageItemRoleUnion$inboundSchema: z.ZodType< + OpenAIResponseInputMessageItemRoleUnion, + unknown +> = z.union([ + OpenAIResponseInputMessageItemRoleUser$inboundSchema, + OpenAIResponseInputMessageItemRoleSystem$inboundSchema, + OpenAIResponseInputMessageItemRoleDeveloper$inboundSchema, +]); + +export function openAIResponseInputMessageItemRoleUnionFromJSON( + jsonString: string, +): SafeParseResult< + OpenAIResponseInputMessageItemRoleUnion, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + OpenAIResponseInputMessageItemRoleUnion$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'OpenAIResponseInputMessageItemRoleUnion' from JSON`, + ); +} + +/** @internal */ +export const OpenAIResponseInputMessageItemContent$inboundSchema: z.ZodType< + OpenAIResponseInputMessageItemContent, + unknown +> = discriminatedUnion("type", { + input_text: InputText$inboundSchema, + input_image: InputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + input_file: InputFile$inboundSchema, + input_audio: InputAudio$inboundSchema, +}); + +export function openAIResponseInputMessageItemContentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + OpenAIResponseInputMessageItemContent$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenAIResponseInputMessageItemContent' from JSON`, + ); +} + +/** @internal */ +export const OpenAIResponseInputMessageItem$inboundSchema: z.ZodType< + OpenAIResponseInputMessageItem, + unknown +> = z.object({ + id: z.string(), + type: OpenAIResponseInputMessageItemType$inboundSchema.optional(), + role: z.union([ + OpenAIResponseInputMessageItemRoleUser$inboundSchema, + OpenAIResponseInputMessageItemRoleSystem$inboundSchema, + OpenAIResponseInputMessageItemRoleDeveloper$inboundSchema, + ]), + content: z.array(discriminatedUnion("type", { + input_text: InputText$inboundSchema, + input_image: InputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + input_file: InputFile$inboundSchema, + input_audio: InputAudio$inboundSchema, + })), +}); + +export function openAIResponseInputMessageItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenAIResponseInputMessageItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenAIResponseInputMessageItem' from JSON`, + ); +} diff --git a/src/models/openairesponsesannotation.ts b/src/models/openairesponsesannotation.ts index c402006e..d213ed21 100644 --- a/src/models/openairesponsesannotation.ts +++ b/src/models/openairesponsesannotation.ts @@ -5,6 +5,8 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -26,17 +28,21 @@ import { URLCitation$outboundSchema, } from "./urlcitation.js"; -export type OpenAIResponsesAnnotation = FileCitation | URLCitation | FilePath; +export type OpenAIResponsesAnnotation = + | FileCitation + | URLCitation + | FilePath + | discriminatedUnionTypes.Unknown<"type">; /** @internal */ export const OpenAIResponsesAnnotation$inboundSchema: z.ZodType< OpenAIResponsesAnnotation, unknown -> = z.union([ - FileCitation$inboundSchema, - URLCitation$inboundSchema, - FilePath$inboundSchema, -]); +> = discriminatedUnion("type", { + file_citation: FileCitation$inboundSchema, + url_citation: URLCitation$inboundSchema, + file_path: FilePath$inboundSchema, +}); /** @internal */ export type OpenAIResponsesAnnotation$Outbound = | FileCitation$Outbound diff --git a/src/models/openairesponsestoolchoiceunion.ts b/src/models/openairesponsestoolchoiceunion.ts index f35263df..55ba976f 100644 --- a/src/models/openairesponsestoolchoiceunion.ts +++ b/src/models/openairesponsestoolchoiceunion.ts @@ -8,6 +8,12 @@ import { safeParse } from "../lib/schemas.js"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolChoiceAllowed, + ToolChoiceAllowed$inboundSchema, + ToolChoiceAllowed$Outbound, + ToolChoiceAllowed$outboundSchema, +} from "./toolchoiceallowed.js"; export const OpenAIResponsesToolChoiceTypeWebSearchPreview = { WebSearchPreview: "web_search_preview", @@ -67,6 +73,7 @@ export type OpenAIResponsesToolChoiceAuto = ClosedEnum< >; export type OpenAIResponsesToolChoiceUnion = + | ToolChoiceAllowed | OpenAIResponsesToolChoiceFunction | OpenAIResponsesToolChoice | OpenAIResponsesToolChoiceAuto @@ -245,6 +252,7 @@ export const OpenAIResponsesToolChoiceUnion$inboundSchema: z.ZodType< OpenAIResponsesToolChoiceUnion, unknown > = z.union([ + ToolChoiceAllowed$inboundSchema, z.lazy(() => OpenAIResponsesToolChoiceFunction$inboundSchema), z.lazy(() => OpenAIResponsesToolChoice$inboundSchema), OpenAIResponsesToolChoiceAuto$inboundSchema, @@ -253,6 +261,7 @@ export const OpenAIResponsesToolChoiceUnion$inboundSchema: z.ZodType< ]); /** @internal */ export type OpenAIResponsesToolChoiceUnion$Outbound = + | ToolChoiceAllowed$Outbound | OpenAIResponsesToolChoiceFunction$Outbound | OpenAIResponsesToolChoice$Outbound | string @@ -264,6 +273,7 @@ export const OpenAIResponsesToolChoiceUnion$outboundSchema: z.ZodType< OpenAIResponsesToolChoiceUnion$Outbound, OpenAIResponsesToolChoiceUnion > = z.union([ + ToolChoiceAllowed$outboundSchema, z.lazy(() => OpenAIResponsesToolChoiceFunction$outboundSchema), z.lazy(() => OpenAIResponsesToolChoice$outboundSchema), OpenAIResponsesToolChoiceAuto$outboundSchema, diff --git a/src/models/openresponsescreatedevent.ts b/src/models/openresponsescreatedevent.ts new file mode 100644 index 00000000..8275b45e --- /dev/null +++ b/src/models/openresponsescreatedevent.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e65287120d25 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + OpenResponsesResult, + OpenResponsesResult$inboundSchema, +} from "./openresponsesresult.js"; + +/** + * Event emitted when a response is created + */ +export type OpenResponsesCreatedEvent = { + type: "response.created"; + /** + * Complete non-streaming response from the Responses API + */ + response: OpenResponsesResult; + sequenceNumber: number; +}; + +/** @internal */ +export const OpenResponsesCreatedEvent$inboundSchema: z.ZodType< + OpenResponsesCreatedEvent, + unknown +> = z.object({ + type: z.literal("response.created"), + response: OpenResponsesResult$inboundSchema, + sequence_number: z.int(), +}).transform((v) => { + return remap$(v, { + "sequence_number": "sequenceNumber", + }); +}); + +export function openResponsesCreatedEventFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenResponsesCreatedEvent$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesCreatedEvent' from JSON`, + ); +} diff --git a/src/models/openresponsesinprogressevent.ts b/src/models/openresponsesinprogressevent.ts new file mode 100644 index 00000000..7a5a866d --- /dev/null +++ b/src/models/openresponsesinprogressevent.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 44b1a23df5d5 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + OpenResponsesResult, + OpenResponsesResult$inboundSchema, +} from "./openresponsesresult.js"; + +/** + * Event emitted when a response is in progress + */ +export type OpenResponsesInProgressEvent = { + type: "response.in_progress"; + /** + * Complete non-streaming response from the Responses API + */ + response: OpenResponsesResult; + sequenceNumber: number; +}; + +/** @internal */ +export const OpenResponsesInProgressEvent$inboundSchema: z.ZodType< + OpenResponsesInProgressEvent, + unknown +> = z.object({ + type: z.literal("response.in_progress"), + response: OpenResponsesResult$inboundSchema, + sequence_number: z.int(), +}).transform((v) => { + return remap$(v, { + "sequence_number": "sequenceNumber", + }); +}); + +export function openResponsesInProgressEventFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenResponsesInProgressEvent$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesInProgressEvent' from JSON`, + ); +} diff --git a/src/models/openresponsesresult.ts b/src/models/openresponsesresult.ts index f7a44e09..665b48f0 100644 --- a/src/models/openresponsesresult.ts +++ b/src/models/openresponsesresult.ts @@ -6,6 +6,8 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { @@ -81,10 +83,7 @@ import { StoredPromptTemplate$inboundSchema, } from "./storedprompttemplate.js"; import { TextConfig, TextConfig$inboundSchema } from "./textconfig.js"; -import { - TruncationEnum, - TruncationEnum$inboundSchema, -} from "./truncationenum.js"; +import { Truncation, Truncation$inboundSchema } from "./truncation.js"; import { Usage, Usage$inboundSchema } from "./usage.js"; import { WebSearchServerTool, @@ -123,7 +122,8 @@ export type OpenResponsesResultToolUnion = | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool - | CustomTool; + | CustomTool + | discriminatedUnionTypes.Unknown<"type">; /** * Complete non-streaming response from the Responses API @@ -134,7 +134,7 @@ export type OpenResponsesResult = { createdAt: number; model: string; status: OpenAIResponsesResponseStatus; - completedAt: number | null; + completedAt: number; output: Array; user?: string | null | undefined; outputText?: string | undefined; @@ -149,13 +149,13 @@ export type OpenResponsesResult = { * Token usage information for the response */ usage?: Usage | null | undefined; - maxToolCalls?: number | null | undefined; + maxToolCalls?: number | undefined; topLogprobs?: number | undefined; - maxOutputTokens?: number | null | undefined; - temperature: number | null; - topP: number | null; - presencePenalty: number | null; - frequencyPenalty: number | null; + maxOutputTokens?: number | undefined; + temperature: number; + topP: number; + presencePenalty: number; + frequencyPenalty: number; instructions: BaseInputsUnion | null; /** * Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. @@ -176,6 +176,7 @@ export type OpenResponsesResult = { | ShellServerTool | ApplyPatchServerTool | CustomTool + | discriminatedUnionTypes.Unknown<"type"> >; toolChoice: OpenAIResponsesToolChoiceUnion; parallelToolCalls: boolean; @@ -185,7 +186,7 @@ export type OpenResponsesResult = { reasoning?: BaseReasoningConfig | null | undefined; serviceTier?: string | null | undefined; store?: boolean | undefined; - truncation?: TruncationEnum | null | undefined; + truncation?: Truncation | null | undefined; /** * Text output configuration including format and verbosity */ @@ -223,22 +224,23 @@ export function openResponsesResultToolFunctionFromJSON( export const OpenResponsesResultToolUnion$inboundSchema: z.ZodType< OpenResponsesResultToolUnion, unknown -> = z.union([ - z.lazy(() => OpenResponsesResultToolFunction$inboundSchema), - PreviewWebSearchServerTool$inboundSchema, - Preview20250311WebSearchServerTool$inboundSchema, - LegacyWebSearchServerTool$inboundSchema, - WebSearchServerTool$inboundSchema, - FileSearchServerTool$inboundSchema, - ComputerUseServerTool$inboundSchema, - CodeInterpreterServerTool$inboundSchema, - McpServerTool$inboundSchema, - ImageGenerationServerTool$inboundSchema, - CodexLocalShellTool$inboundSchema, - ShellServerTool$inboundSchema, - ApplyPatchServerTool$inboundSchema, - CustomTool$inboundSchema, -]); +> = discriminatedUnion("type", { + function: z.lazy(() => OpenResponsesResultToolFunction$inboundSchema), + web_search_preview: PreviewWebSearchServerTool$inboundSchema, + web_search_preview_2025_03_11: + Preview20250311WebSearchServerTool$inboundSchema, + web_search: LegacyWebSearchServerTool$inboundSchema, + web_search_2025_08_26: WebSearchServerTool$inboundSchema, + file_search: FileSearchServerTool$inboundSchema, + computer_use_preview: ComputerUseServerTool$inboundSchema, + code_interpreter: CodeInterpreterServerTool$inboundSchema, + mcp: McpServerTool$inboundSchema, + image_generation: ImageGenerationServerTool$inboundSchema, + local_shell: CodexLocalShellTool$inboundSchema, + shell: ShellServerTool$inboundSchema, + apply_patch: ApplyPatchServerTool$inboundSchema, + custom: CustomTool$inboundSchema, +}); export function openResponsesResultToolUnionFromJSON( jsonString: string, @@ -257,10 +259,10 @@ export const OpenResponsesResult$inboundSchema: z.ZodType< > = z.object({ id: z.string(), object: OpenResponsesResultObject$inboundSchema, - created_at: z.number(), + created_at: z.int(), model: z.string(), status: OpenAIResponsesResponseStatus$inboundSchema, - completed_at: z.nullable(z.number()), + completed_at: z.int(), output: z.array(OutputItems$inboundSchema), user: z.nullable(z.string()).optional(), output_text: z.string().optional(), @@ -269,33 +271,32 @@ export const OpenResponsesResult$inboundSchema: z.ZodType< error: z.nullable(ResponsesErrorField$inboundSchema), incomplete_details: z.nullable(IncompleteDetails$inboundSchema), usage: z.nullable(Usage$inboundSchema).optional(), - max_tool_calls: z.nullable(z.number()).optional(), - top_logprobs: z.number().optional(), - max_output_tokens: z.nullable(z.number()).optional(), - temperature: z.nullable(z.number()), - top_p: z.nullable(z.number()), - presence_penalty: z.nullable(z.number()), - frequency_penalty: z.nullable(z.number()), + max_tool_calls: z.int().optional(), + top_logprobs: z.int().optional(), + max_output_tokens: z.int().optional(), + temperature: z.number(), + top_p: z.number(), + presence_penalty: z.number(), + frequency_penalty: z.number(), instructions: z.nullable(BaseInputsUnion$inboundSchema), metadata: z.nullable(z.record(z.string(), z.string())), - tools: z.array( - z.union([ - z.lazy(() => OpenResponsesResultToolFunction$inboundSchema), - PreviewWebSearchServerTool$inboundSchema, + tools: z.array(discriminatedUnion("type", { + function: z.lazy(() => OpenResponsesResultToolFunction$inboundSchema), + web_search_preview: PreviewWebSearchServerTool$inboundSchema, + web_search_preview_2025_03_11: Preview20250311WebSearchServerTool$inboundSchema, - LegacyWebSearchServerTool$inboundSchema, - WebSearchServerTool$inboundSchema, - FileSearchServerTool$inboundSchema, - ComputerUseServerTool$inboundSchema, - CodeInterpreterServerTool$inboundSchema, - McpServerTool$inboundSchema, - ImageGenerationServerTool$inboundSchema, - CodexLocalShellTool$inboundSchema, - ShellServerTool$inboundSchema, - ApplyPatchServerTool$inboundSchema, - CustomTool$inboundSchema, - ]), - ), + web_search: LegacyWebSearchServerTool$inboundSchema, + web_search_2025_08_26: WebSearchServerTool$inboundSchema, + file_search: FileSearchServerTool$inboundSchema, + computer_use_preview: ComputerUseServerTool$inboundSchema, + code_interpreter: CodeInterpreterServerTool$inboundSchema, + mcp: McpServerTool$inboundSchema, + image_generation: ImageGenerationServerTool$inboundSchema, + local_shell: CodexLocalShellTool$inboundSchema, + shell: ShellServerTool$inboundSchema, + apply_patch: ApplyPatchServerTool$inboundSchema, + custom: CustomTool$inboundSchema, + })), tool_choice: OpenAIResponsesToolChoiceUnion$inboundSchema, parallel_tool_calls: z.boolean(), prompt: z.nullable(StoredPromptTemplate$inboundSchema).optional(), @@ -304,7 +305,7 @@ export const OpenResponsesResult$inboundSchema: z.ZodType< reasoning: z.nullable(BaseReasoningConfig$inboundSchema).optional(), service_tier: z.nullable(z.string()).optional(), store: z.boolean().optional(), - truncation: z.nullable(TruncationEnum$inboundSchema).optional(), + truncation: z.nullable(Truncation$inboundSchema).optional(), text: TextConfig$inboundSchema.optional(), }).transform((v) => { return remap$(v, { diff --git a/src/models/openrouterwebsearchservertool.ts b/src/models/openrouterwebsearchservertool.ts new file mode 100644 index 00000000..75ab0dfa --- /dev/null +++ b/src/models/openrouterwebsearchservertool.ts @@ -0,0 +1,57 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4d50f36832ad + */ + +import * as z from "zod/v4"; +import { ClosedEnum } from "../types/enums.js"; +import { + WebSearchConfig, + WebSearchConfig$Outbound, + WebSearchConfig$outboundSchema, +} from "./websearchconfig.js"; + +export const OpenRouterWebSearchServerToolType = { + OpenrouterWebSearch: "openrouter:web_search", +} as const; +export type OpenRouterWebSearchServerToolType = ClosedEnum< + typeof OpenRouterWebSearchServerToolType +>; + +/** + * OpenRouter built-in server tool: searches the web for current information + */ +export type OpenRouterWebSearchServerTool = { + type: OpenRouterWebSearchServerToolType; + parameters?: WebSearchConfig | undefined; +}; + +/** @internal */ +export const OpenRouterWebSearchServerToolType$outboundSchema: z.ZodEnum< + typeof OpenRouterWebSearchServerToolType +> = z.enum(OpenRouterWebSearchServerToolType); + +/** @internal */ +export type OpenRouterWebSearchServerTool$Outbound = { + type: string; + parameters?: WebSearchConfig$Outbound | undefined; +}; + +/** @internal */ +export const OpenRouterWebSearchServerTool$outboundSchema: z.ZodType< + OpenRouterWebSearchServerTool$Outbound, + OpenRouterWebSearchServerTool +> = z.object({ + type: OpenRouterWebSearchServerToolType$outboundSchema, + parameters: WebSearchConfig$outboundSchema.optional(), +}); + +export function openRouterWebSearchServerToolToJSON( + openRouterWebSearchServerTool: OpenRouterWebSearchServerTool, +): string { + return JSON.stringify( + OpenRouterWebSearchServerTool$outboundSchema.parse( + openRouterWebSearchServerTool, + ), + ); +} diff --git a/src/models/operations/bulkassignkeystoguardrail.ts b/src/models/operations/bulkassignkeystoguardrail.ts index 30cd72ca..7175498f 100644 --- a/src/models/operations/bulkassignkeystoguardrail.ts +++ b/src/models/operations/bulkassignkeystoguardrail.ts @@ -5,9 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type BulkAssignKeysToGuardrailGlobals = { /** @@ -31,13 +29,6 @@ export type BulkAssignKeysToGuardrailGlobals = { appCategories?: string | undefined; }; -export type BulkAssignKeysToGuardrailRequestBody = { - /** - * Array of API key hashes to assign to the guardrail - */ - keyHashes: Array; -}; - export type BulkAssignKeysToGuardrailRequest = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. @@ -62,53 +53,16 @@ export type BulkAssignKeysToGuardrailRequest = { * The unique identifier of the guardrail */ id: string; - requestBody: BulkAssignKeysToGuardrailRequestBody; -}; - -/** - * Assignment result - */ -export type BulkAssignKeysToGuardrailResponse = { - /** - * Number of keys successfully assigned - */ - assignedCount: number; + bulkAssignKeysRequest: models.BulkAssignKeysRequest; }; -/** @internal */ -export type BulkAssignKeysToGuardrailRequestBody$Outbound = { - key_hashes: Array; -}; - -/** @internal */ -export const BulkAssignKeysToGuardrailRequestBody$outboundSchema: z.ZodType< - BulkAssignKeysToGuardrailRequestBody$Outbound, - BulkAssignKeysToGuardrailRequestBody -> = z.object({ - keyHashes: z.array(z.string()), -}).transform((v) => { - return remap$(v, { - keyHashes: "key_hashes", - }); -}); - -export function bulkAssignKeysToGuardrailRequestBodyToJSON( - bulkAssignKeysToGuardrailRequestBody: BulkAssignKeysToGuardrailRequestBody, -): string { - return JSON.stringify( - BulkAssignKeysToGuardrailRequestBody$outboundSchema.parse( - bulkAssignKeysToGuardrailRequestBody, - ), - ); -} - /** @internal */ export type BulkAssignKeysToGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; id: string; - RequestBody: BulkAssignKeysToGuardrailRequestBody$Outbound; + BulkAssignKeysRequest: models.BulkAssignKeysRequest$Outbound; }; /** @internal */ @@ -120,13 +74,11 @@ export const BulkAssignKeysToGuardrailRequest$outboundSchema: z.ZodType< appTitle: z.string().optional(), appCategories: z.string().optional(), id: z.string(), - requestBody: z.lazy(() => - BulkAssignKeysToGuardrailRequestBody$outboundSchema - ), + bulkAssignKeysRequest: models.BulkAssignKeysRequest$outboundSchema, }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - requestBody: "RequestBody", + bulkAssignKeysRequest: "BulkAssignKeysRequest", }); }); @@ -139,25 +91,3 @@ export function bulkAssignKeysToGuardrailRequestToJSON( ), ); } - -/** @internal */ -export const BulkAssignKeysToGuardrailResponse$inboundSchema: z.ZodType< - BulkAssignKeysToGuardrailResponse, - unknown -> = z.object({ - assigned_count: z.number(), -}).transform((v) => { - return remap$(v, { - "assigned_count": "assignedCount", - }); -}); - -export function bulkAssignKeysToGuardrailResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BulkAssignKeysToGuardrailResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BulkAssignKeysToGuardrailResponse' from JSON`, - ); -} diff --git a/src/models/operations/bulkassignmemberstoguardrail.ts b/src/models/operations/bulkassignmemberstoguardrail.ts index f79a061b..0dfdfa26 100644 --- a/src/models/operations/bulkassignmemberstoguardrail.ts +++ b/src/models/operations/bulkassignmemberstoguardrail.ts @@ -5,9 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type BulkAssignMembersToGuardrailGlobals = { /** @@ -31,13 +29,6 @@ export type BulkAssignMembersToGuardrailGlobals = { appCategories?: string | undefined; }; -export type BulkAssignMembersToGuardrailRequestBody = { - /** - * Array of member user IDs to assign to the guardrail - */ - memberUserIds: Array; -}; - export type BulkAssignMembersToGuardrailRequest = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. @@ -62,54 +53,16 @@ export type BulkAssignMembersToGuardrailRequest = { * The unique identifier of the guardrail */ id: string; - requestBody: BulkAssignMembersToGuardrailRequestBody; -}; - -/** - * Assignment result - */ -export type BulkAssignMembersToGuardrailResponse = { - /** - * Number of members successfully assigned - */ - assignedCount: number; + bulkAssignMembersRequest: models.BulkAssignMembersRequest; }; -/** @internal */ -export type BulkAssignMembersToGuardrailRequestBody$Outbound = { - member_user_ids: Array; -}; - -/** @internal */ -export const BulkAssignMembersToGuardrailRequestBody$outboundSchema: z.ZodType< - BulkAssignMembersToGuardrailRequestBody$Outbound, - BulkAssignMembersToGuardrailRequestBody -> = z.object({ - memberUserIds: z.array(z.string()), -}).transform((v) => { - return remap$(v, { - memberUserIds: "member_user_ids", - }); -}); - -export function bulkAssignMembersToGuardrailRequestBodyToJSON( - bulkAssignMembersToGuardrailRequestBody: - BulkAssignMembersToGuardrailRequestBody, -): string { - return JSON.stringify( - BulkAssignMembersToGuardrailRequestBody$outboundSchema.parse( - bulkAssignMembersToGuardrailRequestBody, - ), - ); -} - /** @internal */ export type BulkAssignMembersToGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; id: string; - RequestBody: BulkAssignMembersToGuardrailRequestBody$Outbound; + BulkAssignMembersRequest: models.BulkAssignMembersRequest$Outbound; }; /** @internal */ @@ -121,13 +74,11 @@ export const BulkAssignMembersToGuardrailRequest$outboundSchema: z.ZodType< appTitle: z.string().optional(), appCategories: z.string().optional(), id: z.string(), - requestBody: z.lazy(() => - BulkAssignMembersToGuardrailRequestBody$outboundSchema - ), + bulkAssignMembersRequest: models.BulkAssignMembersRequest$outboundSchema, }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - requestBody: "RequestBody", + bulkAssignMembersRequest: "BulkAssignMembersRequest", }); }); @@ -140,26 +91,3 @@ export function bulkAssignMembersToGuardrailRequestToJSON( ), ); } - -/** @internal */ -export const BulkAssignMembersToGuardrailResponse$inboundSchema: z.ZodType< - BulkAssignMembersToGuardrailResponse, - unknown -> = z.object({ - assigned_count: z.number(), -}).transform((v) => { - return remap$(v, { - "assigned_count": "assignedCount", - }); -}); - -export function bulkAssignMembersToGuardrailResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - BulkAssignMembersToGuardrailResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BulkAssignMembersToGuardrailResponse' from JSON`, - ); -} diff --git a/src/models/operations/bulkunassignkeysfromguardrail.ts b/src/models/operations/bulkunassignkeysfromguardrail.ts index ff7e659b..c591218b 100644 --- a/src/models/operations/bulkunassignkeysfromguardrail.ts +++ b/src/models/operations/bulkunassignkeysfromguardrail.ts @@ -5,9 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type BulkUnassignKeysFromGuardrailGlobals = { /** @@ -31,13 +29,6 @@ export type BulkUnassignKeysFromGuardrailGlobals = { appCategories?: string | undefined; }; -export type BulkUnassignKeysFromGuardrailRequestBody = { - /** - * Array of API key hashes to unassign from the guardrail - */ - keyHashes: Array; -}; - export type BulkUnassignKeysFromGuardrailRequest = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. @@ -62,54 +53,16 @@ export type BulkUnassignKeysFromGuardrailRequest = { * The unique identifier of the guardrail */ id: string; - requestBody: BulkUnassignKeysFromGuardrailRequestBody; -}; - -/** - * Unassignment result - */ -export type BulkUnassignKeysFromGuardrailResponse = { - /** - * Number of keys successfully unassigned - */ - unassignedCount: number; + bulkUnassignKeysRequest: models.BulkUnassignKeysRequest; }; -/** @internal */ -export type BulkUnassignKeysFromGuardrailRequestBody$Outbound = { - key_hashes: Array; -}; - -/** @internal */ -export const BulkUnassignKeysFromGuardrailRequestBody$outboundSchema: z.ZodType< - BulkUnassignKeysFromGuardrailRequestBody$Outbound, - BulkUnassignKeysFromGuardrailRequestBody -> = z.object({ - keyHashes: z.array(z.string()), -}).transform((v) => { - return remap$(v, { - keyHashes: "key_hashes", - }); -}); - -export function bulkUnassignKeysFromGuardrailRequestBodyToJSON( - bulkUnassignKeysFromGuardrailRequestBody: - BulkUnassignKeysFromGuardrailRequestBody, -): string { - return JSON.stringify( - BulkUnassignKeysFromGuardrailRequestBody$outboundSchema.parse( - bulkUnassignKeysFromGuardrailRequestBody, - ), - ); -} - /** @internal */ export type BulkUnassignKeysFromGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; id: string; - RequestBody: BulkUnassignKeysFromGuardrailRequestBody$Outbound; + BulkUnassignKeysRequest: models.BulkUnassignKeysRequest$Outbound; }; /** @internal */ @@ -121,13 +74,11 @@ export const BulkUnassignKeysFromGuardrailRequest$outboundSchema: z.ZodType< appTitle: z.string().optional(), appCategories: z.string().optional(), id: z.string(), - requestBody: z.lazy(() => - BulkUnassignKeysFromGuardrailRequestBody$outboundSchema - ), + bulkUnassignKeysRequest: models.BulkUnassignKeysRequest$outboundSchema, }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - requestBody: "RequestBody", + bulkUnassignKeysRequest: "BulkUnassignKeysRequest", }); }); @@ -140,26 +91,3 @@ export function bulkUnassignKeysFromGuardrailRequestToJSON( ), ); } - -/** @internal */ -export const BulkUnassignKeysFromGuardrailResponse$inboundSchema: z.ZodType< - BulkUnassignKeysFromGuardrailResponse, - unknown -> = z.object({ - unassigned_count: z.number(), -}).transform((v) => { - return remap$(v, { - "unassigned_count": "unassignedCount", - }); -}); - -export function bulkUnassignKeysFromGuardrailResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - BulkUnassignKeysFromGuardrailResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BulkUnassignKeysFromGuardrailResponse' from JSON`, - ); -} diff --git a/src/models/operations/bulkunassignmembersfromguardrail.ts b/src/models/operations/bulkunassignmembersfromguardrail.ts index 4533c1ff..de9f7c71 100644 --- a/src/models/operations/bulkunassignmembersfromguardrail.ts +++ b/src/models/operations/bulkunassignmembersfromguardrail.ts @@ -5,9 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type BulkUnassignMembersFromGuardrailGlobals = { /** @@ -31,13 +29,6 @@ export type BulkUnassignMembersFromGuardrailGlobals = { appCategories?: string | undefined; }; -export type BulkUnassignMembersFromGuardrailRequestBody = { - /** - * Array of member user IDs to unassign from the guardrail - */ - memberUserIds: Array; -}; - export type BulkUnassignMembersFromGuardrailRequest = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. @@ -62,55 +53,16 @@ export type BulkUnassignMembersFromGuardrailRequest = { * The unique identifier of the guardrail */ id: string; - requestBody: BulkUnassignMembersFromGuardrailRequestBody; -}; - -/** - * Unassignment result - */ -export type BulkUnassignMembersFromGuardrailResponse = { - /** - * Number of members successfully unassigned - */ - unassignedCount: number; -}; - -/** @internal */ -export type BulkUnassignMembersFromGuardrailRequestBody$Outbound = { - member_user_ids: Array; + bulkUnassignMembersRequest: models.BulkUnassignMembersRequest; }; -/** @internal */ -export const BulkUnassignMembersFromGuardrailRequestBody$outboundSchema: - z.ZodType< - BulkUnassignMembersFromGuardrailRequestBody$Outbound, - BulkUnassignMembersFromGuardrailRequestBody - > = z.object({ - memberUserIds: z.array(z.string()), - }).transform((v) => { - return remap$(v, { - memberUserIds: "member_user_ids", - }); - }); - -export function bulkUnassignMembersFromGuardrailRequestBodyToJSON( - bulkUnassignMembersFromGuardrailRequestBody: - BulkUnassignMembersFromGuardrailRequestBody, -): string { - return JSON.stringify( - BulkUnassignMembersFromGuardrailRequestBody$outboundSchema.parse( - bulkUnassignMembersFromGuardrailRequestBody, - ), - ); -} - /** @internal */ export type BulkUnassignMembersFromGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; id: string; - RequestBody: BulkUnassignMembersFromGuardrailRequestBody$Outbound; + BulkUnassignMembersRequest: models.BulkUnassignMembersRequest$Outbound; }; /** @internal */ @@ -122,13 +74,11 @@ export const BulkUnassignMembersFromGuardrailRequest$outboundSchema: z.ZodType< appTitle: z.string().optional(), appCategories: z.string().optional(), id: z.string(), - requestBody: z.lazy(() => - BulkUnassignMembersFromGuardrailRequestBody$outboundSchema - ), + bulkUnassignMembersRequest: models.BulkUnassignMembersRequest$outboundSchema, }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - requestBody: "RequestBody", + bulkUnassignMembersRequest: "BulkUnassignMembersRequest", }); }); @@ -142,31 +92,3 @@ export function bulkUnassignMembersFromGuardrailRequestToJSON( ), ); } - -/** @internal */ -export const BulkUnassignMembersFromGuardrailResponse$inboundSchema: z.ZodType< - BulkUnassignMembersFromGuardrailResponse, - unknown -> = z.object({ - unassigned_count: z.number(), -}).transform((v) => { - return remap$(v, { - "unassigned_count": "unassignedCount", - }); -}); - -export function bulkUnassignMembersFromGuardrailResponseFromJSON( - jsonString: string, -): SafeParseResult< - BulkUnassignMembersFromGuardrailResponse, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - BulkUnassignMembersFromGuardrailResponse$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'BulkUnassignMembersFromGuardrailResponse' from JSON`, - ); -} diff --git a/src/models/operations/createauthkeyscode.ts b/src/models/operations/createauthkeyscode.ts index 86a24a47..f6c782e1 100644 --- a/src/models/operations/createauthkeyscode.ts +++ b/src/models/operations/createauthkeyscode.ts @@ -235,7 +235,7 @@ export const CreateAuthKeysCodeData$inboundSchema: z.ZodType< unknown > = z.object({ id: z.string(), - app_id: z.number(), + app_id: z.int(), created_at: z.string(), }).transform((v) => { return remap$(v, { diff --git a/src/models/operations/createcoinbasecharge.ts b/src/models/operations/createcoinbasecharge.ts deleted file mode 100644 index a2a9035f..00000000 --- a/src/models/operations/createcoinbasecharge.ts +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 1e75ac2debf2 - */ - -import * as z from "zod/v4"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import * as models from "../index.js"; - -export type CreateCoinbaseChargeGlobals = { - /** - * The app identifier should be your app's URL and is used as the primary identifier for rankings. - * - * @remarks - * This is used to track API usage per application. - */ - httpReferer?: string | undefined; - /** - * The app display name allows you to customize how your app appears in OpenRouter's dashboard. - * - * @remarks - */ - appTitle?: string | undefined; - /** - * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. - * - * @remarks - */ - appCategories?: string | undefined; -}; - -export type CreateCoinbaseChargeSecurity = { - bearer: string; -}; - -export type CreateCoinbaseChargeRequest = { - /** - * The app identifier should be your app's URL and is used as the primary identifier for rankings. - * - * @remarks - * This is used to track API usage per application. - */ - httpReferer?: string | undefined; - /** - * The app display name allows you to customize how your app appears in OpenRouter's dashboard. - * - * @remarks - */ - appTitle?: string | undefined; - /** - * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. - * - * @remarks - */ - appCategories?: string | undefined; - createChargeRequest: models.CreateChargeRequest; -}; - -export type CallData = { - deadline: string; - feeAmount: string; - id: string; - operator: string; - prefix: string; - recipient: string; - recipientAmount: string; - recipientCurrency: string; - refundDestination: string; - signature: string; -}; - -export type Metadata = { - chainId: number; - contractAddress: string; - sender: string; -}; - -export type TransferIntent = { - callData: CallData; - metadata: Metadata; -}; - -export type Web3Data = { - transferIntent: TransferIntent; -}; - -export type CreateCoinbaseChargeData = { - id: string; - createdAt: string; - expiresAt: string; - web3Data: Web3Data; -}; - -/** - * Returns the calldata to fulfill the transaction - */ -export type CreateCoinbaseChargeResponse = { - data: CreateCoinbaseChargeData; -}; - -/** @internal */ -export type CreateCoinbaseChargeSecurity$Outbound = { - bearer: string; -}; - -/** @internal */ -export const CreateCoinbaseChargeSecurity$outboundSchema: z.ZodType< - CreateCoinbaseChargeSecurity$Outbound, - CreateCoinbaseChargeSecurity -> = z.object({ - bearer: z.string(), -}); - -export function createCoinbaseChargeSecurityToJSON( - createCoinbaseChargeSecurity: CreateCoinbaseChargeSecurity, -): string { - return JSON.stringify( - CreateCoinbaseChargeSecurity$outboundSchema.parse( - createCoinbaseChargeSecurity, - ), - ); -} - -/** @internal */ -export type CreateCoinbaseChargeRequest$Outbound = { - "HTTP-Referer"?: string | undefined; - appTitle?: string | undefined; - appCategories?: string | undefined; - CreateChargeRequest: models.CreateChargeRequest$Outbound; -}; - -/** @internal */ -export const CreateCoinbaseChargeRequest$outboundSchema: z.ZodType< - CreateCoinbaseChargeRequest$Outbound, - CreateCoinbaseChargeRequest -> = z.object({ - httpReferer: z.string().optional(), - appTitle: z.string().optional(), - appCategories: z.string().optional(), - createChargeRequest: models.CreateChargeRequest$outboundSchema, -}).transform((v) => { - return remap$(v, { - httpReferer: "HTTP-Referer", - createChargeRequest: "CreateChargeRequest", - }); -}); - -export function createCoinbaseChargeRequestToJSON( - createCoinbaseChargeRequest: CreateCoinbaseChargeRequest, -): string { - return JSON.stringify( - CreateCoinbaseChargeRequest$outboundSchema.parse( - createCoinbaseChargeRequest, - ), - ); -} - -/** @internal */ -export const CallData$inboundSchema: z.ZodType = z.object({ - deadline: z.string(), - fee_amount: z.string(), - id: z.string(), - operator: z.string(), - prefix: z.string(), - recipient: z.string(), - recipient_amount: z.string(), - recipient_currency: z.string(), - refund_destination: z.string(), - signature: z.string(), -}).transform((v) => { - return remap$(v, { - "fee_amount": "feeAmount", - "recipient_amount": "recipientAmount", - "recipient_currency": "recipientCurrency", - "refund_destination": "refundDestination", - }); -}); - -export function callDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CallData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CallData' from JSON`, - ); -} - -/** @internal */ -export const Metadata$inboundSchema: z.ZodType = z.object({ - chain_id: z.number(), - contract_address: z.string(), - sender: z.string(), -}).transform((v) => { - return remap$(v, { - "chain_id": "chainId", - "contract_address": "contractAddress", - }); -}); - -export function metadataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Metadata$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Metadata' from JSON`, - ); -} - -/** @internal */ -export const TransferIntent$inboundSchema: z.ZodType = - z.object({ - call_data: z.lazy(() => CallData$inboundSchema), - metadata: z.lazy(() => Metadata$inboundSchema), - }).transform((v) => { - return remap$(v, { - "call_data": "callData", - }); - }); - -export function transferIntentFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TransferIntent$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TransferIntent' from JSON`, - ); -} - -/** @internal */ -export const Web3Data$inboundSchema: z.ZodType = z.object({ - transfer_intent: z.lazy(() => TransferIntent$inboundSchema), -}).transform((v) => { - return remap$(v, { - "transfer_intent": "transferIntent", - }); -}); - -export function web3DataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Web3Data$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Web3Data' from JSON`, - ); -} - -/** @internal */ -export const CreateCoinbaseChargeData$inboundSchema: z.ZodType< - CreateCoinbaseChargeData, - unknown -> = z.object({ - id: z.string(), - created_at: z.string(), - expires_at: z.string(), - web3_data: z.lazy(() => Web3Data$inboundSchema), -}).transform((v) => { - return remap$(v, { - "created_at": "createdAt", - "expires_at": "expiresAt", - "web3_data": "web3Data", - }); -}); - -export function createCoinbaseChargeDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateCoinbaseChargeData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateCoinbaseChargeData' from JSON`, - ); -} - -/** @internal */ -export const CreateCoinbaseChargeResponse$inboundSchema: z.ZodType< - CreateCoinbaseChargeResponse, - unknown -> = z.object({ - data: z.lazy(() => CreateCoinbaseChargeData$inboundSchema), -}); - -export function createCoinbaseChargeResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateCoinbaseChargeResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateCoinbaseChargeResponse' from JSON`, - ); -} diff --git a/src/models/operations/createembeddings.ts b/src/models/operations/createembeddings.ts index 6664d9fe..e65e6571 100644 --- a/src/models/operations/createembeddings.ts +++ b/src/models/operations/createembeddings.ts @@ -54,6 +54,9 @@ export type Input = { content: Array; }; +/** + * Text, token, or multimodal input(s) to embed + */ export type InputUnion = | string | Array @@ -61,27 +64,51 @@ export type InputUnion = | Array> | Array; +/** + * The format of the output embeddings + */ export const EncodingFormat = { Float: "float", Base64: "base64", } as const; +/** + * The format of the output embeddings + */ export type EncodingFormat = OpenEnum; +/** + * Embeddings request input + */ export type CreateEmbeddingsRequestBody = { + /** + * Text, token, or multimodal input(s) to embed + */ input: | string | Array | Array | Array> | Array; + /** + * The model to use for embeddings + */ model: string; + /** + * The format of the output embeddings + */ encodingFormat?: EncodingFormat | undefined; + /** + * The number of dimensions for the output embeddings + */ dimensions?: number | undefined; + /** + * A unique identifier for the end-user + */ user?: string | undefined; + provider?: models.ProviderPreferences | null | undefined; /** - * Provider routing preferences for the request. + * The type of input (e.g. search_query, search_document) */ - provider?: models.ProviderPreferences | undefined; inputType?: string | undefined; }; @@ -118,29 +145,65 @@ export const ObjectEmbedding = { } as const; export type ObjectEmbedding = ClosedEnum; +/** + * Embedding vector as an array of floats or a base64 string + */ export type Embedding = Array | string; +/** + * A single embedding object + */ export type CreateEmbeddingsData = { object: ObjectEmbedding; + /** + * Embedding vector as an array of floats or a base64 string + */ embedding: Array | string; + /** + * Index of the embedding in the input list + */ index?: number | undefined; }; -export type Usage = { +/** + * Token usage statistics + */ +export type CreateEmbeddingsUsage = { + /** + * Number of tokens in the input + */ promptTokens: number; + /** + * Total number of tokens used + */ totalTokens: number; + /** + * Cost of the request in credits + */ cost?: number | undefined; }; /** - * Embedding response + * Embeddings response containing embedding vectors */ export type CreateEmbeddingsResponseBody = { + /** + * Unique identifier for the embeddings response + */ id?: string | undefined; object: ObjectT; + /** + * List of embedding objects + */ data: Array; + /** + * The model used for embeddings + */ model: string; - usage?: Usage | undefined; + /** + * Token usage statistics + */ + usage?: CreateEmbeddingsUsage | undefined; }; export type CreateEmbeddingsResponse = CreateEmbeddingsResponseBody | string; @@ -277,7 +340,7 @@ export type CreateEmbeddingsRequestBody$Outbound = { encoding_format?: string | undefined; dimensions?: number | undefined; user?: string | undefined; - provider?: models.ProviderPreferences$Outbound | undefined; + provider?: models.ProviderPreferences$Outbound | null | undefined; input_type?: string | undefined; }; @@ -297,7 +360,7 @@ export const CreateEmbeddingsRequestBody$outboundSchema: z.ZodType< encodingFormat: EncodingFormat$outboundSchema.optional(), dimensions: z.int().optional(), user: z.string().optional(), - provider: models.ProviderPreferences$outboundSchema.optional(), + provider: z.nullable(models.ProviderPreferences$outboundSchema).optional(), inputType: z.string().optional(), }).transform((v) => { return remap$(v, { @@ -378,7 +441,7 @@ export const CreateEmbeddingsData$inboundSchema: z.ZodType< > = z.object({ object: ObjectEmbedding$inboundSchema, embedding: z.union([z.array(z.number()), z.string()]), - index: z.number().optional(), + index: z.int().optional(), }); export function createEmbeddingsDataFromJSON( @@ -392,9 +455,12 @@ export function createEmbeddingsDataFromJSON( } /** @internal */ -export const Usage$inboundSchema: z.ZodType = z.object({ - prompt_tokens: z.number(), - total_tokens: z.number(), +export const CreateEmbeddingsUsage$inboundSchema: z.ZodType< + CreateEmbeddingsUsage, + unknown +> = z.object({ + prompt_tokens: z.int(), + total_tokens: z.int(), cost: z.number().optional(), }).transform((v) => { return remap$(v, { @@ -403,13 +469,13 @@ export const Usage$inboundSchema: z.ZodType = z.object({ }); }); -export function usageFromJSON( +export function createEmbeddingsUsageFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => Usage$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Usage' from JSON`, + (x) => CreateEmbeddingsUsage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateEmbeddingsUsage' from JSON`, ); } @@ -422,7 +488,7 @@ export const CreateEmbeddingsResponseBody$inboundSchema: z.ZodType< object: ObjectT$inboundSchema, data: z.array(z.lazy(() => CreateEmbeddingsData$inboundSchema)), model: z.string(), - usage: z.lazy(() => Usage$inboundSchema).optional(), + usage: z.lazy(() => CreateEmbeddingsUsage$inboundSchema).optional(), }); export function createEmbeddingsResponseBodyFromJSON( diff --git a/src/models/operations/createguardrail.ts b/src/models/operations/createguardrail.ts index 43a73411..2a170162 100644 --- a/src/models/operations/createguardrail.ts +++ b/src/models/operations/createguardrail.ts @@ -5,11 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import * as openEnums from "../../types/enums.js"; -import { OpenEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type CreateGuardrailGlobals = { /** @@ -33,56 +29,6 @@ export type CreateGuardrailGlobals = { appCategories?: string | undefined; }; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export const CreateGuardrailResetIntervalRequest = { - Daily: "daily", - Weekly: "weekly", - Monthly: "monthly", -} as const; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export type CreateGuardrailResetIntervalRequest = OpenEnum< - typeof CreateGuardrailResetIntervalRequest ->; - -export type CreateGuardrailRequestBody = { - /** - * Name for the new guardrail - */ - name: string; - /** - * Description of the guardrail - */ - description?: string | null | undefined; - /** - * Spending limit in USD - */ - limitUsd?: number | null | undefined; - /** - * Interval at which the limit resets (daily, weekly, monthly) - */ - resetInterval?: CreateGuardrailResetIntervalRequest | null | undefined; - /** - * List of allowed provider IDs - */ - allowedProviders?: Array | null | undefined; - /** - * List of provider IDs to exclude from routing - */ - ignoredProviders?: Array | null | undefined; - /** - * Array of model identifiers (slug or canonical_slug accepted) - */ - allowedModels?: Array | null | undefined; - /** - * Whether to enforce zero data retention - */ - enforceZdr?: boolean | null | undefined; -}; - export type CreateGuardrailRequest = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. @@ -103,141 +49,15 @@ export type CreateGuardrailRequest = { * @remarks */ appCategories?: string | undefined; - requestBody: CreateGuardrailRequestBody; -}; - -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export const CreateGuardrailResetIntervalResponse = { - Daily: "daily", - Weekly: "weekly", - Monthly: "monthly", -} as const; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export type CreateGuardrailResetIntervalResponse = OpenEnum< - typeof CreateGuardrailResetIntervalResponse ->; - -/** - * The created guardrail - */ -export type CreateGuardrailData = { - /** - * Unique identifier for the guardrail - */ - id: string; - /** - * Name of the guardrail - */ - name: string; - /** - * Description of the guardrail - */ - description?: string | null | undefined; - /** - * Spending limit in USD - */ - limitUsd?: number | null | undefined; - /** - * Interval at which the limit resets (daily, weekly, monthly) - */ - resetInterval?: CreateGuardrailResetIntervalResponse | null | undefined; - /** - * List of allowed provider IDs - */ - allowedProviders?: Array | null | undefined; - /** - * List of provider IDs to exclude from routing - */ - ignoredProviders?: Array | null | undefined; - /** - * Array of model canonical_slugs (immutable identifiers) - */ - allowedModels?: Array | null | undefined; - /** - * Whether to enforce zero data retention - */ - enforceZdr?: boolean | null | undefined; - /** - * ISO 8601 timestamp of when the guardrail was created - */ - createdAt: string; - /** - * ISO 8601 timestamp of when the guardrail was last updated - */ - updatedAt?: string | null | undefined; -}; - -/** - * Guardrail created successfully - */ -export type CreateGuardrailResponse = { - /** - * The created guardrail - */ - data: CreateGuardrailData; + createGuardrailRequest: models.CreateGuardrailRequest; }; -/** @internal */ -export const CreateGuardrailResetIntervalRequest$outboundSchema: z.ZodType< - string, - CreateGuardrailResetIntervalRequest -> = openEnums.outboundSchema(CreateGuardrailResetIntervalRequest); - -/** @internal */ -export type CreateGuardrailRequestBody$Outbound = { - name: string; - description?: string | null | undefined; - limit_usd?: number | null | undefined; - reset_interval?: string | null | undefined; - allowed_providers?: Array | null | undefined; - ignored_providers?: Array | null | undefined; - allowed_models?: Array | null | undefined; - enforce_zdr?: boolean | null | undefined; -}; - -/** @internal */ -export const CreateGuardrailRequestBody$outboundSchema: z.ZodType< - CreateGuardrailRequestBody$Outbound, - CreateGuardrailRequestBody -> = z.object({ - name: z.string(), - description: z.nullable(z.string()).optional(), - limitUsd: z.nullable(z.number()).optional(), - resetInterval: z.nullable(CreateGuardrailResetIntervalRequest$outboundSchema) - .optional(), - allowedProviders: z.nullable(z.array(z.string())).optional(), - ignoredProviders: z.nullable(z.array(z.string())).optional(), - allowedModels: z.nullable(z.array(z.string())).optional(), - enforceZdr: z.nullable(z.boolean()).optional(), -}).transform((v) => { - return remap$(v, { - limitUsd: "limit_usd", - resetInterval: "reset_interval", - allowedProviders: "allowed_providers", - ignoredProviders: "ignored_providers", - allowedModels: "allowed_models", - enforceZdr: "enforce_zdr", - }); -}); - -export function createGuardrailRequestBodyToJSON( - createGuardrailRequestBody: CreateGuardrailRequestBody, -): string { - return JSON.stringify( - CreateGuardrailRequestBody$outboundSchema.parse(createGuardrailRequestBody), - ); -} - /** @internal */ export type CreateGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; - RequestBody: CreateGuardrailRequestBody$Outbound; + CreateGuardrailRequest: models.CreateGuardrailRequest$Outbound; }; /** @internal */ @@ -248,11 +68,11 @@ export const CreateGuardrailRequest$outboundSchema: z.ZodType< httpReferer: z.string().optional(), appTitle: z.string().optional(), appCategories: z.string().optional(), - requestBody: z.lazy(() => CreateGuardrailRequestBody$outboundSchema), + createGuardrailRequest: models.CreateGuardrailRequest$outboundSchema, }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - requestBody: "RequestBody", + createGuardrailRequest: "CreateGuardrailRequest", }); }); @@ -263,67 +83,3 @@ export function createGuardrailRequestToJSON( CreateGuardrailRequest$outboundSchema.parse(createGuardrailRequest), ); } - -/** @internal */ -export const CreateGuardrailResetIntervalResponse$inboundSchema: z.ZodType< - CreateGuardrailResetIntervalResponse, - unknown -> = openEnums.inboundSchema(CreateGuardrailResetIntervalResponse); - -/** @internal */ -export const CreateGuardrailData$inboundSchema: z.ZodType< - CreateGuardrailData, - unknown -> = z.object({ - id: z.string(), - name: z.string(), - description: z.nullable(z.string()).optional(), - limit_usd: z.nullable(z.number()).optional(), - reset_interval: z.nullable(CreateGuardrailResetIntervalResponse$inboundSchema) - .optional(), - allowed_providers: z.nullable(z.array(z.string())).optional(), - ignored_providers: z.nullable(z.array(z.string())).optional(), - allowed_models: z.nullable(z.array(z.string())).optional(), - enforce_zdr: z.nullable(z.boolean()).optional(), - created_at: z.string(), - updated_at: z.nullable(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - "limit_usd": "limitUsd", - "reset_interval": "resetInterval", - "allowed_providers": "allowedProviders", - "ignored_providers": "ignoredProviders", - "allowed_models": "allowedModels", - "enforce_zdr": "enforceZdr", - "created_at": "createdAt", - "updated_at": "updatedAt", - }); -}); - -export function createGuardrailDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateGuardrailData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateGuardrailData' from JSON`, - ); -} - -/** @internal */ -export const CreateGuardrailResponse$inboundSchema: z.ZodType< - CreateGuardrailResponse, - unknown -> = z.object({ - data: z.lazy(() => CreateGuardrailData$inboundSchema), -}); - -export function createGuardrailResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateGuardrailResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateGuardrailResponse' from JSON`, - ); -} diff --git a/src/models/operations/createkeys.ts b/src/models/operations/createkeys.ts index c9a39606..0bb9476b 100644 --- a/src/models/operations/createkeys.ts +++ b/src/models/operations/createkeys.ts @@ -54,7 +54,7 @@ export type CreateKeysRequestBody = { /** * Optional spending limit for the API key in USD */ - limit?: number | null | undefined; + limit?: number | undefined; /** * Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. */ @@ -67,6 +67,10 @@ export type CreateKeysRequestBody = { * Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected */ expiresAt?: Date | null | undefined; + /** + * Optional user ID of the key creator. Only meaningful for organization-owned keys where a specific member is creating the key. + */ + creatorUserId?: string | null | undefined; }; export type CreateKeysRequest = { @@ -115,11 +119,11 @@ export type CreateKeysData = { /** * Spending limit for the API key in USD */ - limit: number | null; + limit: number; /** * Remaining spending limit in USD */ - limitRemaining: number | null; + limitRemaining: number; /** * Type of limit reset for the API key */ @@ -201,10 +205,11 @@ export const CreateKeysLimitReset$outboundSchema: z.ZodType< /** @internal */ export type CreateKeysRequestBody$Outbound = { name: string; - limit?: number | null | undefined; + limit?: number | undefined; limit_reset?: string | null | undefined; include_byok_in_limit?: boolean | undefined; expires_at?: string | null | undefined; + creator_user_id?: string | null | undefined; }; /** @internal */ @@ -213,15 +218,17 @@ export const CreateKeysRequestBody$outboundSchema: z.ZodType< CreateKeysRequestBody > = z.object({ name: z.string(), - limit: z.nullable(z.number()).optional(), + limit: z.number().optional(), limitReset: z.nullable(CreateKeysLimitReset$outboundSchema).optional(), includeByokInLimit: z.boolean().optional(), expiresAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + creatorUserId: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { limitReset: "limit_reset", includeByokInLimit: "include_byok_in_limit", expiresAt: "expires_at", + creatorUserId: "creator_user_id", }); }); @@ -272,8 +279,8 @@ export const CreateKeysData$inboundSchema: z.ZodType = name: z.string(), label: z.string(), disabled: z.boolean(), - limit: z.nullable(z.number()), - limit_remaining: z.nullable(z.number()), + limit: z.number(), + limit_remaining: z.number(), limit_reset: z.nullable(z.string()), include_byok_in_limit: z.boolean(), usage: z.number(), diff --git a/src/models/operations/creatererank.ts b/src/models/operations/creatererank.ts new file mode 100644 index 00000000..e690af47 --- /dev/null +++ b/src/models/operations/creatererank.ts @@ -0,0 +1,317 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e1de55b94363 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type CreateRerankGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +/** + * Rerank request input + */ +export type CreateRerankRequestBody = { + /** + * The rerank model to use + */ + model: string; + /** + * The search query to rerank documents against + */ + query: string; + /** + * The list of documents to rerank + */ + documents: Array; + /** + * Number of most relevant documents to return + */ + topN?: number | undefined; + provider?: models.ProviderPreferences | null | undefined; +}; + +export type CreateRerankRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + requestBody: CreateRerankRequestBody; +}; + +/** + * The document object containing the original text + */ +export type Document = { + /** + * The document text + */ + text: string; +}; + +/** + * A single rerank result + */ +export type Result = { + /** + * Index of the document in the original input list + */ + index: number; + /** + * Relevance score of the document to the query + */ + relevanceScore: number; + /** + * The document object containing the original text + */ + document: Document; +}; + +/** + * Usage statistics + */ +export type CreateRerankUsage = { + /** + * Total number of tokens used + */ + totalTokens?: number | undefined; + /** + * Number of search units consumed (Cohere billing) + */ + searchUnits?: number | undefined; + /** + * Cost of the request in credits + */ + cost?: number | undefined; +}; + +/** + * Rerank response containing ranked results + */ +export type CreateRerankResponseBody = { + /** + * Unique identifier for the rerank response (ORID format) + */ + id?: string | undefined; + /** + * The model used for reranking + */ + model: string; + /** + * The provider that served the rerank request + */ + provider?: string | undefined; + /** + * List of rerank results sorted by relevance + */ + results: Array; + /** + * Usage statistics + */ + usage?: CreateRerankUsage | undefined; +}; + +export type CreateRerankResponse = CreateRerankResponseBody | string; + +/** @internal */ +export type CreateRerankRequestBody$Outbound = { + model: string; + query: string; + documents: Array; + top_n?: number | undefined; + provider?: models.ProviderPreferences$Outbound | null | undefined; +}; + +/** @internal */ +export const CreateRerankRequestBody$outboundSchema: z.ZodType< + CreateRerankRequestBody$Outbound, + CreateRerankRequestBody +> = z.object({ + model: z.string(), + query: z.string(), + documents: z.array(z.string()), + topN: z.int().optional(), + provider: z.nullable(models.ProviderPreferences$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + topN: "top_n", + }); +}); + +export function createRerankRequestBodyToJSON( + createRerankRequestBody: CreateRerankRequestBody, +): string { + return JSON.stringify( + CreateRerankRequestBody$outboundSchema.parse(createRerankRequestBody), + ); +} + +/** @internal */ +export type CreateRerankRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + RequestBody: CreateRerankRequestBody$Outbound; +}; + +/** @internal */ +export const CreateRerankRequest$outboundSchema: z.ZodType< + CreateRerankRequest$Outbound, + CreateRerankRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + requestBody: z.lazy(() => CreateRerankRequestBody$outboundSchema), +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + requestBody: "RequestBody", + }); +}); + +export function createRerankRequestToJSON( + createRerankRequest: CreateRerankRequest, +): string { + return JSON.stringify( + CreateRerankRequest$outboundSchema.parse(createRerankRequest), + ); +} + +/** @internal */ +export const Document$inboundSchema: z.ZodType = z.object({ + text: z.string(), +}); + +export function documentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Document$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Document' from JSON`, + ); +} + +/** @internal */ +export const Result$inboundSchema: z.ZodType = z.object({ + index: z.int(), + relevance_score: z.number(), + document: z.lazy(() => Document$inboundSchema), +}).transform((v) => { + return remap$(v, { + "relevance_score": "relevanceScore", + }); +}); + +export function resultFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Result$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Result' from JSON`, + ); +} + +/** @internal */ +export const CreateRerankUsage$inboundSchema: z.ZodType< + CreateRerankUsage, + unknown +> = z.object({ + total_tokens: z.int().optional(), + search_units: z.int().optional(), + cost: z.number().optional(), +}).transform((v) => { + return remap$(v, { + "total_tokens": "totalTokens", + "search_units": "searchUnits", + }); +}); + +export function createRerankUsageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateRerankUsage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateRerankUsage' from JSON`, + ); +} + +/** @internal */ +export const CreateRerankResponseBody$inboundSchema: z.ZodType< + CreateRerankResponseBody, + unknown +> = z.object({ + id: z.string().optional(), + model: z.string(), + provider: z.string().optional(), + results: z.array(z.lazy(() => Result$inboundSchema)), + usage: z.lazy(() => CreateRerankUsage$inboundSchema).optional(), +}); + +export function createRerankResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateRerankResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateRerankResponseBody' from JSON`, + ); +} + +/** @internal */ +export const CreateRerankResponse$inboundSchema: z.ZodType< + CreateRerankResponse, + unknown +> = z.union([z.lazy(() => CreateRerankResponseBody$inboundSchema), z.string()]); + +export function createRerankResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateRerankResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateRerankResponse' from JSON`, + ); +} diff --git a/src/models/operations/deleteguardrail.ts b/src/models/operations/deleteguardrail.ts index 8bd95167..9f9996b3 100644 --- a/src/models/operations/deleteguardrail.ts +++ b/src/models/operations/deleteguardrail.ts @@ -5,9 +5,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type DeleteGuardrailGlobals = { /** @@ -57,16 +54,6 @@ export type DeleteGuardrailRequest = { id: string; }; -/** - * Guardrail deleted successfully - */ -export type DeleteGuardrailResponse = { - /** - * Confirmation that the guardrail was deleted - */ - deleted: true; -}; - /** @internal */ export type DeleteGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; @@ -97,21 +84,3 @@ export function deleteGuardrailRequestToJSON( DeleteGuardrailRequest$outboundSchema.parse(deleteGuardrailRequest), ); } - -/** @internal */ -export const DeleteGuardrailResponse$inboundSchema: z.ZodType< - DeleteGuardrailResponse, - unknown -> = z.object({ - deleted: z.literal(true), -}); - -export function deleteGuardrailResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeleteGuardrailResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteGuardrailResponse' from JSON`, - ); -} diff --git a/src/models/operations/getcurrentkey.ts b/src/models/operations/getcurrentkey.ts index 6a491a29..67d5a37c 100644 --- a/src/models/operations/getcurrentkey.ts +++ b/src/models/operations/getcurrentkey.ts @@ -84,7 +84,7 @@ export type GetCurrentKeyData = { /** * Spending limit for the API key in USD */ - limit: number | null; + limit: number; /** * Total OpenRouter credit usage (in USD) for the API key */ @@ -134,7 +134,7 @@ export type GetCurrentKeyData = { /** * Remaining spending limit in USD */ - limitRemaining: number | null; + limitRemaining: number; /** * Type of limit reset for the API key */ @@ -200,7 +200,7 @@ export function getCurrentKeyRequestToJSON( /** @internal */ export const RateLimit$inboundSchema: z.ZodType = z.object({ - requests: z.number(), + requests: z.int(), interval: z.string(), note: z.string(), }); @@ -221,7 +221,7 @@ export const GetCurrentKeyData$inboundSchema: z.ZodType< unknown > = z.object({ label: z.string(), - limit: z.nullable(z.number()), + limit: z.number(), usage: z.number(), usage_daily: z.number(), usage_weekly: z.number(), @@ -233,7 +233,7 @@ export const GetCurrentKeyData$inboundSchema: z.ZodType< is_free_tier: z.boolean(), is_management_key: z.boolean(), is_provisioning_key: z.boolean(), - limit_remaining: z.nullable(z.number()), + limit_remaining: z.number(), limit_reset: z.nullable(z.string()), include_byok_in_limit: z.boolean(), expires_at: z.nullable( diff --git a/src/models/operations/getgeneration.ts b/src/models/operations/getgeneration.ts index 3e8e3684..fd9ed3db 100644 --- a/src/models/operations/getgeneration.ts +++ b/src/models/operations/getgeneration.ts @@ -10,6 +10,7 @@ import * as openEnums from "../../types/enums.js"; import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type GetGenerationGlobals = { /** @@ -53,6 +54,9 @@ export type GetGenerationRequest = { * @remarks */ appCategories?: string | undefined; + /** + * The generation ID + */ id: string; }; @@ -62,6 +66,7 @@ export type GetGenerationRequest = { export const ApiType = { Completions: "completions", Embeddings: "embeddings", + Rerank: "rerank", Video: "video", } as const; /** @@ -69,124 +74,6 @@ export const ApiType = { */ export type ApiType = OpenEnum; -export const ProviderName = { - AnyScale: "AnyScale", - Atoma: "Atoma", - CentML: "Cent-ML", - CrofAI: "CrofAI", - Enfer: "Enfer", - GoPomelo: "GoPomelo", - HuggingFace: "HuggingFace", - Hyperbolic2: "Hyperbolic 2", - InoCloud: "InoCloud", - Kluster: "Kluster", - Lambda: "Lambda", - Lepton: "Lepton", - Lynn2: "Lynn 2", - Lynn: "Lynn", - Mancer: "Mancer", - Meta: "Meta", - Modal: "Modal", - Nineteen: "Nineteen", - OctoAI: "OctoAI", - Recursal: "Recursal", - Reflection: "Reflection", - Replicate: "Replicate", - SambaNova2: "SambaNova 2", - SFCompute: "SF Compute", - Targon: "Targon", - Together2: "Together 2", - Ubicloud: "Ubicloud", - OneDotAI: "01.AI", - AkashML: "AkashML", - Ai21: "AI21", - AionLabs: "AionLabs", - Alibaba: "Alibaba", - Ambient: "Ambient", - AmazonBedrock: "Amazon Bedrock", - AmazonNova: "Amazon Nova", - Anthropic: "Anthropic", - ArceeAI: "Arcee AI", - AtlasCloud: "AtlasCloud", - Avian: "Avian", - Azure: "Azure", - BaseTen: "BaseTen", - BytePlus: "BytePlus", - BlackForestLabs: "Black Forest Labs", - Cerebras: "Cerebras", - Chutes: "Chutes", - Cirrascale: "Cirrascale", - Clarifai: "Clarifai", - Cloudflare: "Cloudflare", - Cohere: "Cohere", - Crusoe: "Crusoe", - DeepInfra: "DeepInfra", - DeepSeek: "DeepSeek", - Featherless: "Featherless", - Fireworks: "Fireworks", - Friendli: "Friendli", - GMICloud: "GMICloud", - Google: "Google", - GoogleAIStudio: "Google AI Studio", - Groq: "Groq", - Hyperbolic: "Hyperbolic", - Inception: "Inception", - Inceptron: "Inceptron", - InferenceNet: "InferenceNet", - Ionstream: "Ionstream", - Infermatic: "Infermatic", - IoNet: "Io Net", - Inflection: "Inflection", - Liquid: "Liquid", - Mara: "Mara", - Mancer2: "Mancer 2", - Minimax: "Minimax", - ModelRun: "ModelRun", - Mistral: "Mistral", - Modular: "Modular", - MoonshotAI: "Moonshot AI", - Morph: "Morph", - NCompass: "NCompass", - Nebius: "Nebius", - NextBit: "NextBit", - Novita: "Novita", - Nvidia: "Nvidia", - OpenAI: "OpenAI", - OpenInference: "OpenInference", - Parasail: "Parasail", - Perplexity: "Perplexity", - Phala: "Phala", - Reka: "Reka", - Relace: "Relace", - SambaNova: "SambaNova", - Seed: "Seed", - SiliconFlow: "SiliconFlow", - Sourceful: "Sourceful", - StepFun: "StepFun", - Stealth: "Stealth", - StreamLake: "StreamLake", - Switchpoint: "Switchpoint", - Together: "Together", - Upstage: "Upstage", - Venice: "Venice", - WandB: "WandB", - Xiaomi: "Xiaomi", - XAI: "xAI", - ZAi: "Z.AI", - FakeProvider: "FakeProvider", -} as const; -export type ProviderName = OpenEnum; - -export type ProviderResponse = { - id?: string | undefined; - endpointId?: string | undefined; - modelPermaslug?: string | undefined; - providerName?: ProviderName | undefined; - status: number | null; - latency?: number | undefined; - isByok?: boolean | undefined; -}; - /** * Generation data */ @@ -206,11 +93,11 @@ export type GetGenerationData = { /** * Discount applied due to caching */ - cacheDiscount: number | null; + cacheDiscount: number; /** * Cost charged by the upstream provider */ - upstreamInferenceCost: number | null; + upstreamInferenceCost: number; /** * ISO 8601 timestamp of when the generation was created */ @@ -222,7 +109,7 @@ export type GetGenerationData = { /** * ID of the app that made the request */ - appId: number | null; + appId: number; /** * Whether the response was streamed */ @@ -238,15 +125,15 @@ export type GetGenerationData = { /** * Total latency in milliseconds */ - latency: number | null; + latency: number; /** * Moderation latency in milliseconds */ - moderationLatency: number | null; + moderationLatency: number; /** * Time taken for generation in milliseconds */ - generationTime: number | null; + generationTime: number; /** * Reason the generation finished */ @@ -254,47 +141,47 @@ export type GetGenerationData = { /** * Number of tokens in the prompt */ - tokensPrompt: number | null; + tokensPrompt: number; /** * Number of tokens in the completion */ - tokensCompletion: number | null; + tokensCompletion: number; /** * Native prompt tokens as reported by provider */ - nativeTokensPrompt: number | null; + nativeTokensPrompt: number; /** * Native completion tokens as reported by provider */ - nativeTokensCompletion: number | null; + nativeTokensCompletion: number; /** * Native completion image tokens as reported by provider */ - nativeTokensCompletionImages: number | null; + nativeTokensCompletionImages: number; /** * Native reasoning tokens as reported by provider */ - nativeTokensReasoning: number | null; + nativeTokensReasoning: number; /** * Native cached tokens as reported by provider */ - nativeTokensCached: number | null; + nativeTokensCached: number; /** * Number of media items in the prompt */ - numMediaPrompt: number | null; + numMediaPrompt: number; /** * Number of audio inputs in the prompt */ - numInputAudioPrompt: number | null; + numInputAudioPrompt: number; /** * Number of media items in the completion */ - numMediaCompletion: number | null; + numMediaCompletion: number; /** * Number of search results included */ - numSearchResults: number | null; + numSearchResults: number; /** * Origin URL of the request */ @@ -326,7 +213,7 @@ export type GetGenerationData = { /** * List of provider responses for this generation, including fallback attempts */ - providerResponses: Array | null; + providerResponses: Array | null; /** * User-Agent header from the request */ @@ -335,6 +222,14 @@ export type GetGenerationData = { * Referer header from the request */ httpReferer: string | null; + /** + * Unique identifier grouping all generations from a single API request + */ + requestId?: string | null | undefined; + /** + * Session identifier grouping multiple generations in the same session + */ + sessionId?: string | null | undefined; }; /** @@ -382,41 +277,6 @@ export function getGenerationRequestToJSON( export const ApiType$inboundSchema: z.ZodType = openEnums .inboundSchema(ApiType); -/** @internal */ -export const ProviderName$inboundSchema: z.ZodType = - openEnums.inboundSchema(ProviderName); - -/** @internal */ -export const ProviderResponse$inboundSchema: z.ZodType< - ProviderResponse, - unknown -> = z.object({ - id: z.string().optional(), - endpoint_id: z.string().optional(), - model_permaslug: z.string().optional(), - provider_name: ProviderName$inboundSchema.optional(), - status: z.nullable(z.number()), - latency: z.number().optional(), - is_byok: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - "endpoint_id": "endpointId", - "model_permaslug": "modelPermaslug", - "provider_name": "providerName", - "is_byok": "isByok", - }); -}); - -export function providerResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ProviderResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ProviderResponse' from JSON`, - ); -} - /** @internal */ export const GetGenerationData$inboundSchema: z.ZodType< GetGenerationData, @@ -425,29 +285,29 @@ export const GetGenerationData$inboundSchema: z.ZodType< id: z.string(), upstream_id: z.nullable(z.string()), total_cost: z.number(), - cache_discount: z.nullable(z.number()), - upstream_inference_cost: z.nullable(z.number()), + cache_discount: z.number(), + upstream_inference_cost: z.number(), created_at: z.string(), model: z.string(), - app_id: z.nullable(z.number()), + app_id: z.int(), streamed: z.nullable(z.boolean()), cancelled: z.nullable(z.boolean()), provider_name: z.nullable(z.string()), - latency: z.nullable(z.number()), - moderation_latency: z.nullable(z.number()), - generation_time: z.nullable(z.number()), + latency: z.number(), + moderation_latency: z.number(), + generation_time: z.number(), finish_reason: z.nullable(z.string()), - tokens_prompt: z.nullable(z.number()), - tokens_completion: z.nullable(z.number()), - native_tokens_prompt: z.nullable(z.number()), - native_tokens_completion: z.nullable(z.number()), - native_tokens_completion_images: z.nullable(z.number()), - native_tokens_reasoning: z.nullable(z.number()), - native_tokens_cached: z.nullable(z.number()), - num_media_prompt: z.nullable(z.number()), - num_input_audio_prompt: z.nullable(z.number()), - num_media_completion: z.nullable(z.number()), - num_search_results: z.nullable(z.number()), + tokens_prompt: z.int(), + tokens_completion: z.int(), + native_tokens_prompt: z.int(), + native_tokens_completion: z.int(), + native_tokens_completion_images: z.int(), + native_tokens_reasoning: z.int(), + native_tokens_cached: z.int(), + num_media_prompt: z.int(), + num_input_audio_prompt: z.int(), + num_media_completion: z.int(), + num_search_results: z.int(), origin: z.string(), usage: z.number(), is_byok: z.boolean(), @@ -456,10 +316,12 @@ export const GetGenerationData$inboundSchema: z.ZodType< api_type: z.nullable(ApiType$inboundSchema), router: z.nullable(z.string()), provider_responses: z.nullable( - z.array(z.lazy(() => ProviderResponse$inboundSchema)), + z.array(models.ProviderResponse$inboundSchema), ), user_agent: z.nullable(z.string()), http_referer: z.nullable(z.string()), + request_id: z.nullable(z.string()).optional(), + session_id: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "upstream_id": "upstreamId", @@ -490,6 +352,8 @@ export const GetGenerationData$inboundSchema: z.ZodType< "provider_responses": "providerResponses", "user_agent": "userAgent", "http_referer": "httpReferer", + "request_id": "requestId", + "session_id": "sessionId", }); }); diff --git a/src/models/operations/getguardrail.ts b/src/models/operations/getguardrail.ts index 78ba0d03..77bda268 100644 --- a/src/models/operations/getguardrail.ts +++ b/src/models/operations/getguardrail.ts @@ -5,11 +5,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import * as openEnums from "../../types/enums.js"; -import { OpenEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type GetGuardrailGlobals = { /** @@ -59,81 +54,6 @@ export type GetGuardrailRequest = { id: string; }; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export const GetGuardrailResetInterval = { - Daily: "daily", - Weekly: "weekly", - Monthly: "monthly", -} as const; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export type GetGuardrailResetInterval = OpenEnum< - typeof GetGuardrailResetInterval ->; - -/** - * The guardrail - */ -export type GetGuardrailData = { - /** - * Unique identifier for the guardrail - */ - id: string; - /** - * Name of the guardrail - */ - name: string; - /** - * Description of the guardrail - */ - description?: string | null | undefined; - /** - * Spending limit in USD - */ - limitUsd?: number | null | undefined; - /** - * Interval at which the limit resets (daily, weekly, monthly) - */ - resetInterval?: GetGuardrailResetInterval | null | undefined; - /** - * List of allowed provider IDs - */ - allowedProviders?: Array | null | undefined; - /** - * List of provider IDs to exclude from routing - */ - ignoredProviders?: Array | null | undefined; - /** - * Array of model canonical_slugs (immutable identifiers) - */ - allowedModels?: Array | null | undefined; - /** - * Whether to enforce zero data retention - */ - enforceZdr?: boolean | null | undefined; - /** - * ISO 8601 timestamp of when the guardrail was created - */ - createdAt: string; - /** - * ISO 8601 timestamp of when the guardrail was last updated - */ - updatedAt?: string | null | undefined; -}; - -/** - * Guardrail details - */ -export type GetGuardrailResponse = { - /** - * The guardrail - */ - data: GetGuardrailData; -}; - /** @internal */ export type GetGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; @@ -164,67 +84,3 @@ export function getGuardrailRequestToJSON( GetGuardrailRequest$outboundSchema.parse(getGuardrailRequest), ); } - -/** @internal */ -export const GetGuardrailResetInterval$inboundSchema: z.ZodType< - GetGuardrailResetInterval, - unknown -> = openEnums.inboundSchema(GetGuardrailResetInterval); - -/** @internal */ -export const GetGuardrailData$inboundSchema: z.ZodType< - GetGuardrailData, - unknown -> = z.object({ - id: z.string(), - name: z.string(), - description: z.nullable(z.string()).optional(), - limit_usd: z.nullable(z.number()).optional(), - reset_interval: z.nullable(GetGuardrailResetInterval$inboundSchema) - .optional(), - allowed_providers: z.nullable(z.array(z.string())).optional(), - ignored_providers: z.nullable(z.array(z.string())).optional(), - allowed_models: z.nullable(z.array(z.string())).optional(), - enforce_zdr: z.nullable(z.boolean()).optional(), - created_at: z.string(), - updated_at: z.nullable(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - "limit_usd": "limitUsd", - "reset_interval": "resetInterval", - "allowed_providers": "allowedProviders", - "ignored_providers": "ignoredProviders", - "allowed_models": "allowedModels", - "enforce_zdr": "enforceZdr", - "created_at": "createdAt", - "updated_at": "updatedAt", - }); -}); - -export function getGuardrailDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetGuardrailData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetGuardrailData' from JSON`, - ); -} - -/** @internal */ -export const GetGuardrailResponse$inboundSchema: z.ZodType< - GetGuardrailResponse, - unknown -> = z.object({ - data: z.lazy(() => GetGuardrailData$inboundSchema), -}); - -export function getGuardrailResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetGuardrailResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetGuardrailResponse' from JSON`, - ); -} diff --git a/src/models/operations/getkey.ts b/src/models/operations/getkey.ts index 70043ed0..21044e35 100644 --- a/src/models/operations/getkey.ts +++ b/src/models/operations/getkey.ts @@ -80,11 +80,11 @@ export type GetKeyData = { /** * Spending limit for the API key in USD */ - limit: number | null; + limit: number; /** * Remaining spending limit in USD */ - limitRemaining: number | null; + limitRemaining: number; /** * Type of limit reset for the API key */ @@ -187,8 +187,8 @@ export const GetKeyData$inboundSchema: z.ZodType = z name: z.string(), label: z.string(), disabled: z.boolean(), - limit: z.nullable(z.number()), - limit_remaining: z.nullable(z.number()), + limit: z.number(), + limit_remaining: z.number(), limit_reset: z.nullable(z.string()), include_byok_in_limit: z.boolean(), usage: z.number(), diff --git a/src/models/operations/getmodels.ts b/src/models/operations/getmodels.ts index e69ff472..623a0b46 100644 --- a/src/models/operations/getmodels.ts +++ b/src/models/operations/getmodels.ts @@ -76,6 +76,9 @@ export type GetModelsRequest = { * Filter models by use case category */ category?: Category | undefined; + /** + * Filter models by supported parameter (comma-separated) + */ supportedParameters?: string | undefined; /** * Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". diff --git a/src/models/operations/getuseractivity.ts b/src/models/operations/getuseractivity.ts index 801fc339..8566d1dc 100644 --- a/src/models/operations/getuseractivity.ts +++ b/src/models/operations/getuseractivity.ts @@ -5,10 +5,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import * as models from "../index.js"; export type GetUserActivityGlobals = { /** @@ -56,16 +52,14 @@ export type GetUserActivityRequest = { * Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). */ date?: string | undefined; -}; - -/** - * Returns user activity data grouped by endpoint - */ -export type GetUserActivityResponse = { /** - * List of activity items + * Filter by API key hash (SHA-256 hex string, as returned by the keys API). */ - data: Array; + apiKeyHash?: string | undefined; + /** + * Filter by org member user ID. Only applicable for organization accounts. + */ + userId?: string | undefined; }; /** @internal */ @@ -74,6 +68,8 @@ export type GetUserActivityRequest$Outbound = { appTitle?: string | undefined; appCategories?: string | undefined; date?: string | undefined; + api_key_hash?: string | undefined; + user_id?: string | undefined; }; /** @internal */ @@ -85,9 +81,13 @@ export const GetUserActivityRequest$outboundSchema: z.ZodType< appTitle: z.string().optional(), appCategories: z.string().optional(), date: z.string().optional(), + apiKeyHash: z.string().optional(), + userId: z.string().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", + apiKeyHash: "api_key_hash", + userId: "user_id", }); }); @@ -98,21 +98,3 @@ export function getUserActivityRequestToJSON( GetUserActivityRequest$outboundSchema.parse(getUserActivityRequest), ); } - -/** @internal */ -export const GetUserActivityResponse$inboundSchema: z.ZodType< - GetUserActivityResponse, - unknown -> = z.object({ - data: z.array(models.ActivityItem$inboundSchema), -}); - -export function getUserActivityResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetUserActivityResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetUserActivityResponse' from JSON`, - ); -} diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index 58437e2f..c889e5b3 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -8,10 +8,10 @@ export * from "./bulkassignmemberstoguardrail.js"; export * from "./bulkunassignkeysfromguardrail.js"; export * from "./bulkunassignmembersfromguardrail.js"; export * from "./createauthkeyscode.js"; -export * from "./createcoinbasecharge.js"; export * from "./createembeddings.js"; export * from "./createguardrail.js"; export * from "./createkeys.js"; +export * from "./creatererank.js"; export * from "./createresponses.js"; export * from "./deleteguardrail.js"; export * from "./deletekeys.js"; @@ -34,6 +34,7 @@ export * from "./listkeyassignments.js"; export * from "./listmemberassignments.js"; export * from "./listmodelscount.js"; export * from "./listmodelsuser.js"; +export * from "./listorganizationmembers.js"; export * from "./listproviders.js"; export * from "./sendchatcompletionrequest.js"; export * from "./updateguardrail.js"; diff --git a/src/models/operations/list.ts b/src/models/operations/list.ts index c1af76db..4b2c0708 100644 --- a/src/models/operations/list.ts +++ b/src/models/operations/list.ts @@ -58,7 +58,7 @@ export type ListRequest = { /** * Number of API keys to skip for pagination */ - offset?: string | undefined; + offset?: number | undefined; }; export type ListData = { @@ -81,11 +81,11 @@ export type ListData = { /** * Spending limit for the API key in USD */ - limit: number | null; + limit: number; /** * Remaining spending limit in USD */ - limitRemaining: number | null; + limitRemaining: number; /** * Type of limit reset for the API key */ @@ -160,7 +160,7 @@ export type ListRequest$Outbound = { appTitle?: string | undefined; appCategories?: string | undefined; include_disabled?: string | undefined; - offset?: string | undefined; + offset?: number | undefined; }; /** @internal */ @@ -172,7 +172,7 @@ export const ListRequest$outboundSchema: z.ZodType< appTitle: z.string().optional(), appCategories: z.string().optional(), includeDisabled: z.string().optional(), - offset: z.string().optional(), + offset: z.int().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", @@ -190,8 +190,8 @@ export const ListData$inboundSchema: z.ZodType = z.object({ name: z.string(), label: z.string(), disabled: z.boolean(), - limit: z.nullable(z.number()), - limit_remaining: z.nullable(z.number()), + limit: z.number(), + limit_remaining: z.number(), limit_reset: z.nullable(z.string()), include_byok_in_limit: z.boolean(), usage: z.number(), diff --git a/src/models/operations/listendpoints.ts b/src/models/operations/listendpoints.ts index 26e84519..f5cfb8be 100644 --- a/src/models/operations/listendpoints.ts +++ b/src/models/operations/listendpoints.ts @@ -52,7 +52,13 @@ export type ListEndpointsRequest = { * @remarks */ appCategories?: string | undefined; + /** + * The author/organization of the model + */ author: string; + /** + * The model slug + */ slug: string; }; diff --git a/src/models/operations/listguardrailkeyassignments.ts b/src/models/operations/listguardrailkeyassignments.ts index e5ae4cf2..4b2664a1 100644 --- a/src/models/operations/listguardrailkeyassignments.ts +++ b/src/models/operations/listguardrailkeyassignments.ts @@ -8,6 +8,7 @@ import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type ListGuardrailKeyAssignmentsGlobals = { /** @@ -58,56 +59,15 @@ export type ListGuardrailKeyAssignmentsRequest = { /** * Number of records to skip for pagination */ - offset?: string | undefined; + offset?: number | undefined; /** * Maximum number of records to return (max 100) */ - limit?: string | undefined; + limit?: number | undefined; }; -export type ListGuardrailKeyAssignmentsData = { - /** - * Unique identifier for the assignment - */ - id: string; - /** - * Hash of the assigned API key - */ - keyHash: string; - /** - * ID of the guardrail - */ - guardrailId: string; - /** - * Name of the API key - */ - keyName: string; - /** - * Label of the API key - */ - keyLabel: string; - /** - * User ID of who made the assignment - */ - assignedBy: string | null; - /** - * ISO 8601 timestamp of when the assignment was created - */ - createdAt: string; -}; - -/** - * List of key assignments - */ export type ListGuardrailKeyAssignmentsResponse = { - /** - * List of key assignments - */ - data: Array; - /** - * Total number of key assignments for this guardrail - */ - totalCount: number; + result: models.ListKeyAssignmentsResponse; }; /** @internal */ @@ -116,8 +76,8 @@ export type ListGuardrailKeyAssignmentsRequest$Outbound = { appTitle?: string | undefined; appCategories?: string | undefined; id: string; - offset?: string | undefined; - limit?: string | undefined; + offset?: number | undefined; + limit?: number | undefined; }; /** @internal */ @@ -129,8 +89,8 @@ export const ListGuardrailKeyAssignmentsRequest$outboundSchema: z.ZodType< appTitle: z.string().optional(), appCategories: z.string().optional(), id: z.string(), - offset: z.string().optional(), - limit: z.string().optional(), + offset: z.int().optional(), + limit: z.int().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", @@ -147,49 +107,15 @@ export function listGuardrailKeyAssignmentsRequestToJSON( ); } -/** @internal */ -export const ListGuardrailKeyAssignmentsData$inboundSchema: z.ZodType< - ListGuardrailKeyAssignmentsData, - unknown -> = z.object({ - id: z.string(), - key_hash: z.string(), - guardrail_id: z.string(), - key_name: z.string(), - key_label: z.string(), - assigned_by: z.nullable(z.string()), - created_at: z.string(), -}).transform((v) => { - return remap$(v, { - "key_hash": "keyHash", - "guardrail_id": "guardrailId", - "key_name": "keyName", - "key_label": "keyLabel", - "assigned_by": "assignedBy", - "created_at": "createdAt", - }); -}); - -export function listGuardrailKeyAssignmentsDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListGuardrailKeyAssignmentsData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListGuardrailKeyAssignmentsData' from JSON`, - ); -} - /** @internal */ export const ListGuardrailKeyAssignmentsResponse$inboundSchema: z.ZodType< ListGuardrailKeyAssignmentsResponse, unknown > = z.object({ - data: z.array(z.lazy(() => ListGuardrailKeyAssignmentsData$inboundSchema)), - total_count: z.number(), + Result: models.ListKeyAssignmentsResponse$inboundSchema, }).transform((v) => { return remap$(v, { - "total_count": "totalCount", + "Result": "result", }); }); diff --git a/src/models/operations/listguardrailmemberassignments.ts b/src/models/operations/listguardrailmemberassignments.ts index a99c37c3..0f4110ee 100644 --- a/src/models/operations/listguardrailmemberassignments.ts +++ b/src/models/operations/listguardrailmemberassignments.ts @@ -8,6 +8,7 @@ import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type ListGuardrailMemberAssignmentsGlobals = { /** @@ -58,52 +59,15 @@ export type ListGuardrailMemberAssignmentsRequest = { /** * Number of records to skip for pagination */ - offset?: string | undefined; + offset?: number | undefined; /** * Maximum number of records to return (max 100) */ - limit?: string | undefined; + limit?: number | undefined; }; -export type ListGuardrailMemberAssignmentsData = { - /** - * Unique identifier for the assignment - */ - id: string; - /** - * Clerk user ID of the assigned member - */ - userId: string; - /** - * Organization ID - */ - organizationId: string; - /** - * ID of the guardrail - */ - guardrailId: string; - /** - * User ID of who made the assignment - */ - assignedBy: string | null; - /** - * ISO 8601 timestamp of when the assignment was created - */ - createdAt: string; -}; - -/** - * List of member assignments - */ export type ListGuardrailMemberAssignmentsResponse = { - /** - * List of member assignments - */ - data: Array; - /** - * Total number of member assignments - */ - totalCount: number; + result: models.ListMemberAssignmentsResponse; }; /** @internal */ @@ -112,8 +76,8 @@ export type ListGuardrailMemberAssignmentsRequest$Outbound = { appTitle?: string | undefined; appCategories?: string | undefined; id: string; - offset?: string | undefined; - limit?: string | undefined; + offset?: number | undefined; + limit?: number | undefined; }; /** @internal */ @@ -125,8 +89,8 @@ export const ListGuardrailMemberAssignmentsRequest$outboundSchema: z.ZodType< appTitle: z.string().optional(), appCategories: z.string().optional(), id: z.string(), - offset: z.string().optional(), - limit: z.string().optional(), + offset: z.int().optional(), + limit: z.int().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", @@ -143,48 +107,15 @@ export function listGuardrailMemberAssignmentsRequestToJSON( ); } -/** @internal */ -export const ListGuardrailMemberAssignmentsData$inboundSchema: z.ZodType< - ListGuardrailMemberAssignmentsData, - unknown -> = z.object({ - id: z.string(), - user_id: z.string(), - organization_id: z.string(), - guardrail_id: z.string(), - assigned_by: z.nullable(z.string()), - created_at: z.string(), -}).transform((v) => { - return remap$(v, { - "user_id": "userId", - "organization_id": "organizationId", - "guardrail_id": "guardrailId", - "assigned_by": "assignedBy", - "created_at": "createdAt", - }); -}); - -export function listGuardrailMemberAssignmentsDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - ListGuardrailMemberAssignmentsData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListGuardrailMemberAssignmentsData' from JSON`, - ); -} - /** @internal */ export const ListGuardrailMemberAssignmentsResponse$inboundSchema: z.ZodType< ListGuardrailMemberAssignmentsResponse, unknown > = z.object({ - data: z.array(z.lazy(() => ListGuardrailMemberAssignmentsData$inboundSchema)), - total_count: z.number(), + Result: models.ListMemberAssignmentsResponse$inboundSchema, }).transform((v) => { return remap$(v, { - "total_count": "totalCount", + "Result": "result", }); }); diff --git a/src/models/operations/listguardrails.ts b/src/models/operations/listguardrails.ts index 64618e35..873a94f7 100644 --- a/src/models/operations/listguardrails.ts +++ b/src/models/operations/listguardrails.ts @@ -6,10 +6,9 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; -import * as openEnums from "../../types/enums.js"; -import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type ListGuardrailsGlobals = { /** @@ -56,87 +55,15 @@ export type ListGuardrailsRequest = { /** * Number of records to skip for pagination */ - offset?: string | undefined; + offset?: number | undefined; /** * Maximum number of records to return (max 100) */ - limit?: string | undefined; + limit?: number | undefined; }; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export const ListGuardrailsResetInterval = { - Daily: "daily", - Weekly: "weekly", - Monthly: "monthly", -} as const; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export type ListGuardrailsResetInterval = OpenEnum< - typeof ListGuardrailsResetInterval ->; - -export type ListGuardrailsData = { - /** - * Unique identifier for the guardrail - */ - id: string; - /** - * Name of the guardrail - */ - name: string; - /** - * Description of the guardrail - */ - description?: string | null | undefined; - /** - * Spending limit in USD - */ - limitUsd?: number | null | undefined; - /** - * Interval at which the limit resets (daily, weekly, monthly) - */ - resetInterval?: ListGuardrailsResetInterval | null | undefined; - /** - * List of allowed provider IDs - */ - allowedProviders?: Array | null | undefined; - /** - * List of provider IDs to exclude from routing - */ - ignoredProviders?: Array | null | undefined; - /** - * Array of model canonical_slugs (immutable identifiers) - */ - allowedModels?: Array | null | undefined; - /** - * Whether to enforce zero data retention - */ - enforceZdr?: boolean | null | undefined; - /** - * ISO 8601 timestamp of when the guardrail was created - */ - createdAt: string; - /** - * ISO 8601 timestamp of when the guardrail was last updated - */ - updatedAt?: string | null | undefined; -}; - -/** - * List of guardrails - */ export type ListGuardrailsResponse = { - /** - * List of guardrails - */ - data: Array; - /** - * Total number of guardrails - */ - totalCount: number; + result: models.ListGuardrailsResponse; }; /** @internal */ @@ -144,8 +71,8 @@ export type ListGuardrailsRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; - offset?: string | undefined; - limit?: string | undefined; + offset?: number | undefined; + limit?: number | undefined; }; /** @internal */ @@ -156,8 +83,8 @@ export const ListGuardrailsRequest$outboundSchema: z.ZodType< httpReferer: z.string().optional(), appTitle: z.string().optional(), appCategories: z.string().optional(), - offset: z.string().optional(), - limit: z.string().optional(), + offset: z.int().optional(), + limit: z.int().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", @@ -172,62 +99,15 @@ export function listGuardrailsRequestToJSON( ); } -/** @internal */ -export const ListGuardrailsResetInterval$inboundSchema: z.ZodType< - ListGuardrailsResetInterval, - unknown -> = openEnums.inboundSchema(ListGuardrailsResetInterval); - -/** @internal */ -export const ListGuardrailsData$inboundSchema: z.ZodType< - ListGuardrailsData, - unknown -> = z.object({ - id: z.string(), - name: z.string(), - description: z.nullable(z.string()).optional(), - limit_usd: z.nullable(z.number()).optional(), - reset_interval: z.nullable(ListGuardrailsResetInterval$inboundSchema) - .optional(), - allowed_providers: z.nullable(z.array(z.string())).optional(), - ignored_providers: z.nullable(z.array(z.string())).optional(), - allowed_models: z.nullable(z.array(z.string())).optional(), - enforce_zdr: z.nullable(z.boolean()).optional(), - created_at: z.string(), - updated_at: z.nullable(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - "limit_usd": "limitUsd", - "reset_interval": "resetInterval", - "allowed_providers": "allowedProviders", - "ignored_providers": "ignoredProviders", - "allowed_models": "allowedModels", - "enforce_zdr": "enforceZdr", - "created_at": "createdAt", - "updated_at": "updatedAt", - }); -}); - -export function listGuardrailsDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListGuardrailsData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListGuardrailsData' from JSON`, - ); -} - /** @internal */ export const ListGuardrailsResponse$inboundSchema: z.ZodType< ListGuardrailsResponse, unknown > = z.object({ - data: z.array(z.lazy(() => ListGuardrailsData$inboundSchema)), - total_count: z.number(), + Result: models.ListGuardrailsResponse$inboundSchema, }).transform((v) => { return remap$(v, { - "total_count": "totalCount", + "Result": "result", }); }); diff --git a/src/models/operations/listkeyassignments.ts b/src/models/operations/listkeyassignments.ts index 800c8962..dd5b016d 100644 --- a/src/models/operations/listkeyassignments.ts +++ b/src/models/operations/listkeyassignments.ts @@ -8,6 +8,7 @@ import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type ListKeyAssignmentsGlobals = { /** @@ -54,56 +55,15 @@ export type ListKeyAssignmentsRequest = { /** * Number of records to skip for pagination */ - offset?: string | undefined; + offset?: number | undefined; /** * Maximum number of records to return (max 100) */ - limit?: string | undefined; + limit?: number | undefined; }; -export type ListKeyAssignmentsData = { - /** - * Unique identifier for the assignment - */ - id: string; - /** - * Hash of the assigned API key - */ - keyHash: string; - /** - * ID of the guardrail - */ - guardrailId: string; - /** - * Name of the API key - */ - keyName: string; - /** - * Label of the API key - */ - keyLabel: string; - /** - * User ID of who made the assignment - */ - assignedBy: string | null; - /** - * ISO 8601 timestamp of when the assignment was created - */ - createdAt: string; -}; - -/** - * List of key assignments - */ export type ListKeyAssignmentsResponse = { - /** - * List of key assignments - */ - data: Array; - /** - * Total number of key assignments for this guardrail - */ - totalCount: number; + result: models.ListKeyAssignmentsResponse; }; /** @internal */ @@ -111,8 +71,8 @@ export type ListKeyAssignmentsRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; - offset?: string | undefined; - limit?: string | undefined; + offset?: number | undefined; + limit?: number | undefined; }; /** @internal */ @@ -123,8 +83,8 @@ export const ListKeyAssignmentsRequest$outboundSchema: z.ZodType< httpReferer: z.string().optional(), appTitle: z.string().optional(), appCategories: z.string().optional(), - offset: z.string().optional(), - limit: z.string().optional(), + offset: z.int().optional(), + limit: z.int().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", @@ -139,49 +99,15 @@ export function listKeyAssignmentsRequestToJSON( ); } -/** @internal */ -export const ListKeyAssignmentsData$inboundSchema: z.ZodType< - ListKeyAssignmentsData, - unknown -> = z.object({ - id: z.string(), - key_hash: z.string(), - guardrail_id: z.string(), - key_name: z.string(), - key_label: z.string(), - assigned_by: z.nullable(z.string()), - created_at: z.string(), -}).transform((v) => { - return remap$(v, { - "key_hash": "keyHash", - "guardrail_id": "guardrailId", - "key_name": "keyName", - "key_label": "keyLabel", - "assigned_by": "assignedBy", - "created_at": "createdAt", - }); -}); - -export function listKeyAssignmentsDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListKeyAssignmentsData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListKeyAssignmentsData' from JSON`, - ); -} - /** @internal */ export const ListKeyAssignmentsResponse$inboundSchema: z.ZodType< ListKeyAssignmentsResponse, unknown > = z.object({ - data: z.array(z.lazy(() => ListKeyAssignmentsData$inboundSchema)), - total_count: z.number(), + Result: models.ListKeyAssignmentsResponse$inboundSchema, }).transform((v) => { return remap$(v, { - "total_count": "totalCount", + "Result": "result", }); }); diff --git a/src/models/operations/listmemberassignments.ts b/src/models/operations/listmemberassignments.ts index 5472421e..d5f57334 100644 --- a/src/models/operations/listmemberassignments.ts +++ b/src/models/operations/listmemberassignments.ts @@ -8,6 +8,7 @@ import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type ListMemberAssignmentsGlobals = { /** @@ -54,52 +55,15 @@ export type ListMemberAssignmentsRequest = { /** * Number of records to skip for pagination */ - offset?: string | undefined; + offset?: number | undefined; /** * Maximum number of records to return (max 100) */ - limit?: string | undefined; + limit?: number | undefined; }; -export type ListMemberAssignmentsData = { - /** - * Unique identifier for the assignment - */ - id: string; - /** - * Clerk user ID of the assigned member - */ - userId: string; - /** - * Organization ID - */ - organizationId: string; - /** - * ID of the guardrail - */ - guardrailId: string; - /** - * User ID of who made the assignment - */ - assignedBy: string | null; - /** - * ISO 8601 timestamp of when the assignment was created - */ - createdAt: string; -}; - -/** - * List of member assignments - */ export type ListMemberAssignmentsResponse = { - /** - * List of member assignments - */ - data: Array; - /** - * Total number of member assignments - */ - totalCount: number; + result: models.ListMemberAssignmentsResponse; }; /** @internal */ @@ -107,8 +71,8 @@ export type ListMemberAssignmentsRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; - offset?: string | undefined; - limit?: string | undefined; + offset?: number | undefined; + limit?: number | undefined; }; /** @internal */ @@ -119,8 +83,8 @@ export const ListMemberAssignmentsRequest$outboundSchema: z.ZodType< httpReferer: z.string().optional(), appTitle: z.string().optional(), appCategories: z.string().optional(), - offset: z.string().optional(), - limit: z.string().optional(), + offset: z.int().optional(), + limit: z.int().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", @@ -137,47 +101,15 @@ export function listMemberAssignmentsRequestToJSON( ); } -/** @internal */ -export const ListMemberAssignmentsData$inboundSchema: z.ZodType< - ListMemberAssignmentsData, - unknown -> = z.object({ - id: z.string(), - user_id: z.string(), - organization_id: z.string(), - guardrail_id: z.string(), - assigned_by: z.nullable(z.string()), - created_at: z.string(), -}).transform((v) => { - return remap$(v, { - "user_id": "userId", - "organization_id": "organizationId", - "guardrail_id": "guardrailId", - "assigned_by": "assignedBy", - "created_at": "createdAt", - }); -}); - -export function listMemberAssignmentsDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListMemberAssignmentsData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListMemberAssignmentsData' from JSON`, - ); -} - /** @internal */ export const ListMemberAssignmentsResponse$inboundSchema: z.ZodType< ListMemberAssignmentsResponse, unknown > = z.object({ - data: z.array(z.lazy(() => ListMemberAssignmentsData$inboundSchema)), - total_count: z.number(), + Result: models.ListMemberAssignmentsResponse$inboundSchema, }).transform((v) => { return remap$(v, { - "total_count": "totalCount", + "Result": "result", }); }); diff --git a/src/models/operations/listorganizationmembers.ts b/src/models/operations/listorganizationmembers.ts new file mode 100644 index 00000000..5c4bd662 --- /dev/null +++ b/src/models/operations/listorganizationmembers.ts @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: cc21259f09b8 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import * as openEnums from "../../types/enums.js"; +import { OpenEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListOrganizationMembersGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +export type ListOrganizationMembersRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + /** + * Number of records to skip for pagination + */ + offset?: number | undefined; + /** + * Maximum number of records to return (max 100) + */ + limit?: number | undefined; +}; + +/** + * Role of the member in the organization + */ +export const Role = { + OrgAdmin: "org:admin", + OrgMember: "org:member", +} as const; +/** + * Role of the member in the organization + */ +export type Role = OpenEnum; + +export type ListOrganizationMembersData = { + /** + * User ID of the organization member + */ + id: string; + /** + * First name of the member + */ + firstName: string | null; + /** + * Last name of the member + */ + lastName: string | null; + /** + * Email address of the member + */ + email: string; + /** + * Role of the member in the organization + */ + role: Role; +}; + +/** + * List of organization members + */ +export type ListOrganizationMembersResponseBody = { + /** + * List of organization members + */ + data: Array; + /** + * Total number of members in the organization + */ + totalCount: number; +}; + +export type ListOrganizationMembersResponse = { + result: ListOrganizationMembersResponseBody; +}; + +/** @internal */ +export type ListOrganizationMembersRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + offset?: number | undefined; + limit?: number | undefined; +}; + +/** @internal */ +export const ListOrganizationMembersRequest$outboundSchema: z.ZodType< + ListOrganizationMembersRequest$Outbound, + ListOrganizationMembersRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + offset: z.int().optional(), + limit: z.int().optional(), +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + }); +}); + +export function listOrganizationMembersRequestToJSON( + listOrganizationMembersRequest: ListOrganizationMembersRequest, +): string { + return JSON.stringify( + ListOrganizationMembersRequest$outboundSchema.parse( + listOrganizationMembersRequest, + ), + ); +} + +/** @internal */ +export const Role$inboundSchema: z.ZodType = openEnums + .inboundSchema(Role); + +/** @internal */ +export const ListOrganizationMembersData$inboundSchema: z.ZodType< + ListOrganizationMembersData, + unknown +> = z.object({ + id: z.string(), + first_name: z.nullable(z.string()), + last_name: z.nullable(z.string()), + email: z.string(), + role: Role$inboundSchema, +}).transform((v) => { + return remap$(v, { + "first_name": "firstName", + "last_name": "lastName", + }); +}); + +export function listOrganizationMembersDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListOrganizationMembersData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListOrganizationMembersData' from JSON`, + ); +} + +/** @internal */ +export const ListOrganizationMembersResponseBody$inboundSchema: z.ZodType< + ListOrganizationMembersResponseBody, + unknown +> = z.object({ + data: z.array(z.lazy(() => ListOrganizationMembersData$inboundSchema)), + total_count: z.int(), +}).transform((v) => { + return remap$(v, { + "total_count": "totalCount", + }); +}); + +export function listOrganizationMembersResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ListOrganizationMembersResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListOrganizationMembersResponseBody' from JSON`, + ); +} + +/** @internal */ +export const ListOrganizationMembersResponse$inboundSchema: z.ZodType< + ListOrganizationMembersResponse, + unknown +> = z.object({ + Result: z.lazy(() => ListOrganizationMembersResponseBody$inboundSchema), +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); + +export function listOrganizationMembersResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListOrganizationMembersResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListOrganizationMembersResponse' from JSON`, + ); +} diff --git a/src/models/operations/updateguardrail.ts b/src/models/operations/updateguardrail.ts index 0cc62a6c..7c5dc47c 100644 --- a/src/models/operations/updateguardrail.ts +++ b/src/models/operations/updateguardrail.ts @@ -5,11 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import * as openEnums from "../../types/enums.js"; -import { OpenEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type UpdateGuardrailGlobals = { /** @@ -33,56 +29,6 @@ export type UpdateGuardrailGlobals = { appCategories?: string | undefined; }; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export const UpdateGuardrailResetIntervalRequest = { - Daily: "daily", - Weekly: "weekly", - Monthly: "monthly", -} as const; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export type UpdateGuardrailResetIntervalRequest = OpenEnum< - typeof UpdateGuardrailResetIntervalRequest ->; - -export type UpdateGuardrailRequestBody = { - /** - * New name for the guardrail - */ - name?: string | undefined; - /** - * New description for the guardrail - */ - description?: string | null | undefined; - /** - * New spending limit in USD - */ - limitUsd?: number | null | undefined; - /** - * Interval at which the limit resets (daily, weekly, monthly) - */ - resetInterval?: UpdateGuardrailResetIntervalRequest | null | undefined; - /** - * New list of allowed provider IDs - */ - allowedProviders?: Array | null | undefined; - /** - * List of provider IDs to exclude from routing - */ - ignoredProviders?: Array | null | undefined; - /** - * Array of model identifiers (slug or canonical_slug accepted) - */ - allowedModels?: Array | null | undefined; - /** - * Whether to enforce zero data retention - */ - enforceZdr?: boolean | null | undefined; -}; - export type UpdateGuardrailRequest = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. @@ -107,142 +53,16 @@ export type UpdateGuardrailRequest = { * The unique identifier of the guardrail to update */ id: string; - requestBody: UpdateGuardrailRequestBody; -}; - -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export const UpdateGuardrailResetIntervalResponse = { - Daily: "daily", - Weekly: "weekly", - Monthly: "monthly", -} as const; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export type UpdateGuardrailResetIntervalResponse = OpenEnum< - typeof UpdateGuardrailResetIntervalResponse ->; - -/** - * The updated guardrail - */ -export type UpdateGuardrailData = { - /** - * Unique identifier for the guardrail - */ - id: string; - /** - * Name of the guardrail - */ - name: string; - /** - * Description of the guardrail - */ - description?: string | null | undefined; - /** - * Spending limit in USD - */ - limitUsd?: number | null | undefined; - /** - * Interval at which the limit resets (daily, weekly, monthly) - */ - resetInterval?: UpdateGuardrailResetIntervalResponse | null | undefined; - /** - * List of allowed provider IDs - */ - allowedProviders?: Array | null | undefined; - /** - * List of provider IDs to exclude from routing - */ - ignoredProviders?: Array | null | undefined; - /** - * Array of model canonical_slugs (immutable identifiers) - */ - allowedModels?: Array | null | undefined; - /** - * Whether to enforce zero data retention - */ - enforceZdr?: boolean | null | undefined; - /** - * ISO 8601 timestamp of when the guardrail was created - */ - createdAt: string; - /** - * ISO 8601 timestamp of when the guardrail was last updated - */ - updatedAt?: string | null | undefined; -}; - -/** - * Guardrail updated successfully - */ -export type UpdateGuardrailResponse = { - /** - * The updated guardrail - */ - data: UpdateGuardrailData; + updateGuardrailRequest: models.UpdateGuardrailRequest; }; -/** @internal */ -export const UpdateGuardrailResetIntervalRequest$outboundSchema: z.ZodType< - string, - UpdateGuardrailResetIntervalRequest -> = openEnums.outboundSchema(UpdateGuardrailResetIntervalRequest); - -/** @internal */ -export type UpdateGuardrailRequestBody$Outbound = { - name?: string | undefined; - description?: string | null | undefined; - limit_usd?: number | null | undefined; - reset_interval?: string | null | undefined; - allowed_providers?: Array | null | undefined; - ignored_providers?: Array | null | undefined; - allowed_models?: Array | null | undefined; - enforce_zdr?: boolean | null | undefined; -}; - -/** @internal */ -export const UpdateGuardrailRequestBody$outboundSchema: z.ZodType< - UpdateGuardrailRequestBody$Outbound, - UpdateGuardrailRequestBody -> = z.object({ - name: z.string().optional(), - description: z.nullable(z.string()).optional(), - limitUsd: z.nullable(z.number()).optional(), - resetInterval: z.nullable(UpdateGuardrailResetIntervalRequest$outboundSchema) - .optional(), - allowedProviders: z.nullable(z.array(z.string())).optional(), - ignoredProviders: z.nullable(z.array(z.string())).optional(), - allowedModels: z.nullable(z.array(z.string())).optional(), - enforceZdr: z.nullable(z.boolean()).optional(), -}).transform((v) => { - return remap$(v, { - limitUsd: "limit_usd", - resetInterval: "reset_interval", - allowedProviders: "allowed_providers", - ignoredProviders: "ignored_providers", - allowedModels: "allowed_models", - enforceZdr: "enforce_zdr", - }); -}); - -export function updateGuardrailRequestBodyToJSON( - updateGuardrailRequestBody: UpdateGuardrailRequestBody, -): string { - return JSON.stringify( - UpdateGuardrailRequestBody$outboundSchema.parse(updateGuardrailRequestBody), - ); -} - /** @internal */ export type UpdateGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; id: string; - RequestBody: UpdateGuardrailRequestBody$Outbound; + UpdateGuardrailRequest: models.UpdateGuardrailRequest$Outbound; }; /** @internal */ @@ -254,11 +74,11 @@ export const UpdateGuardrailRequest$outboundSchema: z.ZodType< appTitle: z.string().optional(), appCategories: z.string().optional(), id: z.string(), - requestBody: z.lazy(() => UpdateGuardrailRequestBody$outboundSchema), + updateGuardrailRequest: models.UpdateGuardrailRequest$outboundSchema, }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - requestBody: "RequestBody", + updateGuardrailRequest: "UpdateGuardrailRequest", }); }); @@ -269,67 +89,3 @@ export function updateGuardrailRequestToJSON( UpdateGuardrailRequest$outboundSchema.parse(updateGuardrailRequest), ); } - -/** @internal */ -export const UpdateGuardrailResetIntervalResponse$inboundSchema: z.ZodType< - UpdateGuardrailResetIntervalResponse, - unknown -> = openEnums.inboundSchema(UpdateGuardrailResetIntervalResponse); - -/** @internal */ -export const UpdateGuardrailData$inboundSchema: z.ZodType< - UpdateGuardrailData, - unknown -> = z.object({ - id: z.string(), - name: z.string(), - description: z.nullable(z.string()).optional(), - limit_usd: z.nullable(z.number()).optional(), - reset_interval: z.nullable(UpdateGuardrailResetIntervalResponse$inboundSchema) - .optional(), - allowed_providers: z.nullable(z.array(z.string())).optional(), - ignored_providers: z.nullable(z.array(z.string())).optional(), - allowed_models: z.nullable(z.array(z.string())).optional(), - enforce_zdr: z.nullable(z.boolean()).optional(), - created_at: z.string(), - updated_at: z.nullable(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - "limit_usd": "limitUsd", - "reset_interval": "resetInterval", - "allowed_providers": "allowedProviders", - "ignored_providers": "ignoredProviders", - "allowed_models": "allowedModels", - "enforce_zdr": "enforceZdr", - "created_at": "createdAt", - "updated_at": "updatedAt", - }); -}); - -export function updateGuardrailDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateGuardrailData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateGuardrailData' from JSON`, - ); -} - -/** @internal */ -export const UpdateGuardrailResponse$inboundSchema: z.ZodType< - UpdateGuardrailResponse, - unknown -> = z.object({ - data: z.lazy(() => UpdateGuardrailData$inboundSchema), -}); - -export function updateGuardrailResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateGuardrailResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateGuardrailResponse' from JSON`, - ); -} diff --git a/src/models/operations/updatekeys.ts b/src/models/operations/updatekeys.ts index 668b738b..59fc6dbe 100644 --- a/src/models/operations/updatekeys.ts +++ b/src/models/operations/updatekeys.ts @@ -58,7 +58,7 @@ export type UpdateKeysRequestBody = { /** * New spending limit for the API key in USD */ - limit?: number | null | undefined; + limit?: number | undefined; /** * New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. */ @@ -119,11 +119,11 @@ export type UpdateKeysData = { /** * Spending limit for the API key in USD */ - limit: number | null; + limit: number; /** * Remaining spending limit in USD */ - limitRemaining: number | null; + limitRemaining: number; /** * Type of limit reset for the API key */ @@ -202,7 +202,7 @@ export const UpdateKeysLimitReset$outboundSchema: z.ZodType< export type UpdateKeysRequestBody$Outbound = { name?: string | undefined; disabled?: boolean | undefined; - limit?: number | null | undefined; + limit?: number | undefined; limit_reset?: string | null | undefined; include_byok_in_limit?: boolean | undefined; }; @@ -214,7 +214,7 @@ export const UpdateKeysRequestBody$outboundSchema: z.ZodType< > = z.object({ name: z.string().optional(), disabled: z.boolean().optional(), - limit: z.nullable(z.number()).optional(), + limit: z.number().optional(), limitReset: z.nullable(UpdateKeysLimitReset$outboundSchema).optional(), includeByokInLimit: z.boolean().optional(), }).transform((v) => { @@ -273,8 +273,8 @@ export const UpdateKeysData$inboundSchema: z.ZodType = name: z.string(), label: z.string(), disabled: z.boolean(), - limit: z.nullable(z.number()), - limit_remaining: z.nullable(z.number()), + limit: z.number(), + limit_remaining: z.number(), limit_reset: z.nullable(z.string()), include_byok_in_limit: z.boolean(), usage: z.number(), diff --git a/src/models/outputdatetimeitem.ts b/src/models/outputdatetimeitem.ts index 37302b54..2582ddcc 100644 --- a/src/models/outputdatetimeitem.ts +++ b/src/models/outputdatetimeitem.ts @@ -4,30 +4,24 @@ */ import * as z from "zod/v4"; -import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { ClosedEnum } from "../types/enums.js"; +import { + ToolCallStatus, + ToolCallStatus$outboundSchema, +} from "./toolcallstatus.js"; export const OutputDatetimeItemType = { OpenrouterDatetime: "openrouter:datetime", } as const; export type OutputDatetimeItemType = ClosedEnum; -export const OutputDatetimeItemStatus = { - Completed: "completed", - InProgress: "in_progress", - Incomplete: "incomplete", -} as const; -export type OutputDatetimeItemStatus = OpenEnum< - typeof OutputDatetimeItemStatus ->; - /** * An openrouter:datetime server tool output item */ export type OutputDatetimeItem = { type: OutputDatetimeItemType; id?: string | undefined; - status: OutputDatetimeItemStatus; + status: ToolCallStatus; /** * ISO 8601 datetime string */ @@ -43,12 +37,6 @@ export const OutputDatetimeItemType$outboundSchema: z.ZodEnum< typeof OutputDatetimeItemType > = z.enum(OutputDatetimeItemType); -/** @internal */ -export const OutputDatetimeItemStatus$outboundSchema: z.ZodType< - string, - OutputDatetimeItemStatus -> = openEnums.outboundSchema(OutputDatetimeItemStatus); - /** @internal */ export type OutputDatetimeItem$Outbound = { type: string; @@ -65,7 +53,7 @@ export const OutputDatetimeItem$outboundSchema: z.ZodType< > = z.object({ type: OutputDatetimeItemType$outboundSchema, id: z.string().optional(), - status: OutputDatetimeItemStatus$outboundSchema, + status: ToolCallStatus$outboundSchema, datetime: z.string(), timezone: z.string(), }); diff --git a/src/models/outputmessage.ts b/src/models/outputmessage.ts index fed67882..66e13659 100644 --- a/src/models/outputmessage.ts +++ b/src/models/outputmessage.ts @@ -5,6 +5,8 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; @@ -55,7 +57,8 @@ export type OutputMessageStatusUnion = export type OutputMessageContent = | ResponseOutputText - | OpenAIResponsesRefusalContent; + | OpenAIResponsesRefusalContent + | discriminatedUnionTypes.Unknown<"type">; export const OutputMessagePhaseFinalAnswer = { FinalAnswer: "final_answer", @@ -88,7 +91,11 @@ export type OutputMessage = { | OutputMessageStatusIncomplete | OutputMessageStatusInProgress | undefined; - content: Array; + content: Array< + | ResponseOutputText + | OpenAIResponsesRefusalContent + | discriminatedUnionTypes.Unknown<"type"> + >; /** * The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. */ @@ -149,10 +156,10 @@ export function outputMessageStatusUnionFromJSON( export const OutputMessageContent$inboundSchema: z.ZodType< OutputMessageContent, unknown -> = z.union([ - ResponseOutputText$inboundSchema, - OpenAIResponsesRefusalContent$inboundSchema, -]); +> = discriminatedUnion("type", { + output_text: ResponseOutputText$inboundSchema, + refusal: OpenAIResponsesRefusalContent$inboundSchema, +}); export function outputMessageContentFromJSON( jsonString: string, @@ -206,10 +213,10 @@ export const OutputMessage$inboundSchema: z.ZodType = z OutputMessageStatusInProgress$inboundSchema, ]).optional(), content: z.array( - z.union([ - ResponseOutputText$inboundSchema, - OpenAIResponsesRefusalContent$inboundSchema, - ]), + discriminatedUnion("type", { + output_text: ResponseOutputText$inboundSchema, + refusal: OpenAIResponsesRefusalContent$inboundSchema, + }), ), phase: z.nullable( z.union([ diff --git a/src/models/outputmessageitem.ts b/src/models/outputmessageitem.ts index 8b41e657..2c3915cd 100644 --- a/src/models/outputmessageitem.ts +++ b/src/models/outputmessageitem.ts @@ -5,6 +5,8 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; @@ -55,7 +57,8 @@ export type OutputMessageItemStatusUnion = export type OutputMessageItemContent = | ResponseOutputText - | OpenAIResponsesRefusalContent; + | OpenAIResponsesRefusalContent + | discriminatedUnionTypes.Unknown<"type">; export const OutputMessageItemPhaseFinalAnswer = { FinalAnswer: "final_answer", @@ -91,7 +94,11 @@ export type OutputMessageItem = { | OutputMessageItemStatusIncomplete | OutputMessageItemStatusInProgress | undefined; - content: Array; + content: Array< + | ResponseOutputText + | OpenAIResponsesRefusalContent + | discriminatedUnionTypes.Unknown<"type"> + >; /** * The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. */ @@ -152,10 +159,10 @@ export function outputMessageItemStatusUnionFromJSON( export const OutputMessageItemContent$inboundSchema: z.ZodType< OutputMessageItemContent, unknown -> = z.union([ - ResponseOutputText$inboundSchema, - OpenAIResponsesRefusalContent$inboundSchema, -]); +> = discriminatedUnion("type", { + output_text: ResponseOutputText$inboundSchema, + refusal: OpenAIResponsesRefusalContent$inboundSchema, +}); export function outputMessageItemContentFromJSON( jsonString: string, @@ -211,10 +218,10 @@ export const OutputMessageItem$inboundSchema: z.ZodType< OutputMessageItemStatusInProgress$inboundSchema, ]).optional(), content: z.array( - z.union([ - ResponseOutputText$inboundSchema, - OpenAIResponsesRefusalContent$inboundSchema, - ]), + discriminatedUnion("type", { + output_text: ResponseOutputText$inboundSchema, + refusal: OpenAIResponsesRefusalContent$inboundSchema, + }), ), phase: z.nullable( z.union([ diff --git a/src/models/outputmodality.ts b/src/models/outputmodality.ts index 143ff54c..73f67ca7 100644 --- a/src/models/outputmodality.ts +++ b/src/models/outputmodality.ts @@ -13,6 +13,7 @@ export const OutputModality = { Embeddings: "embeddings", Audio: "audio", Video: "video", + Rerank: "rerank", } as const; export type OutputModality = OpenEnum; diff --git a/src/models/outputreasoningitem.ts b/src/models/outputreasoningitem.ts index 4c127753..a3003723 100644 --- a/src/models/outputreasoningitem.ts +++ b/src/models/outputreasoningitem.ts @@ -6,10 +6,13 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ReasoningFormat, + ReasoningFormat$inboundSchema, +} from "./reasoningformat.js"; import { ReasoningSummaryText, ReasoningSummaryText$inboundSchema, @@ -52,24 +55,6 @@ export type OutputReasoningItemStatusUnion = | OutputReasoningItemStatusIncomplete | OutputReasoningItemStatusInProgress; -/** - * The format of the reasoning content - */ -export const OutputReasoningItemFormat = { - Unknown: "unknown", - OpenaiResponsesV1: "openai-responses-v1", - AzureOpenaiResponsesV1: "azure-openai-responses-v1", - XaiResponsesV1: "xai-responses-v1", - AnthropicClaudeV1: "anthropic-claude-v1", - GoogleGeminiV1: "google-gemini-v1", -} as const; -/** - * The format of the reasoning content - */ -export type OutputReasoningItemFormat = OpenEnum< - typeof OutputReasoningItemFormat ->; - /** * An output item containing reasoning */ @@ -88,10 +73,7 @@ export type OutputReasoningItem = { * A signature for the reasoning content, used for verification */ signature?: string | null | undefined; - /** - * The format of the reasoning content - */ - format?: OutputReasoningItemFormat | null | undefined; + format?: ReasoningFormat | null | undefined; }; /** @internal */ @@ -134,12 +116,6 @@ export function outputReasoningItemStatusUnionFromJSON( ); } -/** @internal */ -export const OutputReasoningItemFormat$inboundSchema: z.ZodType< - OutputReasoningItemFormat, - unknown -> = openEnums.inboundSchema(OutputReasoningItemFormat); - /** @internal */ export const OutputReasoningItem$inboundSchema: z.ZodType< OutputReasoningItem, @@ -156,7 +132,7 @@ export const OutputReasoningItem$inboundSchema: z.ZodType< OutputReasoningItemStatusInProgress$inboundSchema, ]).optional(), signature: z.nullable(z.string()).optional(), - format: z.nullable(OutputReasoningItemFormat$inboundSchema).optional(), + format: z.nullable(ReasoningFormat$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "encrypted_content": "encryptedContent", diff --git a/src/models/outputservertoolitem.ts b/src/models/outputservertoolitem.ts index 889e2de5..9ecbd1c5 100644 --- a/src/models/outputservertoolitem.ts +++ b/src/models/outputservertoolitem.ts @@ -9,19 +9,13 @@ import { collectExtraKeys as collectExtraKeys$, safeParse, } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -export const OutputServerToolItemStatus = { - Completed: "completed", - InProgress: "in_progress", - Incomplete: "incomplete", -} as const; -export type OutputServerToolItemStatus = OpenEnum< - typeof OutputServerToolItemStatus ->; +import { + ToolCallStatus, + ToolCallStatus$inboundSchema, + ToolCallStatus$outboundSchema, +} from "./toolcallstatus.js"; /** * A generic OpenRouter server tool output item @@ -32,21 +26,10 @@ export type OutputServerToolItem = { */ type: string; id?: string | undefined; - status: OutputServerToolItemStatus; + status: ToolCallStatus; additionalProperties?: { [k: string]: any | null } | undefined; }; -/** @internal */ -export const OutputServerToolItemStatus$inboundSchema: z.ZodType< - OutputServerToolItemStatus, - unknown -> = openEnums.inboundSchema(OutputServerToolItemStatus); -/** @internal */ -export const OutputServerToolItemStatus$outboundSchema: z.ZodType< - string, - OutputServerToolItemStatus -> = openEnums.outboundSchema(OutputServerToolItemStatus); - /** @internal */ export const OutputServerToolItem$inboundSchema: z.ZodType< OutputServerToolItem, @@ -55,7 +38,7 @@ export const OutputServerToolItem$inboundSchema: z.ZodType< z.object({ type: z.string(), id: z.string().optional(), - status: OutputServerToolItemStatus$inboundSchema, + status: ToolCallStatus$inboundSchema, }).catchall(z.any()), "additionalProperties", true, @@ -75,7 +58,7 @@ export const OutputServerToolItem$outboundSchema: z.ZodType< > = z.object({ type: z.string(), id: z.string().optional(), - status: OutputServerToolItemStatus$outboundSchema, + status: ToolCallStatus$outboundSchema, additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(), }).transform((v) => { return { diff --git a/src/models/outputwebsearchcallitem.ts b/src/models/outputwebsearchcallitem.ts index c671368b..719aa467 100644 --- a/src/models/outputwebsearchcallitem.ts +++ b/src/models/outputwebsearchcallitem.ts @@ -5,9 +5,17 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + WebSearchSource, + WebSearchSource$inboundSchema, + WebSearchSource$Outbound, + WebSearchSource$outboundSchema, +} from "./websearchsource.js"; import { WebSearchStatus, WebSearchStatus$inboundSchema, @@ -30,29 +38,27 @@ export type ActionOpenPage = { url?: string | null | undefined; }; -export const TypeURL = { - Url: "url", -} as const; -export type TypeURL = ClosedEnum; - -export type Source = { - type: TypeURL; - url: string; -}; - export type ActionSearch = { type: "search"; query: string; queries?: Array | undefined; - sources?: Array | undefined; + sources?: Array | undefined; }; -export type Action = ActionSearch | ActionOpenPage | ActionFindInPage; +export type Action = + | ActionSearch + | ActionOpenPage + | ActionFindInPage + | discriminatedUnionTypes.Unknown<"type">; export type OutputWebSearchCallItem = { type: TypeWebSearchCall; id: string; - action: ActionSearch | ActionOpenPage | ActionFindInPage; + action: + | ActionSearch + | ActionOpenPage + | ActionFindInPage + | discriminatedUnionTypes.Unknown<"type">; status: WebSearchStatus; }; @@ -142,57 +148,20 @@ export function actionOpenPageFromJSON( ); } -/** @internal */ -export const TypeURL$inboundSchema: z.ZodEnum = z.enum(TypeURL); -/** @internal */ -export const TypeURL$outboundSchema: z.ZodEnum = - TypeURL$inboundSchema; - -/** @internal */ -export const Source$inboundSchema: z.ZodType = z.object({ - type: TypeURL$inboundSchema, - url: z.string(), -}); -/** @internal */ -export type Source$Outbound = { - type: string; - url: string; -}; - -/** @internal */ -export const Source$outboundSchema: z.ZodType = z - .object({ - type: TypeURL$outboundSchema, - url: z.string(), - }); - -export function sourceToJSON(source: Source): string { - return JSON.stringify(Source$outboundSchema.parse(source)); -} -export function sourceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Source$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Source' from JSON`, - ); -} - /** @internal */ export const ActionSearch$inboundSchema: z.ZodType = z .object({ type: z.literal("search"), query: z.string(), queries: z.array(z.string()).optional(), - sources: z.array(z.lazy(() => Source$inboundSchema)).optional(), + sources: z.array(WebSearchSource$inboundSchema).optional(), }); /** @internal */ export type ActionSearch$Outbound = { type: "search"; query: string; queries?: Array | undefined; - sources?: Array | undefined; + sources?: Array | undefined; }; /** @internal */ @@ -203,7 +172,7 @@ export const ActionSearch$outboundSchema: z.ZodType< type: z.literal("search"), query: z.string(), queries: z.array(z.string()).optional(), - sources: z.array(z.lazy(() => Source$outboundSchema)).optional(), + sources: z.array(WebSearchSource$outboundSchema).optional(), }); export function actionSearchToJSON(actionSearch: ActionSearch): string { @@ -220,11 +189,12 @@ export function actionSearchFromJSON( } /** @internal */ -export const Action$inboundSchema: z.ZodType = z.union([ - z.lazy(() => ActionSearch$inboundSchema), - z.lazy(() => ActionOpenPage$inboundSchema), - z.lazy(() => ActionFindInPage$inboundSchema), -]); +export const Action$inboundSchema: z.ZodType = + discriminatedUnion("type", { + search: z.lazy(() => ActionSearch$inboundSchema), + open_page: z.lazy(() => ActionOpenPage$inboundSchema), + find_in_page: z.lazy(() => ActionFindInPage$inboundSchema), + }); /** @internal */ export type Action$Outbound = | ActionSearch$Outbound @@ -259,11 +229,11 @@ export const OutputWebSearchCallItem$inboundSchema: z.ZodType< > = z.object({ type: TypeWebSearchCall$inboundSchema, id: z.string(), - action: z.union([ - z.lazy(() => ActionSearch$inboundSchema), - z.lazy(() => ActionOpenPage$inboundSchema), - z.lazy(() => ActionFindInPage$inboundSchema), - ]), + action: discriminatedUnion("type", { + search: z.lazy(() => ActionSearch$inboundSchema), + open_page: z.lazy(() => ActionOpenPage$inboundSchema), + find_in_page: z.lazy(() => ActionFindInPage$inboundSchema), + }), status: WebSearchStatus$inboundSchema, }); /** @internal */ diff --git a/src/models/percentilelatencycutoffs.ts b/src/models/percentilelatencycutoffs.ts index aea49c29..7c77bcc5 100644 --- a/src/models/percentilelatencycutoffs.ts +++ b/src/models/percentilelatencycutoffs.ts @@ -12,27 +12,27 @@ export type PercentileLatencyCutoffs = { /** * Maximum p50 latency (seconds) */ - p50?: number | null | undefined; + p50?: number | undefined; /** * Maximum p75 latency (seconds) */ - p75?: number | null | undefined; + p75?: number | undefined; /** * Maximum p90 latency (seconds) */ - p90?: number | null | undefined; + p90?: number | undefined; /** * Maximum p99 latency (seconds) */ - p99?: number | null | undefined; + p99?: number | undefined; }; /** @internal */ export type PercentileLatencyCutoffs$Outbound = { - p50?: number | null | undefined; - p75?: number | null | undefined; - p90?: number | null | undefined; - p99?: number | null | undefined; + p50?: number | undefined; + p75?: number | undefined; + p90?: number | undefined; + p99?: number | undefined; }; /** @internal */ @@ -40,10 +40,10 @@ export const PercentileLatencyCutoffs$outboundSchema: z.ZodType< PercentileLatencyCutoffs$Outbound, PercentileLatencyCutoffs > = z.object({ - p50: z.nullable(z.number()).optional(), - p75: z.nullable(z.number()).optional(), - p90: z.nullable(z.number()).optional(), - p99: z.nullable(z.number()).optional(), + p50: z.number().optional(), + p75: z.number().optional(), + p90: z.number().optional(), + p99: z.number().optional(), }); export function percentileLatencyCutoffsToJSON( diff --git a/src/models/percentilethroughputcutoffs.ts b/src/models/percentilethroughputcutoffs.ts index 64350cb9..35149cce 100644 --- a/src/models/percentilethroughputcutoffs.ts +++ b/src/models/percentilethroughputcutoffs.ts @@ -12,27 +12,27 @@ export type PercentileThroughputCutoffs = { /** * Minimum p50 throughput (tokens/sec) */ - p50?: number | null | undefined; + p50?: number | undefined; /** * Minimum p75 throughput (tokens/sec) */ - p75?: number | null | undefined; + p75?: number | undefined; /** * Minimum p90 throughput (tokens/sec) */ - p90?: number | null | undefined; + p90?: number | undefined; /** * Minimum p99 throughput (tokens/sec) */ - p99?: number | null | undefined; + p99?: number | undefined; }; /** @internal */ export type PercentileThroughputCutoffs$Outbound = { - p50?: number | null | undefined; - p75?: number | null | undefined; - p90?: number | null | undefined; - p99?: number | null | undefined; + p50?: number | undefined; + p75?: number | undefined; + p90?: number | undefined; + p99?: number | undefined; }; /** @internal */ @@ -40,10 +40,10 @@ export const PercentileThroughputCutoffs$outboundSchema: z.ZodType< PercentileThroughputCutoffs$Outbound, PercentileThroughputCutoffs > = z.object({ - p50: z.nullable(z.number()).optional(), - p75: z.nullable(z.number()).optional(), - p90: z.nullable(z.number()).optional(), - p99: z.nullable(z.number()).optional(), + p50: z.number().optional(), + p75: z.number().optional(), + p90: z.number().optional(), + p99: z.number().optional(), }); export function percentileThroughputCutoffsToJSON( diff --git a/src/models/preview20250311websearchservertool.ts b/src/models/preview20250311websearchservertool.ts index fe5f5d90..f1e84795 100644 --- a/src/models/preview20250311websearchservertool.ts +++ b/src/models/preview20250311websearchservertool.ts @@ -6,8 +6,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -21,28 +19,17 @@ import { SearchContextSizeEnum$inboundSchema, SearchContextSizeEnum$outboundSchema, } from "./searchcontextsizeenum.js"; - -/** - * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - */ -export const Preview20250311WebSearchServerToolEngine = { - Auto: "auto", - Native: "native", - Exa: "exa", - Firecrawl: "firecrawl", - Parallel: "parallel", -} as const; -/** - * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - */ -export type Preview20250311WebSearchServerToolEngine = OpenEnum< - typeof Preview20250311WebSearchServerToolEngine ->; - -export type Preview20250311WebSearchServerToolFilters = { - allowedDomains?: Array | null | undefined; - excludedDomains?: Array | null | undefined; -}; +import { + WebSearchDomainFilter, + WebSearchDomainFilter$inboundSchema, + WebSearchDomainFilter$Outbound, + WebSearchDomainFilter$outboundSchema, +} from "./websearchdomainfilter.js"; +import { + WebSearchEngineEnum, + WebSearchEngineEnum$inboundSchema, + WebSearchEngineEnum$outboundSchema, +} from "./websearchengineenum.js"; /** * Web search preview tool configuration (2025-03-11 version) @@ -57,85 +44,14 @@ export type Preview20250311WebSearchServerTool = { /** * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. */ - engine?: Preview20250311WebSearchServerToolEngine | undefined; + engine?: WebSearchEngineEnum | undefined; /** * Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. */ maxResults?: number | undefined; - filters?: Preview20250311WebSearchServerToolFilters | null | undefined; -}; - -/** @internal */ -export const Preview20250311WebSearchServerToolEngine$inboundSchema: z.ZodType< - Preview20250311WebSearchServerToolEngine, - unknown -> = openEnums.inboundSchema(Preview20250311WebSearchServerToolEngine); -/** @internal */ -export const Preview20250311WebSearchServerToolEngine$outboundSchema: z.ZodType< - string, - Preview20250311WebSearchServerToolEngine -> = openEnums.outboundSchema(Preview20250311WebSearchServerToolEngine); - -/** @internal */ -export const Preview20250311WebSearchServerToolFilters$inboundSchema: z.ZodType< - Preview20250311WebSearchServerToolFilters, - unknown -> = z.object({ - allowed_domains: z.nullable(z.array(z.string())).optional(), - excluded_domains: z.nullable(z.array(z.string())).optional(), -}).transform((v) => { - return remap$(v, { - "allowed_domains": "allowedDomains", - "excluded_domains": "excludedDomains", - }); -}); -/** @internal */ -export type Preview20250311WebSearchServerToolFilters$Outbound = { - allowed_domains?: Array | null | undefined; - excluded_domains?: Array | null | undefined; + filters?: WebSearchDomainFilter | null | undefined; }; -/** @internal */ -export const Preview20250311WebSearchServerToolFilters$outboundSchema: - z.ZodType< - Preview20250311WebSearchServerToolFilters$Outbound, - Preview20250311WebSearchServerToolFilters - > = z.object({ - allowedDomains: z.nullable(z.array(z.string())).optional(), - excludedDomains: z.nullable(z.array(z.string())).optional(), - }).transform((v) => { - return remap$(v, { - allowedDomains: "allowed_domains", - excludedDomains: "excluded_domains", - }); - }); - -export function preview20250311WebSearchServerToolFiltersToJSON( - preview20250311WebSearchServerToolFilters: - Preview20250311WebSearchServerToolFilters, -): string { - return JSON.stringify( - Preview20250311WebSearchServerToolFilters$outboundSchema.parse( - preview20250311WebSearchServerToolFilters, - ), - ); -} -export function preview20250311WebSearchServerToolFiltersFromJSON( - jsonString: string, -): SafeParseResult< - Preview20250311WebSearchServerToolFilters, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - Preview20250311WebSearchServerToolFilters$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'Preview20250311WebSearchServerToolFilters' from JSON`, - ); -} - /** @internal */ export const Preview20250311WebSearchServerTool$inboundSchema: z.ZodType< Preview20250311WebSearchServerTool, @@ -145,11 +61,9 @@ export const Preview20250311WebSearchServerTool$inboundSchema: z.ZodType< search_context_size: SearchContextSizeEnum$inboundSchema.optional(), user_location: z.nullable(PreviewWebSearchUserLocation$inboundSchema) .optional(), - engine: Preview20250311WebSearchServerToolEngine$inboundSchema.optional(), - max_results: z.number().optional(), - filters: z.nullable( - z.lazy(() => Preview20250311WebSearchServerToolFilters$inboundSchema), - ).optional(), + engine: WebSearchEngineEnum$inboundSchema.optional(), + max_results: z.int().optional(), + filters: z.nullable(WebSearchDomainFilter$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "search_context_size": "searchContextSize", @@ -164,10 +78,7 @@ export type Preview20250311WebSearchServerTool$Outbound = { user_location?: PreviewWebSearchUserLocation$Outbound | null | undefined; engine?: string | undefined; max_results?: number | undefined; - filters?: - | Preview20250311WebSearchServerToolFilters$Outbound - | null - | undefined; + filters?: WebSearchDomainFilter$Outbound | null | undefined; }; /** @internal */ @@ -179,11 +90,9 @@ export const Preview20250311WebSearchServerTool$outboundSchema: z.ZodType< searchContextSize: SearchContextSizeEnum$outboundSchema.optional(), userLocation: z.nullable(PreviewWebSearchUserLocation$outboundSchema) .optional(), - engine: Preview20250311WebSearchServerToolEngine$outboundSchema.optional(), - maxResults: z.number().optional(), - filters: z.nullable( - z.lazy(() => Preview20250311WebSearchServerToolFilters$outboundSchema), - ).optional(), + engine: WebSearchEngineEnum$outboundSchema.optional(), + maxResults: z.int().optional(), + filters: z.nullable(WebSearchDomainFilter$outboundSchema).optional(), }).transform((v) => { return remap$(v, { searchContextSize: "search_context_size", diff --git a/src/models/previewwebsearchservertool.ts b/src/models/previewwebsearchservertool.ts index d760913a..f21c0cef 100644 --- a/src/models/previewwebsearchservertool.ts +++ b/src/models/previewwebsearchservertool.ts @@ -6,8 +6,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -21,28 +19,17 @@ import { SearchContextSizeEnum$inboundSchema, SearchContextSizeEnum$outboundSchema, } from "./searchcontextsizeenum.js"; - -/** - * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - */ -export const PreviewWebSearchServerToolEngine = { - Auto: "auto", - Native: "native", - Exa: "exa", - Firecrawl: "firecrawl", - Parallel: "parallel", -} as const; -/** - * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - */ -export type PreviewWebSearchServerToolEngine = OpenEnum< - typeof PreviewWebSearchServerToolEngine ->; - -export type PreviewWebSearchServerToolFilters = { - allowedDomains?: Array | null | undefined; - excludedDomains?: Array | null | undefined; -}; +import { + WebSearchDomainFilter, + WebSearchDomainFilter$inboundSchema, + WebSearchDomainFilter$Outbound, + WebSearchDomainFilter$outboundSchema, +} from "./websearchdomainfilter.js"; +import { + WebSearchEngineEnum, + WebSearchEngineEnum$inboundSchema, + WebSearchEngineEnum$outboundSchema, +} from "./websearchengineenum.js"; /** * Web search preview tool configuration @@ -57,77 +44,14 @@ export type PreviewWebSearchServerTool = { /** * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. */ - engine?: PreviewWebSearchServerToolEngine | undefined; + engine?: WebSearchEngineEnum | undefined; /** * Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. */ maxResults?: number | undefined; - filters?: PreviewWebSearchServerToolFilters | null | undefined; -}; - -/** @internal */ -export const PreviewWebSearchServerToolEngine$inboundSchema: z.ZodType< - PreviewWebSearchServerToolEngine, - unknown -> = openEnums.inboundSchema(PreviewWebSearchServerToolEngine); -/** @internal */ -export const PreviewWebSearchServerToolEngine$outboundSchema: z.ZodType< - string, - PreviewWebSearchServerToolEngine -> = openEnums.outboundSchema(PreviewWebSearchServerToolEngine); - -/** @internal */ -export const PreviewWebSearchServerToolFilters$inboundSchema: z.ZodType< - PreviewWebSearchServerToolFilters, - unknown -> = z.object({ - allowed_domains: z.nullable(z.array(z.string())).optional(), - excluded_domains: z.nullable(z.array(z.string())).optional(), -}).transform((v) => { - return remap$(v, { - "allowed_domains": "allowedDomains", - "excluded_domains": "excludedDomains", - }); -}); -/** @internal */ -export type PreviewWebSearchServerToolFilters$Outbound = { - allowed_domains?: Array | null | undefined; - excluded_domains?: Array | null | undefined; + filters?: WebSearchDomainFilter | null | undefined; }; -/** @internal */ -export const PreviewWebSearchServerToolFilters$outboundSchema: z.ZodType< - PreviewWebSearchServerToolFilters$Outbound, - PreviewWebSearchServerToolFilters -> = z.object({ - allowedDomains: z.nullable(z.array(z.string())).optional(), - excludedDomains: z.nullable(z.array(z.string())).optional(), -}).transform((v) => { - return remap$(v, { - allowedDomains: "allowed_domains", - excludedDomains: "excluded_domains", - }); -}); - -export function previewWebSearchServerToolFiltersToJSON( - previewWebSearchServerToolFilters: PreviewWebSearchServerToolFilters, -): string { - return JSON.stringify( - PreviewWebSearchServerToolFilters$outboundSchema.parse( - previewWebSearchServerToolFilters, - ), - ); -} -export function previewWebSearchServerToolFiltersFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PreviewWebSearchServerToolFilters$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PreviewWebSearchServerToolFilters' from JSON`, - ); -} - /** @internal */ export const PreviewWebSearchServerTool$inboundSchema: z.ZodType< PreviewWebSearchServerTool, @@ -137,11 +61,9 @@ export const PreviewWebSearchServerTool$inboundSchema: z.ZodType< search_context_size: SearchContextSizeEnum$inboundSchema.optional(), user_location: z.nullable(PreviewWebSearchUserLocation$inboundSchema) .optional(), - engine: PreviewWebSearchServerToolEngine$inboundSchema.optional(), - max_results: z.number().optional(), - filters: z.nullable( - z.lazy(() => PreviewWebSearchServerToolFilters$inboundSchema), - ).optional(), + engine: WebSearchEngineEnum$inboundSchema.optional(), + max_results: z.int().optional(), + filters: z.nullable(WebSearchDomainFilter$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "search_context_size": "searchContextSize", @@ -156,7 +78,7 @@ export type PreviewWebSearchServerTool$Outbound = { user_location?: PreviewWebSearchUserLocation$Outbound | null | undefined; engine?: string | undefined; max_results?: number | undefined; - filters?: PreviewWebSearchServerToolFilters$Outbound | null | undefined; + filters?: WebSearchDomainFilter$Outbound | null | undefined; }; /** @internal */ @@ -168,11 +90,9 @@ export const PreviewWebSearchServerTool$outboundSchema: z.ZodType< searchContextSize: SearchContextSizeEnum$outboundSchema.optional(), userLocation: z.nullable(PreviewWebSearchUserLocation$outboundSchema) .optional(), - engine: PreviewWebSearchServerToolEngine$outboundSchema.optional(), - maxResults: z.number().optional(), - filters: z.nullable( - z.lazy(() => PreviewWebSearchServerToolFilters$outboundSchema), - ).optional(), + engine: WebSearchEngineEnum$outboundSchema.optional(), + maxResults: z.int().optional(), + filters: z.nullable(WebSearchDomainFilter$outboundSchema).optional(), }).transform((v) => { return remap$(v, { searchContextSize: "search_context_size", diff --git a/src/models/providerpreferences.ts b/src/models/providerpreferences.ts index d06fa3ea..0d685586 100644 --- a/src/models/providerpreferences.ts +++ b/src/models/providerpreferences.ts @@ -6,11 +6,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; -import { - DataCollection, - DataCollection$outboundSchema, -} from "./datacollection.js"; +import { OpenEnum } from "../types/enums.js"; import { PreferredMaxLatency, PreferredMaxLatency$Outbound, @@ -22,109 +18,51 @@ import { PreferredMinThroughput$outboundSchema, } from "./preferredminthroughput.js"; import { ProviderName, ProviderName$outboundSchema } from "./providername.js"; +import { ProviderSort, ProviderSort$outboundSchema } from "./providersort.js"; +import { + ProviderSortConfig, + ProviderSortConfig$Outbound, + ProviderSortConfig$outboundSchema, +} from "./providersortconfig.js"; import { Quantization, Quantization$outboundSchema } from "./quantization.js"; -export type ProviderPreferencesOrder = ProviderName | string; - -export type ProviderPreferencesOnly = ProviderName | string; - -export type ProviderPreferencesIgnore = ProviderName | string; - -export const ProviderPreferencesSortEnum = { - Price: "price", - Throughput: "throughput", - Latency: "latency", - Exacto: "exacto", -} as const; -export type ProviderPreferencesSortEnum = OpenEnum< - typeof ProviderPreferencesSortEnum ->; - -export const ProviderPreferencesProviderSortConfigEnum = { - Price: "price", - Throughput: "throughput", - Latency: "latency", - Exacto: "exacto", -} as const; -export type ProviderPreferencesProviderSortConfigEnum = ClosedEnum< - typeof ProviderPreferencesProviderSortConfigEnum ->; - -/** - * The provider sorting strategy (price, throughput, latency) - */ -export const ProviderPreferencesBy = { - Price: "price", - Throughput: "throughput", - Latency: "latency", - Exacto: "exacto", -} as const; -/** - * The provider sorting strategy (price, throughput, latency) - */ -export type ProviderPreferencesBy = OpenEnum; - /** - * Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. + * Data collection setting. If no available model provider meets the requirement, your request will return an error. + * + * @remarks + * - allow: (default) allow providers which store user data non-transiently and may train on it + * + * - deny: use only providers which do not collect user data. */ -export const ProviderPreferencesPartition = { - Model: "model", - None: "none", +export const DataCollection = { + Deny: "deny", + Allow: "allow", } as const; /** - * Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. + * Data collection setting. If no available model provider meets the requirement, your request will return an error. + * + * @remarks + * - allow: (default) allow providers which store user data non-transiently and may train on it + * + * - deny: use only providers which do not collect user data. */ -export type ProviderPreferencesPartition = OpenEnum< - typeof ProviderPreferencesPartition ->; +export type DataCollection = OpenEnum; -export type ProviderPreferencesProviderSortConfig = { - /** - * The provider sorting strategy (price, throughput, latency) - */ - by?: ProviderPreferencesBy | null | undefined; - /** - * Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. - */ - partition?: ProviderPreferencesPartition | null | undefined; -}; +export type Order = ProviderName | string; -/** - * The provider sorting strategy (price, throughput, latency) - */ -export type ProviderPreferencesProviderSortConfigUnion = - | ProviderPreferencesProviderSortConfig - | ProviderPreferencesProviderSortConfigEnum; +export type Only = ProviderName | string; -/** - * The provider sorting strategy (price, throughput, latency) - */ -export const ProviderPreferencesProviderSort = { - Price: "price", - Throughput: "throughput", - Latency: "latency", - Exacto: "exacto", -} as const; -/** - * The provider sorting strategy (price, throughput, latency) - */ -export type ProviderPreferencesProviderSort = OpenEnum< - typeof ProviderPreferencesProviderSort ->; +export type Ignore = ProviderName | string; /** * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. */ -export type ProviderPreferencesSortUnion = - | ProviderPreferencesProviderSort - | ProviderPreferencesProviderSortConfig - | ProviderPreferencesProviderSortConfigEnum - | ProviderPreferencesSortEnum; +export type Sort = ProviderSort | ProviderSortConfig | any; /** * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. */ -export type ProviderPreferencesMaxPrice = { +export type MaxPrice = { /** * Price per million prompt tokens */ @@ -136,7 +74,7 @@ export type ProviderPreferencesMaxPrice = { }; /** - * Provider routing preferences for the request. + * When multiple model providers are available, optionally indicate your routing preference. */ export type ProviderPreferences = { /** @@ -184,17 +122,14 @@ export type ProviderPreferences = { * A list of quantization levels to filter the provider by. */ quantizations?: Array | null | undefined; - sort?: - | ProviderPreferencesProviderSort - | ProviderPreferencesProviderSortConfig - | ProviderPreferencesProviderSortConfigEnum - | ProviderPreferencesSortEnum - | null - | undefined; + /** + * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. + */ + sort?: ProviderSort | ProviderSortConfig | any | null | undefined; /** * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. */ - maxPrice?: ProviderPreferencesMaxPrice | undefined; + maxPrice?: MaxPrice | undefined; /** * 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. */ @@ -206,169 +141,62 @@ export type ProviderPreferences = { }; /** @internal */ -export type ProviderPreferencesOrder$Outbound = string | string; - -/** @internal */ -export const ProviderPreferencesOrder$outboundSchema: z.ZodType< - ProviderPreferencesOrder$Outbound, - ProviderPreferencesOrder -> = z.union([ProviderName$outboundSchema, z.string()]); - -export function providerPreferencesOrderToJSON( - providerPreferencesOrder: ProviderPreferencesOrder, -): string { - return JSON.stringify( - ProviderPreferencesOrder$outboundSchema.parse(providerPreferencesOrder), - ); -} +export const DataCollection$outboundSchema: z.ZodType = + openEnums.outboundSchema(DataCollection); /** @internal */ -export type ProviderPreferencesOnly$Outbound = string | string; +export type Order$Outbound = string | string; /** @internal */ -export const ProviderPreferencesOnly$outboundSchema: z.ZodType< - ProviderPreferencesOnly$Outbound, - ProviderPreferencesOnly -> = z.union([ProviderName$outboundSchema, z.string()]); - -export function providerPreferencesOnlyToJSON( - providerPreferencesOnly: ProviderPreferencesOnly, -): string { - return JSON.stringify( - ProviderPreferencesOnly$outboundSchema.parse(providerPreferencesOnly), - ); -} - -/** @internal */ -export type ProviderPreferencesIgnore$Outbound = string | string; - -/** @internal */ -export const ProviderPreferencesIgnore$outboundSchema: z.ZodType< - ProviderPreferencesIgnore$Outbound, - ProviderPreferencesIgnore -> = z.union([ProviderName$outboundSchema, z.string()]); +export const Order$outboundSchema: z.ZodType = z.union([ + ProviderName$outboundSchema, + z.string(), +]); -export function providerPreferencesIgnoreToJSON( - providerPreferencesIgnore: ProviderPreferencesIgnore, -): string { - return JSON.stringify( - ProviderPreferencesIgnore$outboundSchema.parse(providerPreferencesIgnore), - ); +export function orderToJSON(order: Order): string { + return JSON.stringify(Order$outboundSchema.parse(order)); } /** @internal */ -export const ProviderPreferencesSortEnum$outboundSchema: z.ZodType< - string, - ProviderPreferencesSortEnum -> = openEnums.outboundSchema(ProviderPreferencesSortEnum); - -/** @internal */ -export const ProviderPreferencesProviderSortConfigEnum$outboundSchema: - z.ZodEnum = z.enum( - ProviderPreferencesProviderSortConfigEnum, - ); - -/** @internal */ -export const ProviderPreferencesBy$outboundSchema: z.ZodType< - string, - ProviderPreferencesBy -> = openEnums.outboundSchema(ProviderPreferencesBy); - -/** @internal */ -export const ProviderPreferencesPartition$outboundSchema: z.ZodType< - string, - ProviderPreferencesPartition -> = openEnums.outboundSchema(ProviderPreferencesPartition); +export type Only$Outbound = string | string; /** @internal */ -export type ProviderPreferencesProviderSortConfig$Outbound = { - by?: string | null | undefined; - partition?: string | null | undefined; -}; - -/** @internal */ -export const ProviderPreferencesProviderSortConfig$outboundSchema: z.ZodType< - ProviderPreferencesProviderSortConfig$Outbound, - ProviderPreferencesProviderSortConfig -> = z.object({ - by: z.nullable(ProviderPreferencesBy$outboundSchema).optional(), - partition: z.nullable(ProviderPreferencesPartition$outboundSchema).optional(), -}); +export const Only$outboundSchema: z.ZodType = z.union([ + ProviderName$outboundSchema, + z.string(), +]); -export function providerPreferencesProviderSortConfigToJSON( - providerPreferencesProviderSortConfig: ProviderPreferencesProviderSortConfig, -): string { - return JSON.stringify( - ProviderPreferencesProviderSortConfig$outboundSchema.parse( - providerPreferencesProviderSortConfig, - ), - ); +export function onlyToJSON(only: Only): string { + return JSON.stringify(Only$outboundSchema.parse(only)); } /** @internal */ -export type ProviderPreferencesProviderSortConfigUnion$Outbound = - | ProviderPreferencesProviderSortConfig$Outbound - | string; +export type Ignore$Outbound = string | string; /** @internal */ -export const ProviderPreferencesProviderSortConfigUnion$outboundSchema: - z.ZodType< - ProviderPreferencesProviderSortConfigUnion$Outbound, - ProviderPreferencesProviderSortConfigUnion - > = z.union([ - z.lazy(() => ProviderPreferencesProviderSortConfig$outboundSchema), - ProviderPreferencesProviderSortConfigEnum$outboundSchema, - ]); +export const Ignore$outboundSchema: z.ZodType = z + .union([ProviderName$outboundSchema, z.string()]); -export function providerPreferencesProviderSortConfigUnionToJSON( - providerPreferencesProviderSortConfigUnion: - ProviderPreferencesProviderSortConfigUnion, -): string { - return JSON.stringify( - ProviderPreferencesProviderSortConfigUnion$outboundSchema.parse( - providerPreferencesProviderSortConfigUnion, - ), - ); +export function ignoreToJSON(ignore: Ignore): string { + return JSON.stringify(Ignore$outboundSchema.parse(ignore)); } /** @internal */ -export const ProviderPreferencesProviderSort$outboundSchema: z.ZodType< - string, - ProviderPreferencesProviderSort -> = openEnums.outboundSchema(ProviderPreferencesProviderSort); - -/** @internal */ -export type ProviderPreferencesSortUnion$Outbound = - | string - | ProviderPreferencesProviderSortConfig$Outbound - | string - | string; +export type Sort$Outbound = string | ProviderSortConfig$Outbound | any; /** @internal */ -export const ProviderPreferencesSortUnion$outboundSchema: z.ZodType< - ProviderPreferencesSortUnion$Outbound, - ProviderPreferencesSortUnion -> = z.union([ - ProviderPreferencesProviderSort$outboundSchema, - z.union([ - z.lazy(() => ProviderPreferencesProviderSortConfig$outboundSchema), - ProviderPreferencesProviderSortConfigEnum$outboundSchema, - ]), - ProviderPreferencesSortEnum$outboundSchema, +export const Sort$outboundSchema: z.ZodType = z.union([ + ProviderSort$outboundSchema, + ProviderSortConfig$outboundSchema, + z.any(), ]); -export function providerPreferencesSortUnionToJSON( - providerPreferencesSortUnion: ProviderPreferencesSortUnion, -): string { - return JSON.stringify( - ProviderPreferencesSortUnion$outboundSchema.parse( - providerPreferencesSortUnion, - ), - ); +export function sortToJSON(sort: Sort): string { + return JSON.stringify(Sort$outboundSchema.parse(sort)); } /** @internal */ -export type ProviderPreferencesMaxPrice$Outbound = { +export type MaxPrice$Outbound = { prompt?: string | undefined; completion?: string | undefined; image?: string | undefined; @@ -377,25 +205,17 @@ export type ProviderPreferencesMaxPrice$Outbound = { }; /** @internal */ -export const ProviderPreferencesMaxPrice$outboundSchema: z.ZodType< - ProviderPreferencesMaxPrice$Outbound, - ProviderPreferencesMaxPrice -> = z.object({ - prompt: z.string().optional(), - completion: z.string().optional(), - image: z.string().optional(), - audio: z.string().optional(), - request: z.string().optional(), -}); +export const MaxPrice$outboundSchema: z.ZodType = z + .object({ + prompt: z.string().optional(), + completion: z.string().optional(), + image: z.string().optional(), + audio: z.string().optional(), + request: z.string().optional(), + }); -export function providerPreferencesMaxPriceToJSON( - providerPreferencesMaxPrice: ProviderPreferencesMaxPrice, -): string { - return JSON.stringify( - ProviderPreferencesMaxPrice$outboundSchema.parse( - providerPreferencesMaxPrice, - ), - ); +export function maxPriceToJSON(maxPrice: MaxPrice): string { + return JSON.stringify(MaxPrice$outboundSchema.parse(maxPrice)); } /** @internal */ @@ -409,14 +229,8 @@ export type ProviderPreferences$Outbound = { only?: Array | null | undefined; ignore?: Array | null | undefined; quantizations?: Array | null | undefined; - sort?: - | string - | ProviderPreferencesProviderSortConfig$Outbound - | string - | string - | null - | undefined; - max_price?: ProviderPreferencesMaxPrice$Outbound | undefined; + sort?: string | ProviderSortConfig$Outbound | any | null | undefined; + max_price?: MaxPrice$Outbound | undefined; preferred_min_throughput?: PreferredMinThroughput$Outbound | null | undefined; preferred_max_latency?: PreferredMaxLatency$Outbound | null | undefined; }; @@ -441,15 +255,12 @@ export const ProviderPreferences$outboundSchema: z.ZodType< quantizations: z.nullable(z.array(Quantization$outboundSchema)).optional(), sort: z.nullable( z.union([ - ProviderPreferencesProviderSort$outboundSchema, - z.union([ - z.lazy(() => ProviderPreferencesProviderSortConfig$outboundSchema), - ProviderPreferencesProviderSortConfigEnum$outboundSchema, - ]), - ProviderPreferencesSortEnum$outboundSchema, + ProviderSort$outboundSchema, + ProviderSortConfig$outboundSchema, + z.any(), ]), ).optional(), - maxPrice: z.lazy(() => ProviderPreferencesMaxPrice$outboundSchema).optional(), + maxPrice: z.lazy(() => MaxPrice$outboundSchema).optional(), preferredMinThroughput: z.nullable(PreferredMinThroughput$outboundSchema) .optional(), preferredMaxLatency: z.nullable(PreferredMaxLatency$outboundSchema) diff --git a/src/models/providerresponse.ts b/src/models/providerresponse.ts new file mode 100644 index 00000000..cff42d77 --- /dev/null +++ b/src/models/providerresponse.ts @@ -0,0 +1,199 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 7427d17a27bc + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +/** + * Name of the provider + */ +export const ProviderResponseProviderName = { + AnyScale: "AnyScale", + Atoma: "Atoma", + CentML: "Cent-ML", + CrofAI: "CrofAI", + Enfer: "Enfer", + GoPomelo: "GoPomelo", + HuggingFace: "HuggingFace", + Hyperbolic2: "Hyperbolic 2", + InoCloud: "InoCloud", + Kluster: "Kluster", + Lambda: "Lambda", + Lepton: "Lepton", + Lynn2: "Lynn 2", + Lynn: "Lynn", + Mancer: "Mancer", + Meta: "Meta", + Modal: "Modal", + Nineteen: "Nineteen", + OctoAI: "OctoAI", + Recursal: "Recursal", + Reflection: "Reflection", + Replicate: "Replicate", + SambaNova2: "SambaNova 2", + SFCompute: "SF Compute", + Targon: "Targon", + Together2: "Together 2", + Ubicloud: "Ubicloud", + OneDotAI: "01.AI", + AkashML: "AkashML", + Ai21: "AI21", + AionLabs: "AionLabs", + Alibaba: "Alibaba", + Ambient: "Ambient", + AmazonBedrock: "Amazon Bedrock", + AmazonNova: "Amazon Nova", + Anthropic: "Anthropic", + ArceeAI: "Arcee AI", + AtlasCloud: "AtlasCloud", + Avian: "Avian", + Azure: "Azure", + BaseTen: "BaseTen", + BytePlus: "BytePlus", + BlackForestLabs: "Black Forest Labs", + Cerebras: "Cerebras", + Chutes: "Chutes", + Cirrascale: "Cirrascale", + Clarifai: "Clarifai", + Cloudflare: "Cloudflare", + Cohere: "Cohere", + Crusoe: "Crusoe", + DeepInfra: "DeepInfra", + DeepSeek: "DeepSeek", + Featherless: "Featherless", + Fireworks: "Fireworks", + Friendli: "Friendli", + GMICloud: "GMICloud", + Google: "Google", + GoogleAIStudio: "Google AI Studio", + Groq: "Groq", + Hyperbolic: "Hyperbolic", + Inception: "Inception", + Inceptron: "Inceptron", + InferenceNet: "InferenceNet", + Ionstream: "Ionstream", + Infermatic: "Infermatic", + IoNet: "Io Net", + Inflection: "Inflection", + Liquid: "Liquid", + Mara: "Mara", + Mancer2: "Mancer 2", + Minimax: "Minimax", + ModelRun: "ModelRun", + Mistral: "Mistral", + Modular: "Modular", + MoonshotAI: "Moonshot AI", + Morph: "Morph", + NCompass: "NCompass", + Nebius: "Nebius", + NextBit: "NextBit", + Novita: "Novita", + Nvidia: "Nvidia", + OpenAI: "OpenAI", + OpenInference: "OpenInference", + Parasail: "Parasail", + Perplexity: "Perplexity", + Phala: "Phala", + Reka: "Reka", + Relace: "Relace", + SambaNova: "SambaNova", + Seed: "Seed", + SiliconFlow: "SiliconFlow", + Sourceful: "Sourceful", + StepFun: "StepFun", + Stealth: "Stealth", + StreamLake: "StreamLake", + Switchpoint: "Switchpoint", + Together: "Together", + Upstage: "Upstage", + Venice: "Venice", + WandB: "WandB", + Xiaomi: "Xiaomi", + XAI: "xAI", + ZAi: "Z.AI", + FakeProvider: "FakeProvider", +} as const; +/** + * Name of the provider + */ +export type ProviderResponseProviderName = OpenEnum< + typeof ProviderResponseProviderName +>; + +/** + * Details of a provider response for a generation attempt + */ +export type ProviderResponse = { + /** + * Upstream provider response identifier + */ + id?: string | undefined; + /** + * Internal endpoint identifier + */ + endpointId?: string | undefined; + /** + * Canonical model slug + */ + modelPermaslug?: string | undefined; + /** + * Name of the provider + */ + providerName?: ProviderResponseProviderName | undefined; + /** + * HTTP status code from the provider + */ + status: number | null; + /** + * Response latency in milliseconds + */ + latency?: number | undefined; + /** + * Whether the request used a bring-your-own-key + */ + isByok?: boolean | undefined; +}; + +/** @internal */ +export const ProviderResponseProviderName$inboundSchema: z.ZodType< + ProviderResponseProviderName, + unknown +> = openEnums.inboundSchema(ProviderResponseProviderName); + +/** @internal */ +export const ProviderResponse$inboundSchema: z.ZodType< + ProviderResponse, + unknown +> = z.object({ + id: z.string().optional(), + endpoint_id: z.string().optional(), + model_permaslug: z.string().optional(), + provider_name: ProviderResponseProviderName$inboundSchema.optional(), + status: z.nullable(z.number()), + latency: z.number().optional(), + is_byok: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "endpoint_id": "endpointId", + "model_permaslug": "modelPermaslug", + "provider_name": "providerName", + "is_byok": "isByok", + }); +}); + +export function providerResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ProviderResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ProviderResponse' from JSON`, + ); +} diff --git a/src/models/publicendpoint.ts b/src/models/publicendpoint.ts index 01ca674a..69e1256e 100644 --- a/src/models/publicendpoint.ts +++ b/src/models/publicendpoint.ts @@ -68,11 +68,19 @@ export type PublicEndpoint = { providerName: ProviderName; tag: string; quantization: PublicEndpointQuantization | null; - maxCompletionTokens: number | null; - maxPromptTokens: number | null; + maxCompletionTokens: number; + maxPromptTokens: number; supportedParameters: Array; status?: EndpointStatus | undefined; - uptimeLast30m: number | null; + uptimeLast30m: number; + /** + * Uptime percentage over the last 5 minutes, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data. + */ + uptimeLast5m: number; + /** + * Uptime percentage over the last 1 day, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data. + */ + uptimeLast1d: number; supportsImplicitCaching: boolean; /** * Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. @@ -132,16 +140,18 @@ export const PublicEndpoint$inboundSchema: z.ZodType = name: z.string(), model_id: z.string(), model_name: z.string(), - context_length: z.number(), + context_length: z.int(), pricing: z.lazy(() => Pricing$inboundSchema), provider_name: ProviderName$inboundSchema, tag: z.string(), quantization: z.nullable(PublicEndpointQuantization$inboundSchema), - max_completion_tokens: z.nullable(z.number()), - max_prompt_tokens: z.nullable(z.number()), + max_completion_tokens: z.int(), + max_prompt_tokens: z.int(), supported_parameters: z.array(Parameter$inboundSchema), status: EndpointStatus$inboundSchema.optional(), - uptime_last_30m: z.nullable(z.number()), + uptime_last_30m: z.number(), + uptime_last_5m: z.number(), + uptime_last_1d: z.number(), supports_implicit_caching: z.boolean(), latency_last_30m: z.nullable(PercentileStats$inboundSchema), throughput_last_30m: z.nullable(PercentileStats$inboundSchema), @@ -155,6 +165,8 @@ export const PublicEndpoint$inboundSchema: z.ZodType = "max_prompt_tokens": "maxPromptTokens", "supported_parameters": "supportedParameters", "uptime_last_30m": "uptimeLast30m", + "uptime_last_5m": "uptimeLast5m", + "uptime_last_1d": "uptimeLast1d", "supports_implicit_caching": "supportsImplicitCaching", "latency_last_30m": "latencyLast30m", "throughput_last_30m": "throughputLast30m", diff --git a/src/models/reasoningconfig.ts b/src/models/reasoningconfig.ts index d471de6d..823db555 100644 --- a/src/models/reasoningconfig.ts +++ b/src/models/reasoningconfig.ts @@ -6,21 +6,21 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { - ReasoningEffortEnum, - ReasoningEffortEnum$outboundSchema, -} from "./reasoningeffortenum.js"; + ReasoningEffort, + ReasoningEffort$outboundSchema, +} from "./reasoningeffort.js"; import { - ReasoningSummaryVerbosityEnum, - ReasoningSummaryVerbosityEnum$outboundSchema, -} from "./reasoningsummaryverbosityenum.js"; + ReasoningSummaryVerbosity, + ReasoningSummaryVerbosity$outboundSchema, +} from "./reasoningsummaryverbosity.js"; /** * Configuration for reasoning mode in the response */ export type ReasoningConfig = { - effort?: ReasoningEffortEnum | null | undefined; - summary?: ReasoningSummaryVerbosityEnum | null | undefined; - maxTokens?: number | null | undefined; + effort?: ReasoningEffort | null | undefined; + summary?: ReasoningSummaryVerbosity | null | undefined; + maxTokens?: number | undefined; enabled?: boolean | null | undefined; }; @@ -28,7 +28,7 @@ export type ReasoningConfig = { export type ReasoningConfig$Outbound = { effort?: string | null | undefined; summary?: string | null | undefined; - max_tokens?: number | null | undefined; + max_tokens?: number | undefined; enabled?: boolean | null | undefined; }; @@ -37,9 +37,9 @@ export const ReasoningConfig$outboundSchema: z.ZodType< ReasoningConfig$Outbound, ReasoningConfig > = z.object({ - effort: z.nullable(ReasoningEffortEnum$outboundSchema).optional(), - summary: z.nullable(ReasoningSummaryVerbosityEnum$outboundSchema).optional(), - maxTokens: z.nullable(z.number()).optional(), + effort: z.nullable(ReasoningEffort$outboundSchema).optional(), + summary: z.nullable(ReasoningSummaryVerbosity$outboundSchema).optional(), + maxTokens: z.int().optional(), enabled: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { diff --git a/src/models/reasoningdeltaevent.ts b/src/models/reasoningdeltaevent.ts index 8091842f..3d2d6c4d 100644 --- a/src/models/reasoningdeltaevent.ts +++ b/src/models/reasoningdeltaevent.ts @@ -27,11 +27,11 @@ export const ReasoningDeltaEvent$inboundSchema: z.ZodType< unknown > = z.object({ type: z.literal("response.reasoning_text.delta"), - output_index: z.number(), + output_index: z.int(), item_id: z.string(), - content_index: z.number(), + content_index: z.int(), delta: z.string(), - sequence_number: z.number(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "output_index": "outputIndex", diff --git a/src/models/reasoningdetailencrypted.ts b/src/models/reasoningdetailencrypted.ts index 8f8217ed..c8c104e2 100644 --- a/src/models/reasoningdetailencrypted.ts +++ b/src/models/reasoningdetailencrypted.ts @@ -5,22 +5,13 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -export const ReasoningDetailEncryptedFormat = { - Unknown: "unknown", - OpenaiResponsesV1: "openai-responses-v1", - AzureOpenaiResponsesV1: "azure-openai-responses-v1", - XaiResponsesV1: "xai-responses-v1", - AnthropicClaudeV1: "anthropic-claude-v1", - GoogleGeminiV1: "google-gemini-v1", -} as const; -export type ReasoningDetailEncryptedFormat = OpenEnum< - typeof ReasoningDetailEncryptedFormat ->; +import { + ReasoningFormat, + ReasoningFormat$inboundSchema, + ReasoningFormat$outboundSchema, +} from "./reasoningformat.js"; /** * Reasoning detail encrypted schema @@ -29,21 +20,10 @@ export type ReasoningDetailEncrypted = { type: "reasoning.encrypted"; data: string; id?: string | null | undefined; - format?: ReasoningDetailEncryptedFormat | null | undefined; + format?: ReasoningFormat | null | undefined; index?: number | undefined; }; -/** @internal */ -export const ReasoningDetailEncryptedFormat$inboundSchema: z.ZodType< - ReasoningDetailEncryptedFormat, - unknown -> = openEnums.inboundSchema(ReasoningDetailEncryptedFormat); -/** @internal */ -export const ReasoningDetailEncryptedFormat$outboundSchema: z.ZodType< - string, - ReasoningDetailEncryptedFormat -> = openEnums.outboundSchema(ReasoningDetailEncryptedFormat); - /** @internal */ export const ReasoningDetailEncrypted$inboundSchema: z.ZodType< ReasoningDetailEncrypted, @@ -52,8 +32,8 @@ export const ReasoningDetailEncrypted$inboundSchema: z.ZodType< type: z.literal("reasoning.encrypted"), data: z.string(), id: z.nullable(z.string()).optional(), - format: z.nullable(ReasoningDetailEncryptedFormat$inboundSchema).optional(), - index: z.number().optional(), + format: z.nullable(ReasoningFormat$inboundSchema).optional(), + index: z.int().optional(), }); /** @internal */ export type ReasoningDetailEncrypted$Outbound = { @@ -72,8 +52,8 @@ export const ReasoningDetailEncrypted$outboundSchema: z.ZodType< type: z.literal("reasoning.encrypted"), data: z.string(), id: z.nullable(z.string()).optional(), - format: z.nullable(ReasoningDetailEncryptedFormat$outboundSchema).optional(), - index: z.number().optional(), + format: z.nullable(ReasoningFormat$outboundSchema).optional(), + index: z.int().optional(), }); export function reasoningDetailEncryptedToJSON( diff --git a/src/models/reasoningdetailsummary.ts b/src/models/reasoningdetailsummary.ts index 4370c07c..109570fd 100644 --- a/src/models/reasoningdetailsummary.ts +++ b/src/models/reasoningdetailsummary.ts @@ -5,22 +5,13 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -export const ReasoningDetailSummaryFormat = { - Unknown: "unknown", - OpenaiResponsesV1: "openai-responses-v1", - AzureOpenaiResponsesV1: "azure-openai-responses-v1", - XaiResponsesV1: "xai-responses-v1", - AnthropicClaudeV1: "anthropic-claude-v1", - GoogleGeminiV1: "google-gemini-v1", -} as const; -export type ReasoningDetailSummaryFormat = OpenEnum< - typeof ReasoningDetailSummaryFormat ->; +import { + ReasoningFormat, + ReasoningFormat$inboundSchema, + ReasoningFormat$outboundSchema, +} from "./reasoningformat.js"; /** * Reasoning detail summary schema @@ -29,21 +20,10 @@ export type ReasoningDetailSummary = { type: "reasoning.summary"; summary: string; id?: string | null | undefined; - format?: ReasoningDetailSummaryFormat | null | undefined; + format?: ReasoningFormat | null | undefined; index?: number | undefined; }; -/** @internal */ -export const ReasoningDetailSummaryFormat$inboundSchema: z.ZodType< - ReasoningDetailSummaryFormat, - unknown -> = openEnums.inboundSchema(ReasoningDetailSummaryFormat); -/** @internal */ -export const ReasoningDetailSummaryFormat$outboundSchema: z.ZodType< - string, - ReasoningDetailSummaryFormat -> = openEnums.outboundSchema(ReasoningDetailSummaryFormat); - /** @internal */ export const ReasoningDetailSummary$inboundSchema: z.ZodType< ReasoningDetailSummary, @@ -52,8 +32,8 @@ export const ReasoningDetailSummary$inboundSchema: z.ZodType< type: z.literal("reasoning.summary"), summary: z.string(), id: z.nullable(z.string()).optional(), - format: z.nullable(ReasoningDetailSummaryFormat$inboundSchema).optional(), - index: z.number().optional(), + format: z.nullable(ReasoningFormat$inboundSchema).optional(), + index: z.int().optional(), }); /** @internal */ export type ReasoningDetailSummary$Outbound = { @@ -72,8 +52,8 @@ export const ReasoningDetailSummary$outboundSchema: z.ZodType< type: z.literal("reasoning.summary"), summary: z.string(), id: z.nullable(z.string()).optional(), - format: z.nullable(ReasoningDetailSummaryFormat$outboundSchema).optional(), - index: z.number().optional(), + format: z.nullable(ReasoningFormat$outboundSchema).optional(), + index: z.int().optional(), }); export function reasoningDetailSummaryToJSON( diff --git a/src/models/reasoningdetailtext.ts b/src/models/reasoningdetailtext.ts index 4735b882..6bd7ab24 100644 --- a/src/models/reasoningdetailtext.ts +++ b/src/models/reasoningdetailtext.ts @@ -5,22 +5,13 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -export const ReasoningDetailTextFormat = { - Unknown: "unknown", - OpenaiResponsesV1: "openai-responses-v1", - AzureOpenaiResponsesV1: "azure-openai-responses-v1", - XaiResponsesV1: "xai-responses-v1", - AnthropicClaudeV1: "anthropic-claude-v1", - GoogleGeminiV1: "google-gemini-v1", -} as const; -export type ReasoningDetailTextFormat = OpenEnum< - typeof ReasoningDetailTextFormat ->; +import { + ReasoningFormat, + ReasoningFormat$inboundSchema, + ReasoningFormat$outboundSchema, +} from "./reasoningformat.js"; /** * Reasoning detail text schema @@ -30,21 +21,10 @@ export type ReasoningDetailText = { text?: string | null | undefined; signature?: string | null | undefined; id?: string | null | undefined; - format?: ReasoningDetailTextFormat | null | undefined; + format?: ReasoningFormat | null | undefined; index?: number | undefined; }; -/** @internal */ -export const ReasoningDetailTextFormat$inboundSchema: z.ZodType< - ReasoningDetailTextFormat, - unknown -> = openEnums.inboundSchema(ReasoningDetailTextFormat); -/** @internal */ -export const ReasoningDetailTextFormat$outboundSchema: z.ZodType< - string, - ReasoningDetailTextFormat -> = openEnums.outboundSchema(ReasoningDetailTextFormat); - /** @internal */ export const ReasoningDetailText$inboundSchema: z.ZodType< ReasoningDetailText, @@ -54,8 +34,8 @@ export const ReasoningDetailText$inboundSchema: z.ZodType< text: z.nullable(z.string()).optional(), signature: z.nullable(z.string()).optional(), id: z.nullable(z.string()).optional(), - format: z.nullable(ReasoningDetailTextFormat$inboundSchema).optional(), - index: z.number().optional(), + format: z.nullable(ReasoningFormat$inboundSchema).optional(), + index: z.int().optional(), }); /** @internal */ export type ReasoningDetailText$Outbound = { @@ -76,8 +56,8 @@ export const ReasoningDetailText$outboundSchema: z.ZodType< text: z.nullable(z.string()).optional(), signature: z.nullable(z.string()).optional(), id: z.nullable(z.string()).optional(), - format: z.nullable(ReasoningDetailTextFormat$outboundSchema).optional(), - index: z.number().optional(), + format: z.nullable(ReasoningFormat$outboundSchema).optional(), + index: z.int().optional(), }); export function reasoningDetailTextToJSON( diff --git a/src/models/reasoningdetailunion.ts b/src/models/reasoningdetailunion.ts index 08cb14ea..eb264380 100644 --- a/src/models/reasoningdetailunion.ts +++ b/src/models/reasoningdetailunion.ts @@ -5,6 +5,8 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -32,17 +34,18 @@ import { export type ReasoningDetailUnion = | ReasoningDetailSummary | ReasoningDetailEncrypted - | ReasoningDetailText; + | ReasoningDetailText + | discriminatedUnionTypes.Unknown<"type">; /** @internal */ export const ReasoningDetailUnion$inboundSchema: z.ZodType< ReasoningDetailUnion, unknown -> = z.union([ - ReasoningDetailSummary$inboundSchema, - ReasoningDetailEncrypted$inboundSchema, - ReasoningDetailText$inboundSchema, -]); +> = discriminatedUnion("type", { + ["reasoning.summary"]: ReasoningDetailSummary$inboundSchema, + ["reasoning.encrypted"]: ReasoningDetailEncrypted$inboundSchema, + ["reasoning.text"]: ReasoningDetailText$inboundSchema, +}); /** @internal */ export type ReasoningDetailUnion$Outbound = | ReasoningDetailSummary$Outbound diff --git a/src/models/reasoningdoneevent.ts b/src/models/reasoningdoneevent.ts index 2f44cfa0..2019f7c6 100644 --- a/src/models/reasoningdoneevent.ts +++ b/src/models/reasoningdoneevent.ts @@ -27,11 +27,11 @@ export const ReasoningDoneEvent$inboundSchema: z.ZodType< unknown > = z.object({ type: z.literal("response.reasoning_text.done"), - output_index: z.number(), + output_index: z.int(), item_id: z.string(), - content_index: z.number(), + content_index: z.int(), text: z.string(), - sequence_number: z.number(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "output_index": "outputIndex", diff --git a/src/models/reasoningeffort.ts b/src/models/reasoningeffort.ts new file mode 100644 index 00000000..2804617c --- /dev/null +++ b/src/models/reasoningeffort.ts @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: dd747014f9d3 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +export const ReasoningEffort = { + Xhigh: "xhigh", + High: "high", + Medium: "medium", + Low: "low", + Minimal: "minimal", + None: "none", +} as const; +export type ReasoningEffort = OpenEnum; + +/** @internal */ +export const ReasoningEffort$inboundSchema: z.ZodType< + ReasoningEffort, + unknown +> = openEnums.inboundSchema(ReasoningEffort); +/** @internal */ +export const ReasoningEffort$outboundSchema: z.ZodType< + string, + ReasoningEffort +> = openEnums.outboundSchema(ReasoningEffort); diff --git a/src/models/reasoningeffortenum.ts b/src/models/reasoningeffortenum.ts deleted file mode 100644 index 931b6ef9..00000000 --- a/src/models/reasoningeffortenum.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 9559eb443bab - */ - -import * as z from "zod/v4"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; - -export const ReasoningEffortEnum = { - Xhigh: "xhigh", - High: "high", - Medium: "medium", - Low: "low", - Minimal: "minimal", - None: "none", -} as const; -export type ReasoningEffortEnum = OpenEnum; - -/** @internal */ -export const ReasoningEffortEnum$inboundSchema: z.ZodType< - ReasoningEffortEnum, - unknown -> = openEnums.inboundSchema(ReasoningEffortEnum); -/** @internal */ -export const ReasoningEffortEnum$outboundSchema: z.ZodType< - string, - ReasoningEffortEnum -> = openEnums.outboundSchema(ReasoningEffortEnum); diff --git a/src/models/reasoningformat.ts b/src/models/reasoningformat.ts new file mode 100644 index 00000000..4e550e5c --- /dev/null +++ b/src/models/reasoningformat.ts @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: b523cf757168 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +export const ReasoningFormat = { + Unknown: "unknown", + OpenaiResponsesV1: "openai-responses-v1", + AzureOpenaiResponsesV1: "azure-openai-responses-v1", + XaiResponsesV1: "xai-responses-v1", + AnthropicClaudeV1: "anthropic-claude-v1", + GoogleGeminiV1: "google-gemini-v1", +} as const; +export type ReasoningFormat = OpenEnum; + +/** @internal */ +export const ReasoningFormat$inboundSchema: z.ZodType< + ReasoningFormat, + unknown +> = openEnums.inboundSchema(ReasoningFormat); +/** @internal */ +export const ReasoningFormat$outboundSchema: z.ZodType< + string, + ReasoningFormat +> = openEnums.outboundSchema(ReasoningFormat); diff --git a/src/models/reasoningitem.ts b/src/models/reasoningitem.ts index 0c680d0f..709e9e74 100644 --- a/src/models/reasoningitem.ts +++ b/src/models/reasoningitem.ts @@ -5,8 +5,11 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { ClosedEnum } from "../types/enums.js"; +import { + ReasoningFormat, + ReasoningFormat$outboundSchema, +} from "./reasoningformat.js"; import { ReasoningSummaryText, ReasoningSummaryText$Outbound, @@ -49,16 +52,6 @@ export type ReasoningItemStatusUnion = | ReasoningItemStatusIncomplete | ReasoningItemStatusInProgress; -export const ReasoningItemFormat = { - Unknown: "unknown", - OpenaiResponsesV1: "openai-responses-v1", - AzureOpenaiResponsesV1: "azure-openai-responses-v1", - XaiResponsesV1: "xai-responses-v1", - AnthropicClaudeV1: "anthropic-claude-v1", - GoogleGeminiV1: "google-gemini-v1", -} as const; -export type ReasoningItemFormat = OpenEnum; - /** * Reasoning output item with signature and format extensions */ @@ -74,7 +67,7 @@ export type ReasoningItem = { | ReasoningItemStatusInProgress | undefined; signature?: string | null | undefined; - format?: ReasoningItemFormat | null | undefined; + format?: ReasoningFormat | null | undefined; }; /** @internal */ @@ -118,12 +111,6 @@ export function reasoningItemStatusUnionToJSON( ); } -/** @internal */ -export const ReasoningItemFormat$outboundSchema: z.ZodType< - string, - ReasoningItemFormat -> = openEnums.outboundSchema(ReasoningItemFormat); - /** @internal */ export type ReasoningItem$Outbound = { type: string; @@ -152,7 +139,7 @@ export const ReasoningItem$outboundSchema: z.ZodType< ReasoningItemStatusInProgress$outboundSchema, ]).optional(), signature: z.nullable(z.string()).optional(), - format: z.nullable(ReasoningItemFormat$outboundSchema).optional(), + format: z.nullable(ReasoningFormat$outboundSchema).optional(), }).transform((v) => { return remap$(v, { encryptedContent: "encrypted_content", diff --git a/src/models/reasoningsummarypartaddedevent.ts b/src/models/reasoningsummarypartaddedevent.ts index 1cda44b2..13e17b8f 100644 --- a/src/models/reasoningsummarypartaddedevent.ts +++ b/src/models/reasoningsummarypartaddedevent.ts @@ -31,11 +31,11 @@ export const ReasoningSummaryPartAddedEvent$inboundSchema: z.ZodType< unknown > = z.object({ type: z.literal("response.reasoning_summary_part.added"), - output_index: z.number(), + output_index: z.int(), item_id: z.string(), - summary_index: z.number(), + summary_index: z.int(), part: ReasoningSummaryText$inboundSchema, - sequence_number: z.number(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "output_index": "outputIndex", diff --git a/src/models/reasoningsummarypartdoneevent.ts b/src/models/reasoningsummarypartdoneevent.ts index 851b09e9..08abf7fb 100644 --- a/src/models/reasoningsummarypartdoneevent.ts +++ b/src/models/reasoningsummarypartdoneevent.ts @@ -31,11 +31,11 @@ export const ReasoningSummaryPartDoneEvent$inboundSchema: z.ZodType< unknown > = z.object({ type: z.literal("response.reasoning_summary_part.done"), - output_index: z.number(), + output_index: z.int(), item_id: z.string(), - summary_index: z.number(), + summary_index: z.int(), part: ReasoningSummaryText$inboundSchema, - sequence_number: z.number(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "output_index": "outputIndex", diff --git a/src/models/reasoningsummarytextdeltaevent.ts b/src/models/reasoningsummarytextdeltaevent.ts index b93846ca..99a2bf34 100644 --- a/src/models/reasoningsummarytextdeltaevent.ts +++ b/src/models/reasoningsummarytextdeltaevent.ts @@ -28,10 +28,10 @@ export const ReasoningSummaryTextDeltaEvent$inboundSchema: z.ZodType< > = z.object({ type: z.literal("response.reasoning_summary_text.delta"), item_id: z.string(), - output_index: z.number(), - summary_index: z.number(), + output_index: z.int(), + summary_index: z.int(), delta: z.string(), - sequence_number: z.number(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/reasoningsummarytextdoneevent.ts b/src/models/reasoningsummarytextdoneevent.ts index 61d4c4f1..d4dff946 100644 --- a/src/models/reasoningsummarytextdoneevent.ts +++ b/src/models/reasoningsummarytextdoneevent.ts @@ -28,10 +28,10 @@ export const ReasoningSummaryTextDoneEvent$inboundSchema: z.ZodType< > = z.object({ type: z.literal("response.reasoning_summary_text.done"), item_id: z.string(), - output_index: z.number(), - summary_index: z.number(), + output_index: z.int(), + summary_index: z.int(), text: z.string(), - sequence_number: z.number(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/reasoningsummaryverbosity.ts b/src/models/reasoningsummaryverbosity.ts new file mode 100644 index 00000000..58291795 --- /dev/null +++ b/src/models/reasoningsummaryverbosity.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: a51c85f04729 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +export const ReasoningSummaryVerbosity = { + Auto: "auto", + Concise: "concise", + Detailed: "detailed", +} as const; +export type ReasoningSummaryVerbosity = OpenEnum< + typeof ReasoningSummaryVerbosity +>; + +/** @internal */ +export const ReasoningSummaryVerbosity$inboundSchema: z.ZodType< + ReasoningSummaryVerbosity, + unknown +> = openEnums.inboundSchema(ReasoningSummaryVerbosity); +/** @internal */ +export const ReasoningSummaryVerbosity$outboundSchema: z.ZodType< + string, + ReasoningSummaryVerbosity +> = openEnums.outboundSchema(ReasoningSummaryVerbosity); diff --git a/src/models/reasoningsummaryverbosityenum.ts b/src/models/reasoningsummaryverbosityenum.ts deleted file mode 100644 index d24150d5..00000000 --- a/src/models/reasoningsummaryverbosityenum.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 2d2055f25ddc - */ - -import * as z from "zod/v4"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; - -export const ReasoningSummaryVerbosityEnum = { - Auto: "auto", - Concise: "concise", - Detailed: "detailed", -} as const; -export type ReasoningSummaryVerbosityEnum = OpenEnum< - typeof ReasoningSummaryVerbosityEnum ->; - -/** @internal */ -export const ReasoningSummaryVerbosityEnum$inboundSchema: z.ZodType< - ReasoningSummaryVerbosityEnum, - unknown -> = openEnums.inboundSchema(ReasoningSummaryVerbosityEnum); -/** @internal */ -export const ReasoningSummaryVerbosityEnum$outboundSchema: z.ZodType< - string, - ReasoningSummaryVerbosityEnum -> = openEnums.outboundSchema(ReasoningSummaryVerbosityEnum); diff --git a/src/models/refusaldeltaevent.ts b/src/models/refusaldeltaevent.ts index 72b72f16..ca05f749 100644 --- a/src/models/refusaldeltaevent.ts +++ b/src/models/refusaldeltaevent.ts @@ -27,11 +27,11 @@ export const RefusalDeltaEvent$inboundSchema: z.ZodType< unknown > = z.object({ type: z.literal("response.refusal.delta"), - output_index: z.number(), + output_index: z.int(), item_id: z.string(), - content_index: z.number(), + content_index: z.int(), delta: z.string(), - sequence_number: z.number(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "output_index": "outputIndex", diff --git a/src/models/refusaldoneevent.ts b/src/models/refusaldoneevent.ts index 16621be5..b8421904 100644 --- a/src/models/refusaldoneevent.ts +++ b/src/models/refusaldoneevent.ts @@ -27,11 +27,11 @@ export const RefusalDoneEvent$inboundSchema: z.ZodType< unknown > = z.object({ type: z.literal("response.refusal.done"), - output_index: z.number(), + output_index: z.int(), item_id: z.string(), - content_index: z.number(), + content_index: z.int(), refusal: z.string(), - sequence_number: z.number(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "output_index": "outputIndex", diff --git a/src/models/responsehealingplugin.ts b/src/models/responsehealingplugin.ts new file mode 100644 index 00000000..3433a192 --- /dev/null +++ b/src/models/responsehealingplugin.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 622c12ba88e2 + */ + +import * as z from "zod/v4"; + +export type ResponseHealingPlugin = { + id: "response-healing"; + /** + * Set to false to disable the response-healing plugin for this request. Defaults to true. + */ + enabled?: boolean | undefined; +}; + +/** @internal */ +export type ResponseHealingPlugin$Outbound = { + id: "response-healing"; + enabled?: boolean | undefined; +}; + +/** @internal */ +export const ResponseHealingPlugin$outboundSchema: z.ZodType< + ResponseHealingPlugin$Outbound, + ResponseHealingPlugin +> = z.object({ + id: z.literal("response-healing"), + enabled: z.boolean().optional(), +}); + +export function responseHealingPluginToJSON( + responseHealingPlugin: ResponseHealingPlugin, +): string { + return JSON.stringify( + ResponseHealingPlugin$outboundSchema.parse(responseHealingPlugin), + ); +} diff --git a/src/models/responseoutputtext.ts b/src/models/responseoutputtext.ts index d97cb115..ae3795d4 100644 --- a/src/models/responseoutputtext.ts +++ b/src/models/responseoutputtext.ts @@ -21,7 +21,7 @@ export type ResponseOutputTextTopLogprob = { logprob: number; }; -export type ResponseOutputTextLogprob = { +export type Logprob = { token: string; bytes: Array; logprob: number; @@ -32,7 +32,7 @@ export type ResponseOutputText = { type: "output_text"; text: string; annotations?: Array | undefined; - logprobs?: Array | undefined; + logprobs?: Array | undefined; }; /** @internal */ @@ -41,7 +41,7 @@ export const ResponseOutputTextTopLogprob$inboundSchema: z.ZodType< unknown > = z.object({ token: z.string(), - bytes: z.array(z.number()), + bytes: z.array(z.int()), logprob: z.number(), }); /** @internal */ @@ -57,7 +57,7 @@ export const ResponseOutputTextTopLogprob$outboundSchema: z.ZodType< ResponseOutputTextTopLogprob > = z.object({ token: z.string(), - bytes: z.array(z.number()), + bytes: z.array(z.int()), logprob: z.number(), }); @@ -81,12 +81,9 @@ export function responseOutputTextTopLogprobFromJSON( } /** @internal */ -export const ResponseOutputTextLogprob$inboundSchema: z.ZodType< - ResponseOutputTextLogprob, - unknown -> = z.object({ +export const Logprob$inboundSchema: z.ZodType = z.object({ token: z.string(), - bytes: z.array(z.number()), + bytes: z.array(z.int()), logprob: z.number(), top_logprobs: z.array( z.lazy(() => ResponseOutputTextTopLogprob$inboundSchema), @@ -97,7 +94,7 @@ export const ResponseOutputTextLogprob$inboundSchema: z.ZodType< }); }); /** @internal */ -export type ResponseOutputTextLogprob$Outbound = { +export type Logprob$Outbound = { token: string; bytes: Array; logprob: number; @@ -105,36 +102,30 @@ export type ResponseOutputTextLogprob$Outbound = { }; /** @internal */ -export const ResponseOutputTextLogprob$outboundSchema: z.ZodType< - ResponseOutputTextLogprob$Outbound, - ResponseOutputTextLogprob -> = z.object({ - token: z.string(), - bytes: z.array(z.number()), - logprob: z.number(), - topLogprobs: z.array( - z.lazy(() => ResponseOutputTextTopLogprob$outboundSchema), - ), -}).transform((v) => { - return remap$(v, { - topLogprobs: "top_logprobs", +export const Logprob$outboundSchema: z.ZodType = z + .object({ + token: z.string(), + bytes: z.array(z.int()), + logprob: z.number(), + topLogprobs: z.array( + z.lazy(() => ResponseOutputTextTopLogprob$outboundSchema), + ), + }).transform((v) => { + return remap$(v, { + topLogprobs: "top_logprobs", + }); }); -}); -export function responseOutputTextLogprobToJSON( - responseOutputTextLogprob: ResponseOutputTextLogprob, -): string { - return JSON.stringify( - ResponseOutputTextLogprob$outboundSchema.parse(responseOutputTextLogprob), - ); +export function logprobToJSON(logprob: Logprob): string { + return JSON.stringify(Logprob$outboundSchema.parse(logprob)); } -export function responseOutputTextLogprobFromJSON( +export function logprobFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => ResponseOutputTextLogprob$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ResponseOutputTextLogprob' from JSON`, + (x) => Logprob$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Logprob' from JSON`, ); } @@ -146,15 +137,14 @@ export const ResponseOutputText$inboundSchema: z.ZodType< type: z.literal("output_text"), text: z.string(), annotations: z.array(OpenAIResponsesAnnotation$inboundSchema).optional(), - logprobs: z.array(z.lazy(() => ResponseOutputTextLogprob$inboundSchema)) - .optional(), + logprobs: z.array(z.lazy(() => Logprob$inboundSchema)).optional(), }); /** @internal */ export type ResponseOutputText$Outbound = { type: "output_text"; text: string; annotations?: Array | undefined; - logprobs?: Array | undefined; + logprobs?: Array | undefined; }; /** @internal */ @@ -165,8 +155,7 @@ export const ResponseOutputText$outboundSchema: z.ZodType< type: z.literal("output_text"), text: z.string(), annotations: z.array(OpenAIResponsesAnnotation$outboundSchema).optional(), - logprobs: z.array(z.lazy(() => ResponseOutputTextLogprob$outboundSchema)) - .optional(), + logprobs: z.array(z.lazy(() => Logprob$outboundSchema)).optional(), }); export function responseOutputTextToJSON( diff --git a/src/models/responsesrequest.ts b/src/models/responsesrequest.ts index 0b44340d..cb8afba7 100644 --- a/src/models/responsesrequest.ts +++ b/src/models/responsesrequest.ts @@ -12,6 +12,11 @@ import { ApplyPatchServerTool$Outbound, ApplyPatchServerTool$outboundSchema, } from "./applypatchservertool.js"; +import { + AutoRouterPlugin, + AutoRouterPlugin$Outbound, + AutoRouterPlugin$outboundSchema, +} from "./autorouterplugin.js"; import { CodeInterpreterServerTool, CodeInterpreterServerTool$Outbound, @@ -28,23 +33,25 @@ import { ComputerUseServerTool$outboundSchema, } from "./computeruseservertool.js"; import { - ContextCompressionEngine, - ContextCompressionEngine$outboundSchema, -} from "./contextcompressionengine.js"; + ContextCompressionPlugin, + ContextCompressionPlugin$Outbound, + ContextCompressionPlugin$outboundSchema, +} from "./contextcompressionplugin.js"; import { CustomTool, CustomTool$Outbound, CustomTool$outboundSchema, } from "./customtool.js"; -import { - DataCollection, - DataCollection$outboundSchema, -} from "./datacollection.js"; import { DatetimeServerTool, DatetimeServerTool$Outbound, DatetimeServerTool$outboundSchema, } from "./datetimeservertool.js"; +import { + FileParserPlugin, + FileParserPlugin$Outbound, + FileParserPlugin$outboundSchema, +} from "./fileparserplugin.js"; import { FileSearchServerTool, FileSearchServerTool$Outbound, @@ -70,6 +77,11 @@ import { McpServerTool$Outbound, McpServerTool$outboundSchema, } from "./mcpservertool.js"; +import { + ModerationPlugin, + ModerationPlugin$Outbound, + ModerationPlugin$outboundSchema, +} from "./moderationplugin.js"; import { OpenAIResponsesToolChoiceUnion, OpenAIResponsesToolChoiceUnion$Outbound, @@ -83,21 +95,6 @@ import { OutputModalityEnum, OutputModalityEnum$outboundSchema, } from "./outputmodalityenum.js"; -import { - PDFParserOptions, - PDFParserOptions$Outbound, - PDFParserOptions$outboundSchema, -} from "./pdfparseroptions.js"; -import { - PreferredMaxLatency, - PreferredMaxLatency$Outbound, - PreferredMaxLatency$outboundSchema, -} from "./preferredmaxlatency.js"; -import { - PreferredMinThroughput, - PreferredMinThroughput$Outbound, - PreferredMinThroughput$outboundSchema, -} from "./preferredminthroughput.js"; import { Preview20250311WebSearchServerTool, Preview20250311WebSearchServerTool$Outbound, @@ -108,19 +105,21 @@ import { PreviewWebSearchServerTool$Outbound, PreviewWebSearchServerTool$outboundSchema, } from "./previewwebsearchservertool.js"; -import { ProviderName, ProviderName$outboundSchema } from "./providername.js"; -import { ProviderSort, ProviderSort$outboundSchema } from "./providersort.js"; import { - ProviderSortConfig, - ProviderSortConfig$Outbound, - ProviderSortConfig$outboundSchema, -} from "./providersortconfig.js"; -import { Quantization, Quantization$outboundSchema } from "./quantization.js"; + ProviderPreferences, + ProviderPreferences$Outbound, + ProviderPreferences$outboundSchema, +} from "./providerpreferences.js"; import { ReasoningConfig, ReasoningConfig$Outbound, ReasoningConfig$outboundSchema, } from "./reasoningconfig.js"; +import { + ResponseHealingPlugin, + ResponseHealingPlugin$Outbound, + ResponseHealingPlugin$outboundSchema, +} from "./responsehealingplugin.js"; import { ResponseIncludesEnum, ResponseIncludesEnum$outboundSchema, @@ -141,9 +140,15 @@ import { TextExtendedConfig$outboundSchema, } from "./textextendedconfig.js"; import { - WebSearchEngine, - WebSearchEngine$outboundSchema, -} from "./websearchengine.js"; + TraceConfig, + TraceConfig$Outbound, + TraceConfig$outboundSchema, +} from "./traceconfig.js"; +import { + WebSearchPlugin, + WebSearchPlugin$Outbound, + WebSearchPlugin$outboundSchema, +} from "./websearchplugin.js"; import { WebSearchServerTool, WebSearchServerTool$Outbound, @@ -197,187 +202,13 @@ export type ResponsesRequestServiceTier = OpenEnum< typeof ResponsesRequestServiceTier >; -export type ResponsesRequestOrder = ProviderName | string; - -export type ResponsesRequestOnly = ProviderName | string; - -export type ResponsesRequestIgnore = ProviderName | string; - -/** - * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. - */ -export type ResponsesRequestSort = ProviderSort | ProviderSortConfig | any; - -/** - * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. - */ -export type ResponsesRequestMaxPrice = { - /** - * Price per million prompt tokens - */ - prompt?: string | undefined; - completion?: string | undefined; - image?: string | undefined; - audio?: string | undefined; - request?: string | undefined; -}; - -/** - * When multiple model providers are available, optionally indicate your routing preference. - */ -export type ResponsesRequestProvider = { - /** - * Whether to allow backup providers to serve requests - * - * @remarks - * - 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. - */ - allowFallbacks?: boolean | null | undefined; - /** - * 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. - */ - requireParameters?: boolean | null | undefined; - /** - * Data collection setting. If no available model provider meets the requirement, your request will return an error. - * - * @remarks - * - allow: (default) allow providers which store user data non-transiently and may train on it - * - * - deny: use only providers which do not collect user data. - */ - dataCollection?: DataCollection | null | undefined; - /** - * Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. - */ - zdr?: boolean | null | undefined; - /** - * Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. - */ - enforceDistillableText?: boolean | null | undefined; - /** - * 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?: Array | null | undefined; - /** - * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. - */ - only?: Array | null | undefined; - /** - * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. - */ - ignore?: Array | null | undefined; - /** - * A list of quantization levels to filter the provider by. - */ - quantizations?: Array | null | undefined; - /** - * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. - */ - sort?: ProviderSort | ProviderSortConfig | any | null | undefined; - /** - * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. - */ - maxPrice?: ResponsesRequestMaxPrice | undefined; - /** - * 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. - */ - preferredMinThroughput?: PreferredMinThroughput | null | undefined; - /** - * 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. - */ - preferredMaxLatency?: PreferredMaxLatency | null | undefined; -}; - -export type ResponsesRequestPluginContextCompression = { - id: "context-compression"; - /** - * Set to false to disable the context-compression plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; - /** - * The compression engine to use. Defaults to "middle-out". - */ - engine?: ContextCompressionEngine | undefined; -}; - -export type ResponsesRequestPluginResponseHealing = { - id: "response-healing"; - /** - * Set to false to disable the response-healing plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; -}; - -export type ResponsesRequestPluginFileParser = { - id: "file-parser"; - /** - * Set to false to disable the file-parser plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; - /** - * Options for PDF parsing. - */ - pdf?: PDFParserOptions | undefined; -}; - -export type ResponsesRequestPluginWeb = { - id: "web"; - /** - * Set to false to disable the web-search plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; - maxResults?: number | undefined; - searchPrompt?: string | undefined; - /** - * The search engine to use for web search. - */ - engine?: WebSearchEngine | undefined; - /** - * A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). - */ - includeDomains?: Array | undefined; - /** - * A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). - */ - excludeDomains?: Array | undefined; -}; - -export type ResponsesRequestPluginModeration = { - id: "moderation"; -}; - -export type ResponsesRequestPluginAutoRouter = { - id: "auto-router"; - /** - * Set to false to disable the auto-router plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; - /** - * 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. - */ - allowedModels?: Array | undefined; -}; - -export type ResponsesRequestPluginUnion = - | ResponsesRequestPluginAutoRouter - | ResponsesRequestPluginModeration - | ResponsesRequestPluginWeb - | ResponsesRequestPluginFileParser - | ResponsesRequestPluginResponseHealing - | ResponsesRequestPluginContextCompression; - -/** - * Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. - */ -export type ResponsesRequestTrace = { - traceId?: string | undefined; - traceName?: string | undefined; - spanName?: string | undefined; - generationName?: string | undefined; - parentSpanId?: string | undefined; - additionalProperties?: { [k: string]: any | null } | undefined; -}; +export type ResponsesRequestPlugin = + | AutoRouterPlugin + | ModerationPlugin + | WebSearchPlugin + | FileParserPlugin + | ResponseHealingPlugin + | ContextCompressionPlugin; /** * Request schema for Responses endpoint @@ -424,13 +255,13 @@ export type ResponsesRequest = { * Configuration for reasoning mode in the response */ reasoning?: ReasoningConfig | null | undefined; - maxOutputTokens?: number | null | undefined; - temperature?: number | null | undefined; - topP?: number | null | undefined; - topLogprobs?: number | null | undefined; - maxToolCalls?: number | null | undefined; - presencePenalty?: number | null | undefined; - frequencyPenalty?: number | null | undefined; + maxOutputTokens?: number | undefined; + temperature?: number | undefined; + topP?: number | undefined; + topLogprobs?: number | undefined; + maxToolCalls?: number | undefined; + presencePenalty?: number | undefined; + frequencyPenalty?: number | undefined; topK?: number | undefined; /** * Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. @@ -453,18 +284,18 @@ export type ResponsesRequest = { /** * When multiple model providers are available, optionally indicate your routing preference. */ - provider?: ResponsesRequestProvider | null | undefined; + provider?: ProviderPreferences | null | undefined; /** * Plugins you want to enable for this request, including their settings. */ plugins?: | Array< - | ResponsesRequestPluginAutoRouter - | ResponsesRequestPluginModeration - | ResponsesRequestPluginWeb - | ResponsesRequestPluginFileParser - | ResponsesRequestPluginResponseHealing - | ResponsesRequestPluginContextCompression + | AutoRouterPlugin + | ModerationPlugin + | WebSearchPlugin + | FileParserPlugin + | ResponseHealingPlugin + | ContextCompressionPlugin > | undefined; /** @@ -478,7 +309,7 @@ export type ResponsesRequest = { /** * Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. */ - trace?: ResponsesRequestTrace | undefined; + trace?: TraceConfig | undefined; }; /** @internal */ @@ -590,422 +421,32 @@ export const ResponsesRequestServiceTier$outboundSchema: z.ZodType< > = openEnums.outboundSchema(ResponsesRequestServiceTier); /** @internal */ -export type ResponsesRequestOrder$Outbound = string | string; - -/** @internal */ -export const ResponsesRequestOrder$outboundSchema: z.ZodType< - ResponsesRequestOrder$Outbound, - ResponsesRequestOrder -> = z.union([ProviderName$outboundSchema, z.string()]); - -export function responsesRequestOrderToJSON( - responsesRequestOrder: ResponsesRequestOrder, -): string { - return JSON.stringify( - ResponsesRequestOrder$outboundSchema.parse(responsesRequestOrder), - ); -} - -/** @internal */ -export type ResponsesRequestOnly$Outbound = string | string; - -/** @internal */ -export const ResponsesRequestOnly$outboundSchema: z.ZodType< - ResponsesRequestOnly$Outbound, - ResponsesRequestOnly -> = z.union([ProviderName$outboundSchema, z.string()]); - -export function responsesRequestOnlyToJSON( - responsesRequestOnly: ResponsesRequestOnly, -): string { - return JSON.stringify( - ResponsesRequestOnly$outboundSchema.parse(responsesRequestOnly), - ); -} - -/** @internal */ -export type ResponsesRequestIgnore$Outbound = string | string; - -/** @internal */ -export const ResponsesRequestIgnore$outboundSchema: z.ZodType< - ResponsesRequestIgnore$Outbound, - ResponsesRequestIgnore -> = z.union([ProviderName$outboundSchema, z.string()]); - -export function responsesRequestIgnoreToJSON( - responsesRequestIgnore: ResponsesRequestIgnore, -): string { - return JSON.stringify( - ResponsesRequestIgnore$outboundSchema.parse(responsesRequestIgnore), - ); -} - -/** @internal */ -export type ResponsesRequestSort$Outbound = - | string - | ProviderSortConfig$Outbound - | any; - -/** @internal */ -export const ResponsesRequestSort$outboundSchema: z.ZodType< - ResponsesRequestSort$Outbound, - ResponsesRequestSort -> = z.union([ - ProviderSort$outboundSchema, - ProviderSortConfig$outboundSchema, - z.any(), -]); - -export function responsesRequestSortToJSON( - responsesRequestSort: ResponsesRequestSort, -): string { - return JSON.stringify( - ResponsesRequestSort$outboundSchema.parse(responsesRequestSort), - ); -} - -/** @internal */ -export type ResponsesRequestMaxPrice$Outbound = { - prompt?: string | undefined; - completion?: string | undefined; - image?: string | undefined; - audio?: string | undefined; - request?: string | undefined; -}; - -/** @internal */ -export const ResponsesRequestMaxPrice$outboundSchema: z.ZodType< - ResponsesRequestMaxPrice$Outbound, - ResponsesRequestMaxPrice -> = z.object({ - prompt: z.string().optional(), - completion: z.string().optional(), - image: z.string().optional(), - audio: z.string().optional(), - request: z.string().optional(), -}); - -export function responsesRequestMaxPriceToJSON( - responsesRequestMaxPrice: ResponsesRequestMaxPrice, -): string { - return JSON.stringify( - ResponsesRequestMaxPrice$outboundSchema.parse(responsesRequestMaxPrice), - ); -} - -/** @internal */ -export type ResponsesRequestProvider$Outbound = { - allow_fallbacks?: boolean | null | undefined; - require_parameters?: boolean | null | undefined; - data_collection?: string | null | undefined; - zdr?: boolean | null | undefined; - enforce_distillable_text?: boolean | null | undefined; - order?: Array | null | undefined; - only?: Array | null | undefined; - ignore?: Array | null | undefined; - quantizations?: Array | null | undefined; - sort?: string | ProviderSortConfig$Outbound | any | null | undefined; - max_price?: ResponsesRequestMaxPrice$Outbound | undefined; - preferred_min_throughput?: PreferredMinThroughput$Outbound | null | undefined; - preferred_max_latency?: PreferredMaxLatency$Outbound | null | undefined; -}; - -/** @internal */ -export const ResponsesRequestProvider$outboundSchema: z.ZodType< - ResponsesRequestProvider$Outbound, - ResponsesRequestProvider -> = z.object({ - allowFallbacks: z.nullable(z.boolean()).optional(), - requireParameters: z.nullable(z.boolean()).optional(), - dataCollection: z.nullable(DataCollection$outboundSchema).optional(), - zdr: z.nullable(z.boolean()).optional(), - enforceDistillableText: z.nullable(z.boolean()).optional(), - order: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()]))) - .optional(), - only: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()]))) - .optional(), - ignore: z.nullable( - z.array(z.union([ProviderName$outboundSchema, z.string()])), - ).optional(), - quantizations: z.nullable(z.array(Quantization$outboundSchema)).optional(), - sort: z.nullable( - z.union([ - ProviderSort$outboundSchema, - ProviderSortConfig$outboundSchema, - z.any(), - ]), - ).optional(), - maxPrice: z.lazy(() => ResponsesRequestMaxPrice$outboundSchema).optional(), - preferredMinThroughput: z.nullable(PreferredMinThroughput$outboundSchema) - .optional(), - preferredMaxLatency: z.nullable(PreferredMaxLatency$outboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - allowFallbacks: "allow_fallbacks", - requireParameters: "require_parameters", - dataCollection: "data_collection", - enforceDistillableText: "enforce_distillable_text", - maxPrice: "max_price", - preferredMinThroughput: "preferred_min_throughput", - preferredMaxLatency: "preferred_max_latency", - }); -}); - -export function responsesRequestProviderToJSON( - responsesRequestProvider: ResponsesRequestProvider, -): string { - return JSON.stringify( - ResponsesRequestProvider$outboundSchema.parse(responsesRequestProvider), - ); -} - -/** @internal */ -export type ResponsesRequestPluginContextCompression$Outbound = { - id: "context-compression"; - enabled?: boolean | undefined; - engine?: string | undefined; -}; - -/** @internal */ -export const ResponsesRequestPluginContextCompression$outboundSchema: z.ZodType< - ResponsesRequestPluginContextCompression$Outbound, - ResponsesRequestPluginContextCompression -> = z.object({ - id: z.literal("context-compression"), - enabled: z.boolean().optional(), - engine: ContextCompressionEngine$outboundSchema.optional(), -}); - -export function responsesRequestPluginContextCompressionToJSON( - responsesRequestPluginContextCompression: - ResponsesRequestPluginContextCompression, -): string { - return JSON.stringify( - ResponsesRequestPluginContextCompression$outboundSchema.parse( - responsesRequestPluginContextCompression, - ), - ); -} - -/** @internal */ -export type ResponsesRequestPluginResponseHealing$Outbound = { - id: "response-healing"; - enabled?: boolean | undefined; -}; - -/** @internal */ -export const ResponsesRequestPluginResponseHealing$outboundSchema: z.ZodType< - ResponsesRequestPluginResponseHealing$Outbound, - ResponsesRequestPluginResponseHealing -> = z.object({ - id: z.literal("response-healing"), - enabled: z.boolean().optional(), -}); - -export function responsesRequestPluginResponseHealingToJSON( - responsesRequestPluginResponseHealing: ResponsesRequestPluginResponseHealing, -): string { - return JSON.stringify( - ResponsesRequestPluginResponseHealing$outboundSchema.parse( - responsesRequestPluginResponseHealing, - ), - ); -} - -/** @internal */ -export type ResponsesRequestPluginFileParser$Outbound = { - id: "file-parser"; - enabled?: boolean | undefined; - pdf?: PDFParserOptions$Outbound | undefined; -}; - -/** @internal */ -export const ResponsesRequestPluginFileParser$outboundSchema: z.ZodType< - ResponsesRequestPluginFileParser$Outbound, - ResponsesRequestPluginFileParser -> = z.object({ - id: z.literal("file-parser"), - enabled: z.boolean().optional(), - pdf: PDFParserOptions$outboundSchema.optional(), -}); - -export function responsesRequestPluginFileParserToJSON( - responsesRequestPluginFileParser: ResponsesRequestPluginFileParser, -): string { - return JSON.stringify( - ResponsesRequestPluginFileParser$outboundSchema.parse( - responsesRequestPluginFileParser, - ), - ); -} +export type ResponsesRequestPlugin$Outbound = + | AutoRouterPlugin$Outbound + | ModerationPlugin$Outbound + | WebSearchPlugin$Outbound + | FileParserPlugin$Outbound + | ResponseHealingPlugin$Outbound + | ContextCompressionPlugin$Outbound; /** @internal */ -export type ResponsesRequestPluginWeb$Outbound = { - id: "web"; - enabled?: boolean | undefined; - max_results?: number | undefined; - search_prompt?: string | undefined; - engine?: string | undefined; - include_domains?: Array | undefined; - exclude_domains?: Array | undefined; -}; - -/** @internal */ -export const ResponsesRequestPluginWeb$outboundSchema: z.ZodType< - ResponsesRequestPluginWeb$Outbound, - ResponsesRequestPluginWeb -> = z.object({ - id: z.literal("web"), - enabled: z.boolean().optional(), - maxResults: z.number().optional(), - searchPrompt: z.string().optional(), - engine: WebSearchEngine$outboundSchema.optional(), - includeDomains: z.array(z.string()).optional(), - excludeDomains: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - maxResults: "max_results", - searchPrompt: "search_prompt", - includeDomains: "include_domains", - excludeDomains: "exclude_domains", - }); -}); - -export function responsesRequestPluginWebToJSON( - responsesRequestPluginWeb: ResponsesRequestPluginWeb, -): string { - return JSON.stringify( - ResponsesRequestPluginWeb$outboundSchema.parse(responsesRequestPluginWeb), - ); -} - -/** @internal */ -export type ResponsesRequestPluginModeration$Outbound = { - id: "moderation"; -}; - -/** @internal */ -export const ResponsesRequestPluginModeration$outboundSchema: z.ZodType< - ResponsesRequestPluginModeration$Outbound, - ResponsesRequestPluginModeration -> = z.object({ - id: z.literal("moderation"), -}); - -export function responsesRequestPluginModerationToJSON( - responsesRequestPluginModeration: ResponsesRequestPluginModeration, -): string { - return JSON.stringify( - ResponsesRequestPluginModeration$outboundSchema.parse( - responsesRequestPluginModeration, - ), - ); -} - -/** @internal */ -export type ResponsesRequestPluginAutoRouter$Outbound = { - id: "auto-router"; - enabled?: boolean | undefined; - allowed_models?: Array | undefined; -}; - -/** @internal */ -export const ResponsesRequestPluginAutoRouter$outboundSchema: z.ZodType< - ResponsesRequestPluginAutoRouter$Outbound, - ResponsesRequestPluginAutoRouter -> = z.object({ - id: z.literal("auto-router"), - enabled: z.boolean().optional(), - allowedModels: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - allowedModels: "allowed_models", - }); -}); - -export function responsesRequestPluginAutoRouterToJSON( - responsesRequestPluginAutoRouter: ResponsesRequestPluginAutoRouter, -): string { - return JSON.stringify( - ResponsesRequestPluginAutoRouter$outboundSchema.parse( - responsesRequestPluginAutoRouter, - ), - ); -} - -/** @internal */ -export type ResponsesRequestPluginUnion$Outbound = - | ResponsesRequestPluginAutoRouter$Outbound - | ResponsesRequestPluginModeration$Outbound - | ResponsesRequestPluginWeb$Outbound - | ResponsesRequestPluginFileParser$Outbound - | ResponsesRequestPluginResponseHealing$Outbound - | ResponsesRequestPluginContextCompression$Outbound; - -/** @internal */ -export const ResponsesRequestPluginUnion$outboundSchema: z.ZodType< - ResponsesRequestPluginUnion$Outbound, - ResponsesRequestPluginUnion +export const ResponsesRequestPlugin$outboundSchema: z.ZodType< + ResponsesRequestPlugin$Outbound, + ResponsesRequestPlugin > = z.union([ - z.lazy(() => ResponsesRequestPluginAutoRouter$outboundSchema), - z.lazy(() => ResponsesRequestPluginModeration$outboundSchema), - z.lazy(() => ResponsesRequestPluginWeb$outboundSchema), - z.lazy(() => ResponsesRequestPluginFileParser$outboundSchema), - z.lazy(() => ResponsesRequestPluginResponseHealing$outboundSchema), - z.lazy(() => ResponsesRequestPluginContextCompression$outboundSchema), + AutoRouterPlugin$outboundSchema, + ModerationPlugin$outboundSchema, + WebSearchPlugin$outboundSchema, + FileParserPlugin$outboundSchema, + ResponseHealingPlugin$outboundSchema, + ContextCompressionPlugin$outboundSchema, ]); -export function responsesRequestPluginUnionToJSON( - responsesRequestPluginUnion: ResponsesRequestPluginUnion, -): string { - return JSON.stringify( - ResponsesRequestPluginUnion$outboundSchema.parse( - responsesRequestPluginUnion, - ), - ); -} - -/** @internal */ -export type ResponsesRequestTrace$Outbound = { - trace_id?: string | undefined; - trace_name?: string | undefined; - span_name?: string | undefined; - generation_name?: string | undefined; - parent_span_id?: string | undefined; - [additionalProperties: string]: unknown; -}; - -/** @internal */ -export const ResponsesRequestTrace$outboundSchema: z.ZodType< - ResponsesRequestTrace$Outbound, - ResponsesRequestTrace -> = z.object({ - traceId: z.string().optional(), - traceName: z.string().optional(), - spanName: z.string().optional(), - generationName: z.string().optional(), - parentSpanId: z.string().optional(), - additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(), -}).transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - traceId: "trace_id", - traceName: "trace_name", - spanName: "span_name", - generationName: "generation_name", - parentSpanId: "parent_span_id", - additionalProperties: null, - }), - }; -}); - -export function responsesRequestTraceToJSON( - responsesRequestTrace: ResponsesRequestTrace, +export function responsesRequestPluginToJSON( + responsesRequestPlugin: ResponsesRequestPlugin, ): string { return JSON.stringify( - ResponsesRequestTrace$outboundSchema.parse(responsesRequestTrace), + ResponsesRequestPlugin$outboundSchema.parse(responsesRequestPlugin), ); } @@ -1040,13 +481,13 @@ export type ResponsesRequest$Outbound = { models?: Array | undefined; text?: TextExtendedConfig$Outbound | undefined; reasoning?: ReasoningConfig$Outbound | null | undefined; - max_output_tokens?: number | null | undefined; - temperature?: number | null | undefined; - top_p?: number | null | undefined; - top_logprobs?: number | null | undefined; - max_tool_calls?: number | null | undefined; - presence_penalty?: number | null | undefined; - frequency_penalty?: number | null | undefined; + max_output_tokens?: number | undefined; + temperature?: number | undefined; + top_p?: number | undefined; + top_logprobs?: number | undefined; + max_tool_calls?: number | undefined; + presence_penalty?: number | undefined; + frequency_penalty?: number | undefined; top_k?: number | undefined; image_config?: { [k: string]: string | number } | undefined; modalities?: Array | undefined; @@ -1060,20 +501,20 @@ export type ResponsesRequest$Outbound = { service_tier: string | null; truncation?: string | null | undefined; stream: boolean; - provider?: ResponsesRequestProvider$Outbound | null | undefined; + provider?: ProviderPreferences$Outbound | null | undefined; plugins?: | Array< - | ResponsesRequestPluginAutoRouter$Outbound - | ResponsesRequestPluginModeration$Outbound - | ResponsesRequestPluginWeb$Outbound - | ResponsesRequestPluginFileParser$Outbound - | ResponsesRequestPluginResponseHealing$Outbound - | ResponsesRequestPluginContextCompression$Outbound + | AutoRouterPlugin$Outbound + | ModerationPlugin$Outbound + | WebSearchPlugin$Outbound + | FileParserPlugin$Outbound + | ResponseHealingPlugin$Outbound + | ContextCompressionPlugin$Outbound > | undefined; user?: string | undefined; session_id?: string | undefined; - trace?: ResponsesRequestTrace$Outbound | undefined; + trace?: TraceConfig$Outbound | undefined; }; /** @internal */ @@ -1112,14 +553,14 @@ export const ResponsesRequest$outboundSchema: z.ZodType< models: z.array(z.string()).optional(), text: TextExtendedConfig$outboundSchema.optional(), reasoning: z.nullable(ReasoningConfig$outboundSchema).optional(), - maxOutputTokens: z.nullable(z.number()).optional(), - temperature: z.nullable(z.number()).optional(), - topP: z.nullable(z.number()).optional(), - topLogprobs: z.nullable(z.int()).optional(), - maxToolCalls: z.nullable(z.int()).optional(), - presencePenalty: z.nullable(z.number()).optional(), - frequencyPenalty: z.nullable(z.number()).optional(), - topK: z.number().optional(), + maxOutputTokens: z.int().optional(), + temperature: z.number().optional(), + topP: z.number().optional(), + topLogprobs: z.int().optional(), + maxToolCalls: z.int().optional(), + presencePenalty: z.number().optional(), + frequencyPenalty: z.number().optional(), + topK: z.int().optional(), imageConfig: z.record(z.string(), z.union([z.string(), z.number()])) .optional(), modalities: z.array(OutputModalityEnum$outboundSchema).optional(), @@ -1135,21 +576,20 @@ export const ResponsesRequest$outboundSchema: z.ZodType< ), truncation: z.nullable(OpenAIResponsesTruncation$outboundSchema).optional(), stream: z.boolean().default(false), - provider: z.nullable(z.lazy(() => ResponsesRequestProvider$outboundSchema)) - .optional(), + provider: z.nullable(ProviderPreferences$outboundSchema).optional(), plugins: z.array( z.union([ - z.lazy(() => ResponsesRequestPluginAutoRouter$outboundSchema), - z.lazy(() => ResponsesRequestPluginModeration$outboundSchema), - z.lazy(() => ResponsesRequestPluginWeb$outboundSchema), - z.lazy(() => ResponsesRequestPluginFileParser$outboundSchema), - z.lazy(() => ResponsesRequestPluginResponseHealing$outboundSchema), - z.lazy(() => ResponsesRequestPluginContextCompression$outboundSchema), + AutoRouterPlugin$outboundSchema, + ModerationPlugin$outboundSchema, + WebSearchPlugin$outboundSchema, + FileParserPlugin$outboundSchema, + ResponseHealingPlugin$outboundSchema, + ContextCompressionPlugin$outboundSchema, ]), ).optional(), user: z.string().optional(), sessionId: z.string().optional(), - trace: z.lazy(() => ResponsesRequestTrace$outboundSchema).optional(), + trace: TraceConfig$outboundSchema.optional(), }).transform((v) => { return remap$(v, { toolChoice: "tool_choice", diff --git a/src/models/searchqualitylevel.ts b/src/models/searchqualitylevel.ts new file mode 100644 index 00000000..4a8a3b53 --- /dev/null +++ b/src/models/searchqualitylevel.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3f28e436c1e6 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +/** + * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + */ +export const SearchQualityLevel = { + Low: "low", + Medium: "medium", + High: "high", +} as const; +/** + * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + */ +export type SearchQualityLevel = OpenEnum; + +/** @internal */ +export const SearchQualityLevel$outboundSchema: z.ZodType< + string, + SearchQualityLevel +> = openEnums.outboundSchema(SearchQualityLevel); diff --git a/src/models/streamevents.ts b/src/models/streamevents.ts index a6ae1445..9621bd92 100644 --- a/src/models/streamevents.ts +++ b/src/models/streamevents.ts @@ -4,8 +4,9 @@ */ import * as z from "zod/v4"; -import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { AnnotationAddedEvent, @@ -46,10 +47,13 @@ import { ImageGenCallPartialImageEvent$inboundSchema, } from "./imagegencallpartialimageevent.js"; import { - OpenResponsesResult, - OpenResponsesResult$inboundSchema, -} from "./openresponsesresult.js"; -import { OutputItems, OutputItems$inboundSchema } from "./outputitems.js"; + OpenResponsesCreatedEvent, + OpenResponsesCreatedEvent$inboundSchema, +} from "./openresponsescreatedevent.js"; +import { + OpenResponsesInProgressEvent, + OpenResponsesInProgressEvent$inboundSchema, +} from "./openresponsesinprogressevent.js"; import { ReasoningDeltaEvent, ReasoningDeltaEvent$inboundSchema, @@ -82,6 +86,26 @@ import { RefusalDoneEvent, RefusalDoneEvent$inboundSchema, } from "./refusaldoneevent.js"; +import { + StreamEventsResponseCompleted, + StreamEventsResponseCompleted$inboundSchema, +} from "./streameventsresponsecompleted.js"; +import { + StreamEventsResponseFailed, + StreamEventsResponseFailed$inboundSchema, +} from "./streameventsresponsefailed.js"; +import { + StreamEventsResponseIncomplete, + StreamEventsResponseIncomplete$inboundSchema, +} from "./streameventsresponseincomplete.js"; +import { + StreamEventsResponseOutputItemAdded, + StreamEventsResponseOutputItemAdded$inboundSchema, +} from "./streameventsresponseoutputitemadded.js"; +import { + StreamEventsResponseOutputItemDone, + StreamEventsResponseOutputItemDone$inboundSchema, +} from "./streameventsresponseoutputitemdone.js"; import { TextDeltaEvent, TextDeltaEvent$inboundSchema, @@ -100,98 +124,12 @@ import { WebSearchCallSearchingEvent$inboundSchema, } from "./websearchcallsearchingevent.js"; -/** - * Event emitted when an output item is complete - */ -export type StreamEventsResponseOutputItemDone = { - type: "response.output_item.done"; - outputIndex: number; - /** - * An output item from the response - */ - item: OutputItems; - sequenceNumber: number; -}; - -/** - * Event emitted when a new output item is added to the response - */ -export type StreamEventsResponseOutputItemAdded = { - type: "response.output_item.added"; - outputIndex: number; - /** - * An output item from the response - */ - item: OutputItems; - sequenceNumber: number; -}; - -/** - * Event emitted when a response has failed - */ -export type StreamEventsResponseFailed = { - type: "response.failed"; - /** - * Complete non-streaming response from the Responses API - */ - response: OpenResponsesResult; - sequenceNumber: number; -}; - -/** - * Event emitted when a response is incomplete - */ -export type StreamEventsResponseIncomplete = { - type: "response.incomplete"; - /** - * Complete non-streaming response from the Responses API - */ - response: OpenResponsesResult; - sequenceNumber: number; -}; - -/** - * Event emitted when a response has completed successfully - */ -export type StreamEventsResponseCompleted = { - type: "response.completed"; - /** - * Complete non-streaming response from the Responses API - */ - response: OpenResponsesResult; - sequenceNumber: number; -}; - -/** - * Event emitted when a response is in progress - */ -export type StreamEventsResponseInProgress = { - type: "response.in_progress"; - /** - * Complete non-streaming response from the Responses API - */ - response: OpenResponsesResult; - sequenceNumber: number; -}; - -/** - * Event emitted when a response is created - */ -export type StreamEventsResponseCreated = { - type: "response.created"; - /** - * Complete non-streaming response from the Responses API - */ - response: OpenResponsesResult; - sequenceNumber: number; -}; - /** * Union of all possible event types emitted during response streaming */ export type StreamEvents = - | StreamEventsResponseCreated - | StreamEventsResponseInProgress + | OpenResponsesCreatedEvent + | OpenResponsesInProgressEvent | StreamEventsResponseCompleted | StreamEventsResponseIncomplete | StreamEventsResponseFailed @@ -219,216 +157,59 @@ export type StreamEvents = | ImageGenCallCompletedEvent | WebSearchCallInProgressEvent | WebSearchCallSearchingEvent - | WebSearchCallCompletedEvent; + | WebSearchCallCompletedEvent + | discriminatedUnionTypes.Unknown<"type">; /** @internal */ -export const StreamEventsResponseOutputItemDone$inboundSchema: z.ZodType< - StreamEventsResponseOutputItemDone, - unknown -> = z.object({ - type: z.literal("response.output_item.done"), - output_index: z.number(), - item: OutputItems$inboundSchema, - sequence_number: z.number(), -}).transform((v) => { - return remap$(v, { - "output_index": "outputIndex", - "sequence_number": "sequenceNumber", +export const StreamEvents$inboundSchema: z.ZodType = + discriminatedUnion("type", { + ["response.created"]: OpenResponsesCreatedEvent$inboundSchema, + ["response.in_progress"]: OpenResponsesInProgressEvent$inboundSchema, + ["response.completed"]: StreamEventsResponseCompleted$inboundSchema, + ["response.incomplete"]: StreamEventsResponseIncomplete$inboundSchema, + ["response.failed"]: StreamEventsResponseFailed$inboundSchema, + error: ErrorEvent$inboundSchema, + ["response.output_item.added"]: + StreamEventsResponseOutputItemAdded$inboundSchema, + ["response.output_item.done"]: + StreamEventsResponseOutputItemDone$inboundSchema, + ["response.content_part.added"]: ContentPartAddedEvent$inboundSchema, + ["response.content_part.done"]: ContentPartDoneEvent$inboundSchema, + ["response.output_text.delta"]: TextDeltaEvent$inboundSchema, + ["response.output_text.done"]: TextDoneEvent$inboundSchema, + ["response.refusal.delta"]: RefusalDeltaEvent$inboundSchema, + ["response.refusal.done"]: RefusalDoneEvent$inboundSchema, + ["response.output_text.annotation.added"]: + AnnotationAddedEvent$inboundSchema, + ["response.function_call_arguments.delta"]: + FunctionCallArgsDeltaEvent$inboundSchema, + ["response.function_call_arguments.done"]: + FunctionCallArgsDoneEvent$inboundSchema, + ["response.reasoning_text.delta"]: ReasoningDeltaEvent$inboundSchema, + ["response.reasoning_text.done"]: ReasoningDoneEvent$inboundSchema, + ["response.reasoning_summary_part.added"]: + ReasoningSummaryPartAddedEvent$inboundSchema, + ["response.reasoning_summary_part.done"]: + ReasoningSummaryPartDoneEvent$inboundSchema, + ["response.reasoning_summary_text.delta"]: + ReasoningSummaryTextDeltaEvent$inboundSchema, + ["response.reasoning_summary_text.done"]: + ReasoningSummaryTextDoneEvent$inboundSchema, + ["response.image_generation_call.in_progress"]: + ImageGenCallInProgressEvent$inboundSchema, + ["response.image_generation_call.generating"]: + ImageGenCallGeneratingEvent$inboundSchema, + ["response.image_generation_call.partial_image"]: + ImageGenCallPartialImageEvent$inboundSchema, + ["response.image_generation_call.completed"]: + ImageGenCallCompletedEvent$inboundSchema, + ["response.web_search_call.in_progress"]: + WebSearchCallInProgressEvent$inboundSchema, + ["response.web_search_call.searching"]: + WebSearchCallSearchingEvent$inboundSchema, + ["response.web_search_call.completed"]: + WebSearchCallCompletedEvent$inboundSchema, }); -}); - -export function streamEventsResponseOutputItemDoneFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - StreamEventsResponseOutputItemDone$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StreamEventsResponseOutputItemDone' from JSON`, - ); -} - -/** @internal */ -export const StreamEventsResponseOutputItemAdded$inboundSchema: z.ZodType< - StreamEventsResponseOutputItemAdded, - unknown -> = z.object({ - type: z.literal("response.output_item.added"), - output_index: z.number(), - item: OutputItems$inboundSchema, - sequence_number: z.number(), -}).transform((v) => { - return remap$(v, { - "output_index": "outputIndex", - "sequence_number": "sequenceNumber", - }); -}); - -export function streamEventsResponseOutputItemAddedFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - StreamEventsResponseOutputItemAdded$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StreamEventsResponseOutputItemAdded' from JSON`, - ); -} - -/** @internal */ -export const StreamEventsResponseFailed$inboundSchema: z.ZodType< - StreamEventsResponseFailed, - unknown -> = z.object({ - type: z.literal("response.failed"), - response: OpenResponsesResult$inboundSchema, - sequence_number: z.number(), -}).transform((v) => { - return remap$(v, { - "sequence_number": "sequenceNumber", - }); -}); - -export function streamEventsResponseFailedFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StreamEventsResponseFailed$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StreamEventsResponseFailed' from JSON`, - ); -} - -/** @internal */ -export const StreamEventsResponseIncomplete$inboundSchema: z.ZodType< - StreamEventsResponseIncomplete, - unknown -> = z.object({ - type: z.literal("response.incomplete"), - response: OpenResponsesResult$inboundSchema, - sequence_number: z.number(), -}).transform((v) => { - return remap$(v, { - "sequence_number": "sequenceNumber", - }); -}); - -export function streamEventsResponseIncompleteFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StreamEventsResponseIncomplete$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StreamEventsResponseIncomplete' from JSON`, - ); -} - -/** @internal */ -export const StreamEventsResponseCompleted$inboundSchema: z.ZodType< - StreamEventsResponseCompleted, - unknown -> = z.object({ - type: z.literal("response.completed"), - response: OpenResponsesResult$inboundSchema, - sequence_number: z.number(), -}).transform((v) => { - return remap$(v, { - "sequence_number": "sequenceNumber", - }); -}); - -export function streamEventsResponseCompletedFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StreamEventsResponseCompleted$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StreamEventsResponseCompleted' from JSON`, - ); -} - -/** @internal */ -export const StreamEventsResponseInProgress$inboundSchema: z.ZodType< - StreamEventsResponseInProgress, - unknown -> = z.object({ - type: z.literal("response.in_progress"), - response: OpenResponsesResult$inboundSchema, - sequence_number: z.number(), -}).transform((v) => { - return remap$(v, { - "sequence_number": "sequenceNumber", - }); -}); - -export function streamEventsResponseInProgressFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StreamEventsResponseInProgress$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StreamEventsResponseInProgress' from JSON`, - ); -} - -/** @internal */ -export const StreamEventsResponseCreated$inboundSchema: z.ZodType< - StreamEventsResponseCreated, - unknown -> = z.object({ - type: z.literal("response.created"), - response: OpenResponsesResult$inboundSchema, - sequence_number: z.number(), -}).transform((v) => { - return remap$(v, { - "sequence_number": "sequenceNumber", - }); -}); - -export function streamEventsResponseCreatedFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StreamEventsResponseCreated$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StreamEventsResponseCreated' from JSON`, - ); -} - -/** @internal */ -export const StreamEvents$inboundSchema: z.ZodType = z - .union([ - z.lazy(() => StreamEventsResponseCreated$inboundSchema), - z.lazy(() => StreamEventsResponseInProgress$inboundSchema), - z.lazy(() => StreamEventsResponseCompleted$inboundSchema), - z.lazy(() => StreamEventsResponseIncomplete$inboundSchema), - z.lazy(() => StreamEventsResponseFailed$inboundSchema), - ErrorEvent$inboundSchema, - z.lazy(() => StreamEventsResponseOutputItemAdded$inboundSchema), - z.lazy(() => StreamEventsResponseOutputItemDone$inboundSchema), - ContentPartAddedEvent$inboundSchema, - ContentPartDoneEvent$inboundSchema, - TextDeltaEvent$inboundSchema, - TextDoneEvent$inboundSchema, - RefusalDeltaEvent$inboundSchema, - RefusalDoneEvent$inboundSchema, - AnnotationAddedEvent$inboundSchema, - FunctionCallArgsDeltaEvent$inboundSchema, - FunctionCallArgsDoneEvent$inboundSchema, - ReasoningDeltaEvent$inboundSchema, - ReasoningDoneEvent$inboundSchema, - ReasoningSummaryPartAddedEvent$inboundSchema, - ReasoningSummaryPartDoneEvent$inboundSchema, - ReasoningSummaryTextDeltaEvent$inboundSchema, - ReasoningSummaryTextDoneEvent$inboundSchema, - ImageGenCallInProgressEvent$inboundSchema, - ImageGenCallGeneratingEvent$inboundSchema, - ImageGenCallPartialImageEvent$inboundSchema, - ImageGenCallCompletedEvent$inboundSchema, - WebSearchCallInProgressEvent$inboundSchema, - WebSearchCallSearchingEvent$inboundSchema, - WebSearchCallCompletedEvent$inboundSchema, - ]); export function streamEventsFromJSON( jsonString: string, diff --git a/src/models/streameventsresponsecompleted.ts b/src/models/streameventsresponsecompleted.ts new file mode 100644 index 00000000..f1811919 --- /dev/null +++ b/src/models/streameventsresponsecompleted.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f7fe07ad1c47 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + OpenResponsesResult, + OpenResponsesResult$inboundSchema, +} from "./openresponsesresult.js"; + +/** + * Event emitted when a response has completed successfully + */ +export type StreamEventsResponseCompleted = { + type: "response.completed"; + /** + * Complete non-streaming response from the Responses API + */ + response: OpenResponsesResult; + sequenceNumber: number; +}; + +/** @internal */ +export const StreamEventsResponseCompleted$inboundSchema: z.ZodType< + StreamEventsResponseCompleted, + unknown +> = z.object({ + type: z.literal("response.completed"), + response: OpenResponsesResult$inboundSchema, + sequence_number: z.int(), +}).transform((v) => { + return remap$(v, { + "sequence_number": "sequenceNumber", + }); +}); + +export function streamEventsResponseCompletedFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StreamEventsResponseCompleted$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StreamEventsResponseCompleted' from JSON`, + ); +} diff --git a/src/models/streameventsresponsefailed.ts b/src/models/streameventsresponsefailed.ts new file mode 100644 index 00000000..7159e485 --- /dev/null +++ b/src/models/streameventsresponsefailed.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 63748aa9f88e + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + OpenResponsesResult, + OpenResponsesResult$inboundSchema, +} from "./openresponsesresult.js"; + +/** + * Event emitted when a response has failed + */ +export type StreamEventsResponseFailed = { + type: "response.failed"; + /** + * Complete non-streaming response from the Responses API + */ + response: OpenResponsesResult; + sequenceNumber: number; +}; + +/** @internal */ +export const StreamEventsResponseFailed$inboundSchema: z.ZodType< + StreamEventsResponseFailed, + unknown +> = z.object({ + type: z.literal("response.failed"), + response: OpenResponsesResult$inboundSchema, + sequence_number: z.int(), +}).transform((v) => { + return remap$(v, { + "sequence_number": "sequenceNumber", + }); +}); + +export function streamEventsResponseFailedFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StreamEventsResponseFailed$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StreamEventsResponseFailed' from JSON`, + ); +} diff --git a/src/models/streameventsresponseincomplete.ts b/src/models/streameventsresponseincomplete.ts new file mode 100644 index 00000000..245b7364 --- /dev/null +++ b/src/models/streameventsresponseincomplete.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 56f3a5c4a544 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + OpenResponsesResult, + OpenResponsesResult$inboundSchema, +} from "./openresponsesresult.js"; + +/** + * Event emitted when a response is incomplete + */ +export type StreamEventsResponseIncomplete = { + type: "response.incomplete"; + /** + * Complete non-streaming response from the Responses API + */ + response: OpenResponsesResult; + sequenceNumber: number; +}; + +/** @internal */ +export const StreamEventsResponseIncomplete$inboundSchema: z.ZodType< + StreamEventsResponseIncomplete, + unknown +> = z.object({ + type: z.literal("response.incomplete"), + response: OpenResponsesResult$inboundSchema, + sequence_number: z.int(), +}).transform((v) => { + return remap$(v, { + "sequence_number": "sequenceNumber", + }); +}); + +export function streamEventsResponseIncompleteFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StreamEventsResponseIncomplete$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StreamEventsResponseIncomplete' from JSON`, + ); +} diff --git a/src/models/streameventsresponseoutputitemadded.ts b/src/models/streameventsresponseoutputitemadded.ts new file mode 100644 index 00000000..ff42b178 --- /dev/null +++ b/src/models/streameventsresponseoutputitemadded.ts @@ -0,0 +1,51 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 16cdc9efe2b8 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { OutputItems, OutputItems$inboundSchema } from "./outputitems.js"; + +/** + * Event emitted when a new output item is added to the response + */ +export type StreamEventsResponseOutputItemAdded = { + type: "response.output_item.added"; + outputIndex: number; + /** + * An output item from the response + */ + item: OutputItems; + sequenceNumber: number; +}; + +/** @internal */ +export const StreamEventsResponseOutputItemAdded$inboundSchema: z.ZodType< + StreamEventsResponseOutputItemAdded, + unknown +> = z.object({ + type: z.literal("response.output_item.added"), + output_index: z.int(), + item: OutputItems$inboundSchema, + sequence_number: z.int(), +}).transform((v) => { + return remap$(v, { + "output_index": "outputIndex", + "sequence_number": "sequenceNumber", + }); +}); + +export function streamEventsResponseOutputItemAddedFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + StreamEventsResponseOutputItemAdded$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StreamEventsResponseOutputItemAdded' from JSON`, + ); +} diff --git a/src/models/streameventsresponseoutputitemdone.ts b/src/models/streameventsresponseoutputitemdone.ts new file mode 100644 index 00000000..762a2fb7 --- /dev/null +++ b/src/models/streameventsresponseoutputitemdone.ts @@ -0,0 +1,51 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: cef4030a60c2 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { OutputItems, OutputItems$inboundSchema } from "./outputitems.js"; + +/** + * Event emitted when an output item is complete + */ +export type StreamEventsResponseOutputItemDone = { + type: "response.output_item.done"; + outputIndex: number; + /** + * An output item from the response + */ + item: OutputItems; + sequenceNumber: number; +}; + +/** @internal */ +export const StreamEventsResponseOutputItemDone$inboundSchema: z.ZodType< + StreamEventsResponseOutputItemDone, + unknown +> = z.object({ + type: z.literal("response.output_item.done"), + output_index: z.int(), + item: OutputItems$inboundSchema, + sequence_number: z.int(), +}).transform((v) => { + return remap$(v, { + "output_index": "outputIndex", + "sequence_number": "sequenceNumber", + }); +}); + +export function streamEventsResponseOutputItemDoneFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + StreamEventsResponseOutputItemDone$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StreamEventsResponseOutputItemDone' from JSON`, + ); +} diff --git a/src/models/streamlogprob.ts b/src/models/streamlogprob.ts new file mode 100644 index 00000000..53d54a6d --- /dev/null +++ b/src/models/streamlogprob.ts @@ -0,0 +1,47 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3d401204f1ef + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + StreamLogprobTopLogprob, + StreamLogprobTopLogprob$inboundSchema, +} from "./streamlogprobtoplogprob.js"; + +/** + * Log probability information for a token + */ +export type StreamLogprob = { + logprob: number; + token: string; + topLogprobs?: Array | undefined; + bytes?: Array | undefined; +}; + +/** @internal */ +export const StreamLogprob$inboundSchema: z.ZodType = z + .object({ + logprob: z.number(), + token: z.string(), + top_logprobs: z.array(StreamLogprobTopLogprob$inboundSchema).optional(), + bytes: z.array(z.int()).optional(), + }).transform((v) => { + return remap$(v, { + "top_logprobs": "topLogprobs", + }); + }); + +export function streamLogprobFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StreamLogprob$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StreamLogprob' from JSON`, + ); +} diff --git a/src/models/streamlogprobtoplogprob.ts b/src/models/streamlogprobtoplogprob.ts new file mode 100644 index 00000000..7fda0124 --- /dev/null +++ b/src/models/streamlogprobtoplogprob.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3b88c304514b + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +/** + * Alternative token with its log probability + */ +export type StreamLogprobTopLogprob = { + token?: string | undefined; + logprob?: number | undefined; + bytes?: Array | undefined; +}; + +/** @internal */ +export const StreamLogprobTopLogprob$inboundSchema: z.ZodType< + StreamLogprobTopLogprob, + unknown +> = z.object({ + token: z.string().optional(), + logprob: z.number().optional(), + bytes: z.array(z.int()).optional(), +}); + +export function streamLogprobTopLogprobFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StreamLogprobTopLogprob$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StreamLogprobTopLogprob' from JSON`, + ); +} diff --git a/src/models/textdeltaevent.ts b/src/models/textdeltaevent.ts index d8de434c..2d405f2c 100644 --- a/src/models/textdeltaevent.ts +++ b/src/models/textdeltaevent.ts @@ -8,32 +8,14 @@ import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -/** - * Alternative token with its log probability - */ -export type TextDeltaEventTopLogprob = { - token?: string | undefined; - logprob?: number | undefined; - bytes?: Array | undefined; -}; - -/** - * Log probability information for a token - */ -export type TextDeltaEventLogprob = { - logprob: number; - token: string; - topLogprobs?: Array | undefined; - bytes?: Array | undefined; -}; +import { StreamLogprob, StreamLogprob$inboundSchema } from "./streamlogprob.js"; /** * Event emitted when a text delta is streamed */ export type TextDeltaEvent = { type: "response.output_text.delta"; - logprobs: Array; + logprobs: Array; outputIndex: number; itemId: string; contentIndex: number; @@ -41,62 +23,16 @@ export type TextDeltaEvent = { sequenceNumber: number; }; -/** @internal */ -export const TextDeltaEventTopLogprob$inboundSchema: z.ZodType< - TextDeltaEventTopLogprob, - unknown -> = z.object({ - token: z.string().optional(), - logprob: z.number().optional(), - bytes: z.array(z.number()).optional(), -}); - -export function textDeltaEventTopLogprobFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TextDeltaEventTopLogprob$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TextDeltaEventTopLogprob' from JSON`, - ); -} - -/** @internal */ -export const TextDeltaEventLogprob$inboundSchema: z.ZodType< - TextDeltaEventLogprob, - unknown -> = z.object({ - logprob: z.number(), - token: z.string(), - top_logprobs: z.array(z.lazy(() => TextDeltaEventTopLogprob$inboundSchema)) - .optional(), - bytes: z.array(z.number()).optional(), -}).transform((v) => { - return remap$(v, { - "top_logprobs": "topLogprobs", - }); -}); - -export function textDeltaEventLogprobFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TextDeltaEventLogprob$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TextDeltaEventLogprob' from JSON`, - ); -} - /** @internal */ export const TextDeltaEvent$inboundSchema: z.ZodType = z.object({ type: z.literal("response.output_text.delta"), - logprobs: z.array(z.lazy(() => TextDeltaEventLogprob$inboundSchema)), - output_index: z.number(), + logprobs: z.array(StreamLogprob$inboundSchema), + output_index: z.int(), item_id: z.string(), - content_index: z.number(), + content_index: z.int(), delta: z.string(), - sequence_number: z.number(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "output_index": "outputIndex", diff --git a/src/models/textdoneevent.ts b/src/models/textdoneevent.ts index c18cadab..39082bc8 100644 --- a/src/models/textdoneevent.ts +++ b/src/models/textdoneevent.ts @@ -8,25 +8,7 @@ import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -/** - * Alternative token with its log probability - */ -export type TextDoneEventTopLogprob = { - token?: string | undefined; - logprob?: number | undefined; - bytes?: Array | undefined; -}; - -/** - * Log probability information for a token - */ -export type TextDoneEventLogprob = { - logprob: number; - token: string; - topLogprobs?: Array | undefined; - bytes?: Array | undefined; -}; +import { StreamLogprob, StreamLogprob$inboundSchema } from "./streamlogprob.js"; /** * Event emitted when text streaming is complete @@ -38,65 +20,19 @@ export type TextDoneEvent = { contentIndex: number; text: string; sequenceNumber: number; - logprobs: Array; + logprobs: Array; }; -/** @internal */ -export const TextDoneEventTopLogprob$inboundSchema: z.ZodType< - TextDoneEventTopLogprob, - unknown -> = z.object({ - token: z.string().optional(), - logprob: z.number().optional(), - bytes: z.array(z.number()).optional(), -}); - -export function textDoneEventTopLogprobFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TextDoneEventTopLogprob$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TextDoneEventTopLogprob' from JSON`, - ); -} - -/** @internal */ -export const TextDoneEventLogprob$inboundSchema: z.ZodType< - TextDoneEventLogprob, - unknown -> = z.object({ - logprob: z.number(), - token: z.string(), - top_logprobs: z.array(z.lazy(() => TextDoneEventTopLogprob$inboundSchema)) - .optional(), - bytes: z.array(z.number()).optional(), -}).transform((v) => { - return remap$(v, { - "top_logprobs": "topLogprobs", - }); -}); - -export function textDoneEventLogprobFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TextDoneEventLogprob$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TextDoneEventLogprob' from JSON`, - ); -} - /** @internal */ export const TextDoneEvent$inboundSchema: z.ZodType = z .object({ type: z.literal("response.output_text.done"), - output_index: z.number(), + output_index: z.int(), item_id: z.string(), - content_index: z.number(), + content_index: z.int(), text: z.string(), - sequence_number: z.number(), - logprobs: z.array(z.lazy(() => TextDoneEventLogprob$inboundSchema)), + sequence_number: z.int(), + logprobs: z.array(StreamLogprob$inboundSchema), }).transform((v) => { return remap$(v, { "output_index": "outputIndex", diff --git a/src/models/toolcallstatus.ts b/src/models/toolcallstatus.ts new file mode 100644 index 00000000..1585e3f9 --- /dev/null +++ b/src/models/toolcallstatus.ts @@ -0,0 +1,22 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 54eb9c06bedb + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +export const ToolCallStatus = { + InProgress: "in_progress", + Completed: "completed", + Incomplete: "incomplete", +} as const; +export type ToolCallStatus = OpenEnum; + +/** @internal */ +export const ToolCallStatus$inboundSchema: z.ZodType = + openEnums.inboundSchema(ToolCallStatus); +/** @internal */ +export const ToolCallStatus$outboundSchema: z.ZodType = + openEnums.outboundSchema(ToolCallStatus); diff --git a/src/models/toolcallstatusenum.ts b/src/models/toolcallstatusenum.ts deleted file mode 100644 index 8e2fd64d..00000000 --- a/src/models/toolcallstatusenum.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: bbb08fcb13ab - */ - -import * as z from "zod/v4"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; - -export const ToolCallStatusEnum = { - InProgress: "in_progress", - Completed: "completed", - Incomplete: "incomplete", -} as const; -export type ToolCallStatusEnum = OpenEnum; - -/** @internal */ -export const ToolCallStatusEnum$inboundSchema: z.ZodType< - ToolCallStatusEnum, - unknown -> = openEnums.inboundSchema(ToolCallStatusEnum); -/** @internal */ -export const ToolCallStatusEnum$outboundSchema: z.ZodType< - string, - ToolCallStatusEnum -> = openEnums.outboundSchema(ToolCallStatusEnum); diff --git a/src/models/toolchoiceallowed.ts b/src/models/toolchoiceallowed.ts new file mode 100644 index 00000000..1fc49da1 --- /dev/null +++ b/src/models/toolchoiceallowed.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 82ee236509d6 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { ClosedEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export const ToolChoiceAllowedType = { + AllowedTools: "allowed_tools", +} as const; +export type ToolChoiceAllowedType = ClosedEnum; + +export const ModeRequired = { + Required: "required", +} as const; +export type ModeRequired = ClosedEnum; + +export const ModeAuto = { + Auto: "auto", +} as const; +export type ModeAuto = ClosedEnum; + +export type Mode = ModeAuto | ModeRequired; + +/** + * Constrains the model to a pre-defined set of allowed tools + */ +export type ToolChoiceAllowed = { + type: ToolChoiceAllowedType; + mode: ModeAuto | ModeRequired; + tools: Array<{ [k: string]: any | null }>; +}; + +/** @internal */ +export const ToolChoiceAllowedType$inboundSchema: z.ZodEnum< + typeof ToolChoiceAllowedType +> = z.enum(ToolChoiceAllowedType); +/** @internal */ +export const ToolChoiceAllowedType$outboundSchema: z.ZodEnum< + typeof ToolChoiceAllowedType +> = ToolChoiceAllowedType$inboundSchema; + +/** @internal */ +export const ModeRequired$inboundSchema: z.ZodEnum = z + .enum(ModeRequired); +/** @internal */ +export const ModeRequired$outboundSchema: z.ZodEnum = + ModeRequired$inboundSchema; + +/** @internal */ +export const ModeAuto$inboundSchema: z.ZodEnum = z.enum( + ModeAuto, +); +/** @internal */ +export const ModeAuto$outboundSchema: z.ZodEnum = + ModeAuto$inboundSchema; + +/** @internal */ +export const Mode$inboundSchema: z.ZodType = z.union([ + ModeAuto$inboundSchema, + ModeRequired$inboundSchema, +]); +/** @internal */ +export type Mode$Outbound = string | string; + +/** @internal */ +export const Mode$outboundSchema: z.ZodType = z.union([ + ModeAuto$outboundSchema, + ModeRequired$outboundSchema, +]); + +export function modeToJSON(mode: Mode): string { + return JSON.stringify(Mode$outboundSchema.parse(mode)); +} +export function modeFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Mode$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Mode' from JSON`, + ); +} + +/** @internal */ +export const ToolChoiceAllowed$inboundSchema: z.ZodType< + ToolChoiceAllowed, + unknown +> = z.object({ + type: ToolChoiceAllowedType$inboundSchema, + mode: z.union([ModeAuto$inboundSchema, ModeRequired$inboundSchema]), + tools: z.array(z.record(z.string(), z.nullable(z.any()))), +}); +/** @internal */ +export type ToolChoiceAllowed$Outbound = { + type: string; + mode: string | string; + tools: Array<{ [k: string]: any | null }>; +}; + +/** @internal */ +export const ToolChoiceAllowed$outboundSchema: z.ZodType< + ToolChoiceAllowed$Outbound, + ToolChoiceAllowed +> = z.object({ + type: ToolChoiceAllowedType$outboundSchema, + mode: z.union([ModeAuto$outboundSchema, ModeRequired$outboundSchema]), + tools: z.array(z.record(z.string(), z.nullable(z.any()))), +}); + +export function toolChoiceAllowedToJSON( + toolChoiceAllowed: ToolChoiceAllowed, +): string { + return JSON.stringify( + ToolChoiceAllowed$outboundSchema.parse(toolChoiceAllowed), + ); +} +export function toolChoiceAllowedFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ToolChoiceAllowed$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ToolChoiceAllowed' from JSON`, + ); +} diff --git a/src/models/topproviderinfo.ts b/src/models/topproviderinfo.ts index c95a2f12..51d07ed2 100644 --- a/src/models/topproviderinfo.ts +++ b/src/models/topproviderinfo.ts @@ -16,11 +16,11 @@ export type TopProviderInfo = { /** * Context length from the top provider */ - contextLength?: number | null | undefined; + contextLength?: number | undefined; /** * Maximum completion tokens from the top provider */ - maxCompletionTokens?: number | null | undefined; + maxCompletionTokens?: number | undefined; /** * Whether the top provider moderates content */ @@ -32,8 +32,8 @@ export const TopProviderInfo$inboundSchema: z.ZodType< TopProviderInfo, unknown > = z.object({ - context_length: z.nullable(z.number()).optional(), - max_completion_tokens: z.nullable(z.number()).optional(), + context_length: z.int().optional(), + max_completion_tokens: z.int().optional(), is_moderated: z.boolean(), }).transform((v) => { return remap$(v, { diff --git a/src/models/traceconfig.ts b/src/models/traceconfig.ts new file mode 100644 index 00000000..1f176fb4 --- /dev/null +++ b/src/models/traceconfig.ts @@ -0,0 +1,58 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 50ce6e8a7bcd + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; + +/** + * Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + */ +export type TraceConfig = { + traceId?: string | undefined; + traceName?: string | undefined; + spanName?: string | undefined; + generationName?: string | undefined; + parentSpanId?: string | undefined; + additionalProperties?: { [k: string]: any | null } | undefined; +}; + +/** @internal */ +export type TraceConfig$Outbound = { + trace_id?: string | undefined; + trace_name?: string | undefined; + span_name?: string | undefined; + generation_name?: string | undefined; + parent_span_id?: string | undefined; + [additionalProperties: string]: unknown; +}; + +/** @internal */ +export const TraceConfig$outboundSchema: z.ZodType< + TraceConfig$Outbound, + TraceConfig +> = z.object({ + traceId: z.string().optional(), + traceName: z.string().optional(), + spanName: z.string().optional(), + generationName: z.string().optional(), + parentSpanId: z.string().optional(), + additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + traceId: "trace_id", + traceName: "trace_name", + spanName: "span_name", + generationName: "generation_name", + parentSpanId: "parent_span_id", + additionalProperties: null, + }), + }; +}); + +export function traceConfigToJSON(traceConfig: TraceConfig): string { + return JSON.stringify(TraceConfig$outboundSchema.parse(traceConfig)); +} diff --git a/src/models/truncationenum.ts b/src/models/truncation.ts similarity index 52% rename from src/models/truncationenum.ts rename to src/models/truncation.ts index 8e78e372..26483639 100644 --- a/src/models/truncationenum.ts +++ b/src/models/truncation.ts @@ -1,18 +1,18 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 2e68448c1324 + * @generated-id: 8aa9a16a7a40 */ import * as z from "zod/v4"; import * as openEnums from "../types/enums.js"; import { OpenEnum } from "../types/enums.js"; -export const TruncationEnum = { +export const Truncation = { Auto: "auto", Disabled: "disabled", } as const; -export type TruncationEnum = OpenEnum; +export type Truncation = OpenEnum; /** @internal */ -export const TruncationEnum$inboundSchema: z.ZodType = - openEnums.inboundSchema(TruncationEnum); +export const Truncation$inboundSchema: z.ZodType = + openEnums.inboundSchema(Truncation); diff --git a/src/models/updateguardrailrequest.ts b/src/models/updateguardrailrequest.ts new file mode 100644 index 00000000..b7773270 --- /dev/null +++ b/src/models/updateguardrailrequest.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8ae5b029f2d5 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { + GuardrailInterval, + GuardrailInterval$outboundSchema, +} from "./guardrailinterval.js"; + +export type UpdateGuardrailRequest = { + /** + * New name for the guardrail + */ + name?: string | undefined; + /** + * New description for the guardrail + */ + description?: string | null | undefined; + /** + * New spending limit in USD + */ + limitUsd?: number | undefined; + /** + * Interval at which the limit resets (daily, weekly, monthly) + */ + resetInterval?: GuardrailInterval | null | undefined; + /** + * New list of allowed provider IDs + */ + allowedProviders?: Array | null | undefined; + /** + * List of provider IDs to exclude from routing + */ + ignoredProviders?: Array | null | undefined; + /** + * Array of model identifiers (slug or canonical_slug accepted) + */ + allowedModels?: Array | null | undefined; + /** + * Whether to enforce zero data retention + */ + enforceZdr?: boolean | null | undefined; +}; + +/** @internal */ +export type UpdateGuardrailRequest$Outbound = { + name?: string | undefined; + description?: string | null | undefined; + limit_usd?: number | undefined; + reset_interval?: string | null | undefined; + allowed_providers?: Array | null | undefined; + ignored_providers?: Array | null | undefined; + allowed_models?: Array | null | undefined; + enforce_zdr?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateGuardrailRequest$outboundSchema: z.ZodType< + UpdateGuardrailRequest$Outbound, + UpdateGuardrailRequest +> = z.object({ + name: z.string().optional(), + description: z.nullable(z.string()).optional(), + limitUsd: z.number().optional(), + resetInterval: z.nullable(GuardrailInterval$outboundSchema).optional(), + allowedProviders: z.nullable(z.array(z.string())).optional(), + ignoredProviders: z.nullable(z.array(z.string())).optional(), + allowedModels: z.nullable(z.array(z.string())).optional(), + enforceZdr: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + limitUsd: "limit_usd", + resetInterval: "reset_interval", + allowedProviders: "allowed_providers", + ignoredProviders: "ignored_providers", + allowedModels: "allowed_models", + enforceZdr: "enforce_zdr", + }); +}); + +export function updateGuardrailRequestToJSON( + updateGuardrailRequest: UpdateGuardrailRequest, +): string { + return JSON.stringify( + UpdateGuardrailRequest$outboundSchema.parse(updateGuardrailRequest), + ); +} diff --git a/src/models/updateguardrailresponse.ts b/src/models/updateguardrailresponse.ts new file mode 100644 index 00000000..62e472e9 --- /dev/null +++ b/src/models/updateguardrailresponse.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: a1debd60e96d + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { Guardrail, Guardrail$inboundSchema } from "./guardrail.js"; + +export type UpdateGuardrailResponse = { + data: Guardrail; +}; + +/** @internal */ +export const UpdateGuardrailResponse$inboundSchema: z.ZodType< + UpdateGuardrailResponse, + unknown +> = z.object({ + data: Guardrail$inboundSchema, +}); + +export function updateGuardrailResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateGuardrailResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateGuardrailResponse' from JSON`, + ); +} diff --git a/src/models/urlcitation.ts b/src/models/urlcitation.ts index 4d03e2fd..562276b2 100644 --- a/src/models/urlcitation.ts +++ b/src/models/urlcitation.ts @@ -23,8 +23,8 @@ export const URLCitation$inboundSchema: z.ZodType = z type: z.literal("url_citation"), url: z.string(), title: z.string(), - start_index: z.number(), - end_index: z.number(), + start_index: z.int(), + end_index: z.int(), }).transform((v) => { return remap$(v, { "start_index": "startIndex", @@ -48,8 +48,8 @@ export const URLCitation$outboundSchema: z.ZodType< type: z.literal("url_citation"), url: z.string(), title: z.string(), - startIndex: z.number(), - endIndex: z.number(), + startIndex: z.int(), + endIndex: z.int(), }).transform((v) => { return remap$(v, { startIndex: "start_index", diff --git a/src/models/usage.ts b/src/models/usage.ts index 8ca3e5ee..979fd109 100644 --- a/src/models/usage.ts +++ b/src/models/usage.ts @@ -18,7 +18,7 @@ export type OutputTokensDetails = { }; export type CostDetails = { - upstreamInferenceCost?: number | null | undefined; + upstreamInferenceCost?: number | undefined; upstreamInferenceInputCost: number; upstreamInferenceOutputCost: number; }; @@ -35,7 +35,7 @@ export type Usage = { /** * Cost of the completion */ - cost?: number | null | undefined; + cost?: number | undefined; /** * Whether a request was made using a Bring Your Own Key configuration */ @@ -48,7 +48,7 @@ export const InputTokensDetails$inboundSchema: z.ZodType< InputTokensDetails, unknown > = z.object({ - cached_tokens: z.number(), + cached_tokens: z.int(), }).transform((v) => { return remap$(v, { "cached_tokens": "cachedTokens", @@ -70,7 +70,7 @@ export const OutputTokensDetails$inboundSchema: z.ZodType< OutputTokensDetails, unknown > = z.object({ - reasoning_tokens: z.number(), + reasoning_tokens: z.int(), }).transform((v) => { return remap$(v, { "reasoning_tokens": "reasoningTokens", @@ -90,7 +90,7 @@ export function outputTokensDetailsFromJSON( /** @internal */ export const CostDetails$inboundSchema: z.ZodType = z .object({ - upstream_inference_cost: z.nullable(z.number()).optional(), + upstream_inference_cost: z.number().optional(), upstream_inference_input_cost: z.number(), upstream_inference_output_cost: z.number(), }).transform((v) => { @@ -113,12 +113,12 @@ export function costDetailsFromJSON( /** @internal */ export const Usage$inboundSchema: z.ZodType = z.object({ - input_tokens: z.number(), + input_tokens: z.int(), input_tokens_details: z.lazy(() => InputTokensDetails$inboundSchema), - output_tokens: z.number(), + output_tokens: z.int(), output_tokens_details: z.lazy(() => OutputTokensDetails$inboundSchema), - total_tokens: z.number(), - cost: z.nullable(z.number()).optional(), + total_tokens: z.int(), + cost: z.number().optional(), is_byok: z.boolean().optional(), cost_details: z.lazy(() => CostDetails$inboundSchema).optional(), }).transform((v) => { diff --git a/src/models/websearchcallcompletedevent.ts b/src/models/websearchcallcompletedevent.ts index 0a723e66..9634bf7d 100644 --- a/src/models/websearchcallcompletedevent.ts +++ b/src/models/websearchcallcompletedevent.ts @@ -26,8 +26,8 @@ export const WebSearchCallCompletedEvent$inboundSchema: z.ZodType< > = z.object({ type: z.literal("response.web_search_call.completed"), item_id: z.string(), - output_index: z.number(), - sequence_number: z.number(), + output_index: z.int(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/websearchcallinprogressevent.ts b/src/models/websearchcallinprogressevent.ts index 4bd03e61..4b3b19e4 100644 --- a/src/models/websearchcallinprogressevent.ts +++ b/src/models/websearchcallinprogressevent.ts @@ -26,8 +26,8 @@ export const WebSearchCallInProgressEvent$inboundSchema: z.ZodType< > = z.object({ type: z.literal("response.web_search_call.in_progress"), item_id: z.string(), - output_index: z.number(), - sequence_number: z.number(), + output_index: z.int(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/websearchcallsearchingevent.ts b/src/models/websearchcallsearchingevent.ts index 38991ae4..8dba9bfb 100644 --- a/src/models/websearchcallsearchingevent.ts +++ b/src/models/websearchcallsearchingevent.ts @@ -26,8 +26,8 @@ export const WebSearchCallSearchingEvent$inboundSchema: z.ZodType< > = z.object({ type: z.literal("response.web_search_call.searching"), item_id: z.string(), - output_index: z.number(), - sequence_number: z.number(), + output_index: z.int(), + sequence_number: z.int(), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/websearchconfig.ts b/src/models/websearchconfig.ts new file mode 100644 index 00000000..acdb34ae --- /dev/null +++ b/src/models/websearchconfig.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d43f37b9a707 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { + SearchQualityLevel, + SearchQualityLevel$outboundSchema, +} from "./searchqualitylevel.js"; +import { + WebSearchEngineEnum, + WebSearchEngineEnum$outboundSchema, +} from "./websearchengineenum.js"; +import { + WebSearchUserLocationServerTool, + WebSearchUserLocationServerTool$Outbound, + WebSearchUserLocationServerTool$outboundSchema, +} from "./websearchuserlocationservertool.js"; + +export type WebSearchConfig = { + /** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. + */ + engine?: WebSearchEngineEnum | undefined; + /** + * Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. + */ + maxResults?: number | undefined; + /** + * Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. + */ + maxTotalResults?: number | undefined; + /** + * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + */ + searchContextSize?: SearchQualityLevel | undefined; + /** + * Approximate user location for location-biased results. + */ + userLocation?: WebSearchUserLocationServerTool | undefined; + /** + * Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity. + */ + allowedDomains?: Array | undefined; + /** + * Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity. + */ + excludedDomains?: Array | undefined; +}; + +/** @internal */ +export type WebSearchConfig$Outbound = { + engine?: string | undefined; + max_results?: number | undefined; + max_total_results?: number | undefined; + search_context_size?: string | undefined; + user_location?: WebSearchUserLocationServerTool$Outbound | undefined; + allowed_domains?: Array | undefined; + excluded_domains?: Array | undefined; +}; + +/** @internal */ +export const WebSearchConfig$outboundSchema: z.ZodType< + WebSearchConfig$Outbound, + WebSearchConfig +> = z.object({ + engine: WebSearchEngineEnum$outboundSchema.optional(), + maxResults: z.int().optional(), + maxTotalResults: z.int().optional(), + searchContextSize: SearchQualityLevel$outboundSchema.optional(), + userLocation: WebSearchUserLocationServerTool$outboundSchema.optional(), + allowedDomains: z.array(z.string()).optional(), + excludedDomains: z.array(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + maxResults: "max_results", + maxTotalResults: "max_total_results", + searchContextSize: "search_context_size", + userLocation: "user_location", + allowedDomains: "allowed_domains", + excludedDomains: "excluded_domains", + }); +}); + +export function webSearchConfigToJSON( + webSearchConfig: WebSearchConfig, +): string { + return JSON.stringify(WebSearchConfig$outboundSchema.parse(webSearchConfig)); +} diff --git a/src/models/websearchdomainfilter.ts b/src/models/websearchdomainfilter.ts new file mode 100644 index 00000000..709be924 --- /dev/null +++ b/src/models/websearchdomainfilter.ts @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 827204408f55 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type WebSearchDomainFilter = { + allowedDomains?: Array | null | undefined; + excludedDomains?: Array | null | undefined; +}; + +/** @internal */ +export const WebSearchDomainFilter$inboundSchema: z.ZodType< + WebSearchDomainFilter, + unknown +> = z.object({ + allowed_domains: z.nullable(z.array(z.string())).optional(), + excluded_domains: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "allowed_domains": "allowedDomains", + "excluded_domains": "excludedDomains", + }); +}); +/** @internal */ +export type WebSearchDomainFilter$Outbound = { + allowed_domains?: Array | null | undefined; + excluded_domains?: Array | null | undefined; +}; + +/** @internal */ +export const WebSearchDomainFilter$outboundSchema: z.ZodType< + WebSearchDomainFilter$Outbound, + WebSearchDomainFilter +> = z.object({ + allowedDomains: z.nullable(z.array(z.string())).optional(), + excludedDomains: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + allowedDomains: "allowed_domains", + excludedDomains: "excluded_domains", + }); +}); + +export function webSearchDomainFilterToJSON( + webSearchDomainFilter: WebSearchDomainFilter, +): string { + return JSON.stringify( + WebSearchDomainFilter$outboundSchema.parse(webSearchDomainFilter), + ); +} +export function webSearchDomainFilterFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => WebSearchDomainFilter$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'WebSearchDomainFilter' from JSON`, + ); +} diff --git a/src/models/websearchengineenum.ts b/src/models/websearchengineenum.ts new file mode 100644 index 00000000..309d906f --- /dev/null +++ b/src/models/websearchengineenum.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 273c8df02654 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +/** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. + */ +export const WebSearchEngineEnum = { + Auto: "auto", + Native: "native", + Exa: "exa", + Firecrawl: "firecrawl", + Parallel: "parallel", +} as const; +/** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. + */ +export type WebSearchEngineEnum = OpenEnum; + +/** @internal */ +export const WebSearchEngineEnum$inboundSchema: z.ZodType< + WebSearchEngineEnum, + unknown +> = openEnums.inboundSchema(WebSearchEngineEnum); +/** @internal */ +export const WebSearchEngineEnum$outboundSchema: z.ZodType< + string, + WebSearchEngineEnum +> = openEnums.outboundSchema(WebSearchEngineEnum); diff --git a/src/models/websearchplugin.ts b/src/models/websearchplugin.ts new file mode 100644 index 00000000..e9b1b924 --- /dev/null +++ b/src/models/websearchplugin.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: fa32581277e2 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { + WebSearchEngine, + WebSearchEngine$outboundSchema, +} from "./websearchengine.js"; + +export type WebSearchPlugin = { + id: "web"; + /** + * Set to false to disable the web-search plugin for this request. Defaults to true. + */ + enabled?: boolean | undefined; + maxResults?: number | undefined; + searchPrompt?: string | undefined; + /** + * The search engine to use for web search. + */ + engine?: WebSearchEngine | undefined; + /** + * A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + */ + includeDomains?: Array | undefined; + /** + * A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + */ + excludeDomains?: Array | undefined; +}; + +/** @internal */ +export type WebSearchPlugin$Outbound = { + id: "web"; + enabled?: boolean | undefined; + max_results?: number | undefined; + search_prompt?: string | undefined; + engine?: string | undefined; + include_domains?: Array | undefined; + exclude_domains?: Array | undefined; +}; + +/** @internal */ +export const WebSearchPlugin$outboundSchema: z.ZodType< + WebSearchPlugin$Outbound, + WebSearchPlugin +> = z.object({ + id: z.literal("web"), + enabled: z.boolean().optional(), + maxResults: z.int().optional(), + searchPrompt: z.string().optional(), + engine: WebSearchEngine$outboundSchema.optional(), + includeDomains: z.array(z.string()).optional(), + excludeDomains: z.array(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + maxResults: "max_results", + searchPrompt: "search_prompt", + includeDomains: "include_domains", + excludeDomains: "exclude_domains", + }); +}); + +export function webSearchPluginToJSON( + webSearchPlugin: WebSearchPlugin, +): string { + return JSON.stringify(WebSearchPlugin$outboundSchema.parse(webSearchPlugin)); +} diff --git a/src/models/websearchservertool.ts b/src/models/websearchservertool.ts index cd9a854f..662d6ece 100644 --- a/src/models/websearchservertool.ts +++ b/src/models/websearchservertool.ts @@ -6,8 +6,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -15,6 +13,17 @@ import { SearchContextSizeEnum$inboundSchema, SearchContextSizeEnum$outboundSchema, } from "./searchcontextsizeenum.js"; +import { + WebSearchDomainFilter, + WebSearchDomainFilter$inboundSchema, + WebSearchDomainFilter$Outbound, + WebSearchDomainFilter$outboundSchema, +} from "./websearchdomainfilter.js"; +import { + WebSearchEngineEnum, + WebSearchEngineEnum$inboundSchema, + WebSearchEngineEnum$outboundSchema, +} from "./websearchengineenum.js"; import { WebSearchUserLocation, WebSearchUserLocation$inboundSchema, @@ -22,34 +31,12 @@ import { WebSearchUserLocation$outboundSchema, } from "./websearchuserlocation.js"; -export type WebSearchServerToolFilters = { - allowedDomains?: Array | null | undefined; - excludedDomains?: Array | null | undefined; -}; - -/** - * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - */ -export const WebSearchServerToolEngine = { - Auto: "auto", - Native: "native", - Exa: "exa", - Firecrawl: "firecrawl", - Parallel: "parallel", -} as const; -/** - * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. - */ -export type WebSearchServerToolEngine = OpenEnum< - typeof WebSearchServerToolEngine ->; - /** * Web search tool configuration (2025-08-26 version) */ export type WebSearchServerTool = { type: "web_search_2025_08_26"; - filters?: WebSearchServerToolFilters | null | undefined; + filters?: WebSearchDomainFilter | null | undefined; /** * Size of the search context for web search tools */ @@ -61,86 +48,24 @@ export type WebSearchServerTool = { /** * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. */ - engine?: WebSearchServerToolEngine | undefined; + engine?: WebSearchEngineEnum | undefined; /** * Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. */ maxResults?: number | undefined; }; -/** @internal */ -export const WebSearchServerToolFilters$inboundSchema: z.ZodType< - WebSearchServerToolFilters, - unknown -> = z.object({ - allowed_domains: z.nullable(z.array(z.string())).optional(), - excluded_domains: z.nullable(z.array(z.string())).optional(), -}).transform((v) => { - return remap$(v, { - "allowed_domains": "allowedDomains", - "excluded_domains": "excludedDomains", - }); -}); -/** @internal */ -export type WebSearchServerToolFilters$Outbound = { - allowed_domains?: Array | null | undefined; - excluded_domains?: Array | null | undefined; -}; - -/** @internal */ -export const WebSearchServerToolFilters$outboundSchema: z.ZodType< - WebSearchServerToolFilters$Outbound, - WebSearchServerToolFilters -> = z.object({ - allowedDomains: z.nullable(z.array(z.string())).optional(), - excludedDomains: z.nullable(z.array(z.string())).optional(), -}).transform((v) => { - return remap$(v, { - allowedDomains: "allowed_domains", - excludedDomains: "excluded_domains", - }); -}); - -export function webSearchServerToolFiltersToJSON( - webSearchServerToolFilters: WebSearchServerToolFilters, -): string { - return JSON.stringify( - WebSearchServerToolFilters$outboundSchema.parse(webSearchServerToolFilters), - ); -} -export function webSearchServerToolFiltersFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => WebSearchServerToolFilters$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'WebSearchServerToolFilters' from JSON`, - ); -} - -/** @internal */ -export const WebSearchServerToolEngine$inboundSchema: z.ZodType< - WebSearchServerToolEngine, - unknown -> = openEnums.inboundSchema(WebSearchServerToolEngine); -/** @internal */ -export const WebSearchServerToolEngine$outboundSchema: z.ZodType< - string, - WebSearchServerToolEngine -> = openEnums.outboundSchema(WebSearchServerToolEngine); - /** @internal */ export const WebSearchServerTool$inboundSchema: z.ZodType< WebSearchServerTool, unknown > = z.object({ type: z.literal("web_search_2025_08_26"), - filters: z.nullable(z.lazy(() => WebSearchServerToolFilters$inboundSchema)) - .optional(), + filters: z.nullable(WebSearchDomainFilter$inboundSchema).optional(), search_context_size: SearchContextSizeEnum$inboundSchema.optional(), user_location: z.nullable(WebSearchUserLocation$inboundSchema).optional(), - engine: WebSearchServerToolEngine$inboundSchema.optional(), - max_results: z.number().optional(), + engine: WebSearchEngineEnum$inboundSchema.optional(), + max_results: z.int().optional(), }).transform((v) => { return remap$(v, { "search_context_size": "searchContextSize", @@ -151,7 +76,7 @@ export const WebSearchServerTool$inboundSchema: z.ZodType< /** @internal */ export type WebSearchServerTool$Outbound = { type: "web_search_2025_08_26"; - filters?: WebSearchServerToolFilters$Outbound | null | undefined; + filters?: WebSearchDomainFilter$Outbound | null | undefined; search_context_size?: string | undefined; user_location?: WebSearchUserLocation$Outbound | null | undefined; engine?: string | undefined; @@ -164,12 +89,11 @@ export const WebSearchServerTool$outboundSchema: z.ZodType< WebSearchServerTool > = z.object({ type: z.literal("web_search_2025_08_26"), - filters: z.nullable(z.lazy(() => WebSearchServerToolFilters$outboundSchema)) - .optional(), + filters: z.nullable(WebSearchDomainFilter$outboundSchema).optional(), searchContextSize: SearchContextSizeEnum$outboundSchema.optional(), userLocation: z.nullable(WebSearchUserLocation$outboundSchema).optional(), - engine: WebSearchServerToolEngine$outboundSchema.optional(), - maxResults: z.number().optional(), + engine: WebSearchEngineEnum$outboundSchema.optional(), + maxResults: z.int().optional(), }).transform((v) => { return remap$(v, { searchContextSize: "search_context_size", diff --git a/src/models/websearchservertoolopenrouter.ts b/src/models/websearchservertoolopenrouter.ts index 4b851e48..5c675ea7 100644 --- a/src/models/websearchservertoolopenrouter.ts +++ b/src/models/websearchservertoolopenrouter.ts @@ -36,8 +36,8 @@ export const WebSearchServerToolOpenRouterParameters$outboundSchema: z.ZodType< WebSearchServerToolOpenRouterParameters$Outbound, WebSearchServerToolOpenRouterParameters > = z.object({ - maxResults: z.number().optional(), - maxTotalResults: z.number().optional(), + maxResults: z.int().optional(), + maxTotalResults: z.int().optional(), }).transform((v) => { return remap$(v, { maxResults: "max_results", diff --git a/src/models/websearchsource.ts b/src/models/websearchsource.ts new file mode 100644 index 00000000..d37ecd97 --- /dev/null +++ b/src/models/websearchsource.ts @@ -0,0 +1,67 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 2a64353a399c + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { ClosedEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export const WebSearchSourceType = { + Url: "url", +} as const; +export type WebSearchSourceType = ClosedEnum; + +export type WebSearchSource = { + type: WebSearchSourceType; + url: string; +}; + +/** @internal */ +export const WebSearchSourceType$inboundSchema: z.ZodEnum< + typeof WebSearchSourceType +> = z.enum(WebSearchSourceType); +/** @internal */ +export const WebSearchSourceType$outboundSchema: z.ZodEnum< + typeof WebSearchSourceType +> = WebSearchSourceType$inboundSchema; + +/** @internal */ +export const WebSearchSource$inboundSchema: z.ZodType< + WebSearchSource, + unknown +> = z.object({ + type: WebSearchSourceType$inboundSchema, + url: z.string(), +}); +/** @internal */ +export type WebSearchSource$Outbound = { + type: string; + url: string; +}; + +/** @internal */ +export const WebSearchSource$outboundSchema: z.ZodType< + WebSearchSource$Outbound, + WebSearchSource +> = z.object({ + type: WebSearchSourceType$outboundSchema, + url: z.string(), +}); + +export function webSearchSourceToJSON( + webSearchSource: WebSearchSource, +): string { + return JSON.stringify(WebSearchSource$outboundSchema.parse(webSearchSource)); +} +export function webSearchSourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => WebSearchSource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'WebSearchSource' from JSON`, + ); +} diff --git a/src/models/websearchuserlocationservertool.ts b/src/models/websearchuserlocationservertool.ts new file mode 100644 index 00000000..51140ef2 --- /dev/null +++ b/src/models/websearchuserlocationservertool.ts @@ -0,0 +1,61 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d1b6cb4026ad + */ + +import * as z from "zod/v4"; +import { ClosedEnum } from "../types/enums.js"; + +export const WebSearchUserLocationServerToolType = { + Approximate: "approximate", +} as const; +export type WebSearchUserLocationServerToolType = ClosedEnum< + typeof WebSearchUserLocationServerToolType +>; + +/** + * Approximate user location for location-biased results. + */ +export type WebSearchUserLocationServerTool = { + type?: WebSearchUserLocationServerToolType | undefined; + city?: string | undefined; + region?: string | undefined; + country?: string | undefined; + timezone?: string | undefined; +}; + +/** @internal */ +export const WebSearchUserLocationServerToolType$outboundSchema: z.ZodEnum< + typeof WebSearchUserLocationServerToolType +> = z.enum(WebSearchUserLocationServerToolType); + +/** @internal */ +export type WebSearchUserLocationServerTool$Outbound = { + type?: string | undefined; + city?: string | undefined; + region?: string | undefined; + country?: string | undefined; + timezone?: string | undefined; +}; + +/** @internal */ +export const WebSearchUserLocationServerTool$outboundSchema: z.ZodType< + WebSearchUserLocationServerTool$Outbound, + WebSearchUserLocationServerTool +> = z.object({ + type: WebSearchUserLocationServerToolType$outboundSchema.optional(), + city: z.string().optional(), + region: z.string().optional(), + country: z.string().optional(), + timezone: z.string().optional(), +}); + +export function webSearchUserLocationServerToolToJSON( + webSearchUserLocationServerTool: WebSearchUserLocationServerTool, +): string { + return JSON.stringify( + WebSearchUserLocationServerTool$outboundSchema.parse( + webSearchUserLocationServerTool, + ), + ); +} diff --git a/src/sdk/analytics.ts b/src/sdk/analytics.ts index 9e2e1788..353e5a58 100644 --- a/src/sdk/analytics.ts +++ b/src/sdk/analytics.ts @@ -5,6 +5,7 @@ import { analyticsGetUserActivity } from "../funcs/analyticsGetUserActivity.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; @@ -18,7 +19,7 @@ export class Analytics extends ClientSDK { async getUserActivity( request?: operations.GetUserActivityRequest | undefined, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(analyticsGetUserActivity( this, request, diff --git a/src/sdk/credits.ts b/src/sdk/credits.ts index 02416394..02d1a2d4 100644 --- a/src/sdk/credits.ts +++ b/src/sdk/credits.ts @@ -3,7 +3,6 @@ * @generated-id: c72074b5f165 */ -import { creditsCreateCoinbaseCharge } from "../funcs/creditsCreateCoinbaseCharge.js"; import { creditsGetCredits } from "../funcs/creditsGetCredits.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; @@ -26,23 +25,4 @@ export class Credits extends ClientSDK { options, )); } - - /** - * Create a Coinbase charge for crypto payment - * - * @remarks - * Create a Coinbase charge for crypto payment - */ - async createCoinbaseCharge( - security: operations.CreateCoinbaseChargeSecurity, - request: operations.CreateCoinbaseChargeRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(creditsCreateCoinbaseCharge( - this, - security, - request, - options, - )); - } } diff --git a/src/sdk/guardrails.ts b/src/sdk/guardrails.ts index 3ea2dbba..b7a5eecf 100644 --- a/src/sdk/guardrails.ts +++ b/src/sdk/guardrails.ts @@ -17,8 +17,10 @@ import { guardrailsListKeyAssignments } from "../funcs/guardrailsListKeyAssignme import { guardrailsListMemberAssignments } from "../funcs/guardrailsListMemberAssignments.js"; import { guardrailsUpdate } from "../funcs/guardrailsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; +import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Guardrails extends ClientSDK { /** @@ -30,8 +32,10 @@ export class Guardrails extends ClientSDK { async list( request?: operations.ListGuardrailsRequest | undefined, options?: RequestOptions, - ): Promise { - return unwrapAsync(guardrailsList( + ): Promise< + PageIterator + > { + return unwrapResultIterator(guardrailsList( this, request, options, @@ -47,7 +51,7 @@ export class Guardrails extends ClientSDK { async create( request: operations.CreateGuardrailRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(guardrailsCreate( this, request, @@ -64,7 +68,7 @@ export class Guardrails extends ClientSDK { async get( request: operations.GetGuardrailRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(guardrailsGet( this, request, @@ -81,7 +85,7 @@ export class Guardrails extends ClientSDK { async update( request: operations.UpdateGuardrailRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(guardrailsUpdate( this, request, @@ -98,7 +102,7 @@ export class Guardrails extends ClientSDK { async delete( request: operations.DeleteGuardrailRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(guardrailsDelete( this, request, @@ -115,8 +119,10 @@ export class Guardrails extends ClientSDK { async listKeyAssignments( request?: operations.ListKeyAssignmentsRequest | undefined, options?: RequestOptions, - ): Promise { - return unwrapAsync(guardrailsListKeyAssignments( + ): Promise< + PageIterator + > { + return unwrapResultIterator(guardrailsListKeyAssignments( this, request, options, @@ -132,8 +138,10 @@ export class Guardrails extends ClientSDK { async listMemberAssignments( request?: operations.ListMemberAssignmentsRequest | undefined, options?: RequestOptions, - ): Promise { - return unwrapAsync(guardrailsListMemberAssignments( + ): Promise< + PageIterator + > { + return unwrapResultIterator(guardrailsListMemberAssignments( this, request, options, @@ -149,8 +157,13 @@ export class Guardrails extends ClientSDK { async listGuardrailKeyAssignments( request: operations.ListGuardrailKeyAssignmentsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(guardrailsListGuardrailKeyAssignments( + ): Promise< + PageIterator< + operations.ListGuardrailKeyAssignmentsResponse, + { offset: number } + > + > { + return unwrapResultIterator(guardrailsListGuardrailKeyAssignments( this, request, options, @@ -166,7 +179,7 @@ export class Guardrails extends ClientSDK { async bulkAssignKeys( request: operations.BulkAssignKeysToGuardrailRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(guardrailsBulkAssignKeys( this, request, @@ -183,8 +196,13 @@ export class Guardrails extends ClientSDK { async listGuardrailMemberAssignments( request: operations.ListGuardrailMemberAssignmentsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(guardrailsListGuardrailMemberAssignments( + ): Promise< + PageIterator< + operations.ListGuardrailMemberAssignmentsResponse, + { offset: number } + > + > { + return unwrapResultIterator(guardrailsListGuardrailMemberAssignments( this, request, options, @@ -200,7 +218,7 @@ export class Guardrails extends ClientSDK { async bulkAssignMembers( request: operations.BulkAssignMembersToGuardrailRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(guardrailsBulkAssignMembers( this, request, @@ -217,7 +235,7 @@ export class Guardrails extends ClientSDK { async bulkUnassignKeys( request: operations.BulkUnassignKeysFromGuardrailRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(guardrailsBulkUnassignKeys( this, request, @@ -234,7 +252,7 @@ export class Guardrails extends ClientSDK { async bulkUnassignMembers( request: operations.BulkUnassignMembersFromGuardrailRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(guardrailsBulkUnassignMembers( this, request, diff --git a/src/sdk/organization.ts b/src/sdk/organization.ts new file mode 100644 index 00000000..b64a1110 --- /dev/null +++ b/src/sdk/organization.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 976de6f449fe + */ + +import { organizationListMembers } from "../funcs/organizationListMembers.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; +import { PageIterator, unwrapResultIterator } from "../types/operations.js"; + +export class Organization extends ClientSDK { + /** + * List organization members + * + * @remarks + * List all members of the organization associated with the authenticated management key. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ + async listMembers( + request?: operations.ListOrganizationMembersRequest | undefined, + options?: RequestOptions, + ): Promise< + PageIterator + > { + return unwrapResultIterator(organizationListMembers( + this, + request, + options, + )); + } +} diff --git a/src/sdk/rerank.ts b/src/sdk/rerank.ts new file mode 100644 index 00000000..9cedd8f2 --- /dev/null +++ b/src/sdk/rerank.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 0d5a42c2eac3 + */ + +import { rerankRerank } from "../funcs/rerankRerank.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Rerank extends ClientSDK { + /** + * Submit a rerank request + * + * @remarks + * Submits a rerank request to the rerank router + */ + async rerank( + request: operations.CreateRerankRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(rerankRerank( + this, + request, + options, + )); + } +} diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index c838f2bd..78e15bab 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -15,7 +15,9 @@ import { Generations } from "./generations.js"; import { Guardrails } from "./guardrails.js"; import { Models } from "./models.js"; import { OAuth } from "./oauth.js"; +import { Organization } from "./organization.js"; import { Providers } from "./providers.js"; +import { Rerank } from "./rerank.js"; // #region imports import type { $ZodObject, $ZodShape, infer as zodInfer } from "zod/v4/core"; import { @@ -50,11 +52,6 @@ export class OpenRouter extends ClientSDK { return (this._credits ??= new Credits(this._options)); } - private _embeddings?: Embeddings; - get embeddings(): Embeddings { - return (this._embeddings ??= new Embeddings(this._options)); - } - private _generations?: Generations; get generations(): Generations { return (this._generations ??= new Generations(this._options)); @@ -80,6 +77,11 @@ export class OpenRouter extends ClientSDK { return (this._apiKeys ??= new APIKeys(this._options)); } + private _organization?: Organization; + get organization(): Organization { + return (this._organization ??= new Organization(this._options)); + } + private _guardrails?: Guardrails; get guardrails(): Guardrails { return (this._guardrails ??= new Guardrails(this._options)); @@ -90,6 +92,16 @@ export class OpenRouter extends ClientSDK { return (this._oAuth ??= new OAuth(this._options)); } + private _embeddings?: Embeddings; + get embeddings(): Embeddings { + return (this._embeddings ??= new Embeddings(this._options)); + } + + private _rerank?: Rerank; + get rerank(): Rerank { + return (this._rerank ??= new Rerank(this._options)); + } + // #region sdk-class-body callModel< TTools extends readonly Tool[],