@openrouter/sdk 0.12.34 → 0.12.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FUNCTIONS.md +2 -2
- package/README.md +1 -1
- package/esm/funcs/analyticsGetUserActivity.js +2 -1
- package/esm/funcs/apiKeysCreate.js +2 -1
- package/esm/funcs/apiKeysDelete.js +2 -1
- package/esm/funcs/apiKeysGet.js +2 -1
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.js +2 -1
- package/esm/funcs/apiKeysList.js +2 -1
- package/esm/funcs/apiKeysUpdate.js +2 -1
- package/esm/funcs/betaResponsesSend.d.ts +3 -3
- package/esm/funcs/betaResponsesSend.js +3 -18
- package/esm/funcs/byokCreate.d.ts +19 -0
- package/esm/funcs/byokCreate.js +100 -0
- package/esm/funcs/byokDelete.d.ts +19 -0
- package/esm/funcs/byokDelete.js +103 -0
- package/esm/funcs/byokGet.d.ts +19 -0
- package/esm/funcs/byokGet.js +103 -0
- package/esm/funcs/byokList.d.ts +21 -0
- package/esm/funcs/byokList.js +136 -0
- package/esm/funcs/byokUpdate.d.ts +19 -0
- package/esm/funcs/byokUpdate.js +106 -0
- package/esm/funcs/chatSend.js +2 -18
- package/esm/funcs/creditsGetCredits.js +2 -1
- package/esm/funcs/datasetsGetRankingsDaily.d.ts +37 -0
- package/esm/funcs/datasetsGetRankingsDaily.js +120 -0
- package/esm/funcs/embeddingsGenerate.js +2 -14
- package/esm/funcs/embeddingsListModels.js +2 -1
- package/esm/funcs/endpointsList.js +2 -1
- package/esm/funcs/endpointsListZdrEndpoints.js +2 -1
- package/esm/funcs/generationsGetGeneration.js +2 -12
- package/esm/funcs/generationsListGenerationContent.js +2 -12
- package/esm/funcs/guardrailsBulkAssignKeys.js +2 -1
- package/esm/funcs/guardrailsBulkAssignMembers.js +2 -1
- package/esm/funcs/guardrailsBulkUnassignKeys.js +2 -1
- package/esm/funcs/guardrailsBulkUnassignMembers.js +2 -1
- package/esm/funcs/guardrailsCreate.js +2 -1
- package/esm/funcs/guardrailsDelete.js +2 -1
- package/esm/funcs/guardrailsGet.js +2 -1
- package/esm/funcs/guardrailsList.js +2 -1
- package/esm/funcs/guardrailsListGuardrailKeyAssignments.js +2 -1
- package/esm/funcs/guardrailsListGuardrailMemberAssignments.js +2 -1
- package/esm/funcs/guardrailsListKeyAssignments.js +2 -1
- package/esm/funcs/guardrailsListMemberAssignments.js +2 -1
- package/esm/funcs/guardrailsUpdate.js +2 -1
- package/esm/funcs/modelsCount.js +2 -1
- package/esm/funcs/modelsList.js +2 -1
- package/esm/funcs/modelsListForUser.js +2 -1
- package/esm/funcs/oAuthCreateAuthCode.js +2 -1
- package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.js +2 -1
- package/esm/funcs/observabilityCreate.d.ts +19 -0
- package/esm/funcs/observabilityCreate.js +98 -0
- package/esm/funcs/observabilityDelete.d.ts +19 -0
- package/esm/funcs/observabilityDelete.js +103 -0
- package/esm/funcs/observabilityGet.d.ts +19 -0
- package/esm/funcs/observabilityGet.js +103 -0
- package/esm/funcs/observabilityList.d.ts +21 -0
- package/esm/funcs/observabilityList.js +134 -0
- package/esm/funcs/observabilityUpdate.d.ts +19 -0
- package/esm/funcs/observabilityUpdate.js +104 -0
- package/esm/funcs/organizationListMembers.js +2 -1
- package/esm/funcs/presetsCreatePresetsChatCompletions.d.ts +21 -0
- package/esm/funcs/presetsCreatePresetsChatCompletions.js +106 -0
- package/esm/funcs/presetsCreatePresetsMessages.d.ts +21 -0
- package/esm/funcs/presetsCreatePresetsMessages.js +106 -0
- package/esm/funcs/presetsCreatePresetsResponses.d.ts +21 -0
- package/esm/funcs/presetsCreatePresetsResponses.js +106 -0
- package/esm/funcs/providersList.js +2 -1
- package/esm/funcs/rerankRerank.js +2 -14
- package/esm/funcs/sttCreateTranscription.js +2 -14
- package/esm/funcs/ttsCreateSpeech.js +2 -14
- package/esm/funcs/videoGenerationGenerate.js +2 -1
- package/esm/funcs/videoGenerationGetGeneration.js +2 -1
- package/esm/funcs/videoGenerationGetVideoContent.js +2 -1
- package/esm/funcs/videoGenerationListVideosModels.js +2 -1
- package/esm/funcs/workspacesBulkAddMembers.js +2 -1
- package/esm/funcs/workspacesBulkRemoveMembers.js +2 -1
- package/esm/funcs/workspacesCreate.js +2 -1
- package/esm/funcs/workspacesDelete.js +2 -1
- package/esm/funcs/workspacesGet.js +2 -1
- package/esm/funcs/workspacesList.js +2 -1
- package/esm/funcs/workspacesUpdate.js +2 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/encodings.d.ts +1 -0
- package/esm/lib/encodings.js +6 -0
- package/esm/lib/sdks.d.ts +1 -1
- package/esm/lib/sdks.js +3 -5
- package/esm/models/anthropicallowedcallers.d.ts +11 -0
- package/esm/models/anthropicallowedcallers.js +13 -0
- package/esm/models/anthropicbase64imagesource.d.ts +17 -0
- package/esm/models/anthropicbase64imagesource.js +21 -0
- package/esm/models/anthropicbase64pdfsource.d.ts +23 -0
- package/esm/models/anthropicbase64pdfsource.js +25 -0
- package/esm/models/anthropiccachecontroldirective.d.ts +1 -1
- package/esm/models/anthropiccitationcharlocationparam.d.ts +22 -0
- package/esm/models/anthropiccitationcharlocationparam.js +27 -0
- package/esm/models/anthropiccitationcontentblocklocationparam.d.ts +22 -0
- package/esm/models/anthropiccitationcontentblocklocationparam.js +27 -0
- package/esm/models/anthropiccitationpagelocationparam.d.ts +22 -0
- package/esm/models/anthropiccitationpagelocationparam.js +27 -0
- package/esm/models/anthropiccitationsearchresultlocation.d.ts +24 -0
- package/esm/models/anthropiccitationsearchresultlocation.js +27 -0
- package/esm/models/anthropiccitationwebsearchresultlocation.d.ts +20 -0
- package/esm/models/anthropiccitationwebsearchresultlocation.js +23 -0
- package/esm/models/anthropicdocumentblockparam.d.ts +71 -0
- package/esm/models/anthropicdocumentblockparam.js +84 -0
- package/esm/models/anthropicimageblockparam.d.ts +28 -0
- package/esm/models/anthropicimageblockparam.js +34 -0
- package/esm/models/anthropicimagemimetype.d.ts +12 -0
- package/esm/models/anthropicimagemimetype.js +14 -0
- package/esm/models/anthropicinputtokensclearatleast.d.ts +21 -0
- package/esm/models/anthropicinputtokensclearatleast.js +19 -0
- package/esm/models/anthropicinputtokenstrigger.d.ts +14 -0
- package/esm/models/anthropicinputtokenstrigger.js +14 -0
- package/esm/models/anthropicplaintextsource.d.ts +23 -0
- package/esm/models/anthropicplaintextsource.js +25 -0
- package/esm/models/anthropicsearchresultblockparam.d.ts +37 -0
- package/esm/models/anthropicsearchresultblockparam.js +32 -0
- package/esm/models/anthropictextblockparam.d.ts +33 -0
- package/esm/models/anthropictextblockparam.js +45 -0
- package/esm/models/anthropicthinkingdisplay.d.ts +10 -0
- package/esm/models/anthropicthinkingdisplay.js +12 -0
- package/esm/models/anthropicthinkingturns.d.ts +21 -0
- package/esm/models/anthropicthinkingturns.js +19 -0
- package/esm/models/anthropictooluseskeep.d.ts +21 -0
- package/esm/models/anthropictooluseskeep.js +19 -0
- package/esm/models/anthropictoolusestrigger.d.ts +14 -0
- package/esm/models/anthropictoolusestrigger.js +14 -0
- package/esm/models/anthropicurlimagesource.d.ts +14 -0
- package/esm/models/anthropicurlimagesource.js +14 -0
- package/esm/models/anthropicurlpdfsource.d.ts +14 -0
- package/esm/models/anthropicurlpdfsource.js +14 -0
- package/esm/models/anthropicwebsearchresultblockparam.d.ts +27 -0
- package/esm/models/anthropicwebsearchresultblockparam.js +28 -0
- package/esm/models/anthropicwebsearchtooluserlocation.d.ts +27 -0
- package/esm/models/anthropicwebsearchtooluserlocation.js +22 -0
- package/esm/models/applypatchcallitem.d.ts +45 -0
- package/esm/models/applypatchcallitem.js +47 -0
- package/esm/models/applypatchcalloperation.d.ts +20 -0
- package/esm/models/applypatchcalloperation.js +29 -0
- package/esm/models/applypatchcalloperationdiffdeltaevent.d.ts +17 -0
- package/esm/models/applypatchcalloperationdiffdeltaevent.js +25 -0
- package/esm/models/applypatchcalloperationdiffdoneevent.d.ts +17 -0
- package/esm/models/applypatchcalloperationdiffdoneevent.js +25 -0
- package/esm/models/applypatchcalloutputitem.d.ts +46 -0
- package/esm/models/applypatchcalloutputitem.js +54 -0
- package/esm/models/applypatchcallstatus.d.ts +18 -0
- package/esm/models/applypatchcallstatus.js +17 -0
- package/esm/models/applypatchcreatefileoperation.d.ts +24 -0
- package/esm/models/applypatchcreatefileoperation.js +25 -0
- package/esm/models/applypatchdeletefileoperation.d.ts +22 -0
- package/esm/models/applypatchdeletefileoperation.js +23 -0
- package/esm/models/applypatchengineenum.d.ts +17 -0
- package/esm/models/applypatchengineenum.js +16 -0
- package/esm/models/applypatchservertoolconfig.d.ts +19 -0
- package/esm/models/applypatchservertoolconfig.js +14 -0
- package/esm/models/applypatchservertoolopenrouter.d.ts +21 -0
- package/esm/models/applypatchservertoolopenrouter.js +15 -0
- package/esm/models/applypatchupdatefileoperation.d.ts +24 -0
- package/esm/models/applypatchupdatefileoperation.js +25 -0
- package/esm/models/autorouterplugin.d.ts +5 -0
- package/esm/models/autorouterplugin.js +2 -0
- package/esm/models/baseinputsunion.d.ts +6 -2
- package/esm/models/baseinputsunion.js +12 -0
- package/esm/models/byokkey.d.ts +58 -0
- package/esm/models/byokkey.js +37 -0
- package/esm/models/byokproviderslug.d.ts +98 -0
- package/esm/models/byokproviderslug.js +97 -0
- package/esm/models/chatrequest.d.ts +26 -15
- package/esm/models/chatrequest.js +17 -8
- package/esm/models/chatservertoolchoice.d.ts +18 -0
- package/esm/models/chatservertoolchoice.js +13 -0
- package/esm/models/chattoolchoice.d.ts +3 -2
- package/esm/models/chattoolchoice.js +2 -0
- package/esm/models/chatwebsearchshorthand.d.ts +2 -2
- package/esm/models/compactionitem.d.ts +26 -0
- package/esm/models/compactionitem.js +25 -0
- package/esm/models/contentfilterbuiltinentry.d.ts +1 -10
- package/esm/models/contentfilterbuiltinentry.js +2 -11
- package/esm/models/contentfilterbuiltinentryinput.d.ts +32 -0
- package/esm/models/contentfilterbuiltinentryinput.js +17 -0
- package/esm/models/contentpartinputaudio.d.ts +15 -0
- package/esm/models/contentpartinputaudio.js +20 -0
- package/esm/models/contentpartinputfile.d.ts +15 -0
- package/esm/models/contentpartinputfile.js +20 -0
- package/esm/models/contentpartinputvideo.d.ts +15 -0
- package/esm/models/contentpartinputvideo.js +20 -0
- package/esm/models/createbyokkeyrequest.d.ts +51 -0
- package/esm/models/createbyokkeyrequest.js +29 -0
- package/esm/models/createbyokkeyresponse.d.ts +11 -0
- package/esm/models/createbyokkeyresponse.js +15 -0
- package/esm/models/createguardrailrequest.d.ts +27 -5
- package/esm/models/createguardrailrequest.js +10 -2
- package/esm/models/createobservabilitydestinationrequest.d.ts +89 -0
- package/esm/models/createobservabilitydestinationrequest.js +58 -0
- package/esm/models/createobservabilitydestinationresponse.d.ts +11 -0
- package/esm/models/createobservabilitydestinationresponse.js +15 -0
- package/esm/models/createpresetfrominferenceresponse.d.ts +17 -0
- package/esm/models/createpresetfrominferenceresponse.js +15 -0
- package/esm/models/createworkspacerequest.d.ts +1 -1
- package/esm/models/customtoolcallinputdeltaevent.d.ts +17 -0
- package/esm/models/customtoolcallinputdeltaevent.js +25 -0
- package/esm/models/customtoolcallinputdoneevent.d.ts +17 -0
- package/esm/models/customtoolcallinputdoneevent.js +25 -0
- package/esm/models/customtoolcallitem.d.ts +35 -0
- package/esm/models/customtoolcallitem.js +28 -0
- package/esm/models/customtoolcalloutputitem.d.ts +68 -0
- package/esm/models/customtoolcalloutputitem.js +78 -0
- package/esm/models/deletebyokkeyresponse.d.ts +13 -0
- package/esm/models/deletebyokkeyresponse.js +14 -0
- package/esm/models/deleteobservabilitydestinationresponse.d.ts +13 -0
- package/esm/models/deleteobservabilitydestinationresponse.js +14 -0
- package/esm/models/easyinputmessage.d.ts +1 -0
- package/esm/models/easyinputmessage.js +1 -0
- package/esm/models/filesearchservertool.d.ts +12 -12
- package/esm/models/filesearchservertool.js +12 -17
- package/esm/models/functioncallitem.d.ts +5 -0
- package/esm/models/functioncallitem.js +1 -0
- package/esm/models/functioncalloutputitem.d.ts +11 -10
- package/esm/models/functioncalloutputitem.js +7 -6
- package/esm/models/fusionplugin.d.ts +32 -0
- package/esm/models/fusionplugin.js +23 -0
- package/esm/models/fusionservertoolconfig.d.ts +82 -0
- package/esm/models/fusionservertoolconfig.js +52 -0
- package/esm/models/fusionservertoolopenrouter.d.ts +21 -0
- package/esm/models/fusionservertoolopenrouter.js +15 -0
- package/esm/models/generationresponse.d.ts +4 -0
- package/esm/models/generationresponse.js +2 -0
- package/esm/models/getbyokkeyresponse.d.ts +11 -0
- package/esm/models/getbyokkeyresponse.js +15 -0
- package/esm/models/getobservabilitydestinationresponse.d.ts +11 -0
- package/esm/models/getobservabilitydestinationresponse.js +15 -0
- package/esm/models/guardrail.d.ts +19 -1
- package/esm/models/guardrail.js +8 -0
- package/esm/models/index.d.ts +116 -0
- package/esm/models/index.js +116 -0
- package/esm/models/inputimage.d.ts +1 -0
- package/esm/models/inputimage.js +1 -0
- package/esm/models/inputmessageitem.d.ts +1 -0
- package/esm/models/inputmessageitem.js +1 -0
- package/esm/models/inputsunion.d.ts +19 -4
- package/esm/models/inputsunion.js +45 -0
- package/esm/models/itemreferenceitem.d.ts +24 -0
- package/esm/models/itemreferenceitem.js +19 -0
- package/esm/models/listbyokkeysresponse.d.ts +18 -0
- package/esm/models/listbyokkeysresponse.js +21 -0
- package/esm/models/listobservabilitydestinationsresponse.d.ts +18 -0
- package/esm/models/listobservabilitydestinationsresponse.js +21 -0
- package/esm/models/localshellcallitem.d.ts +61 -0
- package/esm/models/localshellcallitem.js +50 -0
- package/esm/models/localshellcalloutputitem.d.ts +36 -0
- package/esm/models/localshellcalloutputitem.js +29 -0
- package/esm/models/mcpapprovalrequestitem.d.ts +30 -0
- package/esm/models/mcpapprovalrequestitem.js +27 -0
- package/esm/models/mcpapprovalresponseitem.d.ts +30 -0
- package/esm/models/mcpapprovalresponseitem.js +27 -0
- package/esm/models/mcpcallitem.d.ts +34 -0
- package/esm/models/mcpcallitem.js +29 -0
- package/esm/models/mcplisttoolsitem.d.ts +50 -0
- package/esm/models/mcplisttoolsitem.js +41 -0
- package/esm/models/messagesadvisortoolresultblock.d.ts +23 -0
- package/esm/models/messagesadvisortoolresultblock.js +20 -0
- package/esm/models/messagesmessageparam.d.ts +228 -0
- package/esm/models/messagesmessageparam.js +261 -0
- package/esm/models/messagesoutputconfig.d.ts +93 -0
- package/esm/models/messagesoutputconfig.js +61 -0
- package/esm/models/messagesrequest.d.ts +630 -0
- package/esm/models/messagesrequest.js +607 -0
- package/esm/models/multimodalmedia.d.ts +14 -0
- package/esm/models/multimodalmedia.js +14 -0
- package/esm/models/observabilityarizedestination.d.ts +67 -0
- package/esm/models/observabilityarizedestination.js +48 -0
- package/esm/models/observabilitybraintrustdestination.d.ts +66 -0
- package/esm/models/observabilitybraintrustdestination.js +47 -0
- package/esm/models/observabilityclickhousedestination.d.ts +71 -0
- package/esm/models/observabilityclickhousedestination.js +49 -0
- package/esm/models/observabilitydatadogdestination.d.ts +75 -0
- package/esm/models/observabilitydatadogdestination.js +47 -0
- package/esm/models/observabilitydestination.d.ts +26 -0
- package/esm/models/observabilitydestination.js +47 -0
- package/esm/models/observabilityfilterrulesconfig.d.ts +112 -0
- package/esm/models/observabilityfilterrulesconfig.js +119 -0
- package/esm/models/observabilitygrafanadestination.d.ts +66 -0
- package/esm/models/observabilitygrafanadestination.js +47 -0
- package/esm/models/observabilitylangfusedestination.d.ts +66 -0
- package/esm/models/observabilitylangfusedestination.js +47 -0
- package/esm/models/observabilitylangsmithdestination.d.ts +73 -0
- package/esm/models/observabilitylangsmithdestination.js +48 -0
- package/esm/models/observabilitynewrelicdestination.d.ts +73 -0
- package/esm/models/observabilitynewrelicdestination.js +54 -0
- package/esm/models/observabilityopikdestination.d.ts +66 -0
- package/esm/models/observabilityopikdestination.js +47 -0
- package/esm/models/observabilityotelcollectordestination.d.ts +64 -0
- package/esm/models/observabilityotelcollectordestination.js +45 -0
- package/esm/models/observabilityposthogdestination.d.ts +65 -0
- package/esm/models/observabilityposthogdestination.js +46 -0
- package/esm/models/observabilityrampdestination.d.ts +68 -0
- package/esm/models/observabilityrampdestination.js +46 -0
- package/esm/models/observabilitys3destination.d.ts +77 -0
- package/esm/models/observabilitys3destination.js +52 -0
- package/esm/models/observabilitysentrydestination.d.ts +65 -0
- package/esm/models/observabilitysentrydestination.js +46 -0
- package/esm/models/observabilitysnowflakedestination.d.ts +69 -0
- package/esm/models/observabilitysnowflakedestination.js +50 -0
- package/esm/models/observabilityweavedestination.d.ts +67 -0
- package/esm/models/observabilityweavedestination.js +48 -0
- package/esm/models/observabilitywebhookdestination.d.ts +70 -0
- package/esm/models/observabilitywebhookdestination.js +54 -0
- package/esm/models/openairesponsecustomtoolcall.d.ts +25 -0
- package/esm/models/openairesponsecustomtoolcall.js +29 -0
- package/esm/models/openairesponsecustomtoolcalloutput.d.ts +38 -0
- package/esm/models/openairesponsecustomtoolcalloutput.js +59 -0
- package/esm/models/openairesponsefunctiontoolcall.d.ts +4 -0
- package/esm/models/openairesponsefunctiontoolcall.js +1 -0
- package/esm/models/openairesponsestoolchoiceunion.d.ts +44 -2
- package/esm/models/openairesponsestoolchoiceunion.js +46 -0
- package/esm/models/operations/createbyokkey.d.ts +56 -0
- package/esm/models/operations/createbyokkey.js +23 -0
- package/esm/models/operations/createembeddings.d.ts +8 -4
- package/esm/models/operations/createembeddings.js +8 -0
- package/esm/models/operations/createobservabilitydestination.d.ts +56 -0
- package/esm/models/operations/createobservabilitydestination.js +23 -0
- package/esm/models/operations/createpresetschatcompletions.d.ts +61 -0
- package/esm/models/operations/createpresetschatcompletions.js +24 -0
- package/esm/models/operations/createpresetsmessages.d.ts +61 -0
- package/esm/models/operations/createpresetsmessages.js +24 -0
- package/esm/models/operations/createpresetsresponses.d.ts +61 -0
- package/esm/models/operations/createpresetsresponses.js +24 -0
- package/esm/models/operations/deletebyokkey.d.ts +58 -0
- package/esm/models/operations/deletebyokkey.js +21 -0
- package/esm/models/operations/deleteobservabilitydestination.d.ts +58 -0
- package/esm/models/operations/deleteobservabilitydestination.js +21 -0
- package/esm/models/operations/getbyokkey.d.ts +58 -0
- package/esm/models/operations/getbyokkey.js +21 -0
- package/esm/models/operations/getobservabilitydestination.d.ts +58 -0
- package/esm/models/operations/getobservabilitydestination.js +21 -0
- package/esm/models/operations/getrankingsdaily.d.ts +63 -0
- package/esm/models/operations/getrankingsdaily.js +24 -0
- package/esm/models/operations/index.d.ts +14 -0
- package/esm/models/operations/index.js +14 -0
- package/esm/models/operations/listbyokkeys.d.ts +176 -0
- package/esm/models/operations/listbyokkeys.js +129 -0
- package/esm/models/operations/listobservabilitydestinations.d.ts +77 -0
- package/esm/models/operations/listobservabilitydestinations.js +37 -0
- package/esm/models/operations/updatebyokkey.d.ts +61 -0
- package/esm/models/operations/updatebyokkey.js +24 -0
- package/esm/models/operations/updateobservabilitydestination.d.ts +61 -0
- package/esm/models/operations/updateobservabilitydestination.js +24 -0
- package/esm/models/outputapplypatchcallitem.d.ts +25 -0
- package/esm/models/outputapplypatchcallitem.js +25 -0
- package/esm/models/outputapplypatchservertoolitem.d.ts +9 -5
- package/esm/models/outputapplypatchservertoolitem.js +14 -4
- package/esm/models/outputcustomtoolcallitem.d.ts +42 -0
- package/esm/models/outputcustomtoolcallitem.js +47 -0
- package/esm/models/outputfunctioncallitem.d.ts +5 -0
- package/esm/models/outputfunctioncallitem.js +2 -0
- package/esm/models/outputfusionservertoolitem.d.ts +100 -0
- package/esm/models/outputfusionservertoolitem.js +100 -0
- package/esm/models/outputitems.d.ts +7 -2
- package/esm/models/outputitems.js +6 -0
- package/esm/models/outputwebsearchservertoolitem.d.ts +8 -8
- package/esm/models/outputwebsearchservertoolitem.js +8 -9
- package/esm/models/pipelinestage.d.ts +1 -0
- package/esm/models/pipelinestage.js +1 -0
- package/esm/models/presetdesignatedversion.d.ts +22 -0
- package/esm/models/presetdesignatedversion.js +30 -0
- package/esm/models/presetwithdesignatedversion.d.ts +37 -0
- package/esm/models/presetwithdesignatedversion.js +45 -0
- package/esm/models/providername.d.ts +3 -0
- package/esm/models/providername.js +3 -0
- package/esm/models/provideroptions.d.ts +18 -0
- package/esm/models/provideroptions.js +3 -0
- package/esm/models/providerresponse.d.ts +3 -0
- package/esm/models/providerresponse.js +3 -0
- package/esm/models/rankingsdailyitem.d.ts +21 -0
- package/esm/models/rankingsdailyitem.js +22 -0
- package/esm/models/rankingsdailymeta.d.ts +38 -0
- package/esm/models/rankingsdailymeta.js +32 -0
- package/esm/models/rankingsdailyresponse.d.ts +16 -0
- package/esm/models/rankingsdailyresponse.js +17 -0
- package/esm/models/responsesrequest.d.ts +29 -13
- package/esm/models/responsesrequest.js +19 -0
- package/esm/models/routingstrategy.d.ts +1 -0
- package/esm/models/routingstrategy.js +1 -0
- package/esm/models/searchqualitylevel.d.ts +2 -2
- package/esm/models/searchqualitylevel.js +1 -1
- package/esm/models/shellcallitem.d.ts +54 -0
- package/esm/models/shellcallitem.js +50 -0
- package/esm/models/shellcalloutputitem.d.ts +58 -0
- package/esm/models/shellcalloutputitem.js +55 -0
- package/esm/models/stopservertoolswhencondition.d.ts +16 -0
- package/esm/models/stopservertoolswhencondition.js +22 -0
- package/esm/models/stopservertoolswhenfinishreasonis.d.ts +17 -0
- package/esm/models/stopservertoolswhenfinishreasonis.js +14 -0
- package/esm/models/stopservertoolswhenhastoolcall.d.ts +17 -0
- package/esm/models/stopservertoolswhenhastoolcall.js +19 -0
- package/esm/models/stopservertoolswhenmaxcost.d.ts +17 -0
- package/esm/models/stopservertoolswhenmaxcost.js +19 -0
- package/esm/models/stopservertoolswhenmaxtokensused.d.ts +17 -0
- package/esm/models/stopservertoolswhenmaxtokensused.js +19 -0
- package/esm/models/stopservertoolswhenstepcountis.d.ts +17 -0
- package/esm/models/stopservertoolswhenstepcountis.js +19 -0
- package/esm/models/streamevents.d.ts +5 -1
- package/esm/models/streamevents.js +8 -0
- package/esm/models/updatebyokkeyrequest.d.ts +40 -0
- package/esm/models/updatebyokkeyrequest.js +25 -0
- package/esm/models/updatebyokkeyresponse.d.ts +11 -0
- package/esm/models/updatebyokkeyresponse.js +15 -0
- package/esm/models/updateguardrailrequest.d.ts +27 -5
- package/esm/models/updateguardrailrequest.js +10 -2
- package/esm/models/updateobservabilitydestinationrequest.d.ts +47 -0
- package/esm/models/updateobservabilitydestinationrequest.js +29 -0
- package/esm/models/updateobservabilitydestinationresponse.d.ts +11 -0
- package/esm/models/updateobservabilitydestinationresponse.js +15 -0
- package/esm/models/updateworkspacerequest.d.ts +1 -1
- package/esm/models/videogenerationrequest.d.ts +20 -0
- package/esm/models/videogenerationrequest.js +5 -0
- package/esm/models/videomodel.d.ts +10 -0
- package/esm/models/videomodel.js +10 -0
- package/esm/models/webfetchengineenum.d.ts +4 -3
- package/esm/models/webfetchengineenum.js +3 -2
- package/esm/models/webfetchplugin.d.ts +32 -0
- package/esm/models/webfetchplugin.js +25 -0
- package/esm/models/webfetchservertoolconfig.d.ts +1 -1
- package/esm/models/websearchconfig.d.ts +2 -2
- package/esm/models/websearchengineenum.d.ts +1 -1
- package/esm/models/websearchengineenum.js +1 -1
- package/esm/models/websearchservertoolconfig.d.ts +2 -2
- package/esm/sdk/byok.d.ts +44 -0
- package/esm/sdk/byok.js +60 -0
- package/esm/sdk/datasets.d.ts +31 -0
- package/esm/sdk/datasets.js +37 -0
- package/esm/sdk/observability.d.ts +44 -0
- package/esm/sdk/observability.js +60 -0
- package/esm/sdk/presets.d.ts +27 -0
- package/esm/sdk/presets.js +39 -0
- package/esm/sdk/sdk.d.ts +12 -0
- package/esm/sdk/sdk.js +16 -0
- package/jsr.json +1 -1
- package/package.json +10 -6
- package/tsconfig.json +0 -2
|
@@ -56,10 +56,13 @@ export declare const ProviderResponseProviderName: {
|
|
|
56
56
|
readonly Clarifai: "Clarifai";
|
|
57
57
|
readonly Cloudflare: "Cloudflare";
|
|
58
58
|
readonly Cohere: "Cohere";
|
|
59
|
+
readonly Crucible: "Crucible";
|
|
59
60
|
readonly Crusoe: "Crusoe";
|
|
61
|
+
readonly Darkbloom: "Darkbloom";
|
|
60
62
|
readonly DeepInfra: "DeepInfra";
|
|
61
63
|
readonly DeepSeek: "DeepSeek";
|
|
62
64
|
readonly DekaLLM: "DekaLLM";
|
|
65
|
+
readonly DigitalOcean: "DigitalOcean";
|
|
63
66
|
readonly Featherless: "Featherless";
|
|
64
67
|
readonly Fireworks: "Fireworks";
|
|
65
68
|
readonly Friendli: "Friendli";
|
|
@@ -60,10 +60,13 @@ export const ProviderResponseProviderName = {
|
|
|
60
60
|
Clarifai: "Clarifai",
|
|
61
61
|
Cloudflare: "Cloudflare",
|
|
62
62
|
Cohere: "Cohere",
|
|
63
|
+
Crucible: "Crucible",
|
|
63
64
|
Crusoe: "Crusoe",
|
|
65
|
+
Darkbloom: "Darkbloom",
|
|
64
66
|
DeepInfra: "DeepInfra",
|
|
65
67
|
DeepSeek: "DeepSeek",
|
|
66
68
|
DekaLLM: "DekaLLM",
|
|
69
|
+
DigitalOcean: "DigitalOcean",
|
|
67
70
|
Featherless: "Featherless",
|
|
68
71
|
Fireworks: "Fireworks",
|
|
69
72
|
Friendli: "Friendli",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type RankingsDailyItem = {
|
|
5
|
+
/**
|
|
6
|
+
* UTC calendar date the row is aggregated over (YYYY-MM-DD).
|
|
7
|
+
*/
|
|
8
|
+
date: string;
|
|
9
|
+
/**
|
|
10
|
+
* Model variant permaslug (e.g. `openai/gpt-4o-2024-05-13`, `openai/gpt-4o-2024-05-13:free`). Non-default variants include a `:variant` suffix and are ranked as their own entry. The reserved value `other` denotes the aggregated row covering every model outside the daily top 50 for that date — always sorted last within its date.
|
|
11
|
+
*/
|
|
12
|
+
modelPermaslug: string;
|
|
13
|
+
/**
|
|
14
|
+
* Sum of `prompt_tokens + completion_tokens` for the day, returned as a decimal string so 64-bit values are not truncated.
|
|
15
|
+
*/
|
|
16
|
+
totalTokens: string;
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const RankingsDailyItem$inboundSchema: z.ZodType<RankingsDailyItem, unknown>;
|
|
20
|
+
export declare function rankingsDailyItemFromJSON(jsonString: string): SafeParseResult<RankingsDailyItem, SDKValidationError>;
|
|
21
|
+
//# sourceMappingURL=rankingsdailyitem.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 6f17738c68f5
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const RankingsDailyItem$inboundSchema = z.object({
|
|
10
|
+
date: z.string(),
|
|
11
|
+
model_permaslug: z.string(),
|
|
12
|
+
total_tokens: z.string(),
|
|
13
|
+
}).transform((v) => {
|
|
14
|
+
return remap$(v, {
|
|
15
|
+
"model_permaslug": "modelPermaslug",
|
|
16
|
+
"total_tokens": "totalTokens",
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
export function rankingsDailyItemFromJSON(jsonString) {
|
|
20
|
+
return safeParse(jsonString, (x) => RankingsDailyItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RankingsDailyItem' from JSON`);
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=rankingsdailyitem.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
/**
|
|
6
|
+
* Dataset version. Field names and grain are stable for the life of `v1`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const Version: {
|
|
9
|
+
readonly V1: "v1";
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Dataset version. Field names and grain are stable for the life of `v1`.
|
|
13
|
+
*/
|
|
14
|
+
export type Version = ClosedEnum<typeof Version>;
|
|
15
|
+
export type RankingsDailyMeta = {
|
|
16
|
+
/**
|
|
17
|
+
* ISO-8601 timestamp of when the response was generated. Reflects data-freshness because the underlying materialized view continuously ingests upstream events.
|
|
18
|
+
*/
|
|
19
|
+
asOf: string;
|
|
20
|
+
/**
|
|
21
|
+
* Resolved end of the date window (UTC, inclusive).
|
|
22
|
+
*/
|
|
23
|
+
endDate: string;
|
|
24
|
+
/**
|
|
25
|
+
* Resolved start of the date window (UTC, inclusive).
|
|
26
|
+
*/
|
|
27
|
+
startDate: string;
|
|
28
|
+
/**
|
|
29
|
+
* Dataset version. Field names and grain are stable for the life of `v1`.
|
|
30
|
+
*/
|
|
31
|
+
version: Version;
|
|
32
|
+
};
|
|
33
|
+
/** @internal */
|
|
34
|
+
export declare const Version$inboundSchema: z.ZodEnum<typeof Version>;
|
|
35
|
+
/** @internal */
|
|
36
|
+
export declare const RankingsDailyMeta$inboundSchema: z.ZodType<RankingsDailyMeta, unknown>;
|
|
37
|
+
export declare function rankingsDailyMetaFromJSON(jsonString: string): SafeParseResult<RankingsDailyMeta, SDKValidationError>;
|
|
38
|
+
//# sourceMappingURL=rankingsdailymeta.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 6e46d93381d7
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
/**
|
|
9
|
+
* Dataset version. Field names and grain are stable for the life of `v1`.
|
|
10
|
+
*/
|
|
11
|
+
export const Version = {
|
|
12
|
+
V1: "v1",
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const Version$inboundSchema = z.enum(Version);
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const RankingsDailyMeta$inboundSchema = z.object({
|
|
18
|
+
as_of: z.string(),
|
|
19
|
+
end_date: z.string(),
|
|
20
|
+
start_date: z.string(),
|
|
21
|
+
version: Version$inboundSchema,
|
|
22
|
+
}).transform((v) => {
|
|
23
|
+
return remap$(v, {
|
|
24
|
+
"as_of": "asOf",
|
|
25
|
+
"end_date": "endDate",
|
|
26
|
+
"start_date": "startDate",
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
export function rankingsDailyMetaFromJSON(jsonString) {
|
|
30
|
+
return safeParse(jsonString, (x) => RankingsDailyMeta$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RankingsDailyMeta' from JSON`);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=rankingsdailymeta.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
import { RankingsDailyItem } from "./rankingsdailyitem.js";
|
|
5
|
+
import { RankingsDailyMeta } from "./rankingsdailymeta.js";
|
|
6
|
+
export type RankingsDailyResponse = {
|
|
7
|
+
/**
|
|
8
|
+
* Up to 51 rows per day — the top 50 public models by `total_tokens` for each UTC calendar date in the window, plus one aggregated `other` row summing every model outside that top 50 (omitted when the long tail is empty). Rows are sorted by `date` ascending, then by `total_tokens` descending, with `other` pinned last within its date. Ties between real models break alphabetically on `model_permaslug` so the order is stable across requests.
|
|
9
|
+
*/
|
|
10
|
+
data: Array<RankingsDailyItem>;
|
|
11
|
+
meta: RankingsDailyMeta;
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export declare const RankingsDailyResponse$inboundSchema: z.ZodType<RankingsDailyResponse, unknown>;
|
|
15
|
+
export declare function rankingsDailyResponseFromJSON(jsonString: string): SafeParseResult<RankingsDailyResponse, SDKValidationError>;
|
|
16
|
+
//# sourceMappingURL=rankingsdailyresponse.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: d4c3689c5ec7
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { RankingsDailyItem$inboundSchema, } from "./rankingsdailyitem.js";
|
|
8
|
+
import { RankingsDailyMeta$inboundSchema, } from "./rankingsdailymeta.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const RankingsDailyResponse$inboundSchema = z.object({
|
|
11
|
+
data: z.array(RankingsDailyItem$inboundSchema),
|
|
12
|
+
meta: RankingsDailyMeta$inboundSchema,
|
|
13
|
+
});
|
|
14
|
+
export function rankingsDailyResponseFromJSON(jsonString) {
|
|
15
|
+
return safeParse(jsonString, (x) => RankingsDailyResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RankingsDailyResponse' from JSON`);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=rankingsdailyresponse.js.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { AnthropicCacheControlDirective, AnthropicCacheControlDirective$Outbound } from "./anthropiccachecontroldirective.js";
|
|
3
4
|
import { ApplyPatchServerTool, ApplyPatchServerTool$Outbound } from "./applypatchservertool.js";
|
|
5
|
+
import { ApplyPatchServerToolOpenRouter, ApplyPatchServerToolOpenRouter$Outbound } from "./applypatchservertoolopenrouter.js";
|
|
4
6
|
import { AutoRouterPlugin, AutoRouterPlugin$Outbound } from "./autorouterplugin.js";
|
|
5
7
|
import { ChatSearchModelsServerTool, ChatSearchModelsServerTool$Outbound } from "./chatsearchmodelsservertool.js";
|
|
6
8
|
import { CodeInterpreterServerTool, CodeInterpreterServerTool$Outbound } from "./codeinterpreterservertool.js";
|
|
@@ -11,6 +13,8 @@ import { CustomTool, CustomTool$Outbound } from "./customtool.js";
|
|
|
11
13
|
import { DatetimeServerTool, DatetimeServerTool$Outbound } from "./datetimeservertool.js";
|
|
12
14
|
import { FileParserPlugin, FileParserPlugin$Outbound } from "./fileparserplugin.js";
|
|
13
15
|
import { FileSearchServerTool, FileSearchServerTool$Outbound } from "./filesearchservertool.js";
|
|
16
|
+
import { FusionPlugin, FusionPlugin$Outbound } from "./fusionplugin.js";
|
|
17
|
+
import { FusionServerToolOpenRouter, FusionServerToolOpenRouter$Outbound } from "./fusionservertoolopenrouter.js";
|
|
14
18
|
import { ImageConfig, ImageConfig$Outbound } from "./imageconfig.js";
|
|
15
19
|
import { ImageGenerationServerTool, ImageGenerationServerTool$Outbound } from "./imagegenerationservertool.js";
|
|
16
20
|
import { ImageGenerationServerToolOpenRouter, ImageGenerationServerToolOpenRouter$Outbound } from "./imagegenerationservertoolopenrouter.js";
|
|
@@ -29,14 +33,16 @@ import { ReasoningConfig, ReasoningConfig$Outbound } from "./reasoningconfig.js"
|
|
|
29
33
|
import { ResponseHealingPlugin, ResponseHealingPlugin$Outbound } from "./responsehealingplugin.js";
|
|
30
34
|
import { ResponseIncludesEnum } from "./responseincludesenum.js";
|
|
31
35
|
import { ShellServerTool, ShellServerTool$Outbound } from "./shellservertool.js";
|
|
36
|
+
import { StopServerToolsWhenCondition, StopServerToolsWhenCondition$Outbound } from "./stopservertoolswhencondition.js";
|
|
32
37
|
import { StoredPromptTemplate, StoredPromptTemplate$Outbound } from "./storedprompttemplate.js";
|
|
33
38
|
import { TextExtendedConfig, TextExtendedConfig$Outbound } from "./textextendedconfig.js";
|
|
34
39
|
import { TraceConfig, TraceConfig$Outbound } from "./traceconfig.js";
|
|
40
|
+
import { WebFetchPlugin, WebFetchPlugin$Outbound } from "./webfetchplugin.js";
|
|
35
41
|
import { WebFetchServerTool, WebFetchServerTool$Outbound } from "./webfetchservertool.js";
|
|
36
42
|
import { WebSearchPlugin, WebSearchPlugin$Outbound } from "./websearchplugin.js";
|
|
37
43
|
import { WebSearchServerTool, WebSearchServerTool$Outbound } from "./websearchservertool.js";
|
|
38
44
|
import { WebSearchServerToolOpenRouter, WebSearchServerToolOpenRouter$Outbound } from "./websearchservertoolopenrouter.js";
|
|
39
|
-
export type ResponsesRequestPlugin = AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | WebSearchPlugin;
|
|
45
|
+
export type ResponsesRequestPlugin = AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | WebSearchPlugin | WebFetchPlugin;
|
|
40
46
|
export declare const ResponsesRequestServiceTier: {
|
|
41
47
|
readonly Auto: "auto";
|
|
42
48
|
readonly Default: "default";
|
|
@@ -59,18 +65,22 @@ export type ResponsesRequestToolFunction = {
|
|
|
59
65
|
};
|
|
60
66
|
export type ResponsesRequestToolUnion = ResponsesRequestToolFunction | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | FileSearchServerTool | ComputerUseServerTool | CodeInterpreterServerTool | McpServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | CustomTool | (DatetimeServerTool & {
|
|
61
67
|
type: "openrouter:datetime";
|
|
62
|
-
}) | (ImageGenerationServerToolOpenRouter & {
|
|
68
|
+
}) | FusionServerToolOpenRouter | (ImageGenerationServerToolOpenRouter & {
|
|
63
69
|
type: "openrouter:image_generation";
|
|
64
70
|
}) | (ChatSearchModelsServerTool & {
|
|
65
71
|
type: "openrouter:experimental__search_models";
|
|
66
72
|
}) | (WebFetchServerTool & {
|
|
67
73
|
type: "openrouter:web_fetch";
|
|
68
|
-
}) | WebSearchServerToolOpenRouter;
|
|
74
|
+
}) | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter;
|
|
69
75
|
/**
|
|
70
76
|
* Request schema for Responses endpoint
|
|
71
77
|
*/
|
|
72
78
|
export type ResponsesRequest = {
|
|
73
79
|
background?: boolean | null | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
|
|
82
|
+
*/
|
|
83
|
+
cacheControl?: AnthropicCacheControlDirective | undefined;
|
|
74
84
|
frequencyPenalty?: number | null | undefined;
|
|
75
85
|
/**
|
|
76
86
|
* 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.
|
|
@@ -102,7 +112,7 @@ export type ResponsesRequest = {
|
|
|
102
112
|
/**
|
|
103
113
|
* Plugins you want to enable for this request, including their settings.
|
|
104
114
|
*/
|
|
105
|
-
plugins?: Array<AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | WebSearchPlugin> | undefined;
|
|
115
|
+
plugins?: Array<AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | WebSearchPlugin | WebFetchPlugin> | undefined;
|
|
106
116
|
presencePenalty?: number | null | undefined;
|
|
107
117
|
previousResponseId?: string | null | undefined;
|
|
108
118
|
prompt?: StoredPromptTemplate | null | undefined;
|
|
@@ -118,9 +128,13 @@ export type ResponsesRequest = {
|
|
|
118
128
|
safetyIdentifier?: string | null | undefined;
|
|
119
129
|
serviceTier?: ResponsesRequestServiceTier | null | undefined;
|
|
120
130
|
/**
|
|
121
|
-
* 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.
|
|
131
|
+
* A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
|
|
122
132
|
*/
|
|
123
133
|
sessionId?: string | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
|
|
136
|
+
*/
|
|
137
|
+
stopServerToolsWhen?: Array<StopServerToolsWhenCondition> | undefined;
|
|
124
138
|
store?: false | undefined;
|
|
125
139
|
stream?: boolean | undefined;
|
|
126
140
|
temperature?: number | null | undefined;
|
|
@@ -131,13 +145,13 @@ export type ResponsesRequest = {
|
|
|
131
145
|
toolChoice?: OpenAIResponsesToolChoiceUnion | undefined;
|
|
132
146
|
tools?: Array<ResponsesRequestToolFunction | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | FileSearchServerTool | ComputerUseServerTool | CodeInterpreterServerTool | McpServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | CustomTool | (DatetimeServerTool & {
|
|
133
147
|
type: "openrouter:datetime";
|
|
134
|
-
}) | (ImageGenerationServerToolOpenRouter & {
|
|
148
|
+
}) | FusionServerToolOpenRouter | (ImageGenerationServerToolOpenRouter & {
|
|
135
149
|
type: "openrouter:image_generation";
|
|
136
150
|
}) | (ChatSearchModelsServerTool & {
|
|
137
151
|
type: "openrouter:experimental__search_models";
|
|
138
152
|
}) | (WebFetchServerTool & {
|
|
139
153
|
type: "openrouter:web_fetch";
|
|
140
|
-
}) | WebSearchServerToolOpenRouter> | undefined;
|
|
154
|
+
}) | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter> | undefined;
|
|
141
155
|
topK?: number | undefined;
|
|
142
156
|
topLogprobs?: number | null | undefined;
|
|
143
157
|
topP?: number | null | undefined;
|
|
@@ -152,7 +166,7 @@ export type ResponsesRequest = {
|
|
|
152
166
|
user?: string | undefined;
|
|
153
167
|
};
|
|
154
168
|
/** @internal */
|
|
155
|
-
export type ResponsesRequestPlugin$Outbound = AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound;
|
|
169
|
+
export type ResponsesRequestPlugin$Outbound = AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound;
|
|
156
170
|
/** @internal */
|
|
157
171
|
export declare const ResponsesRequestPlugin$outboundSchema: z.ZodType<ResponsesRequestPlugin$Outbound, ResponsesRequestPlugin>;
|
|
158
172
|
export declare function responsesRequestPluginToJSON(responsesRequestPlugin: ResponsesRequestPlugin): string;
|
|
@@ -174,19 +188,20 @@ export declare function responsesRequestToolFunctionToJSON(responsesRequestToolF
|
|
|
174
188
|
/** @internal */
|
|
175
189
|
export type ResponsesRequestToolUnion$Outbound = ResponsesRequestToolFunction$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | FileSearchServerTool$Outbound | ComputerUseServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | CustomTool$Outbound | (DatetimeServerTool$Outbound & {
|
|
176
190
|
type: "openrouter:datetime";
|
|
177
|
-
}) | (ImageGenerationServerToolOpenRouter$Outbound & {
|
|
191
|
+
}) | FusionServerToolOpenRouter$Outbound | (ImageGenerationServerToolOpenRouter$Outbound & {
|
|
178
192
|
type: "openrouter:image_generation";
|
|
179
193
|
}) | (ChatSearchModelsServerTool$Outbound & {
|
|
180
194
|
type: "openrouter:experimental__search_models";
|
|
181
195
|
}) | (WebFetchServerTool$Outbound & {
|
|
182
196
|
type: "openrouter:web_fetch";
|
|
183
|
-
}) | WebSearchServerToolOpenRouter$Outbound;
|
|
197
|
+
}) | WebSearchServerToolOpenRouter$Outbound | ApplyPatchServerToolOpenRouter$Outbound;
|
|
184
198
|
/** @internal */
|
|
185
199
|
export declare const ResponsesRequestToolUnion$outboundSchema: z.ZodType<ResponsesRequestToolUnion$Outbound, ResponsesRequestToolUnion>;
|
|
186
200
|
export declare function responsesRequestToolUnionToJSON(responsesRequestToolUnion: ResponsesRequestToolUnion): string;
|
|
187
201
|
/** @internal */
|
|
188
202
|
export type ResponsesRequest$Outbound = {
|
|
189
203
|
background?: boolean | null | undefined;
|
|
204
|
+
cache_control?: AnthropicCacheControlDirective$Outbound | undefined;
|
|
190
205
|
frequency_penalty?: number | null | undefined;
|
|
191
206
|
image_config?: {
|
|
192
207
|
[k: string]: ImageConfig$Outbound;
|
|
@@ -203,7 +218,7 @@ export type ResponsesRequest$Outbound = {
|
|
|
203
218
|
model?: string | undefined;
|
|
204
219
|
models?: Array<string> | undefined;
|
|
205
220
|
parallel_tool_calls?: boolean | null | undefined;
|
|
206
|
-
plugins?: Array<AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound> | undefined;
|
|
221
|
+
plugins?: Array<AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound> | undefined;
|
|
207
222
|
presence_penalty?: number | null | undefined;
|
|
208
223
|
previous_response_id?: string | null | undefined;
|
|
209
224
|
prompt?: StoredPromptTemplate$Outbound | null | undefined;
|
|
@@ -213,6 +228,7 @@ export type ResponsesRequest$Outbound = {
|
|
|
213
228
|
safety_identifier?: string | null | undefined;
|
|
214
229
|
service_tier: string | null;
|
|
215
230
|
session_id?: string | undefined;
|
|
231
|
+
stop_server_tools_when?: Array<StopServerToolsWhenCondition$Outbound> | undefined;
|
|
216
232
|
store: false;
|
|
217
233
|
stream: boolean;
|
|
218
234
|
temperature?: number | null | undefined;
|
|
@@ -220,13 +236,13 @@ export type ResponsesRequest$Outbound = {
|
|
|
220
236
|
tool_choice?: OpenAIResponsesToolChoiceUnion$Outbound | undefined;
|
|
221
237
|
tools?: Array<ResponsesRequestToolFunction$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | FileSearchServerTool$Outbound | ComputerUseServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | CustomTool$Outbound | (DatetimeServerTool$Outbound & {
|
|
222
238
|
type: "openrouter:datetime";
|
|
223
|
-
}) | (ImageGenerationServerToolOpenRouter$Outbound & {
|
|
239
|
+
}) | FusionServerToolOpenRouter$Outbound | (ImageGenerationServerToolOpenRouter$Outbound & {
|
|
224
240
|
type: "openrouter:image_generation";
|
|
225
241
|
}) | (ChatSearchModelsServerTool$Outbound & {
|
|
226
242
|
type: "openrouter:experimental__search_models";
|
|
227
243
|
}) | (WebFetchServerTool$Outbound & {
|
|
228
244
|
type: "openrouter:web_fetch";
|
|
229
|
-
}) | WebSearchServerToolOpenRouter$Outbound> | undefined;
|
|
245
|
+
}) | WebSearchServerToolOpenRouter$Outbound | ApplyPatchServerToolOpenRouter$Outbound> | undefined;
|
|
230
246
|
top_k?: number | undefined;
|
|
231
247
|
top_logprobs?: number | null | undefined;
|
|
232
248
|
top_p?: number | null | undefined;
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import * as openEnums from "../types/enums.js";
|
|
8
|
+
import { AnthropicCacheControlDirective$outboundSchema, } from "./anthropiccachecontroldirective.js";
|
|
8
9
|
import { ApplyPatchServerTool$outboundSchema, } from "./applypatchservertool.js";
|
|
10
|
+
import { ApplyPatchServerToolOpenRouter$outboundSchema, } from "./applypatchservertoolopenrouter.js";
|
|
9
11
|
import { AutoRouterPlugin$outboundSchema, } from "./autorouterplugin.js";
|
|
10
12
|
import { ChatSearchModelsServerTool$outboundSchema, } from "./chatsearchmodelsservertool.js";
|
|
11
13
|
import { CodeInterpreterServerTool$outboundSchema, } from "./codeinterpreterservertool.js";
|
|
@@ -16,6 +18,8 @@ import { CustomTool$outboundSchema, } from "./customtool.js";
|
|
|
16
18
|
import { DatetimeServerTool$outboundSchema, } from "./datetimeservertool.js";
|
|
17
19
|
import { FileParserPlugin$outboundSchema, } from "./fileparserplugin.js";
|
|
18
20
|
import { FileSearchServerTool$outboundSchema, } from "./filesearchservertool.js";
|
|
21
|
+
import { FusionPlugin$outboundSchema, } from "./fusionplugin.js";
|
|
22
|
+
import { FusionServerToolOpenRouter$outboundSchema, } from "./fusionservertoolopenrouter.js";
|
|
19
23
|
import { ImageConfig$outboundSchema, } from "./imageconfig.js";
|
|
20
24
|
import { ImageGenerationServerTool$outboundSchema, } from "./imagegenerationservertool.js";
|
|
21
25
|
import { ImageGenerationServerToolOpenRouter$outboundSchema, } from "./imagegenerationservertoolopenrouter.js";
|
|
@@ -34,9 +38,11 @@ import { ReasoningConfig$outboundSchema, } from "./reasoningconfig.js";
|
|
|
34
38
|
import { ResponseHealingPlugin$outboundSchema, } from "./responsehealingplugin.js";
|
|
35
39
|
import { ResponseIncludesEnum$outboundSchema, } from "./responseincludesenum.js";
|
|
36
40
|
import { ShellServerTool$outboundSchema, } from "./shellservertool.js";
|
|
41
|
+
import { StopServerToolsWhenCondition$outboundSchema, } from "./stopservertoolswhencondition.js";
|
|
37
42
|
import { StoredPromptTemplate$outboundSchema, } from "./storedprompttemplate.js";
|
|
38
43
|
import { TextExtendedConfig$outboundSchema, } from "./textextendedconfig.js";
|
|
39
44
|
import { TraceConfig$outboundSchema, } from "./traceconfig.js";
|
|
45
|
+
import { WebFetchPlugin$outboundSchema, } from "./webfetchplugin.js";
|
|
40
46
|
import { WebFetchServerTool$outboundSchema, } from "./webfetchservertool.js";
|
|
41
47
|
import { WebSearchPlugin$outboundSchema, } from "./websearchplugin.js";
|
|
42
48
|
import { WebSearchServerTool$outboundSchema, } from "./websearchservertool.js";
|
|
@@ -53,10 +59,12 @@ export const ResponsesRequestPlugin$outboundSchema = z.union([
|
|
|
53
59
|
AutoRouterPlugin$outboundSchema,
|
|
54
60
|
ContextCompressionPlugin$outboundSchema,
|
|
55
61
|
FileParserPlugin$outboundSchema,
|
|
62
|
+
FusionPlugin$outboundSchema,
|
|
56
63
|
ModerationPlugin$outboundSchema,
|
|
57
64
|
ParetoRouterPlugin$outboundSchema,
|
|
58
65
|
ResponseHealingPlugin$outboundSchema,
|
|
59
66
|
WebSearchPlugin$outboundSchema,
|
|
67
|
+
WebFetchPlugin$outboundSchema,
|
|
60
68
|
]);
|
|
61
69
|
export function responsesRequestPluginToJSON(responsesRequestPlugin) {
|
|
62
70
|
return JSON.stringify(ResponsesRequestPlugin$outboundSchema.parse(responsesRequestPlugin));
|
|
@@ -91,10 +99,12 @@ export const ResponsesRequestToolUnion$outboundSchema = z.union([
|
|
|
91
99
|
ApplyPatchServerTool$outboundSchema,
|
|
92
100
|
CustomTool$outboundSchema,
|
|
93
101
|
DatetimeServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:datetime") })),
|
|
102
|
+
FusionServerToolOpenRouter$outboundSchema,
|
|
94
103
|
ImageGenerationServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:image_generation") })),
|
|
95
104
|
ChatSearchModelsServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:experimental__search_models") })),
|
|
96
105
|
WebFetchServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:web_fetch") })),
|
|
97
106
|
WebSearchServerToolOpenRouter$outboundSchema,
|
|
107
|
+
ApplyPatchServerToolOpenRouter$outboundSchema,
|
|
98
108
|
]);
|
|
99
109
|
export function responsesRequestToolUnionToJSON(responsesRequestToolUnion) {
|
|
100
110
|
return JSON.stringify(ResponsesRequestToolUnion$outboundSchema.parse(responsesRequestToolUnion));
|
|
@@ -102,6 +112,7 @@ export function responsesRequestToolUnionToJSON(responsesRequestToolUnion) {
|
|
|
102
112
|
/** @internal */
|
|
103
113
|
export const ResponsesRequest$outboundSchema = z.object({
|
|
104
114
|
background: z.nullable(z.boolean()).optional(),
|
|
115
|
+
cacheControl: AnthropicCacheControlDirective$outboundSchema.optional(),
|
|
105
116
|
frequencyPenalty: z.nullable(z.number()).optional(),
|
|
106
117
|
imageConfig: z.record(z.string(), ImageConfig$outboundSchema).optional(),
|
|
107
118
|
include: z.nullable(z.array(ResponseIncludesEnum$outboundSchema)).optional(),
|
|
@@ -118,10 +129,12 @@ export const ResponsesRequest$outboundSchema = z.object({
|
|
|
118
129
|
AutoRouterPlugin$outboundSchema,
|
|
119
130
|
ContextCompressionPlugin$outboundSchema,
|
|
120
131
|
FileParserPlugin$outboundSchema,
|
|
132
|
+
FusionPlugin$outboundSchema,
|
|
121
133
|
ModerationPlugin$outboundSchema,
|
|
122
134
|
ParetoRouterPlugin$outboundSchema,
|
|
123
135
|
ResponseHealingPlugin$outboundSchema,
|
|
124
136
|
WebSearchPlugin$outboundSchema,
|
|
137
|
+
WebFetchPlugin$outboundSchema,
|
|
125
138
|
])).optional(),
|
|
126
139
|
presencePenalty: z.nullable(z.number()).optional(),
|
|
127
140
|
previousResponseId: z.nullable(z.string()).optional(),
|
|
@@ -132,6 +145,8 @@ export const ResponsesRequest$outboundSchema = z.object({
|
|
|
132
145
|
safetyIdentifier: z.nullable(z.string()).optional(),
|
|
133
146
|
serviceTier: z.nullable(ResponsesRequestServiceTier$outboundSchema.default("auto")),
|
|
134
147
|
sessionId: z.string().optional(),
|
|
148
|
+
stopServerToolsWhen: z.array(StopServerToolsWhenCondition$outboundSchema)
|
|
149
|
+
.optional(),
|
|
135
150
|
store: z.literal(false).default(false),
|
|
136
151
|
stream: z.boolean().default(false),
|
|
137
152
|
temperature: z.nullable(z.number()).optional(),
|
|
@@ -153,10 +168,12 @@ export const ResponsesRequest$outboundSchema = z.object({
|
|
|
153
168
|
ApplyPatchServerTool$outboundSchema,
|
|
154
169
|
CustomTool$outboundSchema,
|
|
155
170
|
DatetimeServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:datetime") })),
|
|
171
|
+
FusionServerToolOpenRouter$outboundSchema,
|
|
156
172
|
ImageGenerationServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:image_generation") })),
|
|
157
173
|
ChatSearchModelsServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:experimental__search_models") })),
|
|
158
174
|
WebFetchServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:web_fetch") })),
|
|
159
175
|
WebSearchServerToolOpenRouter$outboundSchema,
|
|
176
|
+
ApplyPatchServerToolOpenRouter$outboundSchema,
|
|
160
177
|
])).optional(),
|
|
161
178
|
topK: z.int().optional(),
|
|
162
179
|
topLogprobs: z.nullable(z.int()).optional(),
|
|
@@ -166,6 +183,7 @@ export const ResponsesRequest$outboundSchema = z.object({
|
|
|
166
183
|
user: z.string().optional(),
|
|
167
184
|
}).transform((v) => {
|
|
168
185
|
return remap$(v, {
|
|
186
|
+
cacheControl: "cache_control",
|
|
169
187
|
frequencyPenalty: "frequency_penalty",
|
|
170
188
|
imageConfig: "image_config",
|
|
171
189
|
maxOutputTokens: "max_output_tokens",
|
|
@@ -177,6 +195,7 @@ export const ResponsesRequest$outboundSchema = z.object({
|
|
|
177
195
|
safetyIdentifier: "safety_identifier",
|
|
178
196
|
serviceTier: "service_tier",
|
|
179
197
|
sessionId: "session_id",
|
|
198
|
+
stopServerToolsWhen: "stop_server_tools_when",
|
|
180
199
|
toolChoice: "tool_choice",
|
|
181
200
|
topK: "top_k",
|
|
182
201
|
topLogprobs: "top_logprobs",
|
|
@@ -9,6 +9,7 @@ export declare const RoutingStrategy: {
|
|
|
9
9
|
readonly Fallback: "fallback";
|
|
10
10
|
readonly Pareto: "pareto";
|
|
11
11
|
readonly Bodybuilder: "bodybuilder";
|
|
12
|
+
readonly Fusion: "fusion";
|
|
12
13
|
};
|
|
13
14
|
export type RoutingStrategy = OpenEnum<typeof RoutingStrategy>;
|
|
14
15
|
/** @internal */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
/**
|
|
4
|
-
* How much context to retrieve per result.
|
|
4
|
+
* How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size.
|
|
5
5
|
*/
|
|
6
6
|
export declare const SearchQualityLevel: {
|
|
7
7
|
readonly Low: "low";
|
|
@@ -9,7 +9,7 @@ export declare const SearchQualityLevel: {
|
|
|
9
9
|
readonly High: "high";
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
* How much context to retrieve per result.
|
|
12
|
+
* How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size.
|
|
13
13
|
*/
|
|
14
14
|
export type SearchQualityLevel = OpenEnum<typeof SearchQualityLevel>;
|
|
15
15
|
/** @internal */
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as openEnums from "../types/enums.js";
|
|
6
6
|
/**
|
|
7
|
-
* How much context to retrieve per result.
|
|
7
|
+
* How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size.
|
|
8
8
|
*/
|
|
9
9
|
export const SearchQualityLevel = {
|
|
10
10
|
Low: "low",
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
|
+
export type ShellCallItemAction = {
|
|
4
|
+
commands: Array<string>;
|
|
5
|
+
maxOutputLength?: number | null | undefined;
|
|
6
|
+
timeoutMs?: number | null | undefined;
|
|
7
|
+
};
|
|
8
|
+
export declare const ShellCallItemStatus: {
|
|
9
|
+
readonly InProgress: "in_progress";
|
|
10
|
+
readonly Completed: "completed";
|
|
11
|
+
readonly Incomplete: "incomplete";
|
|
12
|
+
};
|
|
13
|
+
export type ShellCallItemStatus = OpenEnum<typeof ShellCallItemStatus>;
|
|
14
|
+
export declare const ShellCallItemType: {
|
|
15
|
+
readonly ShellCall: "shell_call";
|
|
16
|
+
};
|
|
17
|
+
export type ShellCallItemType = ClosedEnum<typeof ShellCallItemType>;
|
|
18
|
+
/**
|
|
19
|
+
* A shell command execution call (newer variant)
|
|
20
|
+
*/
|
|
21
|
+
export type ShellCallItem = {
|
|
22
|
+
action: ShellCallItemAction;
|
|
23
|
+
callId: string;
|
|
24
|
+
environment?: any | null | undefined;
|
|
25
|
+
id?: string | null | undefined;
|
|
26
|
+
status?: ShellCallItemStatus | null | undefined;
|
|
27
|
+
type: ShellCallItemType;
|
|
28
|
+
};
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type ShellCallItemAction$Outbound = {
|
|
31
|
+
commands: Array<string>;
|
|
32
|
+
max_output_length?: number | null | undefined;
|
|
33
|
+
timeout_ms?: number | null | undefined;
|
|
34
|
+
};
|
|
35
|
+
/** @internal */
|
|
36
|
+
export declare const ShellCallItemAction$outboundSchema: z.ZodType<ShellCallItemAction$Outbound, ShellCallItemAction>;
|
|
37
|
+
export declare function shellCallItemActionToJSON(shellCallItemAction: ShellCallItemAction): string;
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare const ShellCallItemStatus$outboundSchema: z.ZodType<string, ShellCallItemStatus>;
|
|
40
|
+
/** @internal */
|
|
41
|
+
export declare const ShellCallItemType$outboundSchema: z.ZodEnum<typeof ShellCallItemType>;
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type ShellCallItem$Outbound = {
|
|
44
|
+
action: ShellCallItemAction$Outbound;
|
|
45
|
+
call_id: string;
|
|
46
|
+
environment?: any | null | undefined;
|
|
47
|
+
id?: string | null | undefined;
|
|
48
|
+
status?: string | null | undefined;
|
|
49
|
+
type: string;
|
|
50
|
+
};
|
|
51
|
+
/** @internal */
|
|
52
|
+
export declare const ShellCallItem$outboundSchema: z.ZodType<ShellCallItem$Outbound, ShellCallItem>;
|
|
53
|
+
export declare function shellCallItemToJSON(shellCallItem: ShellCallItem): string;
|
|
54
|
+
//# sourceMappingURL=shellcallitem.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: a94bd412c431
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
export const ShellCallItemStatus = {
|
|
9
|
+
InProgress: "in_progress",
|
|
10
|
+
Completed: "completed",
|
|
11
|
+
Incomplete: "incomplete",
|
|
12
|
+
};
|
|
13
|
+
export const ShellCallItemType = {
|
|
14
|
+
ShellCall: "shell_call",
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const ShellCallItemAction$outboundSchema = z.object({
|
|
18
|
+
commands: z.array(z.string()),
|
|
19
|
+
maxOutputLength: z.nullable(z.int()).optional(),
|
|
20
|
+
timeoutMs: z.nullable(z.int()).optional(),
|
|
21
|
+
}).transform((v) => {
|
|
22
|
+
return remap$(v, {
|
|
23
|
+
maxOutputLength: "max_output_length",
|
|
24
|
+
timeoutMs: "timeout_ms",
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
export function shellCallItemActionToJSON(shellCallItemAction) {
|
|
28
|
+
return JSON.stringify(ShellCallItemAction$outboundSchema.parse(shellCallItemAction));
|
|
29
|
+
}
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const ShellCallItemStatus$outboundSchema = openEnums.outboundSchema(ShellCallItemStatus);
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const ShellCallItemType$outboundSchema = z.enum(ShellCallItemType);
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const ShellCallItem$outboundSchema = z.object({
|
|
36
|
+
action: z.lazy(() => ShellCallItemAction$outboundSchema),
|
|
37
|
+
callId: z.string(),
|
|
38
|
+
environment: z.nullable(z.any()).optional(),
|
|
39
|
+
id: z.nullable(z.string()).optional(),
|
|
40
|
+
status: z.nullable(ShellCallItemStatus$outboundSchema).optional(),
|
|
41
|
+
type: ShellCallItemType$outboundSchema,
|
|
42
|
+
}).transform((v) => {
|
|
43
|
+
return remap$(v, {
|
|
44
|
+
callId: "call_id",
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
export function shellCallItemToJSON(shellCallItem) {
|
|
48
|
+
return JSON.stringify(ShellCallItem$outboundSchema.parse(shellCallItem));
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=shellcallitem.js.map
|