@openrouter/sdk 1.3.0 → 1.3.2
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.2";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.3.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.3.2 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.2",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.3.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.3.2 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -14,7 +14,7 @@ export type InternChatCompletionRequest = {
|
|
|
14
14
|
*/
|
|
15
15
|
messages: Array<InternChatMessage>;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Accepted for OpenAI compatibility and ignored. Streamed chunks report the model the intern actually used, or `openrouter/intern` when it did not report one.
|
|
18
18
|
*/
|
|
19
19
|
model?: string | undefined;
|
|
20
20
|
/**
|
|
@@ -140,6 +140,10 @@ export type GetCurrentKeyData = {
|
|
|
140
140
|
* Type of limit reset for the API key
|
|
141
141
|
*/
|
|
142
142
|
limitReset: string | null;
|
|
143
|
+
/**
|
|
144
|
+
* The ID of the organization that owns this API key, or null when an individual account owns it.
|
|
145
|
+
*/
|
|
146
|
+
organizationId: string | null;
|
|
143
147
|
/**
|
|
144
148
|
* Legacy rate limit information about a key. Will always return -1.
|
|
145
149
|
*
|
|
@@ -162,6 +166,10 @@ export type GetCurrentKeyData = {
|
|
|
162
166
|
* OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
|
|
163
167
|
*/
|
|
164
168
|
usageWeekly: number;
|
|
169
|
+
/**
|
|
170
|
+
* The ID of the workspace this API key spends in, or null when no active workspace resolved for it, for example because the key's workspace was deleted.
|
|
171
|
+
*/
|
|
172
|
+
workspaceId: string | null;
|
|
165
173
|
};
|
|
166
174
|
/**
|
|
167
175
|
* API key details
|
|
@@ -54,11 +54,13 @@ export const GetCurrentKeyData$inboundSchema = z.object({
|
|
|
54
54
|
limit: z.nullable(z.number()),
|
|
55
55
|
limit_remaining: z.nullable(z.number()),
|
|
56
56
|
limit_reset: z.nullable(z.string()),
|
|
57
|
+
organization_id: z.nullable(z.string()),
|
|
57
58
|
rate_limit: z.lazy(() => RateLimit$inboundSchema),
|
|
58
59
|
usage: z.number(),
|
|
59
60
|
usage_daily: z.number(),
|
|
60
61
|
usage_monthly: z.number(),
|
|
61
62
|
usage_weekly: z.number(),
|
|
63
|
+
workspace_id: z.nullable(z.string()),
|
|
62
64
|
}).transform((v) => {
|
|
63
65
|
return remap$(v, {
|
|
64
66
|
"allowed_data_regions": "allowedDataRegions",
|
|
@@ -75,10 +77,12 @@ export const GetCurrentKeyData$inboundSchema = z.object({
|
|
|
75
77
|
"is_provisioning_key": "isProvisioningKey",
|
|
76
78
|
"limit_remaining": "limitRemaining",
|
|
77
79
|
"limit_reset": "limitReset",
|
|
80
|
+
"organization_id": "organizationId",
|
|
78
81
|
"rate_limit": "rateLimit",
|
|
79
82
|
"usage_daily": "usageDaily",
|
|
80
83
|
"usage_monthly": "usageMonthly",
|
|
81
84
|
"usage_weekly": "usageWeekly",
|
|
85
|
+
"workspace_id": "workspaceId",
|
|
82
86
|
});
|
|
83
87
|
});
|
|
84
88
|
export function getCurrentKeyDataFromJSON(jsonString) {
|
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.2",
|
|
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,14 +73,14 @@
|
|
|
73
73
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
74
74
|
"build": "tsc",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"compile": "tsc",
|
|
77
76
|
"postinstall": "node scripts/check-types.js || true",
|
|
77
|
+
"prepare": "npm run build",
|
|
78
78
|
"test:e2e": "vitest --run --project e2e",
|
|
79
|
-
"test:transit": "exit 0",
|
|
80
79
|
"typecheck": "tsc --noEmit",
|
|
81
80
|
"typecheck:transit": "exit 0",
|
|
82
|
-
"
|
|
81
|
+
"compile": "tsc",
|
|
83
82
|
"test": "vitest --run --project unit",
|
|
83
|
+
"test:transit": "exit 0",
|
|
84
84
|
"test:watch": "vitest --watch --project unit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|