@opencode-ai/ai 0.0.0-next-16255 → 0.0.0-next-16273
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/dist/llm.d.ts +60 -60
- package/dist/protocols/anthropic-messages.d.ts +303 -303
- package/dist/protocols/anthropic-messages.js +1 -0
- package/dist/protocols/bedrock-converse.d.ts +246 -242
- package/dist/protocols/gemini.d.ts +136 -132
- package/dist/protocols/gemini.js +1 -0
- package/dist/protocols/open-responses.d.ts +232 -232
- package/dist/protocols/openai-chat.d.ts +147 -141
- package/dist/protocols/openai-chat.js +1 -0
- package/dist/protocols/openai-compatible-chat.d.ts +48 -46
- package/dist/protocols/openai-compatible-responses.d.ts +56 -56
- package/dist/protocols/openai-responses.d.ts +388 -388
- package/dist/protocols/shared.d.ts +5 -4
- package/dist/protocols/shared.js +1 -0
- package/dist/protocols/utils/bedrock-media.d.ts +10 -10
- package/dist/protocols/utils/tool-stream.d.ts +180 -180
- package/dist/providers/amazon-bedrock.d.ts +109 -107
- package/dist/providers/anthropic-compatible.d.ts +145 -145
- package/dist/providers/anthropic.d.ts +145 -145
- package/dist/providers/azure.d.ts +112 -110
- package/dist/providers/cloudflare.d.ts +144 -138
- package/dist/providers/github-copilot.d.ts +112 -110
- package/dist/providers/google-vertex-chat.d.ts +48 -46
- package/dist/providers/google-vertex-messages.d.ts +145 -146
- package/dist/providers/google-vertex-responses.d.ts +56 -56
- package/dist/providers/google-vertex.d.ts +52 -50
- package/dist/providers/google.d.ts +52 -50
- package/dist/providers/openai-compatible-responses.d.ts +56 -56
- package/dist/providers/openai-compatible.d.ts +48 -46
- package/dist/providers/openai.d.ts +176 -174
- package/dist/providers/openrouter.d.ts +147 -141
- package/dist/providers/xai.d.ts +112 -110
- package/dist/route/client.d.ts +60 -60
- package/dist/schema/errors.d.ts +2 -6
- package/dist/schema/errors.js +2 -5
- package/dist/schema/events.d.ts +1117 -1115
- package/dist/schema/messages.d.ts +9 -9
- package/dist/schema/messages.js +3 -4
- package/dist/tool-runtime.js +1 -1
- package/dist/tool.d.ts +5 -4
- package/dist/tool.js +1 -0
- package/package.json +5 -5
|
@@ -8,139 +8,139 @@ export type AnthropicProviderOptionsInput = AnthropicMessages.ProviderOptionsInp
|
|
|
8
8
|
export type AnthropicThinkingInput = AnthropicMessages.ThinkingInput;
|
|
9
9
|
export declare const id: string & import("effect/Brand").Brand<"LLM.ProviderID">;
|
|
10
10
|
export declare const routes: import("../route").Route<{
|
|
11
|
-
readonly messages: readonly (import("effect/Schema").Struct.ReadonlySide<{
|
|
12
|
-
readonly role: import("effect/Schema").Literal<"user">;
|
|
13
|
-
readonly content: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
14
|
-
readonly type: import("effect/Schema").tag<"text">;
|
|
15
|
-
readonly text: import("effect/Schema").String;
|
|
16
|
-
readonly cache_control: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
17
|
-
readonly type: import("effect/Schema").tag<"ephemeral">;
|
|
18
|
-
readonly ttl: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["5m", "1h"]>>;
|
|
19
|
-
}>>;
|
|
20
|
-
}>, import("effect/Schema").Struct<{
|
|
21
|
-
readonly type: import("effect/Schema").tag<"image">;
|
|
22
|
-
readonly source: import("effect/Schema").Struct<{
|
|
23
|
-
readonly type: import("effect/Schema").tag<"base64">;
|
|
24
|
-
readonly media_type: import("effect/Schema").String;
|
|
25
|
-
readonly data: import("effect/Schema").String;
|
|
26
|
-
}>;
|
|
27
|
-
readonly cache_control: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
28
|
-
readonly type: import("effect/Schema").tag<"ephemeral">;
|
|
29
|
-
readonly ttl: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["5m", "1h"]>>;
|
|
30
|
-
}>>;
|
|
31
|
-
}>, import("effect/Schema").Struct<{
|
|
32
|
-
readonly type: import("effect/Schema").tag<"document">;
|
|
33
|
-
readonly source: import("effect/Schema").Struct<{
|
|
34
|
-
readonly type: import("effect/Schema").tag<"base64">;
|
|
35
|
-
readonly media_type: import("effect/Schema").Literal<"application/pdf">;
|
|
36
|
-
readonly data: import("effect/Schema").String;
|
|
37
|
-
}>;
|
|
38
|
-
readonly cache_control: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
39
|
-
readonly type: import("effect/Schema").tag<"ephemeral">;
|
|
40
|
-
readonly ttl: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["5m", "1h"]>>;
|
|
41
|
-
}>>;
|
|
42
|
-
}>, import("effect/Schema").Struct<{
|
|
43
|
-
readonly type: import("effect/Schema").tag<"tool_result">;
|
|
44
|
-
readonly tool_use_id: import("effect/Schema").String;
|
|
45
|
-
readonly content: import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
46
|
-
readonly type: import("effect/Schema").tag<"text">;
|
|
47
|
-
readonly text: import("effect/Schema").String;
|
|
48
|
-
readonly cache_control: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
49
|
-
readonly type: import("effect/Schema").tag<"ephemeral">;
|
|
50
|
-
readonly ttl: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["5m", "1h"]>>;
|
|
51
|
-
}>>;
|
|
52
|
-
}>, import("effect/Schema").Struct<{
|
|
53
|
-
readonly type: import("effect/Schema").tag<"image">;
|
|
54
|
-
readonly source: import("effect/Schema").Struct<{
|
|
55
|
-
readonly type: import("effect/Schema").tag<"base64">;
|
|
56
|
-
readonly media_type: import("effect/Schema").String;
|
|
57
|
-
readonly data: import("effect/Schema").String;
|
|
58
|
-
}>;
|
|
59
|
-
readonly cache_control: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
60
|
-
readonly type: import("effect/Schema").tag<"ephemeral">;
|
|
61
|
-
readonly ttl: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["5m", "1h"]>>;
|
|
62
|
-
}>>;
|
|
63
|
-
}>, import("effect/Schema").Struct<{
|
|
64
|
-
readonly type: import("effect/Schema").tag<"document">;
|
|
65
|
-
readonly source: import("effect/Schema").Struct<{
|
|
66
|
-
readonly type: import("effect/Schema").tag<"base64">;
|
|
67
|
-
readonly media_type: import("effect/Schema").Literal<"application/pdf">;
|
|
68
|
-
readonly data: import("effect/Schema").String;
|
|
69
|
-
}>;
|
|
70
|
-
readonly cache_control: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
71
|
-
readonly type: import("effect/Schema").tag<"ephemeral">;
|
|
72
|
-
readonly ttl: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["5m", "1h"]>>;
|
|
73
|
-
}>>;
|
|
74
|
-
}>]>>]>;
|
|
75
|
-
readonly is_error: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
76
|
-
readonly cache_control: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
77
|
-
readonly type: import("effect/Schema").tag<"ephemeral">;
|
|
78
|
-
readonly ttl: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["5m", "1h"]>>;
|
|
79
|
-
}>>;
|
|
80
|
-
}>]>>;
|
|
81
|
-
}, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
|
|
82
|
-
readonly role: import("effect/Schema").Literal<"assistant">;
|
|
83
|
-
readonly content: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
84
|
-
readonly type: import("effect/Schema").tag<"text">;
|
|
85
|
-
readonly text: import("effect/Schema").String;
|
|
86
|
-
readonly cache_control: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
87
|
-
readonly type: import("effect/Schema").tag<"ephemeral">;
|
|
88
|
-
readonly ttl: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["5m", "1h"]>>;
|
|
89
|
-
}>>;
|
|
90
|
-
}>, import("effect/Schema").Struct<{
|
|
91
|
-
readonly type: import("effect/Schema").tag<"thinking">;
|
|
92
|
-
readonly thinking: import("effect/Schema").String;
|
|
93
|
-
readonly signature: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
94
|
-
readonly cache_control: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
95
|
-
readonly type: import("effect/Schema").tag<"ephemeral">;
|
|
96
|
-
readonly ttl: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["5m", "1h"]>>;
|
|
97
|
-
}>>;
|
|
98
|
-
}>, import("effect/Schema").Struct<{
|
|
99
|
-
readonly type: import("effect/Schema").tag<"redacted_thinking">;
|
|
100
|
-
readonly data: import("effect/Schema").String;
|
|
101
|
-
readonly cache_control: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
102
|
-
readonly type: import("effect/Schema").tag<"ephemeral">;
|
|
103
|
-
readonly ttl: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["5m", "1h"]>>;
|
|
104
|
-
}>>;
|
|
105
|
-
}>, import("effect/Schema").Struct<{
|
|
106
|
-
readonly type: import("effect/Schema").tag<"tool_use">;
|
|
107
|
-
readonly id: import("effect/Schema").String;
|
|
108
|
-
readonly name: import("effect/Schema").String;
|
|
109
|
-
readonly input: import("effect/Schema").Unknown;
|
|
110
|
-
readonly cache_control: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
111
|
-
readonly type: import("effect/Schema").tag<"ephemeral">;
|
|
112
|
-
readonly ttl: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["5m", "1h"]>>;
|
|
113
|
-
}>>;
|
|
114
|
-
}>, import("effect/Schema").Struct<{
|
|
115
|
-
readonly type: import("effect/Schema").tag<"server_tool_use">;
|
|
116
|
-
readonly id: import("effect/Schema").String;
|
|
117
|
-
readonly name: import("effect/Schema").String;
|
|
118
|
-
readonly input: import("effect/Schema").Unknown;
|
|
119
|
-
readonly cache_control: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
120
|
-
readonly type: import("effect/Schema").tag<"ephemeral">;
|
|
121
|
-
readonly ttl: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["5m", "1h"]>>;
|
|
122
|
-
}>>;
|
|
123
|
-
}>, import("effect/Schema").Struct<{
|
|
124
|
-
readonly type: import("effect/Schema").Literals<readonly ["web_search_tool_result", "code_execution_tool_result", "web_fetch_tool_result"]>;
|
|
125
|
-
readonly tool_use_id: import("effect/Schema").String;
|
|
126
|
-
readonly content: import("effect/Schema").Unknown;
|
|
127
|
-
readonly cache_control: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
128
|
-
readonly type: import("effect/Schema").tag<"ephemeral">;
|
|
129
|
-
readonly ttl: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["5m", "1h"]>>;
|
|
130
|
-
}>>;
|
|
131
|
-
}>]>>;
|
|
132
|
-
}, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
|
|
133
|
-
readonly role: import("effect/Schema").Literal<"system">;
|
|
134
|
-
readonly content: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
135
|
-
readonly type: import("effect/Schema").tag<"text">;
|
|
136
|
-
readonly text: import("effect/Schema").String;
|
|
137
|
-
readonly cache_control: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
138
|
-
readonly type: import("effect/Schema").tag<"ephemeral">;
|
|
139
|
-
readonly ttl: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["5m", "1h"]>>;
|
|
140
|
-
}>>;
|
|
141
|
-
}>>;
|
|
142
|
-
}, "Type">)[];
|
|
143
11
|
readonly model: string;
|
|
12
|
+
readonly messages: readonly ({
|
|
13
|
+
readonly role: "user";
|
|
14
|
+
readonly content: readonly ({
|
|
15
|
+
readonly type: "text";
|
|
16
|
+
readonly text: string;
|
|
17
|
+
readonly cache_control?: {
|
|
18
|
+
readonly type: "ephemeral";
|
|
19
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
} | {
|
|
22
|
+
readonly type: "image";
|
|
23
|
+
readonly source: {
|
|
24
|
+
readonly type: "base64";
|
|
25
|
+
readonly media_type: string;
|
|
26
|
+
readonly data: string;
|
|
27
|
+
};
|
|
28
|
+
readonly cache_control?: {
|
|
29
|
+
readonly type: "ephemeral";
|
|
30
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
31
|
+
} | undefined;
|
|
32
|
+
} | {
|
|
33
|
+
readonly type: "document";
|
|
34
|
+
readonly source: {
|
|
35
|
+
readonly type: "base64";
|
|
36
|
+
readonly media_type: "application/pdf";
|
|
37
|
+
readonly data: string;
|
|
38
|
+
};
|
|
39
|
+
readonly cache_control?: {
|
|
40
|
+
readonly type: "ephemeral";
|
|
41
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
42
|
+
} | undefined;
|
|
43
|
+
} | {
|
|
44
|
+
readonly type: "tool_result";
|
|
45
|
+
readonly content: string | readonly ({
|
|
46
|
+
readonly type: "text";
|
|
47
|
+
readonly text: string;
|
|
48
|
+
readonly cache_control?: {
|
|
49
|
+
readonly type: "ephemeral";
|
|
50
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
51
|
+
} | undefined;
|
|
52
|
+
} | {
|
|
53
|
+
readonly type: "image";
|
|
54
|
+
readonly source: {
|
|
55
|
+
readonly type: "base64";
|
|
56
|
+
readonly media_type: string;
|
|
57
|
+
readonly data: string;
|
|
58
|
+
};
|
|
59
|
+
readonly cache_control?: {
|
|
60
|
+
readonly type: "ephemeral";
|
|
61
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
62
|
+
} | undefined;
|
|
63
|
+
} | {
|
|
64
|
+
readonly type: "document";
|
|
65
|
+
readonly source: {
|
|
66
|
+
readonly type: "base64";
|
|
67
|
+
readonly media_type: "application/pdf";
|
|
68
|
+
readonly data: string;
|
|
69
|
+
};
|
|
70
|
+
readonly cache_control?: {
|
|
71
|
+
readonly type: "ephemeral";
|
|
72
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
73
|
+
} | undefined;
|
|
74
|
+
})[];
|
|
75
|
+
readonly tool_use_id: string;
|
|
76
|
+
readonly cache_control?: {
|
|
77
|
+
readonly type: "ephemeral";
|
|
78
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
readonly is_error?: boolean | undefined;
|
|
81
|
+
})[];
|
|
82
|
+
} | {
|
|
83
|
+
readonly role: "assistant";
|
|
84
|
+
readonly content: readonly ({
|
|
85
|
+
readonly type: "text";
|
|
86
|
+
readonly text: string;
|
|
87
|
+
readonly cache_control?: {
|
|
88
|
+
readonly type: "ephemeral";
|
|
89
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
90
|
+
} | undefined;
|
|
91
|
+
} | {
|
|
92
|
+
readonly id: string;
|
|
93
|
+
readonly type: "tool_use";
|
|
94
|
+
readonly name: string;
|
|
95
|
+
readonly input: unknown;
|
|
96
|
+
readonly cache_control?: {
|
|
97
|
+
readonly type: "ephemeral";
|
|
98
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
99
|
+
} | undefined;
|
|
100
|
+
} | {
|
|
101
|
+
readonly id: string;
|
|
102
|
+
readonly type: "server_tool_use";
|
|
103
|
+
readonly name: string;
|
|
104
|
+
readonly input: unknown;
|
|
105
|
+
readonly cache_control?: {
|
|
106
|
+
readonly type: "ephemeral";
|
|
107
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
108
|
+
} | undefined;
|
|
109
|
+
} | {
|
|
110
|
+
readonly type: "web_search_tool_result" | "code_execution_tool_result" | "web_fetch_tool_result";
|
|
111
|
+
readonly content: unknown;
|
|
112
|
+
readonly tool_use_id: string;
|
|
113
|
+
readonly cache_control?: {
|
|
114
|
+
readonly type: "ephemeral";
|
|
115
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
116
|
+
} | undefined;
|
|
117
|
+
} | {
|
|
118
|
+
readonly type: "thinking";
|
|
119
|
+
readonly thinking: string;
|
|
120
|
+
readonly cache_control?: {
|
|
121
|
+
readonly type: "ephemeral";
|
|
122
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
123
|
+
} | undefined;
|
|
124
|
+
readonly signature?: string | undefined;
|
|
125
|
+
} | {
|
|
126
|
+
readonly data: string;
|
|
127
|
+
readonly type: "redacted_thinking";
|
|
128
|
+
readonly cache_control?: {
|
|
129
|
+
readonly type: "ephemeral";
|
|
130
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
131
|
+
} | undefined;
|
|
132
|
+
})[];
|
|
133
|
+
} | {
|
|
134
|
+
readonly role: "system";
|
|
135
|
+
readonly content: readonly {
|
|
136
|
+
readonly type: "text";
|
|
137
|
+
readonly text: string;
|
|
138
|
+
readonly cache_control?: {
|
|
139
|
+
readonly type: "ephemeral";
|
|
140
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
141
|
+
} | undefined;
|
|
142
|
+
}[];
|
|
143
|
+
})[];
|
|
144
144
|
readonly stream: true;
|
|
145
145
|
readonly max_tokens: number;
|
|
146
146
|
readonly system?: readonly {
|
|
@@ -164,21 +164,21 @@ export declare const routes: import("../route").Route<{
|
|
|
164
164
|
}[] | undefined;
|
|
165
165
|
readonly temperature?: number | undefined;
|
|
166
166
|
readonly stop_sequences?: readonly string[] | undefined;
|
|
167
|
-
readonly thinking?:
|
|
168
|
-
readonly type:
|
|
169
|
-
readonly budget_tokens:
|
|
170
|
-
}
|
|
167
|
+
readonly thinking?: {
|
|
168
|
+
readonly type: "enabled";
|
|
169
|
+
readonly budget_tokens: number;
|
|
170
|
+
} | {
|
|
171
171
|
readonly type: "adaptive";
|
|
172
172
|
readonly display?: "summarized" | "omitted" | undefined;
|
|
173
|
-
} |
|
|
174
|
-
readonly type:
|
|
175
|
-
}
|
|
176
|
-
readonly tool_choice?:
|
|
177
|
-
readonly type:
|
|
178
|
-
}
|
|
179
|
-
readonly type:
|
|
180
|
-
readonly name:
|
|
181
|
-
}
|
|
173
|
+
} | {
|
|
174
|
+
readonly type: "disabled";
|
|
175
|
+
} | undefined;
|
|
176
|
+
readonly tool_choice?: {
|
|
177
|
+
readonly type: "none" | "auto" | "any";
|
|
178
|
+
} | {
|
|
179
|
+
readonly type: "tool";
|
|
180
|
+
readonly name: string;
|
|
181
|
+
} | undefined;
|
|
182
182
|
readonly top_k?: number | undefined;
|
|
183
183
|
readonly top_p?: number | undefined;
|
|
184
184
|
readonly output_config?: {
|
|
@@ -22,130 +22,132 @@ export type Settings = ProviderPackage.Settings & AzureURL & {
|
|
|
22
22
|
readonly providerOptions?: OpenAIProviderOptionsInput;
|
|
23
23
|
};
|
|
24
24
|
export declare const routes: (RouteDef<{
|
|
25
|
-
readonly
|
|
26
|
-
|
|
27
|
-
readonly
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
readonly
|
|
31
|
-
|
|
32
|
-
readonly
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
readonly
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
25
|
+
readonly model: string;
|
|
26
|
+
readonly messages: readonly ({
|
|
27
|
+
readonly role: "system";
|
|
28
|
+
readonly content: string;
|
|
29
|
+
} | {
|
|
30
|
+
readonly role: "user";
|
|
31
|
+
readonly content: string | readonly ({
|
|
32
|
+
readonly type: "text";
|
|
33
|
+
readonly text: string;
|
|
34
|
+
} | {
|
|
35
|
+
readonly type: "image_url";
|
|
36
|
+
readonly image_url: {
|
|
37
|
+
readonly url: string;
|
|
38
|
+
};
|
|
39
|
+
})[];
|
|
40
|
+
} | {
|
|
40
41
|
readonly [x: string]: unknown;
|
|
41
42
|
readonly content: string | null;
|
|
42
43
|
readonly role: "assistant";
|
|
43
44
|
readonly reasoning?: string | undefined;
|
|
44
|
-
readonly tool_calls?: readonly import("effect/Schema").Struct.ReadonlySide<{
|
|
45
|
-
readonly id: import("effect/Schema").String;
|
|
46
|
-
readonly type: import("effect/Schema").tag<"function">;
|
|
47
|
-
readonly function: import("effect/Schema").Struct<{
|
|
48
|
-
readonly name: import("effect/Schema").String;
|
|
49
|
-
readonly arguments: import("effect/Schema").String;
|
|
50
|
-
}>;
|
|
51
|
-
}, "Type">[] | undefined;
|
|
52
45
|
readonly reasoning_content?: string | undefined;
|
|
53
46
|
readonly reasoning_text?: string | undefined;
|
|
47
|
+
readonly tool_calls?: readonly {
|
|
48
|
+
readonly id: string;
|
|
49
|
+
readonly type: "function";
|
|
50
|
+
readonly function: {
|
|
51
|
+
readonly name: string;
|
|
52
|
+
readonly arguments: string;
|
|
53
|
+
};
|
|
54
|
+
}[] | undefined;
|
|
54
55
|
readonly reasoning_details?: unknown;
|
|
55
|
-
} |
|
|
56
|
-
readonly role:
|
|
57
|
-
readonly tool_call_id:
|
|
58
|
-
readonly content:
|
|
59
|
-
}
|
|
60
|
-
readonly model: string;
|
|
56
|
+
} | {
|
|
57
|
+
readonly role: "tool";
|
|
58
|
+
readonly tool_call_id: string;
|
|
59
|
+
readonly content: string;
|
|
60
|
+
})[];
|
|
61
61
|
readonly stream: true;
|
|
62
62
|
readonly stop?: readonly string[] | undefined;
|
|
63
|
-
readonly tools?: readonly
|
|
64
|
-
readonly type:
|
|
65
|
-
readonly function:
|
|
66
|
-
readonly name:
|
|
67
|
-
readonly description:
|
|
68
|
-
readonly parameters:
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
readonly tools?: readonly {
|
|
64
|
+
readonly type: "function";
|
|
65
|
+
readonly function: {
|
|
66
|
+
readonly name: string;
|
|
67
|
+
readonly description: string;
|
|
68
|
+
readonly parameters: {
|
|
69
|
+
readonly [x: string]: unknown;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
}[] | undefined;
|
|
71
73
|
readonly temperature?: number | undefined;
|
|
72
74
|
readonly seed?: number | undefined;
|
|
73
75
|
readonly frequency_penalty?: number | undefined;
|
|
74
76
|
readonly max_tokens?: number | undefined;
|
|
75
77
|
readonly presence_penalty?: number | undefined;
|
|
76
|
-
readonly stream_options?:
|
|
77
|
-
readonly include_usage:
|
|
78
|
-
}
|
|
79
|
-
readonly tool_choice?: "required" | "none" | "auto" |
|
|
80
|
-
readonly type:
|
|
81
|
-
readonly function:
|
|
82
|
-
readonly name:
|
|
83
|
-
}
|
|
84
|
-
}
|
|
78
|
+
readonly stream_options?: {
|
|
79
|
+
readonly include_usage: boolean;
|
|
80
|
+
} | undefined;
|
|
81
|
+
readonly tool_choice?: "required" | "none" | "auto" | {
|
|
82
|
+
readonly type: "function";
|
|
83
|
+
readonly function: {
|
|
84
|
+
readonly name: string;
|
|
85
|
+
};
|
|
86
|
+
} | undefined;
|
|
85
87
|
readonly top_p?: number | undefined;
|
|
86
88
|
readonly store?: boolean | undefined;
|
|
87
89
|
readonly reasoning_effort?: string | undefined;
|
|
88
90
|
}, import("../route/transport/http").HttpPrepared<string>> | RouteDef<{
|
|
89
91
|
readonly input: readonly ({
|
|
90
92
|
readonly type: "reasoning";
|
|
91
|
-
readonly summary: readonly
|
|
92
|
-
readonly type:
|
|
93
|
-
readonly text:
|
|
94
|
-
}
|
|
93
|
+
readonly summary: readonly {
|
|
94
|
+
readonly type: "summary_text";
|
|
95
|
+
readonly text: string;
|
|
96
|
+
}[];
|
|
95
97
|
readonly id?: string | undefined;
|
|
96
98
|
readonly encrypted_content?: string | null | undefined;
|
|
97
|
-
} |
|
|
98
|
-
readonly type:
|
|
99
|
-
readonly id:
|
|
100
|
-
}
|
|
101
|
-
readonly role:
|
|
102
|
-
readonly content:
|
|
103
|
-
}
|
|
104
|
-
readonly role:
|
|
105
|
-
readonly content:
|
|
106
|
-
readonly type:
|
|
107
|
-
readonly
|
|
108
|
-
}
|
|
109
|
-
readonly type:
|
|
110
|
-
readonly
|
|
111
|
-
|
|
112
|
-
readonly
|
|
113
|
-
|
|
114
|
-
readonly
|
|
115
|
-
readonly
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
readonly content: readonly
|
|
119
|
-
readonly type:
|
|
120
|
-
readonly text:
|
|
121
|
-
}
|
|
99
|
+
} | {
|
|
100
|
+
readonly type: "item_reference";
|
|
101
|
+
readonly id: string;
|
|
102
|
+
} | {
|
|
103
|
+
readonly role: "system";
|
|
104
|
+
readonly content: string;
|
|
105
|
+
} | {
|
|
106
|
+
readonly role: "user";
|
|
107
|
+
readonly content: readonly ({
|
|
108
|
+
readonly type: "input_image";
|
|
109
|
+
readonly image_url: string;
|
|
110
|
+
} | {
|
|
111
|
+
readonly type: "input_file";
|
|
112
|
+
readonly filename: string;
|
|
113
|
+
readonly file_data: string;
|
|
114
|
+
readonly mime_type?: string | undefined;
|
|
115
|
+
} | {
|
|
116
|
+
readonly type: "input_text";
|
|
117
|
+
readonly text: string;
|
|
118
|
+
})[];
|
|
119
|
+
} | {
|
|
120
|
+
readonly content: readonly {
|
|
121
|
+
readonly type: "output_text";
|
|
122
|
+
readonly text: string;
|
|
123
|
+
}[];
|
|
122
124
|
readonly role: "assistant";
|
|
123
125
|
readonly phase?: "commentary" | "final_answer" | undefined;
|
|
124
|
-
} |
|
|
125
|
-
readonly type:
|
|
126
|
-
readonly call_id:
|
|
127
|
-
readonly name:
|
|
128
|
-
readonly arguments:
|
|
129
|
-
}
|
|
130
|
-
readonly type:
|
|
131
|
-
readonly call_id:
|
|
132
|
-
readonly output:
|
|
133
|
-
readonly type:
|
|
134
|
-
readonly
|
|
135
|
-
}
|
|
136
|
-
readonly type:
|
|
137
|
-
readonly
|
|
138
|
-
|
|
139
|
-
readonly
|
|
140
|
-
|
|
141
|
-
readonly
|
|
142
|
-
readonly
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
readonly content: readonly
|
|
146
|
-
readonly type:
|
|
147
|
-
readonly text:
|
|
148
|
-
}
|
|
126
|
+
} | {
|
|
127
|
+
readonly type: "function_call";
|
|
128
|
+
readonly call_id: string;
|
|
129
|
+
readonly name: string;
|
|
130
|
+
readonly arguments: string;
|
|
131
|
+
} | {
|
|
132
|
+
readonly type: "function_call_output";
|
|
133
|
+
readonly call_id: string;
|
|
134
|
+
readonly output: string | readonly ({
|
|
135
|
+
readonly type: "input_image";
|
|
136
|
+
readonly image_url: string;
|
|
137
|
+
} | {
|
|
138
|
+
readonly type: "input_file";
|
|
139
|
+
readonly filename: string;
|
|
140
|
+
readonly file_data: string;
|
|
141
|
+
readonly mime_type?: string | undefined;
|
|
142
|
+
} | {
|
|
143
|
+
readonly type: "input_text";
|
|
144
|
+
readonly text: string;
|
|
145
|
+
})[];
|
|
146
|
+
} | {
|
|
147
|
+
readonly content: readonly {
|
|
148
|
+
readonly type: "output_text";
|
|
149
|
+
readonly text: string;
|
|
150
|
+
}[];
|
|
149
151
|
readonly role: "assistant";
|
|
150
152
|
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
151
153
|
})[];
|
|
@@ -154,9 +156,10 @@ export declare const routes: (RouteDef<{
|
|
|
154
156
|
readonly text?: {
|
|
155
157
|
readonly verbosity?: "low" | "medium" | "high" | undefined;
|
|
156
158
|
} | undefined;
|
|
159
|
+
readonly instructions?: string | undefined;
|
|
157
160
|
readonly reasoning?: {
|
|
158
|
-
readonly effort?: string | undefined;
|
|
159
161
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
162
|
+
readonly effort?: string | undefined;
|
|
160
163
|
} | undefined;
|
|
161
164
|
readonly tools?: readonly ({
|
|
162
165
|
readonly type: "function";
|
|
@@ -168,25 +171,24 @@ export declare const routes: (RouteDef<{
|
|
|
168
171
|
readonly strict?: boolean | undefined;
|
|
169
172
|
} | {
|
|
170
173
|
readonly type: "image_generation";
|
|
171
|
-
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
172
174
|
readonly size?: string | undefined;
|
|
175
|
+
readonly action?: "generate" | "auto" | "edit" | undefined;
|
|
176
|
+
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
173
177
|
readonly quality?: "low" | "medium" | "high" | "auto" | undefined;
|
|
174
178
|
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
175
179
|
readonly output_compression?: number | undefined;
|
|
176
|
-
readonly action?: "generate" | "auto" | "edit" | undefined;
|
|
177
180
|
readonly input_fidelity?: "low" | "high" | undefined;
|
|
178
181
|
readonly partial_images?: number | undefined;
|
|
179
182
|
})[] | undefined;
|
|
180
183
|
readonly temperature?: number | undefined;
|
|
181
|
-
readonly tool_choice?: "required" | "none" | "auto" |
|
|
182
|
-
readonly type:
|
|
183
|
-
readonly name:
|
|
184
|
-
}
|
|
185
|
-
readonly type:
|
|
186
|
-
}
|
|
184
|
+
readonly tool_choice?: "required" | "none" | "auto" | {
|
|
185
|
+
readonly type: "function";
|
|
186
|
+
readonly name: string;
|
|
187
|
+
} | {
|
|
188
|
+
readonly type: "image_generation";
|
|
189
|
+
} | undefined;
|
|
187
190
|
readonly top_p?: number | undefined;
|
|
188
191
|
readonly include?: readonly ("file_search_call.results" | "web_search_call.results" | "web_search_call.action.sources" | "message.input_image.image_url" | "computer_call_output.output.image_url" | "code_interpreter_call.outputs" | "reasoning.encrypted_content" | "message.output_text.logprobs")[] | undefined;
|
|
189
|
-
readonly instructions?: string | undefined;
|
|
190
192
|
readonly store?: boolean | undefined;
|
|
191
193
|
readonly service_tier?: "auto" | "default" | "flex" | "priority" | undefined;
|
|
192
194
|
readonly prompt_cache_key?: string | undefined;
|