@openrouter/sdk 1.1.20 → 1.1.21
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/autobetarouterplugin.d.ts +5 -0
- package/esm/models/autobetarouterplugin.js +2 -0
- package/esm/models/autorouterplugin.d.ts +5 -0
- package/esm/models/autorouterplugin.js +2 -0
- package/jsr.json +1 -1
- package/package.json +5 -5
package/esm/lib/config.d.ts
CHANGED
|
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
49
49
|
export declare const SDK_METADATA: {
|
|
50
50
|
readonly language: "typescript";
|
|
51
51
|
readonly openapiDocVersion: "1.0.0";
|
|
52
|
-
readonly sdkVersion: "1.1.
|
|
52
|
+
readonly sdkVersion: "1.1.21";
|
|
53
53
|
readonly genVersion: "2.914.0";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.1.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.1.21 2.914.0 1.0.0 @openrouter/sdk";
|
|
55
55
|
};
|
|
56
56
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -26,8 +26,8 @@ export function serverURLFromOptions(options) {
|
|
|
26
26
|
export const SDK_METADATA = {
|
|
27
27
|
language: "typescript",
|
|
28
28
|
openapiDocVersion: "1.0.0",
|
|
29
|
-
sdkVersion: "1.1.
|
|
29
|
+
sdkVersion: "1.1.21",
|
|
30
30
|
genVersion: "2.914.0",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 1.1.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 1.1.21 2.914.0 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
|
@@ -33,6 +33,10 @@ export type AutoBetaRouterPlugin = {
|
|
|
33
33
|
* Set to false to disable the auto-beta-router plugin for this request. Defaults to true.
|
|
34
34
|
*/
|
|
35
35
|
enabled?: boolean | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* List of model patterns to exclude from auto-beta-router selection. Supports wildcards (e.g., "meta-llama/*" excludes all Llama models). Applied after allowed_models, so an excluded pattern always wins over an allowed one.
|
|
38
|
+
*/
|
|
39
|
+
excludedModels?: Array<string> | undefined;
|
|
36
40
|
id: "auto-beta-router";
|
|
37
41
|
};
|
|
38
42
|
/** @internal */
|
|
@@ -43,6 +47,7 @@ export type AutoBetaRouterPlugin$Outbound = {
|
|
|
43
47
|
cost_quality_tradeoff?: number | undefined;
|
|
44
48
|
cost_tier?: string | undefined;
|
|
45
49
|
enabled?: boolean | undefined;
|
|
50
|
+
excluded_models?: Array<string> | undefined;
|
|
46
51
|
id: "auto-beta-router";
|
|
47
52
|
};
|
|
48
53
|
/** @internal */
|
|
@@ -23,12 +23,14 @@ export const AutoBetaRouterPlugin$outboundSchema = z.object({
|
|
|
23
23
|
costQualityTradeoff: z.int().optional(),
|
|
24
24
|
costTier: AutoBetaRouterPluginCostTier$outboundSchema.optional(),
|
|
25
25
|
enabled: z.boolean().optional(),
|
|
26
|
+
excludedModels: z.array(z.string()).optional(),
|
|
26
27
|
id: z.literal("auto-beta-router"),
|
|
27
28
|
}).transform((v) => {
|
|
28
29
|
return remap$(v, {
|
|
29
30
|
allowedModels: "allowed_models",
|
|
30
31
|
costQualityTradeoff: "cost_quality_tradeoff",
|
|
31
32
|
costTier: "cost_tier",
|
|
33
|
+
excludedModels: "excluded_models",
|
|
32
34
|
});
|
|
33
35
|
});
|
|
34
36
|
export function autoBetaRouterPluginToJSON(autoBetaRouterPlugin) {
|
|
@@ -33,6 +33,10 @@ export type AutoRouterPlugin = {
|
|
|
33
33
|
* Set to false to disable the auto-router plugin for this request. Defaults to true.
|
|
34
34
|
*/
|
|
35
35
|
enabled?: boolean | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* List of model patterns to exclude from auto-router selection. Supports wildcards (e.g., "meta-llama/*" excludes all Llama models). Applied after allowed_models, so an excluded pattern always wins over an allowed one.
|
|
38
|
+
*/
|
|
39
|
+
excludedModels?: Array<string> | undefined;
|
|
36
40
|
id: "auto-router";
|
|
37
41
|
/**
|
|
38
42
|
* When true, reuses the model from the most recent assistant message's `model` attribute for subsequent turns. Defaults to false.
|
|
@@ -47,6 +51,7 @@ export type AutoRouterPlugin$Outbound = {
|
|
|
47
51
|
cost_quality_tradeoff?: number | undefined;
|
|
48
52
|
cost_tier?: string | undefined;
|
|
49
53
|
enabled?: boolean | undefined;
|
|
54
|
+
excluded_models?: Array<string> | undefined;
|
|
50
55
|
id: "auto-router";
|
|
51
56
|
pin_model?: boolean | undefined;
|
|
52
57
|
};
|
|
@@ -23,6 +23,7 @@ export const AutoRouterPlugin$outboundSchema = z.object({
|
|
|
23
23
|
costQualityTradeoff: z.int().optional(),
|
|
24
24
|
costTier: AutoRouterPluginCostTier$outboundSchema.optional(),
|
|
25
25
|
enabled: z.boolean().optional(),
|
|
26
|
+
excludedModels: z.array(z.string()).optional(),
|
|
26
27
|
id: z.literal("auto-router"),
|
|
27
28
|
pinModel: z.boolean().optional(),
|
|
28
29
|
}).transform((v) => {
|
|
@@ -30,6 +31,7 @@ export const AutoRouterPlugin$outboundSchema = z.object({
|
|
|
30
31
|
allowedModels: "allowed_models",
|
|
31
32
|
costQualityTradeoff: "cost_quality_tradeoff",
|
|
32
33
|
costTier: "cost_tier",
|
|
34
|
+
excludedModels: "excluded_models",
|
|
33
35
|
pinModel: "pin_model",
|
|
34
36
|
});
|
|
35
37
|
});
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.21",
|
|
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": [
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
74
74
|
"build": "tsc",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
+
"typecheck": "tsc --noEmit",
|
|
76
77
|
"typecheck:transit": "exit 0",
|
|
77
|
-
"test:transit": "exit 0",
|
|
78
|
-
"test:watch": "vitest --watch --project unit",
|
|
79
|
-
"compile": "tsc",
|
|
80
78
|
"postinstall": "node scripts/check-types.js || true",
|
|
81
79
|
"prepare": "npm run build",
|
|
82
80
|
"test": "vitest --run --project unit",
|
|
81
|
+
"compile": "tsc",
|
|
83
82
|
"test:e2e": "vitest --run --project e2e",
|
|
84
|
-
"
|
|
83
|
+
"test:transit": "exit 0",
|
|
84
|
+
"test:watch": "vitest --watch --project unit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|