@openrouter/sdk 1.4.25 → 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/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/index.d.ts +10 -5
- package/esm/models/operations/index.js +10 -5
- package/esm/models/operations/list.d.ts +5 -0
- package/esm/models/operations/list.js +2 -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 +5 -0
- package/esm/models/operations/updatekeys.js +2 -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 +6 -6
- 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
|
@@ -34,6 +34,10 @@ export type ObservabilityS3Destination = {
|
|
|
34
34
|
* When true, include cost and billing generation metadata.
|
|
35
35
|
*/
|
|
36
36
|
broadcastGenerationCost: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost.
|
|
39
|
+
*/
|
|
40
|
+
broadcastGenerationCostAllocation: boolean;
|
|
37
41
|
/**
|
|
38
42
|
* When true, include identity generation metadata.
|
|
39
43
|
*/
|
|
@@ -26,6 +26,7 @@ export function observabilityS3DestinationConfigFromJSON(jsonString) {
|
|
|
26
26
|
export const ObservabilityS3Destination$inboundSchema = z.object({
|
|
27
27
|
api_key_hashes: z.nullable(z.array(z.string())),
|
|
28
28
|
broadcast_generation_cost: z.boolean(),
|
|
29
|
+
broadcast_generation_cost_allocation: z.boolean(),
|
|
29
30
|
broadcast_generation_identity: z.boolean(),
|
|
30
31
|
broadcast_generation_request_context: z.boolean(),
|
|
31
32
|
config: z.lazy(() => ObservabilityS3DestinationConfig$inboundSchema),
|
|
@@ -44,6 +45,7 @@ export const ObservabilityS3Destination$inboundSchema = z.object({
|
|
|
44
45
|
return remap$(v, {
|
|
45
46
|
"api_key_hashes": "apiKeyHashes",
|
|
46
47
|
"broadcast_generation_cost": "broadcastGenerationCost",
|
|
48
|
+
"broadcast_generation_cost_allocation": "broadcastGenerationCostAllocation",
|
|
47
49
|
"broadcast_generation_identity": "broadcastGenerationIdentity",
|
|
48
50
|
"broadcast_generation_request_context": "broadcastGenerationRequestContext",
|
|
49
51
|
"created_at": "createdAt",
|
|
@@ -22,6 +22,10 @@ export type ObservabilitySentryDestination = {
|
|
|
22
22
|
* When true, include cost and billing generation metadata.
|
|
23
23
|
*/
|
|
24
24
|
broadcastGenerationCost: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost.
|
|
27
|
+
*/
|
|
28
|
+
broadcastGenerationCostAllocation: boolean;
|
|
25
29
|
/**
|
|
26
30
|
* When true, include identity generation metadata.
|
|
27
31
|
*/
|
|
@@ -20,6 +20,7 @@ export function observabilitySentryDestinationConfigFromJSON(jsonString) {
|
|
|
20
20
|
export const ObservabilitySentryDestination$inboundSchema = z.object({
|
|
21
21
|
api_key_hashes: z.nullable(z.array(z.string())),
|
|
22
22
|
broadcast_generation_cost: z.boolean(),
|
|
23
|
+
broadcast_generation_cost_allocation: z.boolean(),
|
|
23
24
|
broadcast_generation_identity: z.boolean(),
|
|
24
25
|
broadcast_generation_request_context: z.boolean(),
|
|
25
26
|
config: z.lazy(() => ObservabilitySentryDestinationConfig$inboundSchema),
|
|
@@ -38,6 +39,7 @@ export const ObservabilitySentryDestination$inboundSchema = z.object({
|
|
|
38
39
|
return remap$(v, {
|
|
39
40
|
"api_key_hashes": "apiKeyHashes",
|
|
40
41
|
"broadcast_generation_cost": "broadcastGenerationCost",
|
|
42
|
+
"broadcast_generation_cost_allocation": "broadcastGenerationCostAllocation",
|
|
41
43
|
"broadcast_generation_identity": "broadcastGenerationIdentity",
|
|
42
44
|
"broadcast_generation_request_context": "broadcastGenerationRequestContext",
|
|
43
45
|
"created_at": "createdAt",
|
|
@@ -30,6 +30,10 @@ export type ObservabilitySnowflakeDestination = {
|
|
|
30
30
|
* When true, include cost and billing generation metadata.
|
|
31
31
|
*/
|
|
32
32
|
broadcastGenerationCost: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost.
|
|
35
|
+
*/
|
|
36
|
+
broadcastGenerationCostAllocation: boolean;
|
|
33
37
|
/**
|
|
34
38
|
* When true, include identity generation metadata.
|
|
35
39
|
*/
|
|
@@ -25,6 +25,7 @@ export function observabilitySnowflakeDestinationConfigFromJSON(jsonString) {
|
|
|
25
25
|
export const ObservabilitySnowflakeDestination$inboundSchema = z.object({
|
|
26
26
|
api_key_hashes: z.nullable(z.array(z.string())),
|
|
27
27
|
broadcast_generation_cost: z.boolean(),
|
|
28
|
+
broadcast_generation_cost_allocation: z.boolean(),
|
|
28
29
|
broadcast_generation_identity: z.boolean(),
|
|
29
30
|
broadcast_generation_request_context: z.boolean(),
|
|
30
31
|
config: z.lazy(() => ObservabilitySnowflakeDestinationConfig$inboundSchema),
|
|
@@ -43,6 +44,7 @@ export const ObservabilitySnowflakeDestination$inboundSchema = z.object({
|
|
|
43
44
|
return remap$(v, {
|
|
44
45
|
"api_key_hashes": "apiKeyHashes",
|
|
45
46
|
"broadcast_generation_cost": "broadcastGenerationCost",
|
|
47
|
+
"broadcast_generation_cost_allocation": "broadcastGenerationCostAllocation",
|
|
46
48
|
"broadcast_generation_identity": "broadcastGenerationIdentity",
|
|
47
49
|
"broadcast_generation_request_context": "broadcastGenerationRequestContext",
|
|
48
50
|
"created_at": "createdAt",
|
|
@@ -24,6 +24,10 @@ export type ObservabilityWeaveDestination = {
|
|
|
24
24
|
* When true, include cost and billing generation metadata.
|
|
25
25
|
*/
|
|
26
26
|
broadcastGenerationCost: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost.
|
|
29
|
+
*/
|
|
30
|
+
broadcastGenerationCostAllocation: boolean;
|
|
27
31
|
/**
|
|
28
32
|
* When true, include identity generation metadata.
|
|
29
33
|
*/
|
|
@@ -22,6 +22,7 @@ export function observabilityWeaveDestinationConfigFromJSON(jsonString) {
|
|
|
22
22
|
export const ObservabilityWeaveDestination$inboundSchema = z.object({
|
|
23
23
|
api_key_hashes: z.nullable(z.array(z.string())),
|
|
24
24
|
broadcast_generation_cost: z.boolean(),
|
|
25
|
+
broadcast_generation_cost_allocation: z.boolean(),
|
|
25
26
|
broadcast_generation_identity: z.boolean(),
|
|
26
27
|
broadcast_generation_request_context: z.boolean(),
|
|
27
28
|
config: z.lazy(() => ObservabilityWeaveDestinationConfig$inboundSchema),
|
|
@@ -40,6 +41,7 @@ export const ObservabilityWeaveDestination$inboundSchema = z.object({
|
|
|
40
41
|
return remap$(v, {
|
|
41
42
|
"api_key_hashes": "apiKeyHashes",
|
|
42
43
|
"broadcast_generation_cost": "broadcastGenerationCost",
|
|
44
|
+
"broadcast_generation_cost_allocation": "broadcastGenerationCostAllocation",
|
|
43
45
|
"broadcast_generation_identity": "broadcastGenerationIdentity",
|
|
44
46
|
"broadcast_generation_request_context": "broadcastGenerationRequestContext",
|
|
45
47
|
"created_at": "createdAt",
|
|
@@ -4,16 +4,16 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
5
|
import { ObservabilityDataRegion } from "./observabilitydataregion.js";
|
|
6
6
|
import { ObservabilityFilterRulesConfig } from "./observabilityfilterrulesconfig.js";
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const ObservabilityWebhookDestinationMethod: {
|
|
8
8
|
readonly Post: "POST";
|
|
9
9
|
readonly Put: "PUT";
|
|
10
10
|
};
|
|
11
|
-
export type
|
|
11
|
+
export type ObservabilityWebhookDestinationMethod = OpenEnum<typeof ObservabilityWebhookDestinationMethod>;
|
|
12
12
|
export type ObservabilityWebhookDestinationConfig = {
|
|
13
13
|
headers?: {
|
|
14
14
|
[k: string]: string;
|
|
15
15
|
} | undefined;
|
|
16
|
-
method:
|
|
16
|
+
method: ObservabilityWebhookDestinationMethod;
|
|
17
17
|
url: string;
|
|
18
18
|
};
|
|
19
19
|
export type ObservabilityWebhookDestination = {
|
|
@@ -25,6 +25,10 @@ export type ObservabilityWebhookDestination = {
|
|
|
25
25
|
* When true, include cost and billing generation metadata.
|
|
26
26
|
*/
|
|
27
27
|
broadcastGenerationCost: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost.
|
|
30
|
+
*/
|
|
31
|
+
broadcastGenerationCostAllocation: boolean;
|
|
28
32
|
/**
|
|
29
33
|
* When true, include identity generation metadata.
|
|
30
34
|
*/
|
|
@@ -77,7 +81,7 @@ export type ObservabilityWebhookDestination = {
|
|
|
77
81
|
workspaceId: string;
|
|
78
82
|
};
|
|
79
83
|
/** @internal */
|
|
80
|
-
export declare const
|
|
84
|
+
export declare const ObservabilityWebhookDestinationMethod$inboundSchema: z.ZodType<ObservabilityWebhookDestinationMethod, unknown>;
|
|
81
85
|
/** @internal */
|
|
82
86
|
export declare const ObservabilityWebhookDestinationConfig$inboundSchema: z.ZodType<ObservabilityWebhookDestinationConfig, unknown>;
|
|
83
87
|
export declare function observabilityWebhookDestinationConfigFromJSON(jsonString: string): SafeParseResult<ObservabilityWebhookDestinationConfig, SDKValidationError>;
|
|
@@ -8,17 +8,16 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
8
8
|
import * as openEnums from "../types/enums.js";
|
|
9
9
|
import { ObservabilityDataRegion$inboundSchema, } from "./observabilitydataregion.js";
|
|
10
10
|
import { ObservabilityFilterRulesConfig$inboundSchema, } from "./observabilityfilterrulesconfig.js";
|
|
11
|
-
export const
|
|
11
|
+
export const ObservabilityWebhookDestinationMethod = {
|
|
12
12
|
Post: "POST",
|
|
13
13
|
Put: "PUT",
|
|
14
14
|
};
|
|
15
15
|
/** @internal */
|
|
16
|
-
export const
|
|
17
|
-
.inboundSchema(Method);
|
|
16
|
+
export const ObservabilityWebhookDestinationMethod$inboundSchema = openEnums.inboundSchema(ObservabilityWebhookDestinationMethod);
|
|
18
17
|
/** @internal */
|
|
19
18
|
export const ObservabilityWebhookDestinationConfig$inboundSchema = z.object({
|
|
20
19
|
headers: z.record(z.string(), z.string()).optional(),
|
|
21
|
-
method:
|
|
20
|
+
method: ObservabilityWebhookDestinationMethod$inboundSchema.default("POST"),
|
|
22
21
|
url: z.string(),
|
|
23
22
|
});
|
|
24
23
|
export function observabilityWebhookDestinationConfigFromJSON(jsonString) {
|
|
@@ -28,6 +27,7 @@ export function observabilityWebhookDestinationConfigFromJSON(jsonString) {
|
|
|
28
27
|
export const ObservabilityWebhookDestination$inboundSchema = z.object({
|
|
29
28
|
api_key_hashes: z.nullable(z.array(z.string())),
|
|
30
29
|
broadcast_generation_cost: z.boolean(),
|
|
30
|
+
broadcast_generation_cost_allocation: z.boolean(),
|
|
31
31
|
broadcast_generation_identity: z.boolean(),
|
|
32
32
|
broadcast_generation_request_context: z.boolean(),
|
|
33
33
|
config: z.lazy(() => ObservabilityWebhookDestinationConfig$inboundSchema),
|
|
@@ -46,6 +46,7 @@ export const ObservabilityWebhookDestination$inboundSchema = z.object({
|
|
|
46
46
|
return remap$(v, {
|
|
47
47
|
"api_key_hashes": "apiKeyHashes",
|
|
48
48
|
"broadcast_generation_cost": "broadcastGenerationCost",
|
|
49
|
+
"broadcast_generation_cost_allocation": "broadcastGenerationCostAllocation",
|
|
49
50
|
"broadcast_generation_identity": "broadcastGenerationIdentity",
|
|
50
51
|
"broadcast_generation_request_context": "broadcastGenerationRequestContext",
|
|
51
52
|
"created_at": "createdAt",
|
|
@@ -26,6 +26,7 @@ export declare const CodeEnum: {
|
|
|
26
26
|
readonly CyberPolicy: "cyber_policy";
|
|
27
27
|
readonly MisalignmentPolicyViolation: "misalignment_policy_violation";
|
|
28
28
|
readonly DataResidencyMismatch: "data_residency_mismatch";
|
|
29
|
+
readonly PermissionDenied: "permission_denied";
|
|
29
30
|
};
|
|
30
31
|
export type CodeEnum = OpenEnum<typeof CodeEnum>;
|
|
31
32
|
/**
|
|
@@ -29,6 +29,7 @@ export const CodeEnum = {
|
|
|
29
29
|
CyberPolicy: "cyber_policy",
|
|
30
30
|
MisalignmentPolicyViolation: "misalignment_policy_violation",
|
|
31
31
|
DataResidencyMismatch: "data_residency_mismatch",
|
|
32
|
+
PermissionDenied: "permission_denied",
|
|
32
33
|
};
|
|
33
34
|
/** @internal */
|
|
34
35
|
export const CodeEnum$inboundSchema = openEnums
|
|
@@ -8,7 +8,7 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
|
8
8
|
*/
|
|
9
9
|
export type OpenResponsesErrorMetadataAlignment = {
|
|
10
10
|
/**
|
|
11
|
-
* One record per evaluated assistant message of the request, in the order the messages were produced.
|
|
11
|
+
* One record per evaluated assistant message of the request, in the order the messages were produced. Empty when no message of the request had content to evaluate.
|
|
12
12
|
*/
|
|
13
13
|
calls: Array<AlignmentCallRecord>;
|
|
14
14
|
rejected?: AlignmentRejected | undefined;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
|
|
3
|
-
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
4
4
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
5
5
|
import { Alignment } from "./alignment.js";
|
|
6
6
|
import { ApiErrorType } from "./apierrortype.js";
|
|
7
7
|
import { ApplyPatchServerTool } from "./applypatchservertool.js";
|
|
8
|
+
import { ArmorSafeguardResult } from "./armorsafeguardresult.js";
|
|
8
9
|
import { BaseInputsUnion } from "./baseinputsunion.js";
|
|
9
10
|
import { BaseReasoningConfig } from "./basereasoningconfig.js";
|
|
10
11
|
import { CodeInterpreterServerTool } from "./codeinterpreterservertool.js";
|
|
@@ -36,6 +37,11 @@ export declare const OpenResponsesResultObject: {
|
|
|
36
37
|
readonly Response: "response";
|
|
37
38
|
};
|
|
38
39
|
export type OpenResponsesResultObject = ClosedEnum<typeof OpenResponsesResultObject>;
|
|
40
|
+
export declare const OpenResponsesResultAllowedCaller: {
|
|
41
|
+
readonly Direct: "direct";
|
|
42
|
+
readonly Programmatic: "programmatic";
|
|
43
|
+
};
|
|
44
|
+
export type OpenResponsesResultAllowedCaller = OpenEnum<typeof OpenResponsesResultAllowedCaller>;
|
|
39
45
|
/**
|
|
40
46
|
* Function tool definition
|
|
41
47
|
*/
|
|
@@ -47,14 +53,18 @@ export type OpenResponsesResultToolFunction = {
|
|
|
47
53
|
} | null;
|
|
48
54
|
strict?: boolean | null | undefined;
|
|
49
55
|
type: "function";
|
|
56
|
+
allowedCallers?: Array<OpenResponsesResultAllowedCaller> | null | undefined;
|
|
50
57
|
/**
|
|
51
58
|
* Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere.
|
|
52
59
|
*/
|
|
53
60
|
async?: boolean | undefined;
|
|
54
61
|
/**
|
|
55
|
-
* Withhold this tool from the model until `openrouter:tool_search` finds it.
|
|
62
|
+
* Withhold this tool from the model until `openrouter:tool_search` finds it. Where the request declares no search tool, OpenRouter may add `openrouter:tool_search` to serve the flag, and otherwise sends the tool in full. A request that declares the search tool itself must keep at least one tool non-deferred.
|
|
56
63
|
*/
|
|
57
64
|
deferLoading?: boolean | undefined;
|
|
65
|
+
outputSchema?: {
|
|
66
|
+
[k: string]: any;
|
|
67
|
+
} | null | undefined;
|
|
58
68
|
};
|
|
59
69
|
export type OpenResponsesResultToolUnion = OpenResponsesResultToolFunction | (PreviewWebSearchServerTool & {
|
|
60
70
|
type: "web_search_preview";
|
|
@@ -154,7 +164,7 @@ export type OpenResponsesResult = {
|
|
|
154
164
|
prompt?: StoredPromptTemplate | null | undefined;
|
|
155
165
|
promptCacheKey?: string | null | undefined;
|
|
156
166
|
/**
|
|
157
|
-
* Request-level prompt-cache controls. `mode: "explicit"` disables OpenAI-managed breakpoints so only blocks marked with `prompt_cache_breakpoint` are cached. Only supported by OpenAI GPT-5.6 and newer.
|
|
167
|
+
* Request-level prompt-cache controls. `mode: "explicit"` disables OpenAI-managed breakpoints so only blocks marked with `prompt_cache_breakpoint` are cached. `ttl` sets the minimum cache lifetime for every breakpoint the request writes: "30m" (default) or "12h" (billed at the higher 12h cache-write rate). Only supported by OpenAI GPT-5.6 and newer.
|
|
158
168
|
*/
|
|
159
169
|
promptCacheOptions?: PromptCacheOptions | null | undefined;
|
|
160
170
|
reasoning?: BaseReasoningConfig | null | undefined;
|
|
@@ -214,10 +224,16 @@ export type OpenResponsesResult = {
|
|
|
214
224
|
*/
|
|
215
225
|
errorType?: ApiErrorType | undefined;
|
|
216
226
|
openrouterMetadata?: OpenRouterMetadata | undefined;
|
|
227
|
+
/**
|
|
228
|
+
* OpenRouter Armor's verdict for each client tool call of this response, present whenever Armor evaluated the response (even when nothing was flagged). Independent of the `openrouter_metadata` opt-in.
|
|
229
|
+
*/
|
|
230
|
+
safeguardResults?: Array<ArmorSafeguardResult> | undefined;
|
|
217
231
|
};
|
|
218
232
|
/** @internal */
|
|
219
233
|
export declare const OpenResponsesResultObject$inboundSchema: z.ZodEnum<typeof OpenResponsesResultObject>;
|
|
220
234
|
/** @internal */
|
|
235
|
+
export declare const OpenResponsesResultAllowedCaller$inboundSchema: z.ZodType<OpenResponsesResultAllowedCaller, unknown>;
|
|
236
|
+
/** @internal */
|
|
221
237
|
export declare const OpenResponsesResultToolFunction$inboundSchema: z.ZodType<OpenResponsesResultToolFunction, unknown>;
|
|
222
238
|
export declare function openResponsesResultToolFunctionFromJSON(jsonString: string): SafeParseResult<OpenResponsesResultToolFunction, SDKValidationError>;
|
|
223
239
|
/** @internal */
|
|
@@ -6,9 +6,11 @@ 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 { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
9
|
+
import * as openEnums from "../types/enums.js";
|
|
9
10
|
import { Alignment$inboundSchema } from "./alignment.js";
|
|
10
11
|
import { ApiErrorType$inboundSchema } from "./apierrortype.js";
|
|
11
12
|
import { ApplyPatchServerTool$inboundSchema, } from "./applypatchservertool.js";
|
|
13
|
+
import { ArmorSafeguardResult$inboundSchema, } from "./armorsafeguardresult.js";
|
|
12
14
|
import { BaseInputsUnion$inboundSchema, } from "./baseinputsunion.js";
|
|
13
15
|
import { BaseReasoningConfig$inboundSchema, } from "./basereasoningconfig.js";
|
|
14
16
|
import { CodeInterpreterServerTool$inboundSchema, } from "./codeinterpreterservertool.js";
|
|
@@ -38,20 +40,30 @@ import { WebSearchServerTool$inboundSchema, } from "./websearchservertool.js";
|
|
|
38
40
|
export const OpenResponsesResultObject = {
|
|
39
41
|
Response: "response",
|
|
40
42
|
};
|
|
43
|
+
export const OpenResponsesResultAllowedCaller = {
|
|
44
|
+
Direct: "direct",
|
|
45
|
+
Programmatic: "programmatic",
|
|
46
|
+
};
|
|
41
47
|
/** @internal */
|
|
42
48
|
export const OpenResponsesResultObject$inboundSchema = z.enum(OpenResponsesResultObject);
|
|
43
49
|
/** @internal */
|
|
50
|
+
export const OpenResponsesResultAllowedCaller$inboundSchema = openEnums.inboundSchema(OpenResponsesResultAllowedCaller);
|
|
51
|
+
/** @internal */
|
|
44
52
|
export const OpenResponsesResultToolFunction$inboundSchema = z.object({
|
|
45
53
|
description: z.nullable(z.string()).optional(),
|
|
46
54
|
name: z.string(),
|
|
47
55
|
parameters: z.nullable(z.record(z.string(), z.any())),
|
|
48
56
|
strict: z.nullable(z.boolean()).optional(),
|
|
49
57
|
type: z.literal("function"),
|
|
58
|
+
allowed_callers: z.nullable(z.array(OpenResponsesResultAllowedCaller$inboundSchema)).optional(),
|
|
50
59
|
async: z.boolean().optional(),
|
|
51
60
|
defer_loading: z.boolean().optional(),
|
|
61
|
+
output_schema: z.nullable(z.record(z.string(), z.any())).optional(),
|
|
52
62
|
}).transform((v) => {
|
|
53
63
|
return remap$(v, {
|
|
64
|
+
"allowed_callers": "allowedCallers",
|
|
54
65
|
"defer_loading": "deferLoading",
|
|
66
|
+
"output_schema": "outputSchema",
|
|
55
67
|
});
|
|
56
68
|
});
|
|
57
69
|
export function openResponsesResultToolFunctionFromJSON(jsonString) {
|
|
@@ -202,6 +214,7 @@ export const OpenResponsesResult$inboundSchema = z.object({
|
|
|
202
214
|
alignment: Alignment$inboundSchema.optional(),
|
|
203
215
|
error_type: ApiErrorType$inboundSchema.optional(),
|
|
204
216
|
openrouter_metadata: OpenRouterMetadata$inboundSchema.optional(),
|
|
217
|
+
safeguard_results: z.array(ArmorSafeguardResult$inboundSchema).optional(),
|
|
205
218
|
}).transform((v) => {
|
|
206
219
|
return remap$(v, {
|
|
207
220
|
"completed_at": "completedAt",
|
|
@@ -223,6 +236,7 @@ export const OpenResponsesResult$inboundSchema = z.object({
|
|
|
223
236
|
"top_p": "topP",
|
|
224
237
|
"error_type": "errorType",
|
|
225
238
|
"openrouter_metadata": "openrouterMetadata",
|
|
239
|
+
"safeguard_results": "safeguardResults",
|
|
226
240
|
});
|
|
227
241
|
});
|
|
228
242
|
export function openResponsesResultFromJSON(jsonString) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import * as models from "../index.js";
|
|
3
|
-
export type
|
|
3
|
+
export type CreateExternalUserGlobals = {
|
|
4
4
|
/**
|
|
5
5
|
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
6
6
|
*
|
|
@@ -21,7 +21,7 @@ export type CreateEndUserGlobals = {
|
|
|
21
21
|
*/
|
|
22
22
|
appCategories?: string | undefined;
|
|
23
23
|
};
|
|
24
|
-
export type
|
|
24
|
+
export type CreateExternalUserRequest = {
|
|
25
25
|
/**
|
|
26
26
|
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
27
27
|
*
|
|
@@ -41,16 +41,16 @@ export type CreateEndUserRequest = {
|
|
|
41
41
|
* @remarks
|
|
42
42
|
*/
|
|
43
43
|
appCategories?: string | undefined;
|
|
44
|
-
|
|
44
|
+
createExternalUserRequest: models.CreateExternalUserRequest;
|
|
45
45
|
};
|
|
46
46
|
/** @internal */
|
|
47
|
-
export type
|
|
47
|
+
export type CreateExternalUserRequest$Outbound = {
|
|
48
48
|
"HTTP-Referer"?: string | undefined;
|
|
49
49
|
appTitle?: string | undefined;
|
|
50
50
|
appCategories?: string | undefined;
|
|
51
|
-
|
|
51
|
+
CreateExternalUserRequest: models.CreateExternalUserRequest$Outbound;
|
|
52
52
|
};
|
|
53
53
|
/** @internal */
|
|
54
|
-
export declare const
|
|
55
|
-
export declare function
|
|
56
|
-
//# sourceMappingURL=
|
|
54
|
+
export declare const CreateExternalUserRequest$outboundSchema: z.ZodType<CreateExternalUserRequest$Outbound, CreateExternalUserRequest>;
|
|
55
|
+
export declare function createExternalUserRequestToJSON(createExternalUserRequest: CreateExternalUserRequest): string;
|
|
56
|
+
//# sourceMappingURL=createexternaluser.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 33325d78a120
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { CreateExternalUserRequest$outboundSchema as models_CreateExternalUserRequest$outboundSchema } from "../createexternaluserrequest.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const CreateExternalUserRequest$outboundSchema = z.object({
|
|
10
|
+
httpReferer: z.string().optional(),
|
|
11
|
+
appTitle: z.string().optional(),
|
|
12
|
+
appCategories: z.string().optional(),
|
|
13
|
+
createExternalUserRequest: models_CreateExternalUserRequest$outboundSchema,
|
|
14
|
+
}).transform((v) => {
|
|
15
|
+
return remap$(v, {
|
|
16
|
+
httpReferer: "HTTP-Referer",
|
|
17
|
+
createExternalUserRequest: "CreateExternalUserRequest",
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
export function createExternalUserRequestToJSON(createExternalUserRequest) {
|
|
21
|
+
return JSON.stringify(CreateExternalUserRequest$outboundSchema.parse(createExternalUserRequest));
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=createexternaluser.js.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type DeleteExternalUserGlobals = {
|
|
3
|
+
/**
|
|
4
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* This is used to track API usage per application.
|
|
8
|
+
*/
|
|
9
|
+
httpReferer?: string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
*/
|
|
15
|
+
appTitle?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
*/
|
|
21
|
+
appCategories?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
export type DeleteExternalUserRequest = {
|
|
24
|
+
/**
|
|
25
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* This is used to track API usage per application.
|
|
29
|
+
*/
|
|
30
|
+
httpReferer?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
*/
|
|
36
|
+
appTitle?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
*/
|
|
42
|
+
appCategories?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Immutable case-sensitive tracking string supplied as user on inference requests or as external.user on API keys: 1 to 512 characters, well-formed Unicode, no NUL, no surrounding whitespace. URL-encode it in resource paths; an ID of `.` or `..` cannot be addressed by path, so look it up with the list filter.
|
|
45
|
+
*/
|
|
46
|
+
user: string;
|
|
47
|
+
};
|
|
48
|
+
/** @internal */
|
|
49
|
+
export type DeleteExternalUserRequest$Outbound = {
|
|
50
|
+
"HTTP-Referer"?: string | undefined;
|
|
51
|
+
appTitle?: string | undefined;
|
|
52
|
+
appCategories?: string | undefined;
|
|
53
|
+
user: string;
|
|
54
|
+
};
|
|
55
|
+
/** @internal */
|
|
56
|
+
export declare const DeleteExternalUserRequest$outboundSchema: z.ZodType<DeleteExternalUserRequest$Outbound, DeleteExternalUserRequest>;
|
|
57
|
+
export declare function deleteExternalUserRequestToJSON(deleteExternalUserRequest: DeleteExternalUserRequest): string;
|
|
58
|
+
//# sourceMappingURL=deleteexternaluser.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
* @generated-id:
|
|
3
|
+
* @generated-id: a152c674057b
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
/** @internal */
|
|
8
|
-
export const
|
|
8
|
+
export const DeleteExternalUserRequest$outboundSchema = z.object({
|
|
9
9
|
httpReferer: z.string().optional(),
|
|
10
10
|
appTitle: z.string().optional(),
|
|
11
11
|
appCategories: z.string().optional(),
|
|
@@ -15,7 +15,7 @@ export const DeleteEndUserRequest$outboundSchema = z.object({
|
|
|
15
15
|
httpReferer: "HTTP-Referer",
|
|
16
16
|
});
|
|
17
17
|
});
|
|
18
|
-
export function
|
|
19
|
-
return JSON.stringify(
|
|
18
|
+
export function deleteExternalUserRequestToJSON(deleteExternalUserRequest) {
|
|
19
|
+
return JSON.stringify(DeleteExternalUserRequest$outboundSchema.parse(deleteExternalUserRequest));
|
|
20
20
|
}
|
|
21
|
-
//# sourceMappingURL=
|
|
21
|
+
//# sourceMappingURL=deleteexternaluser.js.map
|
|
@@ -78,6 +78,10 @@ export type GetCurrentKeyData = {
|
|
|
78
78
|
* Data regions permitted for this API key by the guardrail policies on the key and the account regional-routing entitlement. Empty when no region is permitted. Reflects region policy only: other key restrictions, such as management keys being blocked from inference, still apply.
|
|
79
79
|
*/
|
|
80
80
|
allowedDataRegions: Array<AllowedDataRegion>;
|
|
81
|
+
/**
|
|
82
|
+
* Every budget layer enforcement checks for requests made with this key, in the order it checks them: guardrail budgets, workspace budgets, then the key's own limit. Empty when nothing is budgeted. `effective_budget` is the budget that blocks requests first: the entry enforcement rejects on when one is already spent, otherwise the entry with the least `remaining_usd`; null when nothing is budgeted. `limit` and `limit_remaining` above describe only the key's own limit.
|
|
83
|
+
*/
|
|
84
|
+
budgets: Array<models.KeyBudget>;
|
|
81
85
|
/**
|
|
82
86
|
* Total external BYOK usage (in USD) for the API key
|
|
83
87
|
*/
|
|
@@ -98,6 +102,7 @@ export type GetCurrentKeyData = {
|
|
|
98
102
|
* The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
|
|
99
103
|
*/
|
|
100
104
|
creatorUserId: string | null;
|
|
105
|
+
effectiveBudget: models.KeyBudget | null;
|
|
101
106
|
/**
|
|
102
107
|
* ISO 8601 UTC timestamp when the API key expires, or null if no expiration
|
|
103
108
|
*/
|
|
@@ -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 * as openEnums from "../../types/enums.js";
|
|
9
|
-
import { FreeModelDailyRequests$inboundSchema as models_FreeModelDailyRequests$inboundSchema } from "../freemodeldailyrequests.js";
|
|
9
|
+
import { FreeModelDailyRequests$inboundSchema as models_FreeModelDailyRequests$inboundSchema } from "../freemodeldailyrequests.js"; import { KeyBudget$inboundSchema as models_KeyBudget$inboundSchema } from "../keybudget.js";
|
|
10
10
|
export const AllowedDataRegion = {
|
|
11
11
|
Global: "global",
|
|
12
12
|
Europe: "europe",
|
|
@@ -39,11 +39,13 @@ export function rateLimitFromJSON(jsonString) {
|
|
|
39
39
|
/** @internal */
|
|
40
40
|
export const GetCurrentKeyData$inboundSchema = z.object({
|
|
41
41
|
allowed_data_regions: z.array(AllowedDataRegion$inboundSchema),
|
|
42
|
+
budgets: z.array(models_KeyBudget$inboundSchema),
|
|
42
43
|
byok_usage: z.number(),
|
|
43
44
|
byok_usage_daily: z.number(),
|
|
44
45
|
byok_usage_monthly: z.number(),
|
|
45
46
|
byok_usage_weekly: z.number(),
|
|
46
47
|
creator_user_id: z.nullable(z.string()),
|
|
48
|
+
effective_budget: z.nullable(models_KeyBudget$inboundSchema),
|
|
47
49
|
expires_at: z.nullable(z.iso.datetime({ offset: true }).transform(v => new Date(v))).optional(),
|
|
48
50
|
free_model_daily_requests: models_FreeModelDailyRequests$inboundSchema,
|
|
49
51
|
include_byok_in_limit: z.boolean(),
|
|
@@ -69,6 +71,7 @@ export const GetCurrentKeyData$inboundSchema = z.object({
|
|
|
69
71
|
"byok_usage_monthly": "byokUsageMonthly",
|
|
70
72
|
"byok_usage_weekly": "byokUsageWeekly",
|
|
71
73
|
"creator_user_id": "creatorUserId",
|
|
74
|
+
"effective_budget": "effectiveBudget",
|
|
72
75
|
"expires_at": "expiresAt",
|
|
73
76
|
"free_model_daily_requests": "freeModelDailyRequests",
|
|
74
77
|
"include_byok_in_limit": "includeByokInLimit",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
-
|
|
3
|
-
export type UpdateEndUserGlobals = {
|
|
2
|
+
export type GetExternalUserGlobals = {
|
|
4
3
|
/**
|
|
5
4
|
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
6
5
|
*
|
|
@@ -21,7 +20,7 @@ export type UpdateEndUserGlobals = {
|
|
|
21
20
|
*/
|
|
22
21
|
appCategories?: string | undefined;
|
|
23
22
|
};
|
|
24
|
-
export type
|
|
23
|
+
export type GetExternalUserRequest = {
|
|
25
24
|
/**
|
|
26
25
|
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
27
26
|
*
|
|
@@ -42,20 +41,18 @@ export type UpdateEndUserRequest = {
|
|
|
42
41
|
*/
|
|
43
42
|
appCategories?: string | undefined;
|
|
44
43
|
/**
|
|
45
|
-
* Immutable case-sensitive tracking string supplied as user on inference requests. URL-encode it in resource paths.
|
|
44
|
+
* Immutable case-sensitive tracking string supplied as user on inference requests or as external.user on API keys: 1 to 512 characters, well-formed Unicode, no NUL, no surrounding whitespace. URL-encode it in resource paths; an ID of `.` or `..` cannot be addressed by path, so look it up with the list filter.
|
|
46
45
|
*/
|
|
47
46
|
user: string;
|
|
48
|
-
updateEndUserRequest: models.UpdateEndUserRequest;
|
|
49
47
|
};
|
|
50
48
|
/** @internal */
|
|
51
|
-
export type
|
|
49
|
+
export type GetExternalUserRequest$Outbound = {
|
|
52
50
|
"HTTP-Referer"?: string | undefined;
|
|
53
51
|
appTitle?: string | undefined;
|
|
54
52
|
appCategories?: string | undefined;
|
|
55
53
|
user: string;
|
|
56
|
-
UpdateEndUserRequest: models.UpdateEndUserRequest$Outbound;
|
|
57
54
|
};
|
|
58
55
|
/** @internal */
|
|
59
|
-
export declare const
|
|
60
|
-
export declare function
|
|
61
|
-
//# sourceMappingURL=
|
|
56
|
+
export declare const GetExternalUserRequest$outboundSchema: z.ZodType<GetExternalUserRequest$Outbound, GetExternalUserRequest>;
|
|
57
|
+
export declare function getExternalUserRequestToJSON(getExternalUserRequest: GetExternalUserRequest): string;
|
|
58
|
+
//# sourceMappingURL=getexternaluser.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
* @generated-id:
|
|
3
|
+
* @generated-id: 47129d1d67c4
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
/** @internal */
|
|
8
|
-
export const
|
|
8
|
+
export const GetExternalUserRequest$outboundSchema = z.object({
|
|
9
9
|
httpReferer: z.string().optional(),
|
|
10
10
|
appTitle: z.string().optional(),
|
|
11
11
|
appCategories: z.string().optional(),
|
|
@@ -15,7 +15,7 @@ export const GetEndUserRequest$outboundSchema = z.object({
|
|
|
15
15
|
httpReferer: "HTTP-Referer",
|
|
16
16
|
});
|
|
17
17
|
});
|
|
18
|
-
export function
|
|
19
|
-
return JSON.stringify(
|
|
18
|
+
export function getExternalUserRequestToJSON(getExternalUserRequest) {
|
|
19
|
+
return JSON.stringify(GetExternalUserRequest$outboundSchema.parse(getExternalUserRequest));
|
|
20
20
|
}
|
|
21
|
-
//# sourceMappingURL=
|
|
21
|
+
//# sourceMappingURL=getexternaluser.js.map
|