@opencode/ai 2.1.3 → 2.1.4
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/experimental/evaluation.js +3 -10
- package/dist/image-client.d.ts +8 -8
- package/dist/image.d.ts +148 -148
- package/dist/promise.d.ts +120 -120
- package/dist/protocols/alibaba-chat.d.ts +12 -12
- package/dist/protocols/alibaba-messages.d.ts +11 -11
- package/dist/protocols/alibaba-responses.d.ts +35 -35
- package/dist/protocols/anthropic-messages.d.ts +40 -44
- package/dist/protocols/anthropic-messages.js +3 -3
- package/dist/protocols/bedrock-converse.d.ts +30 -32
- package/dist/protocols/bedrock-converse.js +2 -3
- package/dist/protocols/cartesia-speech.d.ts +32 -32
- package/dist/protocols/cohere-chat.d.ts +7 -8
- package/dist/protocols/deepgram-speech.d.ts +32 -32
- package/dist/protocols/elevenlabs-speech.d.ts +32 -32
- package/dist/protocols/gemini.d.ts +34 -34
- package/dist/protocols/gemini.js +2 -2
- package/dist/protocols/google-interactions.d.ts +14 -14
- package/dist/protocols/google-interactions.js +2 -2
- package/dist/protocols/google-speech.d.ts +32 -32
- package/dist/protocols/google-transcription.d.ts +32 -32
- package/dist/protocols/meta-messages.d.ts +23 -23
- package/dist/protocols/meta-responses.d.ts +78 -78
- package/dist/protocols/mistral-chat.d.ts +81 -78
- package/dist/protocols/mistral-chat.js +2 -1
- package/dist/protocols/open-responses-channel.js +47 -46
- package/dist/protocols/open-responses-continuation.d.ts +8 -2
- package/dist/protocols/open-responses-continuation.js +3 -1
- package/dist/protocols/open-responses.d.ts +398 -398
- package/dist/protocols/open-responses.js +8 -7
- package/dist/protocols/openai-chat.d.ts +60 -60
- package/dist/protocols/openai-chat.js +3 -3
- package/dist/protocols/openai-compatible-chat.d.ts +13 -14
- package/dist/protocols/openai-compatible-responses.d.ts +36 -37
- package/dist/protocols/openai-images.d.ts +32 -32
- package/dist/protocols/openai-responses.d.ts +235 -235
- package/dist/protocols/openai-responses.js +1 -1
- package/dist/protocols/openai-speech.d.ts +32 -32
- package/dist/protocols/openai-transcription.d.ts +32 -32
- package/dist/protocols/openai-transcription.js +12 -7
- package/dist/protocols/utils/partial-json-options.d.ts +0 -1
- package/dist/protocols/utils/partial-json-options.js +0 -1
- package/dist/protocols/utils/tool-stream.d.ts +1 -1
- package/dist/protocols/venice-chat.d.ts +52 -53
- package/dist/protocols/venice-chat.js +6 -5
- package/dist/protocols/xai-responses.d.ts +78 -78
- package/dist/protocols/zai-chat.d.ts +33 -30
- package/dist/protocols/zai-chat.js +8 -3
- package/dist/protocols/zai-messages.d.ts +21 -19
- package/dist/protocols/zai-messages.js +3 -2
- package/dist/provider-error.js +5 -3
- package/dist/providers/alibaba.d.ts +69 -69
- package/dist/providers/amazon-bedrock-mantle.d.ts +202 -202
- package/dist/providers/amazon-bedrock.d.ts +15 -15
- package/dist/providers/anthropic-compatible.d.ts +13 -13
- package/dist/providers/anthropic.d.ts +13 -13
- package/dist/providers/azure.d.ts +106 -106
- package/dist/providers/baseten.d.ts +24 -24
- package/dist/providers/cerebras.d.ts +24 -24
- package/dist/providers/cloudflare-ai-gateway.d.ts +230 -227
- package/dist/providers/cloudflare-ai-gateway.js +1 -2
- package/dist/providers/cloudflare-workers-ai.d.ts +24 -24
- package/dist/providers/cohere.d.ts +75 -75
- package/dist/providers/deepinfra.d.ts +24 -24
- package/dist/providers/deepseek.d.ts +24 -24
- package/dist/providers/digitalocean.d.ts +36 -36
- package/dist/providers/fireworks.d.ts +24 -24
- package/dist/providers/google-vertex-chat.d.ts +12 -12
- package/dist/providers/google-vertex-messages.d.ts +13 -13
- package/dist/providers/google-vertex-mistral.d.ts +17 -17
- package/dist/providers/google-vertex-responses.d.ts +35 -35
- package/dist/providers/google-vertex.d.ts +17 -17
- package/dist/providers/google-vertex.js +2 -2
- package/dist/providers/google.d.ts +17 -17
- package/dist/providers/groq.d.ts +24 -24
- package/dist/providers/meta.d.ts +179 -179
- package/dist/providers/minimax.d.ts +71 -71
- package/dist/providers/mistral.d.ts +28 -28
- package/dist/providers/moonshot.d.ts +202 -202
- package/dist/providers/open-responses-options.d.ts +0 -1
- package/dist/providers/open-responses-options.js +1 -1
- package/dist/providers/openai-compatible-responses.d.ts +35 -35
- package/dist/providers/openai-compatible.d.ts +12 -12
- package/dist/providers/openai-compatible.js +1 -1
- package/dist/providers/openai-options.d.ts +0 -1
- package/dist/providers/openai-options.js +0 -1
- package/dist/providers/openai.d.ts +100 -100
- package/dist/providers/openrouter.d.ts +36 -36
- package/dist/providers/togetherai.d.ts +24 -24
- package/dist/providers/venice.d.ts +195 -20
- package/dist/providers/xai.d.ts +12 -12
- package/dist/providers/zai-coding-plan.d.ts +149 -69
- package/dist/providers/zai.d.ts +84 -19
- package/dist/route/auth-options.d.ts +0 -3
- package/dist/route/auth.d.ts +0 -2
- package/dist/route/auth.js +0 -2
- package/dist/route/client.d.ts +0 -2
- package/dist/route/client.js +3 -4
- package/dist/route/executor-service.js +1 -1
- package/dist/speech-client.d.ts +8 -8
- package/dist/speech.d.ts +148 -148
- package/dist/transcription-client.d.ts +8 -8
- package/dist/transcription.d.ts +148 -148
- package/dist/video-client.d.ts +8 -8
- package/dist/video.d.ts +114 -114
- package/package.json +6 -5
|
@@ -17,13 +17,6 @@ export declare const route: Route<{
|
|
|
17
17
|
readonly messages: readonly ({
|
|
18
18
|
readonly role: "system";
|
|
19
19
|
readonly content: string | readonly ({
|
|
20
|
-
readonly type: "text";
|
|
21
|
-
readonly text: string;
|
|
22
|
-
readonly cache_control?: {
|
|
23
|
-
readonly type: "ephemeral";
|
|
24
|
-
readonly ttl?: string | undefined;
|
|
25
|
-
} | undefined;
|
|
26
|
-
} | {
|
|
27
20
|
readonly type: "image_url";
|
|
28
21
|
readonly image_url: {
|
|
29
22
|
readonly url: string;
|
|
@@ -34,17 +27,17 @@ export declare const route: Route<{
|
|
|
34
27
|
readonly filename: string;
|
|
35
28
|
readonly file_data: string;
|
|
36
29
|
};
|
|
37
|
-
}
|
|
38
|
-
} | {
|
|
39
|
-
readonly role: "user";
|
|
40
|
-
readonly content: string | readonly ({
|
|
30
|
+
} | {
|
|
41
31
|
readonly type: "text";
|
|
42
32
|
readonly text: string;
|
|
43
33
|
readonly cache_control?: {
|
|
44
34
|
readonly type: "ephemeral";
|
|
45
35
|
readonly ttl?: string | undefined;
|
|
46
36
|
} | undefined;
|
|
47
|
-
}
|
|
37
|
+
})[];
|
|
38
|
+
} | {
|
|
39
|
+
readonly role: "user";
|
|
40
|
+
readonly content: string | readonly ({
|
|
48
41
|
readonly type: "image_url";
|
|
49
42
|
readonly image_url: {
|
|
50
43
|
readonly url: string;
|
|
@@ -55,6 +48,13 @@ export declare const route: Route<{
|
|
|
55
48
|
readonly filename: string;
|
|
56
49
|
readonly file_data: string;
|
|
57
50
|
};
|
|
51
|
+
} | {
|
|
52
|
+
readonly type: "text";
|
|
53
|
+
readonly text: string;
|
|
54
|
+
readonly cache_control?: {
|
|
55
|
+
readonly type: "ephemeral";
|
|
56
|
+
readonly ttl?: string | undefined;
|
|
57
|
+
} | undefined;
|
|
58
58
|
})[];
|
|
59
59
|
} | {
|
|
60
60
|
readonly role: "tool";
|
|
@@ -139,13 +139,6 @@ export declare const routes: Route<{
|
|
|
139
139
|
readonly messages: readonly ({
|
|
140
140
|
readonly role: "system";
|
|
141
141
|
readonly content: string | readonly ({
|
|
142
|
-
readonly type: "text";
|
|
143
|
-
readonly text: string;
|
|
144
|
-
readonly cache_control?: {
|
|
145
|
-
readonly type: "ephemeral";
|
|
146
|
-
readonly ttl?: string | undefined;
|
|
147
|
-
} | undefined;
|
|
148
|
-
} | {
|
|
149
142
|
readonly type: "image_url";
|
|
150
143
|
readonly image_url: {
|
|
151
144
|
readonly url: string;
|
|
@@ -156,17 +149,17 @@ export declare const routes: Route<{
|
|
|
156
149
|
readonly filename: string;
|
|
157
150
|
readonly file_data: string;
|
|
158
151
|
};
|
|
159
|
-
}
|
|
160
|
-
} | {
|
|
161
|
-
readonly role: "user";
|
|
162
|
-
readonly content: string | readonly ({
|
|
152
|
+
} | {
|
|
163
153
|
readonly type: "text";
|
|
164
154
|
readonly text: string;
|
|
165
155
|
readonly cache_control?: {
|
|
166
156
|
readonly type: "ephemeral";
|
|
167
157
|
readonly ttl?: string | undefined;
|
|
168
158
|
} | undefined;
|
|
169
|
-
}
|
|
159
|
+
})[];
|
|
160
|
+
} | {
|
|
161
|
+
readonly role: "user";
|
|
162
|
+
readonly content: string | readonly ({
|
|
170
163
|
readonly type: "image_url";
|
|
171
164
|
readonly image_url: {
|
|
172
165
|
readonly url: string;
|
|
@@ -177,6 +170,13 @@ export declare const routes: Route<{
|
|
|
177
170
|
readonly filename: string;
|
|
178
171
|
readonly file_data: string;
|
|
179
172
|
};
|
|
173
|
+
} | {
|
|
174
|
+
readonly type: "text";
|
|
175
|
+
readonly text: string;
|
|
176
|
+
readonly cache_control?: {
|
|
177
|
+
readonly type: "ephemeral";
|
|
178
|
+
readonly ttl?: string | undefined;
|
|
179
|
+
} | undefined;
|
|
180
180
|
})[];
|
|
181
181
|
} | {
|
|
182
182
|
readonly role: "tool";
|
|
@@ -22,13 +22,6 @@ export declare const routes: Route<{
|
|
|
22
22
|
readonly messages: readonly ({
|
|
23
23
|
readonly role: "system";
|
|
24
24
|
readonly content: string | readonly ({
|
|
25
|
-
readonly type: "text";
|
|
26
|
-
readonly text: string;
|
|
27
|
-
readonly cache_control?: {
|
|
28
|
-
readonly type: "ephemeral";
|
|
29
|
-
readonly ttl?: string | undefined;
|
|
30
|
-
} | undefined;
|
|
31
|
-
} | {
|
|
32
25
|
readonly type: "image_url";
|
|
33
26
|
readonly image_url: {
|
|
34
27
|
readonly url: string;
|
|
@@ -39,17 +32,17 @@ export declare const routes: Route<{
|
|
|
39
32
|
readonly filename: string;
|
|
40
33
|
readonly file_data: string;
|
|
41
34
|
};
|
|
42
|
-
}
|
|
43
|
-
} | {
|
|
44
|
-
readonly role: "user";
|
|
45
|
-
readonly content: string | readonly ({
|
|
35
|
+
} | {
|
|
46
36
|
readonly type: "text";
|
|
47
37
|
readonly text: string;
|
|
48
38
|
readonly cache_control?: {
|
|
49
39
|
readonly type: "ephemeral";
|
|
50
40
|
readonly ttl?: string | undefined;
|
|
51
41
|
} | undefined;
|
|
52
|
-
}
|
|
42
|
+
})[];
|
|
43
|
+
} | {
|
|
44
|
+
readonly role: "user";
|
|
45
|
+
readonly content: string | readonly ({
|
|
53
46
|
readonly type: "image_url";
|
|
54
47
|
readonly image_url: {
|
|
55
48
|
readonly url: string;
|
|
@@ -60,6 +53,13 @@ export declare const routes: Route<{
|
|
|
60
53
|
readonly filename: string;
|
|
61
54
|
readonly file_data: string;
|
|
62
55
|
};
|
|
56
|
+
} | {
|
|
57
|
+
readonly type: "text";
|
|
58
|
+
readonly text: string;
|
|
59
|
+
readonly cache_control?: {
|
|
60
|
+
readonly type: "ephemeral";
|
|
61
|
+
readonly ttl?: string | undefined;
|
|
62
|
+
} | undefined;
|
|
63
63
|
})[];
|
|
64
64
|
} | {
|
|
65
65
|
readonly role: "tool";
|
|
@@ -161,23 +161,15 @@ export declare const routes: Route<{
|
|
|
161
161
|
} | {
|
|
162
162
|
readonly role: "assistant";
|
|
163
163
|
readonly content: readonly ({
|
|
164
|
+
readonly type: "compaction";
|
|
165
|
+
readonly content: string | null;
|
|
166
|
+
} | {
|
|
164
167
|
readonly type: "text";
|
|
165
168
|
readonly text: string;
|
|
166
169
|
readonly cache_control?: {
|
|
167
170
|
readonly type: "ephemeral";
|
|
168
171
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
169
172
|
} | undefined;
|
|
170
|
-
} | {
|
|
171
|
-
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
172
|
-
readonly tool_use_id: string;
|
|
173
|
-
readonly content: unknown;
|
|
174
|
-
readonly cache_control?: {
|
|
175
|
-
readonly type: "ephemeral";
|
|
176
|
-
readonly ttl?: "1h" | "5m" | undefined;
|
|
177
|
-
} | undefined;
|
|
178
|
-
} | {
|
|
179
|
-
readonly type: "compaction";
|
|
180
|
-
readonly content: string | null;
|
|
181
173
|
} | {
|
|
182
174
|
readonly type: "thinking";
|
|
183
175
|
readonly thinking: string;
|
|
@@ -211,6 +203,14 @@ export declare const routes: Route<{
|
|
|
211
203
|
readonly type: "ephemeral";
|
|
212
204
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
213
205
|
} | undefined;
|
|
206
|
+
} | {
|
|
207
|
+
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
208
|
+
readonly tool_use_id: string;
|
|
209
|
+
readonly content: unknown;
|
|
210
|
+
readonly cache_control?: {
|
|
211
|
+
readonly type: "ephemeral";
|
|
212
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
213
|
+
} | undefined;
|
|
214
214
|
})[];
|
|
215
215
|
} | {
|
|
216
216
|
readonly role: "system";
|
|
@@ -252,6 +252,8 @@ export declare const routes: Route<{
|
|
|
252
252
|
readonly top_k?: number | undefined;
|
|
253
253
|
readonly stop_sequences?: readonly string[] | undefined;
|
|
254
254
|
readonly thinking?: {
|
|
255
|
+
readonly type: "between_tools" | "disabled";
|
|
256
|
+
} | {
|
|
255
257
|
readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
|
|
256
258
|
readonly block_binding?: {
|
|
257
259
|
readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
|
|
@@ -264,8 +266,6 @@ export declare const routes: Route<{
|
|
|
264
266
|
readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
|
|
265
267
|
} | undefined;
|
|
266
268
|
readonly type: "adaptive";
|
|
267
|
-
} | {
|
|
268
|
-
readonly type: "between_tools" | "disabled";
|
|
269
269
|
} | undefined;
|
|
270
270
|
readonly output_config?: {
|
|
271
271
|
readonly effort?: string | undefined;
|
|
@@ -38,9 +38,26 @@ export declare const routes: Route<{
|
|
|
38
38
|
readonly type: "document_url";
|
|
39
39
|
readonly document_url: string;
|
|
40
40
|
})[];
|
|
41
|
+
} | {
|
|
42
|
+
readonly role: "tool";
|
|
43
|
+
readonly tool_call_id: string;
|
|
44
|
+
readonly name: string;
|
|
45
|
+
readonly content: string | readonly ({
|
|
46
|
+
readonly type: "text";
|
|
47
|
+
readonly text: string;
|
|
48
|
+
} | {
|
|
49
|
+
readonly type: "image_url";
|
|
50
|
+
readonly image_url: string;
|
|
51
|
+
} | {
|
|
52
|
+
readonly type: "document_url";
|
|
53
|
+
readonly document_url: string;
|
|
54
|
+
})[];
|
|
41
55
|
} | {
|
|
42
56
|
readonly role: "assistant";
|
|
43
57
|
readonly content: string | readonly ({
|
|
58
|
+
readonly type: "text";
|
|
59
|
+
readonly text: string;
|
|
60
|
+
} | {
|
|
44
61
|
readonly [x: string]: unknown;
|
|
45
62
|
readonly type: "thinking";
|
|
46
63
|
readonly thinking: readonly {
|
|
@@ -48,9 +65,6 @@ export declare const routes: Route<{
|
|
|
48
65
|
readonly type?: string | undefined;
|
|
49
66
|
readonly text?: string | undefined;
|
|
50
67
|
}[];
|
|
51
|
-
} | {
|
|
52
|
-
readonly type: "text";
|
|
53
|
-
readonly text: string;
|
|
54
68
|
})[];
|
|
55
69
|
readonly tool_calls?: readonly {
|
|
56
70
|
readonly id: string;
|
|
@@ -61,20 +75,6 @@ export declare const routes: Route<{
|
|
|
61
75
|
};
|
|
62
76
|
}[] | undefined;
|
|
63
77
|
readonly prefix?: true | undefined;
|
|
64
|
-
} | {
|
|
65
|
-
readonly role: "tool";
|
|
66
|
-
readonly tool_call_id: string;
|
|
67
|
-
readonly name: string;
|
|
68
|
-
readonly content: string | readonly ({
|
|
69
|
-
readonly type: "text";
|
|
70
|
-
readonly text: string;
|
|
71
|
-
} | {
|
|
72
|
-
readonly type: "image_url";
|
|
73
|
-
readonly image_url: string;
|
|
74
|
-
} | {
|
|
75
|
-
readonly type: "document_url";
|
|
76
|
-
readonly document_url: string;
|
|
77
|
-
})[];
|
|
78
78
|
})[];
|
|
79
79
|
readonly tools?: readonly {
|
|
80
80
|
readonly type: "function";
|
|
@@ -20,10 +20,6 @@ export type Settings = ProviderPackage.Settings & OpenResponsesProviderOptionsIn
|
|
|
20
20
|
export declare const routes: Route<{
|
|
21
21
|
readonly model: string;
|
|
22
22
|
readonly input: readonly ({
|
|
23
|
-
readonly type: "compaction";
|
|
24
|
-
readonly id?: string | null | undefined;
|
|
25
|
-
readonly encrypted_content: string;
|
|
26
|
-
} | {
|
|
27
23
|
readonly type: "configuration_update";
|
|
28
24
|
readonly reasoning: {
|
|
29
25
|
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
@@ -36,10 +32,45 @@ export declare const routes: Route<{
|
|
|
36
32
|
readonly type: "message";
|
|
37
33
|
readonly role: "developer";
|
|
38
34
|
readonly content: string;
|
|
35
|
+
} | {
|
|
36
|
+
readonly type: "function_call_output";
|
|
37
|
+
readonly call_id: string;
|
|
38
|
+
readonly output: string | readonly ({
|
|
39
|
+
readonly type: "input_text";
|
|
40
|
+
readonly text: string;
|
|
41
|
+
} | {
|
|
42
|
+
readonly type: "input_video";
|
|
43
|
+
readonly video_url: string;
|
|
44
|
+
} | {
|
|
45
|
+
readonly type: "input_image";
|
|
46
|
+
readonly image_url: string;
|
|
47
|
+
readonly detail?: string | undefined;
|
|
48
|
+
} | {
|
|
49
|
+
readonly type: "input_file";
|
|
50
|
+
readonly filename: string;
|
|
51
|
+
readonly detail?: string | undefined;
|
|
52
|
+
readonly file_data?: string | undefined;
|
|
53
|
+
readonly file_url?: string | undefined;
|
|
54
|
+
})[];
|
|
55
|
+
} | {
|
|
56
|
+
readonly type: "reasoning";
|
|
57
|
+
readonly id?: string | undefined;
|
|
58
|
+
readonly summary: readonly {
|
|
59
|
+
readonly type: "summary_text";
|
|
60
|
+
readonly text: string;
|
|
61
|
+
}[];
|
|
62
|
+
readonly encrypted_content?: string | null | undefined;
|
|
63
|
+
} | {
|
|
64
|
+
readonly type: "compaction";
|
|
65
|
+
readonly id?: string | null | undefined;
|
|
66
|
+
readonly encrypted_content: string;
|
|
39
67
|
} | {
|
|
40
68
|
readonly type: "message";
|
|
41
69
|
readonly role: "user";
|
|
42
70
|
readonly content: readonly ({
|
|
71
|
+
readonly type: "input_text";
|
|
72
|
+
readonly text: string;
|
|
73
|
+
} | {
|
|
43
74
|
readonly type: "input_image";
|
|
44
75
|
readonly image_url: string;
|
|
45
76
|
readonly detail?: string | undefined;
|
|
@@ -49,9 +80,6 @@ export declare const routes: Route<{
|
|
|
49
80
|
readonly detail?: string | undefined;
|
|
50
81
|
readonly file_data?: string | undefined;
|
|
51
82
|
readonly file_url?: string | undefined;
|
|
52
|
-
} | {
|
|
53
|
-
readonly type: "input_text";
|
|
54
|
-
readonly text: string;
|
|
55
83
|
})[];
|
|
56
84
|
readonly id?: string | undefined;
|
|
57
85
|
readonly status?: string | undefined;
|
|
@@ -65,14 +93,6 @@ export declare const routes: Route<{
|
|
|
65
93
|
}[];
|
|
66
94
|
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
67
95
|
readonly status?: string | undefined;
|
|
68
|
-
} | {
|
|
69
|
-
readonly type: "reasoning";
|
|
70
|
-
readonly id?: string | undefined;
|
|
71
|
-
readonly summary: readonly {
|
|
72
|
-
readonly type: "summary_text";
|
|
73
|
-
readonly text: string;
|
|
74
|
-
}[];
|
|
75
|
-
readonly encrypted_content?: string | null | undefined;
|
|
76
96
|
} | {
|
|
77
97
|
readonly type: "function_call";
|
|
78
98
|
readonly id?: string | undefined;
|
|
@@ -80,26 +100,6 @@ export declare const routes: Route<{
|
|
|
80
100
|
readonly name: string;
|
|
81
101
|
readonly namespace?: string | undefined;
|
|
82
102
|
readonly arguments: string;
|
|
83
|
-
} | {
|
|
84
|
-
readonly type: "function_call_output";
|
|
85
|
-
readonly call_id: string;
|
|
86
|
-
readonly output: string | readonly ({
|
|
87
|
-
readonly type: "input_image";
|
|
88
|
-
readonly image_url: string;
|
|
89
|
-
readonly detail?: string | undefined;
|
|
90
|
-
} | {
|
|
91
|
-
readonly type: "input_file";
|
|
92
|
-
readonly filename: string;
|
|
93
|
-
readonly detail?: string | undefined;
|
|
94
|
-
readonly file_data?: string | undefined;
|
|
95
|
-
readonly file_url?: string | undefined;
|
|
96
|
-
} | {
|
|
97
|
-
readonly type: "input_text";
|
|
98
|
-
readonly text: string;
|
|
99
|
-
} | {
|
|
100
|
-
readonly type: "input_video";
|
|
101
|
-
readonly video_url: string;
|
|
102
|
-
})[];
|
|
103
103
|
} | {
|
|
104
104
|
readonly [x: string]: unknown;
|
|
105
105
|
readonly type: "web_search_call";
|
|
@@ -30,27 +30,10 @@ export declare const routes: Route<{
|
|
|
30
30
|
readonly contents: readonly {
|
|
31
31
|
readonly role?: "model" | "user" | null | undefined;
|
|
32
32
|
readonly parts?: readonly ({
|
|
33
|
-
readonly text: string;
|
|
34
|
-
readonly thought?: boolean | null | undefined;
|
|
35
|
-
readonly thoughtSignature?: string | null | undefined;
|
|
36
|
-
} | {
|
|
37
|
-
readonly inlineData: {
|
|
38
|
-
readonly mimeType: string;
|
|
39
|
-
readonly data: string;
|
|
40
|
-
};
|
|
41
|
-
readonly thoughtSignature?: string | null | undefined;
|
|
42
|
-
} | {
|
|
43
33
|
readonly fileData: {
|
|
44
34
|
readonly mimeType: string;
|
|
45
35
|
readonly fileUri: string;
|
|
46
36
|
};
|
|
47
|
-
} | {
|
|
48
|
-
readonly functionCall: {
|
|
49
|
-
readonly id?: string | null | undefined;
|
|
50
|
-
readonly name: string;
|
|
51
|
-
readonly args?: unknown;
|
|
52
|
-
};
|
|
53
|
-
readonly thoughtSignature?: string | null | undefined;
|
|
54
37
|
} | {
|
|
55
38
|
readonly functionResponse: {
|
|
56
39
|
readonly id?: string | undefined;
|
|
@@ -64,6 +47,23 @@ export declare const routes: Route<{
|
|
|
64
47
|
readonly thoughtSignature?: string | null | undefined;
|
|
65
48
|
}[] | undefined;
|
|
66
49
|
};
|
|
50
|
+
} | {
|
|
51
|
+
readonly text: string;
|
|
52
|
+
readonly thought?: boolean | null | undefined;
|
|
53
|
+
readonly thoughtSignature?: string | null | undefined;
|
|
54
|
+
} | {
|
|
55
|
+
readonly inlineData: {
|
|
56
|
+
readonly mimeType: string;
|
|
57
|
+
readonly data: string;
|
|
58
|
+
};
|
|
59
|
+
readonly thoughtSignature?: string | null | undefined;
|
|
60
|
+
} | {
|
|
61
|
+
readonly functionCall: {
|
|
62
|
+
readonly id?: string | null | undefined;
|
|
63
|
+
readonly name: string;
|
|
64
|
+
readonly args?: unknown;
|
|
65
|
+
};
|
|
66
|
+
readonly thoughtSignature?: string | null | undefined;
|
|
67
67
|
})[] | null | undefined;
|
|
68
68
|
}[];
|
|
69
69
|
readonly labels?: {
|
|
@@ -28,7 +28,7 @@ const route = Route.make({
|
|
|
28
28
|
providerMetadataKey: "vertex",
|
|
29
29
|
protocol,
|
|
30
30
|
endpoint: Endpoint.path(({ request }) => {
|
|
31
|
-
const model =
|
|
31
|
+
const model = request.model.id;
|
|
32
32
|
return `/${model.startsWith("endpoints/") ? model : `models/${model}`}:streamGenerateContent?alt=sse`;
|
|
33
33
|
}),
|
|
34
34
|
auth: Auth.none,
|
|
@@ -42,7 +42,7 @@ export const routes = [route];
|
|
|
42
42
|
const configuredRoute = (input, modelID) => {
|
|
43
43
|
const { accessToken: _accessToken, apiKey: _apiKey, auth: _auth, baseURL, location: inputLocation, project: inputProject, ...rest } = input;
|
|
44
44
|
const apiKey = GoogleVertexShared.apiKey(input);
|
|
45
|
-
const endpointModel =
|
|
45
|
+
const endpointModel = modelID.startsWith("endpoints/");
|
|
46
46
|
if (apiKey !== undefined && endpointModel)
|
|
47
47
|
throw new ProviderConfigurationError({
|
|
48
48
|
provider: id,
|
|
@@ -17,27 +17,10 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
17
17
|
readonly contents: readonly {
|
|
18
18
|
readonly role?: "model" | "user" | null | undefined;
|
|
19
19
|
readonly parts?: readonly ({
|
|
20
|
-
readonly inlineData: {
|
|
21
|
-
readonly mimeType: string;
|
|
22
|
-
readonly data: string;
|
|
23
|
-
};
|
|
24
|
-
readonly thoughtSignature?: string | null | undefined;
|
|
25
|
-
} | {
|
|
26
|
-
readonly text: string;
|
|
27
|
-
readonly thought?: boolean | null | undefined;
|
|
28
|
-
readonly thoughtSignature?: string | null | undefined;
|
|
29
|
-
} | {
|
|
30
20
|
readonly fileData: {
|
|
31
21
|
readonly mimeType: string;
|
|
32
22
|
readonly fileUri: string;
|
|
33
23
|
};
|
|
34
|
-
} | {
|
|
35
|
-
readonly functionCall: {
|
|
36
|
-
readonly id?: string | null | undefined;
|
|
37
|
-
readonly name: string;
|
|
38
|
-
readonly args?: unknown;
|
|
39
|
-
};
|
|
40
|
-
readonly thoughtSignature?: string | null | undefined;
|
|
41
24
|
} | {
|
|
42
25
|
readonly functionResponse: {
|
|
43
26
|
readonly id?: string | undefined;
|
|
@@ -51,6 +34,23 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
51
34
|
readonly thoughtSignature?: string | null | undefined;
|
|
52
35
|
}[] | undefined;
|
|
53
36
|
};
|
|
37
|
+
} | {
|
|
38
|
+
readonly text: string;
|
|
39
|
+
readonly thought?: boolean | null | undefined;
|
|
40
|
+
readonly thoughtSignature?: string | null | undefined;
|
|
41
|
+
} | {
|
|
42
|
+
readonly inlineData: {
|
|
43
|
+
readonly mimeType: string;
|
|
44
|
+
readonly data: string;
|
|
45
|
+
};
|
|
46
|
+
readonly thoughtSignature?: string | null | undefined;
|
|
47
|
+
} | {
|
|
48
|
+
readonly functionCall: {
|
|
49
|
+
readonly id?: string | null | undefined;
|
|
50
|
+
readonly name: string;
|
|
51
|
+
readonly args?: unknown;
|
|
52
|
+
};
|
|
53
|
+
readonly thoughtSignature?: string | null | undefined;
|
|
54
54
|
})[] | null | undefined;
|
|
55
55
|
}[];
|
|
56
56
|
readonly labels?: {
|
package/dist/providers/groq.d.ts
CHANGED
|
@@ -26,13 +26,6 @@ export declare const protocol: Protocol<{
|
|
|
26
26
|
readonly messages: readonly ({
|
|
27
27
|
readonly role: "system";
|
|
28
28
|
readonly content: string | readonly ({
|
|
29
|
-
readonly type: "text";
|
|
30
|
-
readonly text: string;
|
|
31
|
-
readonly cache_control?: {
|
|
32
|
-
readonly type: "ephemeral";
|
|
33
|
-
readonly ttl?: string | undefined;
|
|
34
|
-
} | undefined;
|
|
35
|
-
} | {
|
|
36
29
|
readonly type: "image_url";
|
|
37
30
|
readonly image_url: {
|
|
38
31
|
readonly url: string;
|
|
@@ -43,17 +36,17 @@ export declare const protocol: Protocol<{
|
|
|
43
36
|
readonly filename: string;
|
|
44
37
|
readonly file_data: string;
|
|
45
38
|
};
|
|
46
|
-
}
|
|
47
|
-
} | {
|
|
48
|
-
readonly role: "user";
|
|
49
|
-
readonly content: string | readonly ({
|
|
39
|
+
} | {
|
|
50
40
|
readonly type: "text";
|
|
51
41
|
readonly text: string;
|
|
52
42
|
readonly cache_control?: {
|
|
53
43
|
readonly type: "ephemeral";
|
|
54
44
|
readonly ttl?: string | undefined;
|
|
55
45
|
} | undefined;
|
|
56
|
-
}
|
|
46
|
+
})[];
|
|
47
|
+
} | {
|
|
48
|
+
readonly role: "user";
|
|
49
|
+
readonly content: string | readonly ({
|
|
57
50
|
readonly type: "image_url";
|
|
58
51
|
readonly image_url: {
|
|
59
52
|
readonly url: string;
|
|
@@ -64,6 +57,13 @@ export declare const protocol: Protocol<{
|
|
|
64
57
|
readonly filename: string;
|
|
65
58
|
readonly file_data: string;
|
|
66
59
|
};
|
|
60
|
+
} | {
|
|
61
|
+
readonly type: "text";
|
|
62
|
+
readonly text: string;
|
|
63
|
+
readonly cache_control?: {
|
|
64
|
+
readonly type: "ephemeral";
|
|
65
|
+
readonly ttl?: string | undefined;
|
|
66
|
+
} | undefined;
|
|
67
67
|
})[];
|
|
68
68
|
} | {
|
|
69
69
|
readonly role: "tool";
|
|
@@ -225,13 +225,6 @@ export declare const route: Route<{
|
|
|
225
225
|
readonly messages: readonly ({
|
|
226
226
|
readonly role: "system";
|
|
227
227
|
readonly content: string | readonly ({
|
|
228
|
-
readonly type: "text";
|
|
229
|
-
readonly text: string;
|
|
230
|
-
readonly cache_control?: {
|
|
231
|
-
readonly type: "ephemeral";
|
|
232
|
-
readonly ttl?: string | undefined;
|
|
233
|
-
} | undefined;
|
|
234
|
-
} | {
|
|
235
228
|
readonly type: "image_url";
|
|
236
229
|
readonly image_url: {
|
|
237
230
|
readonly url: string;
|
|
@@ -242,17 +235,17 @@ export declare const route: Route<{
|
|
|
242
235
|
readonly filename: string;
|
|
243
236
|
readonly file_data: string;
|
|
244
237
|
};
|
|
245
|
-
}
|
|
246
|
-
} | {
|
|
247
|
-
readonly role: "user";
|
|
248
|
-
readonly content: string | readonly ({
|
|
238
|
+
} | {
|
|
249
239
|
readonly type: "text";
|
|
250
240
|
readonly text: string;
|
|
251
241
|
readonly cache_control?: {
|
|
252
242
|
readonly type: "ephemeral";
|
|
253
243
|
readonly ttl?: string | undefined;
|
|
254
244
|
} | undefined;
|
|
255
|
-
}
|
|
245
|
+
})[];
|
|
246
|
+
} | {
|
|
247
|
+
readonly role: "user";
|
|
248
|
+
readonly content: string | readonly ({
|
|
256
249
|
readonly type: "image_url";
|
|
257
250
|
readonly image_url: {
|
|
258
251
|
readonly url: string;
|
|
@@ -263,6 +256,13 @@ export declare const route: Route<{
|
|
|
263
256
|
readonly filename: string;
|
|
264
257
|
readonly file_data: string;
|
|
265
258
|
};
|
|
259
|
+
} | {
|
|
260
|
+
readonly type: "text";
|
|
261
|
+
readonly text: string;
|
|
262
|
+
readonly cache_control?: {
|
|
263
|
+
readonly type: "ephemeral";
|
|
264
|
+
readonly ttl?: string | undefined;
|
|
265
|
+
} | undefined;
|
|
266
266
|
})[];
|
|
267
267
|
} | {
|
|
268
268
|
readonly role: "tool";
|