@openrouter/sdk 1.2.104 → 1.2.106
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/baseinputsunion.d.ts +3 -2
- package/esm/models/baseinputsunion.js +3 -0
- package/esm/models/bashservertoolconfig.d.ts +1 -1
- package/esm/models/chatsystemmessage.d.ts +22 -0
- package/esm/models/chatsystemmessage.js +14 -0
- package/esm/models/configurationupdateitem.d.ts +37 -0
- package/esm/models/configurationupdateitem.js +33 -0
- package/esm/models/configurationupdatereasoning.d.ts +44 -0
- package/esm/models/configurationupdatereasoning.js +38 -0
- package/esm/models/index.d.ts +6 -0
- package/esm/models/index.js +6 -0
- package/esm/models/inputsunion.d.ts +5 -4
- package/esm/models/inputsunion.js +3 -0
- package/esm/models/mcpcallitem.d.ts +6 -2
- package/esm/models/mcpcallitem.js +2 -1
- package/esm/models/mcphttperror.d.ts +26 -0
- package/esm/models/mcphttperror.js +20 -0
- package/esm/models/mcpprotocolerror.d.ts +26 -0
- package/esm/models/mcpprotocolerror.js +20 -0
- package/esm/models/mcptoolcallerror.d.ts +14 -0
- package/esm/models/mcptoolcallerror.js +19 -0
- package/esm/models/mcptoolexecutionerror.d.ts +24 -0
- package/esm/models/mcptoolexecutionerror.js +19 -0
- package/esm/models/responseserrorfield.d.ts +1 -0
- package/esm/models/responseserrorfield.js +1 -0
- package/esm/models/shellservertoolconfig.d.ts +1 -1
- package/jsr.json +1 -1
- package/package.json +5 -5
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.2.
|
|
53
|
+
readonly sdkVersion: "1.2.106";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.2.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.106 2.914.0 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.2.
|
|
32
|
+
sdkVersion: "1.2.106",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.2.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.2.106 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -4,6 +4,7 @@ import { ClosedEnum } from "../types/enums.js";
|
|
|
4
4
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
5
5
|
import { ApplyPatchCallItem } from "./applypatchcallitem.js";
|
|
6
6
|
import { ApplyPatchCallOutputItem } from "./applypatchcalloutputitem.js";
|
|
7
|
+
import { ConfigurationUpdateItem } from "./configurationupdateitem.js";
|
|
7
8
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
8
9
|
import { InputAudio } from "./inputaudio.js";
|
|
9
10
|
import { InputFile } from "./inputfile.js";
|
|
@@ -60,8 +61,8 @@ export type BaseInputsMessage = {
|
|
|
60
61
|
role: BaseInputsRoleUser | BaseInputsRoleSystem | BaseInputsRoleAssistant | BaseInputsRoleDeveloper;
|
|
61
62
|
type?: BaseInputsType | undefined;
|
|
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 BaseInputsUnion1 = OpenAIResponseFunctionToolCall | OutputMessage | OpenAIResponseCustomToolCall | ApplyPatchCallItem | OpenAIResponseInputMessageItem | OpenAIResponseFunctionToolCallOutput | OutputItemImageGenerationCall | OpenAIResponseCustomToolCallOutput | ApplyPatchCallOutputItem | BaseInputsMessage | ConfigurationUpdateItem;
|
|
65
|
+
export type BaseInputsUnion = string | Array<OpenAIResponseFunctionToolCall | OutputMessage | OpenAIResponseCustomToolCall | ApplyPatchCallItem | OpenAIResponseInputMessageItem | OpenAIResponseFunctionToolCallOutput | OutputItemImageGenerationCall | OpenAIResponseCustomToolCallOutput | ApplyPatchCallOutputItem | BaseInputsMessage | ConfigurationUpdateItem>;
|
|
65
66
|
/** @internal */
|
|
66
67
|
export declare const BaseInputsContent1$inboundSchema: z.ZodType<BaseInputsContent1, unknown>;
|
|
67
68
|
export declare function baseInputsContent1FromJSON(jsonString: string): SafeParseResult<BaseInputsContent1, SDKValidationError>;
|
|
@@ -7,6 +7,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
7
7
|
import { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
8
8
|
import { ApplyPatchCallItem$inboundSchema, } from "./applypatchcallitem.js";
|
|
9
9
|
import { ApplyPatchCallOutputItem$inboundSchema, } from "./applypatchcalloutputitem.js";
|
|
10
|
+
import { ConfigurationUpdateItem$inboundSchema, } from "./configurationupdateitem.js";
|
|
10
11
|
import { InputAudio$inboundSchema } from "./inputaudio.js";
|
|
11
12
|
import { InputFile$inboundSchema } from "./inputfile.js";
|
|
12
13
|
import { InputImage$inboundSchema } from "./inputimage.js";
|
|
@@ -133,6 +134,7 @@ export const BaseInputsUnion1$inboundSchema = z.union([
|
|
|
133
134
|
OpenAIResponseCustomToolCallOutput$inboundSchema,
|
|
134
135
|
ApplyPatchCallOutputItem$inboundSchema,
|
|
135
136
|
z.lazy(() => BaseInputsMessage$inboundSchema),
|
|
137
|
+
ConfigurationUpdateItem$inboundSchema,
|
|
136
138
|
]);
|
|
137
139
|
export function baseInputsUnion1FromJSON(jsonString) {
|
|
138
140
|
return safeParse(jsonString, (x) => BaseInputsUnion1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BaseInputsUnion1' from JSON`);
|
|
@@ -151,6 +153,7 @@ export const BaseInputsUnion$inboundSchema = z.union([
|
|
|
151
153
|
OpenAIResponseCustomToolCallOutput$inboundSchema,
|
|
152
154
|
ApplyPatchCallOutputItem$inboundSchema,
|
|
153
155
|
z.lazy(() => BaseInputsMessage$inboundSchema),
|
|
156
|
+
ConfigurationUpdateItem$inboundSchema,
|
|
154
157
|
])),
|
|
155
158
|
]);
|
|
156
159
|
export function baseInputsUnionFromJSON(jsonString) {
|
|
@@ -14,7 +14,7 @@ export type BashServerToolConfig = {
|
|
|
14
14
|
*/
|
|
15
15
|
environment?: BashServerToolEnvironment | undefined;
|
|
16
16
|
/**
|
|
17
|
-
* How long (in seconds) the container stays warm after its last command before sleeping, freeing its capacity slot. Idle-based: each command renews the timer. Defaults to
|
|
17
|
+
* How long (in seconds) the container stays warm after its last command before sleeping, freeing its capacity slot. Idle-based: each command renews the timer. Defaults to 300 (5 minutes); capped at 14400 (4 hours).
|
|
18
18
|
*/
|
|
19
19
|
sleepAfterSeconds?: number | undefined;
|
|
20
20
|
};
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { ChatContentText, ChatContentText$Outbound } from "./chatcontenttext.js";
|
|
3
|
+
import { ConfigurationUpdateReasoning, ConfigurationUpdateReasoning$Outbound } from "./configurationupdatereasoning.js";
|
|
4
|
+
/**
|
|
5
|
+
* OpenRouter extension. Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. Place it on a content-less system message (`content: ""`) directly before the user message it should apply to, and keep it at that position in later requests. Equivalent to the OpenAI Responses `configuration_update` input item and the Anthropic Messages per-message `output_config.effort`.
|
|
6
|
+
*/
|
|
7
|
+
export type ConfigurationUpdate = {
|
|
8
|
+
/**
|
|
9
|
+
* Reasoning settings applied from this point in the conversation onward
|
|
10
|
+
*/
|
|
11
|
+
reasoning: ConfigurationUpdateReasoning;
|
|
12
|
+
};
|
|
3
13
|
/**
|
|
4
14
|
* System message content
|
|
5
15
|
*/
|
|
@@ -8,6 +18,10 @@ export type ChatSystemMessageContent = string | Array<ChatContentText>;
|
|
|
8
18
|
* System message for setting behavior
|
|
9
19
|
*/
|
|
10
20
|
export type ChatSystemMessage = {
|
|
21
|
+
/**
|
|
22
|
+
* OpenRouter extension. Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. Place it on a content-less system message (`content: ""`) directly before the user message it should apply to, and keep it at that position in later requests. Equivalent to the OpenAI Responses `configuration_update` input item and the Anthropic Messages per-message `output_config.effort`.
|
|
23
|
+
*/
|
|
24
|
+
configurationUpdate?: ConfigurationUpdate | null | undefined;
|
|
11
25
|
/**
|
|
12
26
|
* System message content
|
|
13
27
|
*/
|
|
@@ -19,12 +33,20 @@ export type ChatSystemMessage = {
|
|
|
19
33
|
role: "system";
|
|
20
34
|
};
|
|
21
35
|
/** @internal */
|
|
36
|
+
export type ConfigurationUpdate$Outbound = {
|
|
37
|
+
reasoning: ConfigurationUpdateReasoning$Outbound;
|
|
38
|
+
};
|
|
39
|
+
/** @internal */
|
|
40
|
+
export declare const ConfigurationUpdate$outboundSchema: z.ZodType<ConfigurationUpdate$Outbound, ConfigurationUpdate>;
|
|
41
|
+
export declare function configurationUpdateToJSON(configurationUpdate: ConfigurationUpdate): string;
|
|
42
|
+
/** @internal */
|
|
22
43
|
export type ChatSystemMessageContent$Outbound = string | Array<ChatContentText$Outbound>;
|
|
23
44
|
/** @internal */
|
|
24
45
|
export declare const ChatSystemMessageContent$outboundSchema: z.ZodType<ChatSystemMessageContent$Outbound, ChatSystemMessageContent>;
|
|
25
46
|
export declare function chatSystemMessageContentToJSON(chatSystemMessageContent: ChatSystemMessageContent): string;
|
|
26
47
|
/** @internal */
|
|
27
48
|
export type ChatSystemMessage$Outbound = {
|
|
49
|
+
configuration_update?: ConfigurationUpdate$Outbound | null | undefined;
|
|
28
50
|
content: string | Array<ChatContentText$Outbound>;
|
|
29
51
|
name?: string | undefined;
|
|
30
52
|
role: "system";
|
|
@@ -3,7 +3,16 @@
|
|
|
3
3
|
* @generated-id: e404d41c140a
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
7
|
import { ChatContentText$outboundSchema, } from "./chatcontenttext.js";
|
|
8
|
+
import { ConfigurationUpdateReasoning$outboundSchema, } from "./configurationupdatereasoning.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const ConfigurationUpdate$outboundSchema = z.object({
|
|
11
|
+
reasoning: ConfigurationUpdateReasoning$outboundSchema,
|
|
12
|
+
});
|
|
13
|
+
export function configurationUpdateToJSON(configurationUpdate) {
|
|
14
|
+
return JSON.stringify(ConfigurationUpdate$outboundSchema.parse(configurationUpdate));
|
|
15
|
+
}
|
|
7
16
|
/** @internal */
|
|
8
17
|
export const ChatSystemMessageContent$outboundSchema = z.union([z.string(), z.array(ChatContentText$outboundSchema)]);
|
|
9
18
|
export function chatSystemMessageContentToJSON(chatSystemMessageContent) {
|
|
@@ -11,9 +20,14 @@ export function chatSystemMessageContentToJSON(chatSystemMessageContent) {
|
|
|
11
20
|
}
|
|
12
21
|
/** @internal */
|
|
13
22
|
export const ChatSystemMessage$outboundSchema = z.object({
|
|
23
|
+
configurationUpdate: z.nullable(z.lazy(() => ConfigurationUpdate$outboundSchema)).optional(),
|
|
14
24
|
content: z.union([z.string(), z.array(ChatContentText$outboundSchema)]),
|
|
15
25
|
name: z.string().optional(),
|
|
16
26
|
role: z.literal("system"),
|
|
27
|
+
}).transform((v) => {
|
|
28
|
+
return remap$(v, {
|
|
29
|
+
configurationUpdate: "configuration_update",
|
|
30
|
+
});
|
|
17
31
|
});
|
|
18
32
|
export function chatSystemMessageToJSON(chatSystemMessage) {
|
|
19
33
|
return JSON.stringify(ChatSystemMessage$outboundSchema.parse(chatSystemMessage));
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { ConfigurationUpdateReasoning, ConfigurationUpdateReasoning$Outbound } from "./configurationupdatereasoning.js";
|
|
5
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
6
|
+
export declare const ConfigurationUpdateItemType: {
|
|
7
|
+
readonly ConfigurationUpdate: "configuration_update";
|
|
8
|
+
};
|
|
9
|
+
export type ConfigurationUpdateItemType = ClosedEnum<typeof ConfigurationUpdateItemType>;
|
|
10
|
+
/**
|
|
11
|
+
* Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding items. Place it before the user message it should apply to; it stays in effect until another configuration update. Two adjacent configuration updates are rejected. Only supported by models that accept mid-conversation effort changes.
|
|
12
|
+
*/
|
|
13
|
+
export type ConfigurationUpdateItem = {
|
|
14
|
+
id?: string | null | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Reasoning settings applied from this point in the conversation onward
|
|
17
|
+
*/
|
|
18
|
+
reasoning: ConfigurationUpdateReasoning;
|
|
19
|
+
type: ConfigurationUpdateItemType;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const ConfigurationUpdateItemType$inboundSchema: z.ZodEnum<typeof ConfigurationUpdateItemType>;
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare const ConfigurationUpdateItemType$outboundSchema: z.ZodEnum<typeof ConfigurationUpdateItemType>;
|
|
25
|
+
/** @internal */
|
|
26
|
+
export declare const ConfigurationUpdateItem$inboundSchema: z.ZodType<ConfigurationUpdateItem, unknown>;
|
|
27
|
+
/** @internal */
|
|
28
|
+
export type ConfigurationUpdateItem$Outbound = {
|
|
29
|
+
id?: string | null | undefined;
|
|
30
|
+
reasoning: ConfigurationUpdateReasoning$Outbound;
|
|
31
|
+
type: string;
|
|
32
|
+
};
|
|
33
|
+
/** @internal */
|
|
34
|
+
export declare const ConfigurationUpdateItem$outboundSchema: z.ZodType<ConfigurationUpdateItem$Outbound, ConfigurationUpdateItem>;
|
|
35
|
+
export declare function configurationUpdateItemToJSON(configurationUpdateItem: ConfigurationUpdateItem): string;
|
|
36
|
+
export declare function configurationUpdateItemFromJSON(jsonString: string): SafeParseResult<ConfigurationUpdateItem, SDKValidationError>;
|
|
37
|
+
//# sourceMappingURL=configurationupdateitem.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 8ced38e347e1
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ConfigurationUpdateReasoning$inboundSchema, ConfigurationUpdateReasoning$outboundSchema, } from "./configurationupdatereasoning.js";
|
|
8
|
+
export const ConfigurationUpdateItemType = {
|
|
9
|
+
ConfigurationUpdate: "configuration_update",
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const ConfigurationUpdateItemType$inboundSchema = z.enum(ConfigurationUpdateItemType);
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const ConfigurationUpdateItemType$outboundSchema = ConfigurationUpdateItemType$inboundSchema;
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const ConfigurationUpdateItem$inboundSchema = z.object({
|
|
17
|
+
id: z.nullable(z.string()).optional(),
|
|
18
|
+
reasoning: ConfigurationUpdateReasoning$inboundSchema,
|
|
19
|
+
type: ConfigurationUpdateItemType$inboundSchema,
|
|
20
|
+
});
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const ConfigurationUpdateItem$outboundSchema = z.object({
|
|
23
|
+
id: z.nullable(z.string()).optional(),
|
|
24
|
+
reasoning: ConfigurationUpdateReasoning$outboundSchema,
|
|
25
|
+
type: ConfigurationUpdateItemType$outboundSchema,
|
|
26
|
+
});
|
|
27
|
+
export function configurationUpdateItemToJSON(configurationUpdateItem) {
|
|
28
|
+
return JSON.stringify(ConfigurationUpdateItem$outboundSchema.parse(configurationUpdateItem));
|
|
29
|
+
}
|
|
30
|
+
export function configurationUpdateItemFromJSON(jsonString) {
|
|
31
|
+
return safeParse(jsonString, (x) => ConfigurationUpdateItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ConfigurationUpdateItem' from JSON`);
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=configurationupdateitem.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
/**
|
|
6
|
+
* Reasoning effort to apply from this point in the conversation onward
|
|
7
|
+
*/
|
|
8
|
+
export declare const ConfigurationUpdateReasoningEffort: {
|
|
9
|
+
readonly Max: "max";
|
|
10
|
+
readonly Xhigh: "xhigh";
|
|
11
|
+
readonly High: "high";
|
|
12
|
+
readonly Medium: "medium";
|
|
13
|
+
readonly Low: "low";
|
|
14
|
+
readonly Minimal: "minimal";
|
|
15
|
+
readonly None: "none";
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Reasoning effort to apply from this point in the conversation onward
|
|
19
|
+
*/
|
|
20
|
+
export type ConfigurationUpdateReasoningEffort = OpenEnum<typeof ConfigurationUpdateReasoningEffort>;
|
|
21
|
+
/**
|
|
22
|
+
* Reasoning settings applied from this point in the conversation onward
|
|
23
|
+
*/
|
|
24
|
+
export type ConfigurationUpdateReasoning = {
|
|
25
|
+
/**
|
|
26
|
+
* Reasoning effort to apply from this point in the conversation onward
|
|
27
|
+
*/
|
|
28
|
+
effort: ConfigurationUpdateReasoningEffort;
|
|
29
|
+
};
|
|
30
|
+
/** @internal */
|
|
31
|
+
export declare const ConfigurationUpdateReasoningEffort$inboundSchema: z.ZodType<ConfigurationUpdateReasoningEffort, unknown>;
|
|
32
|
+
/** @internal */
|
|
33
|
+
export declare const ConfigurationUpdateReasoningEffort$outboundSchema: z.ZodType<string, ConfigurationUpdateReasoningEffort>;
|
|
34
|
+
/** @internal */
|
|
35
|
+
export declare const ConfigurationUpdateReasoning$inboundSchema: z.ZodType<ConfigurationUpdateReasoning, unknown>;
|
|
36
|
+
/** @internal */
|
|
37
|
+
export type ConfigurationUpdateReasoning$Outbound = {
|
|
38
|
+
effort: string;
|
|
39
|
+
};
|
|
40
|
+
/** @internal */
|
|
41
|
+
export declare const ConfigurationUpdateReasoning$outboundSchema: z.ZodType<ConfigurationUpdateReasoning$Outbound, ConfigurationUpdateReasoning>;
|
|
42
|
+
export declare function configurationUpdateReasoningToJSON(configurationUpdateReasoning: ConfigurationUpdateReasoning): string;
|
|
43
|
+
export declare function configurationUpdateReasoningFromJSON(jsonString: string): SafeParseResult<ConfigurationUpdateReasoning, SDKValidationError>;
|
|
44
|
+
//# sourceMappingURL=configurationupdatereasoning.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 616a3d75a2d0
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
/**
|
|
9
|
+
* Reasoning effort to apply from this point in the conversation onward
|
|
10
|
+
*/
|
|
11
|
+
export const ConfigurationUpdateReasoningEffort = {
|
|
12
|
+
Max: "max",
|
|
13
|
+
Xhigh: "xhigh",
|
|
14
|
+
High: "high",
|
|
15
|
+
Medium: "medium",
|
|
16
|
+
Low: "low",
|
|
17
|
+
Minimal: "minimal",
|
|
18
|
+
None: "none",
|
|
19
|
+
};
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const ConfigurationUpdateReasoningEffort$inboundSchema = openEnums.inboundSchema(ConfigurationUpdateReasoningEffort);
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const ConfigurationUpdateReasoningEffort$outboundSchema = openEnums.outboundSchema(ConfigurationUpdateReasoningEffort);
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const ConfigurationUpdateReasoning$inboundSchema = z.object({
|
|
26
|
+
effort: ConfigurationUpdateReasoningEffort$inboundSchema,
|
|
27
|
+
});
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const ConfigurationUpdateReasoning$outboundSchema = z.object({
|
|
30
|
+
effort: ConfigurationUpdateReasoningEffort$outboundSchema,
|
|
31
|
+
});
|
|
32
|
+
export function configurationUpdateReasoningToJSON(configurationUpdateReasoning) {
|
|
33
|
+
return JSON.stringify(ConfigurationUpdateReasoning$outboundSchema.parse(configurationUpdateReasoning));
|
|
34
|
+
}
|
|
35
|
+
export function configurationUpdateReasoningFromJSON(jsonString) {
|
|
36
|
+
return safeParse(jsonString, (x) => ConfigurationUpdateReasoning$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ConfigurationUpdateReasoning' from JSON`);
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=configurationupdatereasoning.js.map
|
package/esm/models/index.d.ts
CHANGED
|
@@ -150,6 +150,8 @@ export * from "./codexlocalshelltool.js";
|
|
|
150
150
|
export * from "./compactionitem.js";
|
|
151
151
|
export * from "./compoundfilter.js";
|
|
152
152
|
export * from "./computeruseservertool.js";
|
|
153
|
+
export * from "./configurationupdateitem.js";
|
|
154
|
+
export * from "./configurationupdatereasoning.js";
|
|
153
155
|
export * from "./conflictresponseerrordata.js";
|
|
154
156
|
export * from "./containerautoenvironment.js";
|
|
155
157
|
export * from "./containerfile.js";
|
|
@@ -323,8 +325,12 @@ export * from "./localshellcalloutputitem.js";
|
|
|
323
325
|
export * from "./mcpapprovalrequestitem.js";
|
|
324
326
|
export * from "./mcpapprovalresponseitem.js";
|
|
325
327
|
export * from "./mcpcallitem.js";
|
|
328
|
+
export * from "./mcphttperror.js";
|
|
326
329
|
export * from "./mcplisttoolsitem.js";
|
|
330
|
+
export * from "./mcpprotocolerror.js";
|
|
327
331
|
export * from "./mcpservertool.js";
|
|
332
|
+
export * from "./mcptoolcallerror.js";
|
|
333
|
+
export * from "./mcptoolexecutionerror.js";
|
|
328
334
|
export * from "./memberassignment.js";
|
|
329
335
|
export * from "./messagesadvisortoolresultblock.js";
|
|
330
336
|
export * from "./messagesbashtoolresultblock.js";
|
package/esm/models/index.js
CHANGED
|
@@ -154,6 +154,8 @@ export * from "./codexlocalshelltool.js";
|
|
|
154
154
|
export * from "./compactionitem.js";
|
|
155
155
|
export * from "./compoundfilter.js";
|
|
156
156
|
export * from "./computeruseservertool.js";
|
|
157
|
+
export * from "./configurationupdateitem.js";
|
|
158
|
+
export * from "./configurationupdatereasoning.js";
|
|
157
159
|
export * from "./conflictresponseerrordata.js";
|
|
158
160
|
export * from "./containerautoenvironment.js";
|
|
159
161
|
export * from "./containerfile.js";
|
|
@@ -327,8 +329,12 @@ export * from "./localshellcalloutputitem.js";
|
|
|
327
329
|
export * from "./mcpapprovalrequestitem.js";
|
|
328
330
|
export * from "./mcpapprovalresponseitem.js";
|
|
329
331
|
export * from "./mcpcallitem.js";
|
|
332
|
+
export * from "./mcphttperror.js";
|
|
330
333
|
export * from "./mcplisttoolsitem.js";
|
|
334
|
+
export * from "./mcpprotocolerror.js";
|
|
331
335
|
export * from "./mcpservertool.js";
|
|
336
|
+
export * from "./mcptoolcallerror.js";
|
|
337
|
+
export * from "./mcptoolexecutionerror.js";
|
|
332
338
|
export * from "./memberassignment.js";
|
|
333
339
|
export * from "./messagesadvisortoolresultblock.js";
|
|
334
340
|
export * from "./messagesbashtoolresultblock.js";
|
|
@@ -5,6 +5,7 @@ import { AgentMessageItem, AgentMessageItem$Outbound } from "./agentmessageitem.
|
|
|
5
5
|
import { ApplyPatchCallItem, ApplyPatchCallItem$Outbound } from "./applypatchcallitem.js";
|
|
6
6
|
import { ApplyPatchCallOutputItem, ApplyPatchCallOutputItem$Outbound } from "./applypatchcalloutputitem.js";
|
|
7
7
|
import { CompactionItem, CompactionItem$Outbound } from "./compactionitem.js";
|
|
8
|
+
import { ConfigurationUpdateItem, ConfigurationUpdateItem$Outbound } from "./configurationupdateitem.js";
|
|
8
9
|
import { ContextCompactionItem, ContextCompactionItem$Outbound } from "./contextcompactionitem.js";
|
|
9
10
|
import { CustomToolCallItem, CustomToolCallItem$Outbound } from "./customtoolcallitem.js";
|
|
10
11
|
import { CustomToolCallOutputItem, CustomToolCallOutputItem$Outbound } from "./customtoolcalloutputitem.js";
|
|
@@ -135,11 +136,11 @@ export type InputsMessage = {
|
|
|
135
136
|
status?: InputsStatusCompleted1 | InputsStatusIncomplete1 | InputsStatusInProgress1 | undefined;
|
|
136
137
|
type?: InputsTypeMessage | undefined;
|
|
137
138
|
};
|
|
138
|
-
export type InputsUnion1 = FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | OutputShellServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem | ContextCompactionItem;
|
|
139
|
+
export type InputsUnion1 = FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | OutputShellServerToolItem | CompactionItem | ItemReferenceItem | ConfigurationUpdateItem | EasyInputMessage | InputMessageItem | ContextCompactionItem;
|
|
139
140
|
/**
|
|
140
141
|
* Input for a response request - can be a string or array of items
|
|
141
142
|
*/
|
|
142
|
-
export type InputsUnion = string | Array<FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | OutputShellServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem | ContextCompactionItem>;
|
|
143
|
+
export type InputsUnion = string | Array<FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | OutputShellServerToolItem | CompactionItem | ItemReferenceItem | ConfigurationUpdateItem | EasyInputMessage | InputMessageItem | ContextCompactionItem>;
|
|
143
144
|
/** @internal */
|
|
144
145
|
export declare const InputsStatusInProgress2$outboundSchema: z.ZodEnum<typeof InputsStatusInProgress2>;
|
|
145
146
|
/** @internal */
|
|
@@ -214,12 +215,12 @@ export type InputsMessage$Outbound = {
|
|
|
214
215
|
export declare const InputsMessage$outboundSchema: z.ZodType<InputsMessage$Outbound, InputsMessage>;
|
|
215
216
|
export declare function inputsMessageToJSON(inputsMessage: InputsMessage): string;
|
|
216
217
|
/** @internal */
|
|
217
|
-
export type InputsUnion1$Outbound = FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsMessage$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | OutputCodeInterpreterCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | OutputShellServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | ContextCompactionItem$Outbound;
|
|
218
|
+
export type InputsUnion1$Outbound = FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsMessage$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | OutputCodeInterpreterCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | OutputShellServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | ConfigurationUpdateItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | ContextCompactionItem$Outbound;
|
|
218
219
|
/** @internal */
|
|
219
220
|
export declare const InputsUnion1$outboundSchema: z.ZodType<InputsUnion1$Outbound, InputsUnion1>;
|
|
220
221
|
export declare function inputsUnion1ToJSON(inputsUnion1: InputsUnion1): string;
|
|
221
222
|
/** @internal */
|
|
222
|
-
export type InputsUnion$Outbound = string | Array<FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsMessage$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | OutputCodeInterpreterCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | OutputShellServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | ContextCompactionItem$Outbound>;
|
|
223
|
+
export type InputsUnion$Outbound = string | Array<FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsMessage$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | OutputCodeInterpreterCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | OutputShellServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | ConfigurationUpdateItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | ContextCompactionItem$Outbound>;
|
|
223
224
|
/** @internal */
|
|
224
225
|
export declare const InputsUnion$outboundSchema: z.ZodType<InputsUnion$Outbound, InputsUnion>;
|
|
225
226
|
export declare function inputsUnionToJSON(inputsUnion: InputsUnion): string;
|
|
@@ -9,6 +9,7 @@ import { AgentMessageItem$outboundSchema, } from "./agentmessageitem.js";
|
|
|
9
9
|
import { ApplyPatchCallItem$outboundSchema, } from "./applypatchcallitem.js";
|
|
10
10
|
import { ApplyPatchCallOutputItem$outboundSchema, } from "./applypatchcalloutputitem.js";
|
|
11
11
|
import { CompactionItem$outboundSchema, } from "./compactionitem.js";
|
|
12
|
+
import { ConfigurationUpdateItem$outboundSchema, } from "./configurationupdateitem.js";
|
|
12
13
|
import { ContextCompactionItem$outboundSchema, } from "./contextcompactionitem.js";
|
|
13
14
|
import { CustomToolCallItem$outboundSchema, } from "./customtoolcallitem.js";
|
|
14
15
|
import { CustomToolCallOutputItem$outboundSchema, } from "./customtoolcalloutputitem.js";
|
|
@@ -253,6 +254,7 @@ export const InputsUnion1$outboundSchema = z.union([
|
|
|
253
254
|
OutputShellServerToolItem$outboundSchema,
|
|
254
255
|
CompactionItem$outboundSchema,
|
|
255
256
|
ItemReferenceItem$outboundSchema,
|
|
257
|
+
ConfigurationUpdateItem$outboundSchema,
|
|
256
258
|
EasyInputMessage$outboundSchema,
|
|
257
259
|
InputMessageItem$outboundSchema,
|
|
258
260
|
ContextCompactionItem$outboundSchema,
|
|
@@ -311,6 +313,7 @@ export const InputsUnion$outboundSchema = z.union([
|
|
|
311
313
|
OutputShellServerToolItem$outboundSchema,
|
|
312
314
|
CompactionItem$outboundSchema,
|
|
313
315
|
ItemReferenceItem$outboundSchema,
|
|
316
|
+
ConfigurationUpdateItem$outboundSchema,
|
|
314
317
|
EasyInputMessage$outboundSchema,
|
|
315
318
|
InputMessageItem$outboundSchema,
|
|
316
319
|
ContextCompactionItem$outboundSchema,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { McpToolCallError, McpToolCallError$Outbound } from "./mcptoolcallerror.js";
|
|
3
4
|
export declare const McpCallItemType: {
|
|
4
5
|
readonly McpCall: "mcp_call";
|
|
5
6
|
};
|
|
@@ -9,7 +10,10 @@ export type McpCallItemType = ClosedEnum<typeof McpCallItemType>;
|
|
|
9
10
|
*/
|
|
10
11
|
export type McpCallItem = {
|
|
11
12
|
arguments: string;
|
|
12
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Error from an MCP tool call, either a plain message or a structured error
|
|
15
|
+
*/
|
|
16
|
+
error?: McpToolCallError | null | undefined;
|
|
13
17
|
id: string;
|
|
14
18
|
name: string;
|
|
15
19
|
output?: string | null | undefined;
|
|
@@ -21,7 +25,7 @@ export declare const McpCallItemType$outboundSchema: z.ZodEnum<typeof McpCallIte
|
|
|
21
25
|
/** @internal */
|
|
22
26
|
export type McpCallItem$Outbound = {
|
|
23
27
|
arguments: string;
|
|
24
|
-
error?:
|
|
28
|
+
error?: McpToolCallError$Outbound | null | undefined;
|
|
25
29
|
id: string;
|
|
26
30
|
name: string;
|
|
27
31
|
output?: string | null | undefined;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { McpToolCallError$outboundSchema, } from "./mcptoolcallerror.js";
|
|
7
8
|
export const McpCallItemType = {
|
|
8
9
|
McpCall: "mcp_call",
|
|
9
10
|
};
|
|
@@ -12,7 +13,7 @@ export const McpCallItemType$outboundSchema = z.enum(McpCallItemType);
|
|
|
12
13
|
/** @internal */
|
|
13
14
|
export const McpCallItem$outboundSchema = z.object({
|
|
14
15
|
arguments: z.string(),
|
|
15
|
-
error: z.nullable(
|
|
16
|
+
error: z.nullable(McpToolCallError$outboundSchema).optional(),
|
|
16
17
|
id: z.string(),
|
|
17
18
|
name: z.string(),
|
|
18
19
|
output: z.nullable(z.string()).optional(),
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
export declare const McpHttpErrorType: {
|
|
4
|
+
readonly HttpError: "http_error";
|
|
5
|
+
};
|
|
6
|
+
export type McpHttpErrorType = ClosedEnum<typeof McpHttpErrorType>;
|
|
7
|
+
/**
|
|
8
|
+
* The MCP server request failed at the HTTP layer
|
|
9
|
+
*/
|
|
10
|
+
export type McpHttpError = {
|
|
11
|
+
code: number;
|
|
12
|
+
message: string;
|
|
13
|
+
type: McpHttpErrorType;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const McpHttpErrorType$outboundSchema: z.ZodEnum<typeof McpHttpErrorType>;
|
|
17
|
+
/** @internal */
|
|
18
|
+
export type McpHttpError$Outbound = {
|
|
19
|
+
code: number;
|
|
20
|
+
message: string;
|
|
21
|
+
type: string;
|
|
22
|
+
};
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare const McpHttpError$outboundSchema: z.ZodType<McpHttpError$Outbound, McpHttpError>;
|
|
25
|
+
export declare function mcpHttpErrorToJSON(mcpHttpError: McpHttpError): string;
|
|
26
|
+
//# sourceMappingURL=mcphttperror.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: afc8132b7d81
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
export const McpHttpErrorType = {
|
|
7
|
+
HttpError: "http_error",
|
|
8
|
+
};
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const McpHttpErrorType$outboundSchema = z.enum(McpHttpErrorType);
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const McpHttpError$outboundSchema = z.object({
|
|
13
|
+
code: z.int(),
|
|
14
|
+
message: z.string(),
|
|
15
|
+
type: McpHttpErrorType$outboundSchema,
|
|
16
|
+
});
|
|
17
|
+
export function mcpHttpErrorToJSON(mcpHttpError) {
|
|
18
|
+
return JSON.stringify(McpHttpError$outboundSchema.parse(mcpHttpError));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=mcphttperror.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
export declare const McpProtocolErrorType: {
|
|
4
|
+
readonly McpProtocolError: "mcp_protocol_error";
|
|
5
|
+
};
|
|
6
|
+
export type McpProtocolErrorType = ClosedEnum<typeof McpProtocolErrorType>;
|
|
7
|
+
/**
|
|
8
|
+
* The MCP server returned a protocol-level error
|
|
9
|
+
*/
|
|
10
|
+
export type McpProtocolError = {
|
|
11
|
+
code: number;
|
|
12
|
+
message: string;
|
|
13
|
+
type: McpProtocolErrorType;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const McpProtocolErrorType$outboundSchema: z.ZodEnum<typeof McpProtocolErrorType>;
|
|
17
|
+
/** @internal */
|
|
18
|
+
export type McpProtocolError$Outbound = {
|
|
19
|
+
code: number;
|
|
20
|
+
message: string;
|
|
21
|
+
type: string;
|
|
22
|
+
};
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare const McpProtocolError$outboundSchema: z.ZodType<McpProtocolError$Outbound, McpProtocolError>;
|
|
25
|
+
export declare function mcpProtocolErrorToJSON(mcpProtocolError: McpProtocolError): string;
|
|
26
|
+
//# sourceMappingURL=mcpprotocolerror.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: b13cde8f9b88
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
export const McpProtocolErrorType = {
|
|
7
|
+
McpProtocolError: "mcp_protocol_error",
|
|
8
|
+
};
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const McpProtocolErrorType$outboundSchema = z.enum(McpProtocolErrorType);
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const McpProtocolError$outboundSchema = z.object({
|
|
13
|
+
code: z.int(),
|
|
14
|
+
message: z.string(),
|
|
15
|
+
type: McpProtocolErrorType$outboundSchema,
|
|
16
|
+
});
|
|
17
|
+
export function mcpProtocolErrorToJSON(mcpProtocolError) {
|
|
18
|
+
return JSON.stringify(McpProtocolError$outboundSchema.parse(mcpProtocolError));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=mcpprotocolerror.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { McpHttpError, McpHttpError$Outbound } from "./mcphttperror.js";
|
|
3
|
+
import { McpProtocolError, McpProtocolError$Outbound } from "./mcpprotocolerror.js";
|
|
4
|
+
import { McpToolExecutionError, McpToolExecutionError$Outbound } from "./mcptoolexecutionerror.js";
|
|
5
|
+
/**
|
|
6
|
+
* Error from an MCP tool call, either a plain message or a structured error
|
|
7
|
+
*/
|
|
8
|
+
export type McpToolCallError = McpProtocolError | McpHttpError | McpToolExecutionError | string;
|
|
9
|
+
/** @internal */
|
|
10
|
+
export type McpToolCallError$Outbound = McpProtocolError$Outbound | McpHttpError$Outbound | McpToolExecutionError$Outbound | string;
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const McpToolCallError$outboundSchema: z.ZodType<McpToolCallError$Outbound, McpToolCallError>;
|
|
13
|
+
export declare function mcpToolCallErrorToJSON(mcpToolCallError: McpToolCallError): string;
|
|
14
|
+
//# sourceMappingURL=mcptoolcallerror.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: ce8691448f5c
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { McpHttpError$outboundSchema, } from "./mcphttperror.js";
|
|
7
|
+
import { McpProtocolError$outboundSchema, } from "./mcpprotocolerror.js";
|
|
8
|
+
import { McpToolExecutionError$outboundSchema, } from "./mcptoolexecutionerror.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const McpToolCallError$outboundSchema = z.union([
|
|
11
|
+
McpProtocolError$outboundSchema,
|
|
12
|
+
McpHttpError$outboundSchema,
|
|
13
|
+
McpToolExecutionError$outboundSchema,
|
|
14
|
+
z.string(),
|
|
15
|
+
]);
|
|
16
|
+
export function mcpToolCallErrorToJSON(mcpToolCallError) {
|
|
17
|
+
return JSON.stringify(McpToolCallError$outboundSchema.parse(mcpToolCallError));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=mcptoolcallerror.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
export declare const McpToolExecutionErrorType: {
|
|
4
|
+
readonly McpToolExecutionError: "mcp_tool_execution_error";
|
|
5
|
+
};
|
|
6
|
+
export type McpToolExecutionErrorType = ClosedEnum<typeof McpToolExecutionErrorType>;
|
|
7
|
+
/**
|
|
8
|
+
* The MCP tool ran but reported a failure
|
|
9
|
+
*/
|
|
10
|
+
export type McpToolExecutionError = {
|
|
11
|
+
content?: any | undefined;
|
|
12
|
+
type: McpToolExecutionErrorType;
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const McpToolExecutionErrorType$outboundSchema: z.ZodEnum<typeof McpToolExecutionErrorType>;
|
|
16
|
+
/** @internal */
|
|
17
|
+
export type McpToolExecutionError$Outbound = {
|
|
18
|
+
content?: any | undefined;
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const McpToolExecutionError$outboundSchema: z.ZodType<McpToolExecutionError$Outbound, McpToolExecutionError>;
|
|
23
|
+
export declare function mcpToolExecutionErrorToJSON(mcpToolExecutionError: McpToolExecutionError): string;
|
|
24
|
+
//# sourceMappingURL=mcptoolexecutionerror.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 0e07ebbb9169
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
export const McpToolExecutionErrorType = {
|
|
7
|
+
McpToolExecutionError: "mcp_tool_execution_error",
|
|
8
|
+
};
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const McpToolExecutionErrorType$outboundSchema = z.enum(McpToolExecutionErrorType);
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const McpToolExecutionError$outboundSchema = z.object({
|
|
13
|
+
content: z.any().optional(),
|
|
14
|
+
type: McpToolExecutionErrorType$outboundSchema,
|
|
15
|
+
});
|
|
16
|
+
export function mcpToolExecutionErrorToJSON(mcpToolExecutionError) {
|
|
17
|
+
return JSON.stringify(McpToolExecutionError$outboundSchema.parse(mcpToolExecutionError));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=mcptoolexecutionerror.js.map
|
|
@@ -22,6 +22,7 @@ export declare const Code: {
|
|
|
22
22
|
readonly FailedToDownloadImage: "failed_to_download_image";
|
|
23
23
|
readonly ImageFileNotFound: "image_file_not_found";
|
|
24
24
|
readonly BioPolicy: "bio_policy";
|
|
25
|
+
readonly MisalignmentPolicyViolation: "misalignment_policy_violation";
|
|
25
26
|
readonly DataResidencyMismatch: "data_residency_mismatch";
|
|
26
27
|
};
|
|
27
28
|
export type Code = OpenEnum<typeof Code>;
|
|
@@ -25,6 +25,7 @@ export const Code = {
|
|
|
25
25
|
FailedToDownloadImage: "failed_to_download_image",
|
|
26
26
|
ImageFileNotFound: "image_file_not_found",
|
|
27
27
|
BioPolicy: "bio_policy",
|
|
28
|
+
MisalignmentPolicyViolation: "misalignment_policy_violation",
|
|
28
29
|
DataResidencyMismatch: "data_residency_mismatch",
|
|
29
30
|
};
|
|
30
31
|
/** @internal */
|
|
@@ -14,7 +14,7 @@ export type ShellServerToolConfig = {
|
|
|
14
14
|
*/
|
|
15
15
|
environment?: ShellServerToolEnvironment | undefined;
|
|
16
16
|
/**
|
|
17
|
-
* How long (in seconds) the container stays warm after its last command before sleeping, freeing its capacity slot. Idle-based: each command renews the timer. Defaults to
|
|
17
|
+
* How long (in seconds) the container stays warm after its last command before sleeping, freeing its capacity slot. Idle-based: each command renews the timer. Defaults to 300 (5 minutes); capped at 14400 (4 hours).
|
|
18
18
|
*/
|
|
19
19
|
sleepAfterSeconds?: number | undefined;
|
|
20
20
|
};
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.106",
|
|
4
4
|
"author": "OpenRouter",
|
|
5
5
|
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.",
|
|
6
6
|
"keywords": [
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
74
74
|
"build": "tsc",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
+
"typecheck": "tsc --noEmit",
|
|
77
|
+
"typecheck:transit": "exit 0",
|
|
76
78
|
"compile": "tsc",
|
|
77
79
|
"postinstall": "node scripts/check-types.js || true",
|
|
80
|
+
"prepare": "npm run build",
|
|
78
81
|
"test": "vitest --run --project unit",
|
|
79
82
|
"test:e2e": "vitest --run --project e2e",
|
|
80
|
-
"prepare": "npm run build",
|
|
81
83
|
"test:transit": "exit 0",
|
|
82
|
-
"test:watch": "vitest --watch --project unit"
|
|
83
|
-
"typecheck": "tsc --noEmit",
|
|
84
|
-
"typecheck:transit": "exit 0"
|
|
84
|
+
"test:watch": "vitest --watch --project unit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|