@openrouter/sdk 0.13.37 → 0.13.39
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/funcs/generationsSubmitFeedback.d.ts +19 -0
- package/esm/funcs/generationsSubmitFeedback.js +100 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/lib/conversation-state.d.ts +1 -1
- package/esm/lib/turn-context.d.ts +1 -1
- package/esm/models/additionaltoolsitem.d.ts +117 -0
- package/esm/models/additionaltoolsitem.js +152 -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/byokproviderslug.d.ts +1 -1
- package/esm/models/byokproviderslug.js +1 -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/computeruseservertool.d.ts +11 -3
- package/esm/models/computeruseservertool.js +9 -2
- 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/imagegenerationrequest.d.ts +2 -2
- package/esm/models/imagegenerationrequest.js +1 -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 +5 -4
- package/esm/models/inputsunion.js +3 -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/operations/index.d.ts +1 -0
- package/esm/models/operations/index.js +1 -0
- package/esm/models/operations/listbyokkeys.d.ts +1 -1
- package/esm/models/operations/listbyokkeys.js +1 -1
- package/esm/models/operations/submitgenerationfeedback.d.ts +56 -0
- package/esm/models/operations/submitgenerationfeedback.js +23 -0
- 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/provideroptions.d.ts +2 -2
- package/esm/models/provideroptions.js +1 -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/submitgenerationfeedbackrequest.d.ts +47 -0
- package/esm/models/submitgenerationfeedbackrequest.js +36 -0
- package/esm/models/submitgenerationfeedbackresponse.d.ts +22 -0
- package/esm/models/submitgenerationfeedbackresponse.js +21 -0
- package/esm/models/videogenerationrequest.d.ts +2 -2
- package/esm/models/videogenerationrequest.js +1 -2
- 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/esm/sdk/generations.d.ts +7 -0
- package/esm/sdk/generations.js +10 -0
- package/jsr.json +1 -1
- package/package.json +5 -5
|
@@ -37,6 +37,10 @@ export type RequireApproval = {
|
|
|
37
37
|
never?: Never | undefined;
|
|
38
38
|
};
|
|
39
39
|
export type RequireApprovalUnion = RequireApproval | RequireApprovalAlways | RequireApprovalNever | any;
|
|
40
|
+
export declare const McpServerToolType: {
|
|
41
|
+
readonly Mcp: "mcp";
|
|
42
|
+
};
|
|
43
|
+
export type McpServerToolType = ClosedEnum<typeof McpServerToolType>;
|
|
40
44
|
/**
|
|
41
45
|
* MCP (Model Context Protocol) tool configuration
|
|
42
46
|
*/
|
|
@@ -51,7 +55,7 @@ export type McpServerTool = {
|
|
|
51
55
|
serverDescription?: string | undefined;
|
|
52
56
|
serverLabel: string;
|
|
53
57
|
serverUrl?: string | undefined;
|
|
54
|
-
type:
|
|
58
|
+
type: McpServerToolType;
|
|
55
59
|
};
|
|
56
60
|
/** @internal */
|
|
57
61
|
export declare const AllowedTools$inboundSchema: z.ZodType<AllowedTools, unknown>;
|
|
@@ -124,6 +128,10 @@ export declare const RequireApprovalUnion$outboundSchema: z.ZodType<RequireAppro
|
|
|
124
128
|
export declare function requireApprovalUnionToJSON(requireApprovalUnion: RequireApprovalUnion): string;
|
|
125
129
|
export declare function requireApprovalUnionFromJSON(jsonString: string): SafeParseResult<RequireApprovalUnion, SDKValidationError>;
|
|
126
130
|
/** @internal */
|
|
131
|
+
export declare const McpServerToolType$inboundSchema: z.ZodEnum<typeof McpServerToolType>;
|
|
132
|
+
/** @internal */
|
|
133
|
+
export declare const McpServerToolType$outboundSchema: z.ZodEnum<typeof McpServerToolType>;
|
|
134
|
+
/** @internal */
|
|
127
135
|
export declare const McpServerTool$inboundSchema: z.ZodType<McpServerTool, unknown>;
|
|
128
136
|
/** @internal */
|
|
129
137
|
export type McpServerTool$Outbound = {
|
|
@@ -137,7 +145,7 @@ export type McpServerTool$Outbound = {
|
|
|
137
145
|
server_description?: string | undefined;
|
|
138
146
|
server_label: string;
|
|
139
147
|
server_url?: string | undefined;
|
|
140
|
-
type:
|
|
148
|
+
type: string;
|
|
141
149
|
};
|
|
142
150
|
/** @internal */
|
|
143
151
|
export declare const McpServerTool$outboundSchema: z.ZodType<McpServerTool$Outbound, McpServerTool>;
|
|
@@ -22,6 +22,9 @@ export const RequireApprovalNever = {
|
|
|
22
22
|
export const RequireApprovalAlways = {
|
|
23
23
|
Always: "always",
|
|
24
24
|
};
|
|
25
|
+
export const McpServerToolType = {
|
|
26
|
+
Mcp: "mcp",
|
|
27
|
+
};
|
|
25
28
|
/** @internal */
|
|
26
29
|
export const AllowedTools$inboundSchema = z
|
|
27
30
|
.object({
|
|
@@ -161,6 +164,10 @@ export function requireApprovalUnionFromJSON(jsonString) {
|
|
|
161
164
|
return safeParse(jsonString, (x) => RequireApprovalUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequireApprovalUnion' from JSON`);
|
|
162
165
|
}
|
|
163
166
|
/** @internal */
|
|
167
|
+
export const McpServerToolType$inboundSchema = z.enum(McpServerToolType);
|
|
168
|
+
/** @internal */
|
|
169
|
+
export const McpServerToolType$outboundSchema = McpServerToolType$inboundSchema;
|
|
170
|
+
/** @internal */
|
|
164
171
|
export const McpServerTool$inboundSchema = z
|
|
165
172
|
.object({
|
|
166
173
|
allowed_tools: z.nullable(z.union([
|
|
@@ -180,7 +187,7 @@ export const McpServerTool$inboundSchema = z
|
|
|
180
187
|
server_description: z.string().optional(),
|
|
181
188
|
server_label: z.string(),
|
|
182
189
|
server_url: z.string().optional(),
|
|
183
|
-
type:
|
|
190
|
+
type: McpServerToolType$inboundSchema,
|
|
184
191
|
}).transform((v) => {
|
|
185
192
|
return remap$(v, {
|
|
186
193
|
"allowed_tools": "allowedTools",
|
|
@@ -210,7 +217,7 @@ export const McpServerTool$outboundSchema = z.object({
|
|
|
210
217
|
serverDescription: z.string().optional(),
|
|
211
218
|
serverLabel: z.string(),
|
|
212
219
|
serverUrl: z.string().optional(),
|
|
213
|
-
type:
|
|
220
|
+
type: McpServerToolType$outboundSchema,
|
|
214
221
|
}).transform((v) => {
|
|
215
222
|
return remap$(v, {
|
|
216
223
|
allowedTools: "allowed_tools",
|
|
@@ -45,7 +45,33 @@ export type OpenResponsesResultToolFunction = {
|
|
|
45
45
|
strict?: boolean | null | undefined;
|
|
46
46
|
type: "function";
|
|
47
47
|
};
|
|
48
|
-
export type OpenResponsesResultToolUnion = OpenResponsesResultToolFunction | PreviewWebSearchServerTool
|
|
48
|
+
export type OpenResponsesResultToolUnion = OpenResponsesResultToolFunction | (PreviewWebSearchServerTool & {
|
|
49
|
+
type: "web_search_preview";
|
|
50
|
+
}) | (Preview20250311WebSearchServerTool & {
|
|
51
|
+
type: "web_search_preview_2025_03_11";
|
|
52
|
+
}) | (LegacyWebSearchServerTool & {
|
|
53
|
+
type: "web_search";
|
|
54
|
+
}) | (WebSearchServerTool & {
|
|
55
|
+
type: "web_search_2025_08_26";
|
|
56
|
+
}) | (FileSearchServerTool & {
|
|
57
|
+
type: "file_search";
|
|
58
|
+
}) | (ComputerUseServerTool & {
|
|
59
|
+
type: "computer_use_preview";
|
|
60
|
+
}) | (CodeInterpreterServerTool & {
|
|
61
|
+
type: "code_interpreter";
|
|
62
|
+
}) | (McpServerTool & {
|
|
63
|
+
type: "mcp";
|
|
64
|
+
}) | (ImageGenerationServerTool & {
|
|
65
|
+
type: "image_generation";
|
|
66
|
+
}) | (CodexLocalShellTool & {
|
|
67
|
+
type: "local_shell";
|
|
68
|
+
}) | (ShellServerTool & {
|
|
69
|
+
type: "shell";
|
|
70
|
+
}) | (ApplyPatchServerTool & {
|
|
71
|
+
type: "apply_patch";
|
|
72
|
+
}) | (CustomTool & {
|
|
73
|
+
type: "custom";
|
|
74
|
+
}) | discriminatedUnionTypes.Unknown<"type">;
|
|
49
75
|
/**
|
|
50
76
|
* Complete non-streaming response from the Responses API
|
|
51
77
|
*/
|
|
@@ -89,7 +115,33 @@ export type OpenResponsesResult = {
|
|
|
89
115
|
*/
|
|
90
116
|
text?: TextExtendedConfig | undefined;
|
|
91
117
|
toolChoice: OpenAIResponsesToolChoiceUnion;
|
|
92
|
-
tools: Array<OpenResponsesResultToolFunction | PreviewWebSearchServerTool
|
|
118
|
+
tools: Array<OpenResponsesResultToolFunction | (PreviewWebSearchServerTool & {
|
|
119
|
+
type: "web_search_preview";
|
|
120
|
+
}) | (Preview20250311WebSearchServerTool & {
|
|
121
|
+
type: "web_search_preview_2025_03_11";
|
|
122
|
+
}) | (LegacyWebSearchServerTool & {
|
|
123
|
+
type: "web_search";
|
|
124
|
+
}) | (WebSearchServerTool & {
|
|
125
|
+
type: "web_search_2025_08_26";
|
|
126
|
+
}) | (FileSearchServerTool & {
|
|
127
|
+
type: "file_search";
|
|
128
|
+
}) | (ComputerUseServerTool & {
|
|
129
|
+
type: "computer_use_preview";
|
|
130
|
+
}) | (CodeInterpreterServerTool & {
|
|
131
|
+
type: "code_interpreter";
|
|
132
|
+
}) | (McpServerTool & {
|
|
133
|
+
type: "mcp";
|
|
134
|
+
}) | (ImageGenerationServerTool & {
|
|
135
|
+
type: "image_generation";
|
|
136
|
+
}) | (CodexLocalShellTool & {
|
|
137
|
+
type: "local_shell";
|
|
138
|
+
}) | (ShellServerTool & {
|
|
139
|
+
type: "shell";
|
|
140
|
+
}) | (ApplyPatchServerTool & {
|
|
141
|
+
type: "apply_patch";
|
|
142
|
+
}) | (CustomTool & {
|
|
143
|
+
type: "custom";
|
|
144
|
+
}) | discriminatedUnionTypes.Unknown<"type">>;
|
|
93
145
|
topLogprobs?: number | null | undefined;
|
|
94
146
|
topP: number | null;
|
|
95
147
|
truncation?: Truncation | null | undefined;
|
|
@@ -51,19 +51,19 @@ export function openResponsesResultToolFunctionFromJSON(jsonString) {
|
|
|
51
51
|
/** @internal */
|
|
52
52
|
export const OpenResponsesResultToolUnion$inboundSchema = discriminatedUnion("type", {
|
|
53
53
|
function: z.lazy(() => OpenResponsesResultToolFunction$inboundSchema),
|
|
54
|
-
web_search_preview: PreviewWebSearchServerTool$inboundSchema,
|
|
55
|
-
web_search_preview_2025_03_11: Preview20250311WebSearchServerTool$inboundSchema,
|
|
56
|
-
web_search: LegacyWebSearchServerTool$inboundSchema,
|
|
57
|
-
web_search_2025_08_26: WebSearchServerTool$inboundSchema,
|
|
58
|
-
file_search: FileSearchServerTool$inboundSchema,
|
|
59
|
-
computer_use_preview: ComputerUseServerTool$inboundSchema,
|
|
60
|
-
code_interpreter: CodeInterpreterServerTool$inboundSchema,
|
|
61
|
-
mcp: McpServerTool$inboundSchema,
|
|
62
|
-
image_generation: ImageGenerationServerTool$inboundSchema,
|
|
63
|
-
local_shell: CodexLocalShellTool$inboundSchema,
|
|
64
|
-
shell: ShellServerTool$inboundSchema,
|
|
65
|
-
apply_patch: ApplyPatchServerTool$inboundSchema,
|
|
66
|
-
custom: CustomTool$inboundSchema,
|
|
54
|
+
web_search_preview: PreviewWebSearchServerTool$inboundSchema.and(z.object({ type: z.literal("web_search_preview") })),
|
|
55
|
+
web_search_preview_2025_03_11: Preview20250311WebSearchServerTool$inboundSchema.and(z.object({ type: z.literal("web_search_preview_2025_03_11") })),
|
|
56
|
+
web_search: LegacyWebSearchServerTool$inboundSchema.and(z.object({ type: z.literal("web_search") })),
|
|
57
|
+
web_search_2025_08_26: WebSearchServerTool$inboundSchema.and(z.object({ type: z.literal("web_search_2025_08_26") })),
|
|
58
|
+
file_search: FileSearchServerTool$inboundSchema.and(z.object({ type: z.literal("file_search") })),
|
|
59
|
+
computer_use_preview: ComputerUseServerTool$inboundSchema.and(z.object({ type: z.literal("computer_use_preview") })),
|
|
60
|
+
code_interpreter: CodeInterpreterServerTool$inboundSchema.and(z.object({ type: z.literal("code_interpreter") })),
|
|
61
|
+
mcp: McpServerTool$inboundSchema.and(z.object({ type: z.literal("mcp") })),
|
|
62
|
+
image_generation: ImageGenerationServerTool$inboundSchema.and(z.object({ type: z.literal("image_generation") })),
|
|
63
|
+
local_shell: CodexLocalShellTool$inboundSchema.and(z.object({ type: z.literal("local_shell") })),
|
|
64
|
+
shell: ShellServerTool$inboundSchema.and(z.object({ type: z.literal("shell") })),
|
|
65
|
+
apply_patch: ApplyPatchServerTool$inboundSchema.and(z.object({ type: z.literal("apply_patch") })),
|
|
66
|
+
custom: CustomTool$inboundSchema.and(z.object({ type: z.literal("custom") })),
|
|
67
67
|
});
|
|
68
68
|
export function openResponsesResultToolUnionFromJSON(jsonString) {
|
|
69
69
|
return safeParse(jsonString, (x) => OpenResponsesResultToolUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesResultToolUnion' from JSON`);
|
|
@@ -100,19 +100,19 @@ export const OpenResponsesResult$inboundSchema = z.object({
|
|
|
100
100
|
tool_choice: OpenAIResponsesToolChoiceUnion$inboundSchema,
|
|
101
101
|
tools: z.array(discriminatedUnion("type", {
|
|
102
102
|
function: z.lazy(() => OpenResponsesResultToolFunction$inboundSchema),
|
|
103
|
-
web_search_preview: PreviewWebSearchServerTool$inboundSchema,
|
|
104
|
-
web_search_preview_2025_03_11: Preview20250311WebSearchServerTool$inboundSchema,
|
|
105
|
-
web_search: LegacyWebSearchServerTool$inboundSchema,
|
|
106
|
-
web_search_2025_08_26: WebSearchServerTool$inboundSchema,
|
|
107
|
-
file_search: FileSearchServerTool$inboundSchema,
|
|
108
|
-
computer_use_preview: ComputerUseServerTool$inboundSchema,
|
|
109
|
-
code_interpreter: CodeInterpreterServerTool$inboundSchema,
|
|
110
|
-
mcp: McpServerTool$inboundSchema,
|
|
111
|
-
image_generation: ImageGenerationServerTool$inboundSchema,
|
|
112
|
-
local_shell: CodexLocalShellTool$inboundSchema,
|
|
113
|
-
shell: ShellServerTool$inboundSchema,
|
|
114
|
-
apply_patch: ApplyPatchServerTool$inboundSchema,
|
|
115
|
-
custom: CustomTool$inboundSchema,
|
|
103
|
+
web_search_preview: PreviewWebSearchServerTool$inboundSchema.and(z.object({ type: z.literal("web_search_preview") })),
|
|
104
|
+
web_search_preview_2025_03_11: Preview20250311WebSearchServerTool$inboundSchema.and(z.object({ type: z.literal("web_search_preview_2025_03_11") })),
|
|
105
|
+
web_search: LegacyWebSearchServerTool$inboundSchema.and(z.object({ type: z.literal("web_search") })),
|
|
106
|
+
web_search_2025_08_26: WebSearchServerTool$inboundSchema.and(z.object({ type: z.literal("web_search_2025_08_26") })),
|
|
107
|
+
file_search: FileSearchServerTool$inboundSchema.and(z.object({ type: z.literal("file_search") })),
|
|
108
|
+
computer_use_preview: ComputerUseServerTool$inboundSchema.and(z.object({ type: z.literal("computer_use_preview") })),
|
|
109
|
+
code_interpreter: CodeInterpreterServerTool$inboundSchema.and(z.object({ type: z.literal("code_interpreter") })),
|
|
110
|
+
mcp: McpServerTool$inboundSchema.and(z.object({ type: z.literal("mcp") })),
|
|
111
|
+
image_generation: ImageGenerationServerTool$inboundSchema.and(z.object({ type: z.literal("image_generation") })),
|
|
112
|
+
local_shell: CodexLocalShellTool$inboundSchema.and(z.object({ type: z.literal("local_shell") })),
|
|
113
|
+
shell: ShellServerTool$inboundSchema.and(z.object({ type: z.literal("shell") })),
|
|
114
|
+
apply_patch: ApplyPatchServerTool$inboundSchema.and(z.object({ type: z.literal("apply_patch") })),
|
|
115
|
+
custom: CustomTool$inboundSchema.and(z.object({ type: z.literal("custom") })),
|
|
116
116
|
})),
|
|
117
117
|
top_logprobs: z.nullable(z.int()).optional(),
|
|
118
118
|
top_p: z.nullable(z.number()),
|
|
@@ -78,6 +78,7 @@ export * from "./listworkspacemembers.js";
|
|
|
78
78
|
export * from "./listworkspaces.js";
|
|
79
79
|
export * from "./queryanalytics.js";
|
|
80
80
|
export * from "./sendchatcompletionrequest.js";
|
|
81
|
+
export * from "./submitgenerationfeedback.js";
|
|
81
82
|
export * from "./updatebyokkey.js";
|
|
82
83
|
export * from "./updateguardrail.js";
|
|
83
84
|
export * from "./updatekeys.js";
|
|
@@ -82,6 +82,7 @@ export * from "./listworkspacemembers.js";
|
|
|
82
82
|
export * from "./listworkspaces.js";
|
|
83
83
|
export * from "./queryanalytics.js";
|
|
84
84
|
export * from "./sendchatcompletionrequest.js";
|
|
85
|
+
export * from "./submitgenerationfeedback.js";
|
|
85
86
|
export * from "./updatebyokkey.js";
|
|
86
87
|
export * from "./updateguardrail.js";
|
|
87
88
|
export * from "./updatekeys.js";
|
|
@@ -99,7 +99,7 @@ export declare const Provider: {
|
|
|
99
99
|
readonly Recraft: "recraft";
|
|
100
100
|
readonly Reka: "reka";
|
|
101
101
|
readonly Relace: "relace";
|
|
102
|
-
readonly
|
|
102
|
+
readonly Sakana: "sakana";
|
|
103
103
|
readonly Sambanova: "sambanova";
|
|
104
104
|
readonly Seed: "seed";
|
|
105
105
|
readonly Siliconflow: "siliconflow";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as models from "../index.js";
|
|
3
|
+
export type SubmitGenerationFeedbackGlobals = {
|
|
4
|
+
/**
|
|
5
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* This is used to track API usage per application.
|
|
9
|
+
*/
|
|
10
|
+
httpReferer?: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
*/
|
|
16
|
+
appTitle?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
*/
|
|
22
|
+
appCategories?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
export type SubmitGenerationFeedbackRequest = {
|
|
25
|
+
/**
|
|
26
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* This is used to track API usage per application.
|
|
30
|
+
*/
|
|
31
|
+
httpReferer?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
*/
|
|
37
|
+
appTitle?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
*/
|
|
43
|
+
appCategories?: string | undefined;
|
|
44
|
+
submitGenerationFeedbackRequest: models.SubmitGenerationFeedbackRequest;
|
|
45
|
+
};
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type SubmitGenerationFeedbackRequest$Outbound = {
|
|
48
|
+
"HTTP-Referer"?: string | undefined;
|
|
49
|
+
appTitle?: string | undefined;
|
|
50
|
+
appCategories?: string | undefined;
|
|
51
|
+
SubmitGenerationFeedbackRequest: models.SubmitGenerationFeedbackRequest$Outbound;
|
|
52
|
+
};
|
|
53
|
+
/** @internal */
|
|
54
|
+
export declare const SubmitGenerationFeedbackRequest$outboundSchema: z.ZodType<SubmitGenerationFeedbackRequest$Outbound, SubmitGenerationFeedbackRequest>;
|
|
55
|
+
export declare function submitGenerationFeedbackRequestToJSON(submitGenerationFeedbackRequest: SubmitGenerationFeedbackRequest): string;
|
|
56
|
+
//# sourceMappingURL=submitgenerationfeedback.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 0c88d9ca4722
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import * as models from "../index.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const SubmitGenerationFeedbackRequest$outboundSchema = z.object({
|
|
10
|
+
httpReferer: z.string().optional(),
|
|
11
|
+
appTitle: z.string().optional(),
|
|
12
|
+
appCategories: z.string().optional(),
|
|
13
|
+
submitGenerationFeedbackRequest: models.SubmitGenerationFeedbackRequest$outboundSchema,
|
|
14
|
+
}).transform((v) => {
|
|
15
|
+
return remap$(v, {
|
|
16
|
+
httpReferer: "HTTP-Referer",
|
|
17
|
+
submitGenerationFeedbackRequest: "SubmitGenerationFeedbackRequest",
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
export function submitGenerationFeedbackRequestToJSON(submitGenerationFeedbackRequest) {
|
|
21
|
+
return JSON.stringify(SubmitGenerationFeedbackRequest$outboundSchema.parse(submitGenerationFeedbackRequest));
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=submitgenerationfeedback.js.map
|
|
@@ -1,10 +1,15 @@
|
|
|
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 { PreviewWebSearchUserLocation, PreviewWebSearchUserLocation$Outbound } from "./previewwebsearchuserlocation.js";
|
|
5
6
|
import { SearchContextSizeEnum } from "./searchcontextsizeenum.js";
|
|
6
7
|
import { WebSearchDomainFilter, WebSearchDomainFilter$Outbound } from "./websearchdomainfilter.js";
|
|
7
8
|
import { WebSearchEngineEnum } from "./websearchengineenum.js";
|
|
9
|
+
export declare const Preview20250311WebSearchServerToolType: {
|
|
10
|
+
readonly WebSearchPreview20250311: "web_search_preview_2025_03_11";
|
|
11
|
+
};
|
|
12
|
+
export type Preview20250311WebSearchServerToolType = ClosedEnum<typeof Preview20250311WebSearchServerToolType>;
|
|
8
13
|
/**
|
|
9
14
|
* Web search preview tool configuration (2025-03-11 version)
|
|
10
15
|
*/
|
|
@@ -22,10 +27,14 @@ export type Preview20250311WebSearchServerTool = {
|
|
|
22
27
|
* Size of the search context for web search tools
|
|
23
28
|
*/
|
|
24
29
|
searchContextSize?: SearchContextSizeEnum | undefined;
|
|
25
|
-
type:
|
|
30
|
+
type: Preview20250311WebSearchServerToolType;
|
|
26
31
|
userLocation?: PreviewWebSearchUserLocation | null | undefined;
|
|
27
32
|
};
|
|
28
33
|
/** @internal */
|
|
34
|
+
export declare const Preview20250311WebSearchServerToolType$inboundSchema: z.ZodEnum<typeof Preview20250311WebSearchServerToolType>;
|
|
35
|
+
/** @internal */
|
|
36
|
+
export declare const Preview20250311WebSearchServerToolType$outboundSchema: z.ZodEnum<typeof Preview20250311WebSearchServerToolType>;
|
|
37
|
+
/** @internal */
|
|
29
38
|
export declare const Preview20250311WebSearchServerTool$inboundSchema: z.ZodType<Preview20250311WebSearchServerTool, unknown>;
|
|
30
39
|
/** @internal */
|
|
31
40
|
export type Preview20250311WebSearchServerTool$Outbound = {
|
|
@@ -33,7 +42,7 @@ export type Preview20250311WebSearchServerTool$Outbound = {
|
|
|
33
42
|
filters?: WebSearchDomainFilter$Outbound | null | undefined;
|
|
34
43
|
max_results?: number | undefined;
|
|
35
44
|
search_context_size?: string | undefined;
|
|
36
|
-
type:
|
|
45
|
+
type: string;
|
|
37
46
|
user_location?: PreviewWebSearchUserLocation$Outbound | null | undefined;
|
|
38
47
|
};
|
|
39
48
|
/** @internal */
|
|
@@ -9,13 +9,20 @@ import { PreviewWebSearchUserLocation$inboundSchema, PreviewWebSearchUserLocatio
|
|
|
9
9
|
import { SearchContextSizeEnum$inboundSchema, SearchContextSizeEnum$outboundSchema, } from "./searchcontextsizeenum.js";
|
|
10
10
|
import { WebSearchDomainFilter$inboundSchema, WebSearchDomainFilter$outboundSchema, } from "./websearchdomainfilter.js";
|
|
11
11
|
import { WebSearchEngineEnum$inboundSchema, WebSearchEngineEnum$outboundSchema, } from "./websearchengineenum.js";
|
|
12
|
+
export const Preview20250311WebSearchServerToolType = {
|
|
13
|
+
WebSearchPreview20250311: "web_search_preview_2025_03_11",
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const Preview20250311WebSearchServerToolType$inboundSchema = z.enum(Preview20250311WebSearchServerToolType);
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const Preview20250311WebSearchServerToolType$outboundSchema = Preview20250311WebSearchServerToolType$inboundSchema;
|
|
12
19
|
/** @internal */
|
|
13
20
|
export const Preview20250311WebSearchServerTool$inboundSchema = z.object({
|
|
14
21
|
engine: WebSearchEngineEnum$inboundSchema.optional(),
|
|
15
22
|
filters: z.nullable(WebSearchDomainFilter$inboundSchema).optional(),
|
|
16
23
|
max_results: z.int().optional(),
|
|
17
24
|
search_context_size: SearchContextSizeEnum$inboundSchema.optional(),
|
|
18
|
-
type:
|
|
25
|
+
type: Preview20250311WebSearchServerToolType$inboundSchema,
|
|
19
26
|
user_location: z.nullable(PreviewWebSearchUserLocation$inboundSchema)
|
|
20
27
|
.optional(),
|
|
21
28
|
}).transform((v) => {
|
|
@@ -31,7 +38,7 @@ export const Preview20250311WebSearchServerTool$outboundSchema = z.object({
|
|
|
31
38
|
filters: z.nullable(WebSearchDomainFilter$outboundSchema).optional(),
|
|
32
39
|
maxResults: z.int().optional(),
|
|
33
40
|
searchContextSize: SearchContextSizeEnum$outboundSchema.optional(),
|
|
34
|
-
type:
|
|
41
|
+
type: Preview20250311WebSearchServerToolType$outboundSchema,
|
|
35
42
|
userLocation: z.nullable(PreviewWebSearchUserLocation$outboundSchema)
|
|
36
43
|
.optional(),
|
|
37
44
|
}).transform((v) => {
|
|
@@ -1,10 +1,15 @@
|
|
|
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 { PreviewWebSearchUserLocation, PreviewWebSearchUserLocation$Outbound } from "./previewwebsearchuserlocation.js";
|
|
5
6
|
import { SearchContextSizeEnum } from "./searchcontextsizeenum.js";
|
|
6
7
|
import { WebSearchDomainFilter, WebSearchDomainFilter$Outbound } from "./websearchdomainfilter.js";
|
|
7
8
|
import { WebSearchEngineEnum } from "./websearchengineenum.js";
|
|
9
|
+
export declare const PreviewWebSearchServerToolType: {
|
|
10
|
+
readonly WebSearchPreview: "web_search_preview";
|
|
11
|
+
};
|
|
12
|
+
export type PreviewWebSearchServerToolType = ClosedEnum<typeof PreviewWebSearchServerToolType>;
|
|
8
13
|
/**
|
|
9
14
|
* Web search preview tool configuration
|
|
10
15
|
*/
|
|
@@ -22,10 +27,14 @@ export type PreviewWebSearchServerTool = {
|
|
|
22
27
|
* Size of the search context for web search tools
|
|
23
28
|
*/
|
|
24
29
|
searchContextSize?: SearchContextSizeEnum | undefined;
|
|
25
|
-
type:
|
|
30
|
+
type: PreviewWebSearchServerToolType;
|
|
26
31
|
userLocation?: PreviewWebSearchUserLocation | null | undefined;
|
|
27
32
|
};
|
|
28
33
|
/** @internal */
|
|
34
|
+
export declare const PreviewWebSearchServerToolType$inboundSchema: z.ZodEnum<typeof PreviewWebSearchServerToolType>;
|
|
35
|
+
/** @internal */
|
|
36
|
+
export declare const PreviewWebSearchServerToolType$outboundSchema: z.ZodEnum<typeof PreviewWebSearchServerToolType>;
|
|
37
|
+
/** @internal */
|
|
29
38
|
export declare const PreviewWebSearchServerTool$inboundSchema: z.ZodType<PreviewWebSearchServerTool, unknown>;
|
|
30
39
|
/** @internal */
|
|
31
40
|
export type PreviewWebSearchServerTool$Outbound = {
|
|
@@ -33,7 +42,7 @@ export type PreviewWebSearchServerTool$Outbound = {
|
|
|
33
42
|
filters?: WebSearchDomainFilter$Outbound | null | undefined;
|
|
34
43
|
max_results?: number | undefined;
|
|
35
44
|
search_context_size?: string | undefined;
|
|
36
|
-
type:
|
|
45
|
+
type: string;
|
|
37
46
|
user_location?: PreviewWebSearchUserLocation$Outbound | null | undefined;
|
|
38
47
|
};
|
|
39
48
|
/** @internal */
|
|
@@ -9,13 +9,20 @@ import { PreviewWebSearchUserLocation$inboundSchema, PreviewWebSearchUserLocatio
|
|
|
9
9
|
import { SearchContextSizeEnum$inboundSchema, SearchContextSizeEnum$outboundSchema, } from "./searchcontextsizeenum.js";
|
|
10
10
|
import { WebSearchDomainFilter$inboundSchema, WebSearchDomainFilter$outboundSchema, } from "./websearchdomainfilter.js";
|
|
11
11
|
import { WebSearchEngineEnum$inboundSchema, WebSearchEngineEnum$outboundSchema, } from "./websearchengineenum.js";
|
|
12
|
+
export const PreviewWebSearchServerToolType = {
|
|
13
|
+
WebSearchPreview: "web_search_preview",
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const PreviewWebSearchServerToolType$inboundSchema = z.enum(PreviewWebSearchServerToolType);
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const PreviewWebSearchServerToolType$outboundSchema = PreviewWebSearchServerToolType$inboundSchema;
|
|
12
19
|
/** @internal */
|
|
13
20
|
export const PreviewWebSearchServerTool$inboundSchema = z.object({
|
|
14
21
|
engine: WebSearchEngineEnum$inboundSchema.optional(),
|
|
15
22
|
filters: z.nullable(WebSearchDomainFilter$inboundSchema).optional(),
|
|
16
23
|
max_results: z.int().optional(),
|
|
17
24
|
search_context_size: SearchContextSizeEnum$inboundSchema.optional(),
|
|
18
|
-
type:
|
|
25
|
+
type: PreviewWebSearchServerToolType$inboundSchema,
|
|
19
26
|
user_location: z.nullable(PreviewWebSearchUserLocation$inboundSchema)
|
|
20
27
|
.optional(),
|
|
21
28
|
}).transform((v) => {
|
|
@@ -31,7 +38,7 @@ export const PreviewWebSearchServerTool$outboundSchema = z.object({
|
|
|
31
38
|
filters: z.nullable(WebSearchDomainFilter$outboundSchema).optional(),
|
|
32
39
|
maxResults: z.int().optional(),
|
|
33
40
|
searchContextSize: SearchContextSizeEnum$outboundSchema.optional(),
|
|
34
|
-
type:
|
|
41
|
+
type: PreviewWebSearchServerToolType$outboundSchema,
|
|
35
42
|
userLocation: z.nullable(PreviewWebSearchUserLocation$outboundSchema)
|
|
36
43
|
.optional(),
|
|
37
44
|
}).transform((v) => {
|
|
@@ -294,7 +294,7 @@ export type ProviderOptions = {
|
|
|
294
294
|
replicate?: {
|
|
295
295
|
[k: string]: any | null;
|
|
296
296
|
} | undefined;
|
|
297
|
-
|
|
297
|
+
sakana?: {
|
|
298
298
|
[k: string]: any | null;
|
|
299
299
|
} | undefined;
|
|
300
300
|
sambanova?: {
|
|
@@ -657,7 +657,7 @@ export type ProviderOptions$Outbound = {
|
|
|
657
657
|
replicate?: {
|
|
658
658
|
[k: string]: any | null;
|
|
659
659
|
} | undefined;
|
|
660
|
-
|
|
660
|
+
sakana?: {
|
|
661
661
|
[k: string]: any | null;
|
|
662
662
|
} | undefined;
|
|
663
663
|
sambanova?: {
|
|
@@ -103,7 +103,7 @@ export const ProviderOptions$outboundSchema = z.object({
|
|
|
103
103
|
reka: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
104
104
|
relace: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
105
105
|
replicate: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
106
|
-
|
|
106
|
+
sakana: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
107
107
|
sambanova: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
108
108
|
sambanovaCloaked: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
109
109
|
seed: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
@@ -146,7 +146,6 @@ export const ProviderOptions$outboundSchema = z.object({
|
|
|
146
146
|
mancerOld: "mancer-old",
|
|
147
147
|
nexAgi: "nex-agi",
|
|
148
148
|
openInference: "open-inference",
|
|
149
|
-
sakanaAi: "sakana-ai",
|
|
150
149
|
sambanovaCloaked: "sambanova-cloaked",
|
|
151
150
|
sfCompute: "sf-compute",
|
|
152
151
|
togetherLite: "together-lite",
|