@opencode/ai 2.0.21 → 2.0.23
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/README.md +61 -1
- package/dist/cache-policy.js +10 -2
- package/dist/llm.d.ts +4 -0
- package/dist/promise.d.ts +8 -0
- package/dist/protocols/alibaba-chat.d.ts +7 -3
- package/dist/protocols/alibaba-chat.js +2 -1
- package/dist/protocols/alibaba-responses.d.ts +16 -12
- package/dist/protocols/alibaba-responses.js +3 -5
- package/dist/protocols/anthropic-messages.js +58 -51
- package/dist/protocols/bedrock-converse.js +33 -4
- package/dist/protocols/cartesia-speech.js +3 -3
- package/dist/protocols/cohere-chat.d.ts +178 -0
- package/dist/protocols/cohere-chat.js +299 -0
- package/dist/protocols/elevenlabs-speech.js +3 -3
- package/dist/protocols/gemini.d.ts +2 -2
- package/dist/protocols/gemini.js +3 -3
- package/dist/protocols/google-interactions.d.ts +236 -0
- package/dist/protocols/google-interactions.js +478 -0
- package/dist/protocols/google-speech.js +1 -1
- package/dist/protocols/google-transcription.js +1 -1
- package/dist/protocols/index.d.ts +2 -0
- package/dist/protocols/index.js +2 -0
- package/dist/protocols/meta-responses.d.ts +31 -58
- package/dist/protocols/meta-responses.js +8 -27
- package/dist/protocols/mistral-chat.d.ts +24 -9
- package/dist/protocols/mistral-chat.js +22 -10
- package/dist/protocols/open-responses.d.ts +410 -91
- package/dist/protocols/open-responses.js +25 -15
- package/dist/protocols/openai-chat.d.ts +409 -5
- package/dist/protocols/openai-chat.js +27 -26
- package/dist/protocols/openai-compatible-chat.d.ts +1 -1
- package/dist/protocols/openai-compatible-responses.d.ts +16 -4
- package/dist/protocols/openai-images.js +2 -2
- package/dist/protocols/openai-responses.d.ts +87 -223
- package/dist/protocols/openai-responses.js +10 -16
- package/dist/protocols/openai-speech.js +1 -1
- package/dist/protocols/openai-transcription.js +1 -1
- package/dist/protocols/shared.js +2 -2
- package/dist/protocols/stability-images.js +1 -1
- package/dist/protocols/utils/bedrock-media.js +2 -2
- package/dist/protocols/utils/cache.d.ts +5 -0
- package/dist/protocols/utils/cache.js +9 -1
- package/dist/protocols/utils/responses-checkpoint.js +2 -2
- package/dist/protocols/utils/responses-hosted-tools.js +1 -1
- package/dist/protocols/utils/tool-stream.d.ts +12 -0
- package/dist/protocols/utils/tool-stream.js +15 -7
- package/dist/protocols/venice-chat.d.ts +280 -0
- package/dist/protocols/venice-chat.js +283 -0
- package/dist/protocols/xai-responses.d.ts +18 -21
- package/dist/protocols/xai-responses.js +2 -8
- package/dist/protocols/zai-chat.d.ts +7 -3
- package/dist/protocols/zai-chat.js +6 -3
- package/dist/provider-error.js +27 -7
- package/dist/providers/alibaba.d.ts +17 -13
- package/dist/providers/amazon-bedrock/mantle/messages.d.ts +2 -0
- package/dist/providers/amazon-bedrock/mantle/messages.js +1 -0
- package/dist/providers/amazon-bedrock-mantle.d.ts +301 -9
- package/dist/providers/amazon-bedrock-mantle.js +28 -3
- package/dist/providers/azure.d.ts +13 -61
- package/dist/providers/baseten.d.ts +2 -2
- package/dist/providers/cerebras.d.ts +2 -2
- package/dist/providers/cloudflare-ai-gateway.d.ts +14 -62
- package/dist/providers/cloudflare-workers-ai.d.ts +2 -2
- package/dist/providers/cohere/chat.d.ts +4 -0
- package/dist/providers/cohere/chat.js +8 -0
- package/dist/providers/cohere.d.ts +395 -0
- package/dist/providers/cohere.js +48 -0
- package/dist/providers/deepinfra.d.ts +2 -2
- package/dist/providers/deepseek.d.ts +2 -2
- package/dist/providers/digitalocean.d.ts +469 -0
- package/dist/providers/digitalocean.js +53 -0
- package/dist/providers/fireworks.d.ts +2 -2
- package/dist/providers/google/interactions.d.ts +7 -0
- package/dist/providers/google/interactions.js +8 -0
- package/dist/providers/google-vertex-chat.d.ts +1 -1
- package/dist/providers/google-vertex-messages.js +1 -1
- package/dist/providers/google-vertex-responses.d.ts +16 -4
- package/dist/providers/google-vertex.d.ts +1 -1
- package/dist/providers/google.d.ts +95 -4
- package/dist/providers/google.js +8 -1
- package/dist/providers/groq.d.ts +8 -4
- package/dist/providers/groq.js +1 -1
- package/dist/providers/index.d.ts +3 -0
- package/dist/providers/index.js +3 -0
- package/dist/providers/meta.d.ts +15 -28
- package/dist/providers/minimax.d.ts +17 -5
- package/dist/providers/mistral.d.ts +10 -4
- package/dist/providers/moonshot.d.ts +17 -5
- package/dist/providers/openai-compatible-responses.d.ts +16 -4
- package/dist/providers/openai-compatible.d.ts +1 -1
- package/dist/providers/openai-options.d.ts +1 -1
- package/dist/providers/openai.d.ts +7 -31
- package/dist/providers/openrouter.d.ts +9 -5
- package/dist/providers/openrouter.js +1 -13
- package/dist/providers/togetherai.d.ts +2 -2
- package/dist/providers/venice.d.ts +183 -0
- package/dist/providers/venice.js +38 -0
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/zai-coding-plan.d.ts +17 -5
- package/dist/providers/zai.d.ts +1 -1
- package/dist/route/client.d.ts +4 -0
- package/dist/route/client.js +2 -5
- package/dist/route/executor.js +13 -6
- package/dist/route/framing.js +23 -23
- package/dist/route/transport/http.d.ts +2 -1
- package/dist/route/transport/http.js +28 -6
- package/dist/schema/events.d.ts +176 -0
- package/dist/schema/events.js +4 -0
- package/dist/schema/options.d.ts +11 -0
- package/dist/schema/options.js +15 -2
- package/dist/testing.d.ts +32 -0
- package/dist/tool-history.js +17 -3
- package/package.json +3 -3
|
@@ -64,6 +64,10 @@ declare const responsesRoute: Route<{
|
|
|
64
64
|
readonly reasoning: {
|
|
65
65
|
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
66
66
|
};
|
|
67
|
+
} | {
|
|
68
|
+
readonly [x: string]: unknown;
|
|
69
|
+
readonly type: string;
|
|
70
|
+
readonly id: string;
|
|
67
71
|
} | {
|
|
68
72
|
readonly type: "reasoning";
|
|
69
73
|
readonly summary: readonly {
|
|
@@ -140,34 +144,6 @@ declare const responsesRoute: Route<{
|
|
|
140
144
|
readonly type: "input_video";
|
|
141
145
|
readonly video_url: string;
|
|
142
146
|
})[];
|
|
143
|
-
} | {
|
|
144
|
-
readonly [x: string]: unknown;
|
|
145
|
-
readonly id: string;
|
|
146
|
-
readonly type: "computer_call";
|
|
147
|
-
readonly status?: string | undefined;
|
|
148
|
-
readonly action?: {
|
|
149
|
-
readonly [x: string]: unknown;
|
|
150
|
-
} | null | undefined;
|
|
151
|
-
readonly call_id?: string | undefined;
|
|
152
|
-
readonly pending_safety_checks?: readonly {
|
|
153
|
-
readonly [x: string]: unknown;
|
|
154
|
-
}[] | undefined;
|
|
155
|
-
} | {
|
|
156
|
-
readonly [x: string]: unknown;
|
|
157
|
-
readonly id: string;
|
|
158
|
-
readonly type: "web_search_preview_call";
|
|
159
|
-
readonly status?: string | undefined;
|
|
160
|
-
readonly action?: {
|
|
161
|
-
readonly [x: string]: unknown;
|
|
162
|
-
} | null | undefined;
|
|
163
|
-
} | {
|
|
164
|
-
readonly [x: string]: unknown;
|
|
165
|
-
readonly id: string;
|
|
166
|
-
readonly type: "image_generation_call";
|
|
167
|
-
readonly status?: string | undefined;
|
|
168
|
-
readonly result?: string | null | undefined;
|
|
169
|
-
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
170
|
-
readonly revised_prompt?: string | null | undefined;
|
|
171
147
|
})[];
|
|
172
148
|
readonly model: string;
|
|
173
149
|
readonly stream: true;
|
|
@@ -236,9 +212,10 @@ declare const responsesRoute: Route<{
|
|
|
236
212
|
readonly top_p?: number | undefined;
|
|
237
213
|
readonly frequency_penalty?: number | undefined;
|
|
238
214
|
readonly presence_penalty?: number | undefined;
|
|
215
|
+
readonly store?: boolean | undefined;
|
|
216
|
+
readonly max_output_tokens?: number | undefined;
|
|
239
217
|
readonly prompt_cache_key?: string | undefined;
|
|
240
218
|
readonly parallel_tool_calls?: boolean | undefined;
|
|
241
|
-
readonly store?: boolean | undefined;
|
|
242
219
|
readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
243
220
|
readonly truncation?: "auto" | "disabled" | undefined;
|
|
244
221
|
readonly stream_options?: {
|
|
@@ -246,7 +223,6 @@ declare const responsesRoute: Route<{
|
|
|
246
223
|
} | undefined;
|
|
247
224
|
readonly safety_identifier?: string | undefined;
|
|
248
225
|
readonly top_logprobs?: number | undefined;
|
|
249
|
-
readonly max_output_tokens?: number | undefined;
|
|
250
226
|
readonly max_tool_calls?: number | undefined;
|
|
251
227
|
}, import("../protocols/open-responses-channel.js").Prepared, {
|
|
252
228
|
endpoint: import("../route/client.js").CompactOperation;
|
|
@@ -365,9 +341,9 @@ export declare const routes: (Route<{
|
|
|
365
341
|
readonly top_p?: number | undefined;
|
|
366
342
|
readonly frequency_penalty?: number | undefined;
|
|
367
343
|
readonly presence_penalty?: number | undefined;
|
|
344
|
+
readonly store?: boolean | undefined;
|
|
368
345
|
readonly prompt_cache_key?: string | undefined;
|
|
369
346
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
370
|
-
readonly store?: boolean | undefined;
|
|
371
347
|
readonly stream_options?: {
|
|
372
348
|
readonly include_usage: boolean;
|
|
373
349
|
} | undefined;
|
|
@@ -415,6 +391,10 @@ export declare const routes: (Route<{
|
|
|
415
391
|
readonly reasoning: {
|
|
416
392
|
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
417
393
|
};
|
|
394
|
+
} | {
|
|
395
|
+
readonly [x: string]: unknown;
|
|
396
|
+
readonly type: string;
|
|
397
|
+
readonly id: string;
|
|
418
398
|
} | {
|
|
419
399
|
readonly type: "reasoning";
|
|
420
400
|
readonly summary: readonly {
|
|
@@ -491,34 +471,6 @@ export declare const routes: (Route<{
|
|
|
491
471
|
readonly type: "input_video";
|
|
492
472
|
readonly video_url: string;
|
|
493
473
|
})[];
|
|
494
|
-
} | {
|
|
495
|
-
readonly [x: string]: unknown;
|
|
496
|
-
readonly id: string;
|
|
497
|
-
readonly type: "computer_call";
|
|
498
|
-
readonly status?: string | undefined;
|
|
499
|
-
readonly action?: {
|
|
500
|
-
readonly [x: string]: unknown;
|
|
501
|
-
} | null | undefined;
|
|
502
|
-
readonly call_id?: string | undefined;
|
|
503
|
-
readonly pending_safety_checks?: readonly {
|
|
504
|
-
readonly [x: string]: unknown;
|
|
505
|
-
}[] | undefined;
|
|
506
|
-
} | {
|
|
507
|
-
readonly [x: string]: unknown;
|
|
508
|
-
readonly id: string;
|
|
509
|
-
readonly type: "web_search_preview_call";
|
|
510
|
-
readonly status?: string | undefined;
|
|
511
|
-
readonly action?: {
|
|
512
|
-
readonly [x: string]: unknown;
|
|
513
|
-
} | null | undefined;
|
|
514
|
-
} | {
|
|
515
|
-
readonly [x: string]: unknown;
|
|
516
|
-
readonly id: string;
|
|
517
|
-
readonly type: "image_generation_call";
|
|
518
|
-
readonly status?: string | undefined;
|
|
519
|
-
readonly result?: string | null | undefined;
|
|
520
|
-
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
521
|
-
readonly revised_prompt?: string | null | undefined;
|
|
522
474
|
})[];
|
|
523
475
|
readonly model: string;
|
|
524
476
|
readonly stream: true;
|
|
@@ -587,9 +539,10 @@ export declare const routes: (Route<{
|
|
|
587
539
|
readonly top_p?: number | undefined;
|
|
588
540
|
readonly frequency_penalty?: number | undefined;
|
|
589
541
|
readonly presence_penalty?: number | undefined;
|
|
542
|
+
readonly store?: boolean | undefined;
|
|
543
|
+
readonly max_output_tokens?: number | undefined;
|
|
590
544
|
readonly prompt_cache_key?: string | undefined;
|
|
591
545
|
readonly parallel_tool_calls?: boolean | undefined;
|
|
592
|
-
readonly store?: boolean | undefined;
|
|
593
546
|
readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
594
547
|
readonly truncation?: "auto" | "disabled" | undefined;
|
|
595
548
|
readonly stream_options?: {
|
|
@@ -597,7 +550,6 @@ export declare const routes: (Route<{
|
|
|
597
550
|
} | undefined;
|
|
598
551
|
readonly safety_identifier?: string | undefined;
|
|
599
552
|
readonly top_logprobs?: number | undefined;
|
|
600
|
-
readonly max_output_tokens?: number | undefined;
|
|
601
553
|
readonly max_tool_calls?: number | undefined;
|
|
602
554
|
}, import("../protocols/open-responses-channel.js").Prepared, {
|
|
603
555
|
endpoint: import("../route/client.js").CompactOperation;
|
|
@@ -126,9 +126,9 @@ export declare const route: Route<{
|
|
|
126
126
|
readonly top_p?: number | undefined;
|
|
127
127
|
readonly frequency_penalty?: number | undefined;
|
|
128
128
|
readonly presence_penalty?: number | undefined;
|
|
129
|
+
readonly store?: boolean | undefined;
|
|
129
130
|
readonly prompt_cache_key?: string | undefined;
|
|
130
131
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
131
|
-
readonly store?: boolean | undefined;
|
|
132
132
|
readonly stream_options?: {
|
|
133
133
|
readonly include_usage: boolean;
|
|
134
134
|
} | undefined;
|
|
@@ -248,9 +248,9 @@ export declare const routes: Route<{
|
|
|
248
248
|
readonly top_p?: number | undefined;
|
|
249
249
|
readonly frequency_penalty?: number | undefined;
|
|
250
250
|
readonly presence_penalty?: number | undefined;
|
|
251
|
+
readonly store?: boolean | undefined;
|
|
251
252
|
readonly prompt_cache_key?: string | undefined;
|
|
252
253
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
253
|
-
readonly store?: boolean | undefined;
|
|
254
254
|
readonly stream_options?: {
|
|
255
255
|
readonly include_usage: boolean;
|
|
256
256
|
} | undefined;
|
|
@@ -126,9 +126,9 @@ export declare const route: Route<{
|
|
|
126
126
|
readonly top_p?: number | undefined;
|
|
127
127
|
readonly frequency_penalty?: number | undefined;
|
|
128
128
|
readonly presence_penalty?: number | undefined;
|
|
129
|
+
readonly store?: boolean | undefined;
|
|
129
130
|
readonly prompt_cache_key?: string | undefined;
|
|
130
131
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
131
|
-
readonly store?: boolean | undefined;
|
|
132
132
|
readonly stream_options?: {
|
|
133
133
|
readonly include_usage: boolean;
|
|
134
134
|
} | undefined;
|
|
@@ -248,9 +248,9 @@ export declare const routes: Route<{
|
|
|
248
248
|
readonly top_p?: number | undefined;
|
|
249
249
|
readonly frequency_penalty?: number | undefined;
|
|
250
250
|
readonly presence_penalty?: number | undefined;
|
|
251
|
+
readonly store?: boolean | undefined;
|
|
251
252
|
readonly prompt_cache_key?: string | undefined;
|
|
252
253
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
253
|
-
readonly store?: boolean | undefined;
|
|
254
254
|
readonly stream_options?: {
|
|
255
255
|
readonly include_usage: boolean;
|
|
256
256
|
} | undefined;
|
|
@@ -70,6 +70,10 @@ export declare const responsesRoute: import("../route/client.js").Route<{
|
|
|
70
70
|
readonly reasoning: {
|
|
71
71
|
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
72
72
|
};
|
|
73
|
+
} | {
|
|
74
|
+
readonly [x: string]: unknown;
|
|
75
|
+
readonly type: string;
|
|
76
|
+
readonly id: string;
|
|
73
77
|
} | {
|
|
74
78
|
readonly type: "reasoning";
|
|
75
79
|
readonly summary: readonly {
|
|
@@ -146,34 +150,6 @@ export declare const responsesRoute: import("../route/client.js").Route<{
|
|
|
146
150
|
readonly type: "input_video";
|
|
147
151
|
readonly video_url: string;
|
|
148
152
|
})[];
|
|
149
|
-
} | {
|
|
150
|
-
readonly [x: string]: unknown;
|
|
151
|
-
readonly id: string;
|
|
152
|
-
readonly type: "computer_call";
|
|
153
|
-
readonly status?: string | undefined;
|
|
154
|
-
readonly action?: {
|
|
155
|
-
readonly [x: string]: unknown;
|
|
156
|
-
} | null | undefined;
|
|
157
|
-
readonly call_id?: string | undefined;
|
|
158
|
-
readonly pending_safety_checks?: readonly {
|
|
159
|
-
readonly [x: string]: unknown;
|
|
160
|
-
}[] | undefined;
|
|
161
|
-
} | {
|
|
162
|
-
readonly [x: string]: unknown;
|
|
163
|
-
readonly id: string;
|
|
164
|
-
readonly type: "web_search_preview_call";
|
|
165
|
-
readonly status?: string | undefined;
|
|
166
|
-
readonly action?: {
|
|
167
|
-
readonly [x: string]: unknown;
|
|
168
|
-
} | null | undefined;
|
|
169
|
-
} | {
|
|
170
|
-
readonly [x: string]: unknown;
|
|
171
|
-
readonly id: string;
|
|
172
|
-
readonly type: "image_generation_call";
|
|
173
|
-
readonly status?: string | undefined;
|
|
174
|
-
readonly result?: string | null | undefined;
|
|
175
|
-
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
176
|
-
readonly revised_prompt?: string | null | undefined;
|
|
177
153
|
})[];
|
|
178
154
|
readonly model: string;
|
|
179
155
|
readonly stream: true;
|
|
@@ -242,9 +218,10 @@ export declare const responsesRoute: import("../route/client.js").Route<{
|
|
|
242
218
|
readonly top_p?: number | undefined;
|
|
243
219
|
readonly frequency_penalty?: number | undefined;
|
|
244
220
|
readonly presence_penalty?: number | undefined;
|
|
221
|
+
readonly store?: boolean | undefined;
|
|
222
|
+
readonly max_output_tokens?: number | undefined;
|
|
245
223
|
readonly prompt_cache_key?: string | undefined;
|
|
246
224
|
readonly parallel_tool_calls?: boolean | undefined;
|
|
247
|
-
readonly store?: boolean | undefined;
|
|
248
225
|
readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
249
226
|
readonly truncation?: "auto" | "disabled" | undefined;
|
|
250
227
|
readonly stream_options?: {
|
|
@@ -252,7 +229,6 @@ export declare const responsesRoute: import("../route/client.js").Route<{
|
|
|
252
229
|
} | undefined;
|
|
253
230
|
readonly safety_identifier?: string | undefined;
|
|
254
231
|
readonly top_logprobs?: number | undefined;
|
|
255
|
-
readonly max_output_tokens?: number | undefined;
|
|
256
232
|
readonly max_tool_calls?: number | undefined;
|
|
257
233
|
}, import("../protocols/open-responses-channel.js").Prepared, {
|
|
258
234
|
endpoint: import("../route/client.js").CompactOperation;
|
|
@@ -645,9 +621,9 @@ export declare const route: import("../route/client.js").Route<{
|
|
|
645
621
|
readonly top_p?: number | undefined;
|
|
646
622
|
readonly frequency_penalty?: number | undefined;
|
|
647
623
|
readonly presence_penalty?: number | undefined;
|
|
624
|
+
readonly store?: boolean | undefined;
|
|
648
625
|
readonly prompt_cache_key?: string | undefined;
|
|
649
626
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
650
|
-
readonly store?: boolean | undefined;
|
|
651
627
|
readonly stream_options?: {
|
|
652
628
|
readonly include_usage: boolean;
|
|
653
629
|
} | undefined;
|
|
@@ -1039,9 +1015,9 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1039
1015
|
readonly top_p?: number | undefined;
|
|
1040
1016
|
readonly frequency_penalty?: number | undefined;
|
|
1041
1017
|
readonly presence_penalty?: number | undefined;
|
|
1018
|
+
readonly store?: boolean | undefined;
|
|
1042
1019
|
readonly prompt_cache_key?: string | undefined;
|
|
1043
1020
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
1044
|
-
readonly store?: boolean | undefined;
|
|
1045
1021
|
readonly stream_options?: {
|
|
1046
1022
|
readonly include_usage: boolean;
|
|
1047
1023
|
} | undefined;
|
|
@@ -1089,6 +1065,10 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1089
1065
|
readonly reasoning: {
|
|
1090
1066
|
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
1091
1067
|
};
|
|
1068
|
+
} | {
|
|
1069
|
+
readonly [x: string]: unknown;
|
|
1070
|
+
readonly type: string;
|
|
1071
|
+
readonly id: string;
|
|
1092
1072
|
} | {
|
|
1093
1073
|
readonly type: "reasoning";
|
|
1094
1074
|
readonly summary: readonly {
|
|
@@ -1165,34 +1145,6 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1165
1145
|
readonly type: "input_video";
|
|
1166
1146
|
readonly video_url: string;
|
|
1167
1147
|
})[];
|
|
1168
|
-
} | {
|
|
1169
|
-
readonly [x: string]: unknown;
|
|
1170
|
-
readonly id: string;
|
|
1171
|
-
readonly type: "computer_call";
|
|
1172
|
-
readonly status?: string | undefined;
|
|
1173
|
-
readonly action?: {
|
|
1174
|
-
readonly [x: string]: unknown;
|
|
1175
|
-
} | null | undefined;
|
|
1176
|
-
readonly call_id?: string | undefined;
|
|
1177
|
-
readonly pending_safety_checks?: readonly {
|
|
1178
|
-
readonly [x: string]: unknown;
|
|
1179
|
-
}[] | undefined;
|
|
1180
|
-
} | {
|
|
1181
|
-
readonly [x: string]: unknown;
|
|
1182
|
-
readonly id: string;
|
|
1183
|
-
readonly type: "web_search_preview_call";
|
|
1184
|
-
readonly status?: string | undefined;
|
|
1185
|
-
readonly action?: {
|
|
1186
|
-
readonly [x: string]: unknown;
|
|
1187
|
-
} | null | undefined;
|
|
1188
|
-
} | {
|
|
1189
|
-
readonly [x: string]: unknown;
|
|
1190
|
-
readonly id: string;
|
|
1191
|
-
readonly type: "image_generation_call";
|
|
1192
|
-
readonly status?: string | undefined;
|
|
1193
|
-
readonly result?: string | null | undefined;
|
|
1194
|
-
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
1195
|
-
readonly revised_prompt?: string | null | undefined;
|
|
1196
1148
|
})[];
|
|
1197
1149
|
readonly model: string;
|
|
1198
1150
|
readonly stream: true;
|
|
@@ -1261,9 +1213,10 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1261
1213
|
readonly top_p?: number | undefined;
|
|
1262
1214
|
readonly frequency_penalty?: number | undefined;
|
|
1263
1215
|
readonly presence_penalty?: number | undefined;
|
|
1216
|
+
readonly store?: boolean | undefined;
|
|
1217
|
+
readonly max_output_tokens?: number | undefined;
|
|
1264
1218
|
readonly prompt_cache_key?: string | undefined;
|
|
1265
1219
|
readonly parallel_tool_calls?: boolean | undefined;
|
|
1266
|
-
readonly store?: boolean | undefined;
|
|
1267
1220
|
readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
1268
1221
|
readonly truncation?: "auto" | "disabled" | undefined;
|
|
1269
1222
|
readonly stream_options?: {
|
|
@@ -1271,7 +1224,6 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1271
1224
|
} | undefined;
|
|
1272
1225
|
readonly safety_identifier?: string | undefined;
|
|
1273
1226
|
readonly top_logprobs?: number | undefined;
|
|
1274
|
-
readonly max_output_tokens?: number | undefined;
|
|
1275
1227
|
readonly max_tool_calls?: number | undefined;
|
|
1276
1228
|
}, import("../protocols/open-responses-channel.js").Prepared, {
|
|
1277
1229
|
endpoint: import("../route/client.js").CompactOperation;
|
|
@@ -130,9 +130,9 @@ export declare const route: Route<{
|
|
|
130
130
|
readonly top_p?: number | undefined;
|
|
131
131
|
readonly frequency_penalty?: number | undefined;
|
|
132
132
|
readonly presence_penalty?: number | undefined;
|
|
133
|
+
readonly store?: boolean | undefined;
|
|
133
134
|
readonly prompt_cache_key?: string | undefined;
|
|
134
135
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
135
|
-
readonly store?: boolean | undefined;
|
|
136
136
|
readonly stream_options?: {
|
|
137
137
|
readonly include_usage: boolean;
|
|
138
138
|
} | undefined;
|
|
@@ -252,9 +252,9 @@ export declare const routes: Route<{
|
|
|
252
252
|
readonly top_p?: number | undefined;
|
|
253
253
|
readonly frequency_penalty?: number | undefined;
|
|
254
254
|
readonly presence_penalty?: number | undefined;
|
|
255
|
+
readonly store?: boolean | undefined;
|
|
255
256
|
readonly prompt_cache_key?: string | undefined;
|
|
256
257
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
257
|
-
readonly store?: boolean | undefined;
|
|
258
258
|
readonly stream_options?: {
|
|
259
259
|
readonly include_usage: boolean;
|
|
260
260
|
} | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ProviderPackage } from "../../provider-package.js";
|
|
2
|
+
import { Cohere } from "../cohere.js";
|
|
3
|
+
export type Settings = Cohere.Settings<Cohere.ChatOptionsInput>;
|
|
4
|
+
export declare const model: ProviderPackage.Definition<Settings, Cohere.ChatOptionsInput>["model"];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Cohere } from "../cohere.js";
|
|
2
|
+
export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOptions }) => Cohere.configure({
|
|
3
|
+
apiKey,
|
|
4
|
+
baseURL,
|
|
5
|
+
headers,
|
|
6
|
+
http: body === undefined ? undefined : { body: { ...body } },
|
|
7
|
+
providerOptions,
|
|
8
|
+
}).chat(modelID);
|