@openrouter/sdk 1.4.5 → 1.4.6
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/chatrequest.d.ts +4 -3
- package/esm/models/chatrequest.js +2 -1
- package/esm/models/providerresponse.d.ts +1 -0
- package/esm/models/providerresponse.js +1 -0
- package/esm/models/responsesrequest.d.ts +4 -3
- package/esm/models/responsesrequest.js +2 -1
- package/jsr.json +1 -1
- package/package.json +6 -6
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.4.
|
|
53
|
+
readonly sdkVersion: "1.4.6";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.4.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.4.6 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.4.
|
|
32
|
+
sdkVersion: "1.4.6",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.4.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.4.6 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -84,7 +84,7 @@ export type ChatRequestReasoningEffort = OpenEnum<typeof ChatRequestReasoningEff
|
|
|
84
84
|
*/
|
|
85
85
|
export type ResponseFormat = ChatFormatGrammarConfig | ChatFormatJsonObjectConfig | ChatFormatJsonSchemaConfig | ChatFormatPythonConfig | ChatFormatTextConfig;
|
|
86
86
|
/**
|
|
87
|
-
* The service tier to use for processing this request. `fast` is accepted as an alias for `priority`.
|
|
87
|
+
* The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints.
|
|
88
88
|
*/
|
|
89
89
|
export declare const ChatRequestServiceTier: {
|
|
90
90
|
readonly Auto: "auto";
|
|
@@ -93,9 +93,10 @@ export declare const ChatRequestServiceTier: {
|
|
|
93
93
|
readonly Flex: "flex";
|
|
94
94
|
readonly Priority: "priority";
|
|
95
95
|
readonly Scale: "scale";
|
|
96
|
+
readonly Ultrafast: "ultrafast";
|
|
96
97
|
};
|
|
97
98
|
/**
|
|
98
|
-
* The service tier to use for processing this request. `fast` is accepted as an alias for `priority`.
|
|
99
|
+
* The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints.
|
|
99
100
|
*/
|
|
100
101
|
export type ChatRequestServiceTier = OpenEnum<typeof ChatRequestServiceTier>;
|
|
101
102
|
/**
|
|
@@ -214,7 +215,7 @@ export type ChatRequest = {
|
|
|
214
215
|
*/
|
|
215
216
|
seed?: number | null | undefined;
|
|
216
217
|
/**
|
|
217
|
-
* The service tier to use for processing this request. `fast` is accepted as an alias for `priority`.
|
|
218
|
+
* The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints.
|
|
218
219
|
*/
|
|
219
220
|
serviceTier?: ChatRequestServiceTier | null | undefined;
|
|
220
221
|
/**
|
|
@@ -65,7 +65,7 @@ export const ChatRequestReasoningEffort = {
|
|
|
65
65
|
None: "none",
|
|
66
66
|
};
|
|
67
67
|
/**
|
|
68
|
-
* The service tier to use for processing this request. `fast` is accepted as an alias for `priority`.
|
|
68
|
+
* The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints.
|
|
69
69
|
*/
|
|
70
70
|
export const ChatRequestServiceTier = {
|
|
71
71
|
Auto: "auto",
|
|
@@ -74,6 +74,7 @@ export const ChatRequestServiceTier = {
|
|
|
74
74
|
Flex: "flex",
|
|
75
75
|
Priority: "priority",
|
|
76
76
|
Scale: "scale",
|
|
77
|
+
Ultrafast: "ultrafast",
|
|
77
78
|
};
|
|
78
79
|
/** @internal */
|
|
79
80
|
export const Modality$outboundSchema = openEnums
|
|
@@ -159,6 +159,7 @@ export type ProviderResponseProviderName = OpenEnum<typeof ProviderResponseProvi
|
|
|
159
159
|
export declare const RoutedServiceTier: {
|
|
160
160
|
readonly Flex: "flex";
|
|
161
161
|
readonly Priority: "priority";
|
|
162
|
+
readonly Ultrafast: "ultrafast";
|
|
162
163
|
};
|
|
163
164
|
/**
|
|
164
165
|
* The service tier this request was routed to (e.g. flex, priority). The tier actually applied and billed is determined by the provider response and may differ.
|
|
@@ -159,6 +159,7 @@ export const ProviderResponseProviderName = {
|
|
|
159
159
|
export const RoutedServiceTier = {
|
|
160
160
|
Flex: "flex",
|
|
161
161
|
Priority: "priority",
|
|
162
|
+
Ultrafast: "ultrafast",
|
|
162
163
|
};
|
|
163
164
|
/** @internal */
|
|
164
165
|
export const ProviderResponseProviderName$inboundSchema = openEnums.inboundSchema(ProviderResponseProviderName);
|
|
@@ -73,7 +73,7 @@ export type ReasoningConfig = {
|
|
|
73
73
|
maxTokens?: number | null | undefined;
|
|
74
74
|
};
|
|
75
75
|
/**
|
|
76
|
-
* The service tier to use for processing this request. `fast` is accepted as an alias for `priority`.
|
|
76
|
+
* The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints.
|
|
77
77
|
*/
|
|
78
78
|
export declare const ResponsesRequestServiceTier: {
|
|
79
79
|
readonly Auto: "auto";
|
|
@@ -82,9 +82,10 @@ export declare const ResponsesRequestServiceTier: {
|
|
|
82
82
|
readonly Flex: "flex";
|
|
83
83
|
readonly Priority: "priority";
|
|
84
84
|
readonly Scale: "scale";
|
|
85
|
+
readonly Ultrafast: "ultrafast";
|
|
85
86
|
};
|
|
86
87
|
/**
|
|
87
|
-
* The service tier to use for processing this request. `fast` is accepted as an alias for `priority`.
|
|
88
|
+
* The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints.
|
|
88
89
|
*/
|
|
89
90
|
export type ResponsesRequestServiceTier = OpenEnum<typeof ResponsesRequestServiceTier>;
|
|
90
91
|
/**
|
|
@@ -234,7 +235,7 @@ export type ResponsesRequest = {
|
|
|
234
235
|
*/
|
|
235
236
|
safetyIdentifier?: string | null | undefined;
|
|
236
237
|
/**
|
|
237
|
-
* The service tier to use for processing this request. `fast` is accepted as an alias for `priority`.
|
|
238
|
+
* The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints.
|
|
238
239
|
*/
|
|
239
240
|
serviceTier?: ResponsesRequestServiceTier | null | undefined;
|
|
240
241
|
/**
|
|
@@ -63,7 +63,7 @@ import { WebSearchPlugin$outboundSchema, } from "./websearchplugin.js";
|
|
|
63
63
|
import { WebSearchServerTool$outboundSchema, } from "./websearchservertool.js";
|
|
64
64
|
import { WebSearchServerToolOpenRouter$outboundSchema, } from "./websearchservertoolopenrouter.js";
|
|
65
65
|
/**
|
|
66
|
-
* The service tier to use for processing this request. `fast` is accepted as an alias for `priority`.
|
|
66
|
+
* The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints.
|
|
67
67
|
*/
|
|
68
68
|
export const ResponsesRequestServiceTier = {
|
|
69
69
|
Auto: "auto",
|
|
@@ -72,6 +72,7 @@ export const ResponsesRequestServiceTier = {
|
|
|
72
72
|
Flex: "flex",
|
|
73
73
|
Priority: "priority",
|
|
74
74
|
Scale: "scale",
|
|
75
|
+
Ultrafast: "ultrafast",
|
|
75
76
|
};
|
|
76
77
|
/** @internal */
|
|
77
78
|
export const ResponsesRequestPlugin$outboundSchema = z.union([
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.6",
|
|
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
|
+
"access": "public",
|
|
25
|
+
"provenance": true
|
|
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
|
+
"typecheck": "tsc --noEmit",
|
|
76
77
|
"compile": "tsc && node scripts/unbarrel-imports.js",
|
|
77
78
|
"postinstall": "node scripts/check-types.js || true",
|
|
78
79
|
"prepare": "npm run build",
|
|
79
80
|
"test": "vitest --run --project unit",
|
|
80
|
-
"test:transit": "exit 0",
|
|
81
81
|
"test:watch": "vitest --watch --project unit",
|
|
82
|
+
"typecheck:transit": "exit 0",
|
|
82
83
|
"test:e2e": "vitest --run --project e2e",
|
|
83
|
-
"
|
|
84
|
-
"typecheck:transit": "exit 0"
|
|
84
|
+
"test:transit": "exit 0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|