@openrouter/sdk 1.3.23 → 1.3.24
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
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.3.
|
|
53
|
+
readonly sdkVersion: "1.3.24";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.3.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.3.24 2.914.0 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.3.
|
|
32
|
+
sdkVersion: "1.3.24",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.3.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.3.24 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -3,6 +3,7 @@ import { OpenEnum } from "../types/enums.js";
|
|
|
3
3
|
import { PreferredMaxLatency, PreferredMaxLatency$Outbound } from "./preferredmaxlatency.js";
|
|
4
4
|
import { PreferredMinThroughput, PreferredMinThroughput$Outbound } from "./preferredminthroughput.js";
|
|
5
5
|
import { ProviderName } from "./providername.js";
|
|
6
|
+
import { ProviderOptions, ProviderOptions$Outbound } from "./provideroptions.js";
|
|
6
7
|
import { ProviderSort } from "./providersort.js";
|
|
7
8
|
import { ProviderSortConfig, ProviderSortConfig$Outbound } from "./providersortconfig.js";
|
|
8
9
|
import { Quantization } from "./quantization.js";
|
|
@@ -96,6 +97,10 @@ export type ProviderPreferences = {
|
|
|
96
97
|
* List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
|
|
97
98
|
*/
|
|
98
99
|
only?: Array<ProviderName | string> | null | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped.
|
|
102
|
+
*/
|
|
103
|
+
options?: ProviderOptions | undefined;
|
|
99
104
|
/**
|
|
100
105
|
* An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
|
|
101
106
|
*/
|
|
@@ -166,6 +171,7 @@ export type ProviderPreferences$Outbound = {
|
|
|
166
171
|
ignore?: Array<string | string> | null | undefined;
|
|
167
172
|
max_price?: MaxPrice$Outbound | undefined;
|
|
168
173
|
only?: Array<string | string> | null | undefined;
|
|
174
|
+
options?: ProviderOptions$Outbound | undefined;
|
|
169
175
|
order?: Array<string | string> | null | undefined;
|
|
170
176
|
preferred_max_latency?: PreferredMaxLatency$Outbound | null | undefined;
|
|
171
177
|
preferred_min_throughput?: PreferredMinThroughput$Outbound | null | undefined;
|
|
@@ -8,6 +8,7 @@ import * as openEnums from "../types/enums.js";
|
|
|
8
8
|
import { PreferredMaxLatency$outboundSchema, } from "./preferredmaxlatency.js";
|
|
9
9
|
import { PreferredMinThroughput$outboundSchema, } from "./preferredminthroughput.js";
|
|
10
10
|
import { ProviderName$outboundSchema } from "./providername.js";
|
|
11
|
+
import { ProviderOptions$outboundSchema, } from "./provideroptions.js";
|
|
11
12
|
import { ProviderSort$outboundSchema } from "./providersort.js";
|
|
12
13
|
import { ProviderSortConfig$outboundSchema, } from "./providersortconfig.js";
|
|
13
14
|
import { Quantization$outboundSchema } from "./quantization.js";
|
|
@@ -66,6 +67,7 @@ export const ProviderPreferences$outboundSchema = z.object({
|
|
|
66
67
|
maxPrice: z.lazy(() => MaxPrice$outboundSchema).optional(),
|
|
67
68
|
only: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()])))
|
|
68
69
|
.optional(),
|
|
70
|
+
options: ProviderOptions$outboundSchema.optional(),
|
|
69
71
|
order: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()])))
|
|
70
72
|
.optional(),
|
|
71
73
|
preferredMaxLatency: z.nullable(PreferredMaxLatency$outboundSchema)
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.24",
|
|
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 && node scripts/unbarrel-imports.js",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"test:transit": "exit 0",
|
|
77
76
|
"typecheck": "tsc --noEmit",
|
|
77
|
+
"typecheck:transit": "exit 0",
|
|
78
78
|
"postinstall": "node scripts/check-types.js || true",
|
|
79
|
-
"prepare": "npm run build",
|
|
80
79
|
"test": "vitest --run --project unit",
|
|
81
80
|
"test:e2e": "vitest --run --project e2e",
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
81
|
+
"compile": "tsc && node scripts/unbarrel-imports.js",
|
|
82
|
+
"prepare": "npm run build",
|
|
83
|
+
"test:transit": "exit 0",
|
|
84
|
+
"test:watch": "vitest --watch --project unit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|