@openrouter/sdk 0.12.20 → 0.12.21
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 +10 -0
- package/esm/models/createworkspacerequest.js +4 -0
- package/esm/models/generationresponse.d.ts +4 -0
- package/esm/models/generationresponse.js +2 -0
- package/esm/models/inputsunion.d.ts +18 -4
- package/esm/models/inputsunion.js +42 -0
- package/esm/models/outputapplypatchservertoolitem.d.ts +21 -1
- package/esm/models/outputapplypatchservertoolitem.js +20 -2
- package/esm/models/outputbashservertoolitem.d.ts +23 -1
- package/esm/models/outputbashservertoolitem.js +22 -2
- package/esm/models/outputbrowseruseservertoolitem.d.ts +21 -1
- package/esm/models/outputbrowseruseservertoolitem.js +20 -2
- package/esm/models/outputcodeinterpretercallitem.d.ts +43 -1
- package/esm/models/outputcodeinterpretercallitem.js +52 -2
- package/esm/models/outputcodeinterpreterservertoolitem.d.ts +24 -1
- package/esm/models/outputcodeinterpreterservertoolitem.js +23 -2
- package/esm/models/outputcomputercallitem.d.ts +33 -2
- package/esm/models/outputcomputercallitem.js +36 -1
- package/esm/models/outputfilesearchservertoolitem.d.ts +20 -1
- package/esm/models/outputfilesearchservertoolitem.js +19 -2
- package/esm/models/outputimagegenerationservertoolitem.d.ts +23 -1
- package/esm/models/outputimagegenerationservertoolitem.js +22 -2
- package/esm/models/outputitems.d.ts +31 -3
- package/esm/models/outputitems.js +19 -14
- package/esm/models/outputmcpservertoolitem.d.ts +21 -1
- package/esm/models/outputmcpservertoolitem.js +20 -2
- package/esm/models/outputmemoryservertoolitem.d.ts +24 -2
- package/esm/models/outputmemoryservertoolitem.js +23 -2
- package/esm/models/outputsearchmodelsservertoolitem.d.ts +21 -1
- package/esm/models/outputsearchmodelsservertoolitem.js +20 -2
- package/esm/models/outputtexteditorservertoolitem.d.ts +23 -2
- package/esm/models/outputtexteditorservertoolitem.js +23 -2
- package/esm/models/outputtoolsearchservertoolitem.d.ts +20 -1
- package/esm/models/outputtoolsearchservertoolitem.js +19 -2
- package/esm/models/outputwebfetchservertoolitem.d.ts +22 -1
- package/esm/models/outputwebfetchservertoolitem.js +21 -2
- package/esm/models/providername.d.ts +1 -0
- package/esm/models/providername.js +1 -0
- package/esm/models/providerresponse.d.ts +1 -0
- package/esm/models/providerresponse.js +1 -0
- package/esm/models/speechrequest.d.ts +6 -0
- package/esm/models/speechrequest.js +1 -0
- package/esm/models/updateworkspacerequest.d.ts +10 -0
- package/esm/models/updateworkspacerequest.js +4 -0
- package/esm/models/videogenerationrequest.d.ts +11 -0
- package/esm/models/videogenerationrequest.js +3 -0
- package/esm/models/websearchplugin.d.ts +35 -0
- package/esm/models/websearchplugin.js +21 -0
- package/esm/models/websearchuserlocationservertool.d.ts +8 -8
- package/esm/models/websearchuserlocationservertool.js +4 -4
- package/esm/models/workspace.d.ts +8 -0
- package/esm/models/workspace.js +4 -0
- package/jsr.json +1 -1
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
-
import { OpenEnum } from "../types/enums.js";
|
|
2
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
5
|
import { ToolCallStatus } from "./toolcallstatus.js";
|
|
@@ -9,6 +9,10 @@ export declare const ActionEnum: {
|
|
|
9
9
|
readonly Delete: "delete";
|
|
10
10
|
};
|
|
11
11
|
export type ActionEnum = OpenEnum<typeof ActionEnum>;
|
|
12
|
+
export declare const OutputMemoryServerToolItemType: {
|
|
13
|
+
readonly OpenrouterMemory: "openrouter:memory";
|
|
14
|
+
};
|
|
15
|
+
export type OutputMemoryServerToolItemType = ClosedEnum<typeof OutputMemoryServerToolItemType>;
|
|
12
16
|
/**
|
|
13
17
|
* An openrouter:memory server tool output item
|
|
14
18
|
*/
|
|
@@ -17,12 +21,30 @@ export type OutputMemoryServerToolItem = {
|
|
|
17
21
|
id?: string | undefined;
|
|
18
22
|
key?: string | undefined;
|
|
19
23
|
status: ToolCallStatus;
|
|
20
|
-
type:
|
|
24
|
+
type: OutputMemoryServerToolItemType;
|
|
21
25
|
value?: any | null | undefined;
|
|
22
26
|
};
|
|
23
27
|
/** @internal */
|
|
24
28
|
export declare const ActionEnum$inboundSchema: z.ZodType<ActionEnum, unknown>;
|
|
25
29
|
/** @internal */
|
|
30
|
+
export declare const ActionEnum$outboundSchema: z.ZodType<string, ActionEnum>;
|
|
31
|
+
/** @internal */
|
|
32
|
+
export declare const OutputMemoryServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputMemoryServerToolItemType>;
|
|
33
|
+
/** @internal */
|
|
34
|
+
export declare const OutputMemoryServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputMemoryServerToolItemType>;
|
|
35
|
+
/** @internal */
|
|
26
36
|
export declare const OutputMemoryServerToolItem$inboundSchema: z.ZodType<OutputMemoryServerToolItem, unknown>;
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type OutputMemoryServerToolItem$Outbound = {
|
|
39
|
+
action?: string | undefined;
|
|
40
|
+
id?: string | undefined;
|
|
41
|
+
key?: string | undefined;
|
|
42
|
+
status: string;
|
|
43
|
+
type: string;
|
|
44
|
+
value?: any | null | undefined;
|
|
45
|
+
};
|
|
46
|
+
/** @internal */
|
|
47
|
+
export declare const OutputMemoryServerToolItem$outboundSchema: z.ZodType<OutputMemoryServerToolItem$Outbound, OutputMemoryServerToolItem>;
|
|
48
|
+
export declare function outputMemoryServerToolItemToJSON(outputMemoryServerToolItem: OutputMemoryServerToolItem): string;
|
|
27
49
|
export declare function outputMemoryServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputMemoryServerToolItem, SDKValidationError>;
|
|
28
50
|
//# sourceMappingURL=outputmemoryservertoolitem.d.ts.map
|
|
@@ -5,23 +5,44 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import * as openEnums from "../types/enums.js";
|
|
8
|
-
import { ToolCallStatus$inboundSchema, } from "./toolcallstatus.js";
|
|
8
|
+
import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
|
|
9
9
|
export const ActionEnum = {
|
|
10
10
|
Read: "read",
|
|
11
11
|
Write: "write",
|
|
12
12
|
Delete: "delete",
|
|
13
13
|
};
|
|
14
|
+
export const OutputMemoryServerToolItemType = {
|
|
15
|
+
OpenrouterMemory: "openrouter:memory",
|
|
16
|
+
};
|
|
14
17
|
/** @internal */
|
|
15
18
|
export const ActionEnum$inboundSchema = openEnums.inboundSchema(ActionEnum);
|
|
16
19
|
/** @internal */
|
|
20
|
+
export const ActionEnum$outboundSchema = openEnums.outboundSchema(ActionEnum);
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const OutputMemoryServerToolItemType$inboundSchema = z.enum(OutputMemoryServerToolItemType);
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const OutputMemoryServerToolItemType$outboundSchema = OutputMemoryServerToolItemType$inboundSchema;
|
|
25
|
+
/** @internal */
|
|
17
26
|
export const OutputMemoryServerToolItem$inboundSchema = z.object({
|
|
18
27
|
action: ActionEnum$inboundSchema.optional(),
|
|
19
28
|
id: z.string().optional(),
|
|
20
29
|
key: z.string().optional(),
|
|
21
30
|
status: ToolCallStatus$inboundSchema,
|
|
22
|
-
type:
|
|
31
|
+
type: OutputMemoryServerToolItemType$inboundSchema,
|
|
32
|
+
value: z.nullable(z.any()).optional(),
|
|
33
|
+
});
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const OutputMemoryServerToolItem$outboundSchema = z.object({
|
|
36
|
+
action: ActionEnum$outboundSchema.optional(),
|
|
37
|
+
id: z.string().optional(),
|
|
38
|
+
key: z.string().optional(),
|
|
39
|
+
status: ToolCallStatus$outboundSchema,
|
|
40
|
+
type: OutputMemoryServerToolItemType$outboundSchema,
|
|
23
41
|
value: z.nullable(z.any()).optional(),
|
|
24
42
|
});
|
|
43
|
+
export function outputMemoryServerToolItemToJSON(outputMemoryServerToolItem) {
|
|
44
|
+
return JSON.stringify(OutputMemoryServerToolItem$outboundSchema.parse(outputMemoryServerToolItem));
|
|
45
|
+
}
|
|
25
46
|
export function outputMemoryServerToolItemFromJSON(jsonString) {
|
|
26
47
|
return safeParse(jsonString, (x) => OutputMemoryServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputMemoryServerToolItem' from JSON`);
|
|
27
48
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
5
|
import { ToolCallStatus } from "./toolcallstatus.js";
|
|
6
|
+
export declare const OutputSearchModelsServerToolItemType: {
|
|
7
|
+
readonly OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models";
|
|
8
|
+
};
|
|
9
|
+
export type OutputSearchModelsServerToolItemType = ClosedEnum<typeof OutputSearchModelsServerToolItemType>;
|
|
5
10
|
/**
|
|
6
11
|
* An openrouter:experimental__search_models server tool output item
|
|
7
12
|
*/
|
|
@@ -13,9 +18,24 @@ export type OutputSearchModelsServerToolItem = {
|
|
|
13
18
|
id?: string | undefined;
|
|
14
19
|
query?: string | undefined;
|
|
15
20
|
status: ToolCallStatus;
|
|
16
|
-
type:
|
|
21
|
+
type: OutputSearchModelsServerToolItemType;
|
|
17
22
|
};
|
|
18
23
|
/** @internal */
|
|
24
|
+
export declare const OutputSearchModelsServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputSearchModelsServerToolItemType>;
|
|
25
|
+
/** @internal */
|
|
26
|
+
export declare const OutputSearchModelsServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputSearchModelsServerToolItemType>;
|
|
27
|
+
/** @internal */
|
|
19
28
|
export declare const OutputSearchModelsServerToolItem$inboundSchema: z.ZodType<OutputSearchModelsServerToolItem, unknown>;
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type OutputSearchModelsServerToolItem$Outbound = {
|
|
31
|
+
arguments?: string | undefined;
|
|
32
|
+
id?: string | undefined;
|
|
33
|
+
query?: string | undefined;
|
|
34
|
+
status: string;
|
|
35
|
+
type: string;
|
|
36
|
+
};
|
|
37
|
+
/** @internal */
|
|
38
|
+
export declare const OutputSearchModelsServerToolItem$outboundSchema: z.ZodType<OutputSearchModelsServerToolItem$Outbound, OutputSearchModelsServerToolItem>;
|
|
39
|
+
export declare function outputSearchModelsServerToolItemToJSON(outputSearchModelsServerToolItem: OutputSearchModelsServerToolItem): string;
|
|
20
40
|
export declare function outputSearchModelsServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputSearchModelsServerToolItem, SDKValidationError>;
|
|
21
41
|
//# sourceMappingURL=outputsearchmodelsservertoolitem.d.ts.map
|
|
@@ -4,15 +4,33 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import { ToolCallStatus$inboundSchema, } from "./toolcallstatus.js";
|
|
7
|
+
import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
|
|
8
|
+
export const OutputSearchModelsServerToolItemType = {
|
|
9
|
+
OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models",
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const OutputSearchModelsServerToolItemType$inboundSchema = z.enum(OutputSearchModelsServerToolItemType);
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const OutputSearchModelsServerToolItemType$outboundSchema = OutputSearchModelsServerToolItemType$inboundSchema;
|
|
8
15
|
/** @internal */
|
|
9
16
|
export const OutputSearchModelsServerToolItem$inboundSchema = z.object({
|
|
10
17
|
arguments: z.string().optional(),
|
|
11
18
|
id: z.string().optional(),
|
|
12
19
|
query: z.string().optional(),
|
|
13
20
|
status: ToolCallStatus$inboundSchema,
|
|
14
|
-
type:
|
|
21
|
+
type: OutputSearchModelsServerToolItemType$inboundSchema,
|
|
22
|
+
});
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const OutputSearchModelsServerToolItem$outboundSchema = z.object({
|
|
25
|
+
arguments: z.string().optional(),
|
|
26
|
+
id: z.string().optional(),
|
|
27
|
+
query: z.string().optional(),
|
|
28
|
+
status: ToolCallStatus$outboundSchema,
|
|
29
|
+
type: OutputSearchModelsServerToolItemType$outboundSchema,
|
|
15
30
|
});
|
|
31
|
+
export function outputSearchModelsServerToolItemToJSON(outputSearchModelsServerToolItem) {
|
|
32
|
+
return JSON.stringify(OutputSearchModelsServerToolItem$outboundSchema.parse(outputSearchModelsServerToolItem));
|
|
33
|
+
}
|
|
16
34
|
export function outputSearchModelsServerToolItemFromJSON(jsonString) {
|
|
17
35
|
return safeParse(jsonString, (x) => OutputSearchModelsServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputSearchModelsServerToolItem' from JSON`);
|
|
18
36
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
-
import { OpenEnum } from "../types/enums.js";
|
|
2
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
5
|
import { ToolCallStatus } from "./toolcallstatus.js";
|
|
@@ -10,6 +10,10 @@ export declare const Command: {
|
|
|
10
10
|
readonly Insert: "insert";
|
|
11
11
|
};
|
|
12
12
|
export type Command = OpenEnum<typeof Command>;
|
|
13
|
+
export declare const OutputTextEditorServerToolItemType: {
|
|
14
|
+
readonly OpenrouterTextEditor: "openrouter:text_editor";
|
|
15
|
+
};
|
|
16
|
+
export type OutputTextEditorServerToolItemType = ClosedEnum<typeof OutputTextEditorServerToolItemType>;
|
|
13
17
|
/**
|
|
14
18
|
* An openrouter:text_editor server tool output item
|
|
15
19
|
*/
|
|
@@ -18,11 +22,28 @@ export type OutputTextEditorServerToolItem = {
|
|
|
18
22
|
filePath?: string | undefined;
|
|
19
23
|
id?: string | undefined;
|
|
20
24
|
status: ToolCallStatus;
|
|
21
|
-
type:
|
|
25
|
+
type: OutputTextEditorServerToolItemType;
|
|
22
26
|
};
|
|
23
27
|
/** @internal */
|
|
24
28
|
export declare const Command$inboundSchema: z.ZodType<Command, unknown>;
|
|
25
29
|
/** @internal */
|
|
30
|
+
export declare const Command$outboundSchema: z.ZodType<string, Command>;
|
|
31
|
+
/** @internal */
|
|
32
|
+
export declare const OutputTextEditorServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputTextEditorServerToolItemType>;
|
|
33
|
+
/** @internal */
|
|
34
|
+
export declare const OutputTextEditorServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputTextEditorServerToolItemType>;
|
|
35
|
+
/** @internal */
|
|
26
36
|
export declare const OutputTextEditorServerToolItem$inboundSchema: z.ZodType<OutputTextEditorServerToolItem, unknown>;
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type OutputTextEditorServerToolItem$Outbound = {
|
|
39
|
+
command?: string | undefined;
|
|
40
|
+
filePath?: string | undefined;
|
|
41
|
+
id?: string | undefined;
|
|
42
|
+
status: string;
|
|
43
|
+
type: string;
|
|
44
|
+
};
|
|
45
|
+
/** @internal */
|
|
46
|
+
export declare const OutputTextEditorServerToolItem$outboundSchema: z.ZodType<OutputTextEditorServerToolItem$Outbound, OutputTextEditorServerToolItem>;
|
|
47
|
+
export declare function outputTextEditorServerToolItemToJSON(outputTextEditorServerToolItem: OutputTextEditorServerToolItem): string;
|
|
27
48
|
export declare function outputTextEditorServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputTextEditorServerToolItem, SDKValidationError>;
|
|
28
49
|
//# sourceMappingURL=outputtexteditorservertoolitem.d.ts.map
|
|
@@ -5,24 +5,45 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import * as openEnums from "../types/enums.js";
|
|
8
|
-
import { ToolCallStatus$inboundSchema, } from "./toolcallstatus.js";
|
|
8
|
+
import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
|
|
9
9
|
export const Command = {
|
|
10
10
|
View: "view",
|
|
11
11
|
Create: "create",
|
|
12
12
|
StrReplace: "str_replace",
|
|
13
13
|
Insert: "insert",
|
|
14
14
|
};
|
|
15
|
+
export const OutputTextEditorServerToolItemType = {
|
|
16
|
+
OpenrouterTextEditor: "openrouter:text_editor",
|
|
17
|
+
};
|
|
15
18
|
/** @internal */
|
|
16
19
|
export const Command$inboundSchema = openEnums
|
|
17
20
|
.inboundSchema(Command);
|
|
18
21
|
/** @internal */
|
|
22
|
+
export const Command$outboundSchema = openEnums
|
|
23
|
+
.outboundSchema(Command);
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const OutputTextEditorServerToolItemType$inboundSchema = z.enum(OutputTextEditorServerToolItemType);
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const OutputTextEditorServerToolItemType$outboundSchema = OutputTextEditorServerToolItemType$inboundSchema;
|
|
28
|
+
/** @internal */
|
|
19
29
|
export const OutputTextEditorServerToolItem$inboundSchema = z.object({
|
|
20
30
|
command: Command$inboundSchema.optional(),
|
|
21
31
|
filePath: z.string().optional(),
|
|
22
32
|
id: z.string().optional(),
|
|
23
33
|
status: ToolCallStatus$inboundSchema,
|
|
24
|
-
type:
|
|
34
|
+
type: OutputTextEditorServerToolItemType$inboundSchema,
|
|
25
35
|
});
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const OutputTextEditorServerToolItem$outboundSchema = z.object({
|
|
38
|
+
command: Command$outboundSchema.optional(),
|
|
39
|
+
filePath: z.string().optional(),
|
|
40
|
+
id: z.string().optional(),
|
|
41
|
+
status: ToolCallStatus$outboundSchema,
|
|
42
|
+
type: OutputTextEditorServerToolItemType$outboundSchema,
|
|
43
|
+
});
|
|
44
|
+
export function outputTextEditorServerToolItemToJSON(outputTextEditorServerToolItem) {
|
|
45
|
+
return JSON.stringify(OutputTextEditorServerToolItem$outboundSchema.parse(outputTextEditorServerToolItem));
|
|
46
|
+
}
|
|
26
47
|
export function outputTextEditorServerToolItemFromJSON(jsonString) {
|
|
27
48
|
return safeParse(jsonString, (x) => OutputTextEditorServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputTextEditorServerToolItem' from JSON`);
|
|
28
49
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
5
|
import { ToolCallStatus } from "./toolcallstatus.js";
|
|
6
|
+
export declare const OutputToolSearchServerToolItemType: {
|
|
7
|
+
readonly OpenrouterToolSearch: "openrouter:tool_search";
|
|
8
|
+
};
|
|
9
|
+
export type OutputToolSearchServerToolItemType = ClosedEnum<typeof OutputToolSearchServerToolItemType>;
|
|
5
10
|
/**
|
|
6
11
|
* An openrouter:tool_search server tool output item
|
|
7
12
|
*/
|
|
@@ -9,9 +14,23 @@ export type OutputToolSearchServerToolItem = {
|
|
|
9
14
|
id?: string | undefined;
|
|
10
15
|
query?: string | undefined;
|
|
11
16
|
status: ToolCallStatus;
|
|
12
|
-
type:
|
|
17
|
+
type: OutputToolSearchServerToolItemType;
|
|
13
18
|
};
|
|
14
19
|
/** @internal */
|
|
20
|
+
export declare const OutputToolSearchServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputToolSearchServerToolItemType>;
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const OutputToolSearchServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputToolSearchServerToolItemType>;
|
|
23
|
+
/** @internal */
|
|
15
24
|
export declare const OutputToolSearchServerToolItem$inboundSchema: z.ZodType<OutputToolSearchServerToolItem, unknown>;
|
|
25
|
+
/** @internal */
|
|
26
|
+
export type OutputToolSearchServerToolItem$Outbound = {
|
|
27
|
+
id?: string | undefined;
|
|
28
|
+
query?: string | undefined;
|
|
29
|
+
status: string;
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
32
|
+
/** @internal */
|
|
33
|
+
export declare const OutputToolSearchServerToolItem$outboundSchema: z.ZodType<OutputToolSearchServerToolItem$Outbound, OutputToolSearchServerToolItem>;
|
|
34
|
+
export declare function outputToolSearchServerToolItemToJSON(outputToolSearchServerToolItem: OutputToolSearchServerToolItem): string;
|
|
16
35
|
export declare function outputToolSearchServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputToolSearchServerToolItem, SDKValidationError>;
|
|
17
36
|
//# sourceMappingURL=outputtoolsearchservertoolitem.d.ts.map
|
|
@@ -4,14 +4,31 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import { ToolCallStatus$inboundSchema, } from "./toolcallstatus.js";
|
|
7
|
+
import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
|
|
8
|
+
export const OutputToolSearchServerToolItemType = {
|
|
9
|
+
OpenrouterToolSearch: "openrouter:tool_search",
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const OutputToolSearchServerToolItemType$inboundSchema = z.enum(OutputToolSearchServerToolItemType);
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const OutputToolSearchServerToolItemType$outboundSchema = OutputToolSearchServerToolItemType$inboundSchema;
|
|
8
15
|
/** @internal */
|
|
9
16
|
export const OutputToolSearchServerToolItem$inboundSchema = z.object({
|
|
10
17
|
id: z.string().optional(),
|
|
11
18
|
query: z.string().optional(),
|
|
12
19
|
status: ToolCallStatus$inboundSchema,
|
|
13
|
-
type:
|
|
20
|
+
type: OutputToolSearchServerToolItemType$inboundSchema,
|
|
14
21
|
});
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const OutputToolSearchServerToolItem$outboundSchema = z.object({
|
|
24
|
+
id: z.string().optional(),
|
|
25
|
+
query: z.string().optional(),
|
|
26
|
+
status: ToolCallStatus$outboundSchema,
|
|
27
|
+
type: OutputToolSearchServerToolItemType$outboundSchema,
|
|
28
|
+
});
|
|
29
|
+
export function outputToolSearchServerToolItemToJSON(outputToolSearchServerToolItem) {
|
|
30
|
+
return JSON.stringify(OutputToolSearchServerToolItem$outboundSchema.parse(outputToolSearchServerToolItem));
|
|
31
|
+
}
|
|
15
32
|
export function outputToolSearchServerToolItemFromJSON(jsonString) {
|
|
16
33
|
return safeParse(jsonString, (x) => OutputToolSearchServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputToolSearchServerToolItem' from JSON`);
|
|
17
34
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
5
|
import { ToolCallStatus } from "./toolcallstatus.js";
|
|
6
|
+
export declare const OutputWebFetchServerToolItemType: {
|
|
7
|
+
readonly OpenrouterWebFetch: "openrouter:web_fetch";
|
|
8
|
+
};
|
|
9
|
+
export type OutputWebFetchServerToolItemType = ClosedEnum<typeof OutputWebFetchServerToolItemType>;
|
|
5
10
|
/**
|
|
6
11
|
* An openrouter:web_fetch server tool output item
|
|
7
12
|
*/
|
|
@@ -10,10 +15,26 @@ export type OutputWebFetchServerToolItem = {
|
|
|
10
15
|
id?: string | undefined;
|
|
11
16
|
status: ToolCallStatus;
|
|
12
17
|
title?: string | undefined;
|
|
13
|
-
type:
|
|
18
|
+
type: OutputWebFetchServerToolItemType;
|
|
14
19
|
url?: string | undefined;
|
|
15
20
|
};
|
|
16
21
|
/** @internal */
|
|
22
|
+
export declare const OutputWebFetchServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputWebFetchServerToolItemType>;
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare const OutputWebFetchServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputWebFetchServerToolItemType>;
|
|
25
|
+
/** @internal */
|
|
17
26
|
export declare const OutputWebFetchServerToolItem$inboundSchema: z.ZodType<OutputWebFetchServerToolItem, unknown>;
|
|
27
|
+
/** @internal */
|
|
28
|
+
export type OutputWebFetchServerToolItem$Outbound = {
|
|
29
|
+
content?: string | undefined;
|
|
30
|
+
id?: string | undefined;
|
|
31
|
+
status: string;
|
|
32
|
+
title?: string | undefined;
|
|
33
|
+
type: string;
|
|
34
|
+
url?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
/** @internal */
|
|
37
|
+
export declare const OutputWebFetchServerToolItem$outboundSchema: z.ZodType<OutputWebFetchServerToolItem$Outbound, OutputWebFetchServerToolItem>;
|
|
38
|
+
export declare function outputWebFetchServerToolItemToJSON(outputWebFetchServerToolItem: OutputWebFetchServerToolItem): string;
|
|
18
39
|
export declare function outputWebFetchServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputWebFetchServerToolItem, SDKValidationError>;
|
|
19
40
|
//# sourceMappingURL=outputwebfetchservertoolitem.d.ts.map
|
|
@@ -4,16 +4,35 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import { ToolCallStatus$inboundSchema, } from "./toolcallstatus.js";
|
|
7
|
+
import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
|
|
8
|
+
export const OutputWebFetchServerToolItemType = {
|
|
9
|
+
OpenrouterWebFetch: "openrouter:web_fetch",
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const OutputWebFetchServerToolItemType$inboundSchema = z.enum(OutputWebFetchServerToolItemType);
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const OutputWebFetchServerToolItemType$outboundSchema = OutputWebFetchServerToolItemType$inboundSchema;
|
|
8
15
|
/** @internal */
|
|
9
16
|
export const OutputWebFetchServerToolItem$inboundSchema = z.object({
|
|
10
17
|
content: z.string().optional(),
|
|
11
18
|
id: z.string().optional(),
|
|
12
19
|
status: ToolCallStatus$inboundSchema,
|
|
13
20
|
title: z.string().optional(),
|
|
14
|
-
type:
|
|
21
|
+
type: OutputWebFetchServerToolItemType$inboundSchema,
|
|
15
22
|
url: z.string().optional(),
|
|
16
23
|
});
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const OutputWebFetchServerToolItem$outboundSchema = z.object({
|
|
26
|
+
content: z.string().optional(),
|
|
27
|
+
id: z.string().optional(),
|
|
28
|
+
status: ToolCallStatus$outboundSchema,
|
|
29
|
+
title: z.string().optional(),
|
|
30
|
+
type: OutputWebFetchServerToolItemType$outboundSchema,
|
|
31
|
+
url: z.string().optional(),
|
|
32
|
+
});
|
|
33
|
+
export function outputWebFetchServerToolItemToJSON(outputWebFetchServerToolItem) {
|
|
34
|
+
return JSON.stringify(OutputWebFetchServerToolItem$outboundSchema.parse(outputWebFetchServerToolItem));
|
|
35
|
+
}
|
|
17
36
|
export function outputWebFetchServerToolItemFromJSON(jsonString) {
|
|
18
37
|
return safeParse(jsonString, (x) => OutputWebFetchServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputWebFetchServerToolItem' from JSON`);
|
|
19
38
|
}
|
|
@@ -60,6 +60,7 @@ export declare const ProviderName: {
|
|
|
60
60
|
readonly OpenAI: "OpenAI";
|
|
61
61
|
readonly OpenInference: "OpenInference";
|
|
62
62
|
readonly Parasail: "Parasail";
|
|
63
|
+
readonly Poolside: "Poolside";
|
|
63
64
|
readonly Perplexity: "Perplexity";
|
|
64
65
|
readonly Phala: "Phala";
|
|
65
66
|
readonly Recraft: "Recraft";
|
|
@@ -93,6 +93,7 @@ export declare const ProviderResponseProviderName: {
|
|
|
93
93
|
readonly OpenAI: "OpenAI";
|
|
94
94
|
readonly OpenInference: "OpenInference";
|
|
95
95
|
readonly Parasail: "Parasail";
|
|
96
|
+
readonly Poolside: "Poolside";
|
|
96
97
|
readonly Perplexity: "Perplexity";
|
|
97
98
|
readonly Phala: "Phala";
|
|
98
99
|
readonly Recraft: "Recraft";
|
|
@@ -250,6 +250,9 @@ export type SpeechRequestOptions = {
|
|
|
250
250
|
phala?: {
|
|
251
251
|
[k: string]: any | null;
|
|
252
252
|
} | undefined;
|
|
253
|
+
poolside?: {
|
|
254
|
+
[k: string]: any | null;
|
|
255
|
+
} | undefined;
|
|
253
256
|
recraft?: {
|
|
254
257
|
[k: string]: any | null;
|
|
255
258
|
} | undefined;
|
|
@@ -626,6 +629,9 @@ export type SpeechRequestOptions$Outbound = {
|
|
|
626
629
|
phala?: {
|
|
627
630
|
[k: string]: any | null;
|
|
628
631
|
} | undefined;
|
|
632
|
+
poolside?: {
|
|
633
|
+
[k: string]: any | null;
|
|
634
|
+
} | undefined;
|
|
629
635
|
recraft?: {
|
|
630
636
|
[k: string]: any | null;
|
|
631
637
|
} | undefined;
|
|
@@ -96,6 +96,7 @@ export const SpeechRequestOptions$outboundSchema = z.object({
|
|
|
96
96
|
parasail: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
97
97
|
perplexity: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
98
98
|
phala: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
99
|
+
poolside: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
99
100
|
recraft: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
100
101
|
recursal: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
101
102
|
reflection: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
@@ -16,6 +16,14 @@ export type UpdateWorkspaceRequest = {
|
|
|
16
16
|
* New description for the workspace
|
|
17
17
|
*/
|
|
18
18
|
description?: string | null | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Optional array of API key IDs to filter I/O logging
|
|
21
|
+
*/
|
|
22
|
+
ioLoggingApiKeyIds?: Array<number> | null | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Sampling rate for I/O logging (0.0001-1)
|
|
25
|
+
*/
|
|
26
|
+
ioLoggingSamplingRate?: number | undefined;
|
|
19
27
|
/**
|
|
20
28
|
* Whether data discount logging is enabled
|
|
21
29
|
*/
|
|
@@ -43,6 +51,8 @@ export type UpdateWorkspaceRequest$Outbound = {
|
|
|
43
51
|
default_provider_sort?: string | null | undefined;
|
|
44
52
|
default_text_model?: string | null | undefined;
|
|
45
53
|
description?: string | null | undefined;
|
|
54
|
+
io_logging_api_key_ids?: Array<number> | null | undefined;
|
|
55
|
+
io_logging_sampling_rate?: number | undefined;
|
|
46
56
|
is_data_discount_logging_enabled?: boolean | undefined;
|
|
47
57
|
is_observability_broadcast_enabled?: boolean | undefined;
|
|
48
58
|
is_observability_io_logging_enabled?: boolean | undefined;
|
|
@@ -10,6 +10,8 @@ export const UpdateWorkspaceRequest$outboundSchema = z.object({
|
|
|
10
10
|
defaultProviderSort: z.nullable(z.string()).optional(),
|
|
11
11
|
defaultTextModel: z.nullable(z.string()).optional(),
|
|
12
12
|
description: z.nullable(z.string()).optional(),
|
|
13
|
+
ioLoggingApiKeyIds: z.nullable(z.array(z.int())).optional(),
|
|
14
|
+
ioLoggingSamplingRate: z.number().optional(),
|
|
13
15
|
isDataDiscountLoggingEnabled: z.boolean().optional(),
|
|
14
16
|
isObservabilityBroadcastEnabled: z.boolean().optional(),
|
|
15
17
|
isObservabilityIoLoggingEnabled: z.boolean().optional(),
|
|
@@ -20,6 +22,8 @@ export const UpdateWorkspaceRequest$outboundSchema = z.object({
|
|
|
20
22
|
defaultImageModel: "default_image_model",
|
|
21
23
|
defaultProviderSort: "default_provider_sort",
|
|
22
24
|
defaultTextModel: "default_text_model",
|
|
25
|
+
ioLoggingApiKeyIds: "io_logging_api_key_ids",
|
|
26
|
+
ioLoggingSamplingRate: "io_logging_sampling_rate",
|
|
23
27
|
isDataDiscountLoggingEnabled: "is_data_discount_logging_enabled",
|
|
24
28
|
isObservabilityBroadcastEnabled: "is_observability_broadcast_enabled",
|
|
25
29
|
isObservabilityIoLoggingEnabled: "is_observability_io_logging_enabled",
|
|
@@ -268,6 +268,9 @@ export type VideoGenerationRequestOptions = {
|
|
|
268
268
|
phala?: {
|
|
269
269
|
[k: string]: any | null;
|
|
270
270
|
} | undefined;
|
|
271
|
+
poolside?: {
|
|
272
|
+
[k: string]: any | null;
|
|
273
|
+
} | undefined;
|
|
271
274
|
recraft?: {
|
|
272
275
|
[k: string]: any | null;
|
|
273
276
|
} | undefined;
|
|
@@ -376,6 +379,10 @@ export type VideoGenerationRequest = {
|
|
|
376
379
|
* Aspect ratio of the generated video
|
|
377
380
|
*/
|
|
378
381
|
aspectRatio?: AspectRatio | undefined;
|
|
382
|
+
/**
|
|
383
|
+
* URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS.
|
|
384
|
+
*/
|
|
385
|
+
callbackUrl?: string | undefined;
|
|
379
386
|
/**
|
|
380
387
|
* Duration of the generated video in seconds
|
|
381
388
|
*/
|
|
@@ -661,6 +668,9 @@ export type VideoGenerationRequestOptions$Outbound = {
|
|
|
661
668
|
phala?: {
|
|
662
669
|
[k: string]: any | null;
|
|
663
670
|
} | undefined;
|
|
671
|
+
poolside?: {
|
|
672
|
+
[k: string]: any | null;
|
|
673
|
+
} | undefined;
|
|
664
674
|
recraft?: {
|
|
665
675
|
[k: string]: any | null;
|
|
666
676
|
} | undefined;
|
|
@@ -755,6 +765,7 @@ export declare const Resolution$outboundSchema: z.ZodType<string, Resolution>;
|
|
|
755
765
|
/** @internal */
|
|
756
766
|
export type VideoGenerationRequest$Outbound = {
|
|
757
767
|
aspect_ratio?: string | undefined;
|
|
768
|
+
callback_url?: string | undefined;
|
|
758
769
|
duration?: number | undefined;
|
|
759
770
|
frame_images?: Array<FrameImage$Outbound> | undefined;
|
|
760
771
|
generate_audio?: boolean | undefined;
|
|
@@ -116,6 +116,7 @@ export const VideoGenerationRequestOptions$outboundSchema = z.object({
|
|
|
116
116
|
parasail: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
117
117
|
perplexity: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
118
118
|
phala: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
119
|
+
poolside: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
119
120
|
recraft: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
120
121
|
recursal: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
121
122
|
reflection: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
@@ -183,6 +184,7 @@ export const Resolution$outboundSchema = openEnums.outboundSchema(Resolution);
|
|
|
183
184
|
/** @internal */
|
|
184
185
|
export const VideoGenerationRequest$outboundSchema = z.object({
|
|
185
186
|
aspectRatio: AspectRatio$outboundSchema.optional(),
|
|
187
|
+
callbackUrl: z.string().optional(),
|
|
186
188
|
duration: z.int().optional(),
|
|
187
189
|
frameImages: z.array(FrameImage$outboundSchema).optional(),
|
|
188
190
|
generateAudio: z.boolean().optional(),
|
|
@@ -197,6 +199,7 @@ export const VideoGenerationRequest$outboundSchema = z.object({
|
|
|
197
199
|
}).transform((v) => {
|
|
198
200
|
return remap$(v, {
|
|
199
201
|
aspectRatio: "aspect_ratio",
|
|
202
|
+
callbackUrl: "callback_url",
|
|
200
203
|
frameImages: "frame_images",
|
|
201
204
|
generateAudio: "generate_audio",
|
|
202
205
|
inputReferences: "input_references",
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
2
3
|
import { WebSearchEngine } from "./websearchengine.js";
|
|
4
|
+
export declare const WebSearchPluginType: {
|
|
5
|
+
readonly Approximate: "approximate";
|
|
6
|
+
};
|
|
7
|
+
export type WebSearchPluginType = ClosedEnum<typeof WebSearchPluginType>;
|
|
8
|
+
/**
|
|
9
|
+
* Approximate user location for location-biased search results. Passed through to native providers that support it (e.g. Anthropic).
|
|
10
|
+
*/
|
|
11
|
+
export type UserLocation = {
|
|
12
|
+
city?: string | null | undefined;
|
|
13
|
+
country?: string | null | undefined;
|
|
14
|
+
region?: string | null | undefined;
|
|
15
|
+
timezone?: string | null | undefined;
|
|
16
|
+
type: WebSearchPluginType;
|
|
17
|
+
};
|
|
3
18
|
export type WebSearchPlugin = {
|
|
4
19
|
/**
|
|
5
20
|
* Set to false to disable the web-search plugin for this request. Defaults to true.
|
|
@@ -19,9 +34,27 @@ export type WebSearchPlugin = {
|
|
|
19
34
|
*/
|
|
20
35
|
includeDomains?: Array<string> | undefined;
|
|
21
36
|
maxResults?: number | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Maximum number of times the model can invoke web search in a single turn. Passed through to native providers that support it (e.g. Anthropic).
|
|
39
|
+
*/
|
|
40
|
+
maxUses?: number | undefined;
|
|
22
41
|
searchPrompt?: string | undefined;
|
|
42
|
+
userLocation?: UserLocation | null | undefined;
|
|
23
43
|
};
|
|
24
44
|
/** @internal */
|
|
45
|
+
export declare const WebSearchPluginType$outboundSchema: z.ZodEnum<typeof WebSearchPluginType>;
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type UserLocation$Outbound = {
|
|
48
|
+
city?: string | null | undefined;
|
|
49
|
+
country?: string | null | undefined;
|
|
50
|
+
region?: string | null | undefined;
|
|
51
|
+
timezone?: string | null | undefined;
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
/** @internal */
|
|
55
|
+
export declare const UserLocation$outboundSchema: z.ZodType<UserLocation$Outbound, UserLocation>;
|
|
56
|
+
export declare function userLocationToJSON(userLocation: UserLocation): string;
|
|
57
|
+
/** @internal */
|
|
25
58
|
export type WebSearchPlugin$Outbound = {
|
|
26
59
|
enabled?: boolean | undefined;
|
|
27
60
|
engine?: string | undefined;
|
|
@@ -29,7 +62,9 @@ export type WebSearchPlugin$Outbound = {
|
|
|
29
62
|
id: "web";
|
|
30
63
|
include_domains?: Array<string> | undefined;
|
|
31
64
|
max_results?: number | undefined;
|
|
65
|
+
max_uses?: number | undefined;
|
|
32
66
|
search_prompt?: string | undefined;
|
|
67
|
+
user_location?: UserLocation$Outbound | null | undefined;
|
|
33
68
|
};
|
|
34
69
|
/** @internal */
|
|
35
70
|
export declare const WebSearchPlugin$outboundSchema: z.ZodType<WebSearchPlugin$Outbound, WebSearchPlugin>;
|