@openrouter/sdk 1.3.14 → 1.3.15
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/createworkspacerequest.d.ts +23 -0
- package/esm/models/createworkspacerequest.js +19 -0
- package/esm/models/updateworkspacerequest.d.ts +23 -0
- package/esm/models/updateworkspacerequest.js +19 -0
- package/esm/models/workspace.d.ts +4 -0
- package/esm/models/workspace.js +2 -0
- package/jsr.json +1 -1
- package/package.json +7 -7
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.15";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.3.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.3.15 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.15",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.3.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.3.15 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
export declare const CreateWorkspaceRequestDisabledServerTool: {
|
|
4
|
+
readonly OpenrouterAdvisor: "openrouter:advisor";
|
|
5
|
+
readonly OpenrouterApplyPatch: "openrouter:apply_patch";
|
|
6
|
+
readonly OpenrouterBash: "openrouter:bash";
|
|
7
|
+
readonly OpenrouterDatetime: "openrouter:datetime";
|
|
8
|
+
readonly OpenrouterFusion: "openrouter:fusion";
|
|
9
|
+
readonly OpenrouterImageGeneration: "openrouter:image_generation";
|
|
10
|
+
readonly OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models";
|
|
11
|
+
readonly OpenrouterShell: "openrouter:shell";
|
|
12
|
+
readonly OpenrouterSubagent: "openrouter:subagent";
|
|
13
|
+
readonly OpenrouterToolSearch: "openrouter:tool_search";
|
|
14
|
+
readonly OpenrouterWebFetch: "openrouter:web_fetch";
|
|
15
|
+
readonly OpenrouterWebSearch: "openrouter:web_search";
|
|
16
|
+
};
|
|
17
|
+
export type CreateWorkspaceRequestDisabledServerTool = OpenEnum<typeof CreateWorkspaceRequestDisabledServerTool>;
|
|
2
18
|
export type CreateWorkspaceRequest = {
|
|
3
19
|
/**
|
|
4
20
|
* Default image model for this workspace
|
|
@@ -16,6 +32,10 @@ export type CreateWorkspaceRequest = {
|
|
|
16
32
|
* Description of the workspace
|
|
17
33
|
*/
|
|
18
34
|
description?: string | null | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* OpenRouter server tools that requests in this workspace may not invoke. Requests naming a disabled tool are rejected with 403. An empty array or null clears the list.
|
|
37
|
+
*/
|
|
38
|
+
disabledServerTools?: Array<CreateWorkspaceRequestDisabledServerTool> | null | undefined;
|
|
19
39
|
/**
|
|
20
40
|
* Optional array of API key IDs to filter I/O logging
|
|
21
41
|
*/
|
|
@@ -46,11 +66,14 @@ export type CreateWorkspaceRequest = {
|
|
|
46
66
|
slug: string;
|
|
47
67
|
};
|
|
48
68
|
/** @internal */
|
|
69
|
+
export declare const CreateWorkspaceRequestDisabledServerTool$outboundSchema: z.ZodType<string, CreateWorkspaceRequestDisabledServerTool>;
|
|
70
|
+
/** @internal */
|
|
49
71
|
export type CreateWorkspaceRequest$Outbound = {
|
|
50
72
|
default_image_model?: string | null | undefined;
|
|
51
73
|
default_provider_sort?: string | null | undefined;
|
|
52
74
|
default_text_model?: string | null | undefined;
|
|
53
75
|
description?: string | null | undefined;
|
|
76
|
+
disabled_server_tools?: Array<string> | null | undefined;
|
|
54
77
|
io_logging_api_key_ids?: Array<number> | null | undefined;
|
|
55
78
|
io_logging_sampling_rate?: number | undefined;
|
|
56
79
|
is_data_discount_logging_enabled?: boolean | undefined;
|
|
@@ -4,12 +4,30 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
export const CreateWorkspaceRequestDisabledServerTool = {
|
|
9
|
+
OpenrouterAdvisor: "openrouter:advisor",
|
|
10
|
+
OpenrouterApplyPatch: "openrouter:apply_patch",
|
|
11
|
+
OpenrouterBash: "openrouter:bash",
|
|
12
|
+
OpenrouterDatetime: "openrouter:datetime",
|
|
13
|
+
OpenrouterFusion: "openrouter:fusion",
|
|
14
|
+
OpenrouterImageGeneration: "openrouter:image_generation",
|
|
15
|
+
OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models",
|
|
16
|
+
OpenrouterShell: "openrouter:shell",
|
|
17
|
+
OpenrouterSubagent: "openrouter:subagent",
|
|
18
|
+
OpenrouterToolSearch: "openrouter:tool_search",
|
|
19
|
+
OpenrouterWebFetch: "openrouter:web_fetch",
|
|
20
|
+
OpenrouterWebSearch: "openrouter:web_search",
|
|
21
|
+
};
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const CreateWorkspaceRequestDisabledServerTool$outboundSchema = openEnums.outboundSchema(CreateWorkspaceRequestDisabledServerTool);
|
|
7
24
|
/** @internal */
|
|
8
25
|
export const CreateWorkspaceRequest$outboundSchema = z.object({
|
|
9
26
|
defaultImageModel: z.nullable(z.string()).optional(),
|
|
10
27
|
defaultProviderSort: z.nullable(z.string()).optional(),
|
|
11
28
|
defaultTextModel: z.nullable(z.string()).optional(),
|
|
12
29
|
description: z.nullable(z.string()).optional(),
|
|
30
|
+
disabledServerTools: z.nullable(z.array(CreateWorkspaceRequestDisabledServerTool$outboundSchema)).optional(),
|
|
13
31
|
ioLoggingApiKeyIds: z.nullable(z.array(z.int())).optional(),
|
|
14
32
|
ioLoggingSamplingRate: z.number().optional(),
|
|
15
33
|
isDataDiscountLoggingEnabled: z.boolean().optional(),
|
|
@@ -22,6 +40,7 @@ export const CreateWorkspaceRequest$outboundSchema = z.object({
|
|
|
22
40
|
defaultImageModel: "default_image_model",
|
|
23
41
|
defaultProviderSort: "default_provider_sort",
|
|
24
42
|
defaultTextModel: "default_text_model",
|
|
43
|
+
disabledServerTools: "disabled_server_tools",
|
|
25
44
|
ioLoggingApiKeyIds: "io_logging_api_key_ids",
|
|
26
45
|
ioLoggingSamplingRate: "io_logging_sampling_rate",
|
|
27
46
|
isDataDiscountLoggingEnabled: "is_data_discount_logging_enabled",
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
export declare const UpdateWorkspaceRequestDisabledServerTool: {
|
|
4
|
+
readonly OpenrouterAdvisor: "openrouter:advisor";
|
|
5
|
+
readonly OpenrouterApplyPatch: "openrouter:apply_patch";
|
|
6
|
+
readonly OpenrouterBash: "openrouter:bash";
|
|
7
|
+
readonly OpenrouterDatetime: "openrouter:datetime";
|
|
8
|
+
readonly OpenrouterFusion: "openrouter:fusion";
|
|
9
|
+
readonly OpenrouterImageGeneration: "openrouter:image_generation";
|
|
10
|
+
readonly OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models";
|
|
11
|
+
readonly OpenrouterShell: "openrouter:shell";
|
|
12
|
+
readonly OpenrouterSubagent: "openrouter:subagent";
|
|
13
|
+
readonly OpenrouterToolSearch: "openrouter:tool_search";
|
|
14
|
+
readonly OpenrouterWebFetch: "openrouter:web_fetch";
|
|
15
|
+
readonly OpenrouterWebSearch: "openrouter:web_search";
|
|
16
|
+
};
|
|
17
|
+
export type UpdateWorkspaceRequestDisabledServerTool = OpenEnum<typeof UpdateWorkspaceRequestDisabledServerTool>;
|
|
2
18
|
export type UpdateWorkspaceRequest = {
|
|
3
19
|
/**
|
|
4
20
|
* Default image model for this workspace
|
|
@@ -16,6 +32,10 @@ export type UpdateWorkspaceRequest = {
|
|
|
16
32
|
* New description for the workspace
|
|
17
33
|
*/
|
|
18
34
|
description?: string | null | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* OpenRouter server tools that requests in this workspace may not invoke. Requests naming a disabled tool are rejected with 403. An empty array or null clears the list.
|
|
37
|
+
*/
|
|
38
|
+
disabledServerTools?: Array<UpdateWorkspaceRequestDisabledServerTool> | null | undefined;
|
|
19
39
|
/**
|
|
20
40
|
* Optional array of API key IDs to filter I/O logging
|
|
21
41
|
*/
|
|
@@ -46,11 +66,14 @@ export type UpdateWorkspaceRequest = {
|
|
|
46
66
|
slug?: string | undefined;
|
|
47
67
|
};
|
|
48
68
|
/** @internal */
|
|
69
|
+
export declare const UpdateWorkspaceRequestDisabledServerTool$outboundSchema: z.ZodType<string, UpdateWorkspaceRequestDisabledServerTool>;
|
|
70
|
+
/** @internal */
|
|
49
71
|
export type UpdateWorkspaceRequest$Outbound = {
|
|
50
72
|
default_image_model?: string | null | undefined;
|
|
51
73
|
default_provider_sort?: string | null | undefined;
|
|
52
74
|
default_text_model?: string | null | undefined;
|
|
53
75
|
description?: string | null | undefined;
|
|
76
|
+
disabled_server_tools?: Array<string> | null | undefined;
|
|
54
77
|
io_logging_api_key_ids?: Array<number> | null | undefined;
|
|
55
78
|
io_logging_sampling_rate?: number | undefined;
|
|
56
79
|
is_data_discount_logging_enabled?: boolean | undefined;
|
|
@@ -4,12 +4,30 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
export const UpdateWorkspaceRequestDisabledServerTool = {
|
|
9
|
+
OpenrouterAdvisor: "openrouter:advisor",
|
|
10
|
+
OpenrouterApplyPatch: "openrouter:apply_patch",
|
|
11
|
+
OpenrouterBash: "openrouter:bash",
|
|
12
|
+
OpenrouterDatetime: "openrouter:datetime",
|
|
13
|
+
OpenrouterFusion: "openrouter:fusion",
|
|
14
|
+
OpenrouterImageGeneration: "openrouter:image_generation",
|
|
15
|
+
OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models",
|
|
16
|
+
OpenrouterShell: "openrouter:shell",
|
|
17
|
+
OpenrouterSubagent: "openrouter:subagent",
|
|
18
|
+
OpenrouterToolSearch: "openrouter:tool_search",
|
|
19
|
+
OpenrouterWebFetch: "openrouter:web_fetch",
|
|
20
|
+
OpenrouterWebSearch: "openrouter:web_search",
|
|
21
|
+
};
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const UpdateWorkspaceRequestDisabledServerTool$outboundSchema = openEnums.outboundSchema(UpdateWorkspaceRequestDisabledServerTool);
|
|
7
24
|
/** @internal */
|
|
8
25
|
export const UpdateWorkspaceRequest$outboundSchema = z.object({
|
|
9
26
|
defaultImageModel: z.nullable(z.string()).optional(),
|
|
10
27
|
defaultProviderSort: z.nullable(z.string()).optional(),
|
|
11
28
|
defaultTextModel: z.nullable(z.string()).optional(),
|
|
12
29
|
description: z.nullable(z.string()).optional(),
|
|
30
|
+
disabledServerTools: z.nullable(z.array(UpdateWorkspaceRequestDisabledServerTool$outboundSchema)).optional(),
|
|
13
31
|
ioLoggingApiKeyIds: z.nullable(z.array(z.int())).optional(),
|
|
14
32
|
ioLoggingSamplingRate: z.number().optional(),
|
|
15
33
|
isDataDiscountLoggingEnabled: z.boolean().optional(),
|
|
@@ -22,6 +40,7 @@ export const UpdateWorkspaceRequest$outboundSchema = z.object({
|
|
|
22
40
|
defaultImageModel: "default_image_model",
|
|
23
41
|
defaultProviderSort: "default_provider_sort",
|
|
24
42
|
defaultTextModel: "default_text_model",
|
|
43
|
+
disabledServerTools: "disabled_server_tools",
|
|
25
44
|
ioLoggingApiKeyIds: "io_logging_api_key_ids",
|
|
26
45
|
ioLoggingSamplingRate: "io_logging_sampling_rate",
|
|
27
46
|
isDataDiscountLoggingEnabled: "is_data_discount_logging_enabled",
|
|
@@ -30,6 +30,10 @@ export type Workspace = {
|
|
|
30
30
|
* Description of the workspace
|
|
31
31
|
*/
|
|
32
32
|
description: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* OpenRouter server tools (e.g. openrouter:web_search) that requests in this workspace may not invoke. Null means no tools are disabled.
|
|
35
|
+
*/
|
|
36
|
+
disabledServerTools?: Array<string> | null | undefined;
|
|
33
37
|
/**
|
|
34
38
|
* Unique identifier for the workspace
|
|
35
39
|
*/
|
package/esm/models/workspace.js
CHANGED
|
@@ -14,6 +14,7 @@ export const Workspace$inboundSchema = z.object({
|
|
|
14
14
|
default_provider_sort: z.nullable(z.string()),
|
|
15
15
|
default_text_model: z.nullable(z.string()),
|
|
16
16
|
description: z.nullable(z.string()),
|
|
17
|
+
disabled_server_tools: z.nullable(z.array(z.string())).optional(),
|
|
17
18
|
id: z.string(),
|
|
18
19
|
include_byok_in_budgets: z.boolean().optional(),
|
|
19
20
|
io_logging_api_key_ids: z.nullable(z.array(z.int())),
|
|
@@ -32,6 +33,7 @@ export const Workspace$inboundSchema = z.object({
|
|
|
32
33
|
"default_image_model": "defaultImageModel",
|
|
33
34
|
"default_provider_sort": "defaultProviderSort",
|
|
34
35
|
"default_text_model": "defaultTextModel",
|
|
36
|
+
"disabled_server_tools": "disabledServerTools",
|
|
35
37
|
"include_byok_in_budgets": "includeByokInBudgets",
|
|
36
38
|
"io_logging_api_key_ids": "ioLoggingApiKeyIds",
|
|
37
39
|
"io_logging_sampling_rate": "ioLoggingSamplingRate",
|
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.15",
|
|
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
|
-
"prepare": "npm run build",
|
|
77
|
-
"test:transit": "exit 0",
|
|
78
|
-
"typecheck:transit": "exit 0",
|
|
79
|
-
"compile": "tsc",
|
|
80
|
-
"test": "vitest --run --project unit",
|
|
81
76
|
"test:e2e": "vitest --run --project e2e",
|
|
82
77
|
"test:watch": "vitest --watch --project unit",
|
|
78
|
+
"compile": "tsc",
|
|
79
|
+
"test:transit": "exit 0",
|
|
83
80
|
"typecheck": "tsc --noEmit",
|
|
84
|
-
"
|
|
81
|
+
"typecheck:transit": "exit 0",
|
|
82
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
83
|
+
"prepare": "npm run build",
|
|
84
|
+
"test": "vitest --run --project unit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|