@opencode/ai 2.1.4 → 2.2.0
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 +283 -114
- package/dist/ai-client.d.ts +2 -2
- package/dist/ai-client.js +2 -1
- package/dist/cache-policy.d.ts +4 -0
- package/dist/cache-policy.js +20 -6
- package/dist/decision-client.d.ts +21 -0
- package/dist/decision-client.js +55 -0
- package/dist/decision.d.ts +472 -0
- package/dist/decision.js +158 -0
- package/dist/effect.d.ts +38 -0
- package/dist/effect.js +27 -0
- package/dist/effort-updates.d.ts +2 -2
- package/dist/experimental/cloudflare-run-extraction.d.ts +13 -0
- package/dist/experimental/cloudflare-run-extraction.js +83 -0
- package/dist/experimental/extraction.d.ts +183 -0
- package/dist/experimental/extraction.js +102 -0
- package/dist/experimental/realtime.d.ts +7 -2
- package/dist/experimental/realtime.js +5 -5
- package/dist/experimental.d.ts +2 -3
- package/dist/experimental.js +1 -2
- package/dist/image-client.d.ts +5 -14
- package/dist/image-client.js +0 -1
- package/dist/image.d.ts +6 -176
- package/dist/image.js +4 -11
- package/dist/index.d.ts +1426 -34
- package/dist/index.js +127 -24
- package/dist/llm.d.ts +16 -1
- package/dist/llm.js +34 -0
- package/dist/media-client.d.ts +2 -1
- package/dist/media-model.d.ts +3 -0
- package/dist/media-model.js +4 -1
- package/dist/media.d.ts +0 -7
- package/dist/media.js +0 -6
- package/dist/protocols/alibaba-chat.d.ts +20 -0
- package/dist/protocols/alibaba-images.d.ts +22 -0
- package/dist/protocols/alibaba-images.js +77 -0
- package/dist/protocols/alibaba-messages.d.ts +52 -17
- package/dist/protocols/alibaba-responses.d.ts +6 -3
- package/dist/protocols/anthropic-messages.d.ts +160 -54
- package/dist/protocols/anthropic-messages.js +44 -13
- package/dist/protocols/bedrock-converse.d.ts +110 -15
- package/dist/protocols/bedrock-converse.js +112 -15
- package/dist/protocols/bedrock-event-stream.js +1 -0
- package/dist/protocols/bfl-images.d.ts +9 -0
- package/dist/protocols/bfl-images.js +17 -15
- package/dist/protocols/cartesia-speech.d.ts +0 -18
- package/dist/protocols/cloudflare-run-decisions.d.ts +9 -0
- package/dist/protocols/cloudflare-run-decisions.js +36 -0
- package/dist/protocols/cloudflare-workers-ai-images.d.ts +23 -0
- package/dist/protocols/cloudflare-workers-ai-images.js +80 -0
- package/dist/protocols/deepgram-speech.d.ts +0 -18
- package/dist/protocols/elevenlabs-speech.d.ts +0 -18
- package/dist/protocols/fal-images.d.ts +10 -1
- package/dist/protocols/fal-images.js +16 -25
- package/dist/protocols/fal-video.js +1 -1
- package/dist/protocols/gemini.d.ts +3 -0
- package/dist/protocols/gemini.js +11 -6
- package/dist/protocols/google-images.d.ts +2 -2
- package/dist/protocols/google-images.js +8 -37
- package/dist/protocols/google-interactions.d.ts +4 -0
- package/dist/protocols/google-interactions.js +12 -5
- package/dist/protocols/google-speech.d.ts +0 -18
- package/dist/protocols/google-speech.js +0 -1
- package/dist/protocols/google-transcription.d.ts +0 -18
- package/dist/protocols/google-transcription.js +0 -1
- package/dist/protocols/google-video.d.ts +1 -1
- package/dist/protocols/google-video.js +2 -7
- package/dist/protocols/index.d.ts +3 -0
- package/dist/protocols/index.js +3 -0
- package/dist/protocols/meta-images.d.ts +7 -1
- package/dist/protocols/meta-images.js +10 -8
- package/dist/protocols/meta-messages.d.ts +52 -17
- package/dist/protocols/meta-messages.js +14 -1
- package/dist/protocols/meta-responses.d.ts +6 -0
- package/dist/protocols/meta-responses.js +29 -1
- package/dist/protocols/open-responses.d.ts +30 -0
- package/dist/protocols/open-responses.js +8 -18
- package/dist/protocols/openai-chat.d.ts +713 -1
- package/dist/protocols/openai-chat.js +35 -22
- package/dist/protocols/openai-compatible-chat.d.ts +22 -1
- package/dist/protocols/openai-compatible-responses.d.ts +8 -5
- package/dist/protocols/openai-decisions.d.ts +22 -0
- package/dist/protocols/openai-decisions.js +128 -0
- package/dist/protocols/openai-images.d.ts +21 -24
- package/dist/protocols/openai-images.js +100 -34
- package/dist/protocols/openai-responses.d.ts +82 -24
- package/dist/protocols/openai-responses.js +32 -2
- package/dist/protocols/openai-speech.d.ts +0 -18
- package/dist/protocols/openai-speech.js +15 -5
- package/dist/protocols/openai-transcription.d.ts +0 -18
- package/dist/protocols/openai-transcription.js +3 -4
- package/dist/protocols/replicate-images.js +1 -1
- package/dist/protocols/runway-video.d.ts +1 -1
- package/dist/protocols/runway-video.js +1 -1
- package/dist/protocols/shared.d.ts +9 -1
- package/dist/protocols/shared.js +13 -2
- package/dist/protocols/stability-images.d.ts +5 -0
- package/dist/protocols/stability-images.js +4 -9
- package/dist/protocols/system-one.d.ts +101 -0
- package/dist/protocols/system-one.js +230 -0
- package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
- package/dist/protocols/utils/bedrock-cache.js +7 -6
- package/dist/protocols/utils/cache.d.ts +14 -3
- package/dist/protocols/utils/cache.js +11 -4
- package/dist/protocols/utils/gemini-generate-content.d.ts +3 -3
- package/dist/protocols/utils/gemini-generate-content.js +10 -16
- package/dist/protocols/utils/gemini-json-schema.d.ts +5 -0
- package/dist/protocols/utils/gemini-json-schema.js +3 -3
- package/dist/protocols/utils/image-sizing.d.ts +31 -0
- package/dist/protocols/utils/image-sizing.js +73 -0
- package/dist/protocols/utils/media-input.d.ts +4 -5
- package/dist/protocols/utils/media-input.js +8 -5
- package/dist/protocols/utils/speech-stream.d.ts +0 -1
- package/dist/protocols/utils/speech-stream.js +0 -1
- package/dist/protocols/utils/tool-schema.js +15 -5
- package/dist/protocols/utils/tool-stream.d.ts +9 -0
- package/dist/protocols/venice-chat.d.ts +19 -0
- package/dist/protocols/venice-chat.js +1 -1
- package/dist/protocols/xai-images.d.ts +1 -2
- package/dist/protocols/xai-images.js +9 -2
- package/dist/protocols/xai-responses.d.ts +10 -0
- package/dist/protocols/xai-responses.js +28 -2
- package/dist/protocols/xai-video.d.ts +1 -1
- package/dist/protocols/xai-video.js +11 -8
- package/dist/protocols/zai-chat.d.ts +21 -0
- package/dist/protocols/zai-images.d.ts +3 -1
- package/dist/protocols/zai-images.js +12 -11
- package/dist/protocols/zai-messages.d.ts +52 -17
- package/dist/provider-error.js +19 -4
- package/dist/providers/alibaba/images.d.ts +2 -0
- package/dist/providers/alibaba/images.js +1 -0
- package/dist/providers/alibaba.d.ts +79 -18
- package/dist/providers/alibaba.js +16 -8
- package/dist/providers/amazon-bedrock-mantle.d.ts +197 -138
- package/dist/providers/amazon-bedrock.d.ts +34 -14
- package/dist/providers/amazon-bedrock.js +11 -11
- package/dist/providers/anthropic-compatible.d.ts +52 -17
- package/dist/providers/anthropic.d.ts +52 -17
- package/dist/providers/azure/images.d.ts +2 -0
- package/dist/providers/azure/images.js +1 -0
- package/dist/providers/azure.d.ts +50 -9
- package/dist/providers/azure.js +19 -1
- package/dist/providers/baseten/decisions.d.ts +2 -0
- package/dist/providers/baseten/decisions.js +1 -0
- package/dist/providers/baseten.d.ts +51 -1
- package/dist/providers/baseten.js +41 -8
- package/dist/providers/cerebras.d.ts +42 -0
- package/dist/providers/cloudflare-ai-gateway/decisions.d.ts +2 -0
- package/dist/providers/cloudflare-ai-gateway/decisions.js +1 -0
- package/dist/providers/cloudflare-ai-gateway.d.ts +177 -43
- package/dist/providers/cloudflare-ai-gateway.js +32 -4
- package/dist/providers/cloudflare-workers-ai/decisions.d.ts +2 -0
- package/dist/providers/cloudflare-workers-ai/decisions.js +1 -0
- package/dist/providers/cloudflare-workers-ai/images.d.ts +2 -0
- package/dist/providers/cloudflare-workers-ai/images.js +1 -0
- package/dist/providers/cloudflare-workers-ai.d.ts +55 -1
- package/dist/providers/cloudflare-workers-ai.js +45 -9
- package/dist/providers/cohere.d.ts +42 -0
- package/dist/providers/deepinfra.d.ts +42 -0
- package/dist/providers/deepseek.d.ts +42 -0
- package/dist/providers/digitalocean/decisions.d.ts +2 -0
- package/dist/providers/digitalocean/decisions.js +1 -0
- package/dist/providers/digitalocean/images.d.ts +2 -0
- package/dist/providers/digitalocean/images.js +1 -0
- package/dist/providers/digitalocean.d.ts +72 -1
- package/dist/providers/digitalocean.js +39 -8
- package/dist/providers/fireworks.d.ts +42 -0
- package/dist/providers/google/images.d.ts +2 -0
- package/dist/providers/google/images.js +1 -0
- package/dist/providers/google-vertex/images.d.ts +2 -0
- package/dist/providers/google-vertex/images.js +1 -0
- package/dist/providers/google-vertex-chat.d.ts +21 -0
- package/dist/providers/google-vertex-messages.d.ts +52 -17
- package/dist/providers/google-vertex-responses.d.ts +3 -0
- package/dist/providers/google-vertex.d.ts +3 -1
- package/dist/providers/google-vertex.js +30 -13
- package/dist/providers/google.d.ts +5 -4
- package/dist/providers/google.js +15 -8
- package/dist/providers/groq.d.ts +42 -4
- package/dist/providers/groq.js +0 -6
- package/dist/providers/meta.d.ts +197 -138
- package/dist/providers/minimax.d.ts +76 -17
- package/dist/providers/moonshot.d.ts +76 -17
- package/dist/providers/openai/images.d.ts +2 -0
- package/dist/providers/openai/images.js +1 -0
- package/dist/providers/openai-compatible/images.d.ts +2 -0
- package/dist/providers/openai-compatible/images.js +1 -0
- package/dist/providers/openai-compatible-responses.d.ts +3 -0
- package/dist/providers/openai-compatible.d.ts +24 -1
- package/dist/providers/openai-compatible.js +21 -9
- package/dist/providers/openai-options.d.ts +3 -1
- package/dist/providers/openai.d.ts +46 -9
- package/dist/providers/openai.js +20 -4
- package/dist/providers/opencode/decisions.d.ts +2 -0
- package/dist/providers/opencode/decisions.js +1 -0
- package/dist/providers/opencode.d.ts +9 -10
- package/dist/providers/opencode.js +10 -8
- package/dist/providers/openrouter/decisions.d.ts +2 -0
- package/dist/providers/openrouter/decisions.js +1 -0
- package/dist/providers/openrouter/images.d.ts +2 -0
- package/dist/providers/openrouter/images.js +1 -0
- package/dist/providers/openrouter.d.ts +92 -11
- package/dist/providers/openrouter.js +38 -16
- package/dist/providers/togetherai.d.ts +42 -0
- package/dist/providers/typesafe-ai/decisions.d.ts +2 -0
- package/dist/providers/typesafe-ai/decisions.js +1 -0
- package/dist/providers/typesafe-ai.d.ts +9 -10
- package/dist/providers/typesafe-ai.js +10 -8
- package/dist/providers/venice.d.ts +19 -0
- package/dist/providers/vercel-ai-gateway/decisions.d.ts +2 -0
- package/dist/providers/vercel-ai-gateway/decisions.js +1 -0
- package/dist/providers/vercel-ai-gateway/images.d.ts +2 -0
- package/dist/providers/vercel-ai-gateway/images.js +1 -0
- package/dist/providers/vercel-ai-gateway.d.ts +10 -16
- package/dist/providers/vercel-ai-gateway.js +31 -85
- package/dist/providers/xai/images.d.ts +2 -0
- package/dist/providers/xai/images.js +1 -0
- package/dist/providers/xai.d.ts +28 -5
- package/dist/providers/xai.js +15 -8
- package/dist/providers/zai/images.d.ts +2 -0
- package/dist/providers/zai/images.js +1 -0
- package/dist/providers/zai-coding-plan.d.ts +76 -17
- package/dist/providers/zai.d.ts +26 -4
- package/dist/providers/zai.js +15 -8
- package/dist/route/client.d.ts +2 -2
- package/dist/route/client.js +26 -4
- package/dist/route/decision.d.ts +58 -0
- package/dist/route/decision.js +75 -0
- package/dist/route/executor.d.ts +1 -1
- package/dist/route/framing.d.ts +2 -0
- package/dist/route/index.d.ts +3 -0
- package/dist/route/index.js +3 -0
- package/dist/route/media-protocol.d.ts +1 -0
- package/dist/route/media-protocol.js +12 -8
- package/dist/route/media.d.ts +5 -1
- package/dist/route/media.js +6 -2
- package/dist/route/transport/http.js +1 -0
- package/dist/route/transport/index.d.ts +1 -0
- package/dist/schema/events.d.ts +148 -6
- package/dist/schema/events.js +20 -0
- package/dist/schema/messages.d.ts +6 -2
- package/dist/schema/messages.js +3 -0
- package/dist/schema/options.d.ts +5 -3
- package/dist/schema/options.js +8 -3
- package/dist/speech-client.d.ts +5 -14
- package/dist/speech-client.js +0 -1
- package/dist/speech.d.ts +0 -135
- package/dist/speech.js +2 -4
- package/dist/testing.d.ts +25 -24
- package/dist/testing.js +3 -21
- package/dist/transcription-client.d.ts +5 -14
- package/dist/transcription.d.ts +0 -135
- package/dist/transcription.js +1 -1
- package/dist/utils/media-type.js +22 -1
- package/dist/video-client.d.ts +5 -14
- package/dist/video-client.js +0 -1
- package/dist/video.d.ts +1 -136
- package/dist/video.js +3 -5
- package/package.json +513 -11
- package/dist/experimental/evaluation-client.d.ts +0 -21
- package/dist/experimental/evaluation-client.js +0 -64
- package/dist/experimental/evaluation.d.ts +0 -242
- package/dist/experimental/evaluation.js +0 -108
- package/dist/experimental/system-one.d.ts +0 -16
- package/dist/experimental/system-one.js +0 -135
- package/dist/promise.d.ts +0 -1021
- package/dist/promise.js +0 -101
- package/dist/provider.d.ts +0 -23
- package/dist/provider.js +0 -2
|
@@ -48,7 +48,7 @@ export declare const routes: (Route<{
|
|
|
48
48
|
readonly text: string;
|
|
49
49
|
readonly cache_control?: {
|
|
50
50
|
readonly type: "ephemeral";
|
|
51
|
-
readonly ttl?:
|
|
51
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
52
52
|
} | undefined;
|
|
53
53
|
}[] | undefined;
|
|
54
54
|
readonly messages: readonly ({
|
|
@@ -58,7 +58,7 @@ export declare const routes: (Route<{
|
|
|
58
58
|
readonly text: string;
|
|
59
59
|
readonly cache_control?: {
|
|
60
60
|
readonly type: "ephemeral";
|
|
61
|
-
readonly ttl?:
|
|
61
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
62
62
|
} | undefined;
|
|
63
63
|
} | {
|
|
64
64
|
readonly type: "image";
|
|
@@ -75,11 +75,28 @@ export declare const routes: (Route<{
|
|
|
75
75
|
};
|
|
76
76
|
readonly cache_control?: {
|
|
77
77
|
readonly type: "ephemeral";
|
|
78
|
-
readonly ttl?:
|
|
78
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
79
79
|
} | undefined;
|
|
80
80
|
readonly transformations?: {
|
|
81
81
|
readonly oversized_image?: "downsize" | "error" | undefined;
|
|
82
82
|
} | undefined;
|
|
83
|
+
} | {
|
|
84
|
+
readonly type: "video";
|
|
85
|
+
readonly source: {
|
|
86
|
+
readonly type: "base64";
|
|
87
|
+
readonly media_type: string;
|
|
88
|
+
readonly data: string;
|
|
89
|
+
} | {
|
|
90
|
+
readonly type: "url";
|
|
91
|
+
readonly url: string;
|
|
92
|
+
} | {
|
|
93
|
+
readonly type: "file";
|
|
94
|
+
readonly file_id: string;
|
|
95
|
+
};
|
|
96
|
+
readonly cache_control?: {
|
|
97
|
+
readonly type: "ephemeral";
|
|
98
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
99
|
+
} | undefined;
|
|
83
100
|
} | {
|
|
84
101
|
readonly type: "document";
|
|
85
102
|
readonly source: {
|
|
@@ -99,7 +116,7 @@ export declare const routes: (Route<{
|
|
|
99
116
|
};
|
|
100
117
|
readonly cache_control?: {
|
|
101
118
|
readonly type: "ephemeral";
|
|
102
|
-
readonly ttl?:
|
|
119
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
103
120
|
} | undefined;
|
|
104
121
|
readonly title?: string | undefined;
|
|
105
122
|
readonly context?: string | undefined;
|
|
@@ -114,7 +131,7 @@ export declare const routes: (Route<{
|
|
|
114
131
|
readonly text: string;
|
|
115
132
|
readonly cache_control?: {
|
|
116
133
|
readonly type: "ephemeral";
|
|
117
|
-
readonly ttl?:
|
|
134
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
118
135
|
} | undefined;
|
|
119
136
|
} | {
|
|
120
137
|
readonly type: "image";
|
|
@@ -131,11 +148,28 @@ export declare const routes: (Route<{
|
|
|
131
148
|
};
|
|
132
149
|
readonly cache_control?: {
|
|
133
150
|
readonly type: "ephemeral";
|
|
134
|
-
readonly ttl?:
|
|
151
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
135
152
|
} | undefined;
|
|
136
153
|
readonly transformations?: {
|
|
137
154
|
readonly oversized_image?: "downsize" | "error" | undefined;
|
|
138
155
|
} | undefined;
|
|
156
|
+
} | {
|
|
157
|
+
readonly type: "video";
|
|
158
|
+
readonly source: {
|
|
159
|
+
readonly type: "base64";
|
|
160
|
+
readonly media_type: string;
|
|
161
|
+
readonly data: string;
|
|
162
|
+
} | {
|
|
163
|
+
readonly type: "url";
|
|
164
|
+
readonly url: string;
|
|
165
|
+
} | {
|
|
166
|
+
readonly type: "file";
|
|
167
|
+
readonly file_id: string;
|
|
168
|
+
};
|
|
169
|
+
readonly cache_control?: {
|
|
170
|
+
readonly type: "ephemeral";
|
|
171
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
172
|
+
} | undefined;
|
|
139
173
|
} | {
|
|
140
174
|
readonly type: "document";
|
|
141
175
|
readonly source: {
|
|
@@ -155,7 +189,7 @@ export declare const routes: (Route<{
|
|
|
155
189
|
};
|
|
156
190
|
readonly cache_control?: {
|
|
157
191
|
readonly type: "ephemeral";
|
|
158
|
-
readonly ttl?:
|
|
192
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
159
193
|
} | undefined;
|
|
160
194
|
readonly title?: string | undefined;
|
|
161
195
|
readonly context?: string | undefined;
|
|
@@ -166,7 +200,7 @@ export declare const routes: (Route<{
|
|
|
166
200
|
readonly is_error?: boolean | undefined;
|
|
167
201
|
readonly cache_control?: {
|
|
168
202
|
readonly type: "ephemeral";
|
|
169
|
-
readonly ttl?:
|
|
203
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
170
204
|
} | undefined;
|
|
171
205
|
})[];
|
|
172
206
|
} | {
|
|
@@ -179,7 +213,7 @@ export declare const routes: (Route<{
|
|
|
179
213
|
readonly text: string;
|
|
180
214
|
readonly cache_control?: {
|
|
181
215
|
readonly type: "ephemeral";
|
|
182
|
-
readonly ttl?:
|
|
216
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
183
217
|
} | undefined;
|
|
184
218
|
} | {
|
|
185
219
|
readonly type: "thinking";
|
|
@@ -187,14 +221,14 @@ export declare const routes: (Route<{
|
|
|
187
221
|
readonly signature: string;
|
|
188
222
|
readonly cache_control?: {
|
|
189
223
|
readonly type: "ephemeral";
|
|
190
|
-
readonly ttl?:
|
|
224
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
191
225
|
} | undefined;
|
|
192
226
|
} | {
|
|
193
227
|
readonly type: "redacted_thinking";
|
|
194
228
|
readonly data: string;
|
|
195
229
|
readonly cache_control?: {
|
|
196
230
|
readonly type: "ephemeral";
|
|
197
|
-
readonly ttl?:
|
|
231
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
198
232
|
} | undefined;
|
|
199
233
|
} | {
|
|
200
234
|
readonly type: "tool_use";
|
|
@@ -203,7 +237,7 @@ export declare const routes: (Route<{
|
|
|
203
237
|
readonly input: unknown;
|
|
204
238
|
readonly cache_control?: {
|
|
205
239
|
readonly type: "ephemeral";
|
|
206
|
-
readonly ttl?:
|
|
240
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
207
241
|
} | undefined;
|
|
208
242
|
} | {
|
|
209
243
|
readonly type: "server_tool_use";
|
|
@@ -212,7 +246,7 @@ export declare const routes: (Route<{
|
|
|
212
246
|
readonly input: unknown;
|
|
213
247
|
readonly cache_control?: {
|
|
214
248
|
readonly type: "ephemeral";
|
|
215
|
-
readonly ttl?:
|
|
249
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
216
250
|
} | undefined;
|
|
217
251
|
} | {
|
|
218
252
|
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
@@ -220,7 +254,7 @@ export declare const routes: (Route<{
|
|
|
220
254
|
readonly content: unknown;
|
|
221
255
|
readonly cache_control?: {
|
|
222
256
|
readonly type: "ephemeral";
|
|
223
|
-
readonly ttl?:
|
|
257
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
224
258
|
} | undefined;
|
|
225
259
|
})[];
|
|
226
260
|
} | {
|
|
@@ -230,7 +264,7 @@ export declare const routes: (Route<{
|
|
|
230
264
|
readonly text: string;
|
|
231
265
|
readonly cache_control?: {
|
|
232
266
|
readonly type: "ephemeral";
|
|
233
|
-
readonly ttl?:
|
|
267
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
234
268
|
} | undefined;
|
|
235
269
|
}[];
|
|
236
270
|
readonly output_config?: {
|
|
@@ -245,7 +279,7 @@ export declare const routes: (Route<{
|
|
|
245
279
|
};
|
|
246
280
|
readonly cache_control?: {
|
|
247
281
|
readonly type: "ephemeral";
|
|
248
|
-
readonly ttl?:
|
|
282
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
249
283
|
} | undefined;
|
|
250
284
|
}[] | undefined;
|
|
251
285
|
readonly tool_choice?: {
|
|
@@ -289,7 +323,7 @@ export declare const routes: (Route<{
|
|
|
289
323
|
} | undefined;
|
|
290
324
|
readonly cache_control?: {
|
|
291
325
|
readonly type: "ephemeral";
|
|
292
|
-
readonly ttl?:
|
|
326
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
293
327
|
} | undefined;
|
|
294
328
|
readonly container?: string | {
|
|
295
329
|
readonly id?: string | null | undefined;
|
|
@@ -302,127 +336,7 @@ export declare const routes: (Route<{
|
|
|
302
336
|
readonly user_id?: string | null | undefined;
|
|
303
337
|
} | undefined;
|
|
304
338
|
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
|
|
305
|
-
|
|
306
|
-
readonly model: string;
|
|
307
|
-
readonly messages: readonly ({
|
|
308
|
-
readonly role: "system";
|
|
309
|
-
readonly content: string | readonly ({
|
|
310
|
-
readonly type: "image_url";
|
|
311
|
-
readonly image_url: {
|
|
312
|
-
readonly url: string;
|
|
313
|
-
};
|
|
314
|
-
} | {
|
|
315
|
-
readonly type: "file";
|
|
316
|
-
readonly file: {
|
|
317
|
-
readonly filename: string;
|
|
318
|
-
readonly file_data: string;
|
|
319
|
-
};
|
|
320
|
-
} | {
|
|
321
|
-
readonly type: "text";
|
|
322
|
-
readonly text: string;
|
|
323
|
-
readonly cache_control?: {
|
|
324
|
-
readonly type: "ephemeral";
|
|
325
|
-
readonly ttl?: string | undefined;
|
|
326
|
-
} | undefined;
|
|
327
|
-
})[];
|
|
328
|
-
} | {
|
|
329
|
-
readonly role: "user";
|
|
330
|
-
readonly content: string | readonly ({
|
|
331
|
-
readonly type: "image_url";
|
|
332
|
-
readonly image_url: {
|
|
333
|
-
readonly url: string;
|
|
334
|
-
};
|
|
335
|
-
} | {
|
|
336
|
-
readonly type: "file";
|
|
337
|
-
readonly file: {
|
|
338
|
-
readonly filename: string;
|
|
339
|
-
readonly file_data: string;
|
|
340
|
-
};
|
|
341
|
-
} | {
|
|
342
|
-
readonly type: "text";
|
|
343
|
-
readonly text: string;
|
|
344
|
-
readonly cache_control?: {
|
|
345
|
-
readonly type: "ephemeral";
|
|
346
|
-
readonly ttl?: string | undefined;
|
|
347
|
-
} | undefined;
|
|
348
|
-
})[];
|
|
349
|
-
} | {
|
|
350
|
-
readonly role: "tool";
|
|
351
|
-
readonly tool_call_id: string;
|
|
352
|
-
readonly content: string | readonly {
|
|
353
|
-
readonly type: "text";
|
|
354
|
-
readonly text: string;
|
|
355
|
-
readonly cache_control?: {
|
|
356
|
-
readonly type: "ephemeral";
|
|
357
|
-
readonly ttl?: string | undefined;
|
|
358
|
-
} | undefined;
|
|
359
|
-
}[];
|
|
360
|
-
} | {
|
|
361
|
-
readonly [x: string]: unknown;
|
|
362
|
-
readonly role: "assistant";
|
|
363
|
-
readonly content: string | readonly {
|
|
364
|
-
readonly type: "text";
|
|
365
|
-
readonly text: string;
|
|
366
|
-
readonly cache_control?: {
|
|
367
|
-
readonly type: "ephemeral";
|
|
368
|
-
readonly ttl?: string | undefined;
|
|
369
|
-
} | undefined;
|
|
370
|
-
}[] | null;
|
|
371
|
-
readonly tool_calls?: readonly {
|
|
372
|
-
readonly id: string;
|
|
373
|
-
readonly type: "function";
|
|
374
|
-
readonly function: {
|
|
375
|
-
readonly name: string;
|
|
376
|
-
readonly arguments: string;
|
|
377
|
-
};
|
|
378
|
-
readonly extra_content?: {
|
|
379
|
-
readonly google: {
|
|
380
|
-
readonly thought_signature: string;
|
|
381
|
-
};
|
|
382
|
-
} | undefined;
|
|
383
|
-
}[] | undefined;
|
|
384
|
-
readonly reasoning_content?: string | undefined;
|
|
385
|
-
readonly reasoning?: string | undefined;
|
|
386
|
-
readonly reasoning_text?: string | undefined;
|
|
387
|
-
readonly reasoning_details?: unknown;
|
|
388
|
-
})[];
|
|
389
|
-
readonly tools?: readonly {
|
|
390
|
-
readonly type: "function";
|
|
391
|
-
readonly function: {
|
|
392
|
-
readonly name: string;
|
|
393
|
-
readonly description: string;
|
|
394
|
-
readonly parameters: {
|
|
395
|
-
readonly [x: string]: unknown;
|
|
396
|
-
};
|
|
397
|
-
readonly strict?: boolean | undefined;
|
|
398
|
-
};
|
|
399
|
-
readonly cache_control?: {
|
|
400
|
-
readonly type: "ephemeral";
|
|
401
|
-
readonly ttl?: string | undefined;
|
|
402
|
-
} | undefined;
|
|
403
|
-
}[] | undefined;
|
|
404
|
-
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
405
|
-
readonly type: "function";
|
|
406
|
-
readonly function: {
|
|
407
|
-
readonly name: string;
|
|
408
|
-
};
|
|
409
|
-
} | undefined;
|
|
410
|
-
readonly stream: true;
|
|
411
|
-
readonly stream_options?: {
|
|
412
|
-
readonly include_usage: boolean;
|
|
413
|
-
} | undefined;
|
|
414
|
-
readonly store?: boolean | undefined;
|
|
415
|
-
readonly prompt_cache_key?: string | undefined;
|
|
416
|
-
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
417
|
-
readonly tool_stream?: boolean | undefined;
|
|
418
|
-
readonly max_completion_tokens?: number | undefined;
|
|
419
|
-
readonly max_tokens?: number | undefined;
|
|
420
|
-
readonly temperature?: number | undefined;
|
|
421
|
-
readonly top_p?: number | undefined;
|
|
422
|
-
readonly frequency_penalty?: number | undefined;
|
|
423
|
-
readonly presence_penalty?: number | undefined;
|
|
424
|
-
readonly seed?: number | undefined;
|
|
425
|
-
readonly stop?: readonly string[] | undefined;
|
|
339
|
+
readonly speed?: import("../schema/options.js").OpenString<"fast" | "standard"> | undefined;
|
|
426
340
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
|
|
427
341
|
readonly model: string;
|
|
428
342
|
readonly input: readonly ({
|
|
@@ -476,6 +390,9 @@ export declare const routes: (Route<{
|
|
|
476
390
|
readonly content: readonly ({
|
|
477
391
|
readonly type: "input_text";
|
|
478
392
|
readonly text: string;
|
|
393
|
+
} | {
|
|
394
|
+
readonly type: "input_video";
|
|
395
|
+
readonly video_url: string;
|
|
479
396
|
} | {
|
|
480
397
|
readonly type: "input_image";
|
|
481
398
|
readonly image_url: string;
|
|
@@ -600,6 +517,148 @@ export declare const routes: (Route<{
|
|
|
600
517
|
readonly presence_penalty?: number | undefined;
|
|
601
518
|
readonly frequency_penalty?: number | undefined;
|
|
602
519
|
readonly stream: true;
|
|
520
|
+
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
|
|
521
|
+
readonly model: string;
|
|
522
|
+
readonly messages: readonly ({
|
|
523
|
+
readonly role: "system";
|
|
524
|
+
readonly content: string | readonly ({
|
|
525
|
+
readonly type: "image_url";
|
|
526
|
+
readonly image_url: {
|
|
527
|
+
readonly url: string;
|
|
528
|
+
};
|
|
529
|
+
} | {
|
|
530
|
+
readonly type: "video_url";
|
|
531
|
+
readonly video_url: {
|
|
532
|
+
readonly url: string;
|
|
533
|
+
};
|
|
534
|
+
} | {
|
|
535
|
+
readonly type: "file";
|
|
536
|
+
readonly file: {
|
|
537
|
+
readonly filename: string;
|
|
538
|
+
readonly file_data: string;
|
|
539
|
+
};
|
|
540
|
+
} | {
|
|
541
|
+
readonly type: "text";
|
|
542
|
+
readonly text: string;
|
|
543
|
+
readonly cache_control?: {
|
|
544
|
+
readonly type: "ephemeral";
|
|
545
|
+
readonly ttl?: string | undefined;
|
|
546
|
+
} | undefined;
|
|
547
|
+
})[];
|
|
548
|
+
} | {
|
|
549
|
+
readonly role: "user";
|
|
550
|
+
readonly content: string | readonly ({
|
|
551
|
+
readonly type: "image_url";
|
|
552
|
+
readonly image_url: {
|
|
553
|
+
readonly url: string;
|
|
554
|
+
};
|
|
555
|
+
} | {
|
|
556
|
+
readonly type: "video_url";
|
|
557
|
+
readonly video_url: {
|
|
558
|
+
readonly url: string;
|
|
559
|
+
};
|
|
560
|
+
} | {
|
|
561
|
+
readonly type: "file";
|
|
562
|
+
readonly file: {
|
|
563
|
+
readonly filename: string;
|
|
564
|
+
readonly file_data: string;
|
|
565
|
+
};
|
|
566
|
+
} | {
|
|
567
|
+
readonly type: "text";
|
|
568
|
+
readonly text: string;
|
|
569
|
+
readonly cache_control?: {
|
|
570
|
+
readonly type: "ephemeral";
|
|
571
|
+
readonly ttl?: string | undefined;
|
|
572
|
+
} | undefined;
|
|
573
|
+
})[];
|
|
574
|
+
} | {
|
|
575
|
+
readonly role: "tool";
|
|
576
|
+
readonly tool_call_id: string;
|
|
577
|
+
readonly content: string | readonly {
|
|
578
|
+
readonly type: "text";
|
|
579
|
+
readonly text: string;
|
|
580
|
+
readonly cache_control?: {
|
|
581
|
+
readonly type: "ephemeral";
|
|
582
|
+
readonly ttl?: string | undefined;
|
|
583
|
+
} | undefined;
|
|
584
|
+
}[];
|
|
585
|
+
} | {
|
|
586
|
+
readonly [x: string]: unknown;
|
|
587
|
+
readonly role: "assistant";
|
|
588
|
+
readonly content: string | readonly {
|
|
589
|
+
readonly type: "text";
|
|
590
|
+
readonly text: string;
|
|
591
|
+
readonly cache_control?: {
|
|
592
|
+
readonly type: "ephemeral";
|
|
593
|
+
readonly ttl?: string | undefined;
|
|
594
|
+
} | undefined;
|
|
595
|
+
}[] | null;
|
|
596
|
+
readonly tool_calls?: readonly {
|
|
597
|
+
readonly id: string;
|
|
598
|
+
readonly type: "function";
|
|
599
|
+
readonly function: {
|
|
600
|
+
readonly name: string;
|
|
601
|
+
readonly arguments: string;
|
|
602
|
+
};
|
|
603
|
+
readonly extra_content?: {
|
|
604
|
+
readonly google: {
|
|
605
|
+
readonly thought_signature: string;
|
|
606
|
+
};
|
|
607
|
+
} | undefined;
|
|
608
|
+
}[] | undefined;
|
|
609
|
+
readonly reasoning_content?: string | undefined;
|
|
610
|
+
readonly reasoning?: string | undefined;
|
|
611
|
+
readonly reasoning_text?: string | undefined;
|
|
612
|
+
readonly reasoning_details?: unknown;
|
|
613
|
+
})[];
|
|
614
|
+
readonly tools?: readonly {
|
|
615
|
+
readonly type: "function";
|
|
616
|
+
readonly function: {
|
|
617
|
+
readonly name: string;
|
|
618
|
+
readonly description: string;
|
|
619
|
+
readonly parameters: {
|
|
620
|
+
readonly [x: string]: unknown;
|
|
621
|
+
};
|
|
622
|
+
readonly strict?: boolean | undefined;
|
|
623
|
+
};
|
|
624
|
+
readonly cache_control?: {
|
|
625
|
+
readonly type: "ephemeral";
|
|
626
|
+
readonly ttl?: string | undefined;
|
|
627
|
+
} | undefined;
|
|
628
|
+
}[] | undefined;
|
|
629
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
630
|
+
readonly type: "function";
|
|
631
|
+
readonly function: {
|
|
632
|
+
readonly name: string;
|
|
633
|
+
};
|
|
634
|
+
} | undefined;
|
|
635
|
+
readonly stream: true;
|
|
636
|
+
readonly stream_options?: {
|
|
637
|
+
readonly include_usage: boolean;
|
|
638
|
+
} | undefined;
|
|
639
|
+
readonly store?: boolean | undefined;
|
|
640
|
+
readonly prompt_cache_key?: string | undefined;
|
|
641
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
642
|
+
readonly prompt_cache_options?: {
|
|
643
|
+
readonly ttl?: string | undefined;
|
|
644
|
+
} | undefined;
|
|
645
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
646
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
647
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
648
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
649
|
+
readonly metadata?: {
|
|
650
|
+
readonly [x: string]: string;
|
|
651
|
+
} | undefined;
|
|
652
|
+
readonly safety_identifier?: string | undefined;
|
|
653
|
+
readonly tool_stream?: boolean | undefined;
|
|
654
|
+
readonly max_completion_tokens?: number | undefined;
|
|
655
|
+
readonly max_tokens?: number | undefined;
|
|
656
|
+
readonly temperature?: number | undefined;
|
|
657
|
+
readonly top_p?: number | undefined;
|
|
658
|
+
readonly frequency_penalty?: number | undefined;
|
|
659
|
+
readonly presence_penalty?: number | undefined;
|
|
660
|
+
readonly seed?: number | undefined;
|
|
661
|
+
readonly stop?: readonly string[] | undefined;
|
|
603
662
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>)[];
|
|
604
663
|
export declare const configure: (input?: Config) => {
|
|
605
664
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
@@ -18,8 +18,9 @@ export type Config = RouteDefaultsInput & {
|
|
|
18
18
|
readonly region?: string;
|
|
19
19
|
/** Override the computed `https://bedrock-runtime.<region>.amazonaws.com` URL. */
|
|
20
20
|
readonly baseURL?: string;
|
|
21
|
+
readonly providerOptions?: BedrockConverse.OptionsInput;
|
|
21
22
|
};
|
|
22
|
-
export
|
|
23
|
+
export type Settings = ProviderPackage.Settings & BedrockConverse.OptionsInput & {
|
|
23
24
|
readonly apiKey?: string;
|
|
24
25
|
readonly auth?: "bearer" | "sigv4";
|
|
25
26
|
readonly baseURL?: string;
|
|
@@ -27,8 +28,7 @@ export interface Settings extends ProviderPackage.Settings {
|
|
|
27
28
|
readonly profile?: string;
|
|
28
29
|
readonly region?: string;
|
|
29
30
|
readonly topP?: number;
|
|
30
|
-
|
|
31
|
-
}
|
|
31
|
+
};
|
|
32
32
|
export declare const routes: import("../route/client.js").Route<{
|
|
33
33
|
readonly modelId: string;
|
|
34
34
|
readonly messages: readonly ({
|
|
@@ -36,7 +36,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
36
36
|
readonly content: readonly ({
|
|
37
37
|
readonly cachePoint: {
|
|
38
38
|
readonly type: "default";
|
|
39
|
-
readonly ttl?:
|
|
39
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
40
40
|
};
|
|
41
41
|
} | {
|
|
42
42
|
readonly image: {
|
|
@@ -86,7 +86,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
86
86
|
readonly content: readonly ({
|
|
87
87
|
readonly cachePoint: {
|
|
88
88
|
readonly type: "default";
|
|
89
|
-
readonly ttl?:
|
|
89
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
90
90
|
};
|
|
91
91
|
} | {
|
|
92
92
|
readonly text: string;
|
|
@@ -110,7 +110,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
110
110
|
readonly system?: readonly ({
|
|
111
111
|
readonly cachePoint: {
|
|
112
112
|
readonly type: "default";
|
|
113
|
-
readonly ttl?:
|
|
113
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
114
114
|
};
|
|
115
115
|
} | {
|
|
116
116
|
readonly text: string;
|
|
@@ -125,7 +125,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
125
125
|
readonly tools: readonly ({
|
|
126
126
|
readonly cachePoint: {
|
|
127
127
|
readonly type: "default";
|
|
128
|
-
readonly ttl?:
|
|
128
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
129
129
|
};
|
|
130
130
|
} | {
|
|
131
131
|
readonly toolSpec: {
|
|
@@ -151,22 +151,42 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
151
151
|
readonly additionalModelRequestFields?: {
|
|
152
152
|
readonly [x: string]: unknown;
|
|
153
153
|
} | undefined;
|
|
154
|
+
readonly serviceTier?: {
|
|
155
|
+
readonly type: import("../schema/options.js").OpenString<"default" | "flex" | "priority" | "reserved">;
|
|
156
|
+
} | undefined;
|
|
157
|
+
readonly guardrailConfig?: {
|
|
158
|
+
readonly guardrailIdentifier: string;
|
|
159
|
+
readonly guardrailVersion: string;
|
|
160
|
+
readonly trace?: import("../schema/options.js").OpenString<"disabled" | "enabled" | "enabled_full"> | undefined;
|
|
161
|
+
readonly streamProcessingMode?: import("../schema/options.js").OpenString<"async" | "sync"> | undefined;
|
|
162
|
+
} | undefined;
|
|
163
|
+
readonly outputConfig?: {
|
|
164
|
+
readonly textFormat: {
|
|
165
|
+
readonly type: import("../schema/options.js").OpenString<"json_schema">;
|
|
166
|
+
readonly structure: {
|
|
167
|
+
readonly jsonSchema: {
|
|
168
|
+
readonly schema: string;
|
|
169
|
+
readonly name?: string | undefined;
|
|
170
|
+
readonly description?: string | undefined;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
} | undefined;
|
|
175
|
+
readonly requestMetadata?: {
|
|
176
|
+
readonly [x: string]: string;
|
|
177
|
+
} | undefined;
|
|
154
178
|
}, import("../route/transport/http.js").HttpPrepared<{
|
|
155
179
|
readonly [x: string]: unknown;
|
|
156
180
|
readonly rawBody: string;
|
|
157
181
|
}>, import("../route/client.js").CompactionOperations | undefined>[];
|
|
158
182
|
export declare const configure: (input?: Config) => {
|
|
159
183
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
160
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
161
|
-
readonly [x: string]: unknown;
|
|
162
|
-
}, import("../route/client.js").CompactionOperations | undefined>;
|
|
184
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<BedrockConverse.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
163
185
|
configure: typeof configure;
|
|
164
186
|
};
|
|
165
187
|
export declare const provider: {
|
|
166
188
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
167
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
168
|
-
readonly [x: string]: unknown;
|
|
169
|
-
}, import("../route/client.js").CompactionOperations | undefined>;
|
|
189
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<BedrockConverse.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
170
190
|
configure: typeof configure;
|
|
171
191
|
};
|
|
172
|
-
export declare const model: ProviderPackage.Definition<Settings>["model"];
|
|
192
|
+
export declare const model: ProviderPackage.Definition<Settings, BedrockConverse.OptionsInput>["model"];
|
|
@@ -28,15 +28,15 @@ export const configure = (input = {}) => {
|
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
30
|
export const provider = configure();
|
|
31
|
-
export const model = (modelID,
|
|
32
|
-
apiKey
|
|
33
|
-
auth
|
|
34
|
-
baseURL
|
|
35
|
-
credentials
|
|
36
|
-
generation:
|
|
37
|
-
headers:
|
|
38
|
-
http:
|
|
39
|
-
providerOptions
|
|
40
|
-
profile
|
|
41
|
-
region
|
|
31
|
+
export const model = (modelID, { apiKey, auth, baseURL, credentials, profile, region, topP, headers, body, ...providerOptions }) => configure({
|
|
32
|
+
apiKey,
|
|
33
|
+
auth,
|
|
34
|
+
baseURL,
|
|
35
|
+
credentials,
|
|
36
|
+
generation: topP === undefined ? undefined : { topP },
|
|
37
|
+
headers: headers === undefined ? undefined : { ...headers },
|
|
38
|
+
http: body === undefined ? undefined : { body: { ...body } },
|
|
39
|
+
providerOptions,
|
|
40
|
+
profile,
|
|
41
|
+
region,
|
|
42
42
|
}).model(modelID);
|