@opencode-ai/ai 0.0.0-dev-17675 → 0.0.0-dev-17684
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 +16 -4
- package/dist/cache-policy.js +3 -5
- package/dist/protocols/anthropic-messages.d.ts +25 -28
- package/dist/protocols/anthropic-messages.js +3 -3
- package/dist/protocols/gemini.d.ts +5 -9
- package/dist/protocols/gemini.js +2 -3
- package/dist/protocols/open-responses.d.ts +33 -33
- package/dist/protocols/open-responses.js +1 -1
- package/dist/protocols/openai-chat.d.ts +15 -15
- package/dist/protocols/openai-compatible-chat.d.ts +3 -3
- package/dist/protocols/openai-compatible-responses.d.ts +4 -4
- package/dist/protocols/openai-responses.d.ts +28 -28
- package/dist/protocols/openai-responses.js +1 -1
- package/dist/protocols/shared.d.ts +8 -14
- package/dist/protocols/shared.js +8 -14
- package/dist/protocols/utils/bedrock-cache.js +3 -4
- package/dist/protocols/utils/cache.js +3 -6
- package/dist/protocols/utils/open-responses-options.d.ts +10 -5
- package/dist/protocols/utils/open-responses-options.js +5 -3
- package/dist/protocols/utils/openai-options.d.ts +6 -4
- package/dist/protocols/utils/openai-options.js +3 -3
- package/dist/providers/amazon-bedrock-mantle.d.ts +18 -18
- package/dist/providers/amazon-bedrock.d.ts +3 -9
- package/dist/providers/anthropic-compatible.d.ts +11 -11
- package/dist/providers/anthropic.d.ts +12 -12
- package/dist/providers/azure.d.ts +15 -15
- package/dist/providers/cloudflare.d.ts +11 -11
- package/dist/providers/google-vertex-chat.d.ts +5 -5
- package/dist/providers/google-vertex-messages.d.ts +11 -11
- package/dist/providers/google-vertex-responses.d.ts +6 -6
- package/dist/providers/google-vertex-responses.js +1 -1
- package/dist/providers/google-vertex.d.ts +5 -7
- package/dist/providers/google-vertex.js +1 -1
- package/dist/providers/google.d.ts +4 -4
- package/dist/providers/open-responses-options.d.ts +1 -4
- package/dist/providers/openai-compatible-responses.d.ts +6 -6
- package/dist/providers/openai-compatible.d.ts +12 -12
- package/dist/providers/openai-options.d.ts +2 -4
- package/dist/providers/openai-options.js +3 -3
- package/dist/providers/openai.d.ts +19 -19
- package/dist/providers/openrouter.d.ts +15 -17
- package/dist/providers/openrouter.js +1 -1
- package/dist/providers/xai.d.ts +21 -23
- package/dist/providers/xai.js +1 -1
- package/dist/route/client.d.ts +1 -3
- package/dist/route/framing.d.ts +2 -2
- package/dist/route/protocol.d.ts +1 -2
- package/dist/route/protocol.js +1 -2
- package/dist/schema/errors.js +2 -1
- package/dist/schema/events.d.ts +5 -3
- package/dist/schema/events.js +5 -2
- package/dist/schema/ids.d.ts +0 -13
- package/dist/schema/ids.js +0 -9
- package/dist/schema/messages.d.ts +7 -7
- package/dist/schema/messages.js +5 -2
- package/dist/schema/options.d.ts +6 -8
- package/dist/schema/options.js +6 -18
- package/package.json +3 -3
|
@@ -146,25 +146,19 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
146
146
|
export declare const configure: (input?: Config) => {
|
|
147
147
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
148
148
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
|
|
149
|
-
readonly [x: string]:
|
|
150
|
-
readonly [x: string]: unknown;
|
|
151
|
-
};
|
|
149
|
+
readonly [x: string]: unknown;
|
|
152
150
|
}>;
|
|
153
151
|
configure: (input?: Config) => /*elided*/ any;
|
|
154
152
|
};
|
|
155
153
|
export declare const provider: {
|
|
156
154
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
157
155
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
|
|
158
|
-
readonly [x: string]:
|
|
159
|
-
readonly [x: string]: unknown;
|
|
160
|
-
};
|
|
156
|
+
readonly [x: string]: unknown;
|
|
161
157
|
}>;
|
|
162
158
|
configure: (input?: Config) => {
|
|
163
159
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
164
160
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
|
|
165
|
-
readonly [x: string]:
|
|
166
|
-
readonly [x: string]: unknown;
|
|
167
|
-
};
|
|
161
|
+
readonly [x: string]: unknown;
|
|
168
162
|
}>;
|
|
169
163
|
configure: /*elided*/ any;
|
|
170
164
|
};
|
|
@@ -159,14 +159,6 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
159
159
|
}[];
|
|
160
160
|
})[];
|
|
161
161
|
readonly stream: true;
|
|
162
|
-
readonly system?: readonly {
|
|
163
|
-
readonly type: "text";
|
|
164
|
-
readonly text: string;
|
|
165
|
-
readonly cache_control?: {
|
|
166
|
-
readonly type: "ephemeral";
|
|
167
|
-
readonly ttl?: "1h" | "5m" | undefined;
|
|
168
|
-
} | undefined;
|
|
169
|
-
}[] | undefined;
|
|
170
162
|
readonly tools?: readonly {
|
|
171
163
|
readonly description: string;
|
|
172
164
|
readonly name: string;
|
|
@@ -178,6 +170,14 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
178
170
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
179
171
|
} | undefined;
|
|
180
172
|
}[] | undefined;
|
|
173
|
+
readonly system?: readonly {
|
|
174
|
+
readonly type: "text";
|
|
175
|
+
readonly text: string;
|
|
176
|
+
readonly cache_control?: {
|
|
177
|
+
readonly type: "ephemeral";
|
|
178
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
179
|
+
} | undefined;
|
|
180
|
+
}[] | undefined;
|
|
181
181
|
readonly temperature?: number | undefined;
|
|
182
182
|
readonly thinking?: {
|
|
183
183
|
readonly type: "enabled";
|
|
@@ -189,7 +189,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
189
189
|
readonly type: "disabled";
|
|
190
190
|
} | undefined;
|
|
191
191
|
readonly tool_choice?: {
|
|
192
|
-
readonly type: "
|
|
192
|
+
readonly type: "auto" | "none" | "any";
|
|
193
193
|
} | {
|
|
194
194
|
readonly type: "tool";
|
|
195
195
|
readonly name: string;
|
|
@@ -203,14 +203,14 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
203
203
|
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
|
204
204
|
export declare const configure: (input: Config) => {
|
|
205
205
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
206
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.
|
|
206
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.OptionsInput>;
|
|
207
207
|
configure: (input: Config) => /*elided*/ any;
|
|
208
208
|
};
|
|
209
209
|
export declare const provider: {
|
|
210
210
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
211
211
|
configure: (input: Config) => {
|
|
212
212
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
213
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.
|
|
213
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.OptionsInput>;
|
|
214
214
|
configure: /*elided*/ any;
|
|
215
215
|
};
|
|
216
216
|
};
|
|
@@ -143,14 +143,6 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
143
143
|
}[];
|
|
144
144
|
})[];
|
|
145
145
|
readonly stream: true;
|
|
146
|
-
readonly system?: readonly {
|
|
147
|
-
readonly type: "text";
|
|
148
|
-
readonly text: string;
|
|
149
|
-
readonly cache_control?: {
|
|
150
|
-
readonly type: "ephemeral";
|
|
151
|
-
readonly ttl?: "1h" | "5m" | undefined;
|
|
152
|
-
} | undefined;
|
|
153
|
-
}[] | undefined;
|
|
154
146
|
readonly tools?: readonly {
|
|
155
147
|
readonly description: string;
|
|
156
148
|
readonly name: string;
|
|
@@ -162,6 +154,14 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
162
154
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
163
155
|
} | undefined;
|
|
164
156
|
}[] | undefined;
|
|
157
|
+
readonly system?: readonly {
|
|
158
|
+
readonly type: "text";
|
|
159
|
+
readonly text: string;
|
|
160
|
+
readonly cache_control?: {
|
|
161
|
+
readonly type: "ephemeral";
|
|
162
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
163
|
+
} | undefined;
|
|
164
|
+
}[] | undefined;
|
|
165
165
|
readonly temperature?: number | undefined;
|
|
166
166
|
readonly thinking?: {
|
|
167
167
|
readonly type: "enabled";
|
|
@@ -173,7 +173,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
173
173
|
readonly type: "disabled";
|
|
174
174
|
} | undefined;
|
|
175
175
|
readonly tool_choice?: {
|
|
176
|
-
readonly type: "
|
|
176
|
+
readonly type: "auto" | "none" | "any";
|
|
177
177
|
} | {
|
|
178
178
|
readonly type: "tool";
|
|
179
179
|
readonly name: string;
|
|
@@ -201,15 +201,15 @@ export type Settings = ProviderPackage.Settings & ({
|
|
|
201
201
|
};
|
|
202
202
|
export declare const configure: (input?: Config) => {
|
|
203
203
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
204
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.
|
|
204
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.OptionsInput>;
|
|
205
205
|
configure: (input?: Config) => /*elided*/ any;
|
|
206
206
|
};
|
|
207
207
|
export declare const provider: {
|
|
208
208
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
209
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.
|
|
209
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.OptionsInput>;
|
|
210
210
|
configure: (input?: Config) => {
|
|
211
211
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
212
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.
|
|
212
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.OptionsInput>;
|
|
213
213
|
configure: /*elided*/ any;
|
|
214
214
|
};
|
|
215
215
|
};
|
|
@@ -84,7 +84,6 @@ export declare const routes: (RouteDef<{
|
|
|
84
84
|
} | undefined;
|
|
85
85
|
})[];
|
|
86
86
|
readonly stream: true;
|
|
87
|
-
readonly stop?: readonly string[] | undefined;
|
|
88
87
|
readonly max_completion_tokens?: number | undefined;
|
|
89
88
|
readonly max_tokens?: number | undefined;
|
|
90
89
|
readonly tools?: readonly {
|
|
@@ -101,9 +100,10 @@ export declare const routes: (RouteDef<{
|
|
|
101
100
|
readonly ttl?: string | undefined;
|
|
102
101
|
} | undefined;
|
|
103
102
|
}[] | undefined;
|
|
103
|
+
readonly stop?: readonly string[] | undefined;
|
|
104
104
|
readonly temperature?: number | undefined;
|
|
105
105
|
readonly seed?: number | undefined;
|
|
106
|
-
readonly tool_choice?: "required" | "
|
|
106
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
107
107
|
readonly type: "function";
|
|
108
108
|
readonly function: {
|
|
109
109
|
readonly name: string;
|
|
@@ -115,7 +115,7 @@ export declare const routes: (RouteDef<{
|
|
|
115
115
|
readonly include_usage: boolean;
|
|
116
116
|
} | undefined;
|
|
117
117
|
readonly prompt_cache_key?: string | undefined;
|
|
118
|
-
readonly reasoning_effort?:
|
|
118
|
+
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
119
119
|
readonly frequency_penalty?: number | undefined;
|
|
120
120
|
readonly presence_penalty?: number | undefined;
|
|
121
121
|
}, import("../route/transport/http.js").HttpPrepared<string>> | RouteDef<{
|
|
@@ -190,7 +190,7 @@ export declare const routes: (RouteDef<{
|
|
|
190
190
|
readonly instructions?: string | undefined;
|
|
191
191
|
readonly reasoning?: {
|
|
192
192
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
193
|
-
readonly effort?:
|
|
193
|
+
readonly effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
194
194
|
} | undefined;
|
|
195
195
|
readonly tools?: readonly ({
|
|
196
196
|
readonly type: "function";
|
|
@@ -205,22 +205,22 @@ export declare const routes: (RouteDef<{
|
|
|
205
205
|
readonly size?: string | undefined;
|
|
206
206
|
readonly action?: "generate" | "auto" | "edit" | undefined;
|
|
207
207
|
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
208
|
-
readonly quality?: "
|
|
208
|
+
readonly quality?: "auto" | "low" | "medium" | "high" | undefined;
|
|
209
209
|
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
210
210
|
readonly output_compression?: number | undefined;
|
|
211
211
|
readonly input_fidelity?: "low" | "high" | undefined;
|
|
212
212
|
readonly partial_images?: number | undefined;
|
|
213
213
|
})[] | undefined;
|
|
214
214
|
readonly text?: {
|
|
215
|
-
readonly verbosity?: "
|
|
215
|
+
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
216
216
|
} | undefined;
|
|
217
217
|
readonly temperature?: number | undefined;
|
|
218
|
-
readonly tool_choice?: "required" | "
|
|
218
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
219
219
|
readonly type: "function";
|
|
220
220
|
readonly name: string;
|
|
221
221
|
} | {
|
|
222
222
|
readonly type: "allowed_tools";
|
|
223
|
-
readonly mode: "required" | "
|
|
223
|
+
readonly mode: "required" | "auto" | "none";
|
|
224
224
|
readonly tools: readonly {
|
|
225
225
|
readonly type: "function";
|
|
226
226
|
readonly name: string;
|
|
@@ -240,22 +240,22 @@ export declare const routes: (RouteDef<{
|
|
|
240
240
|
}, import("../protocols/open-responses-channel.js").Prepared>)[];
|
|
241
241
|
export declare const configure: (input: Config) => {
|
|
242
242
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
243
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
244
|
-
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
245
|
-
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
243
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
|
|
244
|
+
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
|
|
245
|
+
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
|
|
246
246
|
configure: (input: Config) => /*elided*/ any;
|
|
247
247
|
};
|
|
248
248
|
export declare const provider: {
|
|
249
249
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
250
250
|
configure: (input: Config) => {
|
|
251
251
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
252
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
253
|
-
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
254
|
-
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
252
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
|
|
253
|
+
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
|
|
254
|
+
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
|
|
255
255
|
configure: /*elided*/ any;
|
|
256
256
|
};
|
|
257
257
|
};
|
|
258
258
|
export declare const responsesModel: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
|
|
259
259
|
export declare const chatModel: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
|
|
260
|
-
export declare const model: (modelID: string, settings: Settings) => import("../schema/options.js").LanguageModel<
|
|
260
|
+
export declare const model: (modelID: string, settings: Settings) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
|
|
261
261
|
export {};
|
|
@@ -90,7 +90,6 @@ export declare const aiGatewayRoute: import("../route/client.js").Route<{
|
|
|
90
90
|
} | undefined;
|
|
91
91
|
})[];
|
|
92
92
|
readonly stream: true;
|
|
93
|
-
readonly stop?: readonly string[] | undefined;
|
|
94
93
|
readonly max_completion_tokens?: number | undefined;
|
|
95
94
|
readonly max_tokens?: number | undefined;
|
|
96
95
|
readonly tools?: readonly {
|
|
@@ -107,9 +106,10 @@ export declare const aiGatewayRoute: import("../route/client.js").Route<{
|
|
|
107
106
|
readonly ttl?: string | undefined;
|
|
108
107
|
} | undefined;
|
|
109
108
|
}[] | undefined;
|
|
109
|
+
readonly stop?: readonly string[] | undefined;
|
|
110
110
|
readonly temperature?: number | undefined;
|
|
111
111
|
readonly seed?: number | undefined;
|
|
112
|
-
readonly tool_choice?: "required" | "
|
|
112
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
113
113
|
readonly type: "function";
|
|
114
114
|
readonly function: {
|
|
115
115
|
readonly name: string;
|
|
@@ -121,7 +121,7 @@ export declare const aiGatewayRoute: import("../route/client.js").Route<{
|
|
|
121
121
|
readonly include_usage: boolean;
|
|
122
122
|
} | undefined;
|
|
123
123
|
readonly prompt_cache_key?: string | undefined;
|
|
124
|
-
readonly reasoning_effort?:
|
|
124
|
+
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
125
125
|
readonly frequency_penalty?: number | undefined;
|
|
126
126
|
readonly presence_penalty?: number | undefined;
|
|
127
127
|
}, import("../route/transport/http.js").HttpPrepared<string>>;
|
|
@@ -187,7 +187,6 @@ export declare const workersAIRoute: import("../route/client.js").Route<{
|
|
|
187
187
|
} | undefined;
|
|
188
188
|
})[];
|
|
189
189
|
readonly stream: true;
|
|
190
|
-
readonly stop?: readonly string[] | undefined;
|
|
191
190
|
readonly max_completion_tokens?: number | undefined;
|
|
192
191
|
readonly max_tokens?: number | undefined;
|
|
193
192
|
readonly tools?: readonly {
|
|
@@ -204,9 +203,10 @@ export declare const workersAIRoute: import("../route/client.js").Route<{
|
|
|
204
203
|
readonly ttl?: string | undefined;
|
|
205
204
|
} | undefined;
|
|
206
205
|
}[] | undefined;
|
|
206
|
+
readonly stop?: readonly string[] | undefined;
|
|
207
207
|
readonly temperature?: number | undefined;
|
|
208
208
|
readonly seed?: number | undefined;
|
|
209
|
-
readonly tool_choice?: "required" | "
|
|
209
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
210
210
|
readonly type: "function";
|
|
211
211
|
readonly function: {
|
|
212
212
|
readonly name: string;
|
|
@@ -218,7 +218,7 @@ export declare const workersAIRoute: import("../route/client.js").Route<{
|
|
|
218
218
|
readonly include_usage: boolean;
|
|
219
219
|
} | undefined;
|
|
220
220
|
readonly prompt_cache_key?: string | undefined;
|
|
221
|
-
readonly reasoning_effort?:
|
|
221
|
+
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
222
222
|
readonly frequency_penalty?: number | undefined;
|
|
223
223
|
readonly presence_penalty?: number | undefined;
|
|
224
224
|
}, import("../route/transport/http.js").HttpPrepared<string>>;
|
|
@@ -284,7 +284,6 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
284
284
|
} | undefined;
|
|
285
285
|
})[];
|
|
286
286
|
readonly stream: true;
|
|
287
|
-
readonly stop?: readonly string[] | undefined;
|
|
288
287
|
readonly max_completion_tokens?: number | undefined;
|
|
289
288
|
readonly max_tokens?: number | undefined;
|
|
290
289
|
readonly tools?: readonly {
|
|
@@ -301,9 +300,10 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
301
300
|
readonly ttl?: string | undefined;
|
|
302
301
|
} | undefined;
|
|
303
302
|
}[] | undefined;
|
|
303
|
+
readonly stop?: readonly string[] | undefined;
|
|
304
304
|
readonly temperature?: number | undefined;
|
|
305
305
|
readonly seed?: number | undefined;
|
|
306
|
-
readonly tool_choice?: "required" | "
|
|
306
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
307
307
|
readonly type: "function";
|
|
308
308
|
readonly function: {
|
|
309
309
|
readonly name: string;
|
|
@@ -315,7 +315,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
315
315
|
readonly include_usage: boolean;
|
|
316
316
|
} | undefined;
|
|
317
317
|
readonly prompt_cache_key?: string | undefined;
|
|
318
|
-
readonly reasoning_effort?:
|
|
318
|
+
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
319
319
|
readonly frequency_penalty?: number | undefined;
|
|
320
320
|
readonly presence_penalty?: number | undefined;
|
|
321
321
|
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
|
@@ -323,7 +323,7 @@ export declare const CloudflareAIGateway: {
|
|
|
323
323
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
324
324
|
configure: (options: AIGatewayOptions) => {
|
|
325
325
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
326
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
326
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
|
|
327
327
|
configure: /*elided*/ any;
|
|
328
328
|
};
|
|
329
329
|
};
|
|
@@ -331,7 +331,7 @@ export declare const CloudflareWorkersAI: {
|
|
|
331
331
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
332
332
|
configure: (options: WorkersAIOptions) => {
|
|
333
333
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
334
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
334
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
|
|
335
335
|
configure: /*elided*/ any;
|
|
336
336
|
};
|
|
337
337
|
};
|
|
@@ -80,7 +80,6 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
80
80
|
} | undefined;
|
|
81
81
|
})[];
|
|
82
82
|
readonly stream: true;
|
|
83
|
-
readonly stop?: readonly string[] | undefined;
|
|
84
83
|
readonly max_completion_tokens?: number | undefined;
|
|
85
84
|
readonly max_tokens?: number | undefined;
|
|
86
85
|
readonly tools?: readonly {
|
|
@@ -97,9 +96,10 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
97
96
|
readonly ttl?: string | undefined;
|
|
98
97
|
} | undefined;
|
|
99
98
|
}[] | undefined;
|
|
99
|
+
readonly stop?: readonly string[] | undefined;
|
|
100
100
|
readonly temperature?: number | undefined;
|
|
101
101
|
readonly seed?: number | undefined;
|
|
102
|
-
readonly tool_choice?: "required" | "
|
|
102
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
103
103
|
readonly type: "function";
|
|
104
104
|
readonly function: {
|
|
105
105
|
readonly name: string;
|
|
@@ -111,20 +111,20 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
111
111
|
readonly include_usage: boolean;
|
|
112
112
|
} | undefined;
|
|
113
113
|
readonly prompt_cache_key?: string | undefined;
|
|
114
|
-
readonly reasoning_effort?:
|
|
114
|
+
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
115
115
|
readonly frequency_penalty?: number | undefined;
|
|
116
116
|
readonly presence_penalty?: number | undefined;
|
|
117
117
|
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
|
118
118
|
export declare const configure: (input?: Config) => {
|
|
119
119
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
120
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
120
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
|
|
121
121
|
configure: (input?: Config) => /*elided*/ any;
|
|
122
122
|
};
|
|
123
123
|
export declare const provider: {
|
|
124
124
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
125
125
|
configure: (input?: Config) => {
|
|
126
126
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
127
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
127
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
|
|
128
128
|
configure: /*elided*/ any;
|
|
129
129
|
};
|
|
130
130
|
};
|
|
@@ -23,14 +23,6 @@ export interface Settings extends ProviderPackage.Settings {
|
|
|
23
23
|
}
|
|
24
24
|
export declare const routes: Route<{
|
|
25
25
|
anthropic_version: "vertex-2023-10-16";
|
|
26
|
-
system?: readonly {
|
|
27
|
-
readonly type: "text";
|
|
28
|
-
readonly text: string;
|
|
29
|
-
readonly cache_control?: {
|
|
30
|
-
readonly type: "ephemeral";
|
|
31
|
-
readonly ttl?: "1h" | "5m" | undefined;
|
|
32
|
-
} | undefined;
|
|
33
|
-
}[] | undefined;
|
|
34
26
|
max_tokens: number;
|
|
35
27
|
tools?: readonly {
|
|
36
28
|
readonly description: string;
|
|
@@ -43,6 +35,14 @@ export declare const routes: Route<{
|
|
|
43
35
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
44
36
|
} | undefined;
|
|
45
37
|
}[] | undefined;
|
|
38
|
+
system?: readonly {
|
|
39
|
+
readonly type: "text";
|
|
40
|
+
readonly text: string;
|
|
41
|
+
readonly cache_control?: {
|
|
42
|
+
readonly type: "ephemeral";
|
|
43
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
44
|
+
} | undefined;
|
|
45
|
+
}[] | undefined;
|
|
46
46
|
messages: readonly ({
|
|
47
47
|
readonly role: "user";
|
|
48
48
|
readonly content: readonly ({
|
|
@@ -187,7 +187,7 @@ export declare const routes: Route<{
|
|
|
187
187
|
readonly type: "disabled";
|
|
188
188
|
} | undefined;
|
|
189
189
|
tool_choice?: {
|
|
190
|
-
readonly type: "
|
|
190
|
+
readonly type: "auto" | "none" | "any";
|
|
191
191
|
} | {
|
|
192
192
|
readonly type: "tool";
|
|
193
193
|
readonly name: string;
|
|
@@ -201,14 +201,14 @@ export declare const routes: Route<{
|
|
|
201
201
|
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
|
202
202
|
export declare const configure: (input?: Config) => {
|
|
203
203
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
204
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.
|
|
204
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.OptionsInput>;
|
|
205
205
|
configure: (input?: Config) => /*elided*/ any;
|
|
206
206
|
};
|
|
207
207
|
export declare const provider: {
|
|
208
208
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
209
209
|
configure: (input?: Config) => {
|
|
210
210
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
211
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.
|
|
211
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.OptionsInput>;
|
|
212
212
|
configure: /*elided*/ any;
|
|
213
213
|
};
|
|
214
214
|
};
|
|
@@ -83,7 +83,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
83
83
|
readonly instructions?: string | undefined;
|
|
84
84
|
readonly reasoning?: {
|
|
85
85
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
86
|
-
readonly effort?:
|
|
86
|
+
readonly effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
87
87
|
} | undefined;
|
|
88
88
|
readonly tools?: readonly {
|
|
89
89
|
readonly type: "function";
|
|
@@ -95,15 +95,15 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
95
95
|
readonly strict?: boolean | undefined;
|
|
96
96
|
}[] | undefined;
|
|
97
97
|
readonly text?: {
|
|
98
|
-
readonly verbosity?: "
|
|
98
|
+
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
99
99
|
} | undefined;
|
|
100
100
|
readonly temperature?: number | undefined;
|
|
101
|
-
readonly tool_choice?: "required" | "
|
|
101
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
102
102
|
readonly type: "function";
|
|
103
103
|
readonly name: string;
|
|
104
104
|
} | {
|
|
105
105
|
readonly type: "allowed_tools";
|
|
106
|
-
readonly mode: "required" | "
|
|
106
|
+
readonly mode: "required" | "auto" | "none";
|
|
107
107
|
readonly tools: readonly {
|
|
108
108
|
readonly type: "function";
|
|
109
109
|
readonly name: string;
|
|
@@ -121,14 +121,14 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
121
121
|
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
|
122
122
|
export declare const configure: (input?: Config) => {
|
|
123
123
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
124
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
124
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
|
|
125
125
|
configure: (input?: Config) => /*elided*/ any;
|
|
126
126
|
};
|
|
127
127
|
export declare const provider: {
|
|
128
128
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
129
129
|
configure: (input?: Config) => {
|
|
130
130
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
131
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
131
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
|
|
132
132
|
configure: /*elided*/ any;
|
|
133
133
|
};
|
|
134
134
|
};
|
|
@@ -5,7 +5,7 @@ export const id = ProviderID.make("google-vertex");
|
|
|
5
5
|
const route = OpenAICompatibleResponses.route.with({
|
|
6
6
|
id: "google-vertex-responses",
|
|
7
7
|
provider: id,
|
|
8
|
-
providerOptions: {
|
|
8
|
+
providerOptions: { store: false },
|
|
9
9
|
});
|
|
10
10
|
export const routes = [route];
|
|
11
11
|
const configuredRoute = (input) => {
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import type { ProviderPackage } from "../provider-package.js";
|
|
2
2
|
import { Gemini } from "../protocols/gemini.js";
|
|
3
3
|
import { Route, type RouteDefaultsInput } from "../route/client.js";
|
|
4
|
-
import { type ModelID
|
|
4
|
+
import { type ModelID } from "../schema/index.js";
|
|
5
5
|
import { GoogleVertexShared } from "./google-vertex-shared.js";
|
|
6
6
|
export interface GeminiOptionsInput extends Gemini.OptionsInput {
|
|
7
7
|
readonly labels?: Readonly<Record<string, string>>;
|
|
8
8
|
}
|
|
9
|
-
export type GeminiProviderOptionsInput =
|
|
10
|
-
readonly gemini?: GeminiOptionsInput;
|
|
11
|
-
};
|
|
9
|
+
export type GeminiProviderOptionsInput = GeminiOptionsInput;
|
|
12
10
|
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
13
11
|
export type Config = RouteDefaultsInput & GoogleVertexShared.ApiKeyOptions & {
|
|
14
12
|
readonly baseURL?: string;
|
|
@@ -30,7 +28,7 @@ export type Settings = ProviderPackage.Settings & ({
|
|
|
30
28
|
};
|
|
31
29
|
export declare const routes: Route<{
|
|
32
30
|
readonly contents: readonly {
|
|
33
|
-
readonly role: "
|
|
31
|
+
readonly role: "model" | "user";
|
|
34
32
|
readonly parts: readonly ({
|
|
35
33
|
readonly inlineData: {
|
|
36
34
|
readonly mimeType: string;
|
|
@@ -108,14 +106,14 @@ export declare const routes: Route<{
|
|
|
108
106
|
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
|
109
107
|
export declare const configure: (input?: Config) => {
|
|
110
108
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
111
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
109
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<GeminiOptionsInput>;
|
|
112
110
|
configure: (input?: Config) => /*elided*/ any;
|
|
113
111
|
};
|
|
114
112
|
export declare const provider: {
|
|
115
113
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
116
114
|
configure: (input?: Config) => {
|
|
117
115
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
118
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
116
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<GeminiOptionsInput>;
|
|
119
117
|
configure: /*elided*/ any;
|
|
120
118
|
};
|
|
121
119
|
};
|
|
@@ -10,7 +10,7 @@ import { GoogleVertexShared } from "./google-vertex-shared.js";
|
|
|
10
10
|
export const id = ProviderID.make("google-vertex");
|
|
11
11
|
const fromRequest = Effect.fn("GoogleVertex.fromRequest")(function* (request) {
|
|
12
12
|
const body = yield* Gemini.protocol.body.from(request);
|
|
13
|
-
const value = request.providerOptions?.
|
|
13
|
+
const value = request.providerOptions?.labels;
|
|
14
14
|
const labels = ProviderShared.isRecord(value)
|
|
15
15
|
? Object.fromEntries(Object.entries(value).filter((entry) => typeof entry[1] === "string"))
|
|
16
16
|
: undefined;
|
|
@@ -9,7 +9,7 @@ export type GeminiProviderOptionsInput = Gemini.ProviderOptionsInput;
|
|
|
9
9
|
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
10
10
|
export declare const routes: import("../route/client.js").Route<{
|
|
11
11
|
readonly contents: readonly {
|
|
12
|
-
readonly role: "
|
|
12
|
+
readonly role: "model" | "user";
|
|
13
13
|
readonly parts: readonly ({
|
|
14
14
|
readonly inlineData: {
|
|
15
15
|
readonly mimeType: string;
|
|
@@ -96,17 +96,17 @@ export interface Settings extends ProviderPackage.Settings {
|
|
|
96
96
|
}
|
|
97
97
|
export declare const configure: (input?: Config) => {
|
|
98
98
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
99
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.
|
|
99
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput>;
|
|
100
100
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
|
|
101
101
|
configure: (input?: Config) => /*elided*/ any;
|
|
102
102
|
};
|
|
103
103
|
export declare const provider: {
|
|
104
104
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
105
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.
|
|
105
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput>;
|
|
106
106
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
|
|
107
107
|
configure: (input?: Config) => {
|
|
108
108
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
109
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.
|
|
109
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput>;
|
|
110
110
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
|
|
111
111
|
configure: /*elided*/ any;
|
|
112
112
|
};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { Options } from "../protocols/utils/open-responses-options.js";
|
|
2
|
-
import type { ProviderOptions } from "../schema/index.js";
|
|
3
2
|
export type OpenResponsesOptionsInput = Options & {
|
|
4
3
|
readonly [key: string]: unknown;
|
|
5
4
|
};
|
|
6
|
-
export type OpenResponsesProviderOptionsInput =
|
|
7
|
-
readonly openresponses?: OpenResponsesOptionsInput;
|
|
8
|
-
};
|
|
5
|
+
export type OpenResponsesProviderOptionsInput = OpenResponsesOptionsInput;
|
|
9
6
|
export * as OpenResponsesProviderOptions from "./open-responses-options.js";
|
|
@@ -81,7 +81,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
81
81
|
readonly instructions?: string | undefined;
|
|
82
82
|
readonly reasoning?: {
|
|
83
83
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
84
|
-
readonly effort?:
|
|
84
|
+
readonly effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
85
85
|
} | undefined;
|
|
86
86
|
readonly tools?: readonly {
|
|
87
87
|
readonly type: "function";
|
|
@@ -93,15 +93,15 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
93
93
|
readonly strict?: boolean | undefined;
|
|
94
94
|
}[] | undefined;
|
|
95
95
|
readonly text?: {
|
|
96
|
-
readonly verbosity?: "
|
|
96
|
+
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
97
97
|
} | undefined;
|
|
98
98
|
readonly temperature?: number | undefined;
|
|
99
|
-
readonly tool_choice?: "required" | "
|
|
99
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
100
100
|
readonly type: "function";
|
|
101
101
|
readonly name: string;
|
|
102
102
|
} | {
|
|
103
103
|
readonly type: "allowed_tools";
|
|
104
|
-
readonly mode: "required" | "
|
|
104
|
+
readonly mode: "required" | "auto" | "none";
|
|
105
105
|
readonly tools: readonly {
|
|
106
106
|
readonly type: "function";
|
|
107
107
|
readonly name: string;
|
|
@@ -119,14 +119,14 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
119
119
|
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
|
120
120
|
export declare const configure: (input: Config) => {
|
|
121
121
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
122
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
122
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
|
|
123
123
|
configure: (input: Config) => /*elided*/ any;
|
|
124
124
|
};
|
|
125
125
|
export declare const provider: {
|
|
126
126
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
127
127
|
configure: (input: Config) => {
|
|
128
128
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
129
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
129
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
|
|
130
130
|
configure: /*elided*/ any;
|
|
131
131
|
};
|
|
132
132
|
};
|