@openrouter/sdk 1.5.85 → 1.5.86
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/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/byokproviderslug.d.ts +1 -0
- package/esm/models/byokproviderslug.js +1 -0
- package/esm/models/chatrequest.d.ts +22 -0
- package/esm/models/chatrequest.js +6 -0
- package/esm/models/imagegenerationproviderpreferences.d.ts +6 -0
- package/esm/models/imagegenerationproviderpreferences.js +1 -0
- package/esm/models/operations/listbyokkeys.d.ts +1 -0
- package/esm/models/operations/listbyokkeys.js +1 -0
- package/esm/models/providername.d.ts +1 -0
- package/esm/models/providername.js +1 -0
- package/esm/models/provideroptions.d.ts +6 -0
- package/esm/models/provideroptions.js +1 -0
- package/esm/models/providerresponse.d.ts +1 -0
- package/esm/models/providerresponse.js +1 -0
- package/esm/models/videogenerationrequest.d.ts +6 -0
- package/esm/models/videogenerationrequest.js +1 -0
- package/jsr.json +1 -1
- package/package.json +9 -9
package/esm/lib/config.d.ts
CHANGED
|
@@ -50,8 +50,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
50
50
|
export declare const SDK_METADATA: {
|
|
51
51
|
readonly language: "typescript";
|
|
52
52
|
readonly openapiDocVersion: "1.0.0";
|
|
53
|
-
readonly sdkVersion: "1.5.
|
|
53
|
+
readonly sdkVersion: "1.5.86";
|
|
54
54
|
readonly genVersion: "2.950.13";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.86 2.950.13 1.0.0 @openrouter/sdk";
|
|
56
56
|
};
|
|
57
57
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -29,8 +29,8 @@ export function serverURLFromOptions(options) {
|
|
|
29
29
|
export const SDK_METADATA = {
|
|
30
30
|
language: "typescript",
|
|
31
31
|
openapiDocVersion: "1.0.0",
|
|
32
|
-
sdkVersion: "1.5.
|
|
32
|
+
sdkVersion: "1.5.86",
|
|
33
33
|
genVersion: "2.950.13",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.5.86 2.950.13 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -110,6 +110,7 @@ export declare const BYOKProviderSlug: {
|
|
|
110
110
|
readonly Seed: "seed";
|
|
111
111
|
readonly Siliconflow: "siliconflow";
|
|
112
112
|
readonly Sourceful: "sourceful";
|
|
113
|
+
readonly Speechify: "speechify";
|
|
113
114
|
readonly Stepfun: "stepfun";
|
|
114
115
|
readonly Streamlake: "streamlake";
|
|
115
116
|
readonly Switchpoint: "switchpoint";
|
|
@@ -27,6 +27,8 @@ import { ParetoRouterPlugin, ParetoRouterPlugin$Outbound } from "./paretorouterp
|
|
|
27
27
|
import { Prediction, Prediction$Outbound } from "./prediction.js";
|
|
28
28
|
import { PromptCacheOptions, PromptCacheOptions$Outbound } from "./promptcacheoptions.js";
|
|
29
29
|
import { ProviderPreferences, ProviderPreferences$Outbound } from "./providerpreferences.js";
|
|
30
|
+
import { ReasoningContext } from "./reasoningcontext.js";
|
|
31
|
+
import { ReasoningMode } from "./reasoningmode.js";
|
|
30
32
|
import { ResponseHealingPlugin, ResponseHealingPlugin$Outbound } from "./responsehealingplugin.js";
|
|
31
33
|
import { StopServerToolsWhenCondition, StopServerToolsWhenCondition$Outbound } from "./stopservertoolswhencondition.js";
|
|
32
34
|
import { SwitchyardRouterPlugin, SwitchyardRouterPlugin$Outbound } from "./switchyardrouterplugin.js";
|
|
@@ -60,14 +62,30 @@ export type ChatRequestEffort = OpenEnum<typeof ChatRequestEffort>;
|
|
|
60
62
|
* Configuration options for reasoning models
|
|
61
63
|
*/
|
|
62
64
|
export type ChatRequestReasoning = {
|
|
65
|
+
/**
|
|
66
|
+
* 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.
|
|
67
|
+
*/
|
|
68
|
+
context?: ReasoningContext | null | undefined;
|
|
63
69
|
/**
|
|
64
70
|
* Constrains effort on reasoning for reasoning models
|
|
65
71
|
*/
|
|
66
72
|
effort?: ChatRequestEffort | null | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Enables reasoning with default settings. Defaults to being inferred from `effort` or `max_tokens`.
|
|
75
|
+
*/
|
|
76
|
+
enabled?: boolean | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* When true, the model still reasons but the reasoning is omitted from the response. Defaults to false.
|
|
79
|
+
*/
|
|
80
|
+
exclude?: boolean | undefined;
|
|
67
81
|
/**
|
|
68
82
|
* Maximum number of tokens the model may spend on reasoning, for models that take a reasoning token budget instead of an effort level. Cannot be combined with `reasoning.effort` or the top-level `reasoning_effort`: a request that sets both is rejected with "Only one of "reasoning.effort" and "reasoning.max_tokens" can be specified".
|
|
69
83
|
*/
|
|
70
84
|
maxTokens?: number | null | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* 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.
|
|
87
|
+
*/
|
|
88
|
+
mode?: ReasoningMode | null | undefined;
|
|
71
89
|
summary?: ChatReasoningSummaryVerbosityEnum | null | undefined;
|
|
72
90
|
};
|
|
73
91
|
/**
|
|
@@ -297,8 +315,12 @@ export declare function chatRequestPluginToJSON(chatRequestPlugin: ChatRequestPl
|
|
|
297
315
|
export declare const ChatRequestEffort$outboundSchema: z.ZodType<string, ChatRequestEffort>;
|
|
298
316
|
/** @internal */
|
|
299
317
|
export type ChatRequestReasoning$Outbound = {
|
|
318
|
+
context?: string | null | undefined;
|
|
300
319
|
effort?: string | null | undefined;
|
|
320
|
+
enabled?: boolean | undefined;
|
|
321
|
+
exclude?: boolean | undefined;
|
|
301
322
|
max_tokens?: number | null | undefined;
|
|
323
|
+
mode?: string | null | undefined;
|
|
302
324
|
summary?: string | null | undefined;
|
|
303
325
|
};
|
|
304
326
|
/** @internal */
|
|
@@ -32,6 +32,8 @@ import { ParetoRouterPlugin$outboundSchema, } from "./paretorouterplugin.js";
|
|
|
32
32
|
import { Prediction$outboundSchema, } from "./prediction.js";
|
|
33
33
|
import { PromptCacheOptions$outboundSchema, } from "./promptcacheoptions.js";
|
|
34
34
|
import { ProviderPreferences$outboundSchema, } from "./providerpreferences.js";
|
|
35
|
+
import { ReasoningContext$outboundSchema, } from "./reasoningcontext.js";
|
|
36
|
+
import { ReasoningMode$outboundSchema, } from "./reasoningmode.js";
|
|
35
37
|
import { ResponseHealingPlugin$outboundSchema, } from "./responsehealingplugin.js";
|
|
36
38
|
import { StopServerToolsWhenCondition$outboundSchema, } from "./stopservertoolswhencondition.js";
|
|
37
39
|
import { SwitchyardRouterPlugin$outboundSchema, } from "./switchyardrouterplugin.js";
|
|
@@ -106,8 +108,12 @@ export function chatRequestPluginToJSON(chatRequestPlugin) {
|
|
|
106
108
|
export const ChatRequestEffort$outboundSchema = openEnums.outboundSchema(ChatRequestEffort);
|
|
107
109
|
/** @internal */
|
|
108
110
|
export const ChatRequestReasoning$outboundSchema = z.object({
|
|
111
|
+
context: z.nullable(ReasoningContext$outboundSchema).optional(),
|
|
109
112
|
effort: z.nullable(ChatRequestEffort$outboundSchema).optional(),
|
|
113
|
+
enabled: z.boolean().optional(),
|
|
114
|
+
exclude: z.boolean().optional(),
|
|
110
115
|
maxTokens: z.nullable(z.int()).optional(),
|
|
116
|
+
mode: z.nullable(ReasoningMode$outboundSchema).optional(),
|
|
111
117
|
summary: z.nullable(ChatReasoningSummaryVerbosityEnum$outboundSchema)
|
|
112
118
|
.optional(),
|
|
113
119
|
}).transform((v) => {
|
|
@@ -407,6 +407,9 @@ export type ImageGenerationProviderPreferencesOptions = {
|
|
|
407
407
|
sourceful?: {
|
|
408
408
|
[k: string]: any;
|
|
409
409
|
} | undefined;
|
|
410
|
+
speechify?: {
|
|
411
|
+
[k: string]: any;
|
|
412
|
+
} | undefined;
|
|
410
413
|
stealth?: {
|
|
411
414
|
[k: string]: any;
|
|
412
415
|
} | undefined;
|
|
@@ -920,6 +923,9 @@ export type ImageGenerationProviderPreferencesOptions$Outbound = {
|
|
|
920
923
|
sourceful?: {
|
|
921
924
|
[k: string]: any;
|
|
922
925
|
} | undefined;
|
|
926
|
+
speechify?: {
|
|
927
|
+
[k: string]: any;
|
|
928
|
+
} | undefined;
|
|
923
929
|
stealth?: {
|
|
924
930
|
[k: string]: any;
|
|
925
931
|
} | undefined;
|
|
@@ -152,6 +152,7 @@ export const ImageGenerationProviderPreferencesOptions$outboundSchema = z.object
|
|
|
152
152
|
sfCompute: z.record(z.string(), z.any()).optional(),
|
|
153
153
|
siliconflow: z.record(z.string(), z.any()).optional(),
|
|
154
154
|
sourceful: z.record(z.string(), z.any()).optional(),
|
|
155
|
+
speechify: z.record(z.string(), z.any()).optional(),
|
|
155
156
|
stealth: z.record(z.string(), z.any()).optional(),
|
|
156
157
|
stepfun: z.record(z.string(), z.any()).optional(),
|
|
157
158
|
streamlake: z.record(z.string(), z.any()).optional(),
|
|
@@ -134,6 +134,7 @@ export declare const Provider: {
|
|
|
134
134
|
readonly Seed: "seed";
|
|
135
135
|
readonly Siliconflow: "siliconflow";
|
|
136
136
|
readonly Sourceful: "sourceful";
|
|
137
|
+
readonly Speechify: "speechify";
|
|
137
138
|
readonly Stepfun: "stepfun";
|
|
138
139
|
readonly Streamlake: "streamlake";
|
|
139
140
|
readonly Switchpoint: "switchpoint";
|
|
@@ -104,6 +104,7 @@ export declare const ProviderName: {
|
|
|
104
104
|
readonly Seed: "Seed";
|
|
105
105
|
readonly SiliconFlow: "SiliconFlow";
|
|
106
106
|
readonly Sourceful: "Sourceful";
|
|
107
|
+
readonly Speechify: "Speechify";
|
|
107
108
|
readonly StepFun: "StepFun";
|
|
108
109
|
readonly Stealth: "Stealth";
|
|
109
110
|
readonly StreamLake: "StreamLake";
|
|
@@ -402,6 +402,9 @@ export type ProviderOptions = {
|
|
|
402
402
|
sourceful?: {
|
|
403
403
|
[k: string]: any;
|
|
404
404
|
} | undefined;
|
|
405
|
+
speechify?: {
|
|
406
|
+
[k: string]: any;
|
|
407
|
+
} | undefined;
|
|
405
408
|
stealth?: {
|
|
406
409
|
[k: string]: any;
|
|
407
410
|
} | undefined;
|
|
@@ -870,6 +873,9 @@ export type ProviderOptions$Outbound = {
|
|
|
870
873
|
sourceful?: {
|
|
871
874
|
[k: string]: any;
|
|
872
875
|
} | undefined;
|
|
876
|
+
speechify?: {
|
|
877
|
+
[k: string]: any;
|
|
878
|
+
} | undefined;
|
|
873
879
|
stealth?: {
|
|
874
880
|
[k: string]: any;
|
|
875
881
|
} | undefined;
|
|
@@ -139,6 +139,7 @@ export const ProviderOptions$outboundSchema = z.object({
|
|
|
139
139
|
sfCompute: z.record(z.string(), z.any()).optional(),
|
|
140
140
|
siliconflow: z.record(z.string(), z.any()).optional(),
|
|
141
141
|
sourceful: z.record(z.string(), z.any()).optional(),
|
|
142
|
+
speechify: z.record(z.string(), z.any()).optional(),
|
|
142
143
|
stealth: z.record(z.string(), z.any()).optional(),
|
|
143
144
|
stepfun: z.record(z.string(), z.any()).optional(),
|
|
144
145
|
streamlake: z.record(z.string(), z.any()).optional(),
|
|
@@ -137,6 +137,7 @@ export declare const ProviderResponseProviderName: {
|
|
|
137
137
|
readonly Seed: "Seed";
|
|
138
138
|
readonly SiliconFlow: "SiliconFlow";
|
|
139
139
|
readonly Sourceful: "Sourceful";
|
|
140
|
+
readonly Speechify: "Speechify";
|
|
140
141
|
readonly StepFun: "StepFun";
|
|
141
142
|
readonly Stealth: "Stealth";
|
|
142
143
|
readonly StreamLake: "StreamLake";
|
|
@@ -427,6 +427,9 @@ export type VideoGenerationRequestOptions = {
|
|
|
427
427
|
sourceful?: {
|
|
428
428
|
[k: string]: any;
|
|
429
429
|
} | undefined;
|
|
430
|
+
speechify?: {
|
|
431
|
+
[k: string]: any;
|
|
432
|
+
} | undefined;
|
|
430
433
|
stealth?: {
|
|
431
434
|
[k: string]: any;
|
|
432
435
|
} | undefined;
|
|
@@ -1014,6 +1017,9 @@ export type VideoGenerationRequestOptions$Outbound = {
|
|
|
1014
1017
|
sourceful?: {
|
|
1015
1018
|
[k: string]: any;
|
|
1016
1019
|
} | undefined;
|
|
1020
|
+
speechify?: {
|
|
1021
|
+
[k: string]: any;
|
|
1022
|
+
} | undefined;
|
|
1017
1023
|
stealth?: {
|
|
1018
1024
|
[k: string]: any;
|
|
1019
1025
|
} | undefined;
|
|
@@ -183,6 +183,7 @@ export const VideoGenerationRequestOptions$outboundSchema = z.object({
|
|
|
183
183
|
sfCompute: z.record(z.string(), z.any()).optional(),
|
|
184
184
|
siliconflow: z.record(z.string(), z.any()).optional(),
|
|
185
185
|
sourceful: z.record(z.string(), z.any()).optional(),
|
|
186
|
+
speechify: z.record(z.string(), z.any()).optional(),
|
|
186
187
|
stealth: z.record(z.string(), z.any()).optional(),
|
|
187
188
|
stepfun: z.record(z.string(), z.any()).optional(),
|
|
188
189
|
streamlake: z.record(z.string(), z.any()).optional(),
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.86",
|
|
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": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"license": "Apache-2.0",
|
|
22
22
|
"packageManager": "pnpm@10.22.0",
|
|
23
23
|
"publishConfig": {
|
|
24
|
-
"
|
|
25
|
-
"
|
|
24
|
+
"provenance": true,
|
|
25
|
+
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
28
|
"main": "./esm/index.js",
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
74
74
|
"build": "tsc && node scripts/unbarrel-imports.js",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"
|
|
76
|
+
"typecheck": "tsc --noEmit",
|
|
77
77
|
"postinstall": "node scripts/check-types.js || true",
|
|
78
|
+
"test:transit": "exit 0",
|
|
79
|
+
"typecheck:transit": "exit 0",
|
|
80
|
+
"compile": "tsc && node scripts/unbarrel-imports.js",
|
|
81
|
+
"prepare": "npm run build",
|
|
78
82
|
"test": "vitest --run --project unit",
|
|
79
83
|
"test:e2e": "vitest --run --project e2e",
|
|
80
|
-
"test:watch": "vitest --watch --project unit"
|
|
81
|
-
"prepare": "npm run build",
|
|
82
|
-
"test:transit": "exit 0",
|
|
83
|
-
"typecheck": "tsc --noEmit",
|
|
84
|
-
"typecheck:transit": "exit 0"
|
|
84
|
+
"test:watch": "vitest --watch --project unit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|