@openrouter/sdk 0.13.38 → 0.13.40
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/additionaltoolsitem.d.ts +117 -0
- package/esm/models/additionaltoolsitem.js +152 -0
- package/esm/models/agentmessageitem.d.ts +99 -0
- package/esm/models/agentmessageitem.js +101 -0
- package/esm/models/applypatchservertool.d.ts +11 -2
- package/esm/models/applypatchservertool.js +9 -2
- package/esm/models/applypatchservertoolopenrouter.d.ts +9 -2
- package/esm/models/applypatchservertoolopenrouter.js +6 -1
- package/esm/models/codeinterpreterservertool.d.ts +10 -2
- package/esm/models/codeinterpreterservertool.js +9 -2
- package/esm/models/codexlocalshelltool.d.ts +11 -2
- package/esm/models/codexlocalshelltool.js +9 -2
- package/esm/models/compactionitem.d.ts +4 -0
- package/esm/models/compactionitem.js +8 -3
- package/esm/models/computeruseservertool.d.ts +11 -3
- package/esm/models/computeruseservertool.js +9 -2
- package/esm/models/contextcompactionitem.d.ts +30 -0
- package/esm/models/contextcompactionitem.js +30 -0
- package/esm/models/customtool.d.ts +11 -3
- package/esm/models/customtool.js +9 -2
- package/esm/models/filesearchservertool.d.ts +11 -3
- package/esm/models/filesearchservertool.js +10 -2
- package/esm/models/imagegenerationservertool.d.ts +11 -3
- package/esm/models/imagegenerationservertool.js +9 -2
- package/esm/models/index.d.ts +3 -0
- package/esm/models/index.js +3 -0
- package/esm/models/inputsunion.d.ts +7 -4
- package/esm/models/inputsunion.js +9 -0
- package/esm/models/legacywebsearchservertool.d.ts +11 -2
- package/esm/models/legacywebsearchservertool.js +9 -2
- package/esm/models/mcpservertool.d.ts +10 -2
- package/esm/models/mcpservertool.js +9 -2
- package/esm/models/openresponsesresult.d.ts +54 -2
- package/esm/models/openresponsesresult.js +26 -26
- package/esm/models/preview20250311websearchservertool.d.ts +11 -2
- package/esm/models/preview20250311websearchservertool.js +9 -2
- package/esm/models/previewwebsearchservertool.d.ts +11 -2
- package/esm/models/previewwebsearchservertool.js +9 -2
- package/esm/models/responsesrequest.d.ts +140 -12
- package/esm/models/responsesrequest.js +32 -32
- package/esm/models/shellservertool.d.ts +11 -2
- package/esm/models/shellservertool.js +9 -2
- package/esm/models/shellservertoolopenrouter.d.ts +9 -2
- package/esm/models/shellservertoolopenrouter.js +6 -1
- package/esm/models/websearchservertool.d.ts +11 -2
- package/esm/models/websearchservertool.js +9 -2
- package/esm/models/websearchservertoolopenrouter.d.ts +9 -2
- package/esm/models/websearchservertoolopenrouter.js +6 -1
- package/jsr.json +1 -1
- package/package.json +6 -6
package/esm/lib/config.d.ts
CHANGED
|
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
49
49
|
export declare const SDK_METADATA: {
|
|
50
50
|
readonly language: "typescript";
|
|
51
51
|
readonly openapiDocVersion: "1.0.0";
|
|
52
|
-
readonly sdkVersion: "0.13.
|
|
52
|
+
readonly sdkVersion: "0.13.40";
|
|
53
53
|
readonly genVersion: "2.884.4";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.13.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.13.40 2.884.4 1.0.0 @openrouter/sdk";
|
|
55
55
|
};
|
|
56
56
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -26,8 +26,8 @@ export function serverURLFromOptions(options) {
|
|
|
26
26
|
export const SDK_METADATA = {
|
|
27
27
|
language: "typescript",
|
|
28
28
|
openapiDocVersion: "1.0.0",
|
|
29
|
-
sdkVersion: "0.13.
|
|
29
|
+
sdkVersion: "0.13.40",
|
|
30
30
|
genVersion: "2.884.4",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 0.13.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 0.13.40 2.884.4 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { AdvisorServerToolOpenRouter, AdvisorServerToolOpenRouter$Outbound } from "./advisorservertoolopenrouter.js";
|
|
4
|
+
import { ApplyPatchServerTool, ApplyPatchServerTool$Outbound } from "./applypatchservertool.js";
|
|
5
|
+
import { ApplyPatchServerToolOpenRouter, ApplyPatchServerToolOpenRouter$Outbound } from "./applypatchservertoolopenrouter.js";
|
|
6
|
+
import { BashServerTool, BashServerTool$Outbound } from "./bashservertool.js";
|
|
7
|
+
import { ChatSearchModelsServerTool, ChatSearchModelsServerTool$Outbound } from "./chatsearchmodelsservertool.js";
|
|
8
|
+
import { CodeInterpreterServerTool, CodeInterpreterServerTool$Outbound } from "./codeinterpreterservertool.js";
|
|
9
|
+
import { CodexLocalShellTool, CodexLocalShellTool$Outbound } from "./codexlocalshelltool.js";
|
|
10
|
+
import { ComputerUseServerTool, ComputerUseServerTool$Outbound } from "./computeruseservertool.js";
|
|
11
|
+
import { CustomTool, CustomTool$Outbound } from "./customtool.js";
|
|
12
|
+
import { DatetimeServerTool, DatetimeServerTool$Outbound } from "./datetimeservertool.js";
|
|
13
|
+
import { FileSearchServerTool, FileSearchServerTool$Outbound } from "./filesearchservertool.js";
|
|
14
|
+
import { FilesServerTool, FilesServerTool$Outbound } from "./filesservertool.js";
|
|
15
|
+
import { FusionServerToolOpenRouter, FusionServerToolOpenRouter$Outbound } from "./fusionservertoolopenrouter.js";
|
|
16
|
+
import { ImageGenerationServerTool, ImageGenerationServerTool$Outbound } from "./imagegenerationservertool.js";
|
|
17
|
+
import { ImageGenerationServerToolOpenRouter, ImageGenerationServerToolOpenRouter$Outbound } from "./imagegenerationservertoolopenrouter.js";
|
|
18
|
+
import { LegacyWebSearchServerTool, LegacyWebSearchServerTool$Outbound } from "./legacywebsearchservertool.js";
|
|
19
|
+
import { McpServerTool, McpServerTool$Outbound } from "./mcpservertool.js";
|
|
20
|
+
import { Preview20250311WebSearchServerTool, Preview20250311WebSearchServerTool$Outbound } from "./preview20250311websearchservertool.js";
|
|
21
|
+
import { PreviewWebSearchServerTool, PreviewWebSearchServerTool$Outbound } from "./previewwebsearchservertool.js";
|
|
22
|
+
import { ShellServerTool, ShellServerTool$Outbound } from "./shellservertool.js";
|
|
23
|
+
import { ShellServerToolOpenRouter, ShellServerToolOpenRouter$Outbound } from "./shellservertoolopenrouter.js";
|
|
24
|
+
import { SubagentServerToolOpenRouter, SubagentServerToolOpenRouter$Outbound } from "./subagentservertoolopenrouter.js";
|
|
25
|
+
import { WebFetchServerTool, WebFetchServerTool$Outbound } from "./webfetchservertool.js";
|
|
26
|
+
import { WebSearchServerTool, WebSearchServerTool$Outbound } from "./websearchservertool.js";
|
|
27
|
+
import { WebSearchServerToolOpenRouter, WebSearchServerToolOpenRouter$Outbound } from "./websearchservertoolopenrouter.js";
|
|
28
|
+
export declare const AdditionalToolsItemRole: {
|
|
29
|
+
readonly Unknown: "unknown";
|
|
30
|
+
readonly User: "user";
|
|
31
|
+
readonly Assistant: "assistant";
|
|
32
|
+
readonly System: "system";
|
|
33
|
+
readonly Critic: "critic";
|
|
34
|
+
readonly Discriminator: "discriminator";
|
|
35
|
+
readonly Developer: "developer";
|
|
36
|
+
readonly Tool: "tool";
|
|
37
|
+
};
|
|
38
|
+
export type AdditionalToolsItemRole = OpenEnum<typeof AdditionalToolsItemRole>;
|
|
39
|
+
export type AdditionalToolsItemTool = {
|
|
40
|
+
type: string;
|
|
41
|
+
additionalProperties?: {
|
|
42
|
+
[k: string]: any | null;
|
|
43
|
+
} | undefined;
|
|
44
|
+
};
|
|
45
|
+
export declare const AdditionalToolsItemTypeFunction: {
|
|
46
|
+
readonly Function: "function";
|
|
47
|
+
};
|
|
48
|
+
export type AdditionalToolsItemTypeFunction = ClosedEnum<typeof AdditionalToolsItemTypeFunction>;
|
|
49
|
+
/**
|
|
50
|
+
* Function tool definition
|
|
51
|
+
*/
|
|
52
|
+
export type AdditionalToolsItemToolFunction = {
|
|
53
|
+
description?: string | null | undefined;
|
|
54
|
+
name: string;
|
|
55
|
+
parameters: {
|
|
56
|
+
[k: string]: any | null;
|
|
57
|
+
} | null;
|
|
58
|
+
strict?: boolean | null | undefined;
|
|
59
|
+
type: AdditionalToolsItemTypeFunction;
|
|
60
|
+
};
|
|
61
|
+
export type AdditionalToolsItemToolUnion = ComputerUseServerTool | AdditionalToolsItemToolFunction | FileSearchServerTool | CodeInterpreterServerTool | McpServerTool | CustomTool | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | AdvisorServerToolOpenRouter | SubagentServerToolOpenRouter | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter | ChatSearchModelsServerTool | WebFetchServerTool | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter | BashServerTool | ShellServerToolOpenRouter | AdditionalToolsItemTool;
|
|
62
|
+
export declare const TypeAdditionalTools: {
|
|
63
|
+
readonly AdditionalTools: "additional_tools";
|
|
64
|
+
};
|
|
65
|
+
export type TypeAdditionalTools = ClosedEnum<typeof TypeAdditionalTools>;
|
|
66
|
+
/**
|
|
67
|
+
* Additional tools made available to the model at this point in the input
|
|
68
|
+
*/
|
|
69
|
+
export type AdditionalToolsItem = {
|
|
70
|
+
id?: string | null | undefined;
|
|
71
|
+
role: AdditionalToolsItemRole;
|
|
72
|
+
tools: Array<ComputerUseServerTool | AdditionalToolsItemToolFunction | FileSearchServerTool | CodeInterpreterServerTool | McpServerTool | CustomTool | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | AdvisorServerToolOpenRouter | SubagentServerToolOpenRouter | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter | ChatSearchModelsServerTool | WebFetchServerTool | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter | BashServerTool | ShellServerToolOpenRouter | AdditionalToolsItemTool>;
|
|
73
|
+
type: TypeAdditionalTools;
|
|
74
|
+
};
|
|
75
|
+
/** @internal */
|
|
76
|
+
export declare const AdditionalToolsItemRole$outboundSchema: z.ZodType<string, AdditionalToolsItemRole>;
|
|
77
|
+
/** @internal */
|
|
78
|
+
export type AdditionalToolsItemTool$Outbound = {
|
|
79
|
+
type: string;
|
|
80
|
+
[additionalProperties: string]: unknown;
|
|
81
|
+
};
|
|
82
|
+
/** @internal */
|
|
83
|
+
export declare const AdditionalToolsItemTool$outboundSchema: z.ZodType<AdditionalToolsItemTool$Outbound, AdditionalToolsItemTool>;
|
|
84
|
+
export declare function additionalToolsItemToolToJSON(additionalToolsItemTool: AdditionalToolsItemTool): string;
|
|
85
|
+
/** @internal */
|
|
86
|
+
export declare const AdditionalToolsItemTypeFunction$outboundSchema: z.ZodEnum<typeof AdditionalToolsItemTypeFunction>;
|
|
87
|
+
/** @internal */
|
|
88
|
+
export type AdditionalToolsItemToolFunction$Outbound = {
|
|
89
|
+
description?: string | null | undefined;
|
|
90
|
+
name: string;
|
|
91
|
+
parameters: {
|
|
92
|
+
[k: string]: any | null;
|
|
93
|
+
} | null;
|
|
94
|
+
strict?: boolean | null | undefined;
|
|
95
|
+
type: string;
|
|
96
|
+
};
|
|
97
|
+
/** @internal */
|
|
98
|
+
export declare const AdditionalToolsItemToolFunction$outboundSchema: z.ZodType<AdditionalToolsItemToolFunction$Outbound, AdditionalToolsItemToolFunction>;
|
|
99
|
+
export declare function additionalToolsItemToolFunctionToJSON(additionalToolsItemToolFunction: AdditionalToolsItemToolFunction): string;
|
|
100
|
+
/** @internal */
|
|
101
|
+
export type AdditionalToolsItemToolUnion$Outbound = ComputerUseServerTool$Outbound | AdditionalToolsItemToolFunction$Outbound | FileSearchServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | CustomTool$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | AdvisorServerToolOpenRouter$Outbound | SubagentServerToolOpenRouter$Outbound | DatetimeServerTool$Outbound | FilesServerTool$Outbound | FusionServerToolOpenRouter$Outbound | ImageGenerationServerToolOpenRouter$Outbound | ChatSearchModelsServerTool$Outbound | WebFetchServerTool$Outbound | WebSearchServerToolOpenRouter$Outbound | ApplyPatchServerToolOpenRouter$Outbound | BashServerTool$Outbound | ShellServerToolOpenRouter$Outbound | AdditionalToolsItemTool$Outbound;
|
|
102
|
+
/** @internal */
|
|
103
|
+
export declare const AdditionalToolsItemToolUnion$outboundSchema: z.ZodType<AdditionalToolsItemToolUnion$Outbound, AdditionalToolsItemToolUnion>;
|
|
104
|
+
export declare function additionalToolsItemToolUnionToJSON(additionalToolsItemToolUnion: AdditionalToolsItemToolUnion): string;
|
|
105
|
+
/** @internal */
|
|
106
|
+
export declare const TypeAdditionalTools$outboundSchema: z.ZodEnum<typeof TypeAdditionalTools>;
|
|
107
|
+
/** @internal */
|
|
108
|
+
export type AdditionalToolsItem$Outbound = {
|
|
109
|
+
id?: string | null | undefined;
|
|
110
|
+
role: string;
|
|
111
|
+
tools: Array<ComputerUseServerTool$Outbound | AdditionalToolsItemToolFunction$Outbound | FileSearchServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | CustomTool$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | AdvisorServerToolOpenRouter$Outbound | SubagentServerToolOpenRouter$Outbound | DatetimeServerTool$Outbound | FilesServerTool$Outbound | FusionServerToolOpenRouter$Outbound | ImageGenerationServerToolOpenRouter$Outbound | ChatSearchModelsServerTool$Outbound | WebFetchServerTool$Outbound | WebSearchServerToolOpenRouter$Outbound | ApplyPatchServerToolOpenRouter$Outbound | BashServerTool$Outbound | ShellServerToolOpenRouter$Outbound | AdditionalToolsItemTool$Outbound>;
|
|
112
|
+
type: string;
|
|
113
|
+
};
|
|
114
|
+
/** @internal */
|
|
115
|
+
export declare const AdditionalToolsItem$outboundSchema: z.ZodType<AdditionalToolsItem$Outbound, AdditionalToolsItem>;
|
|
116
|
+
export declare function additionalToolsItemToJSON(additionalToolsItem: AdditionalToolsItem): string;
|
|
117
|
+
//# sourceMappingURL=additionaltoolsitem.d.ts.map
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: d33059f81c21
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
import { AdvisorServerToolOpenRouter$outboundSchema, } from "./advisorservertoolopenrouter.js";
|
|
9
|
+
import { ApplyPatchServerTool$outboundSchema, } from "./applypatchservertool.js";
|
|
10
|
+
import { ApplyPatchServerToolOpenRouter$outboundSchema, } from "./applypatchservertoolopenrouter.js";
|
|
11
|
+
import { BashServerTool$outboundSchema, } from "./bashservertool.js";
|
|
12
|
+
import { ChatSearchModelsServerTool$outboundSchema, } from "./chatsearchmodelsservertool.js";
|
|
13
|
+
import { CodeInterpreterServerTool$outboundSchema, } from "./codeinterpreterservertool.js";
|
|
14
|
+
import { CodexLocalShellTool$outboundSchema, } from "./codexlocalshelltool.js";
|
|
15
|
+
import { ComputerUseServerTool$outboundSchema, } from "./computeruseservertool.js";
|
|
16
|
+
import { CustomTool$outboundSchema, } from "./customtool.js";
|
|
17
|
+
import { DatetimeServerTool$outboundSchema, } from "./datetimeservertool.js";
|
|
18
|
+
import { FileSearchServerTool$outboundSchema, } from "./filesearchservertool.js";
|
|
19
|
+
import { FilesServerTool$outboundSchema, } from "./filesservertool.js";
|
|
20
|
+
import { FusionServerToolOpenRouter$outboundSchema, } from "./fusionservertoolopenrouter.js";
|
|
21
|
+
import { ImageGenerationServerTool$outboundSchema, } from "./imagegenerationservertool.js";
|
|
22
|
+
import { ImageGenerationServerToolOpenRouter$outboundSchema, } from "./imagegenerationservertoolopenrouter.js";
|
|
23
|
+
import { LegacyWebSearchServerTool$outboundSchema, } from "./legacywebsearchservertool.js";
|
|
24
|
+
import { McpServerTool$outboundSchema, } from "./mcpservertool.js";
|
|
25
|
+
import { Preview20250311WebSearchServerTool$outboundSchema, } from "./preview20250311websearchservertool.js";
|
|
26
|
+
import { PreviewWebSearchServerTool$outboundSchema, } from "./previewwebsearchservertool.js";
|
|
27
|
+
import { ShellServerTool$outboundSchema, } from "./shellservertool.js";
|
|
28
|
+
import { ShellServerToolOpenRouter$outboundSchema, } from "./shellservertoolopenrouter.js";
|
|
29
|
+
import { SubagentServerToolOpenRouter$outboundSchema, } from "./subagentservertoolopenrouter.js";
|
|
30
|
+
import { WebFetchServerTool$outboundSchema, } from "./webfetchservertool.js";
|
|
31
|
+
import { WebSearchServerTool$outboundSchema, } from "./websearchservertool.js";
|
|
32
|
+
import { WebSearchServerToolOpenRouter$outboundSchema, } from "./websearchservertoolopenrouter.js";
|
|
33
|
+
export const AdditionalToolsItemRole = {
|
|
34
|
+
Unknown: "unknown",
|
|
35
|
+
User: "user",
|
|
36
|
+
Assistant: "assistant",
|
|
37
|
+
System: "system",
|
|
38
|
+
Critic: "critic",
|
|
39
|
+
Discriminator: "discriminator",
|
|
40
|
+
Developer: "developer",
|
|
41
|
+
Tool: "tool",
|
|
42
|
+
};
|
|
43
|
+
export const AdditionalToolsItemTypeFunction = {
|
|
44
|
+
Function: "function",
|
|
45
|
+
};
|
|
46
|
+
export const TypeAdditionalTools = {
|
|
47
|
+
AdditionalTools: "additional_tools",
|
|
48
|
+
};
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const AdditionalToolsItemRole$outboundSchema = openEnums.outboundSchema(AdditionalToolsItemRole);
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const AdditionalToolsItemTool$outboundSchema = z.object({
|
|
53
|
+
type: z.string(),
|
|
54
|
+
additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return {
|
|
57
|
+
...v.additionalProperties,
|
|
58
|
+
...remap$(v, {
|
|
59
|
+
additionalProperties: null,
|
|
60
|
+
}),
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
export function additionalToolsItemToolToJSON(additionalToolsItemTool) {
|
|
64
|
+
return JSON.stringify(AdditionalToolsItemTool$outboundSchema.parse(additionalToolsItemTool));
|
|
65
|
+
}
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const AdditionalToolsItemTypeFunction$outboundSchema = z.enum(AdditionalToolsItemTypeFunction);
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const AdditionalToolsItemToolFunction$outboundSchema = z.object({
|
|
70
|
+
description: z.nullable(z.string()).optional(),
|
|
71
|
+
name: z.string(),
|
|
72
|
+
parameters: z.nullable(z.record(z.string(), z.nullable(z.any()))),
|
|
73
|
+
strict: z.nullable(z.boolean()).optional(),
|
|
74
|
+
type: AdditionalToolsItemTypeFunction$outboundSchema,
|
|
75
|
+
});
|
|
76
|
+
export function additionalToolsItemToolFunctionToJSON(additionalToolsItemToolFunction) {
|
|
77
|
+
return JSON.stringify(AdditionalToolsItemToolFunction$outboundSchema.parse(additionalToolsItemToolFunction));
|
|
78
|
+
}
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const AdditionalToolsItemToolUnion$outboundSchema = z.union([
|
|
81
|
+
ComputerUseServerTool$outboundSchema,
|
|
82
|
+
z.lazy(() => AdditionalToolsItemToolFunction$outboundSchema),
|
|
83
|
+
FileSearchServerTool$outboundSchema,
|
|
84
|
+
CodeInterpreterServerTool$outboundSchema,
|
|
85
|
+
McpServerTool$outboundSchema,
|
|
86
|
+
CustomTool$outboundSchema,
|
|
87
|
+
PreviewWebSearchServerTool$outboundSchema,
|
|
88
|
+
Preview20250311WebSearchServerTool$outboundSchema,
|
|
89
|
+
LegacyWebSearchServerTool$outboundSchema,
|
|
90
|
+
WebSearchServerTool$outboundSchema,
|
|
91
|
+
ImageGenerationServerTool$outboundSchema,
|
|
92
|
+
CodexLocalShellTool$outboundSchema,
|
|
93
|
+
ShellServerTool$outboundSchema,
|
|
94
|
+
ApplyPatchServerTool$outboundSchema,
|
|
95
|
+
AdvisorServerToolOpenRouter$outboundSchema,
|
|
96
|
+
SubagentServerToolOpenRouter$outboundSchema,
|
|
97
|
+
DatetimeServerTool$outboundSchema,
|
|
98
|
+
FilesServerTool$outboundSchema,
|
|
99
|
+
FusionServerToolOpenRouter$outboundSchema,
|
|
100
|
+
ImageGenerationServerToolOpenRouter$outboundSchema,
|
|
101
|
+
ChatSearchModelsServerTool$outboundSchema,
|
|
102
|
+
WebFetchServerTool$outboundSchema,
|
|
103
|
+
WebSearchServerToolOpenRouter$outboundSchema,
|
|
104
|
+
ApplyPatchServerToolOpenRouter$outboundSchema,
|
|
105
|
+
BashServerTool$outboundSchema,
|
|
106
|
+
ShellServerToolOpenRouter$outboundSchema,
|
|
107
|
+
z.lazy(() => AdditionalToolsItemTool$outboundSchema),
|
|
108
|
+
]);
|
|
109
|
+
export function additionalToolsItemToolUnionToJSON(additionalToolsItemToolUnion) {
|
|
110
|
+
return JSON.stringify(AdditionalToolsItemToolUnion$outboundSchema.parse(additionalToolsItemToolUnion));
|
|
111
|
+
}
|
|
112
|
+
/** @internal */
|
|
113
|
+
export const TypeAdditionalTools$outboundSchema = z.enum(TypeAdditionalTools);
|
|
114
|
+
/** @internal */
|
|
115
|
+
export const AdditionalToolsItem$outboundSchema = z.object({
|
|
116
|
+
id: z.nullable(z.string()).optional(),
|
|
117
|
+
role: AdditionalToolsItemRole$outboundSchema,
|
|
118
|
+
tools: z.array(z.union([
|
|
119
|
+
ComputerUseServerTool$outboundSchema,
|
|
120
|
+
z.lazy(() => AdditionalToolsItemToolFunction$outboundSchema),
|
|
121
|
+
FileSearchServerTool$outboundSchema,
|
|
122
|
+
CodeInterpreterServerTool$outboundSchema,
|
|
123
|
+
McpServerTool$outboundSchema,
|
|
124
|
+
CustomTool$outboundSchema,
|
|
125
|
+
PreviewWebSearchServerTool$outboundSchema,
|
|
126
|
+
Preview20250311WebSearchServerTool$outboundSchema,
|
|
127
|
+
LegacyWebSearchServerTool$outboundSchema,
|
|
128
|
+
WebSearchServerTool$outboundSchema,
|
|
129
|
+
ImageGenerationServerTool$outboundSchema,
|
|
130
|
+
CodexLocalShellTool$outboundSchema,
|
|
131
|
+
ShellServerTool$outboundSchema,
|
|
132
|
+
ApplyPatchServerTool$outboundSchema,
|
|
133
|
+
AdvisorServerToolOpenRouter$outboundSchema,
|
|
134
|
+
SubagentServerToolOpenRouter$outboundSchema,
|
|
135
|
+
DatetimeServerTool$outboundSchema,
|
|
136
|
+
FilesServerTool$outboundSchema,
|
|
137
|
+
FusionServerToolOpenRouter$outboundSchema,
|
|
138
|
+
ImageGenerationServerToolOpenRouter$outboundSchema,
|
|
139
|
+
ChatSearchModelsServerTool$outboundSchema,
|
|
140
|
+
WebFetchServerTool$outboundSchema,
|
|
141
|
+
WebSearchServerToolOpenRouter$outboundSchema,
|
|
142
|
+
ApplyPatchServerToolOpenRouter$outboundSchema,
|
|
143
|
+
BashServerTool$outboundSchema,
|
|
144
|
+
ShellServerToolOpenRouter$outboundSchema,
|
|
145
|
+
z.lazy(() => AdditionalToolsItemTool$outboundSchema),
|
|
146
|
+
])),
|
|
147
|
+
type: TypeAdditionalTools$outboundSchema,
|
|
148
|
+
});
|
|
149
|
+
export function additionalToolsItemToJSON(additionalToolsItem) {
|
|
150
|
+
return JSON.stringify(AdditionalToolsItem$outboundSchema.parse(additionalToolsItem));
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=additionaltoolsitem.js.map
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { InputText, InputText$Outbound } from "./inputtext.js";
|
|
4
|
+
export type Agent = {
|
|
5
|
+
agentName: string;
|
|
6
|
+
additionalProperties?: {
|
|
7
|
+
[k: string]: any | null;
|
|
8
|
+
} | undefined;
|
|
9
|
+
};
|
|
10
|
+
export type ContentEncryptedContent = {
|
|
11
|
+
encryptedContent: string;
|
|
12
|
+
type: "encrypted_content";
|
|
13
|
+
additionalProperties?: {
|
|
14
|
+
[k: string]: any | null;
|
|
15
|
+
} | undefined;
|
|
16
|
+
};
|
|
17
|
+
export declare const AgentMessageItemDetail: {
|
|
18
|
+
readonly Auto: "auto";
|
|
19
|
+
readonly High: "high";
|
|
20
|
+
readonly Low: "low";
|
|
21
|
+
readonly Original: "original";
|
|
22
|
+
};
|
|
23
|
+
export type AgentMessageItemDetail = OpenEnum<typeof AgentMessageItemDetail>;
|
|
24
|
+
/**
|
|
25
|
+
* Image input content item
|
|
26
|
+
*/
|
|
27
|
+
export type AgentMessageItemContentInputImage = {
|
|
28
|
+
detail: AgentMessageItemDetail;
|
|
29
|
+
imageUrl?: string | null | undefined;
|
|
30
|
+
type: "input_image";
|
|
31
|
+
};
|
|
32
|
+
export type AgentMessageItemContentUnion = InputText | AgentMessageItemContentInputImage | ContentEncryptedContent;
|
|
33
|
+
export declare const TypeAgentMessage: {
|
|
34
|
+
readonly AgentMessage: "agent_message";
|
|
35
|
+
};
|
|
36
|
+
export type TypeAgentMessage = ClosedEnum<typeof TypeAgentMessage>;
|
|
37
|
+
/**
|
|
38
|
+
* A message routed between agents in a multi-agent session
|
|
39
|
+
*/
|
|
40
|
+
export type AgentMessageItem = {
|
|
41
|
+
agent?: Agent | null | undefined;
|
|
42
|
+
author: string;
|
|
43
|
+
content: Array<InputText | AgentMessageItemContentInputImage | ContentEncryptedContent>;
|
|
44
|
+
id?: string | null | undefined;
|
|
45
|
+
recipient: string;
|
|
46
|
+
type: TypeAgentMessage;
|
|
47
|
+
additionalProperties?: {
|
|
48
|
+
[k: string]: any | null;
|
|
49
|
+
} | undefined;
|
|
50
|
+
};
|
|
51
|
+
/** @internal */
|
|
52
|
+
export type Agent$Outbound = {
|
|
53
|
+
agent_name: string;
|
|
54
|
+
[additionalProperties: string]: unknown;
|
|
55
|
+
};
|
|
56
|
+
/** @internal */
|
|
57
|
+
export declare const Agent$outboundSchema: z.ZodType<Agent$Outbound, Agent>;
|
|
58
|
+
export declare function agentToJSON(agent: Agent): string;
|
|
59
|
+
/** @internal */
|
|
60
|
+
export type ContentEncryptedContent$Outbound = {
|
|
61
|
+
encrypted_content: string;
|
|
62
|
+
type: "encrypted_content";
|
|
63
|
+
[additionalProperties: string]: unknown;
|
|
64
|
+
};
|
|
65
|
+
/** @internal */
|
|
66
|
+
export declare const ContentEncryptedContent$outboundSchema: z.ZodType<ContentEncryptedContent$Outbound, ContentEncryptedContent>;
|
|
67
|
+
export declare function contentEncryptedContentToJSON(contentEncryptedContent: ContentEncryptedContent): string;
|
|
68
|
+
/** @internal */
|
|
69
|
+
export declare const AgentMessageItemDetail$outboundSchema: z.ZodType<string, AgentMessageItemDetail>;
|
|
70
|
+
/** @internal */
|
|
71
|
+
export type AgentMessageItemContentInputImage$Outbound = {
|
|
72
|
+
detail: string;
|
|
73
|
+
image_url?: string | null | undefined;
|
|
74
|
+
type: "input_image";
|
|
75
|
+
};
|
|
76
|
+
/** @internal */
|
|
77
|
+
export declare const AgentMessageItemContentInputImage$outboundSchema: z.ZodType<AgentMessageItemContentInputImage$Outbound, AgentMessageItemContentInputImage>;
|
|
78
|
+
export declare function agentMessageItemContentInputImageToJSON(agentMessageItemContentInputImage: AgentMessageItemContentInputImage): string;
|
|
79
|
+
/** @internal */
|
|
80
|
+
export type AgentMessageItemContentUnion$Outbound = InputText$Outbound | AgentMessageItemContentInputImage$Outbound | ContentEncryptedContent$Outbound;
|
|
81
|
+
/** @internal */
|
|
82
|
+
export declare const AgentMessageItemContentUnion$outboundSchema: z.ZodType<AgentMessageItemContentUnion$Outbound, AgentMessageItemContentUnion>;
|
|
83
|
+
export declare function agentMessageItemContentUnionToJSON(agentMessageItemContentUnion: AgentMessageItemContentUnion): string;
|
|
84
|
+
/** @internal */
|
|
85
|
+
export declare const TypeAgentMessage$outboundSchema: z.ZodEnum<typeof TypeAgentMessage>;
|
|
86
|
+
/** @internal */
|
|
87
|
+
export type AgentMessageItem$Outbound = {
|
|
88
|
+
agent?: Agent$Outbound | null | undefined;
|
|
89
|
+
author: string;
|
|
90
|
+
content: Array<InputText$Outbound | AgentMessageItemContentInputImage$Outbound | ContentEncryptedContent$Outbound>;
|
|
91
|
+
id?: string | null | undefined;
|
|
92
|
+
recipient: string;
|
|
93
|
+
type: string;
|
|
94
|
+
[additionalProperties: string]: unknown;
|
|
95
|
+
};
|
|
96
|
+
/** @internal */
|
|
97
|
+
export declare const AgentMessageItem$outboundSchema: z.ZodType<AgentMessageItem$Outbound, AgentMessageItem>;
|
|
98
|
+
export declare function agentMessageItemToJSON(agentMessageItem: AgentMessageItem): string;
|
|
99
|
+
//# sourceMappingURL=agentmessageitem.d.ts.map
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: fc9151085f62
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
import { InputText$outboundSchema, } from "./inputtext.js";
|
|
9
|
+
export const AgentMessageItemDetail = {
|
|
10
|
+
Auto: "auto",
|
|
11
|
+
High: "high",
|
|
12
|
+
Low: "low",
|
|
13
|
+
Original: "original",
|
|
14
|
+
};
|
|
15
|
+
export const TypeAgentMessage = {
|
|
16
|
+
AgentMessage: "agent_message",
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const Agent$outboundSchema = z.object({
|
|
20
|
+
agentName: z.string(),
|
|
21
|
+
additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
22
|
+
}).transform((v) => {
|
|
23
|
+
return {
|
|
24
|
+
...v.additionalProperties,
|
|
25
|
+
...remap$(v, {
|
|
26
|
+
agentName: "agent_name",
|
|
27
|
+
additionalProperties: null,
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
export function agentToJSON(agent) {
|
|
32
|
+
return JSON.stringify(Agent$outboundSchema.parse(agent));
|
|
33
|
+
}
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const ContentEncryptedContent$outboundSchema = z.object({
|
|
36
|
+
encryptedContent: z.string(),
|
|
37
|
+
type: z.literal("encrypted_content"),
|
|
38
|
+
additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
39
|
+
}).transform((v) => {
|
|
40
|
+
return {
|
|
41
|
+
...v.additionalProperties,
|
|
42
|
+
...remap$(v, {
|
|
43
|
+
encryptedContent: "encrypted_content",
|
|
44
|
+
additionalProperties: null,
|
|
45
|
+
}),
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
export function contentEncryptedContentToJSON(contentEncryptedContent) {
|
|
49
|
+
return JSON.stringify(ContentEncryptedContent$outboundSchema.parse(contentEncryptedContent));
|
|
50
|
+
}
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const AgentMessageItemDetail$outboundSchema = openEnums.outboundSchema(AgentMessageItemDetail);
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const AgentMessageItemContentInputImage$outboundSchema = z.object({
|
|
55
|
+
detail: AgentMessageItemDetail$outboundSchema,
|
|
56
|
+
imageUrl: z.nullable(z.string()).optional(),
|
|
57
|
+
type: z.literal("input_image"),
|
|
58
|
+
}).transform((v) => {
|
|
59
|
+
return remap$(v, {
|
|
60
|
+
imageUrl: "image_url",
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
export function agentMessageItemContentInputImageToJSON(agentMessageItemContentInputImage) {
|
|
64
|
+
return JSON.stringify(AgentMessageItemContentInputImage$outboundSchema.parse(agentMessageItemContentInputImage));
|
|
65
|
+
}
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const AgentMessageItemContentUnion$outboundSchema = z.union([
|
|
68
|
+
InputText$outboundSchema,
|
|
69
|
+
z.lazy(() => AgentMessageItemContentInputImage$outboundSchema),
|
|
70
|
+
z.lazy(() => ContentEncryptedContent$outboundSchema),
|
|
71
|
+
]);
|
|
72
|
+
export function agentMessageItemContentUnionToJSON(agentMessageItemContentUnion) {
|
|
73
|
+
return JSON.stringify(AgentMessageItemContentUnion$outboundSchema.parse(agentMessageItemContentUnion));
|
|
74
|
+
}
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const TypeAgentMessage$outboundSchema = z.enum(TypeAgentMessage);
|
|
77
|
+
/** @internal */
|
|
78
|
+
export const AgentMessageItem$outboundSchema = z.object({
|
|
79
|
+
agent: z.nullable(z.lazy(() => Agent$outboundSchema)).optional(),
|
|
80
|
+
author: z.string(),
|
|
81
|
+
content: z.array(z.union([
|
|
82
|
+
InputText$outboundSchema,
|
|
83
|
+
z.lazy(() => AgentMessageItemContentInputImage$outboundSchema),
|
|
84
|
+
z.lazy(() => ContentEncryptedContent$outboundSchema),
|
|
85
|
+
])),
|
|
86
|
+
id: z.nullable(z.string()).optional(),
|
|
87
|
+
recipient: z.string(),
|
|
88
|
+
type: TypeAgentMessage$outboundSchema,
|
|
89
|
+
additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
90
|
+
}).transform((v) => {
|
|
91
|
+
return {
|
|
92
|
+
...v.additionalProperties,
|
|
93
|
+
...remap$(v, {
|
|
94
|
+
additionalProperties: null,
|
|
95
|
+
}),
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
export function agentMessageItemToJSON(agentMessageItem) {
|
|
99
|
+
return JSON.stringify(AgentMessageItem$outboundSchema.parse(agentMessageItem));
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=agentmessageitem.js.map
|
|
@@ -1,17 +1,26 @@
|
|
|
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";
|
|
5
|
+
export declare const ApplyPatchServerToolType: {
|
|
6
|
+
readonly ApplyPatch: "apply_patch";
|
|
7
|
+
};
|
|
8
|
+
export type ApplyPatchServerToolType = ClosedEnum<typeof ApplyPatchServerToolType>;
|
|
4
9
|
/**
|
|
5
10
|
* Apply patch tool configuration
|
|
6
11
|
*/
|
|
7
12
|
export type ApplyPatchServerTool = {
|
|
8
|
-
type:
|
|
13
|
+
type: ApplyPatchServerToolType;
|
|
9
14
|
};
|
|
10
15
|
/** @internal */
|
|
16
|
+
export declare const ApplyPatchServerToolType$inboundSchema: z.ZodEnum<typeof ApplyPatchServerToolType>;
|
|
17
|
+
/** @internal */
|
|
18
|
+
export declare const ApplyPatchServerToolType$outboundSchema: z.ZodEnum<typeof ApplyPatchServerToolType>;
|
|
19
|
+
/** @internal */
|
|
11
20
|
export declare const ApplyPatchServerTool$inboundSchema: z.ZodType<ApplyPatchServerTool, unknown>;
|
|
12
21
|
/** @internal */
|
|
13
22
|
export type ApplyPatchServerTool$Outbound = {
|
|
14
|
-
type:
|
|
23
|
+
type: string;
|
|
15
24
|
};
|
|
16
25
|
/** @internal */
|
|
17
26
|
export declare const ApplyPatchServerTool$outboundSchema: z.ZodType<ApplyPatchServerTool$Outbound, ApplyPatchServerTool>;
|
|
@@ -4,13 +4,20 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
export const ApplyPatchServerToolType = {
|
|
8
|
+
ApplyPatch: "apply_patch",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ApplyPatchServerToolType$inboundSchema = z.enum(ApplyPatchServerToolType);
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ApplyPatchServerToolType$outboundSchema = ApplyPatchServerToolType$inboundSchema;
|
|
7
14
|
/** @internal */
|
|
8
15
|
export const ApplyPatchServerTool$inboundSchema = z.object({
|
|
9
|
-
type:
|
|
16
|
+
type: ApplyPatchServerToolType$inboundSchema,
|
|
10
17
|
});
|
|
11
18
|
/** @internal */
|
|
12
19
|
export const ApplyPatchServerTool$outboundSchema = z.object({
|
|
13
|
-
type:
|
|
20
|
+
type: ApplyPatchServerToolType$outboundSchema,
|
|
14
21
|
});
|
|
15
22
|
export function applyPatchServerToolToJSON(applyPatchServerTool) {
|
|
16
23
|
return JSON.stringify(ApplyPatchServerTool$outboundSchema.parse(applyPatchServerTool));
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
2
3
|
import { ApplyPatchServerToolConfig, ApplyPatchServerToolConfig$Outbound } from "./applypatchservertoolconfig.js";
|
|
4
|
+
export declare const ApplyPatchServerToolOpenRouterType: {
|
|
5
|
+
readonly OpenrouterApplyPatch: "openrouter:apply_patch";
|
|
6
|
+
};
|
|
7
|
+
export type ApplyPatchServerToolOpenRouterType = ClosedEnum<typeof ApplyPatchServerToolOpenRouterType>;
|
|
3
8
|
/**
|
|
4
9
|
* OpenRouter built-in server tool: validates V4A diff patches for file operations (create, update, delete). Restricted to the Responses API.
|
|
5
10
|
*/
|
|
@@ -8,12 +13,14 @@ export type ApplyPatchServerToolOpenRouter = {
|
|
|
8
13
|
* Configuration for the openrouter:apply_patch server tool
|
|
9
14
|
*/
|
|
10
15
|
parameters?: ApplyPatchServerToolConfig | undefined;
|
|
11
|
-
type:
|
|
16
|
+
type: ApplyPatchServerToolOpenRouterType;
|
|
12
17
|
};
|
|
13
18
|
/** @internal */
|
|
19
|
+
export declare const ApplyPatchServerToolOpenRouterType$outboundSchema: z.ZodEnum<typeof ApplyPatchServerToolOpenRouterType>;
|
|
20
|
+
/** @internal */
|
|
14
21
|
export type ApplyPatchServerToolOpenRouter$Outbound = {
|
|
15
22
|
parameters?: ApplyPatchServerToolConfig$Outbound | undefined;
|
|
16
|
-
type:
|
|
23
|
+
type: string;
|
|
17
24
|
};
|
|
18
25
|
/** @internal */
|
|
19
26
|
export declare const ApplyPatchServerToolOpenRouter$outboundSchema: z.ZodType<ApplyPatchServerToolOpenRouter$Outbound, ApplyPatchServerToolOpenRouter>;
|
|
@@ -4,10 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { ApplyPatchServerToolConfig$outboundSchema, } from "./applypatchservertoolconfig.js";
|
|
7
|
+
export const ApplyPatchServerToolOpenRouterType = {
|
|
8
|
+
OpenrouterApplyPatch: "openrouter:apply_patch",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ApplyPatchServerToolOpenRouterType$outboundSchema = z.enum(ApplyPatchServerToolOpenRouterType);
|
|
7
12
|
/** @internal */
|
|
8
13
|
export const ApplyPatchServerToolOpenRouter$outboundSchema = z.object({
|
|
9
14
|
parameters: ApplyPatchServerToolConfig$outboundSchema.optional(),
|
|
10
|
-
type:
|
|
15
|
+
type: ApplyPatchServerToolOpenRouterType$outboundSchema,
|
|
11
16
|
});
|
|
12
17
|
export function applyPatchServerToolOpenRouterToJSON(applyPatchServerToolOpenRouter) {
|
|
13
18
|
return JSON.stringify(ApplyPatchServerToolOpenRouter$outboundSchema.parse(applyPatchServerToolOpenRouter));
|
|
@@ -19,12 +19,16 @@ export type ContainerAuto = {
|
|
|
19
19
|
type: ContainerType;
|
|
20
20
|
};
|
|
21
21
|
export type Container = ContainerAuto | string;
|
|
22
|
+
export declare const TypeCodeInterpreter: {
|
|
23
|
+
readonly CodeInterpreter: "code_interpreter";
|
|
24
|
+
};
|
|
25
|
+
export type TypeCodeInterpreter = ClosedEnum<typeof TypeCodeInterpreter>;
|
|
22
26
|
/**
|
|
23
27
|
* Code interpreter tool configuration
|
|
24
28
|
*/
|
|
25
29
|
export type CodeInterpreterServerTool = {
|
|
26
30
|
container: ContainerAuto | string;
|
|
27
|
-
type:
|
|
31
|
+
type: TypeCodeInterpreter;
|
|
28
32
|
};
|
|
29
33
|
/** @internal */
|
|
30
34
|
export declare const MemoryLimit$inboundSchema: z.ZodType<MemoryLimit, unknown>;
|
|
@@ -55,11 +59,15 @@ export declare const Container$outboundSchema: z.ZodType<Container$Outbound, Con
|
|
|
55
59
|
export declare function containerToJSON(container: Container): string;
|
|
56
60
|
export declare function containerFromJSON(jsonString: string): SafeParseResult<Container, SDKValidationError>;
|
|
57
61
|
/** @internal */
|
|
62
|
+
export declare const TypeCodeInterpreter$inboundSchema: z.ZodEnum<typeof TypeCodeInterpreter>;
|
|
63
|
+
/** @internal */
|
|
64
|
+
export declare const TypeCodeInterpreter$outboundSchema: z.ZodEnum<typeof TypeCodeInterpreter>;
|
|
65
|
+
/** @internal */
|
|
58
66
|
export declare const CodeInterpreterServerTool$inboundSchema: z.ZodType<CodeInterpreterServerTool, unknown>;
|
|
59
67
|
/** @internal */
|
|
60
68
|
export type CodeInterpreterServerTool$Outbound = {
|
|
61
69
|
container: ContainerAuto$Outbound | string;
|
|
62
|
-
type:
|
|
70
|
+
type: string;
|
|
63
71
|
};
|
|
64
72
|
/** @internal */
|
|
65
73
|
export declare const CodeInterpreterServerTool$outboundSchema: z.ZodType<CodeInterpreterServerTool$Outbound, CodeInterpreterServerTool>;
|
|
@@ -15,6 +15,9 @@ export const MemoryLimit = {
|
|
|
15
15
|
export const ContainerType = {
|
|
16
16
|
Auto: "auto",
|
|
17
17
|
};
|
|
18
|
+
export const TypeCodeInterpreter = {
|
|
19
|
+
CodeInterpreter: "code_interpreter",
|
|
20
|
+
};
|
|
18
21
|
/** @internal */
|
|
19
22
|
export const MemoryLimit$inboundSchema = openEnums.inboundSchema(MemoryLimit);
|
|
20
23
|
/** @internal */
|
|
@@ -67,14 +70,18 @@ export function containerFromJSON(jsonString) {
|
|
|
67
70
|
return safeParse(jsonString, (x) => Container$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Container' from JSON`);
|
|
68
71
|
}
|
|
69
72
|
/** @internal */
|
|
73
|
+
export const TypeCodeInterpreter$inboundSchema = z.enum(TypeCodeInterpreter);
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const TypeCodeInterpreter$outboundSchema = TypeCodeInterpreter$inboundSchema;
|
|
76
|
+
/** @internal */
|
|
70
77
|
export const CodeInterpreterServerTool$inboundSchema = z.object({
|
|
71
78
|
container: z.union([z.lazy(() => ContainerAuto$inboundSchema), z.string()]),
|
|
72
|
-
type:
|
|
79
|
+
type: TypeCodeInterpreter$inboundSchema,
|
|
73
80
|
});
|
|
74
81
|
/** @internal */
|
|
75
82
|
export const CodeInterpreterServerTool$outboundSchema = z.object({
|
|
76
83
|
container: z.union([z.lazy(() => ContainerAuto$outboundSchema), z.string()]),
|
|
77
|
-
type:
|
|
84
|
+
type: TypeCodeInterpreter$outboundSchema,
|
|
78
85
|
});
|
|
79
86
|
export function codeInterpreterServerToolToJSON(codeInterpreterServerTool) {
|
|
80
87
|
return JSON.stringify(CodeInterpreterServerTool$outboundSchema.parse(codeInterpreterServerTool));
|