@openrouter/sdk 1.5.55 → 1.5.57
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 +5 -4
- package/esm/models/additionaltoolsitem.js +3 -0
- package/esm/models/alignmentresponsesrejected.d.ts +4 -1
- package/esm/models/alignmentresponsesrejected.js +6 -0
- package/esm/models/byokproviderslug.d.ts +1 -0
- package/esm/models/byokproviderslug.js +1 -0
- package/esm/models/createworkspacerequest.d.ts +1 -0
- package/esm/models/createworkspacerequest.js +1 -0
- package/esm/models/decisionschoicequestion.d.ts +4 -4
- package/esm/models/decisionschoicequestion.js +1 -5
- package/esm/models/decisionsnoulquestion.d.ts +12 -12
- package/esm/models/decisionsnoulquestion.js +3 -7
- package/esm/models/decisionsscorequestion.d.ts +4 -4
- package/esm/models/decisionsscorequestion.js +1 -5
- package/esm/models/imagegenerationproviderpreferences.d.ts +6 -0
- package/esm/models/imagegenerationproviderpreferences.js +1 -0
- package/esm/models/imagegenerationrequest.d.ts +51 -4
- package/esm/models/imagegenerationrequest.js +32 -1
- package/esm/models/index.d.ts +6 -0
- package/esm/models/index.js +6 -0
- package/esm/models/mcpapprovalrequestitem.d.ts +7 -0
- package/esm/models/mcpapprovalrequestitem.js +19 -1
- package/esm/models/mcpcallitem.d.ts +17 -1
- package/esm/models/mcpcallitem.js +18 -0
- package/esm/models/mcpservertool.d.ts +78 -69
- package/esm/models/mcpservertool.js +135 -105
- package/esm/models/mcpservertoolopenrouter.d.ts +28 -0
- package/esm/models/mcpservertoolopenrouter.js +20 -0
- package/esm/models/mcpservertoolparameters.d.ts +152 -0
- package/esm/models/mcpservertoolparameters.js +134 -0
- package/esm/models/openairesponsestoolchoiceunion.d.ts +3 -2
- package/esm/models/openairesponsestoolchoiceunion.js +3 -0
- package/esm/models/operations/listbyokkeys.d.ts +1 -0
- package/esm/models/operations/listbyokkeys.js +1 -0
- package/esm/models/outputitemmcpapprovalrequest.d.ts +14 -0
- package/esm/models/outputitemmcpapprovalrequest.js +23 -0
- package/esm/models/outputitemmcpcall.d.ts +74 -0
- package/esm/models/outputitemmcpcall.js +94 -0
- package/esm/models/outputitemmcplisttools.d.ts +25 -0
- package/esm/models/outputitemmcplisttools.js +37 -0
- package/esm/models/outputitems.d.ts +3 -0
- package/esm/models/outputitems.js +2 -0
- package/esm/models/providername.d.ts +1 -0
- package/esm/models/providername.js +1 -0
- package/esm/models/provideroptions.d.ts +6 -0
- package/esm/models/provideroptions.js +1 -0
- package/esm/models/providerresponse.d.ts +1 -0
- package/esm/models/providerresponse.js +1 -0
- package/esm/models/responsesrequest.d.ts +9 -0
- package/esm/models/responsesrequest.js +3 -0
- package/esm/models/toolchoicemcp.d.ts +33 -0
- package/esm/models/toolchoicemcp.js +42 -0
- package/esm/models/toolsearchoutputitem.d.ts +5 -4
- package/esm/models/toolsearchoutputitem.js +3 -0
- package/esm/models/updateworkspacerequest.d.ts +1 -0
- package/esm/models/updateworkspacerequest.js +1 -0
- package/esm/models/videogenerationrequest.d.ts +6 -0
- package/esm/models/videogenerationrequest.js +1 -0
- package/esm/sdk/sdk.d.ts +0 -9
- package/esm/sdk/sdk.js +1 -7
- package/jsr.json +1 -1
- package/package.json +5 -5
- package/esm/funcs/call-model.d.ts +0 -67
- package/esm/funcs/call-model.js +0 -98
- package/esm/lib/anthropic-compat.d.ts +0 -51
- package/esm/lib/anthropic-compat.js +0 -222
- package/esm/lib/async-params.d.ts +0 -107
- package/esm/lib/async-params.js +0 -88
- package/esm/lib/chat-compat.d.ts +0 -47
- package/esm/lib/chat-compat.js +0 -111
- package/esm/lib/claude-constants.d.ts +0 -22
- package/esm/lib/claude-constants.js +0 -20
- package/esm/lib/claude-type-guards.d.ts +0 -10
- package/esm/lib/claude-type-guards.js +0 -70
- package/esm/lib/conversation-state.d.ts +0 -63
- package/esm/lib/conversation-state.js +0 -210
- package/esm/lib/model-result.d.ts +0 -373
- package/esm/lib/model-result.js +0 -1414
- package/esm/lib/next-turn-params.d.ts +0 -30
- package/esm/lib/next-turn-params.js +0 -135
- package/esm/lib/reusable-stream.d.ts +0 -39
- package/esm/lib/reusable-stream.js +0 -192
- package/esm/lib/stop-conditions.d.ts +0 -80
- package/esm/lib/stop-conditions.js +0 -104
- package/esm/lib/stream-transformers.d.ts +0 -118
- package/esm/lib/stream-transformers.js +0 -852
- package/esm/lib/stream-type-guards.d.ts +0 -49
- package/esm/lib/stream-type-guards.js +0 -85
- package/esm/lib/tool-context.d.ts +0 -68
- package/esm/lib/tool-context.js +0 -175
- package/esm/lib/tool-event-broadcaster.d.ts +0 -44
- package/esm/lib/tool-event-broadcaster.js +0 -146
- package/esm/lib/tool-executor.d.ts +0 -74
- package/esm/lib/tool-executor.js +0 -267
- package/esm/lib/tool-orchestrator.d.ts +0 -52
- package/esm/lib/tool-orchestrator.js +0 -180
- package/esm/lib/tool-types.d.ts +0 -573
- package/esm/lib/tool-types.js +0 -80
- package/esm/lib/tool.d.ts +0 -108
- package/esm/lib/tool.js +0 -74
- package/esm/lib/turn-context.d.ts +0 -52
- package/esm/lib/turn-context.js +0 -59
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.5.
|
|
53
|
+
readonly sdkVersion: "1.5.57";
|
|
54
54
|
readonly genVersion: "2.950.13";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.57 2.950.13 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.5.
|
|
32
|
+
sdkVersion: "1.5.57",
|
|
33
33
|
genVersion: "2.950.13",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.5.57 2.950.13 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -16,6 +16,7 @@ import { ImageGenerationServerTool, ImageGenerationServerTool$Outbound } from ".
|
|
|
16
16
|
import { ImageGenerationServerToolOpenRouter, ImageGenerationServerToolOpenRouter$Outbound } from "./imagegenerationservertoolopenrouter.js";
|
|
17
17
|
import { LegacyWebSearchServerTool, LegacyWebSearchServerTool$Outbound } from "./legacywebsearchservertool.js";
|
|
18
18
|
import { McpServerTool, McpServerTool$Outbound } from "./mcpservertool.js";
|
|
19
|
+
import { McpServerToolOpenRouter, McpServerToolOpenRouter$Outbound } from "./mcpservertoolopenrouter.js";
|
|
19
20
|
import { NamespaceTool, NamespaceTool$Outbound } from "./namespacetool.js";
|
|
20
21
|
import { Preview20250311WebSearchServerTool, Preview20250311WebSearchServerTool$Outbound } from "./preview20250311websearchservertool.js";
|
|
21
22
|
import { PreviewWebSearchServerTool, PreviewWebSearchServerTool$Outbound } from "./previewwebsearchservertool.js";
|
|
@@ -77,7 +78,7 @@ export type AdditionalToolsItemToolFunction = {
|
|
|
77
78
|
[k: string]: any;
|
|
78
79
|
} | null | undefined;
|
|
79
80
|
};
|
|
80
|
-
export type AdditionalToolsItemToolUnion = ComputerUseServerTool | NamespaceTool | AdditionalToolsItemToolFunction | FileSearchServerTool | CodeInterpreterServerTool | McpServerTool | CustomTool | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | AdvisorServerToolOpenRouter | SubagentServerToolOpenRouter | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter | SearchModelsServerToolOpenRouter | WebFetchServerTool | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter | BashServerTool | ShellServerToolOpenRouter | ToolSearchServerTool | AdditionalToolsItemTool;
|
|
81
|
+
export type AdditionalToolsItemToolUnion = ComputerUseServerTool | NamespaceTool | AdditionalToolsItemToolFunction | FileSearchServerTool | CodeInterpreterServerTool | McpServerTool | CustomTool | McpServerToolOpenRouter | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | AdvisorServerToolOpenRouter | SubagentServerToolOpenRouter | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter | SearchModelsServerToolOpenRouter | WebFetchServerTool | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter | BashServerTool | ShellServerToolOpenRouter | ToolSearchServerTool | AdditionalToolsItemTool;
|
|
81
82
|
export declare const TypeAdditionalTools: {
|
|
82
83
|
readonly AdditionalTools: "additional_tools";
|
|
83
84
|
};
|
|
@@ -88,7 +89,7 @@ export type TypeAdditionalTools = ClosedEnum<typeof TypeAdditionalTools>;
|
|
|
88
89
|
export type AdditionalToolsItem = {
|
|
89
90
|
id?: string | null | undefined;
|
|
90
91
|
role: AdditionalToolsItemRole;
|
|
91
|
-
tools: Array<ComputerUseServerTool | NamespaceTool | AdditionalToolsItemToolFunction | FileSearchServerTool | CodeInterpreterServerTool | McpServerTool | CustomTool | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | AdvisorServerToolOpenRouter | SubagentServerToolOpenRouter | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter | SearchModelsServerToolOpenRouter | WebFetchServerTool | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter | BashServerTool | ShellServerToolOpenRouter | ToolSearchServerTool | AdditionalToolsItemTool>;
|
|
92
|
+
tools: Array<ComputerUseServerTool | NamespaceTool | AdditionalToolsItemToolFunction | FileSearchServerTool | CodeInterpreterServerTool | McpServerTool | CustomTool | McpServerToolOpenRouter | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | AdvisorServerToolOpenRouter | SubagentServerToolOpenRouter | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter | SearchModelsServerToolOpenRouter | WebFetchServerTool | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter | BashServerTool | ShellServerToolOpenRouter | ToolSearchServerTool | AdditionalToolsItemTool>;
|
|
92
93
|
type: TypeAdditionalTools;
|
|
93
94
|
};
|
|
94
95
|
/** @internal */
|
|
@@ -125,7 +126,7 @@ export type AdditionalToolsItemToolFunction$Outbound = {
|
|
|
125
126
|
export declare const AdditionalToolsItemToolFunction$outboundSchema: z.ZodType<AdditionalToolsItemToolFunction$Outbound, AdditionalToolsItemToolFunction>;
|
|
126
127
|
export declare function additionalToolsItemToolFunctionToJSON(additionalToolsItemToolFunction: AdditionalToolsItemToolFunction): string;
|
|
127
128
|
/** @internal */
|
|
128
|
-
export type AdditionalToolsItemToolUnion$Outbound = ComputerUseServerTool$Outbound | NamespaceTool$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 | SearchModelsServerToolOpenRouter$Outbound | WebFetchServerTool$Outbound | WebSearchServerToolOpenRouter$Outbound | ApplyPatchServerToolOpenRouter$Outbound | BashServerTool$Outbound | ShellServerToolOpenRouter$Outbound | ToolSearchServerTool$Outbound | AdditionalToolsItemTool$Outbound;
|
|
129
|
+
export type AdditionalToolsItemToolUnion$Outbound = ComputerUseServerTool$Outbound | NamespaceTool$Outbound | AdditionalToolsItemToolFunction$Outbound | FileSearchServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | CustomTool$Outbound | McpServerToolOpenRouter$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 | SearchModelsServerToolOpenRouter$Outbound | WebFetchServerTool$Outbound | WebSearchServerToolOpenRouter$Outbound | ApplyPatchServerToolOpenRouter$Outbound | BashServerTool$Outbound | ShellServerToolOpenRouter$Outbound | ToolSearchServerTool$Outbound | AdditionalToolsItemTool$Outbound;
|
|
129
130
|
/** @internal */
|
|
130
131
|
export declare const AdditionalToolsItemToolUnion$outboundSchema: z.ZodType<AdditionalToolsItemToolUnion$Outbound, AdditionalToolsItemToolUnion>;
|
|
131
132
|
export declare function additionalToolsItemToolUnionToJSON(additionalToolsItemToolUnion: AdditionalToolsItemToolUnion): string;
|
|
@@ -135,7 +136,7 @@ export declare const TypeAdditionalTools$outboundSchema: z.ZodEnum<typeof TypeAd
|
|
|
135
136
|
export type AdditionalToolsItem$Outbound = {
|
|
136
137
|
id?: string | null | undefined;
|
|
137
138
|
role: string;
|
|
138
|
-
tools: Array<ComputerUseServerTool$Outbound | NamespaceTool$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 | SearchModelsServerToolOpenRouter$Outbound | WebFetchServerTool$Outbound | WebSearchServerToolOpenRouter$Outbound | ApplyPatchServerToolOpenRouter$Outbound | BashServerTool$Outbound | ShellServerToolOpenRouter$Outbound | ToolSearchServerTool$Outbound | AdditionalToolsItemTool$Outbound>;
|
|
139
|
+
tools: Array<ComputerUseServerTool$Outbound | NamespaceTool$Outbound | AdditionalToolsItemToolFunction$Outbound | FileSearchServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | CustomTool$Outbound | McpServerToolOpenRouter$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 | SearchModelsServerToolOpenRouter$Outbound | WebFetchServerTool$Outbound | WebSearchServerToolOpenRouter$Outbound | ApplyPatchServerToolOpenRouter$Outbound | BashServerTool$Outbound | ShellServerToolOpenRouter$Outbound | ToolSearchServerTool$Outbound | AdditionalToolsItemTool$Outbound>;
|
|
139
140
|
type: string;
|
|
140
141
|
};
|
|
141
142
|
/** @internal */
|
|
@@ -21,6 +21,7 @@ import { ImageGenerationServerTool$outboundSchema, } from "./imagegenerationserv
|
|
|
21
21
|
import { ImageGenerationServerToolOpenRouter$outboundSchema, } from "./imagegenerationservertoolopenrouter.js";
|
|
22
22
|
import { LegacyWebSearchServerTool$outboundSchema, } from "./legacywebsearchservertool.js";
|
|
23
23
|
import { McpServerTool$outboundSchema, } from "./mcpservertool.js";
|
|
24
|
+
import { McpServerToolOpenRouter$outboundSchema, } from "./mcpservertoolopenrouter.js";
|
|
24
25
|
import { NamespaceTool$outboundSchema, } from "./namespacetool.js";
|
|
25
26
|
import { Preview20250311WebSearchServerTool$outboundSchema, } from "./preview20250311websearchservertool.js";
|
|
26
27
|
import { PreviewWebSearchServerTool$outboundSchema, } from "./previewwebsearchservertool.js";
|
|
@@ -103,6 +104,7 @@ export const AdditionalToolsItemToolUnion$outboundSchema = z.union([
|
|
|
103
104
|
CodeInterpreterServerTool$outboundSchema,
|
|
104
105
|
McpServerTool$outboundSchema,
|
|
105
106
|
CustomTool$outboundSchema,
|
|
107
|
+
McpServerToolOpenRouter$outboundSchema,
|
|
106
108
|
PreviewWebSearchServerTool$outboundSchema,
|
|
107
109
|
Preview20250311WebSearchServerTool$outboundSchema,
|
|
108
110
|
LegacyWebSearchServerTool$outboundSchema,
|
|
@@ -143,6 +145,7 @@ export const AdditionalToolsItem$outboundSchema = z.object({
|
|
|
143
145
|
CodeInterpreterServerTool$outboundSchema,
|
|
144
146
|
McpServerTool$outboundSchema,
|
|
145
147
|
CustomTool$outboundSchema,
|
|
148
|
+
McpServerToolOpenRouter$outboundSchema,
|
|
146
149
|
PreviewWebSearchServerTool$outboundSchema,
|
|
147
150
|
Preview20250311WebSearchServerTool$outboundSchema,
|
|
148
151
|
LegacyWebSearchServerTool$outboundSchema,
|
|
@@ -9,10 +9,13 @@ import { OutputItemCustomToolCall } from "./outputitemcustomtoolcall.js";
|
|
|
9
9
|
import { OutputItemFileSearchCall } from "./outputitemfilesearchcall.js";
|
|
10
10
|
import { OutputItemFunctionCall } from "./outputitemfunctioncall.js";
|
|
11
11
|
import { OutputItemImageGenerationCall } from "./outputitemimagegenerationcall.js";
|
|
12
|
+
import { OutputItemMcpApprovalRequest } from "./outputitemmcpapprovalrequest.js";
|
|
13
|
+
import { OutputItemMcpCall } from "./outputitemmcpcall.js";
|
|
14
|
+
import { OutputItemMcpListTools } from "./outputitemmcplisttools.js";
|
|
12
15
|
import { OutputItemReasoning } from "./outputitemreasoning.js";
|
|
13
16
|
import { OutputItemWebSearchCall } from "./outputitemwebsearchcall.js";
|
|
14
17
|
import { OutputMessage } from "./outputmessage.js";
|
|
15
|
-
export type AlignmentResponsesRejected = OutputItemApplyPatchCall | OutputItemCodeInterpreterCall | OutputItemCompaction | OutputItemCustomToolCall | OutputItemFileSearchCall | OutputItemFunctionCall | OutputItemImageGenerationCall | OutputMessage | OutputItemReasoning | OutputItemWebSearchCall | discriminatedUnionTypes.Unknown<"type">;
|
|
18
|
+
export type AlignmentResponsesRejected = OutputItemApplyPatchCall | OutputItemCodeInterpreterCall | OutputItemCompaction | OutputItemCustomToolCall | OutputItemFileSearchCall | OutputItemFunctionCall | OutputItemImageGenerationCall | OutputItemMcpApprovalRequest | OutputItemMcpCall | OutputItemMcpListTools | OutputMessage | OutputItemReasoning | OutputItemWebSearchCall | discriminatedUnionTypes.Unknown<"type">;
|
|
16
19
|
/** @internal */
|
|
17
20
|
export declare const AlignmentResponsesRejected$inboundSchema: z.ZodType<AlignmentResponsesRejected, unknown>;
|
|
18
21
|
export declare function alignmentResponsesRejectedFromJSON(jsonString: string): SafeParseResult<AlignmentResponsesRejected, SDKValidationError>;
|
|
@@ -11,6 +11,9 @@ import { OutputItemCustomToolCall$inboundSchema, } from "./outputitemcustomtoolc
|
|
|
11
11
|
import { OutputItemFileSearchCall$inboundSchema, } from "./outputitemfilesearchcall.js";
|
|
12
12
|
import { OutputItemFunctionCall$inboundSchema, } from "./outputitemfunctioncall.js";
|
|
13
13
|
import { OutputItemImageGenerationCall$inboundSchema, } from "./outputitemimagegenerationcall.js";
|
|
14
|
+
import { OutputItemMcpApprovalRequest$inboundSchema, } from "./outputitemmcpapprovalrequest.js";
|
|
15
|
+
import { OutputItemMcpCall$inboundSchema, } from "./outputitemmcpcall.js";
|
|
16
|
+
import { OutputItemMcpListTools$inboundSchema, } from "./outputitemmcplisttools.js";
|
|
14
17
|
import { OutputItemReasoning$inboundSchema, } from "./outputitemreasoning.js";
|
|
15
18
|
import { OutputItemWebSearchCall$inboundSchema, } from "./outputitemwebsearchcall.js";
|
|
16
19
|
import { OutputMessage$inboundSchema } from "./outputmessage.js";
|
|
@@ -23,6 +26,9 @@ export const AlignmentResponsesRejected$inboundSchema = discriminatedUnion("type
|
|
|
23
26
|
file_search_call: OutputItemFileSearchCall$inboundSchema,
|
|
24
27
|
function_call: OutputItemFunctionCall$inboundSchema,
|
|
25
28
|
image_generation_call: OutputItemImageGenerationCall$inboundSchema,
|
|
29
|
+
mcp_approval_request: OutputItemMcpApprovalRequest$inboundSchema,
|
|
30
|
+
mcp_call: OutputItemMcpCall$inboundSchema,
|
|
31
|
+
mcp_list_tools: OutputItemMcpListTools$inboundSchema,
|
|
26
32
|
message: OutputMessage$inboundSchema,
|
|
27
33
|
reasoning: OutputItemReasoning$inboundSchema,
|
|
28
34
|
web_search_call: OutputItemWebSearchCall$inboundSchema,
|
|
@@ -100,6 +100,7 @@ export declare const BYOKProviderSlug: {
|
|
|
100
100
|
readonly Reka: "reka";
|
|
101
101
|
readonly Relace: "relace";
|
|
102
102
|
readonly Respan: "respan";
|
|
103
|
+
readonly River: "river";
|
|
103
104
|
readonly Runway: "runway";
|
|
104
105
|
readonly SailResearch: "sail-research";
|
|
105
106
|
readonly Sakana: "sakana";
|
|
@@ -7,6 +7,7 @@ export declare const CreateWorkspaceRequestDisabledServerTool: {
|
|
|
7
7
|
readonly OpenrouterDatetime: "openrouter:datetime";
|
|
8
8
|
readonly OpenrouterFusion: "openrouter:fusion";
|
|
9
9
|
readonly OpenrouterImageGeneration: "openrouter:image_generation";
|
|
10
|
+
readonly OpenrouterMcp: "openrouter:mcp";
|
|
10
11
|
readonly OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models";
|
|
11
12
|
readonly OpenrouterShell: "openrouter:shell";
|
|
12
13
|
readonly OpenrouterSubagent: "openrouter:subagent";
|
|
@@ -12,6 +12,7 @@ export const CreateWorkspaceRequestDisabledServerTool = {
|
|
|
12
12
|
OpenrouterDatetime: "openrouter:datetime",
|
|
13
13
|
OpenrouterFusion: "openrouter:fusion",
|
|
14
14
|
OpenrouterImageGeneration: "openrouter:image_generation",
|
|
15
|
+
OpenrouterMcp: "openrouter:mcp",
|
|
15
16
|
OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models",
|
|
16
17
|
OpenrouterShell: "openrouter:shell",
|
|
17
18
|
OpenrouterSubagent: "openrouter:subagent",
|
|
@@ -20,9 +20,9 @@ export type DecisionsChoiceQuestion = {
|
|
|
20
20
|
/**
|
|
21
21
|
* A plain string, or a JSON object or array of structured guidance.
|
|
22
22
|
*/
|
|
23
|
-
instructions
|
|
23
|
+
instructions?: string | {
|
|
24
24
|
[k: string]: any;
|
|
25
|
-
} | Array<any
|
|
25
|
+
} | Array<any> | null | undefined;
|
|
26
26
|
type: "choice";
|
|
27
27
|
};
|
|
28
28
|
/** @internal */
|
|
@@ -46,9 +46,9 @@ export type DecisionsChoiceQuestion$Outbound = {
|
|
|
46
46
|
[k: string]: any;
|
|
47
47
|
} | Array<any> | null;
|
|
48
48
|
};
|
|
49
|
-
instructions
|
|
49
|
+
instructions?: string | {
|
|
50
50
|
[k: string]: any;
|
|
51
|
-
} | Array<any
|
|
51
|
+
} | Array<any> | null | undefined;
|
|
52
52
|
type: "choice";
|
|
53
53
|
};
|
|
54
54
|
/** @internal */
|
|
@@ -17,11 +17,7 @@ export function decisionsChoiceQuestionInstructionsToJSON(decisionsChoiceQuestio
|
|
|
17
17
|
/** @internal */
|
|
18
18
|
export const DecisionsChoiceQuestion$outboundSchema = z.object({
|
|
19
19
|
criteria: z.record(z.string(), z.nullable(z.union([z.string(), z.record(z.string(), z.any()), z.array(z.any())]))),
|
|
20
|
-
instructions: z.union([
|
|
21
|
-
z.string(),
|
|
22
|
-
z.record(z.string(), z.any()),
|
|
23
|
-
z.array(z.any()),
|
|
24
|
-
]),
|
|
20
|
+
instructions: z.nullable(z.union([z.string(), z.record(z.string(), z.any()), z.array(z.any())])).optional(),
|
|
25
21
|
type: z.literal("choice"),
|
|
26
22
|
});
|
|
27
23
|
export function decisionsChoiceQuestionToJSON(decisionsChoiceQuestion) {
|
|
@@ -15,15 +15,15 @@ export type DecisionsNoulQuestionCriteria = {
|
|
|
15
15
|
/**
|
|
16
16
|
* A plain string, or a JSON object or array of structured guidance.
|
|
17
17
|
*/
|
|
18
|
-
false
|
|
18
|
+
false?: string | {
|
|
19
19
|
[k: string]: any;
|
|
20
|
-
} | Array<any
|
|
20
|
+
} | Array<any> | null | undefined;
|
|
21
21
|
/**
|
|
22
22
|
* A plain string, or a JSON object or array of structured guidance.
|
|
23
23
|
*/
|
|
24
|
-
true
|
|
24
|
+
true?: string | {
|
|
25
25
|
[k: string]: any;
|
|
26
|
-
} | Array<any
|
|
26
|
+
} | Array<any> | null | undefined;
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
29
29
|
* A plain string, or a JSON object or array of structured guidance.
|
|
@@ -36,9 +36,9 @@ export type DecisionsNoulQuestion = {
|
|
|
36
36
|
/**
|
|
37
37
|
* A plain string, or a JSON object or array of structured guidance.
|
|
38
38
|
*/
|
|
39
|
-
instructions
|
|
39
|
+
instructions?: string | {
|
|
40
40
|
[k: string]: any;
|
|
41
|
-
} | Array<any
|
|
41
|
+
} | Array<any> | null | undefined;
|
|
42
42
|
type: "noul";
|
|
43
43
|
};
|
|
44
44
|
/** @internal */
|
|
@@ -57,12 +57,12 @@ export declare const True$outboundSchema: z.ZodType<True$Outbound, True>;
|
|
|
57
57
|
export declare function trueToJSON(value: True): string;
|
|
58
58
|
/** @internal */
|
|
59
59
|
export type DecisionsNoulQuestionCriteria$Outbound = {
|
|
60
|
-
false
|
|
60
|
+
false?: string | {
|
|
61
61
|
[k: string]: any;
|
|
62
|
-
} | Array<any
|
|
63
|
-
true
|
|
62
|
+
} | Array<any> | null | undefined;
|
|
63
|
+
true?: string | {
|
|
64
64
|
[k: string]: any;
|
|
65
|
-
} | Array<any
|
|
65
|
+
} | Array<any> | null | undefined;
|
|
66
66
|
};
|
|
67
67
|
/** @internal */
|
|
68
68
|
export declare const DecisionsNoulQuestionCriteria$outboundSchema: z.ZodType<DecisionsNoulQuestionCriteria$Outbound, DecisionsNoulQuestionCriteria>;
|
|
@@ -77,9 +77,9 @@ export declare function decisionsNoulQuestionInstructionsToJSON(decisionsNoulQue
|
|
|
77
77
|
/** @internal */
|
|
78
78
|
export type DecisionsNoulQuestion$Outbound = {
|
|
79
79
|
criteria?: DecisionsNoulQuestionCriteria$Outbound | undefined;
|
|
80
|
-
instructions
|
|
80
|
+
instructions?: string | {
|
|
81
81
|
[k: string]: any;
|
|
82
|
-
} | Array<any
|
|
82
|
+
} | Array<any> | null | undefined;
|
|
83
83
|
type: "noul";
|
|
84
84
|
};
|
|
85
85
|
/** @internal */
|
|
@@ -23,8 +23,8 @@ export function trueToJSON(value) {
|
|
|
23
23
|
}
|
|
24
24
|
/** @internal */
|
|
25
25
|
export const DecisionsNoulQuestionCriteria$outboundSchema = z.object({
|
|
26
|
-
false: z.union([z.string(), z.record(z.string(), z.any()), z.array(z.any())]),
|
|
27
|
-
true: z.union([z.string(), z.record(z.string(), z.any()), z.array(z.any())]),
|
|
26
|
+
false: z.nullable(z.union([z.string(), z.record(z.string(), z.any()), z.array(z.any())])).optional(),
|
|
27
|
+
true: z.nullable(z.union([z.string(), z.record(z.string(), z.any()), z.array(z.any())])).optional(),
|
|
28
28
|
});
|
|
29
29
|
export function decisionsNoulQuestionCriteriaToJSON(decisionsNoulQuestionCriteria) {
|
|
30
30
|
return JSON.stringify(DecisionsNoulQuestionCriteria$outboundSchema.parse(decisionsNoulQuestionCriteria));
|
|
@@ -38,11 +38,7 @@ export function decisionsNoulQuestionInstructionsToJSON(decisionsNoulQuestionIns
|
|
|
38
38
|
export const DecisionsNoulQuestion$outboundSchema = z.object({
|
|
39
39
|
criteria: z.lazy(() => DecisionsNoulQuestionCriteria$outboundSchema)
|
|
40
40
|
.optional(),
|
|
41
|
-
instructions: z.union([
|
|
42
|
-
z.string(),
|
|
43
|
-
z.record(z.string(), z.any()),
|
|
44
|
-
z.array(z.any()),
|
|
45
|
-
]),
|
|
41
|
+
instructions: z.nullable(z.union([z.string(), z.record(z.string(), z.any()), z.array(z.any())])).optional(),
|
|
46
42
|
type: z.literal("noul"),
|
|
47
43
|
});
|
|
48
44
|
export function decisionsNoulQuestionToJSON(decisionsNoulQuestion) {
|
|
@@ -18,9 +18,9 @@ export type DecisionsScoreQuestion = {
|
|
|
18
18
|
/**
|
|
19
19
|
* A plain string, or a JSON object or array of structured guidance.
|
|
20
20
|
*/
|
|
21
|
-
instructions
|
|
21
|
+
instructions?: string | {
|
|
22
22
|
[k: string]: any;
|
|
23
|
-
} | Array<any
|
|
23
|
+
} | Array<any> | null | undefined;
|
|
24
24
|
type: "score";
|
|
25
25
|
};
|
|
26
26
|
/** @internal */
|
|
@@ -42,9 +42,9 @@ export type DecisionsScoreQuestion$Outbound = {
|
|
|
42
42
|
criteria: Array<string | {
|
|
43
43
|
[k: string]: any;
|
|
44
44
|
} | Array<any>>;
|
|
45
|
-
instructions
|
|
45
|
+
instructions?: string | {
|
|
46
46
|
[k: string]: any;
|
|
47
|
-
} | Array<any
|
|
47
|
+
} | Array<any> | null | undefined;
|
|
48
48
|
type: "score";
|
|
49
49
|
};
|
|
50
50
|
/** @internal */
|
|
@@ -16,11 +16,7 @@ export function decisionsScoreQuestionInstructionsToJSON(decisionsScoreQuestionI
|
|
|
16
16
|
/** @internal */
|
|
17
17
|
export const DecisionsScoreQuestion$outboundSchema = z.object({
|
|
18
18
|
criteria: z.array(z.union([z.string(), z.record(z.string(), z.any()), z.array(z.any())])),
|
|
19
|
-
instructions: z.union([
|
|
20
|
-
z.string(),
|
|
21
|
-
z.record(z.string(), z.any()),
|
|
22
|
-
z.array(z.any()),
|
|
23
|
-
]),
|
|
19
|
+
instructions: z.nullable(z.union([z.string(), z.record(z.string(), z.any()), z.array(z.any())])).optional(),
|
|
24
20
|
type: z.literal("score"),
|
|
25
21
|
});
|
|
26
22
|
export function decisionsScoreQuestionToJSON(decisionsScoreQuestion) {
|
|
@@ -371,6 +371,9 @@ export type ImageGenerationProviderPreferencesOptions = {
|
|
|
371
371
|
respan?: {
|
|
372
372
|
[k: string]: any;
|
|
373
373
|
} | undefined;
|
|
374
|
+
river?: {
|
|
375
|
+
[k: string]: any;
|
|
376
|
+
} | undefined;
|
|
374
377
|
runway?: {
|
|
375
378
|
[k: string]: any;
|
|
376
379
|
} | undefined;
|
|
@@ -881,6 +884,9 @@ export type ImageGenerationProviderPreferencesOptions$Outbound = {
|
|
|
881
884
|
respan?: {
|
|
882
885
|
[k: string]: any;
|
|
883
886
|
} | undefined;
|
|
887
|
+
river?: {
|
|
888
|
+
[k: string]: any;
|
|
889
|
+
} | undefined;
|
|
884
890
|
runway?: {
|
|
885
891
|
[k: string]: any;
|
|
886
892
|
} | undefined;
|
|
@@ -140,6 +140,7 @@ export const ImageGenerationProviderPreferencesOptions$outboundSchema = z.object
|
|
|
140
140
|
relace: z.record(z.string(), z.any()).optional(),
|
|
141
141
|
replicate: z.record(z.string(), z.any()).optional(),
|
|
142
142
|
respan: z.record(z.string(), z.any()).optional(),
|
|
143
|
+
river: z.record(z.string(), z.any()).optional(),
|
|
143
144
|
runway: z.record(z.string(), z.any()).optional(),
|
|
144
145
|
sailResearch: z.record(z.string(), z.any()).optional(),
|
|
145
146
|
sakana: z.record(z.string(), z.any()).optional(),
|
|
@@ -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 { ContentPartImage, ContentPartImage$Outbound } from "./contentpartimage.js";
|
|
4
4
|
import { ImageGenerationProviderPreferences, ImageGenerationProviderPreferences$Outbound } from "./imagegenerationproviderpreferences.js";
|
|
5
5
|
import { TraceConfig, TraceConfig$Outbound } from "./traceconfig.js";
|
|
@@ -50,17 +50,32 @@ export declare const ImageGenerationRequestBackground: {
|
|
|
50
50
|
* Background treatment. `transparent` requires an output_format that supports alpha (png or webp).
|
|
51
51
|
*/
|
|
52
52
|
export type ImageGenerationRequestBackground = OpenEnum<typeof ImageGenerationRequestBackground>;
|
|
53
|
+
export type ImageGenerationRequestImageUrl = {
|
|
54
|
+
url: string;
|
|
55
|
+
};
|
|
56
|
+
export declare const ImageGenerationRequestType: {
|
|
57
|
+
readonly ImageUrl: "image_url";
|
|
58
|
+
};
|
|
59
|
+
export type ImageGenerationRequestType = ClosedEnum<typeof ImageGenerationRequestType>;
|
|
60
|
+
/**
|
|
61
|
+
* A transparent PNG overlay (arrows, circles, annotations) with the same dimensions as the first reference image, as a base64 data URL or HTTP(S) URL, guiding where an edit applies. Image-to-image requests only; honored by models with markup-guided editing (OpenAI gpt-image-2.6) and ignored otherwise.
|
|
62
|
+
*/
|
|
63
|
+
export type Markup = {
|
|
64
|
+
imageUrl: ImageGenerationRequestImageUrl;
|
|
65
|
+
type: ImageGenerationRequestType;
|
|
66
|
+
};
|
|
53
67
|
/**
|
|
54
|
-
* Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`.
|
|
68
|
+
* Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. GIF produces an animation on models that support it (OpenAI gpt-image-2.6; see `frame_count`).
|
|
55
69
|
*/
|
|
56
70
|
export declare const ImageGenerationRequestOutputFormat: {
|
|
57
71
|
readonly Png: "png";
|
|
58
72
|
readonly Jpeg: "jpeg";
|
|
59
73
|
readonly Webp: "webp";
|
|
60
74
|
readonly Svg: "svg";
|
|
75
|
+
readonly Gif: "gif";
|
|
61
76
|
};
|
|
62
77
|
/**
|
|
63
|
-
* Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`.
|
|
78
|
+
* Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. GIF produces an animation on models that support it (OpenAI gpt-image-2.6; see `frame_count`).
|
|
64
79
|
*/
|
|
65
80
|
export type ImageGenerationRequestOutputFormat = OpenEnum<typeof ImageGenerationRequestOutputFormat>;
|
|
66
81
|
/**
|
|
@@ -105,10 +120,22 @@ export type ImageGenerationRequest = {
|
|
|
105
120
|
* Background treatment. `transparent` requires an output_format that supports alpha (png or webp).
|
|
106
121
|
*/
|
|
107
122
|
background?: ImageGenerationRequestBackground | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* Number of animation frames (2-64) when `output_format` is `gif`. Only honored by models that produce animations; each accepts its own range and rejects values outside it. Ignored otherwise.
|
|
125
|
+
*/
|
|
126
|
+
frameCount?: number | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* Display time of each animation frame in milliseconds (20-2000) when `output_format` is `gif`. Ignored by models that do not produce animations.
|
|
129
|
+
*/
|
|
130
|
+
frameDurationMs?: number | undefined;
|
|
108
131
|
/**
|
|
109
132
|
* Reference images to guide image-to-image generation, as base64 data URLs or HTTP(S) URLs.
|
|
110
133
|
*/
|
|
111
134
|
inputReferences?: Array<ContentPartImage> | undefined;
|
|
135
|
+
/**
|
|
136
|
+
* A transparent PNG overlay (arrows, circles, annotations) with the same dimensions as the first reference image, as a base64 data URL or HTTP(S) URL, guiding where an edit applies. Image-to-image requests only; honored by models with markup-guided editing (OpenAI gpt-image-2.6) and ignored otherwise.
|
|
137
|
+
*/
|
|
138
|
+
markup?: Markup | undefined;
|
|
112
139
|
/**
|
|
113
140
|
* The image generation model to use
|
|
114
141
|
*/
|
|
@@ -122,7 +149,7 @@ export type ImageGenerationRequest = {
|
|
|
122
149
|
*/
|
|
123
150
|
outputCompression?: number | undefined;
|
|
124
151
|
/**
|
|
125
|
-
* Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`.
|
|
152
|
+
* Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. GIF produces an animation on models that support it (OpenAI gpt-image-2.6; see `frame_count`).
|
|
126
153
|
*/
|
|
127
154
|
outputFormat?: ImageGenerationRequestOutputFormat | undefined;
|
|
128
155
|
/**
|
|
@@ -171,6 +198,23 @@ export declare const ImageGenerationRequestAspectRatio$outboundSchema: z.ZodType
|
|
|
171
198
|
/** @internal */
|
|
172
199
|
export declare const ImageGenerationRequestBackground$outboundSchema: z.ZodType<string, ImageGenerationRequestBackground>;
|
|
173
200
|
/** @internal */
|
|
201
|
+
export type ImageGenerationRequestImageUrl$Outbound = {
|
|
202
|
+
url: string;
|
|
203
|
+
};
|
|
204
|
+
/** @internal */
|
|
205
|
+
export declare const ImageGenerationRequestImageUrl$outboundSchema: z.ZodType<ImageGenerationRequestImageUrl$Outbound, ImageGenerationRequestImageUrl>;
|
|
206
|
+
export declare function imageGenerationRequestImageUrlToJSON(imageGenerationRequestImageUrl: ImageGenerationRequestImageUrl): string;
|
|
207
|
+
/** @internal */
|
|
208
|
+
export declare const ImageGenerationRequestType$outboundSchema: z.ZodEnum<typeof ImageGenerationRequestType>;
|
|
209
|
+
/** @internal */
|
|
210
|
+
export type Markup$Outbound = {
|
|
211
|
+
image_url: ImageGenerationRequestImageUrl$Outbound;
|
|
212
|
+
type: string;
|
|
213
|
+
};
|
|
214
|
+
/** @internal */
|
|
215
|
+
export declare const Markup$outboundSchema: z.ZodType<Markup$Outbound, Markup>;
|
|
216
|
+
export declare function markupToJSON(markup: Markup): string;
|
|
217
|
+
/** @internal */
|
|
174
218
|
export declare const ImageGenerationRequestOutputFormat$outboundSchema: z.ZodType<string, ImageGenerationRequestOutputFormat>;
|
|
175
219
|
/** @internal */
|
|
176
220
|
export declare const ImageGenerationRequestQuality$outboundSchema: z.ZodType<string, ImageGenerationRequestQuality>;
|
|
@@ -180,7 +224,10 @@ export declare const ImageGenerationRequestResolution$outboundSchema: z.ZodType<
|
|
|
180
224
|
export type ImageGenerationRequest$Outbound = {
|
|
181
225
|
aspect_ratio?: string | undefined;
|
|
182
226
|
background?: string | undefined;
|
|
227
|
+
frame_count?: number | undefined;
|
|
228
|
+
frame_duration_ms?: number | undefined;
|
|
183
229
|
input_references?: Array<ContentPartImage$Outbound> | undefined;
|
|
230
|
+
markup?: Markup$Outbound | undefined;
|
|
184
231
|
model: string;
|
|
185
232
|
n?: number | undefined;
|
|
186
233
|
output_compression?: number | undefined;
|
|
@@ -47,14 +47,18 @@ export const ImageGenerationRequestBackground = {
|
|
|
47
47
|
Transparent: "transparent",
|
|
48
48
|
Opaque: "opaque",
|
|
49
49
|
};
|
|
50
|
+
export const ImageGenerationRequestType = {
|
|
51
|
+
ImageUrl: "image_url",
|
|
52
|
+
};
|
|
50
53
|
/**
|
|
51
|
-
* Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`.
|
|
54
|
+
* Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. GIF produces an animation on models that support it (OpenAI gpt-image-2.6; see `frame_count`).
|
|
52
55
|
*/
|
|
53
56
|
export const ImageGenerationRequestOutputFormat = {
|
|
54
57
|
Png: "png",
|
|
55
58
|
Jpeg: "jpeg",
|
|
56
59
|
Webp: "webp",
|
|
57
60
|
Svg: "svg",
|
|
61
|
+
Gif: "gif",
|
|
58
62
|
};
|
|
59
63
|
/**
|
|
60
64
|
* Rendering quality. Providers without a quality knob ignore this.
|
|
@@ -83,6 +87,28 @@ export const ImageGenerationRequestAspectRatio$outboundSchema = openEnums.outbou
|
|
|
83
87
|
/** @internal */
|
|
84
88
|
export const ImageGenerationRequestBackground$outboundSchema = openEnums.outboundSchema(ImageGenerationRequestBackground);
|
|
85
89
|
/** @internal */
|
|
90
|
+
export const ImageGenerationRequestImageUrl$outboundSchema = z.object({
|
|
91
|
+
url: z.string(),
|
|
92
|
+
});
|
|
93
|
+
export function imageGenerationRequestImageUrlToJSON(imageGenerationRequestImageUrl) {
|
|
94
|
+
return JSON.stringify(ImageGenerationRequestImageUrl$outboundSchema.parse(imageGenerationRequestImageUrl));
|
|
95
|
+
}
|
|
96
|
+
/** @internal */
|
|
97
|
+
export const ImageGenerationRequestType$outboundSchema = z.enum(ImageGenerationRequestType);
|
|
98
|
+
/** @internal */
|
|
99
|
+
export const Markup$outboundSchema = z
|
|
100
|
+
.object({
|
|
101
|
+
imageUrl: z.lazy(() => ImageGenerationRequestImageUrl$outboundSchema),
|
|
102
|
+
type: ImageGenerationRequestType$outboundSchema,
|
|
103
|
+
}).transform((v) => {
|
|
104
|
+
return remap$(v, {
|
|
105
|
+
imageUrl: "image_url",
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
export function markupToJSON(markup) {
|
|
109
|
+
return JSON.stringify(Markup$outboundSchema.parse(markup));
|
|
110
|
+
}
|
|
111
|
+
/** @internal */
|
|
86
112
|
export const ImageGenerationRequestOutputFormat$outboundSchema = openEnums.outboundSchema(ImageGenerationRequestOutputFormat);
|
|
87
113
|
/** @internal */
|
|
88
114
|
export const ImageGenerationRequestQuality$outboundSchema = openEnums.outboundSchema(ImageGenerationRequestQuality);
|
|
@@ -92,7 +118,10 @@ export const ImageGenerationRequestResolution$outboundSchema = openEnums.outboun
|
|
|
92
118
|
export const ImageGenerationRequest$outboundSchema = z.object({
|
|
93
119
|
aspectRatio: ImageGenerationRequestAspectRatio$outboundSchema.optional(),
|
|
94
120
|
background: ImageGenerationRequestBackground$outboundSchema.optional(),
|
|
121
|
+
frameCount: z.int().optional(),
|
|
122
|
+
frameDurationMs: z.int().optional(),
|
|
95
123
|
inputReferences: z.array(ContentPartImage$outboundSchema).optional(),
|
|
124
|
+
markup: z.lazy(() => Markup$outboundSchema).optional(),
|
|
96
125
|
model: z.string(),
|
|
97
126
|
n: z.int().optional(),
|
|
98
127
|
outputCompression: z.int().optional(),
|
|
@@ -110,6 +139,8 @@ export const ImageGenerationRequest$outboundSchema = z.object({
|
|
|
110
139
|
}).transform((v) => {
|
|
111
140
|
return remap$(v, {
|
|
112
141
|
aspectRatio: "aspect_ratio",
|
|
142
|
+
frameCount: "frame_count",
|
|
143
|
+
frameDurationMs: "frame_duration_ms",
|
|
113
144
|
inputReferences: "input_references",
|
|
114
145
|
outputCompression: "output_compression",
|
|
115
146
|
outputFormat: "output_format",
|
package/esm/models/index.d.ts
CHANGED
|
@@ -502,6 +502,8 @@ export * from "./mcplisttoolsinprogressevent.js";
|
|
|
502
502
|
export * from "./mcplisttoolsitem.js";
|
|
503
503
|
export * from "./mcpprotocolerror.js";
|
|
504
504
|
export * from "./mcpservertool.js";
|
|
505
|
+
export * from "./mcpservertoolopenrouter.js";
|
|
506
|
+
export * from "./mcpservertoolparameters.js";
|
|
505
507
|
export * from "./mcptoolcallerror.js";
|
|
506
508
|
export * from "./mcptoolexecutionerror.js";
|
|
507
509
|
export * from "./memberassignment.js";
|
|
@@ -616,6 +618,9 @@ export * from "./outputitemcustomtoolcall.js";
|
|
|
616
618
|
export * from "./outputitemfilesearchcall.js";
|
|
617
619
|
export * from "./outputitemfunctioncall.js";
|
|
618
620
|
export * from "./outputitemimagegenerationcall.js";
|
|
621
|
+
export * from "./outputitemmcpapprovalrequest.js";
|
|
622
|
+
export * from "./outputitemmcpcall.js";
|
|
623
|
+
export * from "./outputitemmcplisttools.js";
|
|
619
624
|
export * from "./outputitemreasoning.js";
|
|
620
625
|
export * from "./outputitems.js";
|
|
621
626
|
export * from "./outputitemwebsearchcall.js";
|
|
@@ -819,6 +824,7 @@ export * from "./tokenexchangerequest.js";
|
|
|
819
824
|
export * from "./tokenexchangeresponse.js";
|
|
820
825
|
export * from "./toolcallstatus.js";
|
|
821
826
|
export * from "./toolchoiceallowed.js";
|
|
827
|
+
export * from "./toolchoicemcp.js";
|
|
822
828
|
export * from "./toolchoicesupport.js";
|
|
823
829
|
export * from "./toolsearchcallitem.js";
|
|
824
830
|
export * from "./toolsearchoutputitem.js";
|
package/esm/models/index.js
CHANGED
|
@@ -506,6 +506,8 @@ export * from "./mcplisttoolsinprogressevent.js";
|
|
|
506
506
|
export * from "./mcplisttoolsitem.js";
|
|
507
507
|
export * from "./mcpprotocolerror.js";
|
|
508
508
|
export * from "./mcpservertool.js";
|
|
509
|
+
export * from "./mcpservertoolopenrouter.js";
|
|
510
|
+
export * from "./mcpservertoolparameters.js";
|
|
509
511
|
export * from "./mcptoolcallerror.js";
|
|
510
512
|
export * from "./mcptoolexecutionerror.js";
|
|
511
513
|
export * from "./memberassignment.js";
|
|
@@ -620,6 +622,9 @@ export * from "./outputitemcustomtoolcall.js";
|
|
|
620
622
|
export * from "./outputitemfilesearchcall.js";
|
|
621
623
|
export * from "./outputitemfunctioncall.js";
|
|
622
624
|
export * from "./outputitemimagegenerationcall.js";
|
|
625
|
+
export * from "./outputitemmcpapprovalrequest.js";
|
|
626
|
+
export * from "./outputitemmcpcall.js";
|
|
627
|
+
export * from "./outputitemmcplisttools.js";
|
|
623
628
|
export * from "./outputitemreasoning.js";
|
|
624
629
|
export * from "./outputitems.js";
|
|
625
630
|
export * from "./outputitemwebsearchcall.js";
|
|
@@ -823,6 +828,7 @@ export * from "./tokenexchangerequest.js";
|
|
|
823
828
|
export * from "./tokenexchangeresponse.js";
|
|
824
829
|
export * from "./toolcallstatus.js";
|
|
825
830
|
export * from "./toolchoiceallowed.js";
|
|
831
|
+
export * from "./toolchoicemcp.js";
|
|
826
832
|
export * from "./toolchoicesupport.js";
|
|
827
833
|
export * from "./toolsearchcallitem.js";
|
|
828
834
|
export * from "./toolsearchoutputitem.js";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
3
5
|
export declare const McpApprovalRequestItemType: {
|
|
4
6
|
readonly McpApprovalRequest: "mcp_approval_request";
|
|
5
7
|
};
|
|
@@ -15,8 +17,12 @@ export type McpApprovalRequestItem = {
|
|
|
15
17
|
type: McpApprovalRequestItemType;
|
|
16
18
|
};
|
|
17
19
|
/** @internal */
|
|
20
|
+
export declare const McpApprovalRequestItemType$inboundSchema: z.ZodEnum<typeof McpApprovalRequestItemType>;
|
|
21
|
+
/** @internal */
|
|
18
22
|
export declare const McpApprovalRequestItemType$outboundSchema: z.ZodEnum<typeof McpApprovalRequestItemType>;
|
|
19
23
|
/** @internal */
|
|
24
|
+
export declare const McpApprovalRequestItem$inboundSchema: z.ZodType<McpApprovalRequestItem, unknown>;
|
|
25
|
+
/** @internal */
|
|
20
26
|
export type McpApprovalRequestItem$Outbound = {
|
|
21
27
|
arguments: string;
|
|
22
28
|
id: string;
|
|
@@ -27,4 +33,5 @@ export type McpApprovalRequestItem$Outbound = {
|
|
|
27
33
|
/** @internal */
|
|
28
34
|
export declare const McpApprovalRequestItem$outboundSchema: z.ZodType<McpApprovalRequestItem$Outbound, McpApprovalRequestItem>;
|
|
29
35
|
export declare function mcpApprovalRequestItemToJSON(mcpApprovalRequestItem: McpApprovalRequestItem): string;
|
|
36
|
+
export declare function mcpApprovalRequestItemFromJSON(jsonString: string): SafeParseResult<McpApprovalRequestItem, SDKValidationError>;
|
|
30
37
|
//# sourceMappingURL=mcpapprovalrequestitem.d.ts.map
|