@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.
Files changed (51) hide show
  1. package/FUNCTIONS.md +15 -16
  2. package/REACT_QUERY.md +15 -16
  3. package/README.md +138 -110
  4. package/esm/funcs/betaResponsesSend.d.ts +2 -2
  5. package/esm/funcs/betaResponsesSend.js +3 -3
  6. package/esm/funcs/chatSend.d.ts +1 -1
  7. package/esm/funcs/modelsList.d.ts +2 -1
  8. package/esm/funcs/modelsList.js +3 -6
  9. package/esm/funcs/oAuthCreateAuthCode.d.ts +18 -0
  10. package/esm/funcs/oAuthCreateAuthCode.js +82 -0
  11. package/esm/funcs/oAuthCreateAuthorizationUrl.d.ts +2 -2
  12. package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.d.ts +18 -0
  13. package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.js +82 -0
  14. package/esm/lib/config.d.ts +2 -2
  15. package/esm/lib/config.js +2 -2
  16. package/esm/lib/event-streams.d.ts +1 -1
  17. package/esm/models/chatgenerationtokenusage.d.ts +2 -2
  18. package/esm/models/chatgenerationtokenusage.js +2 -4
  19. package/esm/models/operations/createauthkeyscode.d.ts +145 -0
  20. package/esm/models/operations/createauthkeyscode.js +146 -0
  21. package/esm/models/operations/createresponses.d.ts +58 -0
  22. package/esm/models/operations/createresponses.js +80 -0
  23. package/esm/models/operations/exchangeauthcodeforapikey.d.ts +104 -0
  24. package/esm/models/operations/exchangeauthcodeforapikey.js +111 -0
  25. package/esm/models/operations/getmodels.d.ts +0 -26
  26. package/esm/models/operations/getmodels.js +0 -30
  27. package/esm/models/operations/index.d.ts +3 -1
  28. package/esm/models/operations/index.js +3 -1
  29. package/esm/models/operations/sendchatcompletionrequest.d.ts +1 -1
  30. package/esm/models/operations/sendchatcompletionrequest.js +2 -1
  31. package/esm/react-query/betaResponsesSend.d.ts +1 -1
  32. package/esm/react-query/index.d.ts +2 -0
  33. package/esm/react-query/index.js +2 -0
  34. package/esm/react-query/modelsList.d.ts +2 -7
  35. package/esm/react-query/modelsList.js +0 -2
  36. package/esm/react-query/oAuthCreateAuthCode.d.ts +23 -0
  37. package/esm/react-query/oAuthCreateAuthCode.js +42 -0
  38. package/esm/react-query/oAuthExchangeAuthCodeForAPIKey.d.ts +23 -0
  39. package/esm/react-query/oAuthExchangeAuthCodeForAPIKey.js +42 -0
  40. package/esm/sdk/chat.d.ts +1 -1
  41. package/esm/sdk/models.d.ts +1 -1
  42. package/esm/sdk/oauth.d.ts +46 -0
  43. package/esm/sdk/oauth.js +67 -0
  44. package/esm/sdk/responses.d.ts +2 -2
  45. package/esm/sdk/sdk.d.ts +3 -0
  46. package/esm/sdk/sdk.js +4 -0
  47. package/jsr.json +1 -1
  48. package/package.json +3 -1
  49. package/vitest.config.ts +16 -1
  50. package/esm/models/operations/createapialpharesponses.d.ts +0 -58
  51. 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: "minimal",
77
+ effort: "high",
79
78
  summary: "auto",
80
- maxTokens: 5632.72,
79
+ maxTokens: 8661.16,
81
80
  enabled: true,
82
81
  },
83
- maxOutputTokens: 5913.88,
82
+ maxOutputTokens: null,
84
83
  temperature: 0.7,
85
84
  topP: 0.9,
86
- topK: 1770.66,
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
- "file_search_call.results",
98
+ "reasoning.encrypted_content",
100
99
  ],
101
- background: false,
100
+ background: true,
102
101
  safetyIdentifier: "<value>",
103
- store: false,
102
+ store: true,
104
103
  serviceTier: "auto",
105
104
  truncation: "auto",
106
105
  provider: {
107
- allowFallbacks: false,
108
- requireParameters: false,
106
+ allowFallbacks: null,
107
+ requireParameters: true,
109
108
  dataCollection: "deny",
110
109
  zdr: true,
111
110
  order: [
112
111
  "OpenAI",
113
112
  ],
114
- only: null,
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: 6167.86,
133
+ maxFiles: 4870.55,
135
134
  pdf: {
136
- engine: "native",
135
+ engine: "mistral-ocr",
137
136
  },
138
137
  },
139
138
  ],
140
- user: "Minnie.Ratke",
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: "minimal",
172
+ effort: "high",
174
173
  summary: "auto",
175
- maxTokens: 5632.72,
174
+ maxTokens: 8661.16,
176
175
  enabled: true,
177
176
  },
178
- maxOutputTokens: 5913.88,
177
+ maxOutputTokens: null,
179
178
  temperature: 0.7,
180
179
  topP: 0.9,
181
- topK: 1770.66,
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
- "file_search_call.results",
193
+ "reasoning.encrypted_content",
195
194
  ],
196
- background: false,
195
+ background: true,
197
196
  safetyIdentifier: "<value>",
198
- store: false,
197
+ store: true,
199
198
  serviceTier: "auto",
200
199
  truncation: "auto",
201
200
  provider: {
202
- allowFallbacks: false,
203
- requireParameters: false,
201
+ allowFallbacks: null,
202
+ requireParameters: true,
204
203
  dataCollection: "deny",
205
204
  zdr: true,
206
205
  order: [
207
206
  "OpenAI",
208
207
  ],
209
- only: null,
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: 6167.86,
228
+ maxFiles: 4870.55,
230
229
  pdf: {
231
- engine: "native",
230
+ engine: "mistral-ocr",
232
231
  },
233
232
  },
234
233
  ],
235
- user: "Minnie.Ratke",
234
+ user: "Elmer_Yundt72",
236
235
  });
237
236
  }}
238
237
  >