@tanstack/ai-vercel-gateway 0.2.11 → 0.2.14

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.
@@ -0,0 +1,61 @@
1
+ import { BaseEvaluateAdapter, EvaluateAdapterResult, EvaluateOptions } from '@tanstack/ai/adapters';
2
+ import { VercelGatewayClientConfig } from '../utils/client.js';
3
+ import { VercelGatewayRoutingOptions } from '../text/text-provider-options.js';
4
+ export interface VercelGatewayEvaluateConfig extends VercelGatewayClientConfig {
5
+ }
6
+ export type VercelGatewayEvaluateModel = 'typesafe-ai/jev';
7
+ export type VercelGatewayEvaluateProviderOptions = Record<string, unknown> & {
8
+ gateway?: VercelGatewayRoutingOptions;
9
+ };
10
+ /**
11
+ * Vercel AI Gateway evaluate adapter.
12
+ *
13
+ * Talks to `POST /v4/ai/evaluation-model` with `fetch`. Jev is not a chat
14
+ * model; this adapter does not use `/v1/chat/completions`.
15
+ */
16
+ export declare class VercelGatewayEvaluateAdapter<TModel extends VercelGatewayEvaluateModel> extends BaseEvaluateAdapter<TModel, VercelGatewayEvaluateProviderOptions> {
17
+ readonly name: "vercel-gateway";
18
+ private readonly apiKey;
19
+ private readonly evaluateUrl;
20
+ private readonly extraHeaders;
21
+ constructor(config: VercelGatewayEvaluateConfig, model: TModel);
22
+ evaluate(options: EvaluateOptions<VercelGatewayEvaluateProviderOptions>): Promise<EvaluateAdapterResult>;
23
+ }
24
+ /**
25
+ * Create a Vercel AI Gateway evaluate adapter with an explicit API key.
26
+ *
27
+ * @param model Evaluate model id. Use `typesafe-ai/jev`.
28
+ * @param apiKey Vercel AI Gateway API key.
29
+ * @param config Optional client config (`baseURL`, `httpReferer`, `xTitle`).
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const adapter = createVercelGatewayDecider('typesafe-ai/jev', 'vck_...')
34
+ * ```
35
+ */
36
+ export declare function createVercelGatewayDecider<TModel extends VercelGatewayEvaluateModel>(model: TModel, apiKey: string, config?: Omit<VercelGatewayEvaluateConfig, 'apiKey'>): VercelGatewayEvaluateAdapter<TModel>;
37
+ /**
38
+ * Create a Vercel AI Gateway evaluate adapter.
39
+ *
40
+ * Reads `AI_GATEWAY_API_KEY`, then `VERCEL_OIDC_TOKEN`.
41
+ *
42
+ * @param model Evaluate model id. Use `typesafe-ai/jev`.
43
+ * @param config Optional client config (`baseURL`, `httpReferer`, `xTitle`).
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * import { decide, boolean } from '@tanstack/ai'
48
+ * import { vercelGatewayDecider } from '@tanstack/ai-vercel-gateway'
49
+ *
50
+ * const result = await decide({
51
+ * adapter: vercelGatewayDecider('typesafe-ai/jev'),
52
+ * state: ticket,
53
+ * questions: {
54
+ * refund: boolean({
55
+ * instructions: 'Is the customer asking for a refund?',
56
+ * }),
57
+ * },
58
+ * })
59
+ * ```
60
+ */
61
+ export declare function vercelGatewayDecider<TModel extends VercelGatewayEvaluateModel>(model: TModel, config?: Omit<VercelGatewayEvaluateConfig, 'apiKey'>): VercelGatewayEvaluateAdapter<TModel>;
@@ -0,0 +1,288 @@
1
+ import { getVercelGatewayApiKeyFromEnv, withVercelGatewayDefaults } from "../utils/client.js";
2
+ import { mapGatewayModelOptions } from "../utils/map-gateway-options.js";
3
+ import { BaseEvaluateAdapter } from "@tanstack/ai/adapters";
4
+ import { toRunErrorPayload } from "@tanstack/ai/adapter-internals";
5
+ //#region src/adapters/evaluate.ts
6
+ /**
7
+ * Documented evaluate URL from Vercel AI SDK `GatewayEvaluationModel.getUrl()`:
8
+ * `${baseURL}/evaluation-model` with default baseURL
9
+ * `https://ai-gateway.vercel.sh/v4/ai`. Not `/v1/chat/completions`.
10
+ * https://github.com/vercel/ai/blob/main/packages/gateway/src/gateway-evaluation-model.ts
11
+ */
12
+ var EVALUATE_PATH = "/v4/ai/evaluation-model";
13
+ var DEFAULT_EVALUATE_URL = `https://ai-gateway.vercel.sh${EVALUATE_PATH}`;
14
+ /** The gateway rejects the request with 400 when this header is absent. */
15
+ var GATEWAY_PROTOCOL_VERSION = "0.0.1";
16
+ function isRecord(value) {
17
+ return typeof value === "object" && value !== null && !Array.isArray(value);
18
+ }
19
+ function isNumberRecord(value) {
20
+ if (!isRecord(value)) return false;
21
+ const values = Object.values(value);
22
+ for (const item of values) if (typeof item !== "number") return false;
23
+ return true;
24
+ }
25
+ function isStringRecord(value) {
26
+ if (!isRecord(value)) return false;
27
+ const values = Object.values(value);
28
+ for (const item of values) if (typeof item !== "string") return false;
29
+ return true;
30
+ }
31
+ function extraRequestHeaders(defaultHeaders) {
32
+ if (defaultHeaders == null) return {};
33
+ if (typeof Headers !== "undefined" && defaultHeaders instanceof Headers) {
34
+ const headers = {};
35
+ const entries = defaultHeaders.entries();
36
+ for (const [key, value] of entries) headers[key] = value;
37
+ return headers;
38
+ }
39
+ if (Array.isArray(defaultHeaders)) {
40
+ const headers = {};
41
+ for (const entry of defaultHeaders) {
42
+ if (!Array.isArray(entry) || entry.length < 2) continue;
43
+ const key = entry[0];
44
+ const value = entry[1];
45
+ if (typeof key === "string" && typeof value === "string") headers[key] = value;
46
+ }
47
+ return headers;
48
+ }
49
+ if (!isRecord(defaultHeaders)) return {};
50
+ const headers = {};
51
+ const keys = Object.keys(defaultHeaders);
52
+ for (const key of keys) {
53
+ const value = defaultHeaders[key];
54
+ if (typeof value === "string") headers[key] = value;
55
+ }
56
+ return headers;
57
+ }
58
+ function resolveEvaluateUrl(baseURL) {
59
+ if (!baseURL) return DEFAULT_EVALUATE_URL;
60
+ try {
61
+ return `${new URL(baseURL).origin}${EVALUATE_PATH}`;
62
+ } catch {
63
+ return DEFAULT_EVALUATE_URL;
64
+ }
65
+ }
66
+ function toGatewayQuestion(question) {
67
+ switch (question.type) {
68
+ case "noul":
69
+ if (question.criteria === void 0) return {
70
+ type: "boolean",
71
+ instructions: question.instructions
72
+ };
73
+ return {
74
+ type: "boolean",
75
+ instructions: question.instructions,
76
+ criteria: question.criteria
77
+ };
78
+ case "choice":
79
+ case "score": return question;
80
+ }
81
+ }
82
+ function toGatewayQuestions(questions) {
83
+ const mapped = {};
84
+ const keys = Object.keys(questions);
85
+ for (const key of keys) {
86
+ const question = questions[key];
87
+ if (question === void 0) continue;
88
+ mapped[key] = toGatewayQuestion(question);
89
+ }
90
+ return mapped;
91
+ }
92
+ function readCount(candidates) {
93
+ for (const candidate of candidates) if (typeof candidate === "number") return candidate;
94
+ return 0;
95
+ }
96
+ function toTokenUsage(usage) {
97
+ if (!isRecord(usage)) return {
98
+ promptTokens: 0,
99
+ completionTokens: 0,
100
+ totalTokens: 0
101
+ };
102
+ const promptTokens = readCount([
103
+ usage.inputTokens,
104
+ usage.input_tokens,
105
+ usage.promptTokens,
106
+ usage.prompt_tokens
107
+ ]);
108
+ const completionTokens = readCount([
109
+ usage.outputTokens,
110
+ usage.output_tokens,
111
+ usage.completionTokens,
112
+ usage.completion_tokens
113
+ ]);
114
+ return {
115
+ promptTokens,
116
+ completionTokens,
117
+ totalTokens: readCount([
118
+ usage.totalTokens,
119
+ usage.total_tokens,
120
+ promptTokens + completionTokens
121
+ ])
122
+ };
123
+ }
124
+ function confidenceMap(providerMetadata) {
125
+ if (!isRecord(providerMetadata)) return {};
126
+ const typesafe = providerMetadata.typesafe;
127
+ if (!isRecord(typesafe)) return {};
128
+ if (!isNumberRecord(typesafe.confidence)) return {};
129
+ return typesafe.confidence;
130
+ }
131
+ function confidenceFor(key, answer, byKey) {
132
+ if (typeof answer.confidence === "number") return answer.confidence;
133
+ const fromMeta = byKey[key];
134
+ if (typeof fromMeta === "number") return fromMeta;
135
+ return 0;
136
+ }
137
+ function toWireAnswer(answer, confidence) {
138
+ switch (answer.type) {
139
+ case "boolean":
140
+ if (typeof answer.probability !== "number") throw new Error("Vercel Gateway evaluate boolean answer was missing probability");
141
+ return {
142
+ type: "noul",
143
+ noul: answer.probability
144
+ };
145
+ case "choice":
146
+ if (typeof answer.choice !== "string") throw new Error("Vercel Gateway evaluate choice answer was missing choice");
147
+ return {
148
+ type: "choice",
149
+ choice: answer.choice,
150
+ probabilities: isNumberRecord(answer.probabilities) ? answer.probabilities : {},
151
+ confidence
152
+ };
153
+ case "score":
154
+ if (typeof answer.score !== "number") throw new Error("Vercel Gateway evaluate score answer was missing score");
155
+ return {
156
+ type: "score",
157
+ score: answer.score,
158
+ legend: isStringRecord(answer.legend) ? answer.legend : {},
159
+ probabilities: isNumberRecord(answer.probabilities) ? answer.probabilities : {},
160
+ confidence
161
+ };
162
+ default: throw new Error(`Vercel Gateway evaluate answer had an unexpected type: ${String(answer.type)}`);
163
+ }
164
+ }
165
+ function toWireAnswers(answers, byKey) {
166
+ if (!isRecord(answers)) throw new Error("Vercel Gateway evaluate response was missing answers");
167
+ const mapped = {};
168
+ const keys = Object.keys(answers);
169
+ for (const key of keys) {
170
+ const answer = answers[key];
171
+ if (!isRecord(answer)) throw new Error(`Vercel Gateway evaluate answer "${key}" had an unexpected shape`);
172
+ mapped[key] = toWireAnswer(answer, confidenceFor(key, answer, byKey));
173
+ }
174
+ return mapped;
175
+ }
176
+ /**
177
+ * Vercel AI Gateway evaluate adapter.
178
+ *
179
+ * Talks to `POST /v4/ai/evaluation-model` with `fetch`. Jev is not a chat
180
+ * model; this adapter does not use `/v1/chat/completions`.
181
+ */
182
+ var VercelGatewayEvaluateAdapter = class extends BaseEvaluateAdapter {
183
+ name = "vercel-gateway";
184
+ apiKey;
185
+ evaluateUrl;
186
+ extraHeaders;
187
+ constructor(config, model) {
188
+ super({}, model);
189
+ const defaults = withVercelGatewayDefaults(config);
190
+ this.apiKey = config.apiKey;
191
+ this.evaluateUrl = resolveEvaluateUrl(defaults.baseURL);
192
+ this.extraHeaders = extraRequestHeaders(defaults.defaultHeaders);
193
+ }
194
+ async evaluate(options) {
195
+ const { model, state, questions, modelOptions, abortSignal, logger } = options;
196
+ const mapped = mapGatewayModelOptions(modelOptions);
197
+ logger.request(`activity=evaluate provider=${this.name} model=${model}`, {
198
+ provider: this.name,
199
+ model
200
+ });
201
+ try {
202
+ const response = await fetch(this.evaluateUrl, {
203
+ method: "POST",
204
+ headers: {
205
+ ...this.extraHeaders,
206
+ Authorization: `Bearer ${this.apiKey}`,
207
+ "Content-Type": "application/json",
208
+ "ai-gateway-protocol-version": GATEWAY_PROTOCOL_VERSION,
209
+ "ai-evaluation-model-specification-version": "4",
210
+ "ai-model-id": model
211
+ },
212
+ body: JSON.stringify({
213
+ ...mapped,
214
+ model,
215
+ state,
216
+ questions: toGatewayQuestions(questions)
217
+ }),
218
+ ...abortSignal ? { signal: abortSignal } : {}
219
+ });
220
+ if (!response.ok) {
221
+ const detail = await response.text().catch(() => "");
222
+ throw new Error(`Vercel Gateway evaluate request failed: ${response.status} ${response.statusText}${detail ? ` — ${detail}` : ""}`);
223
+ }
224
+ const json = await response.json();
225
+ if (!isRecord(json)) throw new Error("Vercel Gateway evaluate response had an unexpected shape");
226
+ return {
227
+ model: typeof json.model === "string" ? json.model : model,
228
+ answers: toWireAnswers(json.answers, confidenceMap(json.providerMetadata)),
229
+ usage: toTokenUsage(json.usage)
230
+ };
231
+ } catch (error) {
232
+ logger.errors(`${this.name}.evaluate fatal`, {
233
+ error: toRunErrorPayload(error, `${this.name}.evaluate failed`),
234
+ source: `${this.name}.evaluate`
235
+ });
236
+ throw error;
237
+ }
238
+ }
239
+ };
240
+ /**
241
+ * Create a Vercel AI Gateway evaluate adapter with an explicit API key.
242
+ *
243
+ * @param model Evaluate model id. Use `typesafe-ai/jev`.
244
+ * @param apiKey Vercel AI Gateway API key.
245
+ * @param config Optional client config (`baseURL`, `httpReferer`, `xTitle`).
246
+ *
247
+ * @example
248
+ * ```ts
249
+ * const adapter = createVercelGatewayDecider('typesafe-ai/jev', 'vck_...')
250
+ * ```
251
+ */
252
+ function createVercelGatewayDecider(model, apiKey, config) {
253
+ return new VercelGatewayEvaluateAdapter({
254
+ apiKey,
255
+ ...config
256
+ }, model);
257
+ }
258
+ /**
259
+ * Create a Vercel AI Gateway evaluate adapter.
260
+ *
261
+ * Reads `AI_GATEWAY_API_KEY`, then `VERCEL_OIDC_TOKEN`.
262
+ *
263
+ * @param model Evaluate model id. Use `typesafe-ai/jev`.
264
+ * @param config Optional client config (`baseURL`, `httpReferer`, `xTitle`).
265
+ *
266
+ * @example
267
+ * ```ts
268
+ * import { decide, boolean } from '@tanstack/ai'
269
+ * import { vercelGatewayDecider } from '@tanstack/ai-vercel-gateway'
270
+ *
271
+ * const result = await decide({
272
+ * adapter: vercelGatewayDecider('typesafe-ai/jev'),
273
+ * state: ticket,
274
+ * questions: {
275
+ * refund: boolean({
276
+ * instructions: 'Is the customer asking for a refund?',
277
+ * }),
278
+ * },
279
+ * })
280
+ * ```
281
+ */
282
+ function vercelGatewayDecider(model, config) {
283
+ return createVercelGatewayDecider(model, getVercelGatewayApiKeyFromEnv(), config);
284
+ }
285
+ //#endregion
286
+ export { VercelGatewayEvaluateAdapter, createVercelGatewayDecider, vercelGatewayDecider };
287
+
288
+ //# sourceMappingURL=evaluate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate.js","names":[],"sources":["../../../src/adapters/evaluate.ts"],"sourcesContent":["import { BaseEvaluateAdapter } from '@tanstack/ai/adapters'\nimport { toRunErrorPayload } from '@tanstack/ai/adapter-internals'\nimport {\n getVercelGatewayApiKeyFromEnv,\n withVercelGatewayDefaults,\n} from '../utils/client'\nimport { mapGatewayModelOptions } from '../utils/map-gateway-options'\nimport type {\n EvaluateAdapterResult,\n EvaluateOptions,\n WireAnswer,\n WireQuestion,\n} from '@tanstack/ai/adapters'\nimport type { VercelGatewayClientConfig } from '../utils/client'\nimport type { VercelGatewayRoutingOptions } from '../text/text-provider-options'\n\nexport interface VercelGatewayEvaluateConfig extends VercelGatewayClientConfig {}\n\nexport type VercelGatewayEvaluateModel = 'typesafe-ai/jev'\n\nexport type VercelGatewayEvaluateProviderOptions = Record<string, unknown> & {\n gateway?: VercelGatewayRoutingOptions\n}\n\n/**\n * Documented evaluate URL from Vercel AI SDK `GatewayEvaluationModel.getUrl()`:\n * `${baseURL}/evaluation-model` with default baseURL\n * `https://ai-gateway.vercel.sh/v4/ai`. Not `/v1/chat/completions`.\n * https://github.com/vercel/ai/blob/main/packages/gateway/src/gateway-evaluation-model.ts\n */\nconst EVALUATE_PATH = '/v4/ai/evaluation-model'\nconst DEFAULT_EVALUATE_URL = `https://ai-gateway.vercel.sh${EVALUATE_PATH}`\n\n/** The gateway rejects the request with 400 when this header is absent. */\nconst GATEWAY_PROTOCOL_VERSION = '0.0.1'\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n\nfunction isNumberRecord(value: unknown): value is Record<string, number> {\n if (!isRecord(value)) return false\n const values = Object.values(value)\n for (const item of values) {\n if (typeof item !== 'number') return false\n }\n return true\n}\n\nfunction isStringRecord(value: unknown): value is Record<string, string> {\n if (!isRecord(value)) return false\n const values = Object.values(value)\n for (const item of values) {\n if (typeof item !== 'string') return false\n }\n return true\n}\n\nfunction extraRequestHeaders(defaultHeaders: unknown) {\n if (defaultHeaders == null) return {}\n if (typeof Headers !== 'undefined' && defaultHeaders instanceof Headers) {\n const headers: Record<string, string> = {}\n const entries = defaultHeaders.entries()\n for (const [key, value] of entries) {\n headers[key] = value\n }\n return headers\n }\n if (Array.isArray(defaultHeaders)) {\n const headers: Record<string, string> = {}\n for (const entry of defaultHeaders) {\n if (!Array.isArray(entry) || entry.length < 2) continue\n const key = entry[0]\n const value = entry[1]\n if (typeof key === 'string' && typeof value === 'string') {\n headers[key] = value\n }\n }\n return headers\n }\n if (!isRecord(defaultHeaders)) return {}\n const headers: Record<string, string> = {}\n const keys = Object.keys(defaultHeaders)\n for (const key of keys) {\n const value = defaultHeaders[key]\n if (typeof value === 'string') headers[key] = value\n }\n return headers\n}\n\nfunction resolveEvaluateUrl(baseURL: string | null | undefined) {\n if (!baseURL) return DEFAULT_EVALUATE_URL\n try {\n return `${new URL(baseURL).origin}${EVALUATE_PATH}`\n } catch {\n return DEFAULT_EVALUATE_URL\n }\n}\n\nfunction toGatewayQuestion(question: WireQuestion) {\n switch (question.type) {\n case 'noul': {\n if (question.criteria === undefined) {\n return {\n type: 'boolean' as const,\n instructions: question.instructions,\n }\n }\n return {\n type: 'boolean' as const,\n instructions: question.instructions,\n criteria: question.criteria,\n }\n }\n case 'choice':\n case 'score':\n return question\n }\n}\n\nfunction toGatewayQuestions(questions: Record<string, WireQuestion>) {\n const mapped: Record<string, unknown> = {}\n const keys = Object.keys(questions)\n for (const key of keys) {\n const question = questions[key]\n if (question === undefined) continue\n mapped[key] = toGatewayQuestion(question)\n }\n return mapped\n}\n\nfunction readCount(candidates: Array<unknown>) {\n for (const candidate of candidates) {\n if (typeof candidate === 'number') return candidate\n }\n return 0\n}\n\nfunction toTokenUsage(usage: unknown) {\n if (!isRecord(usage)) {\n return { promptTokens: 0, completionTokens: 0, totalTokens: 0 }\n }\n const promptTokens = readCount([\n usage.inputTokens,\n usage.input_tokens,\n usage.promptTokens,\n usage.prompt_tokens,\n ])\n const completionTokens = readCount([\n usage.outputTokens,\n usage.output_tokens,\n usage.completionTokens,\n usage.completion_tokens,\n ])\n const totalTokens = readCount([\n usage.totalTokens,\n usage.total_tokens,\n promptTokens + completionTokens,\n ])\n return { promptTokens, completionTokens, totalTokens }\n}\n\nfunction confidenceMap(providerMetadata: unknown) {\n if (!isRecord(providerMetadata)) return {}\n const typesafe = providerMetadata.typesafe\n if (!isRecord(typesafe)) return {}\n if (!isNumberRecord(typesafe.confidence)) return {}\n return typesafe.confidence\n}\n\nfunction confidenceFor(\n key: string,\n answer: Record<string, unknown>,\n byKey: Record<string, number>,\n) {\n if (typeof answer.confidence === 'number') return answer.confidence\n const fromMeta = byKey[key]\n if (typeof fromMeta === 'number') return fromMeta\n return 0\n}\n\nfunction toWireAnswer(answer: Record<string, unknown>, confidence: number) {\n switch (answer.type) {\n case 'boolean': {\n if (typeof answer.probability !== 'number') {\n throw new Error(\n 'Vercel Gateway evaluate boolean answer was missing probability',\n )\n }\n return { type: 'noul' as const, noul: answer.probability }\n }\n case 'choice': {\n if (typeof answer.choice !== 'string') {\n throw new Error(\n 'Vercel Gateway evaluate choice answer was missing choice',\n )\n }\n return {\n type: 'choice' as const,\n choice: answer.choice,\n probabilities: isNumberRecord(answer.probabilities)\n ? answer.probabilities\n : {},\n confidence,\n }\n }\n case 'score': {\n if (typeof answer.score !== 'number') {\n throw new Error(\n 'Vercel Gateway evaluate score answer was missing score',\n )\n }\n return {\n type: 'score' as const,\n score: answer.score,\n legend: isStringRecord(answer.legend) ? answer.legend : {},\n probabilities: isNumberRecord(answer.probabilities)\n ? answer.probabilities\n : {},\n confidence,\n }\n }\n default:\n throw new Error(\n `Vercel Gateway evaluate answer had an unexpected type: ${String(answer.type)}`,\n )\n }\n}\n\nfunction toWireAnswers(answers: unknown, byKey: Record<string, number>) {\n if (!isRecord(answers)) {\n throw new Error('Vercel Gateway evaluate response was missing answers')\n }\n const mapped: Record<string, WireAnswer> = {}\n const keys = Object.keys(answers)\n for (const key of keys) {\n const answer = answers[key]\n if (!isRecord(answer)) {\n throw new Error(\n `Vercel Gateway evaluate answer \"${key}\" had an unexpected shape`,\n )\n }\n mapped[key] = toWireAnswer(answer, confidenceFor(key, answer, byKey))\n }\n return mapped\n}\n\n/**\n * Vercel AI Gateway evaluate adapter.\n *\n * Talks to `POST /v4/ai/evaluation-model` with `fetch`. Jev is not a chat\n * model; this adapter does not use `/v1/chat/completions`.\n */\nexport class VercelGatewayEvaluateAdapter<\n TModel extends VercelGatewayEvaluateModel,\n> extends BaseEvaluateAdapter<TModel, VercelGatewayEvaluateProviderOptions> {\n readonly name = 'vercel-gateway' as const\n\n private readonly apiKey: string\n private readonly evaluateUrl: string\n private readonly extraHeaders: Record<string, string>\n\n constructor(config: VercelGatewayEvaluateConfig, model: TModel) {\n super({}, model)\n const defaults = withVercelGatewayDefaults(config)\n this.apiKey = config.apiKey\n this.evaluateUrl = resolveEvaluateUrl(defaults.baseURL)\n this.extraHeaders = extraRequestHeaders(defaults.defaultHeaders)\n }\n\n async evaluate(\n options: EvaluateOptions<VercelGatewayEvaluateProviderOptions>,\n ) {\n const { model, state, questions, modelOptions, abortSignal, logger } =\n options\n const mapped = mapGatewayModelOptions(modelOptions)\n\n logger.request(`activity=evaluate provider=${this.name} model=${model}`, {\n provider: this.name,\n model,\n })\n\n try {\n const response = await fetch(this.evaluateUrl, {\n method: 'POST',\n headers: {\n ...this.extraHeaders,\n Authorization: `Bearer ${this.apiKey}`,\n 'Content-Type': 'application/json',\n 'ai-gateway-protocol-version': GATEWAY_PROTOCOL_VERSION,\n 'ai-evaluation-model-specification-version': '4',\n 'ai-model-id': model,\n },\n body: JSON.stringify({\n ...mapped,\n model,\n state,\n questions: toGatewayQuestions(questions),\n }),\n ...(abortSignal ? { signal: abortSignal } : {}),\n })\n\n if (!response.ok) {\n const detail = await response.text().catch(() => '')\n throw new Error(\n `Vercel Gateway evaluate request failed: ${response.status} ${response.statusText}${\n detail ? ` — ${detail}` : ''\n }`,\n )\n }\n\n const json: unknown = await response.json()\n if (!isRecord(json)) {\n throw new Error(\n 'Vercel Gateway evaluate response had an unexpected shape',\n )\n }\n\n const result: EvaluateAdapterResult = {\n model: typeof json.model === 'string' ? json.model : model,\n answers: toWireAnswers(\n json.answers,\n confidenceMap(json.providerMetadata),\n ),\n usage: toTokenUsage(json.usage),\n }\n return result\n } catch (error: unknown) {\n logger.errors(`${this.name}.evaluate fatal`, {\n error: toRunErrorPayload(error, `${this.name}.evaluate failed`),\n source: `${this.name}.evaluate`,\n })\n throw error\n }\n }\n}\n\n/**\n * Create a Vercel AI Gateway evaluate adapter with an explicit API key.\n *\n * @param model Evaluate model id. Use `typesafe-ai/jev`.\n * @param apiKey Vercel AI Gateway API key.\n * @param config Optional client config (`baseURL`, `httpReferer`, `xTitle`).\n *\n * @example\n * ```ts\n * const adapter = createVercelGatewayDecider('typesafe-ai/jev', 'vck_...')\n * ```\n */\nexport function createVercelGatewayDecider<\n TModel extends VercelGatewayEvaluateModel,\n>(\n model: TModel,\n apiKey: string,\n config?: Omit<VercelGatewayEvaluateConfig, 'apiKey'>,\n) {\n return new VercelGatewayEvaluateAdapter({ apiKey, ...config }, model)\n}\n\n/**\n * Create a Vercel AI Gateway evaluate adapter.\n *\n * Reads `AI_GATEWAY_API_KEY`, then `VERCEL_OIDC_TOKEN`.\n *\n * @param model Evaluate model id. Use `typesafe-ai/jev`.\n * @param config Optional client config (`baseURL`, `httpReferer`, `xTitle`).\n *\n * @example\n * ```ts\n * import { decide, boolean } from '@tanstack/ai'\n * import { vercelGatewayDecider } from '@tanstack/ai-vercel-gateway'\n *\n * const result = await decide({\n * adapter: vercelGatewayDecider('typesafe-ai/jev'),\n * state: ticket,\n * questions: {\n * refund: boolean({\n * instructions: 'Is the customer asking for a refund?',\n * }),\n * },\n * })\n * ```\n */\nexport function vercelGatewayDecider<TModel extends VercelGatewayEvaluateModel>(\n model: TModel,\n config?: Omit<VercelGatewayEvaluateConfig, 'apiKey'>,\n) {\n return createVercelGatewayDecider(\n model,\n getVercelGatewayApiKeyFromEnv(),\n config,\n )\n}\n"],"mappings":";;;;;;;;;;;AA8BA,IAAM,gBAAgB;AACtB,IAAM,uBAAuB,+BAA+B;;AAG5D,IAAM,2BAA2B;AAEjC,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAS,eAAe,OAAiD;CACvE,IAAI,CAAC,SAAS,KAAK,GAAG,OAAO;CAC7B,MAAM,SAAS,OAAO,OAAO,KAAK;CAClC,KAAK,MAAM,QAAQ,QACjB,IAAI,OAAO,SAAS,UAAU,OAAO;CAEvC,OAAO;AACT;AAEA,SAAS,eAAe,OAAiD;CACvE,IAAI,CAAC,SAAS,KAAK,GAAG,OAAO;CAC7B,MAAM,SAAS,OAAO,OAAO,KAAK;CAClC,KAAK,MAAM,QAAQ,QACjB,IAAI,OAAO,SAAS,UAAU,OAAO;C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,MACF;AACF"}
@@ -9,6 +9,7 @@ export { VercelGatewayResponsesTextAdapter, createVercelGatewayResponsesText, ve
9
9
  export { createVercelGatewaySummarize, vercelGatewaySummarize, type VercelGatewaySummarizeConfig, type VercelGatewaySummarizeModel, } from './adapters/summarize.js';
10
10
  export { VercelGatewayEmbeddingAdapter, createVercelGatewayEmbedding, vercelGatewayEmbedding, type VercelGatewayEmbeddingConfig, } from './adapters/embedding.js';
11
11
  export { VercelGatewayImageAdapter, createVercelGatewayImage, vercelGatewayImage, type VercelGatewayImageConfig, } from './adapters/image.js';
12
+ export { VercelGatewayEvaluateAdapter, createVercelGatewayDecider, vercelGatewayDecider, type VercelGatewayEvaluateConfig, } from './adapters/evaluate.js';
12
13
  export type { VercelGatewayEmbeddingProviderOptions } from './embedding/embedding-provider-options.js';
13
14
  export type { VercelGatewayImageProviderOptions } from './image/image-provider-options.js';
14
15
  export type { VercelGatewayBaseOptions, VercelGatewayCommonOptions, VercelGatewayRoutingOptions, } from './text/text-provider-options.js';
package/dist/esm/index.js CHANGED
@@ -5,5 +5,6 @@ import { createVercelGatewayText, vercelGatewayText } from "./adapters/factory.j
5
5
  import { createVercelGatewaySummarize, vercelGatewaySummarize } from "./adapters/summarize.js";
6
6
  import { VercelGatewayEmbeddingAdapter, createVercelGatewayEmbedding, vercelGatewayEmbedding } from "./adapters/embedding.js";
7
7
  import { VercelGatewayImageAdapter, createVercelGatewayImage, vercelGatewayImage } from "./adapters/image.js";
8
+ import { VercelGatewayEvaluateAdapter, createVercelGatewayDecider, vercelGatewayDecider } from "./adapters/evaluate.js";
8
9
  import { VERCEL_GATEWAY_CHAT_MODELS, VERCEL_GATEWAY_EMBEDDING_MODELS, VERCEL_GATEWAY_IMAGE_MODELS, VERCEL_GATEWAY_MODEL_TAGS, VERCEL_GATEWAY_PROVIDERS } from "./model-meta.js";
9
- export { VERCEL_GATEWAY_CHAT_MODELS, VERCEL_GATEWAY_EMBEDDING_MODELS, VERCEL_GATEWAY_IMAGE_MODELS, VERCEL_GATEWAY_MODEL_TAGS, VERCEL_GATEWAY_PROVIDERS, VercelGatewayEmbeddingAdapter, VercelGatewayImageAdapter, VercelGatewayResponsesTextAdapter, VercelGatewayTextAdapter, createVercelGatewayEmbedding, createVercelGatewayImage, createVercelGatewayResponsesText, createVercelGatewaySummarize, createVercelGatewayText, getVercelGatewayApiKeyFromEnv, vercelGatewayEmbedding, vercelGatewayImage, vercelGatewayResponsesText, vercelGatewaySummarize, vercelGatewayText };
10
+ export { VERCEL_GATEWAY_CHAT_MODELS, VERCEL_GATEWAY_EMBEDDING_MODELS, VERCEL_GATEWAY_IMAGE_MODELS, VERCEL_GATEWAY_MODEL_TAGS, VERCEL_GATEWAY_PROVIDERS, VercelGatewayEmbeddingAdapter, VercelGatewayEvaluateAdapter, VercelGatewayImageAdapter, VercelGatewayResponsesTextAdapter, VercelGatewayTextAdapter, createVercelGatewayDecider, createVercelGatewayEmbedding, createVercelGatewayImage, createVercelGatewayResponsesText, createVercelGatewaySummarize, createVercelGatewayText, getVercelGatewayApiKeyFromEnv, vercelGatewayDecider, vercelGatewayEmbedding, vercelGatewayImage, vercelGatewayResponsesText, vercelGatewaySummarize, vercelGatewayText };
@@ -1,9 +1,9 @@
1
1
  import { VercelGatewayEmbeddingProviderOptions } from './embedding/embedding-provider-options.js';
2
2
  import { VercelGatewayImageProviderOptions, VercelGatewayImageSize } from './image/image-provider-options.js';
3
3
  import { VercelGatewayBaseOptions, VercelGatewayCommonOptions, VercelGatewayTextProviderOptions } from './text/text-provider-options.js';
4
- export declare const VERCEL_GATEWAY_CHAT_MODELS: readonly ["alibaba/qwen-3-14b", "alibaba/qwen-3-235b", "alibaba/qwen-3-30b", "alibaba/qwen-3-32b", "alibaba/qwen-3.6-max-preview", "alibaba/qwen3-235b-a22b-thinking", "alibaba/qwen3-coder", "alibaba/qwen3-coder-30b-a3b", "alibaba/qwen3-coder-next", "alibaba/qwen3-coder-plus", "alibaba/qwen3-max", "alibaba/qwen3-max-preview", "alibaba/qwen3-max-thinking", "alibaba/qwen3-next-80b-a3b-instruct", "alibaba/qwen3-next-80b-a3b-thinking", "alibaba/qwen3-vl-235b-a22b-instruct", "alibaba/qwen3-vl-instruct", "alibaba/qwen3-vl-thinking", "alibaba/qwen3.5-flash", "alibaba/qwen3.5-plus", "alibaba/qwen3.6-27b", "alibaba/qwen3.6-plus", "alibaba/qwen3.7-flash", "alibaba/qwen3.7-max", "alibaba/qwen3.7-plus", "alibaba/qwen3.8-2.4t-a95b", "alibaba/qwen3.8-27b", "alibaba/qwen3.8-flash", "alibaba/qwen3.8-max", "alibaba/qwen3.8-max-0902", "amazon/nova-2-lite", "amazon/nova-lite", "amazon/nova-micro", "amazon/nova-pro", "anthropic/claude-3-haiku", "anthropic/claude-fable-5", "anthropic/claude-fable-5.1", "anthropic/claude-haiku-4.5", "anthropic/claude-opus-4", "anthropic/claude-opus-4.5", "anthropic/claude-opus-4.6", "anthropic/claude-opus-4.7", "anthropic/claude-opus-4.8", "anthropic/claude-opus-4.8-fast", "anthropic/claude-opus-5", "anthropic/claude-opus-5-fast", "anthropic/claude-sonnet-4", "anthropic/claude-sonnet-4.5", "anthropic/claude-sonnet-4.6", "anthropic/claude-sonnet-5", "arcee-ai/trinity-large-thinking", "bytedance/seed-1.6", "bytedance/seed-1.8", "bytedance/seed-2.1-turbo", "cohere/command-a", "deepseek/deepseek-r1", "deepseek/deepseek-v3.1", "deepseek/deepseek-v3.1-terminus", "deepseek/deepseek-v3.2", "deepseek/deepseek-v3.2-thinking", "deepseek/deepseek-v4-flash", "deepseek/deepseek-v4-flash-0731", "deepseek/deepseek-v4-flash-vision-exp", "deepseek/deepseek-v4-pro", "deepseek/deepseek-v4-pro-0813", "deepseek/deepseek-v4.1-flash", "fish-audio/s1", "fish-audio/s1-free", "fish-audio/s2-pro", "fish-audio/s2-pro-free", "fish-audio/s2.1-pro", "fish-audio/s2.1-pro-free", "fish-audio/transcribe-1", "fish-audio/transcribe-1-free", "google/gemini-2.5-flash", "google/gemini-2.5-flash-image", "google/gemini-2.5-flash-lite", "google/gemini-2.5-pro", "google/gemini-3-flash", "google/gemini-3-pro-image", "google/gemini-3.1-flash-image", "google/gemini-3.1-flash-image-preview", "google/gemini-3.1-flash-lite", "google/gemini-3.1-flash-lite-image", "google/gemini-3.1-pro-preview", "google/gemini-3.5-flash", "google/gemini-3.5-flash-lite", "google/gemini-3.5-transcribe", "google/gemini-3.5-transcribe-live", "google/gemini-3.6-flash", "google/gemini-3.7-flash", "google/gemini-3.8-flash", "google/gemini-3.8-live", "google/gemini-3.8-live-extended-thinking", "google/gemini-omni-flash-preview", "google/gemma-4-26b-a4b-it", "google/gemma-4-31b-it", "inception/mercury-2", "inception/mercury-2.5", "inception/mercury-coder-small", "inclusionai/ling-3.0-flash", "inclusionai/ling-3.0-flash-fin", "inclusionai/ling-3.0-flash-fin-free", "inclusionai/ling-3.0-flash-sante", "inclusionai/ling-3.0-flash-sante-free", "inclusionai/ling-3.0-flash-vl", "inclusionai/ling-3.0-flash-vl-free", "inference-net/schematron-v2-small", "inference-net/schematron-v2-turbo", "interfaze/interfaze-beta", "kwaipilot/kat-coder-air-v2.5", "kwaipilot/kat-coder-pro-v1", "kwaipilot/kat-coder-pro-v2", "kwaipilot/kat-coder-pro-v2.5", "meta/llama-3.1-70b", "meta/llama-3.1-8b", "meta/llama-3.3-70b", "meta/llama-4-maverick", "meta/llama-4-scout", "meta/muse-glimmer-30b", "meta/muse-spark-1.1", "meta/muse-spark-1.2", "meta/muse-spark-1.2-contributor", "meta/muse-spark-1.3", "meta/muse-spark-1.3-contributor", "minimax/minimax-m2", "minimax/minimax-m2.1", "minimax/minimax-m2.1-lightning", "minimax/minimax-m2.5", "minimax/minimax-m2.5-highspeed", "minimax/minimax-m2.7", "minimax/minimax-m2.7-highspeed", "minimax/minimax-m3", "mistral/codestral", "mistral/ministral-14b", "mistral/ministral-3b", "mistral/ministral-8b", "mistral/mistral-large-3", "mistral/mistral-medium-3.5", "mistral/mistral-nemo", "mistral/mistral-small", "moonshotai/kimi-k2", "moonshotai/kimi-k2-thinking", "moonshotai/kimi-k2.5", "moonshotai/kimi-k2.6", "moonshotai/kimi-k2.7-code", "moonshotai/kimi-k2.7-code-highspeed", "moonshotai/kimi-k3", "moonshotai/kimi-k3-fast", "morph/morph-v3-fast", "morph/morph-v3-large", "nvidia/nemotron-3-nano-30b-a3b", "nvidia/nemotron-3-super-120b-a12b", "nvidia/nemotron-3-ultra-550b-a55b", "nvidia/nemotron-3.5-lightning", "nvidia/nemotron-nano-12b-v2-vl", "nvidia/nemotron-nano-9b-v2", "openai/gpt-3.5-turbo", "openai/gpt-4-turbo", "openai/gpt-4.1", "openai/gpt-4.1-fast", "openai/gpt-4.1-mini", "openai/gpt-4.1-mini-fast", "openai/gpt-4.1-nano", "openai/gpt-4.1-nano-fast", "openai/gpt-4o", "openai/gpt-4o-fast", "openai/gpt-4o-mini", "openai/gpt-4o-mini-fast", "openai/gpt-4o-mini-transcribe", "openai/gpt-4o-transcribe", "openai/gpt-5", "openai/gpt-5-codex", "openai/gpt-5-fast", "openai/gpt-5-mini", "openai/gpt-5-mini-fast", "openai/gpt-5-nano", "openai/gpt-5-pro", "openai/gpt-5.1-codex", "openai/gpt-5.1-codex-max", "openai/gpt-5.1-codex-mini", "openai/gpt-5.1-thinking", "openai/gpt-5.1-thinking-fast", "openai/gpt-5.2", "openai/gpt-5.2-codex", "openai/gpt-5.2-fast", "openai/gpt-5.2-pro", "openai/gpt-5.3-codex", "openai/gpt-5.3-codex-fast", "openai/gpt-5.4", "openai/gpt-5.4-fast", "openai/gpt-5.4-mini", "openai/gpt-5.4-mini-fast", "openai/gpt-5.4-nano", "openai/gpt-5.4-pro", "openai/gpt-5.5", "openai/gpt-5.5-fast", "openai/gpt-5.5-pro", "openai/gpt-5.6-luna", "openai/gpt-5.6-luna-fast", "openai/gpt-5.6-sol", "openai/gpt-5.6-sol-fast", "openai/gpt-5.6-terra", "openai/gpt-5.6-terra-fast", "openai/gpt-6-astra", "openai/gpt-6-astra-fast", "openai/gpt-live-1", "openai/gpt-oss-120b", "openai/gpt-oss-20b", "openai/gpt-oss-safeguard-120b", "openai/gpt-oss-safeguard-20b", "openai/gpt-realtime-1.5", "openai/gpt-realtime-2", "openai/gpt-realtime-2.1", "openai/gpt-realtime-mini", "openai/gpt-realtime-whisper", "openai/o1", "openai/o3", "openai/o3-fast", "openai/o3-mini", "openai/o3-pro", "openai/o4-mini", "openai/o4-mini-fast", "openai/tts-1", "openai/tts-1-hd", "openai/whisper-1", "perplexity/sonar", "perplexity/sonar-pro", "perplexity/sonar-reasoning-pro", "poolside/laguna-s-2.1", "poolside/laguna-s-2.1-free", "sakana/fugu-max", "sakana/fugu-ultra", "sakana/fugu-ultra-v2", "sakana/namazu", "spacexai/grok-4.1-fast-non-reasoning", "spacexai/grok-4.1-fast-reasoning", "spacexai/grok-4.20-multi-agent", "spacexai/grok-4.20-multi-agent-beta", "spacexai/grok-4.20-non-reasoning", "spacexai/grok-4.20-non-reasoning-beta", "spacexai/grok-4.20-reasoning", "spacexai/grok-4.20-reasoning-beta", "spacexai/grok-4.3", "spacexai/grok-4.5", "spacexai/grok-4.6", "spacexai/grok-build-0.1", "spacexai/grok-stt", "spacexai/grok-tts", "spacexai/grok-voice-think-fast-1.0", "spacexai/grok-voice-think-fast-2.0", "stepfun/step-3.5-flash", "stepfun/step-3.7-flash", "tencent/hy-mt2-lite", "tencent/hy-mt2-plus", "tencent/hy-mt2-pro", "tencent/hy3", "tencent/hy4-preview", "thinkingmachines/inkling", "thinkingmachines/inkling-small", "xiaomi/mimo-v2.5", "xiaomi/mimo-v2.5-pro", "zai/glm-4.5", "zai/glm-4.5-air", "zai/glm-4.5v", "zai/glm-4.6", "zai/glm-4.7", "zai/glm-4.7-flash", "zai/glm-4.7-flashx", "zai/glm-5", "zai/glm-5-turbo", "zai/glm-5.1", "zai/glm-5.2", "zai/glm-5.2-fast", "zai/glm-5.3", "zai/glm-5.3-fast", "zai/glm-5.3-flash", "zai/glm-5v-turbo"];
4
+ export declare const VERCEL_GATEWAY_CHAT_MODELS: readonly ["alibaba/qwen-3-14b", "alibaba/qwen-3-235b", "alibaba/qwen-3-30b", "alibaba/qwen-3-32b", "alibaba/qwen-3.6-max-preview", "alibaba/qwen3-235b-a22b-thinking", "alibaba/qwen3-coder", "alibaba/qwen3-coder-30b-a3b", "alibaba/qwen3-coder-next", "alibaba/qwen3-coder-plus", "alibaba/qwen3-max", "alibaba/qwen3-max-preview", "alibaba/qwen3-max-thinking", "alibaba/qwen3-next-80b-a3b-instruct", "alibaba/qwen3-next-80b-a3b-thinking", "alibaba/qwen3-vl-235b-a22b-instruct", "alibaba/qwen3-vl-instruct", "alibaba/qwen3-vl-thinking", "alibaba/qwen3.5-flash", "alibaba/qwen3.5-plus", "alibaba/qwen3.6-27b", "alibaba/qwen3.6-plus", "alibaba/qwen3.7-flash", "alibaba/qwen3.7-max", "alibaba/qwen3.7-plus", "alibaba/qwen3.8-2.4t-a95b", "alibaba/qwen3.8-27b", "alibaba/qwen3.8-flash", "alibaba/qwen3.8-max", "alibaba/qwen3.8-max-0902", "amazon/nova-2-lite", "amazon/nova-lite", "amazon/nova-micro", "amazon/nova-pro", "anthropic/claude-3-haiku", "anthropic/claude-fable-5", "anthropic/claude-fable-5.1", "anthropic/claude-haiku-4.5", "anthropic/claude-opus-4", "anthropic/claude-opus-4.5", "anthropic/claude-opus-4.6", "anthropic/claude-opus-4.7", "anthropic/claude-opus-4.8", "anthropic/claude-opus-4.8-fast", "anthropic/claude-opus-5", "anthropic/claude-opus-5-fast", "anthropic/claude-sonnet-4", "anthropic/claude-sonnet-4.5", "anthropic/claude-sonnet-4.6", "anthropic/claude-sonnet-5", "arcee-ai/trinity-large-thinking", "bytedance/seed-1.6", "bytedance/seed-1.8", "bytedance/seed-2.1-turbo", "cohere/command-a", "deepseek/deepseek-r1", "deepseek/deepseek-v3.1", "deepseek/deepseek-v3.1-terminus", "deepseek/deepseek-v3.2", "deepseek/deepseek-v3.2-thinking", "deepseek/deepseek-v4-flash", "deepseek/deepseek-v4-flash-0731", "deepseek/deepseek-v4-flash-vision-exp", "deepseek/deepseek-v4-pro", "deepseek/deepseek-v4-pro-0813", "deepseek/deepseek-v4.1-flash", "fish-audio/s1", "fish-audio/s1-free", "fish-audio/s2-pro", "fish-audio/s2-pro-free", "fish-audio/s2.1-pro", "fish-audio/s2.1-pro-free", "fish-audio/transcribe-1", "fish-audio/transcribe-1-free", "google/gemini-2.5-flash", "google/gemini-2.5-flash-image", "google/gemini-2.5-flash-lite", "google/gemini-2.5-pro", "google/gemini-3-flash", "google/gemini-3-pro-image", "google/gemini-3.1-flash-image", "google/gemini-3.1-flash-image-preview", "google/gemini-3.1-flash-lite", "google/gemini-3.1-flash-lite-image", "google/gemini-3.1-pro-preview", "google/gemini-3.5-flash", "google/gemini-3.5-flash-lite", "google/gemini-3.5-transcribe", "google/gemini-3.5-transcribe-live", "google/gemini-3.6-flash", "google/gemini-3.7-flash", "google/gemini-3.8-flash", "google/gemini-3.8-live", "google/gemini-3.8-live-extended-thinking", "google/gemini-omni-flash-preview", "google/gemma-4-26b-a4b-it", "google/gemma-4-31b-it", "inception/mercury-2", "inception/mercury-2.5", "inception/mercury-coder-small", "inclusionai/ling-3.0-flash", "inclusionai/ling-3.0-flash-fin", "inclusionai/ling-3.0-flash-fin-free", "inclusionai/ling-3.0-flash-sante", "inclusionai/ling-3.0-flash-sante-free", "inclusionai/ling-3.0-flash-vl", "inclusionai/ling-3.0-flash-vl-free", "inference-net/schematron-v2-small", "inference-net/schematron-v2-turbo", "interfaze/interfaze-beta", "meta/llama-3.1-70b", "meta/llama-3.1-8b", "meta/llama-3.3-70b", "meta/llama-4-maverick", "meta/llama-4-scout", "meta/muse-glimmer-30b", "meta/muse-spark-1.1", "meta/muse-spark-1.2", "meta/muse-spark-1.2-contributor", "meta/muse-spark-1.3", "meta/muse-spark-1.3-contributor", "minimax/minimax-m2", "minimax/minimax-m2.1", "minimax/minimax-m2.1-lightning", "minimax/minimax-m2.5", "minimax/minimax-m2.5-highspeed", "minimax/minimax-m2.7", "minimax/minimax-m2.7-highspeed", "minimax/minimax-m3", "mistral/codestral", "mistral/ministral-14b", "mistral/ministral-3b", "mistral/ministral-8b", "mistral/mistral-large-3", "mistral/mistral-medium-3.5", "mistral/mistral-nemo", "mistral/mistral-small", "moonshotai/kimi-k2", "moonshotai/kimi-k2-thinking", "moonshotai/kimi-k2.5", "moonshotai/kimi-k2.6", "moonshotai/kimi-k2.7-code", "moonshotai/kimi-k2.7-code-highspeed", "moonshotai/kimi-k3", "moonshotai/kimi-k3-fast", "morph/morph-v3-fast", "morph/morph-v3-large", "nvidia/nemotron-3-nano-30b-a3b", "nvidia/nemotron-3-super-120b-a12b", "nvidia/nemotron-3-ultra-550b-a55b", "nvidia/nemotron-3.5-lightning", "nvidia/nemotron-nano-12b-v2-vl", "nvidia/nemotron-nano-9b-v2", "openai/gpt-3.5-turbo", "openai/gpt-4-turbo", "openai/gpt-4.1", "openai/gpt-4.1-fast", "openai/gpt-4.1-mini", "openai/gpt-4.1-mini-fast", "openai/gpt-4.1-nano", "openai/gpt-4.1-nano-fast", "openai/gpt-4o", "openai/gpt-4o-fast", "openai/gpt-4o-mini", "openai/gpt-4o-mini-fast", "openai/gpt-4o-mini-transcribe", "openai/gpt-4o-transcribe", "openai/gpt-5", "openai/gpt-5-codex", "openai/gpt-5-fast", "openai/gpt-5-mini", "openai/gpt-5-mini-fast", "openai/gpt-5-nano", "openai/gpt-5-pro", "openai/gpt-5.1-codex", "openai/gpt-5.1-codex-max", "openai/gpt-5.1-codex-mini", "openai/gpt-5.1-thinking", "openai/gpt-5.1-thinking-fast", "openai/gpt-5.2", "openai/gpt-5.2-codex", "openai/gpt-5.2-fast", "openai/gpt-5.2-pro", "openai/gpt-5.3-codex", "openai/gpt-5.3-codex-fast", "openai/gpt-5.4", "openai/gpt-5.4-fast", "openai/gpt-5.4-mini", "openai/gpt-5.4-mini-fast", "openai/gpt-5.4-nano", "openai/gpt-5.4-pro", "openai/gpt-5.5", "openai/gpt-5.5-fast", "openai/gpt-5.5-pro", "openai/gpt-5.6-luna", "openai/gpt-5.6-luna-fast", "openai/gpt-5.6-sol", "openai/gpt-5.6-sol-fast", "openai/gpt-5.6-terra", "openai/gpt-5.6-terra-fast", "openai/gpt-6-astra", "openai/gpt-6-astra-fast", "openai/gpt-live-1", "openai/gpt-oss-120b", "openai/gpt-oss-20b", "openai/gpt-oss-safeguard-120b", "openai/gpt-oss-safeguard-20b", "openai/gpt-realtime-1.5", "openai/gpt-realtime-2", "openai/gpt-realtime-2.1", "openai/gpt-realtime-mini", "openai/gpt-realtime-whisper", "openai/o1", "openai/o3", "openai/o3-fast", "openai/o3-mini", "openai/o3-pro", "openai/o4-mini", "openai/o4-mini-fast", "openai/tts-1", "openai/tts-1-hd", "openai/whisper-1", "perplexity/sonar", "perplexity/sonar-pro", "perplexity/sonar-reasoning-pro", "poolside/laguna-s-2.1", "poolside/laguna-s-2.1-free", "sakana/fugu-max", "sakana/fugu-ultra", "sakana/fugu-ultra-v2", "sakana/namazu", "spacexai/grok-4.1-fast-non-reasoning", "spacexai/grok-4.1-fast-reasoning", "spacexai/grok-4.20-multi-agent", "spacexai/grok-4.20-multi-agent-beta", "spacexai/grok-4.20-non-reasoning", "spacexai/grok-4.20-non-reasoning-beta", "spacexai/grok-4.20-reasoning", "spacexai/grok-4.20-reasoning-beta", "spacexai/grok-4.3", "spacexai/grok-4.5", "spacexai/grok-4.6", "spacexai/grok-build-0.1", "spacexai/grok-stt", "spacexai/grok-tts", "spacexai/grok-voice-think-fast-1.0", "spacexai/grok-voice-think-fast-2.0", "stepfun/step-3.5-flash", "stepfun/step-3.7-flash", "tencent/hy-mt2-lite", "tencent/hy-mt2-plus", "tencent/hy-mt2-pro", "tencent/hy3", "tencent/hy4-preview", "thinkingmachines/inkling", "thinkingmachines/inkling-small", "typesafe-ai/jev", "xiaomi/mimo-v2.5", "xiaomi/mimo-v2.5-pro", "zai/glm-4.5", "zai/glm-4.5-air", "zai/glm-4.5v", "zai/glm-4.6", "zai/glm-4.7", "zai/glm-4.7-flash", "zai/glm-4.7-flashx", "zai/glm-5", "zai/glm-5-turbo", "zai/glm-5.1", "zai/glm-5.2", "zai/glm-5.2-fast", "zai/glm-5.3", "zai/glm-5.3-fast", "zai/glm-5.3-flash", "zai/glm-5v-turbo"];
5
5
  export type VercelGatewayChatModel = (typeof VERCEL_GATEWAY_CHAT_MODELS)[number];
6
- export declare const VERCEL_GATEWAY_PROVIDERS: readonly ["alibaba", "amazon", "anthropic", "arcee-ai", "bfl", "bytedance", "cohere", "deepseek", "fish-audio", "google", "inception", "inclusionai", "inference-net", "interfaze", "klingai", "kwaipilot", "meta", "minimax", "mistral", "moonshotai", "morph", "nvidia", "openai", "perplexity", "poolside", "prodia", "quiverai", "recraft", "sakana", "spacexai", "stepfun", "tencent", "thinkingmachines", "voyage", "xiaomi", "zai"];
6
+ export declare const VERCEL_GATEWAY_PROVIDERS: readonly ["alibaba", "amazon", "anthropic", "arcee-ai", "bfl", "bytedance", "cohere", "deepseek", "fish-audio", "google", "inception", "inclusionai", "inference-net", "interfaze", "klingai", "meta", "minimax", "mistral", "moonshotai", "morph", "nvidia", "openai", "perplexity", "poolside", "prodia", "quiverai", "recraft", "sakana", "spacexai", "stepfun", "tencent", "thinkingmachines", "typesafe-ai", "voyage", "xiaomi", "zai"];
7
7
  export type VercelGatewayProvider = (typeof VERCEL_GATEWAY_PROVIDERS)[number];
8
8
  export declare const VERCEL_GATEWAY_MODEL_TAGS: readonly ["audio-input", "explicit-caching", "fast", "file-input", "free", "image-generation", "implicit-caching", "reasoning", "structured-output", "tool-use", "video-generation", "video-input", "vision", "web-search", "websocket-realtime", "websocket-transcription"];
9
9
  export type VercelGatewayModelTag = (typeof VERCEL_GATEWAY_MODEL_TAGS)[number];
@@ -122,10 +122,6 @@ export type VercelGatewayChatModelProviderOptionsByName = {
122
122
  'inference-net/schematron-v2-small': VercelGatewayCommonOptions & Pick<VercelGatewayBaseOptions, 'max_tokens' | 'max_output_tokens' | 'temperature' | 'stop' | 'response_format' | 'structured_outputs'>;
123
123
  'inference-net/schematron-v2-turbo': VercelGatewayCommonOptions & Pick<VercelGatewayBaseOptions, 'max_tokens' | 'max_output_tokens' | 'temperature' | 'stop' | 'response_format' | 'structured_outputs'>;
124
124
  'interfaze/interfaze-beta': VercelGatewayCommonOptions & Pick<VercelGatewayBaseOptions, 'max_tokens' | 'max_output_tokens' | 'temperature' | 'stop' | 'reasoning' | 'include_reasoning'>;
125
- 'kwaipilot/kat-coder-air-v2.5': VercelGatewayCommonOptions & Pick<VercelGatewayBaseOptions, 'max_tokens' | 'max_output_tokens' | 'temperature' | 'stop' | 'reasoning' | 'include_reasoning'>;
126
- 'kwaipilot/kat-coder-pro-v1': VercelGatewayCommonOptions & Pick<VercelGatewayBaseOptions, 'max_tokens' | 'max_output_tokens' | 'temperature' | 'stop'>;
127
- 'kwaipilot/kat-coder-pro-v2': VercelGatewayCommonOptions & Pick<VercelGatewayBaseOptions, 'max_tokens' | 'max_output_tokens' | 'temperature' | 'stop' | 'reasoning' | 'include_reasoning'>;
128
- 'kwaipilot/kat-coder-pro-v2.5': VercelGatewayCommonOptions & Pick<VercelGatewayBaseOptions, 'max_tokens' | 'max_output_tokens' | 'temperature' | 'stop' | 'reasoning' | 'include_reasoning'>;
129
125
  'meta/llama-3.1-70b': VercelGatewayCommonOptions & Pick<VercelGatewayBaseOptions, 'max_tokens' | 'max_output_tokens' | 'temperature' | 'stop'>;
130
126
  'meta/llama-3.1-8b': VercelGatewayCommonOptions & Pick<VercelGatewayBaseOptions, 'max_tokens' | 'max_output_tokens' | 'temperature' | 'stop'>;
131
127
  'meta/llama-3.3-70b': VercelGatewayCommonOptions & Pick<VercelGatewayBaseOptions, 'max_tokens' | 'max_output_tokens' | 'temperature' | 'stop'>;
@@ -272,6 +268,7 @@ export type VercelGatewayChatModelProviderOptionsByName = {
272
268
  'tencent/hy4-preview': VercelGatewayCommonOptions & Pick<VercelGatewayBaseOptions, 'max_tokens' | 'max_output_tokens' | 'temperature' | 'stop' | 'reasoning' | 'include_reasoning'>;
273
269
  'thinkingmachines/inkling': VercelGatewayCommonOptions & Pick<VercelGatewayBaseOptions, 'max_tokens' | 'max_output_tokens' | 'temperature' | 'stop' | 'reasoning' | 'include_reasoning'>;
274
270
  'thinkingmachines/inkling-small': VercelGatewayCommonOptions & Pick<VercelGatewayBaseOptions, 'max_tokens' | 'max_output_tokens' | 'temperature' | 'stop' | 'reasoning' | 'include_reasoning'>;
271
+ 'typesafe-ai/jev': VercelGatewayCommonOptions;
275
272
  'xiaomi/mimo-v2.5': VercelGatewayCommonOptions & Pick<VercelGatewayBaseOptions, 'max_tokens' | 'max_output_tokens' | 'temperature' | 'stop' | 'reasoning' | 'include_reasoning'>;
276
273
  'xiaomi/mimo-v2.5-pro': VercelGatewayCommonOptions & Pick<VercelGatewayBaseOptions, 'max_tokens' | 'max_output_tokens' | 'temperature' | 'stop' | 'reasoning' | 'include_reasoning'>;
277
274
  'zai/glm-4.5': VercelGatewayCommonOptions & Pick<VercelGatewayBaseOptions, 'max_tokens' | 'max_output_tokens' | 'temperature' | 'stop' | 'reasoning' | 'include_reasoning'>;
@@ -412,10 +409,6 @@ export type VercelGatewayModelInputModalitiesByName = {
412
409
  'inference-net/schematron-v2-small': readonly ['text'];
413
410
  'inference-net/schematron-v2-turbo': readonly ['text'];
414
411
  'interfaze/interfaze-beta': readonly ['text', 'image', 'document'];
415
- 'kwaipilot/kat-coder-air-v2.5': readonly ['text', 'image'];
416
- 'kwaipilot/kat-coder-pro-v1': readonly ['text'];
417
- 'kwaipilot/kat-coder-pro-v2': readonly ['text'];
418
- 'kwaipilot/kat-coder-pro-v2.5': readonly ['text', 'image'];
419
412
  'meta/llama-3.1-70b': readonly ['text'];
420
413
  'meta/llama-3.1-8b': readonly ['text'];
421
414
  'meta/llama-3.3-70b': readonly ['text'];
@@ -445,7 +438,7 @@ export type VercelGatewayModelInputModalitiesByName = {
445
438
  'mistral/mistral-small': readonly ['text', 'image'];
446
439
  'moonshotai/kimi-k2': readonly ['text'];
447
440
  'moonshotai/kimi-k2-thinking': readonly ['text'];
448
- 'moonshotai/kimi-k2.5': readonly ['text', 'image', 'video'];
441
+ 'moonshotai/kimi-k2.5': readonly ['text', 'image'];
449
442
  'moonshotai/kimi-k2.6': readonly ['text', 'image', 'video'];
450
443
  'moonshotai/kimi-k2.7-code': readonly ['text', 'image', 'document', 'video'];
451
444
  'moonshotai/kimi-k2.7-code-highspeed': readonly [
@@ -571,6 +564,7 @@ export type VercelGatewayModelInputModalitiesByName = {
571
564
  'tencent/hy4-preview': readonly ['text'];
572
565
  'thinkingmachines/inkling': readonly ['text', 'image', 'document'];
573
566
  'thinkingmachines/inkling-small': readonly ['text', 'image', 'document'];
567
+ 'typesafe-ai/jev': readonly ['text'];
574
568
  'xiaomi/mimo-v2.5': readonly ['text', 'image'];
575
569
  'xiaomi/mimo-v2.5-pro': readonly ['text'];
576
570
  'zai/glm-4.5': readonly ['text'];
@@ -110,10 +110,6 @@ var VERCEL_GATEWAY_CHAT_MODELS = [
110
110
  "inference-net/schematron-v2-small",
111
111
  "inference-net/schematron-v2-turbo",
112
112
  "interfaze/interfaze-beta",
113
- "kwaipilot/kat-coder-air-v2.5",
114
- "kwaipilot/kat-coder-pro-v1",
115
- "kwaipilot/kat-coder-pro-v2",
116
- "kwaipilot/kat-coder-pro-v2.5",
117
113
  "meta/llama-3.1-70b",
118
114
  "meta/llama-3.1-8b",
119
115
  "meta/llama-3.3-70b",
@@ -260,6 +256,7 @@ var VERCEL_GATEWAY_CHAT_MODELS = [
260
256
  "tencent/hy4-preview",
261
257
  "thinkingmachines/inkling",
262
258
  "thinkingmachines/inkling-small",
259
+ "typesafe-ai/jev",
263
260
  "xiaomi/mimo-v2.5",
264
261
  "xiaomi/mimo-v2.5-pro",
265
262
  "zai/glm-4.5",
@@ -295,7 +292,6 @@ var VERCEL_GATEWAY_PROVIDERS = [
295
292
  "inference-net",
296
293
  "interfaze",
297
294
  "klingai",
298
- "kwaipilot",
299
295
  "meta",
300
296
  "minimax",
301
297
  "mistral",
@@ -313,6 +309,7 @@ var VERCEL_GATEWAY_PROVIDERS = [
313
309
  "stepfun",
314
310
  "tencent",
315
311
  "thinkingmachines",
312
+ "typesafe-ai",
316
313
  "voyage",
317
314
  "xiaomi",
318
315
  "zai"