@openrouter/sdk 0.13.58 → 0.13.60
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/betaResponsesSend.d.ts +2 -4
- package/esm/funcs/byokList.js +1 -2
- package/esm/funcs/chatSend.d.ts +2 -4
- package/esm/funcs/datasetsGetAppRankings.js +1 -2
- package/esm/funcs/embeddingsListModels.js +1 -2
- package/esm/funcs/filesList.js +2 -3
- package/esm/funcs/guardrailsList.js +1 -2
- package/esm/funcs/guardrailsListGuardrailKeyAssignments.js +1 -2
- package/esm/funcs/guardrailsListGuardrailMemberAssignments.js +1 -2
- package/esm/funcs/guardrailsListKeyAssignments.js +1 -2
- package/esm/funcs/guardrailsListMemberAssignments.js +1 -2
- package/esm/funcs/imagesGenerate.d.ts +2 -4
- package/esm/funcs/modelsList.js +1 -2
- package/esm/funcs/modelsListForUser.js +1 -2
- package/esm/funcs/observabilityList.js +1 -2
- package/esm/funcs/organizationListMembers.js +1 -2
- package/esm/funcs/presetsList.js +1 -2
- package/esm/funcs/presetsListVersions.js +1 -2
- package/esm/funcs/workspacesList.js +1 -2
- package/esm/funcs/workspacesListMembers.js +1 -2
- package/esm/hooks/types.d.ts +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/encodings.js +1 -1
- package/esm/lib/env.js +3 -3
- package/esm/lib/event-streams.d.ts +7 -2
- package/esm/lib/event-streams.js +30 -14
- package/esm/lib/matchers.js +1 -1
- package/esm/lib/primitives.d.ts +1 -0
- package/esm/lib/primitives.js +17 -0
- package/esm/lib/retries.js +7 -0
- package/esm/lib/sdks.js +50 -16
- package/esm/models/additionaltoolsitem.d.ts +7 -7
- package/esm/models/additionaltoolsitem.js +5 -5
- package/esm/models/advisornestedtool.d.ts +3 -3
- package/esm/models/advisornestedtool.js +2 -2
- package/esm/models/agentmessageitem.d.ts +3 -3
- package/esm/models/agentmessageitem.js +3 -3
- package/esm/models/badgatewayresponseerrordata.d.ts +1 -1
- package/esm/models/badgatewayresponseerrordata.js +1 -1
- package/esm/models/badrequestresponseerrordata.d.ts +1 -1
- package/esm/models/badrequestresponseerrordata.js +1 -1
- package/esm/models/baseinputsunion.d.ts +3 -3
- package/esm/models/baseinputsunion.js +0 -3
- package/esm/models/byokproviderslug.d.ts +1 -0
- package/esm/models/byokproviderslug.js +1 -0
- package/esm/models/chatassistantmessage.d.ts +4 -4
- package/esm/models/chatassistantmessage.js +4 -4
- package/esm/models/chatfunctiontool.d.ts +2 -2
- package/esm/models/chatfunctiontool.js +1 -1
- package/esm/models/chatjsonschemaconfig.d.ts +2 -2
- package/esm/models/chatjsonschemaconfig.js +1 -1
- package/esm/models/chatrequest.d.ts +4 -4
- package/esm/models/chatrequest.js +1 -3
- package/esm/models/chatstreamingresponse.js +3 -1
- package/esm/models/compactionitem.d.ts +1 -1
- package/esm/models/compactionitem.js +1 -1
- package/esm/models/compoundfilter.d.ts +2 -2
- package/esm/models/compoundfilter.js +2 -2
- package/esm/models/conflictresponseerrordata.d.ts +1 -1
- package/esm/models/conflictresponseerrordata.js +1 -1
- package/esm/models/contextcompactionitem.d.ts +1 -1
- package/esm/models/contextcompactionitem.js +1 -1
- package/esm/models/createobservabilitydestinationrequest.d.ts +2 -2
- package/esm/models/createobservabilitydestinationrequest.js +1 -1
- package/esm/models/debugevent.d.ts +1 -1
- package/esm/models/debugevent.js +1 -1
- package/esm/models/easyinputmessage.d.ts +8 -8
- package/esm/models/easyinputmessage.js +0 -4
- package/esm/models/edgenetworktimeoutresponseerrordata.d.ts +1 -1
- package/esm/models/edgenetworktimeoutresponseerrordata.js +1 -1
- package/esm/models/errors/badgatewayresponseerror.d.ts +2 -2
- package/esm/models/errors/badgatewayresponseerror.js +1 -2
- package/esm/models/errors/badrequestresponseerror.d.ts +2 -2
- package/esm/models/errors/badrequestresponseerror.js +1 -2
- package/esm/models/errors/conflictresponseerror.d.ts +2 -2
- package/esm/models/errors/conflictresponseerror.js +1 -2
- package/esm/models/errors/edgenetworktimeoutresponseerror.d.ts +2 -2
- package/esm/models/errors/edgenetworktimeoutresponseerror.js +1 -2
- package/esm/models/errors/forbiddenresponseerror.d.ts +2 -2
- package/esm/models/errors/forbiddenresponseerror.js +1 -2
- package/esm/models/errors/internalserverresponseerror.d.ts +2 -2
- package/esm/models/errors/internalserverresponseerror.js +1 -2
- package/esm/models/errors/notfoundresponseerror.d.ts +2 -2
- package/esm/models/errors/notfoundresponseerror.js +1 -2
- package/esm/models/errors/payloadtoolargeresponseerror.d.ts +2 -2
- package/esm/models/errors/payloadtoolargeresponseerror.js +1 -2
- package/esm/models/errors/paymentrequiredresponseerror.d.ts +2 -2
- package/esm/models/errors/paymentrequiredresponseerror.js +1 -2
- package/esm/models/errors/provideroverloadedresponseerror.d.ts +2 -2
- package/esm/models/errors/provideroverloadedresponseerror.js +1 -2
- package/esm/models/errors/requesttimeoutresponseerror.d.ts +2 -2
- package/esm/models/errors/requesttimeoutresponseerror.js +1 -2
- package/esm/models/errors/serviceunavailableresponseerror.d.ts +2 -2
- package/esm/models/errors/serviceunavailableresponseerror.js +1 -2
- package/esm/models/errors/toomanyrequestsresponseerror.d.ts +2 -2
- package/esm/models/errors/toomanyrequestsresponseerror.js +1 -2
- package/esm/models/errors/unauthorizedresponseerror.d.ts +2 -2
- package/esm/models/errors/unauthorizedresponseerror.js +1 -2
- package/esm/models/errors/unprocessableentityresponseerror.d.ts +2 -2
- package/esm/models/errors/unprocessableentityresponseerror.js +1 -2
- package/esm/models/filesearchservertool.d.ts +4 -4
- package/esm/models/filesearchservertool.js +1 -8
- package/esm/models/forbiddenresponseerrordata.d.ts +1 -1
- package/esm/models/forbiddenresponseerrordata.js +1 -1
- package/esm/models/formatjsonschemaconfig.d.ts +2 -2
- package/esm/models/formatjsonschemaconfig.js +2 -2
- package/esm/models/functioncalloutputitem.d.ts +2 -9
- package/esm/models/functioncalloutputitem.js +2 -8
- package/esm/models/fusionplugin.d.ts +28 -2
- package/esm/models/fusionplugin.js +28 -1
- package/esm/models/fusionservertoolconfig.d.ts +2 -2
- package/esm/models/fusionservertoolconfig.js +1 -1
- package/esm/models/generationcontentdata.d.ts +1 -1
- package/esm/models/generationcontentdata.js +1 -1
- package/esm/models/imageconfig.d.ts +2 -2
- package/esm/models/imageconfig.js +1 -1
- package/esm/models/imagegenerationproviderpreferences.d.ts +256 -250
- package/esm/models/imagegenerationproviderpreferences.js +126 -133
- package/esm/models/imagegenerationservertoolconfigunion.d.ts +2 -2
- package/esm/models/imagegenerationservertoolconfigunion.js +1 -1
- package/esm/models/imagestreamingresponse.js +3 -1
- package/esm/models/index.d.ts +0 -2
- package/esm/models/index.js +0 -2
- package/esm/models/inputsunion.d.ts +8 -8
- package/esm/models/inputsunion.js +0 -4
- package/esm/models/internalserverresponseerrordata.d.ts +1 -1
- package/esm/models/internalserverresponseerrordata.js +1 -1
- package/esm/models/listendpointsresponse.d.ts +2 -33
- package/esm/models/listendpointsresponse.js +2 -30
- package/esm/models/localshellcalloutputitem.d.ts +3 -10
- package/esm/models/localshellcalloutputitem.js +2 -9
- package/esm/models/mcplisttoolsitem.d.ts +4 -4
- package/esm/models/mcplisttoolsitem.js +2 -2
- package/esm/models/mcpservertool.d.ts +8 -8
- package/esm/models/mcpservertool.js +4 -24
- package/esm/models/messagesadvisortoolresultblock.d.ts +2 -2
- package/esm/models/messagesadvisortoolresultblock.js +1 -1
- package/esm/models/messagesfallbackparam.d.ts +1 -1
- package/esm/models/messagesfallbackparam.js +1 -1
- package/esm/models/messagesmessageparam.d.ts +4 -4
- package/esm/models/messagesmessageparam.js +2 -2
- package/esm/models/messagesoutputconfig.d.ts +2 -2
- package/esm/models/messagesoutputconfig.js +1 -1
- package/esm/models/messagesrequest.d.ts +10 -32
- package/esm/models/messagesrequest.js +7 -21
- package/esm/models/namespacefunctiontool.d.ts +4 -4
- package/esm/models/namespacefunctiontool.js +4 -6
- package/esm/models/notfoundresponseerrordata.d.ts +1 -1
- package/esm/models/notfoundresponseerrordata.js +1 -1
- package/esm/models/openairesponsefunctiontoolcalloutput.d.ts +3 -10
- package/esm/models/openairesponsefunctiontoolcalloutput.js +2 -11
- package/esm/models/openresponsesresult.d.ts +46 -2
- package/esm/models/openresponsesresult.js +69 -3
- package/esm/models/operations/listbyokkeys.d.ts +1 -0
- package/esm/models/operations/listbyokkeys.js +1 -0
- package/esm/models/outputcomputercallitem.d.ts +2 -2
- package/esm/models/outputcomputercallitem.js +2 -2
- package/esm/models/outputmemoryservertoolitem.d.ts +2 -2
- package/esm/models/outputmemoryservertoolitem.js +2 -2
- package/esm/models/outputmessage.d.ts +2 -2
- package/esm/models/outputmessage.js +0 -2
- package/esm/models/outputmessageitem.d.ts +2 -2
- package/esm/models/outputmessageitem.js +0 -2
- package/esm/models/payloadtoolargeresponseerrordata.d.ts +1 -1
- package/esm/models/payloadtoolargeresponseerrordata.js +1 -1
- package/esm/models/paymentrequiredresponseerrordata.d.ts +1 -1
- package/esm/models/paymentrequiredresponseerrordata.js +1 -1
- package/esm/models/pipelinestage.d.ts +1 -1
- package/esm/models/pipelinestage.js +1 -1
- package/esm/models/preferredmaxlatency.d.ts +2 -2
- package/esm/models/preferredmaxlatency.js +1 -1
- package/esm/models/preferredminthroughput.d.ts +2 -2
- package/esm/models/preferredminthroughput.js +1 -1
- package/esm/models/presetdesignatedversion.d.ts +1 -1
- package/esm/models/presetdesignatedversion.js +1 -1
- package/esm/models/providername.d.ts +2 -1
- package/esm/models/providername.js +2 -1
- package/esm/models/provideroptions.d.ts +252 -246
- package/esm/models/provideroptions.js +124 -123
- package/esm/models/provideroverloadedresponseerrordata.d.ts +1 -1
- package/esm/models/provideroverloadedresponseerrordata.js +1 -1
- package/esm/models/providerpreferences.d.ts +4 -4
- package/esm/models/providerpreferences.js +2 -10
- package/esm/models/providerresponse.d.ts +2 -1
- package/esm/models/providerresponse.js +2 -1
- package/esm/models/publicendpoint.d.ts +2 -16
- package/esm/models/publicendpoint.js +2 -15
- package/esm/models/quantization.d.ts +2 -0
- package/esm/models/quantization.js +2 -0
- package/esm/models/requesttimeoutresponseerrordata.d.ts +1 -1
- package/esm/models/requesttimeoutresponseerrordata.js +1 -1
- package/esm/models/responsesrequest.d.ts +37 -5
- package/esm/models/responsesrequest.js +24 -4
- package/esm/models/responsesstreamingresponse.js +3 -1
- package/esm/models/routerparams.d.ts +1 -1
- package/esm/models/serviceunavailableresponseerrordata.d.ts +1 -1
- package/esm/models/serviceunavailableresponseerrordata.js +1 -1
- package/esm/models/shellcallitem.d.ts +5 -12
- package/esm/models/shellcallitem.js +3 -10
- package/esm/models/shellcalloutputitem.d.ts +4 -11
- package/esm/models/shellcalloutputitem.js +3 -10
- package/esm/models/subagentnestedtool.d.ts +3 -3
- package/esm/models/subagentnestedtool.js +2 -2
- package/esm/models/toolchoiceallowed.d.ts +2 -2
- package/esm/models/toolchoiceallowed.js +2 -2
- package/esm/models/toomanyrequestsresponseerrordata.d.ts +1 -1
- package/esm/models/toomanyrequestsresponseerrordata.js +1 -1
- package/esm/models/traceconfig.d.ts +1 -1
- package/esm/models/traceconfig.js +1 -1
- package/esm/models/unauthorizedresponseerrordata.d.ts +1 -1
- package/esm/models/unauthorizedresponseerrordata.js +1 -1
- package/esm/models/unprocessableentityresponseerrordata.d.ts +1 -1
- package/esm/models/unprocessableentityresponseerrordata.js +1 -1
- package/esm/models/updateobservabilitydestinationrequest.d.ts +2 -2
- package/esm/models/updateobservabilitydestinationrequest.js +1 -1
- package/esm/models/videogenerationrequest.d.ts +252 -246
- package/esm/models/videogenerationrequest.js +124 -123
- package/esm/sdk/chat.d.ts +2 -4
- package/esm/sdk/images.d.ts +2 -3
- package/esm/sdk/responses.d.ts +2 -4
- package/esm/types/async.js +8 -7
- package/jsr.json +1 -1
- package/package.json +4 -4
- package/esm/lib/dlv.d.ts +0 -14
- package/esm/lib/dlv.js +0 -47
- package/esm/lib/is-plain-object.d.ts +0 -2
- package/esm/lib/is-plain-object.js +0 -39
- package/esm/models/reasoningconfig.d.ts +0 -35
- package/esm/models/reasoningconfig.js +0 -27
- package/esm/models/usage.d.ts +0 -52
- package/esm/models/usage.js +0 -75
|
@@ -36,129 +36,130 @@ export const VideoGenerationRequestResolution = {
|
|
|
36
36
|
export const VideoGenerationRequestAspectRatio$outboundSchema = openEnums.outboundSchema(VideoGenerationRequestAspectRatio);
|
|
37
37
|
/** @internal */
|
|
38
38
|
export const VideoGenerationRequestOptions$outboundSchema = z.object({
|
|
39
|
-
oneai: z.record(z.string(), z.
|
|
40
|
-
ai21: z.record(z.string(), z.
|
|
41
|
-
aionLabs: z.record(z.string(), z.
|
|
42
|
-
akashml: z.record(z.string(), z.
|
|
43
|
-
alibaba: z.record(z.string(), z.
|
|
44
|
-
amazonBedrock: z.record(z.string(), z.
|
|
45
|
-
amazonNova: z.record(z.string(), z.
|
|
46
|
-
ambient: z.record(z.string(), z.
|
|
47
|
-
anthropic: z.record(z.string(), z.
|
|
48
|
-
anyscale: z.record(z.string(), z.
|
|
49
|
-
arceeAi: z.record(z.string(), z.
|
|
50
|
-
atlasCloud: z.record(z.string(), z.
|
|
51
|
-
atoma: z.record(z.string(), z.
|
|
52
|
-
avian: z.record(z.string(), z.
|
|
53
|
-
azure: z.record(z.string(), z.
|
|
54
|
-
baidu: z.record(z.string(), z.
|
|
55
|
-
baseten: z.record(z.string(), z.
|
|
56
|
-
blackForestLabs: z.record(z.string(), z.
|
|
57
|
-
byteplus: z.record(z.string(), z.
|
|
58
|
-
centml: z.record(z.string(), z.
|
|
59
|
-
cerebras: z.record(z.string(), z.
|
|
60
|
-
chutes: z.record(z.string(), z.
|
|
61
|
-
cirrascale: z.record(z.string(), z.
|
|
62
|
-
clarifai: z.record(z.string(), z.
|
|
63
|
-
cloudflare: z.record(z.string(), z.
|
|
64
|
-
cohere: z.record(z.string(), z.
|
|
65
|
-
crofai: z.record(z.string(), z.
|
|
66
|
-
crucible: z.record(z.string(), z.
|
|
67
|
-
crusoe: z.record(z.string(), z.
|
|
68
|
-
darkbloom: z.record(z.string(), z.
|
|
69
|
-
decart: z.record(z.string(), z.
|
|
70
|
-
deepgram: z.record(z.string(), z.
|
|
71
|
-
deepinfra: z.record(z.string(), z.
|
|
72
|
-
deepseek: z.record(z.string(), z.
|
|
73
|
-
dekallm: z.record(z.string(), z.
|
|
74
|
-
digitalocean: z.record(z.string(), z.
|
|
75
|
-
enfer: z.record(z.string(), z.
|
|
76
|
-
fakeProvider: z.record(z.string(), z.
|
|
77
|
-
featherless: z.record(z.string(), z.
|
|
78
|
-
fireworks: z.record(z.string(), z.
|
|
79
|
-
friendli: z.record(z.string(), z.
|
|
80
|
-
gmicloud: z.record(z.string(), z.
|
|
81
|
-
googleAiStudio: z.record(z.string(), z.
|
|
82
|
-
googleVertex: z.record(z.string(), z.
|
|
83
|
-
gopomelo: z.record(z.string(), z.
|
|
84
|
-
groq: z.record(z.string(), z.
|
|
85
|
-
heygen: z.record(z.string(), z.
|
|
86
|
-
huggingface: z.record(z.string(), z.
|
|
87
|
-
hyperbolic: z.record(z.string(), z.
|
|
88
|
-
hyperbolicQuantized: z.record(z.string(), z.
|
|
89
|
-
inception: z.record(z.string(), z.
|
|
90
|
-
inceptron: z.record(z.string(), z.
|
|
91
|
-
inferactVllm: z.record(z.string(), z.
|
|
92
|
-
inferenceNet: z.record(z.string(), z.
|
|
93
|
-
infermatic: z.record(z.string(), z.
|
|
94
|
-
inflection: z.record(z.string(), z.
|
|
95
|
-
inocloud: z.record(z.string(), z.
|
|
96
|
-
ioNet: z.record(z.string(), z.
|
|
97
|
-
ionstream: z.record(z.string(), z.
|
|
98
|
-
klusterai: z.record(z.string(), z.
|
|
99
|
-
krea: z.record(z.string(), z.
|
|
100
|
-
lambda: z.record(z.string(), z.
|
|
101
|
-
lepton: z.record(z.string(), z.
|
|
102
|
-
liquid: z.record(z.string(), z.
|
|
103
|
-
lynn: z.record(z.string(), z.
|
|
104
|
-
lynnPrivate: z.record(z.string(), z.
|
|
105
|
-
mancer: z.record(z.string(), z.
|
|
106
|
-
mancerOld: z.record(z.string(), z.
|
|
107
|
-
mara: z.record(z.string(), z.
|
|
108
|
-
meta: z.record(z.string(), z.
|
|
109
|
-
minimax: z.record(z.string(), z.
|
|
110
|
-
mistral: z.record(z.string(), z.
|
|
111
|
-
modal: z.record(z.string(), z.
|
|
112
|
-
modelrun: z.record(z.string(), z.
|
|
113
|
-
modular: z.record(z.string(), z.
|
|
114
|
-
moonshotai: z.record(z.string(), z.
|
|
115
|
-
morph: z.record(z.string(), z.
|
|
116
|
-
ncompass: z.record(z.string(), z.
|
|
117
|
-
nebius: z.record(z.string(), z.
|
|
118
|
-
nexAgi: z.record(z.string(), z.
|
|
119
|
-
nextbit: z.record(z.string(), z.
|
|
120
|
-
nineteen: z.record(z.string(), z.
|
|
121
|
-
novita: z.record(z.string(), z.
|
|
122
|
-
nvidia: z.record(z.string(), z.
|
|
123
|
-
octoai: z.record(z.string(), z.
|
|
124
|
-
openInference: z.record(z.string(), z.
|
|
125
|
-
openai: z.record(z.string(), z.
|
|
126
|
-
parasail: z.record(z.string(), z.
|
|
127
|
-
perceptron: z.record(z.string(), z.
|
|
128
|
-
perplexity: z.record(z.string(), z.
|
|
129
|
-
phala: z.record(z.string(), z.
|
|
130
|
-
poolside: z.record(z.string(), z.
|
|
131
|
-
quiver: z.record(z.string(), z.
|
|
132
|
-
recraft: z.record(z.string(), z.
|
|
133
|
-
recursal: z.record(z.string(), z.
|
|
134
|
-
reflection: z.record(z.string(), z.
|
|
135
|
-
reka: z.record(z.string(), z.
|
|
136
|
-
relace: z.record(z.string(), z.
|
|
137
|
-
replicate: z.record(z.string(), z.
|
|
138
|
-
sailResearch: z.record(z.string(), z.
|
|
139
|
-
sakana: z.record(z.string(), z.
|
|
140
|
-
sambanova: z.record(z.string(), z.
|
|
141
|
-
sambanovaCloaked: z.record(z.string(), z.
|
|
142
|
-
seed: z.record(z.string(), z.
|
|
143
|
-
sfCompute: z.record(z.string(), z.
|
|
144
|
-
siliconflow: z.record(z.string(), z.
|
|
145
|
-
sourceful: z.record(z.string(), z.
|
|
146
|
-
stealth: z.record(z.string(), z.
|
|
147
|
-
stepfun: z.record(z.string(), z.
|
|
148
|
-
streamlake: z.record(z.string(), z.
|
|
149
|
-
switchpoint: z.record(z.string(), z.
|
|
150
|
-
targon: z.record(z.string(), z.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
39
|
+
oneai: z.record(z.string(), z.any()).optional(),
|
|
40
|
+
ai21: z.record(z.string(), z.any()).optional(),
|
|
41
|
+
aionLabs: z.record(z.string(), z.any()).optional(),
|
|
42
|
+
akashml: z.record(z.string(), z.any()).optional(),
|
|
43
|
+
alibaba: z.record(z.string(), z.any()).optional(),
|
|
44
|
+
amazonBedrock: z.record(z.string(), z.any()).optional(),
|
|
45
|
+
amazonNova: z.record(z.string(), z.any()).optional(),
|
|
46
|
+
ambient: z.record(z.string(), z.any()).optional(),
|
|
47
|
+
anthropic: z.record(z.string(), z.any()).optional(),
|
|
48
|
+
anyscale: z.record(z.string(), z.any()).optional(),
|
|
49
|
+
arceeAi: z.record(z.string(), z.any()).optional(),
|
|
50
|
+
atlasCloud: z.record(z.string(), z.any()).optional(),
|
|
51
|
+
atoma: z.record(z.string(), z.any()).optional(),
|
|
52
|
+
avian: z.record(z.string(), z.any()).optional(),
|
|
53
|
+
azure: z.record(z.string(), z.any()).optional(),
|
|
54
|
+
baidu: z.record(z.string(), z.any()).optional(),
|
|
55
|
+
baseten: z.record(z.string(), z.any()).optional(),
|
|
56
|
+
blackForestLabs: z.record(z.string(), z.any()).optional(),
|
|
57
|
+
byteplus: z.record(z.string(), z.any()).optional(),
|
|
58
|
+
centml: z.record(z.string(), z.any()).optional(),
|
|
59
|
+
cerebras: z.record(z.string(), z.any()).optional(),
|
|
60
|
+
chutes: z.record(z.string(), z.any()).optional(),
|
|
61
|
+
cirrascale: z.record(z.string(), z.any()).optional(),
|
|
62
|
+
clarifai: z.record(z.string(), z.any()).optional(),
|
|
63
|
+
cloudflare: z.record(z.string(), z.any()).optional(),
|
|
64
|
+
cohere: z.record(z.string(), z.any()).optional(),
|
|
65
|
+
crofai: z.record(z.string(), z.any()).optional(),
|
|
66
|
+
crucible: z.record(z.string(), z.any()).optional(),
|
|
67
|
+
crusoe: z.record(z.string(), z.any()).optional(),
|
|
68
|
+
darkbloom: z.record(z.string(), z.any()).optional(),
|
|
69
|
+
decart: z.record(z.string(), z.any()).optional(),
|
|
70
|
+
deepgram: z.record(z.string(), z.any()).optional(),
|
|
71
|
+
deepinfra: z.record(z.string(), z.any()).optional(),
|
|
72
|
+
deepseek: z.record(z.string(), z.any()).optional(),
|
|
73
|
+
dekallm: z.record(z.string(), z.any()).optional(),
|
|
74
|
+
digitalocean: z.record(z.string(), z.any()).optional(),
|
|
75
|
+
enfer: z.record(z.string(), z.any()).optional(),
|
|
76
|
+
fakeProvider: z.record(z.string(), z.any()).optional(),
|
|
77
|
+
featherless: z.record(z.string(), z.any()).optional(),
|
|
78
|
+
fireworks: z.record(z.string(), z.any()).optional(),
|
|
79
|
+
friendli: z.record(z.string(), z.any()).optional(),
|
|
80
|
+
gmicloud: z.record(z.string(), z.any()).optional(),
|
|
81
|
+
googleAiStudio: z.record(z.string(), z.any()).optional(),
|
|
82
|
+
googleVertex: z.record(z.string(), z.any()).optional(),
|
|
83
|
+
gopomelo: z.record(z.string(), z.any()).optional(),
|
|
84
|
+
groq: z.record(z.string(), z.any()).optional(),
|
|
85
|
+
heygen: z.record(z.string(), z.any()).optional(),
|
|
86
|
+
huggingface: z.record(z.string(), z.any()).optional(),
|
|
87
|
+
hyperbolic: z.record(z.string(), z.any()).optional(),
|
|
88
|
+
hyperbolicQuantized: z.record(z.string(), z.any()).optional(),
|
|
89
|
+
inception: z.record(z.string(), z.any()).optional(),
|
|
90
|
+
inceptron: z.record(z.string(), z.any()).optional(),
|
|
91
|
+
inferactVllm: z.record(z.string(), z.any()).optional(),
|
|
92
|
+
inferenceNet: z.record(z.string(), z.any()).optional(),
|
|
93
|
+
infermatic: z.record(z.string(), z.any()).optional(),
|
|
94
|
+
inflection: z.record(z.string(), z.any()).optional(),
|
|
95
|
+
inocloud: z.record(z.string(), z.any()).optional(),
|
|
96
|
+
ioNet: z.record(z.string(), z.any()).optional(),
|
|
97
|
+
ionstream: z.record(z.string(), z.any()).optional(),
|
|
98
|
+
klusterai: z.record(z.string(), z.any()).optional(),
|
|
99
|
+
krea: z.record(z.string(), z.any()).optional(),
|
|
100
|
+
lambda: z.record(z.string(), z.any()).optional(),
|
|
101
|
+
lepton: z.record(z.string(), z.any()).optional(),
|
|
102
|
+
liquid: z.record(z.string(), z.any()).optional(),
|
|
103
|
+
lynn: z.record(z.string(), z.any()).optional(),
|
|
104
|
+
lynnPrivate: z.record(z.string(), z.any()).optional(),
|
|
105
|
+
mancer: z.record(z.string(), z.any()).optional(),
|
|
106
|
+
mancerOld: z.record(z.string(), z.any()).optional(),
|
|
107
|
+
mara: z.record(z.string(), z.any()).optional(),
|
|
108
|
+
meta: z.record(z.string(), z.any()).optional(),
|
|
109
|
+
minimax: z.record(z.string(), z.any()).optional(),
|
|
110
|
+
mistral: z.record(z.string(), z.any()).optional(),
|
|
111
|
+
modal: z.record(z.string(), z.any()).optional(),
|
|
112
|
+
modelrun: z.record(z.string(), z.any()).optional(),
|
|
113
|
+
modular: z.record(z.string(), z.any()).optional(),
|
|
114
|
+
moonshotai: z.record(z.string(), z.any()).optional(),
|
|
115
|
+
morph: z.record(z.string(), z.any()).optional(),
|
|
116
|
+
ncompass: z.record(z.string(), z.any()).optional(),
|
|
117
|
+
nebius: z.record(z.string(), z.any()).optional(),
|
|
118
|
+
nexAgi: z.record(z.string(), z.any()).optional(),
|
|
119
|
+
nextbit: z.record(z.string(), z.any()).optional(),
|
|
120
|
+
nineteen: z.record(z.string(), z.any()).optional(),
|
|
121
|
+
novita: z.record(z.string(), z.any()).optional(),
|
|
122
|
+
nvidia: z.record(z.string(), z.any()).optional(),
|
|
123
|
+
octoai: z.record(z.string(), z.any()).optional(),
|
|
124
|
+
openInference: z.record(z.string(), z.any()).optional(),
|
|
125
|
+
openai: z.record(z.string(), z.any()).optional(),
|
|
126
|
+
parasail: z.record(z.string(), z.any()).optional(),
|
|
127
|
+
perceptron: z.record(z.string(), z.any()).optional(),
|
|
128
|
+
perplexity: z.record(z.string(), z.any()).optional(),
|
|
129
|
+
phala: z.record(z.string(), z.any()).optional(),
|
|
130
|
+
poolside: z.record(z.string(), z.any()).optional(),
|
|
131
|
+
quiver: z.record(z.string(), z.any()).optional(),
|
|
132
|
+
recraft: z.record(z.string(), z.any()).optional(),
|
|
133
|
+
recursal: z.record(z.string(), z.any()).optional(),
|
|
134
|
+
reflection: z.record(z.string(), z.any()).optional(),
|
|
135
|
+
reka: z.record(z.string(), z.any()).optional(),
|
|
136
|
+
relace: z.record(z.string(), z.any()).optional(),
|
|
137
|
+
replicate: z.record(z.string(), z.any()).optional(),
|
|
138
|
+
sailResearch: z.record(z.string(), z.any()).optional(),
|
|
139
|
+
sakana: z.record(z.string(), z.any()).optional(),
|
|
140
|
+
sambanova: z.record(z.string(), z.any()).optional(),
|
|
141
|
+
sambanovaCloaked: z.record(z.string(), z.any()).optional(),
|
|
142
|
+
seed: z.record(z.string(), z.any()).optional(),
|
|
143
|
+
sfCompute: z.record(z.string(), z.any()).optional(),
|
|
144
|
+
siliconflow: z.record(z.string(), z.any()).optional(),
|
|
145
|
+
sourceful: z.record(z.string(), z.any()).optional(),
|
|
146
|
+
stealth: z.record(z.string(), z.any()).optional(),
|
|
147
|
+
stepfun: z.record(z.string(), z.any()).optional(),
|
|
148
|
+
streamlake: z.record(z.string(), z.any()).optional(),
|
|
149
|
+
switchpoint: z.record(z.string(), z.any()).optional(),
|
|
150
|
+
targon: z.record(z.string(), z.any()).optional(),
|
|
151
|
+
tencent: z.record(z.string(), z.any()).optional(),
|
|
152
|
+
tenstorrent: z.record(z.string(), z.any()).optional(),
|
|
153
|
+
together: z.record(z.string(), z.any()).optional(),
|
|
154
|
+
togetherLite: z.record(z.string(), z.any()).optional(),
|
|
155
|
+
ubicloud: z.record(z.string(), z.any()).optional(),
|
|
156
|
+
upstage: z.record(z.string(), z.any()).optional(),
|
|
157
|
+
venice: z.record(z.string(), z.any()).optional(),
|
|
158
|
+
wafer: z.record(z.string(), z.any()).optional(),
|
|
159
|
+
wandb: z.record(z.string(), z.any()).optional(),
|
|
160
|
+
xai: z.record(z.string(), z.any()).optional(),
|
|
161
|
+
xiaomi: z.record(z.string(), z.any()).optional(),
|
|
162
|
+
zAi: z.record(z.string(), z.any()).optional(),
|
|
162
163
|
}).transform((v) => {
|
|
163
164
|
return remap$(v, {
|
|
164
165
|
oneai: "01ai",
|
package/esm/sdk/chat.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { EventStream } from "../lib/event-streams.js";
|
|
2
1
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
3
|
-
import * as models from "../models/index.js";
|
|
4
2
|
import * as operations from "../models/operations/index.js";
|
|
5
3
|
export declare class Chat extends ClientSDK {
|
|
6
4
|
/**
|
|
@@ -13,12 +11,12 @@ export declare class Chat extends ClientSDK {
|
|
|
13
11
|
chatRequest: {
|
|
14
12
|
stream?: false | undefined;
|
|
15
13
|
};
|
|
16
|
-
}, options?: RequestOptions): Promise<
|
|
14
|
+
}, options?: RequestOptions): Promise<operations.SendChatCompletionRequestResponse>;
|
|
17
15
|
send(request: operations.SendChatCompletionRequestRequest & {
|
|
18
16
|
chatRequest: {
|
|
19
17
|
stream: true;
|
|
20
18
|
};
|
|
21
|
-
}, options?: RequestOptions): Promise<
|
|
19
|
+
}, options?: RequestOptions): Promise<operations.SendChatCompletionRequestResponse>;
|
|
22
20
|
send(request: operations.SendChatCompletionRequestRequest, options?: RequestOptions): Promise<operations.SendChatCompletionRequestResponse>;
|
|
23
21
|
}
|
|
24
22
|
//# sourceMappingURL=chat.d.ts.map
|
package/esm/sdk/images.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { EventStream } from "../lib/event-streams.js";
|
|
2
1
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
3
2
|
import * as models from "../models/index.js";
|
|
4
3
|
import * as operations from "../models/operations/index.js";
|
|
@@ -13,12 +12,12 @@ export declare class Images extends ClientSDK {
|
|
|
13
12
|
imageGenerationRequest: {
|
|
14
13
|
stream?: false | undefined;
|
|
15
14
|
};
|
|
16
|
-
}, options?: RequestOptions): Promise<
|
|
15
|
+
}, options?: RequestOptions): Promise<operations.CreateImagesResponse>;
|
|
17
16
|
generate(request: operations.CreateImagesRequest & {
|
|
18
17
|
imageGenerationRequest: {
|
|
19
18
|
stream: true;
|
|
20
19
|
};
|
|
21
|
-
}, options?: RequestOptions): Promise<
|
|
20
|
+
}, options?: RequestOptions): Promise<operations.CreateImagesResponse>;
|
|
22
21
|
generate(request: operations.CreateImagesRequest, options?: RequestOptions): Promise<operations.CreateImagesResponse>;
|
|
23
22
|
/**
|
|
24
23
|
* List image generation models
|
package/esm/sdk/responses.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { EventStream } from "../lib/event-streams.js";
|
|
2
1
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
3
|
-
import * as models from "../models/index.js";
|
|
4
2
|
import * as operations from "../models/operations/index.js";
|
|
5
3
|
export declare class Responses extends ClientSDK {
|
|
6
4
|
/**
|
|
@@ -13,12 +11,12 @@ export declare class Responses extends ClientSDK {
|
|
|
13
11
|
responsesRequest: {
|
|
14
12
|
stream?: false | undefined;
|
|
15
13
|
};
|
|
16
|
-
}, options?: RequestOptions): Promise<
|
|
14
|
+
}, options?: RequestOptions): Promise<operations.CreateResponsesResponse>;
|
|
17
15
|
send(request: operations.CreateResponsesRequest & {
|
|
18
16
|
responsesRequest: {
|
|
19
17
|
stream: true;
|
|
20
18
|
};
|
|
21
|
-
}, options?: RequestOptions): Promise<
|
|
19
|
+
}, options?: RequestOptions): Promise<operations.CreateResponsesResponse>;
|
|
22
20
|
send(request: operations.CreateResponsesRequest, options?: RequestOptions): Promise<operations.CreateResponsesResponse>;
|
|
23
21
|
}
|
|
24
22
|
//# sourceMappingURL=responses.d.ts.map
|
package/esm/types/async.js
CHANGED
|
@@ -13,29 +13,30 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _APIPromise_promise, _APIPromise_unwrapped, _a;
|
|
16
|
+
var _APIPromise_instances, _APIPromise_promise, _APIPromise_unwrapped, _APIPromise_getUnwrapped, _a;
|
|
17
17
|
export class APIPromise {
|
|
18
18
|
constructor(p) {
|
|
19
|
+
_APIPromise_instances.add(this);
|
|
19
20
|
_APIPromise_promise.set(this, void 0);
|
|
20
21
|
_APIPromise_unwrapped.set(this, void 0);
|
|
21
22
|
this[_a] = "APIPromise";
|
|
22
23
|
__classPrivateFieldSet(this, _APIPromise_promise, p instanceof Promise ? p : Promise.resolve(p), "f");
|
|
23
|
-
__classPrivateFieldSet(this, _APIPromise_unwrapped, p instanceof Promise
|
|
24
|
-
? __classPrivateFieldGet(this, _APIPromise_promise, "f").then(([value]) => value)
|
|
25
|
-
: Promise.resolve(p[0]), "f");
|
|
24
|
+
__classPrivateFieldSet(this, _APIPromise_unwrapped, p instanceof Promise ? null : Promise.resolve(p[0]), "f");
|
|
26
25
|
}
|
|
27
26
|
then(onfulfilled, onrejected) {
|
|
28
27
|
return __classPrivateFieldGet(this, _APIPromise_promise, "f").then(onfulfilled ? ([value]) => onfulfilled(value) : void 0, onrejected);
|
|
29
28
|
}
|
|
30
29
|
catch(onrejected) {
|
|
31
|
-
return __classPrivateFieldGet(this,
|
|
30
|
+
return __classPrivateFieldGet(this, _APIPromise_instances, "m", _APIPromise_getUnwrapped).call(this).catch(onrejected);
|
|
32
31
|
}
|
|
33
32
|
finally(onfinally) {
|
|
34
|
-
return __classPrivateFieldGet(this,
|
|
33
|
+
return __classPrivateFieldGet(this, _APIPromise_instances, "m", _APIPromise_getUnwrapped).call(this).finally(onfinally);
|
|
35
34
|
}
|
|
36
35
|
$inspect() {
|
|
37
36
|
return __classPrivateFieldGet(this, _APIPromise_promise, "f");
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
|
-
_APIPromise_promise = new WeakMap(), _APIPromise_unwrapped = new WeakMap(), _a = Symbol.toStringTag
|
|
39
|
+
_APIPromise_promise = new WeakMap(), _APIPromise_unwrapped = new WeakMap(), _APIPromise_instances = new WeakSet(), _a = Symbol.toStringTag, _APIPromise_getUnwrapped = function _APIPromise_getUnwrapped() {
|
|
40
|
+
return (__classPrivateFieldSet(this, _APIPromise_unwrapped, __classPrivateFieldGet(this, _APIPromise_unwrapped, "f") ?? __classPrivateFieldGet(this, _APIPromise_promise, "f").then(([value]) => value), "f"));
|
|
41
|
+
};
|
|
41
42
|
//# sourceMappingURL=async.js.map
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.60",
|
|
4
4
|
"author": "OpenRouter",
|
|
5
5
|
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.",
|
|
6
6
|
"keywords": [
|
|
@@ -74,14 +74,14 @@
|
|
|
74
74
|
"build": "tsc",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
76
|
"compile": "tsc",
|
|
77
|
+
"test": "vitest --run --project unit",
|
|
78
|
+
"test:transit": "exit 0",
|
|
77
79
|
"postinstall": "node scripts/check-types.js || true",
|
|
78
80
|
"prepare": "npm run build",
|
|
79
81
|
"test:e2e": "vitest --run --project e2e",
|
|
80
82
|
"test:watch": "vitest --watch --project unit",
|
|
81
83
|
"typecheck": "tsc --noEmit",
|
|
82
|
-
"typecheck:transit": "exit 0"
|
|
83
|
-
"test": "vitest --run --project unit",
|
|
84
|
-
"test:transit": "exit 0"
|
|
84
|
+
"typecheck:transit": "exit 0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|
package/esm/lib/dlv.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param obj The object to walk
|
|
3
|
-
* @param key The key path to walk the object with
|
|
4
|
-
* @param def A default value to return if the result is undefined
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* dlv(obj, "a.b.c.d")
|
|
8
|
-
* @example
|
|
9
|
-
* dlv(object, ["a", "b", "c", "d"])
|
|
10
|
-
* @example
|
|
11
|
-
* dlv(object, "foo.bar.baz", "Hello, default value!")
|
|
12
|
-
*/
|
|
13
|
-
export declare function dlv<T = any>(obj: any, key: string | string[], def?: T, p?: number, undef?: never): T | undefined;
|
|
14
|
-
//# sourceMappingURL=dlv.d.ts.map
|
package/esm/lib/dlv.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
* @generated-id: b1988214835a
|
|
4
|
-
*/
|
|
5
|
-
/*
|
|
6
|
-
MIT License
|
|
7
|
-
|
|
8
|
-
Copyright (c) 2024 Jason Miller <jason@developit.ca> (http://jasonformat.com)
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
11
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
12
|
-
the Software without restriction, including without limitation the rights to
|
|
13
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
14
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
15
|
-
subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
|
18
|
-
copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
22
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
23
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
24
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
25
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
26
|
-
*/
|
|
27
|
-
/**
|
|
28
|
-
* @param obj The object to walk
|
|
29
|
-
* @param key The key path to walk the object with
|
|
30
|
-
* @param def A default value to return if the result is undefined
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* dlv(obj, "a.b.c.d")
|
|
34
|
-
* @example
|
|
35
|
-
* dlv(object, ["a", "b", "c", "d"])
|
|
36
|
-
* @example
|
|
37
|
-
* dlv(object, "foo.bar.baz", "Hello, default value!")
|
|
38
|
-
*/
|
|
39
|
-
export function dlv(obj, key, def, p, undef) {
|
|
40
|
-
key = Array.isArray(key) ? key : key.split(".");
|
|
41
|
-
for (p = 0; p < key.length; p++) {
|
|
42
|
-
const k = key[p];
|
|
43
|
-
obj = k != null && obj ? obj[k] : undef;
|
|
44
|
-
}
|
|
45
|
-
return obj === undef ? def : obj;
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=dlv.js.map
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
* @generated-id: b9862591096a
|
|
4
|
-
*/
|
|
5
|
-
/*
|
|
6
|
-
MIT License
|
|
7
|
-
|
|
8
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
11
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
12
|
-
the Software without restriction, including without limitation the rights to
|
|
13
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
14
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
15
|
-
subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
|
18
|
-
copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
22
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
23
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
24
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
25
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
26
|
-
*/
|
|
27
|
-
// Taken from https://github.com/sindresorhus/is-plain-obj/blob/97f38e8836f86a642cce98fc6ab3058bc36df181/index.js
|
|
28
|
-
export function isPlainObject(value) {
|
|
29
|
-
if (typeof value !== "object" || value === null) {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
const prototype = Object.getPrototypeOf(value);
|
|
33
|
-
return ((prototype === null ||
|
|
34
|
-
prototype === Object.prototype ||
|
|
35
|
-
Object.getPrototypeOf(prototype) === null) &&
|
|
36
|
-
!(Symbol.toStringTag in value) &&
|
|
37
|
-
!(Symbol.iterator in value));
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=is-plain-object.js.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { ReasoningContext } from "./reasoningcontext.js";
|
|
3
|
-
import { ReasoningEffort } from "./reasoningeffort.js";
|
|
4
|
-
import { ReasoningMode } from "./reasoningmode.js";
|
|
5
|
-
import { ReasoningSummaryVerbosity } from "./reasoningsummaryverbosity.js";
|
|
6
|
-
/**
|
|
7
|
-
* Configuration for reasoning mode in the response
|
|
8
|
-
*/
|
|
9
|
-
export type ReasoningConfig = {
|
|
10
|
-
/**
|
|
11
|
-
* Controls which reasoning is available to the model. `auto` uses the model default (same as omitting); `all_turns` includes reasoning from earlier turns passed in input; `current_turn` limits to the current turn only. Only supported by OpenAI GPT-5.6 and newer.
|
|
12
|
-
*/
|
|
13
|
-
context?: ReasoningContext | null | undefined;
|
|
14
|
-
effort?: ReasoningEffort | null | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* Selects the reasoning mode. `standard` is the default; `pro` engages deeper reasoning on models that support it, billed at standard token rates. Only supported by OpenAI GPT-5.6 and newer.
|
|
17
|
-
*/
|
|
18
|
-
mode?: ReasoningMode | null | undefined;
|
|
19
|
-
summary?: ReasoningSummaryVerbosity | null | undefined;
|
|
20
|
-
enabled?: boolean | null | undefined;
|
|
21
|
-
maxTokens?: number | null | undefined;
|
|
22
|
-
};
|
|
23
|
-
/** @internal */
|
|
24
|
-
export type ReasoningConfig$Outbound = {
|
|
25
|
-
context?: string | null | undefined;
|
|
26
|
-
effort?: string | null | undefined;
|
|
27
|
-
mode?: string | null | undefined;
|
|
28
|
-
summary?: string | null | undefined;
|
|
29
|
-
enabled?: boolean | null | undefined;
|
|
30
|
-
max_tokens?: number | null | undefined;
|
|
31
|
-
};
|
|
32
|
-
/** @internal */
|
|
33
|
-
export declare const ReasoningConfig$outboundSchema: z.ZodType<ReasoningConfig$Outbound, ReasoningConfig>;
|
|
34
|
-
export declare function reasoningConfigToJSON(reasoningConfig: ReasoningConfig): string;
|
|
35
|
-
//# sourceMappingURL=reasoningconfig.d.ts.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
* @generated-id: 809170859136
|
|
4
|
-
*/
|
|
5
|
-
import * as z from "zod/v4";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
-
import { ReasoningContext$outboundSchema, } from "./reasoningcontext.js";
|
|
8
|
-
import { ReasoningEffort$outboundSchema, } from "./reasoningeffort.js";
|
|
9
|
-
import { ReasoningMode$outboundSchema, } from "./reasoningmode.js";
|
|
10
|
-
import { ReasoningSummaryVerbosity$outboundSchema, } from "./reasoningsummaryverbosity.js";
|
|
11
|
-
/** @internal */
|
|
12
|
-
export const ReasoningConfig$outboundSchema = z.object({
|
|
13
|
-
context: z.nullable(ReasoningContext$outboundSchema).optional(),
|
|
14
|
-
effort: z.nullable(ReasoningEffort$outboundSchema).optional(),
|
|
15
|
-
mode: z.nullable(ReasoningMode$outboundSchema).optional(),
|
|
16
|
-
summary: z.nullable(ReasoningSummaryVerbosity$outboundSchema).optional(),
|
|
17
|
-
enabled: z.nullable(z.boolean()).optional(),
|
|
18
|
-
maxTokens: z.nullable(z.int()).optional(),
|
|
19
|
-
}).transform((v) => {
|
|
20
|
-
return remap$(v, {
|
|
21
|
-
maxTokens: "max_tokens",
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
export function reasoningConfigToJSON(reasoningConfig) {
|
|
25
|
-
return JSON.stringify(ReasoningConfig$outboundSchema.parse(reasoningConfig));
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=reasoningconfig.js.map
|
package/esm/models/usage.d.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
-
import { ServerToolUseDetails } from "./servertoolusedetails.js";
|
|
5
|
-
export type InputTokensDetails = {
|
|
6
|
-
cacheWriteTokens?: number | null | undefined;
|
|
7
|
-
cachedTokens: number;
|
|
8
|
-
};
|
|
9
|
-
export type OutputTokensDetails = {
|
|
10
|
-
reasoningTokens: number;
|
|
11
|
-
};
|
|
12
|
-
export type UsageCostDetails = {
|
|
13
|
-
upstreamInferenceCost?: number | null | undefined;
|
|
14
|
-
upstreamInferenceInputCost: number;
|
|
15
|
-
upstreamInferenceOutputCost: number;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Token usage information for the response
|
|
19
|
-
*/
|
|
20
|
-
export type Usage = {
|
|
21
|
-
inputTokens: number;
|
|
22
|
-
inputTokensDetails: InputTokensDetails;
|
|
23
|
-
outputTokens: number;
|
|
24
|
-
outputTokensDetails: OutputTokensDetails;
|
|
25
|
-
totalTokens: number;
|
|
26
|
-
/**
|
|
27
|
-
* Cost of the completion
|
|
28
|
-
*/
|
|
29
|
-
cost?: number | null | undefined;
|
|
30
|
-
costDetails?: UsageCostDetails | undefined;
|
|
31
|
-
/**
|
|
32
|
-
* Whether a request was made using a Bring Your Own Key configuration
|
|
33
|
-
*/
|
|
34
|
-
isByok?: boolean | undefined;
|
|
35
|
-
/**
|
|
36
|
-
* Usage for server-side tool execution (e.g., web search)
|
|
37
|
-
*/
|
|
38
|
-
serverToolUseDetails?: ServerToolUseDetails | null | undefined;
|
|
39
|
-
};
|
|
40
|
-
/** @internal */
|
|
41
|
-
export declare const InputTokensDetails$inboundSchema: z.ZodType<InputTokensDetails, unknown>;
|
|
42
|
-
export declare function inputTokensDetailsFromJSON(jsonString: string): SafeParseResult<InputTokensDetails, SDKValidationError>;
|
|
43
|
-
/** @internal */
|
|
44
|
-
export declare const OutputTokensDetails$inboundSchema: z.ZodType<OutputTokensDetails, unknown>;
|
|
45
|
-
export declare function outputTokensDetailsFromJSON(jsonString: string): SafeParseResult<OutputTokensDetails, SDKValidationError>;
|
|
46
|
-
/** @internal */
|
|
47
|
-
export declare const UsageCostDetails$inboundSchema: z.ZodType<UsageCostDetails, unknown>;
|
|
48
|
-
export declare function usageCostDetailsFromJSON(jsonString: string): SafeParseResult<UsageCostDetails, SDKValidationError>;
|
|
49
|
-
/** @internal */
|
|
50
|
-
export declare const Usage$inboundSchema: z.ZodType<Usage, unknown>;
|
|
51
|
-
export declare function usageFromJSON(jsonString: string): SafeParseResult<Usage, SDKValidationError>;
|
|
52
|
-
//# sourceMappingURL=usage.d.ts.map
|