@openrouter/sdk 1.2.17 → 1.2.19
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 -5
- package/esm/models/autobetarouterplugin.js +1 -1
- package/esm/models/autorouterplugin.d.ts +5 -5
- package/esm/models/autorouterplugin.js +1 -1
- package/esm/models/fusionservertoolconfig.d.ts +1 -1
- package/jsr.json +1 -1
- package/package.json +6 -6
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.2.
|
|
52
|
+
readonly sdkVersion: "1.2.19";
|
|
53
53
|
readonly genVersion: "2.914.0";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.2.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.19 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.2.
|
|
29
|
+
sdkVersion: "1.2.19",
|
|
30
30
|
genVersion: "2.914.0",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 1.2.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 1.2.19 2.914.0 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
/**
|
|
4
|
-
* Named cost/quality setting. For auto-beta-router, tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100].
|
|
4
|
+
* Named cost/quality setting. For auto-beta-router, tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided.
|
|
5
5
|
*/
|
|
6
6
|
export declare const AutoBetaRouterPluginCostTier: {
|
|
7
7
|
readonly Low: "low";
|
|
@@ -11,22 +11,22 @@ export declare const AutoBetaRouterPluginCostTier: {
|
|
|
11
11
|
readonly Max: "max";
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
* Named cost/quality setting. For auto-beta-router, tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100].
|
|
14
|
+
* Named cost/quality setting. For auto-beta-router, tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided.
|
|
15
15
|
*/
|
|
16
16
|
export type AutoBetaRouterPluginCostTier = OpenEnum<typeof AutoBetaRouterPluginCostTier>;
|
|
17
17
|
export type AutoBetaRouterPlugin = {
|
|
18
18
|
/**
|
|
19
|
-
* List of model patterns to filter which models the auto-beta-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified,
|
|
19
|
+
* List of model patterns to filter which models the auto-beta-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, every model ranked for the classified task type is a candidate, falling back to a default model set when rankings are unavailable.
|
|
20
20
|
*/
|
|
21
21
|
allowedModels?: Array<string> | undefined;
|
|
22
22
|
/**
|
|
23
|
-
* Deprecated: Use cost_tier instead. Balances routing between cost and quality on a 0-10 scale. The auto-beta-router ranks models for the classified task type by community spend share, then filters candidates by their average cost per generation for that task. Higher values favor cheaper models: 10 keeps only models around the cheapest 10th percentile, while 0 permits models up to the 90th percentile for cost. Defaults to 9.
|
|
23
|
+
* Deprecated: Use cost_tier instead. Balances routing between cost and quality on a 0-10 scale. The auto-beta-router ranks models for the classified task type by community spend share, then filters candidates by their average cost per generation for that task. Higher values favor cheaper models: 10 keeps only models around the cheapest 10th percentile, while 0 permits models up to the 90th percentile for cost. Defaults to 9 when no cost setting is provided. It remains supported and retains ceiling behavior, but cost_tier takes precedence when both are provided.
|
|
24
24
|
*
|
|
25
25
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
26
26
|
*/
|
|
27
27
|
costQualityTradeoff?: number | undefined;
|
|
28
28
|
/**
|
|
29
|
-
* Named cost/quality setting. For auto-beta-router, tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100].
|
|
29
|
+
* Named cost/quality setting. For auto-beta-router, tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided.
|
|
30
30
|
*/
|
|
31
31
|
costTier?: AutoBetaRouterPluginCostTier | undefined;
|
|
32
32
|
/**
|
|
@@ -6,7 +6,7 @@ import * as z from "zod/v4";
|
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import * as openEnums from "../types/enums.js";
|
|
8
8
|
/**
|
|
9
|
-
* Named cost/quality setting. For auto-beta-router, tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100].
|
|
9
|
+
* Named cost/quality setting. For auto-beta-router, tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided.
|
|
10
10
|
*/
|
|
11
11
|
export const AutoBetaRouterPluginCostTier = {
|
|
12
12
|
Low: "low",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Named cost/quality setting. Tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided.
|
|
5
5
|
*/
|
|
6
6
|
export declare const AutoRouterPluginCostTier: {
|
|
7
7
|
readonly Low: "low";
|
|
@@ -11,22 +11,22 @@ export declare const AutoRouterPluginCostTier: {
|
|
|
11
11
|
readonly Max: "max";
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Named cost/quality setting. Tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided.
|
|
15
15
|
*/
|
|
16
16
|
export type AutoRouterPluginCostTier = OpenEnum<typeof AutoRouterPluginCostTier>;
|
|
17
17
|
export type AutoRouterPlugin = {
|
|
18
18
|
/**
|
|
19
|
-
* List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified,
|
|
19
|
+
* List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, every model ranked for the classified task type is a candidate, falling back to a default model set when rankings are unavailable.
|
|
20
20
|
*/
|
|
21
21
|
allowedModels?: Array<string> | undefined;
|
|
22
22
|
/**
|
|
23
|
-
* Deprecated: Use cost_tier instead.
|
|
23
|
+
* Deprecated: Use cost_tier instead. Balances routing between cost and quality on a 0-10 scale. The auto-router ranks models for the classified task type by community spend share, then filters candidates by their average cost per generation for that task. Higher values favor cheaper models: 10 keeps only models around the cheapest 10th percentile, while 0 permits models up to the 90th percentile for cost. Defaults to 9 when no cost setting is provided. It remains supported and retains ceiling behavior, but cost_tier takes precedence when both are provided.
|
|
24
24
|
*
|
|
25
25
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
26
26
|
*/
|
|
27
27
|
costQualityTradeoff?: number | undefined;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Named cost/quality setting. Tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided.
|
|
30
30
|
*/
|
|
31
31
|
costTier?: AutoRouterPluginCostTier | undefined;
|
|
32
32
|
/**
|
|
@@ -6,7 +6,7 @@ import * as z from "zod/v4";
|
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import * as openEnums from "../types/enums.js";
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Named cost/quality setting. Tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided.
|
|
10
10
|
*/
|
|
11
11
|
export const AutoRouterPluginCostTier = {
|
|
12
12
|
Low: "low",
|
|
@@ -55,7 +55,7 @@ export type FusionServerToolConfig = {
|
|
|
55
55
|
*/
|
|
56
56
|
cacheControl?: AnthropicCacheControlDirective | undefined;
|
|
57
57
|
/**
|
|
58
|
-
* Maximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text.
|
|
58
|
+
* Maximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. Defaults to 16000 when omitted.
|
|
59
59
|
*/
|
|
60
60
|
maxCompletionTokens?: number | undefined;
|
|
61
61
|
/**
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.19",
|
|
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",
|
|
77
76
|
"compile": "tsc",
|
|
78
|
-
"
|
|
79
|
-
"test:e2e": "vitest --run --project e2e",
|
|
77
|
+
"prepare": "npm run build",
|
|
80
78
|
"test:watch": "vitest --watch --project unit",
|
|
81
79
|
"typecheck:transit": "exit 0",
|
|
82
80
|
"postinstall": "node scripts/check-types.js || true",
|
|
83
|
-
"
|
|
84
|
-
"test:
|
|
81
|
+
"test": "vitest --run --project unit",
|
|
82
|
+
"test:e2e": "vitest --run --project e2e",
|
|
83
|
+
"test:transit": "exit 0",
|
|
84
|
+
"typecheck": "tsc --noEmit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|