@openrouter/sdk 0.0.1-beta.12 → 0.0.1-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FUNCTIONS.md +15 -16
- package/REACT_QUERY.md +15 -16
- package/README.md +138 -110
- package/esm/funcs/betaResponsesSend.d.ts +2 -2
- package/esm/funcs/betaResponsesSend.js +3 -3
- package/esm/funcs/chatSend.d.ts +1 -1
- package/esm/funcs/modelsList.d.ts +2 -1
- package/esm/funcs/modelsList.js +3 -6
- package/esm/funcs/oAuthCreateAuthCode.d.ts +18 -0
- package/esm/funcs/oAuthCreateAuthCode.js +82 -0
- package/esm/funcs/oAuthCreateAuthorizationUrl.d.ts +2 -2
- package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.d.ts +18 -0
- package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.js +82 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/lib/event-streams.d.ts +1 -1
- package/esm/models/chatgenerationtokenusage.d.ts +2 -2
- package/esm/models/chatgenerationtokenusage.js +2 -4
- package/esm/models/operations/createauthkeyscode.d.ts +145 -0
- package/esm/models/operations/createauthkeyscode.js +146 -0
- package/esm/models/operations/createresponses.d.ts +58 -0
- package/esm/models/operations/createresponses.js +80 -0
- package/esm/models/operations/exchangeauthcodeforapikey.d.ts +104 -0
- package/esm/models/operations/exchangeauthcodeforapikey.js +111 -0
- package/esm/models/operations/getmodels.d.ts +0 -26
- package/esm/models/operations/getmodels.js +0 -30
- package/esm/models/operations/index.d.ts +3 -1
- package/esm/models/operations/index.js +3 -1
- package/esm/models/operations/sendchatcompletionrequest.d.ts +1 -1
- package/esm/models/operations/sendchatcompletionrequest.js +2 -1
- package/esm/react-query/betaResponsesSend.d.ts +1 -1
- package/esm/react-query/index.d.ts +2 -0
- package/esm/react-query/index.js +2 -0
- package/esm/react-query/modelsList.d.ts +2 -7
- package/esm/react-query/modelsList.js +0 -2
- package/esm/react-query/oAuthCreateAuthCode.d.ts +23 -0
- package/esm/react-query/oAuthCreateAuthCode.js +42 -0
- package/esm/react-query/oAuthExchangeAuthCodeForAPIKey.d.ts +23 -0
- package/esm/react-query/oAuthExchangeAuthCodeForAPIKey.js +42 -0
- package/esm/sdk/chat.d.ts +1 -1
- package/esm/sdk/models.d.ts +1 -1
- package/esm/sdk/oauth.d.ts +46 -0
- package/esm/sdk/oauth.js +67 -0
- package/esm/sdk/responses.d.ts +2 -2
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.js +4 -0
- package/jsr.json +1 -1
- package/package.json +3 -1
- package/vitest.config.ts +16 -1
- package/esm/models/operations/createapialpharesponses.d.ts +0 -58
- package/esm/models/operations/createapialpharesponses.js +0 -81
package/FUNCTIONS.md
CHANGED
|
@@ -66,7 +66,6 @@ async function run() {
|
|
|
66
66
|
model: "anthropic/claude-4.5-sonnet-20250929",
|
|
67
67
|
models: [
|
|
68
68
|
"<value 1>",
|
|
69
|
-
"<value 2>",
|
|
70
69
|
],
|
|
71
70
|
text: {
|
|
72
71
|
format: {
|
|
@@ -75,15 +74,15 @@ async function run() {
|
|
|
75
74
|
verbosity: "medium",
|
|
76
75
|
},
|
|
77
76
|
reasoning: {
|
|
78
|
-
effort: "
|
|
77
|
+
effort: "high",
|
|
79
78
|
summary: "auto",
|
|
80
|
-
maxTokens:
|
|
79
|
+
maxTokens: 8661.16,
|
|
81
80
|
enabled: true,
|
|
82
81
|
},
|
|
83
|
-
maxOutputTokens:
|
|
82
|
+
maxOutputTokens: null,
|
|
84
83
|
temperature: 0.7,
|
|
85
84
|
topP: 0.9,
|
|
86
|
-
topK:
|
|
85
|
+
topK: 193.77,
|
|
87
86
|
promptCacheKey: "<value>",
|
|
88
87
|
previousResponseId: "<id>",
|
|
89
88
|
prompt: {
|
|
@@ -96,25 +95,25 @@ async function run() {
|
|
|
96
95
|
},
|
|
97
96
|
},
|
|
98
97
|
include: [
|
|
99
|
-
"
|
|
98
|
+
"reasoning.encrypted_content",
|
|
100
99
|
],
|
|
101
|
-
background:
|
|
100
|
+
background: true,
|
|
102
101
|
safetyIdentifier: "<value>",
|
|
103
|
-
store:
|
|
102
|
+
store: true,
|
|
104
103
|
serviceTier: "auto",
|
|
105
104
|
truncation: "auto",
|
|
106
105
|
provider: {
|
|
107
|
-
allowFallbacks:
|
|
108
|
-
requireParameters:
|
|
106
|
+
allowFallbacks: null,
|
|
107
|
+
requireParameters: true,
|
|
109
108
|
dataCollection: "deny",
|
|
110
109
|
zdr: true,
|
|
111
110
|
order: [
|
|
112
111
|
"OpenAI",
|
|
113
112
|
],
|
|
114
|
-
only:
|
|
115
|
-
ignore: [
|
|
113
|
+
only: [
|
|
116
114
|
"OpenAI",
|
|
117
115
|
],
|
|
116
|
+
ignore: null,
|
|
118
117
|
quantizations: [
|
|
119
118
|
"fp16",
|
|
120
119
|
],
|
|
@@ -123,7 +122,7 @@ async function run() {
|
|
|
123
122
|
prompt: "1000",
|
|
124
123
|
completion: 1000,
|
|
125
124
|
image: 1000,
|
|
126
|
-
audio: 1000,
|
|
125
|
+
audio: "1000",
|
|
127
126
|
request: 1000,
|
|
128
127
|
},
|
|
129
128
|
experimental: {},
|
|
@@ -131,13 +130,13 @@ async function run() {
|
|
|
131
130
|
plugins: [
|
|
132
131
|
{
|
|
133
132
|
id: "file-parser",
|
|
134
|
-
maxFiles:
|
|
133
|
+
maxFiles: 4870.55,
|
|
135
134
|
pdf: {
|
|
136
|
-
engine: "
|
|
135
|
+
engine: "mistral-ocr",
|
|
137
136
|
},
|
|
138
137
|
},
|
|
139
138
|
],
|
|
140
|
-
user: "
|
|
139
|
+
user: "Elmer_Yundt72",
|
|
141
140
|
});
|
|
142
141
|
if (res.ok) {
|
|
143
142
|
const { value: result } = res;
|
package/REACT_QUERY.md
CHANGED
|
@@ -161,7 +161,6 @@ export function Example() {
|
|
|
161
161
|
model: "anthropic/claude-4.5-sonnet-20250929",
|
|
162
162
|
models: [
|
|
163
163
|
"<value 1>",
|
|
164
|
-
"<value 2>",
|
|
165
164
|
],
|
|
166
165
|
text: {
|
|
167
166
|
format: {
|
|
@@ -170,15 +169,15 @@ export function Example() {
|
|
|
170
169
|
verbosity: "medium",
|
|
171
170
|
},
|
|
172
171
|
reasoning: {
|
|
173
|
-
effort: "
|
|
172
|
+
effort: "high",
|
|
174
173
|
summary: "auto",
|
|
175
|
-
maxTokens:
|
|
174
|
+
maxTokens: 8661.16,
|
|
176
175
|
enabled: true,
|
|
177
176
|
},
|
|
178
|
-
maxOutputTokens:
|
|
177
|
+
maxOutputTokens: null,
|
|
179
178
|
temperature: 0.7,
|
|
180
179
|
topP: 0.9,
|
|
181
|
-
topK:
|
|
180
|
+
topK: 193.77,
|
|
182
181
|
promptCacheKey: "<value>",
|
|
183
182
|
previousResponseId: "<id>",
|
|
184
183
|
prompt: {
|
|
@@ -191,25 +190,25 @@ export function Example() {
|
|
|
191
190
|
},
|
|
192
191
|
},
|
|
193
192
|
include: [
|
|
194
|
-
"
|
|
193
|
+
"reasoning.encrypted_content",
|
|
195
194
|
],
|
|
196
|
-
background:
|
|
195
|
+
background: true,
|
|
197
196
|
safetyIdentifier: "<value>",
|
|
198
|
-
store:
|
|
197
|
+
store: true,
|
|
199
198
|
serviceTier: "auto",
|
|
200
199
|
truncation: "auto",
|
|
201
200
|
provider: {
|
|
202
|
-
allowFallbacks:
|
|
203
|
-
requireParameters:
|
|
201
|
+
allowFallbacks: null,
|
|
202
|
+
requireParameters: true,
|
|
204
203
|
dataCollection: "deny",
|
|
205
204
|
zdr: true,
|
|
206
205
|
order: [
|
|
207
206
|
"OpenAI",
|
|
208
207
|
],
|
|
209
|
-
only:
|
|
210
|
-
ignore: [
|
|
208
|
+
only: [
|
|
211
209
|
"OpenAI",
|
|
212
210
|
],
|
|
211
|
+
ignore: null,
|
|
213
212
|
quantizations: [
|
|
214
213
|
"fp16",
|
|
215
214
|
],
|
|
@@ -218,7 +217,7 @@ export function Example() {
|
|
|
218
217
|
prompt: "1000",
|
|
219
218
|
completion: 1000,
|
|
220
219
|
image: 1000,
|
|
221
|
-
audio: 1000,
|
|
220
|
+
audio: "1000",
|
|
222
221
|
request: 1000,
|
|
223
222
|
},
|
|
224
223
|
experimental: {},
|
|
@@ -226,13 +225,13 @@ export function Example() {
|
|
|
226
225
|
plugins: [
|
|
227
226
|
{
|
|
228
227
|
id: "file-parser",
|
|
229
|
-
maxFiles:
|
|
228
|
+
maxFiles: 4870.55,
|
|
230
229
|
pdf: {
|
|
231
|
-
engine: "
|
|
230
|
+
engine: "mistral-ocr",
|
|
232
231
|
},
|
|
233
232
|
},
|
|
234
233
|
],
|
|
235
|
-
user: "
|
|
234
|
+
user: "Elmer_Yundt72",
|
|
236
235
|
});
|
|
237
236
|
}}
|
|
238
237
|
>
|