@openrouter/sdk 0.13.59 → 0.13.61
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 +7 -7
- package/esm/models/additionaltoolsitem.js +5 -5
- package/esm/models/advisornestedtool.d.ts +3 -3
- package/esm/models/advisornestedtool.js +2 -2
- package/esm/models/agentmessageitem.d.ts +3 -3
- package/esm/models/agentmessageitem.js +3 -3
- package/esm/models/autobetarouterplugin.d.ts +27 -0
- package/esm/models/autobetarouterplugin.js +22 -0
- package/esm/models/badgatewayresponseerrordata.d.ts +1 -1
- package/esm/models/badgatewayresponseerrordata.js +1 -1
- package/esm/models/badrequestresponseerrordata.d.ts +1 -1
- package/esm/models/badrequestresponseerrordata.js +1 -1
- package/esm/models/baseinputsunion.d.ts +3 -3
- package/esm/models/baseinputsunion.js +0 -3
- package/esm/models/byokproviderslug.d.ts +1 -0
- package/esm/models/byokproviderslug.js +1 -0
- package/esm/models/chatassistantmessage.d.ts +4 -4
- package/esm/models/chatassistantmessage.js +4 -4
- package/esm/models/chatfunctiontool.d.ts +2 -2
- package/esm/models/chatfunctiontool.js +1 -1
- package/esm/models/chatjsonschemaconfig.d.ts +2 -2
- package/esm/models/chatjsonschemaconfig.js +1 -1
- package/esm/models/chatrequest.d.ts +9 -8
- package/esm/models/chatrequest.js +4 -3
- package/esm/models/compactionitem.d.ts +1 -1
- package/esm/models/compactionitem.js +1 -1
- package/esm/models/compoundfilter.d.ts +2 -2
- package/esm/models/compoundfilter.js +2 -2
- package/esm/models/conflictresponseerrordata.d.ts +1 -1
- package/esm/models/conflictresponseerrordata.js +1 -1
- package/esm/models/contextcompactionitem.d.ts +1 -1
- package/esm/models/contextcompactionitem.js +1 -1
- package/esm/models/createobservabilitydestinationrequest.d.ts +2 -2
- package/esm/models/createobservabilitydestinationrequest.js +1 -1
- package/esm/models/debugevent.d.ts +1 -1
- package/esm/models/debugevent.js +1 -1
- package/esm/models/easyinputmessage.d.ts +8 -8
- package/esm/models/easyinputmessage.js +0 -4
- package/esm/models/edgenetworktimeoutresponseerrordata.d.ts +1 -1
- package/esm/models/edgenetworktimeoutresponseerrordata.js +1 -1
- package/esm/models/errors/badgatewayresponseerror.d.ts +2 -2
- package/esm/models/errors/badgatewayresponseerror.js +1 -2
- package/esm/models/errors/badrequestresponseerror.d.ts +2 -2
- package/esm/models/errors/badrequestresponseerror.js +1 -2
- package/esm/models/errors/conflictresponseerror.d.ts +2 -2
- package/esm/models/errors/conflictresponseerror.js +1 -2
- package/esm/models/errors/edgenetworktimeoutresponseerror.d.ts +2 -2
- package/esm/models/errors/edgenetworktimeoutresponseerror.js +1 -2
- package/esm/models/errors/forbiddenresponseerror.d.ts +2 -2
- package/esm/models/errors/forbiddenresponseerror.js +1 -2
- package/esm/models/errors/internalserverresponseerror.d.ts +2 -2
- package/esm/models/errors/internalserverresponseerror.js +1 -2
- package/esm/models/errors/notfoundresponseerror.d.ts +2 -2
- package/esm/models/errors/notfoundresponseerror.js +1 -2
- package/esm/models/errors/payloadtoolargeresponseerror.d.ts +2 -2
- package/esm/models/errors/payloadtoolargeresponseerror.js +1 -2
- package/esm/models/errors/paymentrequiredresponseerror.d.ts +2 -2
- package/esm/models/errors/paymentrequiredresponseerror.js +1 -2
- package/esm/models/errors/provideroverloadedresponseerror.d.ts +2 -2
- package/esm/models/errors/provideroverloadedresponseerror.js +1 -2
- package/esm/models/errors/requesttimeoutresponseerror.d.ts +2 -2
- package/esm/models/errors/requesttimeoutresponseerror.js +1 -2
- package/esm/models/errors/serviceunavailableresponseerror.d.ts +2 -2
- package/esm/models/errors/serviceunavailableresponseerror.js +1 -2
- package/esm/models/errors/toomanyrequestsresponseerror.d.ts +2 -2
- package/esm/models/errors/toomanyrequestsresponseerror.js +1 -2
- package/esm/models/errors/unauthorizedresponseerror.d.ts +2 -2
- package/esm/models/errors/unauthorizedresponseerror.js +1 -2
- package/esm/models/errors/unprocessableentityresponseerror.d.ts +2 -2
- package/esm/models/errors/unprocessableentityresponseerror.js +1 -2
- package/esm/models/filesearchservertool.d.ts +4 -4
- package/esm/models/filesearchservertool.js +1 -8
- package/esm/models/forbiddenresponseerrordata.d.ts +1 -1
- package/esm/models/forbiddenresponseerrordata.js +1 -1
- package/esm/models/formatjsonschemaconfig.d.ts +2 -2
- package/esm/models/formatjsonschemaconfig.js +2 -2
- package/esm/models/functioncalloutputitem.d.ts +2 -9
- package/esm/models/functioncalloutputitem.js +2 -8
- package/esm/models/fusionplugin.d.ts +28 -2
- package/esm/models/fusionplugin.js +28 -1
- package/esm/models/fusionservertoolconfig.d.ts +2 -2
- package/esm/models/fusionservertoolconfig.js +1 -1
- package/esm/models/generationcontentdata.d.ts +1 -1
- package/esm/models/generationcontentdata.js +1 -1
- package/esm/models/imageconfig.d.ts +2 -2
- package/esm/models/imageconfig.js +1 -1
- package/esm/models/imagegenerationproviderpreferences.d.ts +256 -250
- package/esm/models/imagegenerationproviderpreferences.js +126 -133
- package/esm/models/imagegenerationservertoolconfigunion.d.ts +2 -2
- package/esm/models/imagegenerationservertoolconfigunion.js +1 -1
- package/esm/models/index.d.ts +1 -2
- package/esm/models/index.js +1 -2
- package/esm/models/inputsunion.d.ts +8 -8
- package/esm/models/inputsunion.js +0 -4
- package/esm/models/internalserverresponseerrordata.d.ts +1 -1
- package/esm/models/internalserverresponseerrordata.js +1 -1
- package/esm/models/listendpointsresponse.d.ts +2 -33
- package/esm/models/listendpointsresponse.js +2 -30
- package/esm/models/localshellcalloutputitem.d.ts +3 -10
- package/esm/models/localshellcalloutputitem.js +2 -9
- package/esm/models/mcplisttoolsitem.d.ts +4 -4
- package/esm/models/mcplisttoolsitem.js +2 -2
- package/esm/models/mcpservertool.d.ts +8 -8
- package/esm/models/mcpservertool.js +4 -24
- package/esm/models/messagesadvisortoolresultblock.d.ts +2 -2
- package/esm/models/messagesadvisortoolresultblock.js +1 -1
- package/esm/models/messagesfallbackparam.d.ts +1 -1
- package/esm/models/messagesfallbackparam.js +1 -1
- package/esm/models/messagesmessageparam.d.ts +4 -4
- package/esm/models/messagesmessageparam.js +2 -2
- package/esm/models/messagesoutputconfig.d.ts +2 -2
- package/esm/models/messagesoutputconfig.js +1 -1
- package/esm/models/messagesrequest.d.ts +15 -36
- package/esm/models/messagesrequest.js +10 -21
- package/esm/models/namespacefunctiontool.d.ts +4 -4
- package/esm/models/namespacefunctiontool.js +4 -6
- package/esm/models/notfoundresponseerrordata.d.ts +1 -1
- package/esm/models/notfoundresponseerrordata.js +1 -1
- package/esm/models/openairesponsefunctiontoolcalloutput.d.ts +3 -10
- package/esm/models/openairesponsefunctiontoolcalloutput.js +2 -11
- package/esm/models/openresponsesresult.d.ts +46 -2
- package/esm/models/openresponsesresult.js +69 -3
- package/esm/models/operations/listbyokkeys.d.ts +1 -0
- package/esm/models/operations/listbyokkeys.js +1 -0
- package/esm/models/outputcomputercallitem.d.ts +2 -2
- package/esm/models/outputcomputercallitem.js +2 -2
- package/esm/models/outputmemoryservertoolitem.d.ts +2 -2
- package/esm/models/outputmemoryservertoolitem.js +2 -2
- package/esm/models/outputmessage.d.ts +2 -2
- package/esm/models/outputmessage.js +0 -2
- package/esm/models/outputmessageitem.d.ts +2 -2
- package/esm/models/outputmessageitem.js +0 -2
- package/esm/models/payloadtoolargeresponseerrordata.d.ts +1 -1
- package/esm/models/payloadtoolargeresponseerrordata.js +1 -1
- package/esm/models/paymentrequiredresponseerrordata.d.ts +1 -1
- package/esm/models/paymentrequiredresponseerrordata.js +1 -1
- package/esm/models/pipelinestage.d.ts +1 -1
- package/esm/models/pipelinestage.js +1 -1
- package/esm/models/preferredmaxlatency.d.ts +2 -2
- package/esm/models/preferredmaxlatency.js +1 -1
- package/esm/models/preferredminthroughput.d.ts +2 -2
- package/esm/models/preferredminthroughput.js +1 -1
- package/esm/models/presetdesignatedversion.d.ts +1 -1
- package/esm/models/presetdesignatedversion.js +1 -1
- package/esm/models/providername.d.ts +2 -1
- package/esm/models/providername.js +2 -1
- package/esm/models/provideroptions.d.ts +252 -246
- package/esm/models/provideroptions.js +124 -123
- package/esm/models/provideroverloadedresponseerrordata.d.ts +1 -1
- package/esm/models/provideroverloadedresponseerrordata.js +1 -1
- package/esm/models/providerpreferences.d.ts +4 -4
- package/esm/models/providerpreferences.js +2 -10
- package/esm/models/providerresponse.d.ts +2 -1
- package/esm/models/providerresponse.js +2 -1
- package/esm/models/publicendpoint.d.ts +2 -16
- package/esm/models/publicendpoint.js +2 -15
- package/esm/models/quantization.d.ts +2 -0
- package/esm/models/quantization.js +2 -0
- package/esm/models/requesttimeoutresponseerrordata.d.ts +1 -1
- package/esm/models/requesttimeoutresponseerrordata.js +1 -1
- package/esm/models/responsesrequest.d.ts +39 -9
- package/esm/models/responsesrequest.js +27 -4
- package/esm/models/routerparams.d.ts +1 -1
- package/esm/models/serviceunavailableresponseerrordata.d.ts +1 -1
- package/esm/models/serviceunavailableresponseerrordata.js +1 -1
- package/esm/models/shellcallitem.d.ts +5 -12
- package/esm/models/shellcallitem.js +3 -10
- package/esm/models/shellcalloutputitem.d.ts +4 -11
- package/esm/models/shellcalloutputitem.js +3 -10
- package/esm/models/subagentnestedtool.d.ts +3 -3
- package/esm/models/subagentnestedtool.js +2 -2
- package/esm/models/toolchoiceallowed.d.ts +2 -2
- package/esm/models/toolchoiceallowed.js +2 -2
- package/esm/models/toomanyrequestsresponseerrordata.d.ts +1 -1
- package/esm/models/toomanyrequestsresponseerrordata.js +1 -1
- package/esm/models/traceconfig.d.ts +1 -1
- package/esm/models/traceconfig.js +1 -1
- package/esm/models/unauthorizedresponseerrordata.d.ts +1 -1
- package/esm/models/unauthorizedresponseerrordata.js +1 -1
- package/esm/models/unprocessableentityresponseerrordata.d.ts +1 -1
- package/esm/models/unprocessableentityresponseerrordata.js +1 -1
- package/esm/models/updateobservabilitydestinationrequest.d.ts +2 -2
- package/esm/models/updateobservabilitydestinationrequest.js +1 -1
- package/esm/models/videogenerationrequest.d.ts +252 -246
- package/esm/models/videogenerationrequest.js +124 -123
- package/jsr.json +1 -1
- package/package.json +6 -6
- package/esm/models/reasoningconfig.d.ts +0 -35
- package/esm/models/reasoningconfig.js +0 -27
- package/esm/models/usage.d.ts +0 -52
- package/esm/models/usage.js +0 -75
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.61";
|
|
53
53
|
readonly genVersion: "2.914.0";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.13.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.13.61 2.914.0 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.61",
|
|
30
30
|
genVersion: "2.914.0",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 0.13.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 0.13.61 2.914.0 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
|
@@ -40,13 +40,13 @@ export type AdditionalToolsItemRole = OpenEnum<typeof AdditionalToolsItemRole>;
|
|
|
40
40
|
export type AdditionalToolsItemTool = {
|
|
41
41
|
type: string;
|
|
42
42
|
additionalProperties?: {
|
|
43
|
-
[k: string]: any
|
|
43
|
+
[k: string]: any;
|
|
44
44
|
} | undefined;
|
|
45
45
|
};
|
|
46
|
-
export declare const
|
|
46
|
+
export declare const AdditionalToolsItemToolType: {
|
|
47
47
|
readonly Function: "function";
|
|
48
48
|
};
|
|
49
|
-
export type
|
|
49
|
+
export type AdditionalToolsItemToolType = ClosedEnum<typeof AdditionalToolsItemToolType>;
|
|
50
50
|
/**
|
|
51
51
|
* Function tool definition
|
|
52
52
|
*/
|
|
@@ -54,10 +54,10 @@ export type AdditionalToolsItemToolFunction = {
|
|
|
54
54
|
description?: string | null | undefined;
|
|
55
55
|
name: string;
|
|
56
56
|
parameters: {
|
|
57
|
-
[k: string]: any
|
|
57
|
+
[k: string]: any;
|
|
58
58
|
} | null;
|
|
59
59
|
strict?: boolean | null | undefined;
|
|
60
|
-
type:
|
|
60
|
+
type: AdditionalToolsItemToolType;
|
|
61
61
|
};
|
|
62
62
|
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 | AdditionalToolsItemTool;
|
|
63
63
|
export declare const TypeAdditionalTools: {
|
|
@@ -84,13 +84,13 @@ export type AdditionalToolsItemTool$Outbound = {
|
|
|
84
84
|
export declare const AdditionalToolsItemTool$outboundSchema: z.ZodType<AdditionalToolsItemTool$Outbound, AdditionalToolsItemTool>;
|
|
85
85
|
export declare function additionalToolsItemToolToJSON(additionalToolsItemTool: AdditionalToolsItemTool): string;
|
|
86
86
|
/** @internal */
|
|
87
|
-
export declare const
|
|
87
|
+
export declare const AdditionalToolsItemToolType$outboundSchema: z.ZodEnum<typeof AdditionalToolsItemToolType>;
|
|
88
88
|
/** @internal */
|
|
89
89
|
export type AdditionalToolsItemToolFunction$Outbound = {
|
|
90
90
|
description?: string | null | undefined;
|
|
91
91
|
name: string;
|
|
92
92
|
parameters: {
|
|
93
|
-
[k: string]: any
|
|
93
|
+
[k: string]: any;
|
|
94
94
|
} | null;
|
|
95
95
|
strict?: boolean | null | undefined;
|
|
96
96
|
type: string;
|
|
@@ -41,7 +41,7 @@ export const AdditionalToolsItemRole = {
|
|
|
41
41
|
Developer: "developer",
|
|
42
42
|
Tool: "tool",
|
|
43
43
|
};
|
|
44
|
-
export const
|
|
44
|
+
export const AdditionalToolsItemToolType = {
|
|
45
45
|
Function: "function",
|
|
46
46
|
};
|
|
47
47
|
export const TypeAdditionalTools = {
|
|
@@ -52,7 +52,7 @@ export const AdditionalToolsItemRole$outboundSchema = openEnums.outboundSchema(A
|
|
|
52
52
|
/** @internal */
|
|
53
53
|
export const AdditionalToolsItemTool$outboundSchema = z.object({
|
|
54
54
|
type: z.string(),
|
|
55
|
-
additionalProperties: z.record(z.string(), z.
|
|
55
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
56
56
|
}).transform((v) => {
|
|
57
57
|
return {
|
|
58
58
|
...v.additionalProperties,
|
|
@@ -65,14 +65,14 @@ export function additionalToolsItemToolToJSON(additionalToolsItemTool) {
|
|
|
65
65
|
return JSON.stringify(AdditionalToolsItemTool$outboundSchema.parse(additionalToolsItemTool));
|
|
66
66
|
}
|
|
67
67
|
/** @internal */
|
|
68
|
-
export const
|
|
68
|
+
export const AdditionalToolsItemToolType$outboundSchema = z.enum(AdditionalToolsItemToolType);
|
|
69
69
|
/** @internal */
|
|
70
70
|
export const AdditionalToolsItemToolFunction$outboundSchema = z.object({
|
|
71
71
|
description: z.nullable(z.string()).optional(),
|
|
72
72
|
name: z.string(),
|
|
73
|
-
parameters: z.nullable(z.record(z.string(), z.
|
|
73
|
+
parameters: z.nullable(z.record(z.string(), z.any())),
|
|
74
74
|
strict: z.nullable(z.boolean()).optional(),
|
|
75
|
-
type:
|
|
75
|
+
type: AdditionalToolsItemToolType$outboundSchema,
|
|
76
76
|
});
|
|
77
77
|
export function additionalToolsItemToolFunctionToJSON(additionalToolsItemToolFunction) {
|
|
78
78
|
return JSON.stringify(AdditionalToolsItemToolFunction$outboundSchema.parse(additionalToolsItemToolFunction));
|
|
@@ -4,17 +4,17 @@ import * as z from "zod/v4";
|
|
|
4
4
|
*/
|
|
5
5
|
export type AdvisorNestedTool = {
|
|
6
6
|
parameters?: {
|
|
7
|
-
[k: string]: any
|
|
7
|
+
[k: string]: any;
|
|
8
8
|
} | undefined;
|
|
9
9
|
type: string;
|
|
10
10
|
additionalProperties?: {
|
|
11
|
-
[k: string]: any
|
|
11
|
+
[k: string]: any;
|
|
12
12
|
} | undefined;
|
|
13
13
|
};
|
|
14
14
|
/** @internal */
|
|
15
15
|
export type AdvisorNestedTool$Outbound = {
|
|
16
16
|
parameters?: {
|
|
17
|
-
[k: string]: any
|
|
17
|
+
[k: string]: any;
|
|
18
18
|
} | undefined;
|
|
19
19
|
type: string;
|
|
20
20
|
[additionalProperties: string]: unknown;
|
|
@@ -6,9 +6,9 @@ import * as z from "zod/v4";
|
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
/** @internal */
|
|
8
8
|
export const AdvisorNestedTool$outboundSchema = z.object({
|
|
9
|
-
parameters: z.record(z.string(), z.
|
|
9
|
+
parameters: z.record(z.string(), z.any()).optional(),
|
|
10
10
|
type: z.string(),
|
|
11
|
-
additionalProperties: z.record(z.string(), z.
|
|
11
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
12
12
|
}).transform((v) => {
|
|
13
13
|
return {
|
|
14
14
|
...v.additionalProperties,
|
|
@@ -4,14 +4,14 @@ import { InputText, InputText$Outbound } from "./inputtext.js";
|
|
|
4
4
|
export type Agent = {
|
|
5
5
|
agentName: string;
|
|
6
6
|
additionalProperties?: {
|
|
7
|
-
[k: string]: any
|
|
7
|
+
[k: string]: any;
|
|
8
8
|
} | undefined;
|
|
9
9
|
};
|
|
10
10
|
export type ContentEncryptedContent = {
|
|
11
11
|
encryptedContent: string;
|
|
12
12
|
type: "encrypted_content";
|
|
13
13
|
additionalProperties?: {
|
|
14
|
-
[k: string]: any
|
|
14
|
+
[k: string]: any;
|
|
15
15
|
} | undefined;
|
|
16
16
|
};
|
|
17
17
|
export declare const AgentMessageItemDetail: {
|
|
@@ -45,7 +45,7 @@ export type AgentMessageItem = {
|
|
|
45
45
|
recipient: string;
|
|
46
46
|
type: TypeAgentMessage;
|
|
47
47
|
additionalProperties?: {
|
|
48
|
-
[k: string]: any
|
|
48
|
+
[k: string]: any;
|
|
49
49
|
} | undefined;
|
|
50
50
|
};
|
|
51
51
|
/** @internal */
|
|
@@ -18,7 +18,7 @@ export const TypeAgentMessage = {
|
|
|
18
18
|
/** @internal */
|
|
19
19
|
export const Agent$outboundSchema = z.object({
|
|
20
20
|
agentName: z.string(),
|
|
21
|
-
additionalProperties: z.record(z.string(), z.
|
|
21
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
22
22
|
}).transform((v) => {
|
|
23
23
|
return {
|
|
24
24
|
...v.additionalProperties,
|
|
@@ -35,7 +35,7 @@ export function agentToJSON(agent) {
|
|
|
35
35
|
export const ContentEncryptedContent$outboundSchema = z.object({
|
|
36
36
|
encryptedContent: z.string(),
|
|
37
37
|
type: z.literal("encrypted_content"),
|
|
38
|
-
additionalProperties: z.record(z.string(), z.
|
|
38
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
39
39
|
}).transform((v) => {
|
|
40
40
|
return {
|
|
41
41
|
...v.additionalProperties,
|
|
@@ -86,7 +86,7 @@ export const AgentMessageItem$outboundSchema = z.object({
|
|
|
86
86
|
id: z.nullable(z.string()).optional(),
|
|
87
87
|
recipient: z.string(),
|
|
88
88
|
type: TypeAgentMessage$outboundSchema,
|
|
89
|
-
additionalProperties: z.record(z.string(), z.
|
|
89
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
90
90
|
}).transform((v) => {
|
|
91
91
|
return {
|
|
92
92
|
...v.additionalProperties,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type AutoBetaRouterPlugin = {
|
|
3
|
+
/**
|
|
4
|
+
* List of model patterns to filter which models the auto-beta-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list.
|
|
5
|
+
*/
|
|
6
|
+
allowedModels?: Array<string> | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Balances routing between cost and quality on a 0-10 scale. The auto-beta-router ranks models for the classified task type by community spend share, then filters candidates by their average cost per generation for that task. Higher values favor cheaper models: 10 keeps only models around the cheapest 10th percentile, while 0 permits models up to the 90th percentile for cost. Defaults to 7.
|
|
9
|
+
*/
|
|
10
|
+
costQualityTradeoff?: number | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Set to false to disable the auto-beta-router plugin for this request. Defaults to true.
|
|
13
|
+
*/
|
|
14
|
+
enabled?: boolean | undefined;
|
|
15
|
+
id: "auto-beta-router";
|
|
16
|
+
};
|
|
17
|
+
/** @internal */
|
|
18
|
+
export type AutoBetaRouterPlugin$Outbound = {
|
|
19
|
+
allowed_models?: Array<string> | undefined;
|
|
20
|
+
cost_quality_tradeoff?: number | undefined;
|
|
21
|
+
enabled?: boolean | undefined;
|
|
22
|
+
id: "auto-beta-router";
|
|
23
|
+
};
|
|
24
|
+
/** @internal */
|
|
25
|
+
export declare const AutoBetaRouterPlugin$outboundSchema: z.ZodType<AutoBetaRouterPlugin$Outbound, AutoBetaRouterPlugin>;
|
|
26
|
+
export declare function autoBetaRouterPluginToJSON(autoBetaRouterPlugin: AutoBetaRouterPlugin): string;
|
|
27
|
+
//# sourceMappingURL=autobetarouterplugin.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 80e04f632d5f
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const AutoBetaRouterPlugin$outboundSchema = z.object({
|
|
9
|
+
allowedModels: z.array(z.string()).optional(),
|
|
10
|
+
costQualityTradeoff: z.int().optional(),
|
|
11
|
+
enabled: z.boolean().optional(),
|
|
12
|
+
id: z.literal("auto-beta-router"),
|
|
13
|
+
}).transform((v) => {
|
|
14
|
+
return remap$(v, {
|
|
15
|
+
allowedModels: "allowed_models",
|
|
16
|
+
costQualityTradeoff: "cost_quality_tradeoff",
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
export function autoBetaRouterPluginToJSON(autoBetaRouterPlugin) {
|
|
20
|
+
return JSON.stringify(AutoBetaRouterPlugin$outboundSchema.parse(autoBetaRouterPlugin));
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=autobetarouterplugin.js.map
|
|
@@ -8,7 +8,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
8
8
|
export const BadGatewayResponseErrorData$inboundSchema = z.object({
|
|
9
9
|
code: z.int(),
|
|
10
10
|
message: z.string(),
|
|
11
|
-
metadata: z.nullable(z.record(z.string(), z.
|
|
11
|
+
metadata: z.nullable(z.record(z.string(), z.any())).optional(),
|
|
12
12
|
});
|
|
13
13
|
export function badGatewayResponseErrorDataFromJSON(jsonString) {
|
|
14
14
|
return safeParse(jsonString, (x) => BadGatewayResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BadGatewayResponseErrorData' from JSON`);
|
|
@@ -8,7 +8,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
8
8
|
export const BadRequestResponseErrorData$inboundSchema = z.object({
|
|
9
9
|
code: z.int(),
|
|
10
10
|
message: z.string(),
|
|
11
|
-
metadata: z.nullable(z.record(z.string(), z.
|
|
11
|
+
metadata: z.nullable(z.record(z.string(), z.any())).optional(),
|
|
12
12
|
});
|
|
13
13
|
export function badRequestResponseErrorDataFromJSON(jsonString) {
|
|
14
14
|
return safeParse(jsonString, (x) => BadRequestResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BadRequestResponseErrorData' from JSON`);
|
|
@@ -30,7 +30,7 @@ export declare const BaseInputsPhaseCommentary: {
|
|
|
30
30
|
readonly Commentary: "commentary";
|
|
31
31
|
};
|
|
32
32
|
export type BaseInputsPhaseCommentary = ClosedEnum<typeof BaseInputsPhaseCommentary>;
|
|
33
|
-
export type BaseInputsPhaseUnion = BaseInputsPhaseCommentary | BaseInputsPhaseFinalAnswer
|
|
33
|
+
export type BaseInputsPhaseUnion = BaseInputsPhaseCommentary | BaseInputsPhaseFinalAnswer;
|
|
34
34
|
export declare const BaseInputsRoleDeveloper: {
|
|
35
35
|
readonly Developer: "developer";
|
|
36
36
|
};
|
|
@@ -56,12 +56,12 @@ export type BaseInputsMessage = {
|
|
|
56
56
|
content: Array<InputAudio | InputFile | (InputImage & {
|
|
57
57
|
type: "input_image";
|
|
58
58
|
}) | InputText | discriminatedUnionTypes.Unknown<"type">> | string;
|
|
59
|
-
phase?: BaseInputsPhaseCommentary | BaseInputsPhaseFinalAnswer |
|
|
59
|
+
phase?: BaseInputsPhaseCommentary | BaseInputsPhaseFinalAnswer | null | undefined;
|
|
60
60
|
role: BaseInputsRoleUser | BaseInputsRoleSystem | BaseInputsRoleAssistant | BaseInputsRoleDeveloper;
|
|
61
61
|
type?: BaseInputsType | undefined;
|
|
62
62
|
};
|
|
63
63
|
export type BaseInputsUnion1 = OpenAIResponseFunctionToolCall | OutputMessage | OpenAIResponseCustomToolCall | ApplyPatchCallItem | OpenAIResponseInputMessageItem | OpenAIResponseFunctionToolCallOutput | OutputItemImageGenerationCall | OpenAIResponseCustomToolCallOutput | ApplyPatchCallOutputItem | BaseInputsMessage;
|
|
64
|
-
export type BaseInputsUnion = string | Array<OpenAIResponseFunctionToolCall | OutputMessage | OpenAIResponseCustomToolCall | ApplyPatchCallItem | OpenAIResponseInputMessageItem | OpenAIResponseFunctionToolCallOutput | OutputItemImageGenerationCall | OpenAIResponseCustomToolCallOutput | ApplyPatchCallOutputItem | BaseInputsMessage
|
|
64
|
+
export type BaseInputsUnion = string | Array<OpenAIResponseFunctionToolCall | OutputMessage | OpenAIResponseCustomToolCall | ApplyPatchCallItem | OpenAIResponseInputMessageItem | OpenAIResponseFunctionToolCallOutput | OutputItemImageGenerationCall | OpenAIResponseCustomToolCallOutput | ApplyPatchCallOutputItem | BaseInputsMessage>;
|
|
65
65
|
/** @internal */
|
|
66
66
|
export declare const BaseInputsContent1$inboundSchema: z.ZodType<BaseInputsContent1, unknown>;
|
|
67
67
|
export declare function baseInputsContent1FromJSON(jsonString: string): SafeParseResult<BaseInputsContent1, SDKValidationError>;
|
|
@@ -70,7 +70,6 @@ export const BaseInputsPhaseCommentary$inboundSchema = z.enum(BaseInputsPhaseCom
|
|
|
70
70
|
export const BaseInputsPhaseUnion$inboundSchema = z.union([
|
|
71
71
|
BaseInputsPhaseCommentary$inboundSchema,
|
|
72
72
|
BaseInputsPhaseFinalAnswer$inboundSchema,
|
|
73
|
-
z.any(),
|
|
74
73
|
]);
|
|
75
74
|
export function baseInputsPhaseUnionFromJSON(jsonString) {
|
|
76
75
|
return safeParse(jsonString, (x) => BaseInputsPhaseUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BaseInputsPhaseUnion' from JSON`);
|
|
@@ -110,7 +109,6 @@ export const BaseInputsMessage$inboundSchema = z.object({
|
|
|
110
109
|
phase: z.nullable(z.union([
|
|
111
110
|
BaseInputsPhaseCommentary$inboundSchema,
|
|
112
111
|
BaseInputsPhaseFinalAnswer$inboundSchema,
|
|
113
|
-
z.any(),
|
|
114
112
|
])).optional(),
|
|
115
113
|
role: z.union([
|
|
116
114
|
BaseInputsRoleUser$inboundSchema,
|
|
@@ -154,7 +152,6 @@ export const BaseInputsUnion$inboundSchema = z.union([
|
|
|
154
152
|
ApplyPatchCallOutputItem$inboundSchema,
|
|
155
153
|
z.lazy(() => BaseInputsMessage$inboundSchema),
|
|
156
154
|
])),
|
|
157
|
-
z.any(),
|
|
158
155
|
]);
|
|
159
156
|
export function baseInputsUnionFromJSON(jsonString) {
|
|
160
157
|
return safeParse(jsonString, (x) => BaseInputsUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BaseInputsUnion' from JSON`);
|
|
@@ -87,6 +87,7 @@ export declare const BYOKProviderSlug: {
|
|
|
87
87
|
readonly Stepfun: "stepfun";
|
|
88
88
|
readonly Streamlake: "streamlake";
|
|
89
89
|
readonly Switchpoint: "switchpoint";
|
|
90
|
+
readonly Tencent: "tencent";
|
|
90
91
|
readonly Tenstorrent: "tenstorrent";
|
|
91
92
|
readonly Together: "together";
|
|
92
93
|
readonly Upstage: "upstage";
|
|
@@ -10,7 +10,7 @@ import { ReasoningDetailUnion, ReasoningDetailUnion$Outbound } from "./reasoning
|
|
|
10
10
|
/**
|
|
11
11
|
* Assistant message content
|
|
12
12
|
*/
|
|
13
|
-
export type ChatAssistantMessageContent = string | Array<ChatContentItems
|
|
13
|
+
export type ChatAssistantMessageContent = string | Array<ChatContentItems>;
|
|
14
14
|
export declare const ChatAssistantMessageRole: {
|
|
15
15
|
readonly Assistant: "assistant";
|
|
16
16
|
};
|
|
@@ -26,7 +26,7 @@ export type ChatAssistantMessage = {
|
|
|
26
26
|
/**
|
|
27
27
|
* Assistant message content
|
|
28
28
|
*/
|
|
29
|
-
content?: string | Array<ChatContentItems> |
|
|
29
|
+
content?: string | Array<ChatContentItems> | null | undefined;
|
|
30
30
|
/**
|
|
31
31
|
* Generated images from image generation models
|
|
32
32
|
*/
|
|
@@ -56,7 +56,7 @@ export type ChatAssistantMessage = {
|
|
|
56
56
|
/** @internal */
|
|
57
57
|
export declare const ChatAssistantMessageContent$inboundSchema: z.ZodType<ChatAssistantMessageContent, unknown>;
|
|
58
58
|
/** @internal */
|
|
59
|
-
export type ChatAssistantMessageContent$Outbound = string | Array<ChatContentItems$Outbound
|
|
59
|
+
export type ChatAssistantMessageContent$Outbound = string | Array<ChatContentItems$Outbound>;
|
|
60
60
|
/** @internal */
|
|
61
61
|
export declare const ChatAssistantMessageContent$outboundSchema: z.ZodType<ChatAssistantMessageContent$Outbound, ChatAssistantMessageContent>;
|
|
62
62
|
export declare function chatAssistantMessageContentToJSON(chatAssistantMessageContent: ChatAssistantMessageContent): string;
|
|
@@ -70,7 +70,7 @@ export declare const ChatAssistantMessage$inboundSchema: z.ZodType<ChatAssistant
|
|
|
70
70
|
/** @internal */
|
|
71
71
|
export type ChatAssistantMessage$Outbound = {
|
|
72
72
|
audio?: ChatAudioOutput$Outbound | undefined;
|
|
73
|
-
content?: string | Array<ChatContentItems$Outbound> |
|
|
73
|
+
content?: string | Array<ChatContentItems$Outbound> | null | undefined;
|
|
74
74
|
images?: Array<ChatAssistantImages$Outbound> | undefined;
|
|
75
75
|
name?: string | undefined;
|
|
76
76
|
reasoning?: string | null | undefined;
|
|
@@ -14,9 +14,9 @@ export const ChatAssistantMessageRole = {
|
|
|
14
14
|
Assistant: "assistant",
|
|
15
15
|
};
|
|
16
16
|
/** @internal */
|
|
17
|
-
export const ChatAssistantMessageContent$inboundSchema = z.union([z.string(), z.array(ChatContentItems$inboundSchema)
|
|
17
|
+
export const ChatAssistantMessageContent$inboundSchema = z.union([z.string(), z.array(ChatContentItems$inboundSchema)]);
|
|
18
18
|
/** @internal */
|
|
19
|
-
export const ChatAssistantMessageContent$outboundSchema = z.union([z.string(), z.array(ChatContentItems$outboundSchema)
|
|
19
|
+
export const ChatAssistantMessageContent$outboundSchema = z.union([z.string(), z.array(ChatContentItems$outboundSchema)]);
|
|
20
20
|
export function chatAssistantMessageContentToJSON(chatAssistantMessageContent) {
|
|
21
21
|
return JSON.stringify(ChatAssistantMessageContent$outboundSchema.parse(chatAssistantMessageContent));
|
|
22
22
|
}
|
|
@@ -30,7 +30,7 @@ export const ChatAssistantMessageRole$outboundSchema = ChatAssistantMessageRole$
|
|
|
30
30
|
/** @internal */
|
|
31
31
|
export const ChatAssistantMessage$inboundSchema = z.object({
|
|
32
32
|
audio: ChatAudioOutput$inboundSchema.optional(),
|
|
33
|
-
content: z.nullable(z.union([z.string(), z.array(ChatContentItems$inboundSchema)
|
|
33
|
+
content: z.nullable(z.union([z.string(), z.array(ChatContentItems$inboundSchema)])).optional(),
|
|
34
34
|
images: z.array(ChatAssistantImages$inboundSchema).optional(),
|
|
35
35
|
name: z.string().optional(),
|
|
36
36
|
reasoning: z.nullable(z.string()).optional(),
|
|
@@ -47,7 +47,7 @@ export const ChatAssistantMessage$inboundSchema = z.object({
|
|
|
47
47
|
/** @internal */
|
|
48
48
|
export const ChatAssistantMessage$outboundSchema = z.object({
|
|
49
49
|
audio: ChatAudioOutput$outboundSchema.optional(),
|
|
50
|
-
content: z.nullable(z.union([z.string(), z.array(ChatContentItems$outboundSchema)
|
|
50
|
+
content: z.nullable(z.union([z.string(), z.array(ChatContentItems$outboundSchema)])).optional(),
|
|
51
51
|
images: z.array(ChatAssistantImages$outboundSchema).optional(),
|
|
52
52
|
name: z.string().optional(),
|
|
53
53
|
reasoning: z.nullable(z.string()).optional(),
|
|
@@ -28,7 +28,7 @@ export type ChatFunctionToolFunctionFunction = {
|
|
|
28
28
|
* Function parameters as JSON Schema object
|
|
29
29
|
*/
|
|
30
30
|
parameters?: {
|
|
31
|
-
[k: string]: any
|
|
31
|
+
[k: string]: any;
|
|
32
32
|
} | undefined;
|
|
33
33
|
/**
|
|
34
34
|
* Enable strict schema adherence
|
|
@@ -59,7 +59,7 @@ export type ChatFunctionToolFunctionFunction$Outbound = {
|
|
|
59
59
|
description?: string | undefined;
|
|
60
60
|
name: string;
|
|
61
61
|
parameters?: {
|
|
62
|
-
[k: string]: any
|
|
62
|
+
[k: string]: any;
|
|
63
63
|
} | undefined;
|
|
64
64
|
strict?: boolean | null | undefined;
|
|
65
65
|
};
|
|
@@ -23,7 +23,7 @@ export const ChatFunctionToolType = {
|
|
|
23
23
|
export const ChatFunctionToolFunctionFunction$outboundSchema = z.object({
|
|
24
24
|
description: z.string().optional(),
|
|
25
25
|
name: z.string(),
|
|
26
|
-
parameters: z.record(z.string(), z.
|
|
26
|
+
parameters: z.record(z.string(), z.any()).optional(),
|
|
27
27
|
strict: z.nullable(z.boolean()).optional(),
|
|
28
28
|
});
|
|
29
29
|
export function chatFunctionToolFunctionFunctionToJSON(chatFunctionToolFunctionFunction) {
|
|
@@ -15,7 +15,7 @@ export type ChatJsonSchemaConfig = {
|
|
|
15
15
|
* JSON Schema object
|
|
16
16
|
*/
|
|
17
17
|
schema?: {
|
|
18
|
-
[k: string]: any
|
|
18
|
+
[k: string]: any;
|
|
19
19
|
} | undefined;
|
|
20
20
|
/**
|
|
21
21
|
* Enable strict schema adherence
|
|
@@ -27,7 +27,7 @@ export type ChatJsonSchemaConfig$Outbound = {
|
|
|
27
27
|
description?: string | undefined;
|
|
28
28
|
name: string;
|
|
29
29
|
schema?: {
|
|
30
|
-
[k: string]: any
|
|
30
|
+
[k: string]: any;
|
|
31
31
|
} | undefined;
|
|
32
32
|
strict?: boolean | null | undefined;
|
|
33
33
|
};
|
|
@@ -7,7 +7,7 @@ import * as z from "zod/v4";
|
|
|
7
7
|
export const ChatJsonSchemaConfig$outboundSchema = z.object({
|
|
8
8
|
description: z.string().optional(),
|
|
9
9
|
name: z.string(),
|
|
10
|
-
schema: z.record(z.string(), z.
|
|
10
|
+
schema: z.record(z.string(), z.any()).optional(),
|
|
11
11
|
strict: z.nullable(z.boolean()).optional(),
|
|
12
12
|
});
|
|
13
13
|
export function chatJsonSchemaConfigToJSON(chatJsonSchemaConfig) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { AnthropicCacheControlDirective, AnthropicCacheControlDirective$Outbound } from "./anthropiccachecontroldirective.js";
|
|
4
|
+
import { AutoBetaRouterPlugin, AutoBetaRouterPlugin$Outbound } from "./autobetarouterplugin.js";
|
|
4
5
|
import { AutoRouterPlugin, AutoRouterPlugin$Outbound } from "./autorouterplugin.js";
|
|
5
6
|
import { ChatDebugOptions, ChatDebugOptions$Outbound } from "./chatdebugoptions.js";
|
|
6
7
|
import { ChatFormatGrammarConfig, ChatFormatGrammarConfig$Outbound } from "./chatformatgrammarconfig.js";
|
|
@@ -33,7 +34,7 @@ export declare const Modality: {
|
|
|
33
34
|
readonly Audio: "audio";
|
|
34
35
|
};
|
|
35
36
|
export type Modality = OpenEnum<typeof Modality>;
|
|
36
|
-
export type ChatRequestPlugin = AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | WebSearchPlugin | WebFetchPlugin;
|
|
37
|
+
export type ChatRequestPlugin = AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | WebSearchPlugin | WebFetchPlugin;
|
|
37
38
|
/**
|
|
38
39
|
* Constrains effort on reasoning for reasoning models
|
|
39
40
|
*/
|
|
@@ -97,7 +98,7 @@ export type ChatRequestServiceTier = OpenEnum<typeof ChatRequestServiceTier>;
|
|
|
97
98
|
/**
|
|
98
99
|
* Stop sequences (up to 4)
|
|
99
100
|
*/
|
|
100
|
-
export type Stop = string | Array<string
|
|
101
|
+
export type Stop = string | Array<string>;
|
|
101
102
|
/**
|
|
102
103
|
* Chat completion request parameters
|
|
103
104
|
*/
|
|
@@ -171,7 +172,7 @@ export type ChatRequest = {
|
|
|
171
172
|
/**
|
|
172
173
|
* Plugins you want to enable for this request, including their settings.
|
|
173
174
|
*/
|
|
174
|
-
plugins?: Array<AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | WebSearchPlugin | WebFetchPlugin> | undefined;
|
|
175
|
+
plugins?: Array<AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | WebSearchPlugin | WebFetchPlugin> | undefined;
|
|
175
176
|
/**
|
|
176
177
|
* Static predicted output content. Supported models can use this to reduce latency when much of the response is known in advance.
|
|
177
178
|
*/
|
|
@@ -220,7 +221,7 @@ export type ChatRequest = {
|
|
|
220
221
|
/**
|
|
221
222
|
* Stop sequences (up to 4)
|
|
222
223
|
*/
|
|
223
|
-
stop?: string | Array<string> |
|
|
224
|
+
stop?: string | Array<string> | null | undefined;
|
|
224
225
|
/**
|
|
225
226
|
* Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
|
|
226
227
|
*/
|
|
@@ -273,7 +274,7 @@ export type ChatRequest = {
|
|
|
273
274
|
/** @internal */
|
|
274
275
|
export declare const Modality$outboundSchema: z.ZodType<string, Modality>;
|
|
275
276
|
/** @internal */
|
|
276
|
-
export type ChatRequestPlugin$Outbound = AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound;
|
|
277
|
+
export type ChatRequestPlugin$Outbound = AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound;
|
|
277
278
|
/** @internal */
|
|
278
279
|
export declare const ChatRequestPlugin$outboundSchema: z.ZodType<ChatRequestPlugin$Outbound, ChatRequestPlugin>;
|
|
279
280
|
export declare function chatRequestPluginToJSON(chatRequestPlugin: ChatRequestPlugin): string;
|
|
@@ -297,7 +298,7 @@ export declare function responseFormatToJSON(responseFormat: ResponseFormat): st
|
|
|
297
298
|
/** @internal */
|
|
298
299
|
export declare const ChatRequestServiceTier$outboundSchema: z.ZodType<string, ChatRequestServiceTier>;
|
|
299
300
|
/** @internal */
|
|
300
|
-
export type Stop$Outbound = string | Array<string
|
|
301
|
+
export type Stop$Outbound = string | Array<string>;
|
|
301
302
|
/** @internal */
|
|
302
303
|
export declare const Stop$outboundSchema: z.ZodType<Stop$Outbound, Stop>;
|
|
303
304
|
export declare function stopToJSON(stop: Stop): string;
|
|
@@ -324,7 +325,7 @@ export type ChatRequest$Outbound = {
|
|
|
324
325
|
model?: string | undefined;
|
|
325
326
|
models?: Array<string> | undefined;
|
|
326
327
|
parallel_tool_calls?: boolean | null | undefined;
|
|
327
|
-
plugins?: Array<AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound> | undefined;
|
|
328
|
+
plugins?: Array<AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound> | undefined;
|
|
328
329
|
prediction?: Prediction$Outbound | null | undefined;
|
|
329
330
|
presence_penalty?: number | null | undefined;
|
|
330
331
|
prompt_cache_key?: string | null | undefined;
|
|
@@ -337,7 +338,7 @@ export type ChatRequest$Outbound = {
|
|
|
337
338
|
seed?: number | null | undefined;
|
|
338
339
|
service_tier?: string | null | undefined;
|
|
339
340
|
session_id?: string | undefined;
|
|
340
|
-
stop?: string | Array<string> |
|
|
341
|
+
stop?: string | Array<string> | null | undefined;
|
|
341
342
|
stop_server_tools_when?: Array<StopServerToolsWhenCondition$Outbound> | undefined;
|
|
342
343
|
stream: boolean;
|
|
343
344
|
stream_options?: ChatStreamOptions$Outbound | null | undefined;
|
|
@@ -6,6 +6,7 @@ import * as z from "zod/v4";
|
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import * as openEnums from "../types/enums.js";
|
|
8
8
|
import { AnthropicCacheControlDirective$outboundSchema, } from "./anthropiccachecontroldirective.js";
|
|
9
|
+
import { AutoBetaRouterPlugin$outboundSchema, } from "./autobetarouterplugin.js";
|
|
9
10
|
import { AutoRouterPlugin$outboundSchema, } from "./autorouterplugin.js";
|
|
10
11
|
import { ChatDebugOptions$outboundSchema, } from "./chatdebugoptions.js";
|
|
11
12
|
import { ChatFormatGrammarConfig$outboundSchema, } from "./chatformatgrammarconfig.js";
|
|
@@ -76,6 +77,7 @@ export const Modality$outboundSchema = openEnums
|
|
|
76
77
|
.outboundSchema(Modality);
|
|
77
78
|
/** @internal */
|
|
78
79
|
export const ChatRequestPlugin$outboundSchema = z.union([
|
|
80
|
+
AutoBetaRouterPlugin$outboundSchema,
|
|
79
81
|
AutoRouterPlugin$outboundSchema,
|
|
80
82
|
ContextCompressionPlugin$outboundSchema,
|
|
81
83
|
FileParserPlugin$outboundSchema,
|
|
@@ -119,7 +121,6 @@ export const ChatRequestServiceTier$outboundSchema = openEnums.outboundSchema(Ch
|
|
|
119
121
|
export const Stop$outboundSchema = z.union([
|
|
120
122
|
z.string(),
|
|
121
123
|
z.array(z.string()),
|
|
122
|
-
z.any(),
|
|
123
124
|
]);
|
|
124
125
|
export function stopToJSON(stop) {
|
|
125
126
|
return JSON.stringify(Stop$outboundSchema.parse(stop));
|
|
@@ -142,6 +143,7 @@ export const ChatRequest$outboundSchema = z.object({
|
|
|
142
143
|
models: z.array(z.string()).optional(),
|
|
143
144
|
parallelToolCalls: z.nullable(z.boolean()).optional(),
|
|
144
145
|
plugins: z.array(z.union([
|
|
146
|
+
AutoBetaRouterPlugin$outboundSchema,
|
|
145
147
|
AutoRouterPlugin$outboundSchema,
|
|
146
148
|
ContextCompressionPlugin$outboundSchema,
|
|
147
149
|
FileParserPlugin$outboundSchema,
|
|
@@ -171,8 +173,7 @@ export const ChatRequest$outboundSchema = z.object({
|
|
|
171
173
|
seed: z.nullable(z.int()).optional(),
|
|
172
174
|
serviceTier: z.nullable(ChatRequestServiceTier$outboundSchema).optional(),
|
|
173
175
|
sessionId: z.string().optional(),
|
|
174
|
-
stop: z.nullable(z.union([z.string(), z.array(z.string())
|
|
175
|
-
.optional(),
|
|
176
|
+
stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
|
|
176
177
|
stopServerToolsWhen: z.array(StopServerToolsWhenCondition$outboundSchema)
|
|
177
178
|
.optional(),
|
|
178
179
|
stream: z.boolean().default(false),
|
|
@@ -14,7 +14,7 @@ export const CompactionItem$outboundSchema = z.object({
|
|
|
14
14
|
encryptedContent: z.string(),
|
|
15
15
|
id: z.nullable(z.string()).optional(),
|
|
16
16
|
type: CompactionItemType$outboundSchema,
|
|
17
|
-
additionalProperties: z.record(z.string(), z.
|
|
17
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
18
18
|
}).transform((v) => {
|
|
19
19
|
return {
|
|
20
20
|
...v.additionalProperties,
|
|
@@ -12,7 +12,7 @@ export type CompoundFilterType = OpenEnum<typeof CompoundFilterType>;
|
|
|
12
12
|
*/
|
|
13
13
|
export type CompoundFilter = {
|
|
14
14
|
filters: Array<{
|
|
15
|
-
[k: string]: any
|
|
15
|
+
[k: string]: any;
|
|
16
16
|
}>;
|
|
17
17
|
type: CompoundFilterType;
|
|
18
18
|
};
|
|
@@ -25,7 +25,7 @@ export declare const CompoundFilter$inboundSchema: z.ZodType<CompoundFilter, unk
|
|
|
25
25
|
/** @internal */
|
|
26
26
|
export type CompoundFilter$Outbound = {
|
|
27
27
|
filters: Array<{
|
|
28
|
-
[k: string]: any
|
|
28
|
+
[k: string]: any;
|
|
29
29
|
}>;
|
|
30
30
|
type: string;
|
|
31
31
|
};
|