@openrouter/sdk 1.4.24 → 1.5.0
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/esm/funcs/apiKeysList.d.ts +1 -1
- package/esm/funcs/apiKeysList.js +3 -2
- package/esm/funcs/apiKeysUpdate.d.ts +4 -2
- package/esm/funcs/apiKeysUpdate.js +5 -3
- package/esm/funcs/chatSend.d.ts +4 -2
- package/esm/funcs/containersPromoteContainerFile.d.ts +1 -1
- package/esm/funcs/containersPromoteContainerFile.js +2 -2
- package/esm/funcs/embeddingsGenerate.d.ts +1 -1
- package/esm/funcs/embeddingsGenerate.js +2 -2
- package/esm/funcs/{endUsersCreate.d.ts → externalUsersCreate.d.ts} +3 -3
- package/esm/funcs/{endUsersCreate.js → externalUsersCreate.js} +11 -11
- package/esm/funcs/{endUsersDelete.d.ts → externalUsersDelete.d.ts} +3 -3
- package/esm/funcs/{endUsersDelete.js → externalUsersDelete.js} +8 -8
- package/esm/funcs/{endUsersGet.d.ts → externalUsersGet.d.ts} +3 -3
- package/esm/funcs/{endUsersGet.js → externalUsersGet.js} +10 -10
- package/esm/funcs/{endUsersList.d.ts → externalUsersList.d.ts} +3 -3
- package/esm/funcs/{endUsersList.js → externalUsersList.js} +10 -10
- package/esm/funcs/{endUsersUpdate.d.ts → externalUsersUpdate.d.ts} +3 -3
- package/esm/funcs/{endUsersUpdate.js → externalUsersUpdate.js} +11 -11
- package/esm/funcs/filesUpload.d.ts +1 -1
- package/esm/funcs/filesUpload.js +2 -2
- package/esm/funcs/guardrailsListKeyAssignments.d.ts +1 -1
- package/esm/funcs/guardrailsListKeyAssignments.js +2 -2
- package/esm/funcs/guardrailsListMemberAssignments.d.ts +1 -1
- package/esm/funcs/guardrailsListMemberAssignments.js +2 -2
- package/esm/funcs/imagesGenerate.d.ts +4 -2
- package/esm/funcs/internsGetInternConnections.d.ts +21 -0
- package/esm/funcs/internsGetInternConnections.js +105 -0
- package/esm/funcs/internsGetInternDaemon.d.ts +1 -1
- package/esm/funcs/internsGetInternDaemon.js +1 -1
- package/esm/funcs/internsGetInternIcon.d.ts +20 -0
- package/esm/funcs/internsGetInternIcon.js +109 -0
- package/esm/funcs/internsSignInternDaemonAccessRequest.d.ts +22 -0
- package/esm/funcs/internsSignInternDaemonAccessRequest.js +109 -0
- package/esm/funcs/internsSignInternDaemonRequest.d.ts +20 -0
- package/esm/funcs/internsSignInternDaemonRequest.js +109 -0
- package/esm/funcs/modelsListForUser.js +1 -0
- package/esm/funcs/privateEndpointsUpdatePricing.d.ts +1 -1
- package/esm/funcs/privateEndpointsUpdatePricing.js +1 -1
- package/esm/funcs/responsesSend.d.ts +4 -2
- package/esm/funcs/vaultDeleteInternVaultSecret.d.ts +1 -1
- package/esm/funcs/vaultDeleteInternVaultSecret.js +2 -2
- package/esm/funcs/vaultDeleteVaultSecret.d.ts +1 -1
- package/esm/funcs/vaultDeleteVaultSecret.js +2 -2
- package/esm/funcs/vaultListInternConnections.d.ts +20 -0
- package/esm/funcs/vaultListInternConnections.js +104 -0
- package/esm/funcs/vaultStoreVaultSecret.d.ts +1 -1
- package/esm/funcs/vaultStoreVaultSecret.js +2 -2
- package/esm/funcs/videoGenerationGenerate.d.ts +1 -1
- package/esm/funcs/videoGenerationGenerate.js +2 -2
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/encodings.d.ts +10 -9
- package/esm/lib/encodings.js +29 -13
- package/esm/lib/http.d.ts +1 -1
- package/esm/lib/http.js +1 -1
- package/esm/lib/security.d.ts +5 -4
- package/esm/lib/security.js +4 -5
- package/esm/models/additionaltoolsitem.d.ts +16 -1
- package/esm/models/additionaltoolsitem.js +10 -0
- package/esm/models/alignment.d.ts +1 -1
- package/esm/models/alignmentplugin.d.ts +9 -8
- package/esm/models/alignmentplugin.js +3 -2
- package/esm/models/alignmentrule.d.ts +31 -0
- package/esm/models/alignmentrule.js +25 -0
- package/esm/models/alignmentrulerecord.d.ts +7 -3
- package/esm/models/alignmentrulerecord.js +2 -1
- package/esm/models/armorautomode.d.ts +44 -0
- package/esm/models/armorautomode.js +49 -0
- package/esm/models/armorcontext.d.ts +22 -0
- package/esm/models/armorcontext.js +25 -0
- package/esm/models/armorenvironmententry.d.ts +14 -0
- package/esm/models/armorenvironmententry.js +14 -0
- package/esm/models/armorplugin.d.ts +92 -0
- package/esm/models/armorplugin.js +60 -0
- package/esm/models/armorrule.d.ts +30 -0
- package/esm/models/armorrule.js +16 -0
- package/esm/models/armorsafeguardresult.d.ts +69 -0
- package/esm/models/armorsafeguardresult.js +83 -0
- package/esm/models/batchlistitem.d.ts +8 -0
- package/esm/models/batchlistitem.js +3 -0
- package/esm/models/batchobject.d.ts +13 -0
- package/esm/models/batchobject.js +6 -0
- package/esm/models/batchsubmitbody.d.ts +5 -0
- package/esm/models/batchsubmitbody.js +2 -0
- package/esm/models/byokkey.d.ts +3 -3
- package/esm/models/byokkey.js +1 -1
- package/esm/models/byokproviderslug.d.ts +2 -0
- package/esm/models/byokproviderslug.js +2 -0
- package/esm/models/chatcontenttext.d.ts +1 -1
- package/esm/models/chatfunctiontool.d.ts +4 -0
- package/esm/models/chatfunctiontool.js +7 -0
- package/esm/models/chatrequest.d.ts +16 -9
- package/esm/models/chatrequest.js +9 -6
- package/esm/models/chatresult.d.ts +10 -0
- package/esm/models/chatresult.js +5 -0
- package/esm/models/chatstreamchunk.d.ts +7 -0
- package/esm/models/chatstreamchunk.js +5 -0
- package/esm/models/chatwebsearchshorthand.d.ts +1 -1
- package/esm/models/clientclosedrequestresponseerrordata.d.ts +17 -0
- package/esm/models/clientclosedrequestresponseerrordata.js +16 -0
- package/esm/models/computeruseservertool.d.ts +5 -5
- package/esm/models/computeruseservertool.js +5 -5
- package/esm/models/createbyokkeyrequest.d.ts +3 -3
- package/esm/models/createbyokkeyrequest.js +1 -1
- package/esm/models/createexternaluserrequest.d.ts +15 -0
- package/esm/models/createexternaluserrequest.js +13 -0
- package/esm/models/createguardrailrequest.d.ts +10 -0
- package/esm/models/createguardrailrequest.js +4 -0
- package/esm/models/createobservabilitydestinationrequest.d.ts +5 -0
- package/esm/models/createobservabilitydestinationrequest.js +2 -0
- package/esm/models/customtool.d.ts +2 -0
- package/esm/models/customtool.js +11 -0
- package/esm/models/decisionsboxanswer.d.ts +21 -0
- package/esm/models/decisionsboxanswer.js +26 -0
- package/esm/models/decisionsboxquestion.d.ts +34 -0
- package/esm/models/decisionsboxquestion.js +23 -0
- package/esm/models/decisionsrequest.d.ts +6 -5
- package/esm/models/decisionsrequest.js +3 -0
- package/esm/models/decisionsresponse.d.ts +4 -3
- package/esm/models/decisionsresponse.js +3 -0
- package/esm/models/deferredbm25search.d.ts +17 -0
- package/esm/models/deferredbm25search.js +19 -0
- package/esm/models/deferredcustomsearch.d.ts +21 -0
- package/esm/models/deferredcustomsearch.js +23 -0
- package/esm/models/deferredregexsearch.d.ts +17 -0
- package/esm/models/deferredregexsearch.js +19 -0
- package/esm/models/deferredtoolscontrol.d.ts +62 -0
- package/esm/models/deferredtoolscontrol.js +38 -0
- package/esm/models/deferredtoolssearchstrategy.d.ts +14 -0
- package/esm/models/deferredtoolssearchstrategy.js +18 -0
- package/esm/models/errors/batchpaymentrequiredresponseerror.d.ts +16 -0
- package/esm/models/errors/batchpaymentrequiredresponseerror.js +5 -0
- package/esm/models/errors/clientclosedrequestresponseerror.d.ts +39 -0
- package/esm/models/errors/clientclosedrequestresponseerror.js +47 -0
- package/esm/models/errors/index.d.ts +1 -0
- package/esm/models/errors/index.js +1 -0
- package/esm/models/{enduser.d.ts → externaluser.d.ts} +5 -5
- package/esm/models/{enduser.js → externaluser.js} +6 -5
- package/esm/models/externaluserresponse.d.ts +11 -0
- package/esm/models/externaluserresponse.js +15 -0
- package/esm/models/guardrail.d.ts +8 -0
- package/esm/models/guardrail.js +4 -0
- package/esm/models/imagegenerationproviderpreferences.d.ts +12 -0
- package/esm/models/imagegenerationproviderpreferences.js +3 -0
- package/esm/models/index.d.ts +34 -6
- package/esm/models/index.js +34 -6
- package/esm/models/inputsunion.d.ts +7 -4
- package/esm/models/inputsunion.js +9 -0
- package/esm/models/inputtext.d.ts +1 -1
- package/esm/models/intern.d.ts +12 -0
- package/esm/models/intern.js +6 -0
- package/esm/models/internconnection.d.ts +118 -0
- package/esm/models/internconnection.js +105 -0
- package/esm/models/internconnectionlist.d.ts +11 -0
- package/esm/models/internconnectionlist.js +15 -0
- package/esm/models/jevrouterplugin.d.ts +5 -0
- package/esm/models/jevrouterplugin.js +2 -0
- package/esm/models/keybudget.d.ts +80 -0
- package/esm/models/keybudget.js +58 -0
- package/esm/models/legacywebsearchservertool.d.ts +1 -1
- package/esm/models/listexternalusersresponse.d.ts +15 -0
- package/esm/models/listexternalusersresponse.js +21 -0
- package/esm/models/messagesmessageparam.d.ts +7 -6
- package/esm/models/messagesmessageparam.js +4 -0
- package/esm/models/messagesrequest.d.ts +11 -4
- package/esm/models/messagesrequest.js +6 -0
- package/esm/models/namespacefunctiontool.d.ts +5 -5
- package/esm/models/namespacefunctiontool.js +5 -5
- package/esm/models/observabilityarizedestination.d.ts +4 -0
- package/esm/models/observabilityarizedestination.js +2 -0
- package/esm/models/observabilitybraintrustdestination.d.ts +4 -0
- package/esm/models/observabilitybraintrustdestination.js +2 -0
- package/esm/models/observabilityclickhousedestination.d.ts +4 -0
- package/esm/models/observabilityclickhousedestination.js +2 -0
- package/esm/models/observabilitydatadogdestination.d.ts +4 -0
- package/esm/models/observabilitydatadogdestination.js +2 -0
- package/esm/models/observabilitygrafanadestination.d.ts +4 -0
- package/esm/models/observabilitygrafanadestination.js +2 -0
- package/esm/models/observabilitylangfusedestination.d.ts +4 -0
- package/esm/models/observabilitylangfusedestination.js +2 -0
- package/esm/models/observabilitylangsmithdestination.d.ts +4 -0
- package/esm/models/observabilitylangsmithdestination.js +2 -0
- package/esm/models/observabilitynewrelicdestination.d.ts +4 -0
- package/esm/models/observabilitynewrelicdestination.js +2 -0
- package/esm/models/observabilityopikdestination.d.ts +4 -0
- package/esm/models/observabilityopikdestination.js +2 -0
- package/esm/models/observabilityotelcollectordestination.d.ts +4 -0
- package/esm/models/observabilityotelcollectordestination.js +2 -0
- package/esm/models/observabilityposthogdestination.d.ts +4 -0
- package/esm/models/observabilityposthogdestination.js +2 -0
- package/esm/models/observabilityrampdestination.d.ts +4 -0
- package/esm/models/observabilityrampdestination.js +2 -0
- package/esm/models/observabilitys3destination.d.ts +4 -0
- package/esm/models/observabilitys3destination.js +2 -0
- package/esm/models/observabilitysentrydestination.d.ts +4 -0
- package/esm/models/observabilitysentrydestination.js +2 -0
- package/esm/models/observabilitysnowflakedestination.d.ts +4 -0
- package/esm/models/observabilitysnowflakedestination.js +2 -0
- package/esm/models/observabilityweavedestination.d.ts +4 -0
- package/esm/models/observabilityweavedestination.js +2 -0
- package/esm/models/observabilitywebhookdestination.d.ts +8 -4
- package/esm/models/observabilitywebhookdestination.js +5 -4
- package/esm/models/openresponseserrorfield.d.ts +1 -0
- package/esm/models/openresponseserrorfield.js +1 -0
- package/esm/models/openresponseserrormetadata.d.ts +1 -1
- package/esm/models/openresponsesresult.d.ts +19 -3
- package/esm/models/openresponsesresult.js +14 -0
- package/esm/models/operations/{createenduser.d.ts → createexternaluser.d.ts} +8 -8
- package/esm/models/operations/createexternaluser.js +23 -0
- package/esm/models/operations/createkeys.d.ts +4 -0
- package/esm/models/operations/createkeys.js +2 -0
- package/esm/models/operations/deleteexternaluser.d.ts +58 -0
- package/esm/models/operations/{deleteenduser.js → deleteexternaluser.js} +5 -5
- package/esm/models/operations/getcurrentkey.d.ts +5 -0
- package/esm/models/operations/getcurrentkey.js +4 -1
- package/esm/models/operations/{updateenduser.d.ts → getexternaluser.d.ts} +7 -10
- package/esm/models/operations/{getenduser.js → getexternaluser.js} +5 -5
- package/esm/models/operations/{deleteenduser.d.ts → getinternconnections.d.ts} +9 -9
- package/esm/models/operations/getinternconnections.js +21 -0
- package/esm/models/operations/{getenduser.d.ts → getinternicon.d.ts} +14 -9
- package/esm/models/operations/getinternicon.js +22 -0
- package/esm/models/operations/getkey.d.ts +4 -0
- package/esm/models/operations/getkey.js +2 -0
- package/esm/models/operations/index.d.ts +10 -5
- package/esm/models/operations/index.js +10 -5
- package/esm/models/operations/list.d.ts +9 -0
- package/esm/models/operations/list.js +4 -0
- package/esm/models/operations/listbatches.d.ts +4 -4
- package/esm/models/operations/listbatches.js +3 -3
- package/esm/models/operations/listbyokkeys.d.ts +2 -0
- package/esm/models/operations/listbyokkeys.js +2 -0
- package/esm/models/operations/{listendusers.d.ts → listexternalusers.d.ts} +11 -11
- package/esm/models/operations/listexternalusers.js +38 -0
- package/esm/models/operations/listinternconnections.d.ts +75 -0
- package/esm/models/operations/listinternconnections.js +36 -0
- package/esm/models/operations/listmodelsuser.d.ts +29 -0
- package/esm/models/operations/listmodelsuser.js +21 -0
- package/esm/models/operations/signinterndaemonaccessrequest.d.ts +72 -0
- package/esm/models/operations/signinterndaemonaccessrequest.js +38 -0
- package/esm/models/operations/signinterndaemonrequest.d.ts +72 -0
- package/esm/models/operations/signinterndaemonrequest.js +38 -0
- package/esm/models/operations/updateexternaluser.d.ts +61 -0
- package/esm/models/operations/updateexternaluser.js +24 -0
- package/esm/models/operations/updatekeys.d.ts +9 -0
- package/esm/models/operations/updatekeys.js +4 -0
- package/esm/models/oranthropiccontentblock.d.ts +2 -1
- package/esm/models/oranthropiccontentblock.js +2 -0
- package/esm/models/oranthropictoolsearchresult.d.ts +17 -0
- package/esm/models/oranthropictoolsearchresult.js +21 -0
- package/esm/models/oranthropictoolsearchresultparam.d.ts +23 -0
- package/esm/models/oranthropictoolsearchresultparam.js +20 -0
- package/esm/models/outputapplypatchservertoolitem.d.ts +7 -2
- package/esm/models/outputapplypatchservertoolitem.js +5 -3
- package/esm/models/outputarmorblockeditem.d.ts +71 -0
- package/esm/models/outputarmorblockeditem.js +60 -0
- package/esm/models/outputdatetimeitem.d.ts +7 -2
- package/esm/models/outputdatetimeitem.js +5 -3
- package/esm/models/outputimagegenerationservertoolitem.d.ts +7 -2
- package/esm/models/outputimagegenerationservertoolitem.js +5 -3
- package/esm/models/outputitems.d.ts +5 -1
- package/esm/models/outputitems.js +4 -0
- package/esm/models/outputsearchmodelsservertoolitem.d.ts +7 -2
- package/esm/models/outputsearchmodelsservertoolitem.js +5 -3
- package/esm/models/outputtoolsearchcallitem.d.ts +26 -0
- package/esm/models/outputtoolsearchcallitem.js +30 -0
- package/esm/models/outputtoolsearchservertoolitem.d.ts +30 -2
- package/esm/models/outputtoolsearchservertoolitem.js +36 -3
- package/esm/models/outputwebsearchservertoolitem.d.ts +7 -2
- package/esm/models/outputwebsearchservertoolitem.js +5 -3
- package/esm/models/preview20250311websearchservertool.d.ts +1 -1
- package/esm/models/previewwebsearchservertool.d.ts +1 -1
- package/esm/models/privateendpointpricing.d.ts +10 -0
- package/esm/models/privateendpointpricing.js +15 -0
- package/esm/models/promptcachebreakpoint.d.ts +3 -1
- package/esm/models/promptcachebreakpoint.js +2 -0
- package/esm/models/promptcacheoptions.d.ts +1 -1
- package/esm/models/providername.d.ts +2 -0
- package/esm/models/providername.js +2 -0
- package/esm/models/provideroptions.d.ts +12 -0
- package/esm/models/provideroptions.js +3 -0
- package/esm/models/providerresponse.d.ts +2 -0
- package/esm/models/providerresponse.js +2 -0
- package/esm/models/publicendpoint.d.ts +11 -2
- package/esm/models/publicendpoint.js +5 -0
- package/esm/models/publicservicetier.d.ts +17 -0
- package/esm/models/publicservicetier.js +16 -0
- package/esm/models/responsesrequest.d.ts +42 -6
- package/esm/models/responsesrequest.js +22 -0
- package/esm/models/signinterndaemonrequest.d.ts +54 -0
- package/esm/models/signinterndaemonrequest.js +30 -0
- package/esm/models/signinterndaemonresponse.d.ts +32 -0
- package/esm/models/signinterndaemonresponse.js +27 -0
- package/esm/models/speechinput.d.ts +12 -0
- package/esm/models/speechinput.js +12 -0
- package/esm/models/speechinputreferenceimage.d.ts +1 -1
- package/esm/models/speechrequest.d.ts +10 -4
- package/esm/models/speechrequest.js +3 -1
- package/esm/models/speechturn.d.ts +25 -0
- package/esm/models/speechturn.js +15 -0
- package/esm/models/switchyardrouterplugin.d.ts +1 -1
- package/esm/models/tokenexchangerequest.d.ts +7 -6
- package/esm/models/tokenexchangerequest.js +4 -2
- package/esm/models/tokenexchangeresponse.d.ts +3 -0
- package/esm/models/toolsearchcallitem.d.ts +47 -0
- package/esm/models/toolsearchcallitem.js +42 -0
- package/esm/models/toolsearchoutputitem.d.ts +150 -0
- package/esm/models/toolsearchoutputitem.js +181 -0
- package/esm/models/updatebyokkeyrequest.d.ts +3 -3
- package/esm/models/updatebyokkeyrequest.js +1 -1
- package/esm/models/updateexternaluserrequest.d.ts +15 -0
- package/esm/models/updateexternaluserrequest.js +18 -0
- package/esm/models/updateguardrailrequest.d.ts +10 -0
- package/esm/models/updateguardrailrequest.js +4 -0
- package/esm/models/updateobservabilitydestinationrequest.d.ts +5 -0
- package/esm/models/updateobservabilitydestinationrequest.js +2 -0
- package/esm/models/videogenerationrequest.d.ts +12 -0
- package/esm/models/videogenerationrequest.js +3 -0
- package/esm/models/videogenerationresponse.d.ts +11 -0
- package/esm/models/videogenerationresponse.js +3 -0
- package/esm/models/webfetchengineenum.d.ts +2 -2
- package/esm/models/webfetchengineenum.js +1 -1
- package/esm/models/webfetchservertoolconfig.d.ts +1 -1
- package/esm/models/websearchconfig.d.ts +1 -1
- package/esm/models/websearchengineenum.d.ts +2 -2
- package/esm/models/websearchengineenum.js +1 -1
- package/esm/models/websearchservertool.d.ts +1 -1
- package/esm/models/websearchservertoolconfig.d.ts +1 -1
- package/esm/models/workspacebudget.d.ts +4 -4
- package/esm/models/workspacebudget.js +3 -3
- package/esm/sdk/apikeys.d.ts +3 -1
- package/esm/sdk/apikeys.js +3 -1
- package/esm/sdk/betaresponses.d.ts +4 -2
- package/esm/sdk/chat.d.ts +4 -2
- package/esm/sdk/endusers.d.ts +10 -10
- package/esm/sdk/endusers.js +15 -15
- package/esm/sdk/externalusers.d.ts +44 -0
- package/esm/sdk/externalusers.js +60 -0
- package/esm/sdk/images.d.ts +3 -2
- package/esm/sdk/interns.d.ts +31 -1
- package/esm/sdk/interns.js +43 -1
- package/esm/sdk/privateendpoints.d.ts +1 -1
- package/esm/sdk/privateendpoints.js +1 -1
- package/esm/sdk/responses.d.ts +4 -2
- package/esm/sdk/sdk.d.ts +5 -2
- package/esm/sdk/sdk.js +7 -3
- package/esm/sdk/vault.d.ts +7 -0
- package/esm/sdk/vault.js +10 -0
- package/jsr.json +1 -1
- package/package.json +5 -5
- package/esm/models/batchlisttimestamp.d.ts +0 -12
- package/esm/models/batchlisttimestamp.js +0 -15
- package/esm/models/createenduserrequest.d.ts +0 -15
- package/esm/models/createenduserrequest.js +0 -13
- package/esm/models/enduserresponse.d.ts +0 -11
- package/esm/models/enduserresponse.js +0 -15
- package/esm/models/listendusersresponse.d.ts +0 -15
- package/esm/models/listendusersresponse.js +0 -21
- package/esm/models/operations/createenduser.js +0 -23
- package/esm/models/operations/listendusers.js +0 -38
- package/esm/models/operations/updateenduser.js +0 -24
- package/esm/models/updateenduserrequest.d.ts +0 -15
- package/esm/models/updateenduserrequest.js +0 -18
|
@@ -3,7 +3,7 @@ import { ClosedEnum } from "../types/enums.js";
|
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { ApplyPatchCallOperation, ApplyPatchCallOperation$Outbound } from "./applypatchcalloperation.js";
|
|
5
5
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
6
|
-
import {
|
|
6
|
+
import { FailableToolCallStatus } from "./failabletoolcallstatus.js";
|
|
7
7
|
export declare const OutputApplyPatchServerToolItemType: {
|
|
8
8
|
readonly OpenrouterApplyPatch: "openrouter:apply_patch";
|
|
9
9
|
};
|
|
@@ -13,12 +13,16 @@ export type OutputApplyPatchServerToolItemType = ClosedEnum<typeof OutputApplyPa
|
|
|
13
13
|
*/
|
|
14
14
|
export type OutputApplyPatchServerToolItem = {
|
|
15
15
|
callId?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
|
|
18
|
+
*/
|
|
19
|
+
error?: string | undefined;
|
|
16
20
|
id?: string | undefined;
|
|
17
21
|
/**
|
|
18
22
|
* The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it.
|
|
19
23
|
*/
|
|
20
24
|
operation?: ApplyPatchCallOperation | undefined;
|
|
21
|
-
status:
|
|
25
|
+
status: FailableToolCallStatus;
|
|
22
26
|
type: OutputApplyPatchServerToolItemType;
|
|
23
27
|
};
|
|
24
28
|
/** @internal */
|
|
@@ -30,6 +34,7 @@ export declare const OutputApplyPatchServerToolItem$inboundSchema: z.ZodType<Out
|
|
|
30
34
|
/** @internal */
|
|
31
35
|
export type OutputApplyPatchServerToolItem$Outbound = {
|
|
32
36
|
call_id?: string | undefined;
|
|
37
|
+
error?: string | undefined;
|
|
33
38
|
id?: string | undefined;
|
|
34
39
|
operation?: ApplyPatchCallOperation$Outbound | undefined;
|
|
35
40
|
status: string;
|
|
@@ -6,7 +6,7 @@ import * as z from "zod/v4";
|
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
8
|
import { ApplyPatchCallOperation$inboundSchema, ApplyPatchCallOperation$outboundSchema, } from "./applypatchcalloperation.js";
|
|
9
|
-
import {
|
|
9
|
+
import { FailableToolCallStatus$inboundSchema, FailableToolCallStatus$outboundSchema, } from "./failabletoolcallstatus.js";
|
|
10
10
|
export const OutputApplyPatchServerToolItemType = {
|
|
11
11
|
OpenrouterApplyPatch: "openrouter:apply_patch",
|
|
12
12
|
};
|
|
@@ -17,9 +17,10 @@ export const OutputApplyPatchServerToolItemType$outboundSchema = OutputApplyPatc
|
|
|
17
17
|
/** @internal */
|
|
18
18
|
export const OutputApplyPatchServerToolItem$inboundSchema = z.object({
|
|
19
19
|
call_id: z.string().optional(),
|
|
20
|
+
error: z.string().optional(),
|
|
20
21
|
id: z.string().optional(),
|
|
21
22
|
operation: ApplyPatchCallOperation$inboundSchema.optional(),
|
|
22
|
-
status:
|
|
23
|
+
status: FailableToolCallStatus$inboundSchema,
|
|
23
24
|
type: OutputApplyPatchServerToolItemType$inboundSchema,
|
|
24
25
|
}).transform((v) => {
|
|
25
26
|
return remap$(v, {
|
|
@@ -29,9 +30,10 @@ export const OutputApplyPatchServerToolItem$inboundSchema = z.object({
|
|
|
29
30
|
/** @internal */
|
|
30
31
|
export const OutputApplyPatchServerToolItem$outboundSchema = z.object({
|
|
31
32
|
callId: z.string().optional(),
|
|
33
|
+
error: z.string().optional(),
|
|
32
34
|
id: z.string().optional(),
|
|
33
35
|
operation: ApplyPatchCallOperation$outboundSchema.optional(),
|
|
34
|
-
status:
|
|
36
|
+
status: FailableToolCallStatus$outboundSchema,
|
|
35
37
|
type: OutputApplyPatchServerToolItemType$outboundSchema,
|
|
36
38
|
}).transform((v) => {
|
|
37
39
|
return remap$(v, {
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
export declare const OutputArmorBlockedItemStatus: {
|
|
6
|
+
readonly Completed: "completed";
|
|
7
|
+
};
|
|
8
|
+
export type OutputArmorBlockedItemStatus = ClosedEnum<typeof OutputArmorBlockedItemStatus>;
|
|
9
|
+
export declare const OutputArmorBlockedItemType: {
|
|
10
|
+
readonly OpenrouterArmorBlocked: "openrouter:armor_blocked";
|
|
11
|
+
};
|
|
12
|
+
export type OutputArmorBlockedItemType = ClosedEnum<typeof OutputArmorBlockedItemType>;
|
|
13
|
+
/**
|
|
14
|
+
* A client tool call that OpenRouter Armor blocked. Emitted in place of the call when `plugins[armor].output_mode` is `custom_item`.
|
|
15
|
+
*/
|
|
16
|
+
export type OutputArmorBlockedItem = {
|
|
17
|
+
/**
|
|
18
|
+
* The arguments exactly as the model wrote them.
|
|
19
|
+
*/
|
|
20
|
+
arguments: string;
|
|
21
|
+
/**
|
|
22
|
+
* The call id the model chose. Use it to find this call in `safeguard_results`.
|
|
23
|
+
*/
|
|
24
|
+
callId: string;
|
|
25
|
+
/**
|
|
26
|
+
* The rule that blocked the call, in the same `[Rule Name]` form as `safeguard_results`.
|
|
27
|
+
*/
|
|
28
|
+
explanation: string;
|
|
29
|
+
id: string;
|
|
30
|
+
/**
|
|
31
|
+
* The name of the tool the model called.
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
* The namespace the tool belongs to, for namespaced tools such as MCP. Absent for a plain function tool.
|
|
36
|
+
*/
|
|
37
|
+
namespace?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* The error text the model received as the result of this call. Sending this item back replays that text to the model.
|
|
40
|
+
*/
|
|
41
|
+
reason: string;
|
|
42
|
+
status: OutputArmorBlockedItemStatus;
|
|
43
|
+
type: OutputArmorBlockedItemType;
|
|
44
|
+
};
|
|
45
|
+
/** @internal */
|
|
46
|
+
export declare const OutputArmorBlockedItemStatus$inboundSchema: z.ZodEnum<typeof OutputArmorBlockedItemStatus>;
|
|
47
|
+
/** @internal */
|
|
48
|
+
export declare const OutputArmorBlockedItemStatus$outboundSchema: z.ZodEnum<typeof OutputArmorBlockedItemStatus>;
|
|
49
|
+
/** @internal */
|
|
50
|
+
export declare const OutputArmorBlockedItemType$inboundSchema: z.ZodEnum<typeof OutputArmorBlockedItemType>;
|
|
51
|
+
/** @internal */
|
|
52
|
+
export declare const OutputArmorBlockedItemType$outboundSchema: z.ZodEnum<typeof OutputArmorBlockedItemType>;
|
|
53
|
+
/** @internal */
|
|
54
|
+
export declare const OutputArmorBlockedItem$inboundSchema: z.ZodType<OutputArmorBlockedItem, unknown>;
|
|
55
|
+
/** @internal */
|
|
56
|
+
export type OutputArmorBlockedItem$Outbound = {
|
|
57
|
+
arguments: string;
|
|
58
|
+
call_id: string;
|
|
59
|
+
explanation: string;
|
|
60
|
+
id: string;
|
|
61
|
+
name: string;
|
|
62
|
+
namespace?: string | undefined;
|
|
63
|
+
reason: string;
|
|
64
|
+
status: string;
|
|
65
|
+
type: string;
|
|
66
|
+
};
|
|
67
|
+
/** @internal */
|
|
68
|
+
export declare const OutputArmorBlockedItem$outboundSchema: z.ZodType<OutputArmorBlockedItem$Outbound, OutputArmorBlockedItem>;
|
|
69
|
+
export declare function outputArmorBlockedItemToJSON(outputArmorBlockedItem: OutputArmorBlockedItem): string;
|
|
70
|
+
export declare function outputArmorBlockedItemFromJSON(jsonString: string): SafeParseResult<OutputArmorBlockedItem, SDKValidationError>;
|
|
71
|
+
//# sourceMappingURL=outputarmorblockeditem.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 97c8f227ed0a
|
|
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
|
+
export const OutputArmorBlockedItemStatus = {
|
|
9
|
+
Completed: "completed",
|
|
10
|
+
};
|
|
11
|
+
export const OutputArmorBlockedItemType = {
|
|
12
|
+
OpenrouterArmorBlocked: "openrouter:armor_blocked",
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const OutputArmorBlockedItemStatus$inboundSchema = z.enum(OutputArmorBlockedItemStatus);
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const OutputArmorBlockedItemStatus$outboundSchema = OutputArmorBlockedItemStatus$inboundSchema;
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const OutputArmorBlockedItemType$inboundSchema = z.enum(OutputArmorBlockedItemType);
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const OutputArmorBlockedItemType$outboundSchema = OutputArmorBlockedItemType$inboundSchema;
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const OutputArmorBlockedItem$inboundSchema = z.object({
|
|
24
|
+
arguments: z.string(),
|
|
25
|
+
call_id: z.string(),
|
|
26
|
+
explanation: z.string(),
|
|
27
|
+
id: z.string(),
|
|
28
|
+
name: z.string(),
|
|
29
|
+
namespace: z.string().optional(),
|
|
30
|
+
reason: z.string(),
|
|
31
|
+
status: OutputArmorBlockedItemStatus$inboundSchema,
|
|
32
|
+
type: OutputArmorBlockedItemType$inboundSchema,
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
"call_id": "callId",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const OutputArmorBlockedItem$outboundSchema = z.object({
|
|
40
|
+
arguments: z.string(),
|
|
41
|
+
callId: z.string(),
|
|
42
|
+
explanation: z.string(),
|
|
43
|
+
id: z.string(),
|
|
44
|
+
name: z.string(),
|
|
45
|
+
namespace: z.string().optional(),
|
|
46
|
+
reason: z.string(),
|
|
47
|
+
status: OutputArmorBlockedItemStatus$outboundSchema,
|
|
48
|
+
type: OutputArmorBlockedItemType$outboundSchema,
|
|
49
|
+
}).transform((v) => {
|
|
50
|
+
return remap$(v, {
|
|
51
|
+
callId: "call_id",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
export function outputArmorBlockedItemToJSON(outputArmorBlockedItem) {
|
|
55
|
+
return JSON.stringify(OutputArmorBlockedItem$outboundSchema.parse(outputArmorBlockedItem));
|
|
56
|
+
}
|
|
57
|
+
export function outputArmorBlockedItemFromJSON(jsonString) {
|
|
58
|
+
return safeParse(jsonString, (x) => OutputArmorBlockedItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputArmorBlockedItem' from JSON`);
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=outputarmorblockeditem.js.map
|
|
@@ -2,7 +2,7 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
-
import {
|
|
5
|
+
import { FailableToolCallStatus } from "./failabletoolcallstatus.js";
|
|
6
6
|
export declare const OutputDatetimeItemType: {
|
|
7
7
|
readonly OpenrouterDatetime: "openrouter:datetime";
|
|
8
8
|
};
|
|
@@ -15,8 +15,12 @@ export type OutputDatetimeItem = {
|
|
|
15
15
|
* ISO 8601 datetime string
|
|
16
16
|
*/
|
|
17
17
|
datetime: string;
|
|
18
|
+
/**
|
|
19
|
+
* The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
|
|
20
|
+
*/
|
|
21
|
+
error?: string | undefined;
|
|
18
22
|
id?: string | undefined;
|
|
19
|
-
status:
|
|
23
|
+
status: FailableToolCallStatus;
|
|
20
24
|
/**
|
|
21
25
|
* IANA timezone name
|
|
22
26
|
*/
|
|
@@ -32,6 +36,7 @@ export declare const OutputDatetimeItem$inboundSchema: z.ZodType<OutputDatetimeI
|
|
|
32
36
|
/** @internal */
|
|
33
37
|
export type OutputDatetimeItem$Outbound = {
|
|
34
38
|
datetime: string;
|
|
39
|
+
error?: string | undefined;
|
|
35
40
|
id?: string | undefined;
|
|
36
41
|
status: string;
|
|
37
42
|
timezone: string;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import {
|
|
7
|
+
import { FailableToolCallStatus$inboundSchema, FailableToolCallStatus$outboundSchema, } from "./failabletoolcallstatus.js";
|
|
8
8
|
export const OutputDatetimeItemType = {
|
|
9
9
|
OpenrouterDatetime: "openrouter:datetime",
|
|
10
10
|
};
|
|
@@ -15,16 +15,18 @@ export const OutputDatetimeItemType$outboundSchema = OutputDatetimeItemType$inbo
|
|
|
15
15
|
/** @internal */
|
|
16
16
|
export const OutputDatetimeItem$inboundSchema = z.object({
|
|
17
17
|
datetime: z.string(),
|
|
18
|
+
error: z.string().optional(),
|
|
18
19
|
id: z.string().optional(),
|
|
19
|
-
status:
|
|
20
|
+
status: FailableToolCallStatus$inboundSchema,
|
|
20
21
|
timezone: z.string(),
|
|
21
22
|
type: OutputDatetimeItemType$inboundSchema,
|
|
22
23
|
});
|
|
23
24
|
/** @internal */
|
|
24
25
|
export const OutputDatetimeItem$outboundSchema = z.object({
|
|
25
26
|
datetime: z.string(),
|
|
27
|
+
error: z.string().optional(),
|
|
26
28
|
id: z.string().optional(),
|
|
27
|
-
status:
|
|
29
|
+
status: FailableToolCallStatus$outboundSchema,
|
|
28
30
|
timezone: z.string(),
|
|
29
31
|
type: OutputDatetimeItemType$outboundSchema,
|
|
30
32
|
});
|
|
@@ -2,7 +2,7 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
-
import {
|
|
5
|
+
import { FailableToolCallStatus } from "./failabletoolcallstatus.js";
|
|
6
6
|
export declare const OutputImageGenerationServerToolItemType: {
|
|
7
7
|
readonly OpenrouterImageGeneration: "openrouter:image_generation";
|
|
8
8
|
};
|
|
@@ -11,6 +11,10 @@ export type OutputImageGenerationServerToolItemType = ClosedEnum<typeof OutputIm
|
|
|
11
11
|
* An openrouter:image_generation server tool output item
|
|
12
12
|
*/
|
|
13
13
|
export type OutputImageGenerationServerToolItem = {
|
|
14
|
+
/**
|
|
15
|
+
* The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
|
|
16
|
+
*/
|
|
17
|
+
error?: string | undefined;
|
|
14
18
|
id?: string | undefined;
|
|
15
19
|
imageB64?: string | undefined;
|
|
16
20
|
imageUrl?: string | undefined;
|
|
@@ -23,7 +27,7 @@ export type OutputImageGenerationServerToolItem = {
|
|
|
23
27
|
*/
|
|
24
28
|
result?: string | null | undefined;
|
|
25
29
|
revisedPrompt?: string | undefined;
|
|
26
|
-
status:
|
|
30
|
+
status: FailableToolCallStatus;
|
|
27
31
|
type: OutputImageGenerationServerToolItemType;
|
|
28
32
|
};
|
|
29
33
|
/** @internal */
|
|
@@ -34,6 +38,7 @@ export declare const OutputImageGenerationServerToolItemType$outboundSchema: z.Z
|
|
|
34
38
|
export declare const OutputImageGenerationServerToolItem$inboundSchema: z.ZodType<OutputImageGenerationServerToolItem, unknown>;
|
|
35
39
|
/** @internal */
|
|
36
40
|
export type OutputImageGenerationServerToolItem$Outbound = {
|
|
41
|
+
error?: string | undefined;
|
|
37
42
|
id?: string | undefined;
|
|
38
43
|
imageB64?: string | undefined;
|
|
39
44
|
imageUrl?: string | undefined;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import {
|
|
7
|
+
import { FailableToolCallStatus$inboundSchema, FailableToolCallStatus$outboundSchema, } from "./failabletoolcallstatus.js";
|
|
8
8
|
export const OutputImageGenerationServerToolItemType = {
|
|
9
9
|
OpenrouterImageGeneration: "openrouter:image_generation",
|
|
10
10
|
};
|
|
@@ -14,24 +14,26 @@ export const OutputImageGenerationServerToolItemType$inboundSchema = z.enum(Outp
|
|
|
14
14
|
export const OutputImageGenerationServerToolItemType$outboundSchema = OutputImageGenerationServerToolItemType$inboundSchema;
|
|
15
15
|
/** @internal */
|
|
16
16
|
export const OutputImageGenerationServerToolItem$inboundSchema = z.object({
|
|
17
|
+
error: z.string().optional(),
|
|
17
18
|
id: z.string().optional(),
|
|
18
19
|
imageB64: z.string().optional(),
|
|
19
20
|
imageUrl: z.string().optional(),
|
|
20
21
|
prompt: z.string().optional(),
|
|
21
22
|
result: z.nullable(z.string()).optional(),
|
|
22
23
|
revisedPrompt: z.string().optional(),
|
|
23
|
-
status:
|
|
24
|
+
status: FailableToolCallStatus$inboundSchema,
|
|
24
25
|
type: OutputImageGenerationServerToolItemType$inboundSchema,
|
|
25
26
|
});
|
|
26
27
|
/** @internal */
|
|
27
28
|
export const OutputImageGenerationServerToolItem$outboundSchema = z.object({
|
|
29
|
+
error: z.string().optional(),
|
|
28
30
|
id: z.string().optional(),
|
|
29
31
|
imageB64: z.string().optional(),
|
|
30
32
|
imageUrl: z.string().optional(),
|
|
31
33
|
prompt: z.string().optional(),
|
|
32
34
|
result: z.nullable(z.string()).optional(),
|
|
33
35
|
revisedPrompt: z.string().optional(),
|
|
34
|
-
status:
|
|
36
|
+
status: FailableToolCallStatus$outboundSchema,
|
|
35
37
|
type: OutputImageGenerationServerToolItemType$outboundSchema,
|
|
36
38
|
});
|
|
37
39
|
export function outputImageGenerationServerToolItemToJSON(outputImageGenerationServerToolItem) {
|
|
@@ -5,6 +5,7 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
|
5
5
|
import { OutputAdvisorServerToolItem } from "./outputadvisorservertoolitem.js";
|
|
6
6
|
import { OutputApplyPatchCallItem } from "./outputapplypatchcallitem.js";
|
|
7
7
|
import { OutputApplyPatchServerToolItem } from "./outputapplypatchservertoolitem.js";
|
|
8
|
+
import { OutputArmorBlockedItem } from "./outputarmorblockeditem.js";
|
|
8
9
|
import { OutputBashServerToolItem } from "./outputbashservertoolitem.js";
|
|
9
10
|
import { OutputBrowserUseServerToolItem } from "./outputbrowseruseservertoolitem.js";
|
|
10
11
|
import { OutputCodeInterpreterCallItem } from "./outputcodeinterpretercallitem.js";
|
|
@@ -29,6 +30,7 @@ import { OutputShellCallOutputItem } from "./outputshellcalloutputitem.js";
|
|
|
29
30
|
import { OutputShellServerToolItem } from "./outputshellservertoolitem.js";
|
|
30
31
|
import { OutputSubagentServerToolItem } from "./outputsubagentservertoolitem.js";
|
|
31
32
|
import { OutputTextEditorServerToolItem } from "./outputtexteditorservertoolitem.js";
|
|
33
|
+
import { OutputToolSearchCallItem } from "./outputtoolsearchcallitem.js";
|
|
32
34
|
import { OutputToolSearchServerToolItem } from "./outputtoolsearchservertoolitem.js";
|
|
33
35
|
import { OutputWebFetchServerToolItem } from "./outputwebfetchservertoolitem.js";
|
|
34
36
|
import { OutputWebSearchCallItem } from "./outputwebsearchcallitem.js";
|
|
@@ -48,6 +50,8 @@ export type OutputItems = OutputApplyPatchCallItem | (OutputCodeInterpreterCallI
|
|
|
48
50
|
type: "openrouter:advisor";
|
|
49
51
|
}) | (OutputApplyPatchServerToolItem & {
|
|
50
52
|
type: "openrouter:apply_patch";
|
|
53
|
+
}) | (OutputArmorBlockedItem & {
|
|
54
|
+
type: "openrouter:armor_blocked";
|
|
51
55
|
}) | (OutputBashServerToolItem & {
|
|
52
56
|
type: "openrouter:bash";
|
|
53
57
|
}) | (OutputBrowserUseServerToolItem & {
|
|
@@ -82,7 +86,7 @@ export type OutputItems = OutputApplyPatchCallItem | (OutputCodeInterpreterCallI
|
|
|
82
86
|
type: "openrouter:web_fetch";
|
|
83
87
|
}) | (OutputWebSearchServerToolItem & {
|
|
84
88
|
type: "openrouter:web_search";
|
|
85
|
-
}) | OutputReasoningItem | OutputShellCallItem | OutputShellCallOutputItem | (OutputWebSearchCallItem & {
|
|
89
|
+
}) | OutputReasoningItem | OutputShellCallItem | OutputShellCallOutputItem | OutputToolSearchCallItem | (OutputWebSearchCallItem & {
|
|
86
90
|
type: "web_search_call";
|
|
87
91
|
}) | discriminatedUnionTypes.Unknown<"type">;
|
|
88
92
|
/** @internal */
|
|
@@ -8,6 +8,7 @@ import { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
|
8
8
|
import { OutputAdvisorServerToolItem$inboundSchema, } from "./outputadvisorservertoolitem.js";
|
|
9
9
|
import { OutputApplyPatchCallItem$inboundSchema, } from "./outputapplypatchcallitem.js";
|
|
10
10
|
import { OutputApplyPatchServerToolItem$inboundSchema, } from "./outputapplypatchservertoolitem.js";
|
|
11
|
+
import { OutputArmorBlockedItem$inboundSchema, } from "./outputarmorblockeditem.js";
|
|
11
12
|
import { OutputBashServerToolItem$inboundSchema, } from "./outputbashservertoolitem.js";
|
|
12
13
|
import { OutputBrowserUseServerToolItem$inboundSchema, } from "./outputbrowseruseservertoolitem.js";
|
|
13
14
|
import { OutputCodeInterpreterCallItem$inboundSchema, } from "./outputcodeinterpretercallitem.js";
|
|
@@ -32,6 +33,7 @@ import { OutputShellCallOutputItem$inboundSchema, } from "./outputshellcalloutpu
|
|
|
32
33
|
import { OutputShellServerToolItem$inboundSchema, } from "./outputshellservertoolitem.js";
|
|
33
34
|
import { OutputSubagentServerToolItem$inboundSchema, } from "./outputsubagentservertoolitem.js";
|
|
34
35
|
import { OutputTextEditorServerToolItem$inboundSchema, } from "./outputtexteditorservertoolitem.js";
|
|
36
|
+
import { OutputToolSearchCallItem$inboundSchema, } from "./outputtoolsearchcallitem.js";
|
|
35
37
|
import { OutputToolSearchServerToolItem$inboundSchema, } from "./outputtoolsearchservertoolitem.js";
|
|
36
38
|
import { OutputWebFetchServerToolItem$inboundSchema, } from "./outputwebfetchservertoolitem.js";
|
|
37
39
|
import { OutputWebSearchCallItem$inboundSchema, } from "./outputwebsearchcallitem.js";
|
|
@@ -49,6 +51,7 @@ export const OutputItems$inboundSchema = discriminatedUnion("type", {
|
|
|
49
51
|
["openrouter:advisor"]: OutputAdvisorServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:advisor") })),
|
|
50
52
|
["openrouter:apply_patch"]: OutputApplyPatchServerToolItem$inboundSchema
|
|
51
53
|
.and(z.object({ type: z.literal("openrouter:apply_patch") })),
|
|
54
|
+
["openrouter:armor_blocked"]: OutputArmorBlockedItem$inboundSchema.and(z.object({ type: z.literal("openrouter:armor_blocked") })),
|
|
52
55
|
["openrouter:bash"]: OutputBashServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:bash") })),
|
|
53
56
|
["openrouter:browser_use"]: OutputBrowserUseServerToolItem$inboundSchema
|
|
54
57
|
.and(z.object({ type: z.literal("openrouter:browser_use") })),
|
|
@@ -73,6 +76,7 @@ export const OutputItems$inboundSchema = discriminatedUnion("type", {
|
|
|
73
76
|
reasoning: OutputReasoningItem$inboundSchema,
|
|
74
77
|
shell_call: OutputShellCallItem$inboundSchema,
|
|
75
78
|
shell_call_output: OutputShellCallOutputItem$inboundSchema,
|
|
79
|
+
tool_search_call: OutputToolSearchCallItem$inboundSchema,
|
|
76
80
|
web_search_call: OutputWebSearchCallItem$inboundSchema.and(z.object({ type: z.literal("web_search_call") })),
|
|
77
81
|
});
|
|
78
82
|
export function outputItemsFromJSON(jsonString) {
|
|
@@ -2,7 +2,7 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
-
import {
|
|
5
|
+
import { FailableToolCallStatus } from "./failabletoolcallstatus.js";
|
|
6
6
|
export declare const OutputSearchModelsServerToolItemType: {
|
|
7
7
|
readonly OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models";
|
|
8
8
|
};
|
|
@@ -15,9 +15,13 @@ export type OutputSearchModelsServerToolItem = {
|
|
|
15
15
|
* The JSON arguments submitted to the search tool (e.g. {"query":"Claude"})
|
|
16
16
|
*/
|
|
17
17
|
arguments?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
|
|
20
|
+
*/
|
|
21
|
+
error?: string | undefined;
|
|
18
22
|
id?: string | undefined;
|
|
19
23
|
query?: string | undefined;
|
|
20
|
-
status:
|
|
24
|
+
status: FailableToolCallStatus;
|
|
21
25
|
type: OutputSearchModelsServerToolItemType;
|
|
22
26
|
};
|
|
23
27
|
/** @internal */
|
|
@@ -29,6 +33,7 @@ export declare const OutputSearchModelsServerToolItem$inboundSchema: z.ZodType<O
|
|
|
29
33
|
/** @internal */
|
|
30
34
|
export type OutputSearchModelsServerToolItem$Outbound = {
|
|
31
35
|
arguments?: string | undefined;
|
|
36
|
+
error?: string | undefined;
|
|
32
37
|
id?: string | undefined;
|
|
33
38
|
query?: string | undefined;
|
|
34
39
|
status: string;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import {
|
|
7
|
+
import { FailableToolCallStatus$inboundSchema, FailableToolCallStatus$outboundSchema, } from "./failabletoolcallstatus.js";
|
|
8
8
|
export const OutputSearchModelsServerToolItemType = {
|
|
9
9
|
OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models",
|
|
10
10
|
};
|
|
@@ -15,17 +15,19 @@ export const OutputSearchModelsServerToolItemType$outboundSchema = OutputSearchM
|
|
|
15
15
|
/** @internal */
|
|
16
16
|
export const OutputSearchModelsServerToolItem$inboundSchema = z.object({
|
|
17
17
|
arguments: z.string().optional(),
|
|
18
|
+
error: z.string().optional(),
|
|
18
19
|
id: z.string().optional(),
|
|
19
20
|
query: z.string().optional(),
|
|
20
|
-
status:
|
|
21
|
+
status: FailableToolCallStatus$inboundSchema,
|
|
21
22
|
type: OutputSearchModelsServerToolItemType$inboundSchema,
|
|
22
23
|
});
|
|
23
24
|
/** @internal */
|
|
24
25
|
export const OutputSearchModelsServerToolItem$outboundSchema = z.object({
|
|
25
26
|
arguments: z.string().optional(),
|
|
27
|
+
error: z.string().optional(),
|
|
26
28
|
id: z.string().optional(),
|
|
27
29
|
query: z.string().optional(),
|
|
28
|
-
status:
|
|
30
|
+
status: FailableToolCallStatus$outboundSchema,
|
|
29
31
|
type: OutputSearchModelsServerToolItemType$outboundSchema,
|
|
30
32
|
});
|
|
31
33
|
export function outputSearchModelsServerToolItemToJSON(outputSearchModelsServerToolItem) {
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
import { ToolCallStatus } from "./toolcallstatus.js";
|
|
6
|
+
export declare const OutputToolSearchCallItemExecution: {
|
|
7
|
+
readonly Client: "client";
|
|
8
|
+
};
|
|
9
|
+
export type OutputToolSearchCallItemExecution = ClosedEnum<typeof OutputToolSearchCallItemExecution>;
|
|
10
|
+
/**
|
|
11
|
+
* A call the model made to a `tool_search` tool declared with `"execution": "client"`. The client runs the search and replays this item with a `tool_search_output` item.
|
|
12
|
+
*/
|
|
13
|
+
export type OutputToolSearchCallItem = {
|
|
14
|
+
arguments?: any | undefined;
|
|
15
|
+
callId: string;
|
|
16
|
+
execution: OutputToolSearchCallItemExecution;
|
|
17
|
+
id?: string | undefined;
|
|
18
|
+
status: ToolCallStatus;
|
|
19
|
+
type: "tool_search_call";
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const OutputToolSearchCallItemExecution$inboundSchema: z.ZodEnum<typeof OutputToolSearchCallItemExecution>;
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare const OutputToolSearchCallItem$inboundSchema: z.ZodType<OutputToolSearchCallItem, unknown>;
|
|
25
|
+
export declare function outputToolSearchCallItemFromJSON(jsonString: string): SafeParseResult<OutputToolSearchCallItem, SDKValidationError>;
|
|
26
|
+
//# sourceMappingURL=outputtoolsearchcallitem.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 5eee8247f3f8
|
|
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
|
+
import { ToolCallStatus$inboundSchema, } from "./toolcallstatus.js";
|
|
9
|
+
export const OutputToolSearchCallItemExecution = {
|
|
10
|
+
Client: "client",
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const OutputToolSearchCallItemExecution$inboundSchema = z.enum(OutputToolSearchCallItemExecution);
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const OutputToolSearchCallItem$inboundSchema = z.object({
|
|
16
|
+
arguments: z.any().optional(),
|
|
17
|
+
call_id: z.string(),
|
|
18
|
+
execution: OutputToolSearchCallItemExecution$inboundSchema,
|
|
19
|
+
id: z.string().optional(),
|
|
20
|
+
status: ToolCallStatus$inboundSchema,
|
|
21
|
+
type: z.literal("tool_search_call"),
|
|
22
|
+
}).transform((v) => {
|
|
23
|
+
return remap$(v, {
|
|
24
|
+
"call_id": "callId",
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
export function outputToolSearchCallItemFromJSON(jsonString) {
|
|
28
|
+
return safeParse(jsonString, (x) => OutputToolSearchCallItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputToolSearchCallItem' from JSON`);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=outputtoolsearchcallitem.js.map
|
|
@@ -2,7 +2,14 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
-
import {
|
|
5
|
+
import { FailableToolCallStatus } from "./failabletoolcallstatus.js";
|
|
6
|
+
export type Match = {
|
|
7
|
+
definition: {
|
|
8
|
+
[k: string]: any;
|
|
9
|
+
};
|
|
10
|
+
schemaDigest: string;
|
|
11
|
+
toolId: string;
|
|
12
|
+
};
|
|
6
13
|
export declare const OutputToolSearchServerToolItemType: {
|
|
7
14
|
readonly OpenrouterToolSearch: "openrouter:tool_search";
|
|
8
15
|
};
|
|
@@ -11,12 +18,31 @@ export type OutputToolSearchServerToolItemType = ClosedEnum<typeof OutputToolSea
|
|
|
11
18
|
* An openrouter:tool_search server tool output item
|
|
12
19
|
*/
|
|
13
20
|
export type OutputToolSearchServerToolItem = {
|
|
21
|
+
/**
|
|
22
|
+
* The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
|
|
23
|
+
*/
|
|
24
|
+
error?: string | undefined;
|
|
14
25
|
id?: string | undefined;
|
|
26
|
+
matches?: Array<Match> | undefined;
|
|
15
27
|
query?: string | undefined;
|
|
16
|
-
status:
|
|
28
|
+
status: FailableToolCallStatus;
|
|
17
29
|
type: OutputToolSearchServerToolItemType;
|
|
18
30
|
};
|
|
19
31
|
/** @internal */
|
|
32
|
+
export declare const Match$inboundSchema: z.ZodType<Match, unknown>;
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type Match$Outbound = {
|
|
35
|
+
definition: {
|
|
36
|
+
[k: string]: any;
|
|
37
|
+
};
|
|
38
|
+
schema_digest: string;
|
|
39
|
+
tool_id: string;
|
|
40
|
+
};
|
|
41
|
+
/** @internal */
|
|
42
|
+
export declare const Match$outboundSchema: z.ZodType<Match$Outbound, Match>;
|
|
43
|
+
export declare function matchToJSON(match: Match): string;
|
|
44
|
+
export declare function matchFromJSON(jsonString: string): SafeParseResult<Match, SDKValidationError>;
|
|
45
|
+
/** @internal */
|
|
20
46
|
export declare const OutputToolSearchServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputToolSearchServerToolItemType>;
|
|
21
47
|
/** @internal */
|
|
22
48
|
export declare const OutputToolSearchServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputToolSearchServerToolItemType>;
|
|
@@ -24,7 +50,9 @@ export declare const OutputToolSearchServerToolItemType$outboundSchema: z.ZodEnu
|
|
|
24
50
|
export declare const OutputToolSearchServerToolItem$inboundSchema: z.ZodType<OutputToolSearchServerToolItem, unknown>;
|
|
25
51
|
/** @internal */
|
|
26
52
|
export type OutputToolSearchServerToolItem$Outbound = {
|
|
53
|
+
error?: string | undefined;
|
|
27
54
|
id?: string | undefined;
|
|
55
|
+
matches?: Array<Match$Outbound> | undefined;
|
|
28
56
|
query?: string | undefined;
|
|
29
57
|
status: string;
|
|
30
58
|
type: string;
|
|
@@ -3,27 +3,60 @@
|
|
|
3
3
|
* @generated-id: 54b4dacceeab
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import {
|
|
8
|
+
import { FailableToolCallStatus$inboundSchema, FailableToolCallStatus$outboundSchema, } from "./failabletoolcallstatus.js";
|
|
8
9
|
export const OutputToolSearchServerToolItemType = {
|
|
9
10
|
OpenrouterToolSearch: "openrouter:tool_search",
|
|
10
11
|
};
|
|
11
12
|
/** @internal */
|
|
13
|
+
export const Match$inboundSchema = z.object({
|
|
14
|
+
definition: z.record(z.string(), z.any()),
|
|
15
|
+
schema_digest: z.string(),
|
|
16
|
+
tool_id: z.string(),
|
|
17
|
+
}).transform((v) => {
|
|
18
|
+
return remap$(v, {
|
|
19
|
+
"schema_digest": "schemaDigest",
|
|
20
|
+
"tool_id": "toolId",
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const Match$outboundSchema = z.object({
|
|
25
|
+
definition: z.record(z.string(), z.any()),
|
|
26
|
+
schemaDigest: z.string(),
|
|
27
|
+
toolId: z.string(),
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
schemaDigest: "schema_digest",
|
|
31
|
+
toolId: "tool_id",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
export function matchToJSON(match) {
|
|
35
|
+
return JSON.stringify(Match$outboundSchema.parse(match));
|
|
36
|
+
}
|
|
37
|
+
export function matchFromJSON(jsonString) {
|
|
38
|
+
return safeParse(jsonString, (x) => Match$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Match' from JSON`);
|
|
39
|
+
}
|
|
40
|
+
/** @internal */
|
|
12
41
|
export const OutputToolSearchServerToolItemType$inboundSchema = z.enum(OutputToolSearchServerToolItemType);
|
|
13
42
|
/** @internal */
|
|
14
43
|
export const OutputToolSearchServerToolItemType$outboundSchema = OutputToolSearchServerToolItemType$inboundSchema;
|
|
15
44
|
/** @internal */
|
|
16
45
|
export const OutputToolSearchServerToolItem$inboundSchema = z.object({
|
|
46
|
+
error: z.string().optional(),
|
|
17
47
|
id: z.string().optional(),
|
|
48
|
+
matches: z.array(z.lazy(() => Match$inboundSchema)).optional(),
|
|
18
49
|
query: z.string().optional(),
|
|
19
|
-
status:
|
|
50
|
+
status: FailableToolCallStatus$inboundSchema,
|
|
20
51
|
type: OutputToolSearchServerToolItemType$inboundSchema,
|
|
21
52
|
});
|
|
22
53
|
/** @internal */
|
|
23
54
|
export const OutputToolSearchServerToolItem$outboundSchema = z.object({
|
|
55
|
+
error: z.string().optional(),
|
|
24
56
|
id: z.string().optional(),
|
|
57
|
+
matches: z.array(z.lazy(() => Match$outboundSchema)).optional(),
|
|
25
58
|
query: z.string().optional(),
|
|
26
|
-
status:
|
|
59
|
+
status: FailableToolCallStatus$outboundSchema,
|
|
27
60
|
type: OutputToolSearchServerToolItemType$outboundSchema,
|
|
28
61
|
});
|
|
29
62
|
export function outputToolSearchServerToolItemToJSON(outputToolSearchServerToolItem) {
|