@openrouter/sdk 0.12.35 → 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/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/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/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
|
@@ -0,0 +1,607 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 572964d5906d
|
|
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
|
+
import { AnthropicAllowedCallers$outboundSchema, } from "./anthropicallowedcallers.js";
|
|
9
|
+
import { AnthropicCacheControlDirective$outboundSchema, } from "./anthropiccachecontroldirective.js";
|
|
10
|
+
import { AnthropicCacheControlTtl$outboundSchema, } from "./anthropiccachecontrolttl.js";
|
|
11
|
+
import { AnthropicInputTokensClearAtLeast$outboundSchema, } from "./anthropicinputtokensclearatleast.js";
|
|
12
|
+
import { AnthropicInputTokensTrigger$outboundSchema, } from "./anthropicinputtokenstrigger.js";
|
|
13
|
+
import { AnthropicTextBlockParam$outboundSchema, } from "./anthropictextblockparam.js";
|
|
14
|
+
import { AnthropicThinkingDisplay$outboundSchema, } from "./anthropicthinkingdisplay.js";
|
|
15
|
+
import { AnthropicThinkingTurns$outboundSchema, } from "./anthropicthinkingturns.js";
|
|
16
|
+
import { AnthropicToolUsesKeep$outboundSchema, } from "./anthropictooluseskeep.js";
|
|
17
|
+
import { AnthropicToolUsesTrigger$outboundSchema, } from "./anthropictoolusestrigger.js";
|
|
18
|
+
import { AnthropicWebSearchToolUserLocation$outboundSchema, } from "./anthropicwebsearchtooluserlocation.js";
|
|
19
|
+
import { AutoRouterPlugin$outboundSchema, } from "./autorouterplugin.js";
|
|
20
|
+
import { ChatSearchModelsServerTool$outboundSchema, } from "./chatsearchmodelsservertool.js";
|
|
21
|
+
import { ContextCompressionPlugin$outboundSchema, } from "./contextcompressionplugin.js";
|
|
22
|
+
import { DatetimeServerTool$outboundSchema, } from "./datetimeservertool.js";
|
|
23
|
+
import { FileParserPlugin$outboundSchema, } from "./fileparserplugin.js";
|
|
24
|
+
import { FusionPlugin$outboundSchema, } from "./fusionplugin.js";
|
|
25
|
+
import { ImageGenerationServerToolOpenRouter$outboundSchema, } from "./imagegenerationservertoolopenrouter.js";
|
|
26
|
+
import { MessagesMessageParam$outboundSchema, } from "./messagesmessageparam.js";
|
|
27
|
+
import { MessagesOutputConfig$outboundSchema, } from "./messagesoutputconfig.js";
|
|
28
|
+
import { ModerationPlugin$outboundSchema, } from "./moderationplugin.js";
|
|
29
|
+
import { OpenRouterWebSearchServerTool$outboundSchema, } from "./openrouterwebsearchservertool.js";
|
|
30
|
+
import { ParetoRouterPlugin$outboundSchema, } from "./paretorouterplugin.js";
|
|
31
|
+
import { ProviderPreferences$outboundSchema, } from "./providerpreferences.js";
|
|
32
|
+
import { ResponseHealingPlugin$outboundSchema, } from "./responsehealingplugin.js";
|
|
33
|
+
import { StopServerToolsWhenCondition$outboundSchema, } from "./stopservertoolswhencondition.js";
|
|
34
|
+
import { TraceConfig$outboundSchema, } from "./traceconfig.js";
|
|
35
|
+
import { WebFetchPlugin$outboundSchema, } from "./webfetchplugin.js";
|
|
36
|
+
import { WebFetchServerTool$outboundSchema, } from "./webfetchservertool.js";
|
|
37
|
+
import { WebSearchPlugin$outboundSchema, } from "./websearchplugin.js";
|
|
38
|
+
export const EditTypeInputTokens = {
|
|
39
|
+
InputTokens: "input_tokens",
|
|
40
|
+
};
|
|
41
|
+
export const KeepEnum = {
|
|
42
|
+
All: "all",
|
|
43
|
+
};
|
|
44
|
+
export const KeepType = {
|
|
45
|
+
All: "all",
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Controls output generation speed. When set to `fast`, uses a higher-speed inference configuration at premium pricing. Defaults to `standard` when omitted.
|
|
49
|
+
*/
|
|
50
|
+
export const Speed = {
|
|
51
|
+
Fast: "fast",
|
|
52
|
+
Standard: "standard",
|
|
53
|
+
};
|
|
54
|
+
export const ToolTypeEphemeral = {
|
|
55
|
+
Ephemeral: "ephemeral",
|
|
56
|
+
};
|
|
57
|
+
export const NameAdvisor = {
|
|
58
|
+
Advisor: "advisor",
|
|
59
|
+
};
|
|
60
|
+
export const TypeAdvisor20260301 = {
|
|
61
|
+
Advisor20260301: "advisor_20260301",
|
|
62
|
+
};
|
|
63
|
+
export const NameWebSearch2 = {
|
|
64
|
+
WebSearch: "web_search",
|
|
65
|
+
};
|
|
66
|
+
export const TypeWebSearch20260209 = {
|
|
67
|
+
WebSearch20260209: "web_search_20260209",
|
|
68
|
+
};
|
|
69
|
+
export const NameWebSearch1 = {
|
|
70
|
+
WebSearch: "web_search",
|
|
71
|
+
};
|
|
72
|
+
export const TypeWebSearch20250305 = {
|
|
73
|
+
WebSearch20250305: "web_search_20250305",
|
|
74
|
+
};
|
|
75
|
+
export const NameStrReplaceEditor = {
|
|
76
|
+
StrReplaceEditor: "str_replace_editor",
|
|
77
|
+
};
|
|
78
|
+
export const TypeTextEditor20250124 = {
|
|
79
|
+
TextEditor20250124: "text_editor_20250124",
|
|
80
|
+
};
|
|
81
|
+
export const NameBash = {
|
|
82
|
+
Bash: "bash",
|
|
83
|
+
};
|
|
84
|
+
export const TypeBash20250124 = {
|
|
85
|
+
Bash20250124: "bash_20250124",
|
|
86
|
+
};
|
|
87
|
+
export const ToolTypeCustom = {
|
|
88
|
+
Custom: "custom",
|
|
89
|
+
};
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const EditTypeInputTokens$outboundSchema = z.enum(EditTypeInputTokens);
|
|
92
|
+
/** @internal */
|
|
93
|
+
export const TriggerInputTokens$outboundSchema = z.object({
|
|
94
|
+
type: EditTypeInputTokens$outboundSchema,
|
|
95
|
+
value: z.int(),
|
|
96
|
+
});
|
|
97
|
+
export function triggerInputTokensToJSON(triggerInputTokens) {
|
|
98
|
+
return JSON.stringify(TriggerInputTokens$outboundSchema.parse(triggerInputTokens));
|
|
99
|
+
}
|
|
100
|
+
/** @internal */
|
|
101
|
+
export const EditCompact20260112$outboundSchema = z.object({
|
|
102
|
+
instructions: z.nullable(z.string()).optional(),
|
|
103
|
+
pauseAfterCompaction: z.boolean().optional(),
|
|
104
|
+
trigger: z.nullable(z.lazy(() => TriggerInputTokens$outboundSchema))
|
|
105
|
+
.optional(),
|
|
106
|
+
type: z.literal("compact_20260112"),
|
|
107
|
+
}).transform((v) => {
|
|
108
|
+
return remap$(v, {
|
|
109
|
+
pauseAfterCompaction: "pause_after_compaction",
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
export function editCompact20260112ToJSON(editCompact20260112) {
|
|
113
|
+
return JSON.stringify(EditCompact20260112$outboundSchema.parse(editCompact20260112));
|
|
114
|
+
}
|
|
115
|
+
/** @internal */
|
|
116
|
+
export const KeepEnum$outboundSchema = z.enum(KeepEnum);
|
|
117
|
+
/** @internal */
|
|
118
|
+
export const KeepType$outboundSchema = z.enum(KeepType);
|
|
119
|
+
/** @internal */
|
|
120
|
+
export const KeepAll$outboundSchema = z
|
|
121
|
+
.object({
|
|
122
|
+
type: KeepType$outboundSchema,
|
|
123
|
+
});
|
|
124
|
+
export function keepAllToJSON(keepAll) {
|
|
125
|
+
return JSON.stringify(KeepAll$outboundSchema.parse(keepAll));
|
|
126
|
+
}
|
|
127
|
+
/** @internal */
|
|
128
|
+
export const Keep$outboundSchema = z.union([
|
|
129
|
+
AnthropicThinkingTurns$outboundSchema,
|
|
130
|
+
z.lazy(() => KeepAll$outboundSchema),
|
|
131
|
+
KeepEnum$outboundSchema,
|
|
132
|
+
]);
|
|
133
|
+
export function keepToJSON(keep) {
|
|
134
|
+
return JSON.stringify(Keep$outboundSchema.parse(keep));
|
|
135
|
+
}
|
|
136
|
+
/** @internal */
|
|
137
|
+
export const EditClearThinking20251015$outboundSchema = z.object({
|
|
138
|
+
keep: z.union([
|
|
139
|
+
AnthropicThinkingTurns$outboundSchema,
|
|
140
|
+
z.lazy(() => KeepAll$outboundSchema),
|
|
141
|
+
KeepEnum$outboundSchema,
|
|
142
|
+
]).optional(),
|
|
143
|
+
type: z.literal("clear_thinking_20251015"),
|
|
144
|
+
});
|
|
145
|
+
export function editClearThinking20251015ToJSON(editClearThinking20251015) {
|
|
146
|
+
return JSON.stringify(EditClearThinking20251015$outboundSchema.parse(editClearThinking20251015));
|
|
147
|
+
}
|
|
148
|
+
/** @internal */
|
|
149
|
+
export const ClearToolInputs$outboundSchema = z.union([z.boolean(), z.array(z.string()), z.any()]);
|
|
150
|
+
export function clearToolInputsToJSON(clearToolInputs) {
|
|
151
|
+
return JSON.stringify(ClearToolInputs$outboundSchema.parse(clearToolInputs));
|
|
152
|
+
}
|
|
153
|
+
/** @internal */
|
|
154
|
+
export const Trigger$outboundSchema = z
|
|
155
|
+
.union([
|
|
156
|
+
AnthropicInputTokensTrigger$outboundSchema,
|
|
157
|
+
AnthropicToolUsesTrigger$outboundSchema,
|
|
158
|
+
]);
|
|
159
|
+
export function triggerToJSON(trigger) {
|
|
160
|
+
return JSON.stringify(Trigger$outboundSchema.parse(trigger));
|
|
161
|
+
}
|
|
162
|
+
/** @internal */
|
|
163
|
+
export const EditClearToolUses20250919$outboundSchema = z.object({
|
|
164
|
+
clearAtLeast: z.nullable(AnthropicInputTokensClearAtLeast$outboundSchema)
|
|
165
|
+
.optional(),
|
|
166
|
+
clearToolInputs: z.nullable(z.union([z.boolean(), z.array(z.string()), z.any()])).optional(),
|
|
167
|
+
excludeTools: z.nullable(z.array(z.string())).optional(),
|
|
168
|
+
keep: AnthropicToolUsesKeep$outboundSchema.optional(),
|
|
169
|
+
trigger: z.union([
|
|
170
|
+
AnthropicInputTokensTrigger$outboundSchema,
|
|
171
|
+
AnthropicToolUsesTrigger$outboundSchema,
|
|
172
|
+
]).optional(),
|
|
173
|
+
type: z.literal("clear_tool_uses_20250919"),
|
|
174
|
+
}).transform((v) => {
|
|
175
|
+
return remap$(v, {
|
|
176
|
+
clearAtLeast: "clear_at_least",
|
|
177
|
+
clearToolInputs: "clear_tool_inputs",
|
|
178
|
+
excludeTools: "exclude_tools",
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
export function editClearToolUses20250919ToJSON(editClearToolUses20250919) {
|
|
182
|
+
return JSON.stringify(EditClearToolUses20250919$outboundSchema.parse(editClearToolUses20250919));
|
|
183
|
+
}
|
|
184
|
+
/** @internal */
|
|
185
|
+
export const Edit$outboundSchema = z.union([
|
|
186
|
+
z.lazy(() => EditClearToolUses20250919$outboundSchema),
|
|
187
|
+
z.lazy(() => EditClearThinking20251015$outboundSchema),
|
|
188
|
+
z.lazy(() => EditCompact20260112$outboundSchema),
|
|
189
|
+
]);
|
|
190
|
+
export function editToJSON(edit) {
|
|
191
|
+
return JSON.stringify(Edit$outboundSchema.parse(edit));
|
|
192
|
+
}
|
|
193
|
+
/** @internal */
|
|
194
|
+
export const ContextManagement$outboundSchema = z.object({
|
|
195
|
+
edits: z.array(z.union([
|
|
196
|
+
z.lazy(() => EditClearToolUses20250919$outboundSchema),
|
|
197
|
+
z.lazy(() => EditClearThinking20251015$outboundSchema),
|
|
198
|
+
z.lazy(() => EditCompact20260112$outboundSchema),
|
|
199
|
+
])).optional(),
|
|
200
|
+
});
|
|
201
|
+
export function contextManagementToJSON(contextManagement) {
|
|
202
|
+
return JSON.stringify(ContextManagement$outboundSchema.parse(contextManagement));
|
|
203
|
+
}
|
|
204
|
+
/** @internal */
|
|
205
|
+
export const Metadata$outboundSchema = z
|
|
206
|
+
.object({
|
|
207
|
+
userId: z.nullable(z.string()).optional(),
|
|
208
|
+
}).transform((v) => {
|
|
209
|
+
return remap$(v, {
|
|
210
|
+
userId: "user_id",
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
export function metadataToJSON(metadata) {
|
|
214
|
+
return JSON.stringify(Metadata$outboundSchema.parse(metadata));
|
|
215
|
+
}
|
|
216
|
+
/** @internal */
|
|
217
|
+
export const MessagesRequestPlugin$outboundSchema = z.union([
|
|
218
|
+
AutoRouterPlugin$outboundSchema,
|
|
219
|
+
ContextCompressionPlugin$outboundSchema,
|
|
220
|
+
FileParserPlugin$outboundSchema,
|
|
221
|
+
FusionPlugin$outboundSchema,
|
|
222
|
+
ModerationPlugin$outboundSchema,
|
|
223
|
+
ParetoRouterPlugin$outboundSchema,
|
|
224
|
+
ResponseHealingPlugin$outboundSchema,
|
|
225
|
+
WebSearchPlugin$outboundSchema,
|
|
226
|
+
WebFetchPlugin$outboundSchema,
|
|
227
|
+
]);
|
|
228
|
+
export function messagesRequestPluginToJSON(messagesRequestPlugin) {
|
|
229
|
+
return JSON.stringify(MessagesRequestPlugin$outboundSchema.parse(messagesRequestPlugin));
|
|
230
|
+
}
|
|
231
|
+
/** @internal */
|
|
232
|
+
export const Speed$outboundSchema = openEnums
|
|
233
|
+
.outboundSchema(Speed);
|
|
234
|
+
/** @internal */
|
|
235
|
+
export const System$outboundSchema = z
|
|
236
|
+
.union([z.string(), z.array(AnthropicTextBlockParam$outboundSchema)]);
|
|
237
|
+
export function systemToJSON(system) {
|
|
238
|
+
return JSON.stringify(System$outboundSchema.parse(system));
|
|
239
|
+
}
|
|
240
|
+
/** @internal */
|
|
241
|
+
export const ThinkingAdaptive$outboundSchema = z.object({
|
|
242
|
+
display: z.nullable(AnthropicThinkingDisplay$outboundSchema).optional(),
|
|
243
|
+
type: z.literal("adaptive"),
|
|
244
|
+
});
|
|
245
|
+
export function thinkingAdaptiveToJSON(thinkingAdaptive) {
|
|
246
|
+
return JSON.stringify(ThinkingAdaptive$outboundSchema.parse(thinkingAdaptive));
|
|
247
|
+
}
|
|
248
|
+
/** @internal */
|
|
249
|
+
export const ThinkingDisabled$outboundSchema = z.object({
|
|
250
|
+
type: z.literal("disabled"),
|
|
251
|
+
});
|
|
252
|
+
export function thinkingDisabledToJSON(thinkingDisabled) {
|
|
253
|
+
return JSON.stringify(ThinkingDisabled$outboundSchema.parse(thinkingDisabled));
|
|
254
|
+
}
|
|
255
|
+
/** @internal */
|
|
256
|
+
export const ThinkingEnabled$outboundSchema = z.object({
|
|
257
|
+
budgetTokens: z.int(),
|
|
258
|
+
display: z.nullable(AnthropicThinkingDisplay$outboundSchema).optional(),
|
|
259
|
+
type: z.literal("enabled"),
|
|
260
|
+
}).transform((v) => {
|
|
261
|
+
return remap$(v, {
|
|
262
|
+
budgetTokens: "budget_tokens",
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
export function thinkingEnabledToJSON(thinkingEnabled) {
|
|
266
|
+
return JSON.stringify(ThinkingEnabled$outboundSchema.parse(thinkingEnabled));
|
|
267
|
+
}
|
|
268
|
+
/** @internal */
|
|
269
|
+
export const Thinking$outboundSchema = z
|
|
270
|
+
.union([
|
|
271
|
+
z.lazy(() => ThinkingEnabled$outboundSchema),
|
|
272
|
+
z.lazy(() => ThinkingDisabled$outboundSchema),
|
|
273
|
+
z.lazy(() => ThinkingAdaptive$outboundSchema),
|
|
274
|
+
]);
|
|
275
|
+
export function thinkingToJSON(thinking) {
|
|
276
|
+
return JSON.stringify(Thinking$outboundSchema.parse(thinking));
|
|
277
|
+
}
|
|
278
|
+
/** @internal */
|
|
279
|
+
export const ToolChoiceTool$outboundSchema = z.object({
|
|
280
|
+
disableParallelToolUse: z.boolean().optional(),
|
|
281
|
+
name: z.string(),
|
|
282
|
+
type: z.literal("tool"),
|
|
283
|
+
}).transform((v) => {
|
|
284
|
+
return remap$(v, {
|
|
285
|
+
disableParallelToolUse: "disable_parallel_tool_use",
|
|
286
|
+
});
|
|
287
|
+
});
|
|
288
|
+
export function toolChoiceToolToJSON(toolChoiceTool) {
|
|
289
|
+
return JSON.stringify(ToolChoiceTool$outboundSchema.parse(toolChoiceTool));
|
|
290
|
+
}
|
|
291
|
+
/** @internal */
|
|
292
|
+
export const ToolChoiceNone$outboundSchema = z.object({
|
|
293
|
+
type: z.literal("none"),
|
|
294
|
+
});
|
|
295
|
+
export function toolChoiceNoneToJSON(toolChoiceNone) {
|
|
296
|
+
return JSON.stringify(ToolChoiceNone$outboundSchema.parse(toolChoiceNone));
|
|
297
|
+
}
|
|
298
|
+
/** @internal */
|
|
299
|
+
export const ToolChoiceAny$outboundSchema = z.object({
|
|
300
|
+
disableParallelToolUse: z.boolean().optional(),
|
|
301
|
+
type: z.literal("any"),
|
|
302
|
+
}).transform((v) => {
|
|
303
|
+
return remap$(v, {
|
|
304
|
+
disableParallelToolUse: "disable_parallel_tool_use",
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
export function toolChoiceAnyToJSON(toolChoiceAny) {
|
|
308
|
+
return JSON.stringify(ToolChoiceAny$outboundSchema.parse(toolChoiceAny));
|
|
309
|
+
}
|
|
310
|
+
/** @internal */
|
|
311
|
+
export const ToolChoiceAuto$outboundSchema = z.object({
|
|
312
|
+
disableParallelToolUse: z.boolean().optional(),
|
|
313
|
+
type: z.literal("auto"),
|
|
314
|
+
}).transform((v) => {
|
|
315
|
+
return remap$(v, {
|
|
316
|
+
disableParallelToolUse: "disable_parallel_tool_use",
|
|
317
|
+
});
|
|
318
|
+
});
|
|
319
|
+
export function toolChoiceAutoToJSON(toolChoiceAuto) {
|
|
320
|
+
return JSON.stringify(ToolChoiceAuto$outboundSchema.parse(toolChoiceAuto));
|
|
321
|
+
}
|
|
322
|
+
/** @internal */
|
|
323
|
+
export const ToolChoice$outboundSchema = z.union([
|
|
324
|
+
z.lazy(() => ToolChoiceAuto$outboundSchema),
|
|
325
|
+
z.lazy(() => ToolChoiceAny$outboundSchema),
|
|
326
|
+
z.lazy(() => ToolChoiceNone$outboundSchema),
|
|
327
|
+
z.lazy(() => ToolChoiceTool$outboundSchema),
|
|
328
|
+
]);
|
|
329
|
+
export function toolChoiceToJSON(toolChoice) {
|
|
330
|
+
return JSON.stringify(ToolChoice$outboundSchema.parse(toolChoice));
|
|
331
|
+
}
|
|
332
|
+
/** @internal */
|
|
333
|
+
export const MessagesRequestTool$outboundSchema = z.object({
|
|
334
|
+
type: z.string(),
|
|
335
|
+
additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
336
|
+
}).transform((v) => {
|
|
337
|
+
return {
|
|
338
|
+
...v.additionalProperties,
|
|
339
|
+
...remap$(v, {
|
|
340
|
+
additionalProperties: null,
|
|
341
|
+
}),
|
|
342
|
+
};
|
|
343
|
+
});
|
|
344
|
+
export function messagesRequestToolToJSON(messagesRequestTool) {
|
|
345
|
+
return JSON.stringify(MessagesRequestTool$outboundSchema.parse(messagesRequestTool));
|
|
346
|
+
}
|
|
347
|
+
/** @internal */
|
|
348
|
+
export const ToolTypeEphemeral$outboundSchema = z.enum(ToolTypeEphemeral);
|
|
349
|
+
/** @internal */
|
|
350
|
+
export const Caching$outboundSchema = z
|
|
351
|
+
.object({
|
|
352
|
+
ttl: AnthropicCacheControlTtl$outboundSchema.optional(),
|
|
353
|
+
type: ToolTypeEphemeral$outboundSchema,
|
|
354
|
+
});
|
|
355
|
+
export function cachingToJSON(caching) {
|
|
356
|
+
return JSON.stringify(Caching$outboundSchema.parse(caching));
|
|
357
|
+
}
|
|
358
|
+
/** @internal */
|
|
359
|
+
export const NameAdvisor$outboundSchema = z.enum(NameAdvisor);
|
|
360
|
+
/** @internal */
|
|
361
|
+
export const TypeAdvisor20260301$outboundSchema = z.enum(TypeAdvisor20260301);
|
|
362
|
+
/** @internal */
|
|
363
|
+
export const ToolAdvisor20260301$outboundSchema = z.object({
|
|
364
|
+
allowedCallers: z.array(AnthropicAllowedCallers$outboundSchema).optional(),
|
|
365
|
+
cacheControl: AnthropicCacheControlDirective$outboundSchema.optional(),
|
|
366
|
+
caching: z.nullable(z.lazy(() => Caching$outboundSchema)).optional(),
|
|
367
|
+
deferLoading: z.boolean().optional(),
|
|
368
|
+
maxUses: z.int().optional(),
|
|
369
|
+
model: z.string(),
|
|
370
|
+
name: NameAdvisor$outboundSchema,
|
|
371
|
+
type: TypeAdvisor20260301$outboundSchema,
|
|
372
|
+
}).transform((v) => {
|
|
373
|
+
return remap$(v, {
|
|
374
|
+
allowedCallers: "allowed_callers",
|
|
375
|
+
cacheControl: "cache_control",
|
|
376
|
+
deferLoading: "defer_loading",
|
|
377
|
+
maxUses: "max_uses",
|
|
378
|
+
});
|
|
379
|
+
});
|
|
380
|
+
export function toolAdvisor20260301ToJSON(toolAdvisor20260301) {
|
|
381
|
+
return JSON.stringify(ToolAdvisor20260301$outboundSchema.parse(toolAdvisor20260301));
|
|
382
|
+
}
|
|
383
|
+
/** @internal */
|
|
384
|
+
export const NameWebSearch2$outboundSchema = z
|
|
385
|
+
.enum(NameWebSearch2);
|
|
386
|
+
/** @internal */
|
|
387
|
+
export const TypeWebSearch20260209$outboundSchema = z.enum(TypeWebSearch20260209);
|
|
388
|
+
/** @internal */
|
|
389
|
+
export const ToolWebSearch20260209$outboundSchema = z.object({
|
|
390
|
+
allowedCallers: z.array(AnthropicAllowedCallers$outboundSchema).optional(),
|
|
391
|
+
allowedDomains: z.nullable(z.array(z.string())).optional(),
|
|
392
|
+
blockedDomains: z.nullable(z.array(z.string())).optional(),
|
|
393
|
+
cacheControl: AnthropicCacheControlDirective$outboundSchema.optional(),
|
|
394
|
+
maxUses: z.nullable(z.int()).optional(),
|
|
395
|
+
name: NameWebSearch2$outboundSchema,
|
|
396
|
+
type: TypeWebSearch20260209$outboundSchema,
|
|
397
|
+
userLocation: z.nullable(AnthropicWebSearchToolUserLocation$outboundSchema)
|
|
398
|
+
.optional(),
|
|
399
|
+
}).transform((v) => {
|
|
400
|
+
return remap$(v, {
|
|
401
|
+
allowedCallers: "allowed_callers",
|
|
402
|
+
allowedDomains: "allowed_domains",
|
|
403
|
+
blockedDomains: "blocked_domains",
|
|
404
|
+
cacheControl: "cache_control",
|
|
405
|
+
maxUses: "max_uses",
|
|
406
|
+
userLocation: "user_location",
|
|
407
|
+
});
|
|
408
|
+
});
|
|
409
|
+
export function toolWebSearch20260209ToJSON(toolWebSearch20260209) {
|
|
410
|
+
return JSON.stringify(ToolWebSearch20260209$outboundSchema.parse(toolWebSearch20260209));
|
|
411
|
+
}
|
|
412
|
+
/** @internal */
|
|
413
|
+
export const NameWebSearch1$outboundSchema = z
|
|
414
|
+
.enum(NameWebSearch1);
|
|
415
|
+
/** @internal */
|
|
416
|
+
export const TypeWebSearch20250305$outboundSchema = z.enum(TypeWebSearch20250305);
|
|
417
|
+
/** @internal */
|
|
418
|
+
export const ToolWebSearch20250305$outboundSchema = z.object({
|
|
419
|
+
allowedDomains: z.nullable(z.array(z.string())).optional(),
|
|
420
|
+
blockedDomains: z.nullable(z.array(z.string())).optional(),
|
|
421
|
+
cacheControl: AnthropicCacheControlDirective$outboundSchema.optional(),
|
|
422
|
+
maxUses: z.nullable(z.int()).optional(),
|
|
423
|
+
name: NameWebSearch1$outboundSchema,
|
|
424
|
+
type: TypeWebSearch20250305$outboundSchema,
|
|
425
|
+
userLocation: z.nullable(AnthropicWebSearchToolUserLocation$outboundSchema)
|
|
426
|
+
.optional(),
|
|
427
|
+
}).transform((v) => {
|
|
428
|
+
return remap$(v, {
|
|
429
|
+
allowedDomains: "allowed_domains",
|
|
430
|
+
blockedDomains: "blocked_domains",
|
|
431
|
+
cacheControl: "cache_control",
|
|
432
|
+
maxUses: "max_uses",
|
|
433
|
+
userLocation: "user_location",
|
|
434
|
+
});
|
|
435
|
+
});
|
|
436
|
+
export function toolWebSearch20250305ToJSON(toolWebSearch20250305) {
|
|
437
|
+
return JSON.stringify(ToolWebSearch20250305$outboundSchema.parse(toolWebSearch20250305));
|
|
438
|
+
}
|
|
439
|
+
/** @internal */
|
|
440
|
+
export const NameStrReplaceEditor$outboundSchema = z.enum(NameStrReplaceEditor);
|
|
441
|
+
/** @internal */
|
|
442
|
+
export const TypeTextEditor20250124$outboundSchema = z.enum(TypeTextEditor20250124);
|
|
443
|
+
/** @internal */
|
|
444
|
+
export const ToolTextEditor20250124$outboundSchema = z.object({
|
|
445
|
+
cacheControl: AnthropicCacheControlDirective$outboundSchema.optional(),
|
|
446
|
+
name: NameStrReplaceEditor$outboundSchema,
|
|
447
|
+
type: TypeTextEditor20250124$outboundSchema,
|
|
448
|
+
}).transform((v) => {
|
|
449
|
+
return remap$(v, {
|
|
450
|
+
cacheControl: "cache_control",
|
|
451
|
+
});
|
|
452
|
+
});
|
|
453
|
+
export function toolTextEditor20250124ToJSON(toolTextEditor20250124) {
|
|
454
|
+
return JSON.stringify(ToolTextEditor20250124$outboundSchema.parse(toolTextEditor20250124));
|
|
455
|
+
}
|
|
456
|
+
/** @internal */
|
|
457
|
+
export const NameBash$outboundSchema = z.enum(NameBash);
|
|
458
|
+
/** @internal */
|
|
459
|
+
export const TypeBash20250124$outboundSchema = z.enum(TypeBash20250124);
|
|
460
|
+
/** @internal */
|
|
461
|
+
export const ToolBash20250124$outboundSchema = z.object({
|
|
462
|
+
cacheControl: AnthropicCacheControlDirective$outboundSchema.optional(),
|
|
463
|
+
name: NameBash$outboundSchema,
|
|
464
|
+
type: TypeBash20250124$outboundSchema,
|
|
465
|
+
}).transform((v) => {
|
|
466
|
+
return remap$(v, {
|
|
467
|
+
cacheControl: "cache_control",
|
|
468
|
+
});
|
|
469
|
+
});
|
|
470
|
+
export function toolBash20250124ToJSON(toolBash20250124) {
|
|
471
|
+
return JSON.stringify(ToolBash20250124$outboundSchema.parse(toolBash20250124));
|
|
472
|
+
}
|
|
473
|
+
/** @internal */
|
|
474
|
+
export const InputSchema$outboundSchema = z.object({
|
|
475
|
+
properties: z.nullable(z.any()).optional(),
|
|
476
|
+
required: z.nullable(z.array(z.string())).optional(),
|
|
477
|
+
type: z.string().default("object"),
|
|
478
|
+
additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
479
|
+
}).transform((v) => {
|
|
480
|
+
return {
|
|
481
|
+
...v.additionalProperties,
|
|
482
|
+
...remap$(v, {
|
|
483
|
+
additionalProperties: null,
|
|
484
|
+
}),
|
|
485
|
+
};
|
|
486
|
+
});
|
|
487
|
+
export function inputSchemaToJSON(inputSchema) {
|
|
488
|
+
return JSON.stringify(InputSchema$outboundSchema.parse(inputSchema));
|
|
489
|
+
}
|
|
490
|
+
/** @internal */
|
|
491
|
+
export const ToolTypeCustom$outboundSchema = z
|
|
492
|
+
.enum(ToolTypeCustom);
|
|
493
|
+
/** @internal */
|
|
494
|
+
export const ToolCustom$outboundSchema = z.object({
|
|
495
|
+
cacheControl: AnthropicCacheControlDirective$outboundSchema.optional(),
|
|
496
|
+
description: z.string().optional(),
|
|
497
|
+
inputSchema: z.lazy(() => InputSchema$outboundSchema),
|
|
498
|
+
name: z.string(),
|
|
499
|
+
type: ToolTypeCustom$outboundSchema.optional(),
|
|
500
|
+
}).transform((v) => {
|
|
501
|
+
return remap$(v, {
|
|
502
|
+
cacheControl: "cache_control",
|
|
503
|
+
inputSchema: "input_schema",
|
|
504
|
+
});
|
|
505
|
+
});
|
|
506
|
+
export function toolCustomToJSON(toolCustom) {
|
|
507
|
+
return JSON.stringify(ToolCustom$outboundSchema.parse(toolCustom));
|
|
508
|
+
}
|
|
509
|
+
/** @internal */
|
|
510
|
+
export const MessagesRequestToolUnion$outboundSchema = z.union([
|
|
511
|
+
z.lazy(() => ToolAdvisor20260301$outboundSchema),
|
|
512
|
+
z.lazy(() => ToolCustom$outboundSchema),
|
|
513
|
+
z.lazy(() => ToolBash20250124$outboundSchema),
|
|
514
|
+
z.lazy(() => ToolTextEditor20250124$outboundSchema),
|
|
515
|
+
z.lazy(() => ToolWebSearch20250305$outboundSchema),
|
|
516
|
+
z.lazy(() => ToolWebSearch20260209$outboundSchema),
|
|
517
|
+
DatetimeServerTool$outboundSchema,
|
|
518
|
+
ImageGenerationServerToolOpenRouter$outboundSchema,
|
|
519
|
+
ChatSearchModelsServerTool$outboundSchema,
|
|
520
|
+
WebFetchServerTool$outboundSchema,
|
|
521
|
+
OpenRouterWebSearchServerTool$outboundSchema,
|
|
522
|
+
z.lazy(() => MessagesRequestTool$outboundSchema),
|
|
523
|
+
]);
|
|
524
|
+
export function messagesRequestToolUnionToJSON(messagesRequestToolUnion) {
|
|
525
|
+
return JSON.stringify(MessagesRequestToolUnion$outboundSchema.parse(messagesRequestToolUnion));
|
|
526
|
+
}
|
|
527
|
+
/** @internal */
|
|
528
|
+
export const MessagesRequest$outboundSchema = z.object({
|
|
529
|
+
cacheControl: AnthropicCacheControlDirective$outboundSchema.optional(),
|
|
530
|
+
contextManagement: z.nullable(z.lazy(() => ContextManagement$outboundSchema))
|
|
531
|
+
.optional(),
|
|
532
|
+
maxTokens: z.int().optional(),
|
|
533
|
+
messages: z.nullable(z.array(MessagesMessageParam$outboundSchema)),
|
|
534
|
+
metadata: z.lazy(() => Metadata$outboundSchema).optional(),
|
|
535
|
+
model: z.string(),
|
|
536
|
+
models: z.array(z.string()).optional(),
|
|
537
|
+
outputConfig: MessagesOutputConfig$outboundSchema.optional(),
|
|
538
|
+
plugins: z.array(z.union([
|
|
539
|
+
AutoRouterPlugin$outboundSchema,
|
|
540
|
+
ContextCompressionPlugin$outboundSchema,
|
|
541
|
+
FileParserPlugin$outboundSchema,
|
|
542
|
+
FusionPlugin$outboundSchema,
|
|
543
|
+
ModerationPlugin$outboundSchema,
|
|
544
|
+
ParetoRouterPlugin$outboundSchema,
|
|
545
|
+
ResponseHealingPlugin$outboundSchema,
|
|
546
|
+
WebSearchPlugin$outboundSchema,
|
|
547
|
+
WebFetchPlugin$outboundSchema,
|
|
548
|
+
])).optional(),
|
|
549
|
+
provider: z.nullable(ProviderPreferences$outboundSchema).optional(),
|
|
550
|
+
serviceTier: z.string().optional(),
|
|
551
|
+
sessionId: z.string().optional(),
|
|
552
|
+
speed: z.nullable(Speed$outboundSchema).optional(),
|
|
553
|
+
stopSequences: z.array(z.string()).optional(),
|
|
554
|
+
stopServerToolsWhen: z.array(StopServerToolsWhenCondition$outboundSchema)
|
|
555
|
+
.optional(),
|
|
556
|
+
stream: z.boolean().optional(),
|
|
557
|
+
system: z.union([z.string(), z.array(AnthropicTextBlockParam$outboundSchema)])
|
|
558
|
+
.optional(),
|
|
559
|
+
temperature: z.number().optional(),
|
|
560
|
+
thinking: z.union([
|
|
561
|
+
z.lazy(() => ThinkingEnabled$outboundSchema),
|
|
562
|
+
z.lazy(() => ThinkingDisabled$outboundSchema),
|
|
563
|
+
z.lazy(() => ThinkingAdaptive$outboundSchema),
|
|
564
|
+
]).optional(),
|
|
565
|
+
toolChoice: z.union([
|
|
566
|
+
z.lazy(() => ToolChoiceAuto$outboundSchema),
|
|
567
|
+
z.lazy(() => ToolChoiceAny$outboundSchema),
|
|
568
|
+
z.lazy(() => ToolChoiceNone$outboundSchema),
|
|
569
|
+
z.lazy(() => ToolChoiceTool$outboundSchema),
|
|
570
|
+
]).optional(),
|
|
571
|
+
tools: z.array(z.union([
|
|
572
|
+
z.lazy(() => ToolAdvisor20260301$outboundSchema),
|
|
573
|
+
z.lazy(() => ToolCustom$outboundSchema),
|
|
574
|
+
z.lazy(() => ToolBash20250124$outboundSchema),
|
|
575
|
+
z.lazy(() => ToolTextEditor20250124$outboundSchema),
|
|
576
|
+
z.lazy(() => ToolWebSearch20250305$outboundSchema),
|
|
577
|
+
z.lazy(() => ToolWebSearch20260209$outboundSchema),
|
|
578
|
+
DatetimeServerTool$outboundSchema,
|
|
579
|
+
ImageGenerationServerToolOpenRouter$outboundSchema,
|
|
580
|
+
ChatSearchModelsServerTool$outboundSchema,
|
|
581
|
+
WebFetchServerTool$outboundSchema,
|
|
582
|
+
OpenRouterWebSearchServerTool$outboundSchema,
|
|
583
|
+
z.lazy(() => MessagesRequestTool$outboundSchema),
|
|
584
|
+
])).optional(),
|
|
585
|
+
topK: z.int().optional(),
|
|
586
|
+
topP: z.number().optional(),
|
|
587
|
+
trace: TraceConfig$outboundSchema.optional(),
|
|
588
|
+
user: z.string().optional(),
|
|
589
|
+
}).transform((v) => {
|
|
590
|
+
return remap$(v, {
|
|
591
|
+
cacheControl: "cache_control",
|
|
592
|
+
contextManagement: "context_management",
|
|
593
|
+
maxTokens: "max_tokens",
|
|
594
|
+
outputConfig: "output_config",
|
|
595
|
+
serviceTier: "service_tier",
|
|
596
|
+
sessionId: "session_id",
|
|
597
|
+
stopSequences: "stop_sequences",
|
|
598
|
+
stopServerToolsWhen: "stop_server_tools_when",
|
|
599
|
+
toolChoice: "tool_choice",
|
|
600
|
+
topK: "top_k",
|
|
601
|
+
topP: "top_p",
|
|
602
|
+
});
|
|
603
|
+
});
|
|
604
|
+
export function messagesRequestToJSON(messagesRequest) {
|
|
605
|
+
return JSON.stringify(MessagesRequest$outboundSchema.parse(messagesRequest));
|
|
606
|
+
}
|
|
607
|
+
//# sourceMappingURL=messagesrequest.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type MultimodalMedia = {
|
|
3
|
+
data: string;
|
|
4
|
+
format?: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
/** @internal */
|
|
7
|
+
export type MultimodalMedia$Outbound = {
|
|
8
|
+
data: string;
|
|
9
|
+
format?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const MultimodalMedia$outboundSchema: z.ZodType<MultimodalMedia$Outbound, MultimodalMedia>;
|
|
13
|
+
export declare function multimodalMediaToJSON(multimodalMedia: MultimodalMedia): string;
|
|
14
|
+
//# sourceMappingURL=multimodalmedia.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 66135b381ef7
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const MultimodalMedia$outboundSchema = z.object({
|
|
8
|
+
data: z.string(),
|
|
9
|
+
format: z.string().optional(),
|
|
10
|
+
});
|
|
11
|
+
export function multimodalMediaToJSON(multimodalMedia) {
|
|
12
|
+
return JSON.stringify(MultimodalMedia$outboundSchema.parse(multimodalMedia));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=multimodalmedia.js.map
|