feat(ai): derive generated model types from JSON

This commit is contained in:
Armin Ronacher
2026-07-22 13:11:21 +02:00
parent 906b40a753
commit 5dc40fee33
45 changed files with 384 additions and 4687 deletions
+2 -2
View File
@@ -1533,7 +1533,7 @@ Compat is a strict superset of the root entrypoint, so a file can switch its imp
### Adding a New Provider
Adding a new LLM provider requires changes across multiple files. The layered layout: API implementations live in `src/api/`, provider factories in `src/providers/`, generated catalogs in `src/providers/<id>.models.ts`. This checklist covers all necessary steps:
Adding a new LLM provider requires changes across multiple files. The layered layout: API implementations live in `src/api/`, provider factories in `src/providers/`, stable generated catalog wrappers live in `src/providers/<id>.models.ts`, and `src/models.generated.ts` registers them. This checklist covers all necessary steps:
#### 1. Core Types (`src/types.ts`)
@@ -1555,7 +1555,7 @@ Add a lazy wrapper `src/api/<api-id>.lazy.ts` (`<name>Api()` via `lazyApi()`) so
#### 3. Model Generation (`scripts/generate-models.ts`, `scripts/generate-image-models.ts`)
- Add logic to fetch and parse models from the provider's source (e.g., models.dev API)
- Map chat/tool-capable provider model data to the standardized `Model` interface via `scripts/generate-models.ts`; regeneration emits structural `src/providers/<id>.models.ts` shards, ignored values in `src/providers/data/`, and the aggregator
- Map chat/tool-capable provider model data to the standardized `Model` interface via `scripts/generate-models.ts`; hydration groups the ignored `src/providers/data/<id>.json` values by API, while stable `src/providers/<id>.models.ts` wrappers derive exact model/API types directly from those JSON keys
- Map image-generation provider model data to the standardized `ImagesModel` interface via `scripts/generate-image-models.ts`
- Handle provider-specific quirks (pricing format, capability flags, model ID transformations)
+36 -54
View File
@@ -23,7 +23,7 @@ import {
createModelDataManifest,
type ModelDataStructure,
MODEL_DATA_MANIFEST_FILE,
readModelDataStructure,
readModelDataProviderIds,
validateGeneratedModelData,
validateModelDataDirectory,
} from "./model-data.ts";
@@ -2482,41 +2482,30 @@ async function generateModels() {
const serializeJson = (value: unknown) => `${JSON.stringify(value, null, generatorOptions.pretty ? 2 : undefined)}\n`;
const writeJson = (path: string, value: unknown) => writeFileSync(path, serializeJson(value));
let generatedDataProviderIds = sortedProviderIds;
let generatedDataProviders = jsonProviders;
let modelDataStructure: ModelDataStructure = Object.fromEntries(
sortedProviderIds.map((providerId) => [
providerId,
Object.fromEntries(
Object.entries(jsonProviders[providerId]).map(([modelId, model]) => [modelId, model.api]),
),
]),
);
const generatedDataProviderIds = generatorOptions.dataOnly
? readModelDataProviderIds(packageRoot)
: sortedProviderIds;
const missingProviderIds = generatedDataProviderIds.filter((providerId) => !jsonProviders[providerId]);
if (missingProviderIds.length > 0) {
throw new Error(`Cannot hydrate missing providers: ${missingProviderIds.join(", ")}`);
}
if (generatorOptions.dataOnly) {
modelDataStructure = readModelDataStructure(packageRoot);
generatedDataProviderIds = Object.keys(modelDataStructure);
const hydratedProviders: typeof jsonProviders = {};
const hydrationErrors: string[] = [];
for (const [providerId, expectedModels] of Object.entries(modelDataStructure)) {
hydratedProviders[providerId] = {};
for (const [modelId, expectedApi] of Object.entries(expectedModels)) {
const model = jsonProviders[providerId]?.[modelId];
if (!model) {
hydrationErrors.push(`missing ${providerId}/${modelId}`);
continue;
}
if (model.api !== expectedApi) {
hydrationErrors.push(`${providerId}/${modelId} uses ${model.api}, expected ${expectedApi}`);
continue;
}
hydratedProviders[providerId][modelId] = model;
// Only the ignored internal data is grouped by API for type derivation. Public JSON catalog output stays flat.
const generatedDataProviders: Record<string, Record<string, Record<string, Model<Api>>>> = {};
const modelDataStructure: ModelDataStructure = {};
for (const providerId of generatedDataProviderIds) {
const models = jsonProviders[providerId];
generatedDataProviders[providerId] = {};
modelDataStructure[providerId] = {};
const apiIds = Array.from(new Set(Object.values(models).map((model) => model.api))).sort();
for (const api of apiIds) {
generatedDataProviders[providerId][api] = {};
for (const [modelId, model] of Object.entries(models)) {
if (model.api !== api) continue;
generatedDataProviders[providerId][api][modelId] = model;
modelDataStructure[providerId][modelId] = api;
}
}
if (hydrationErrors.length > 0) {
throw new Error(`Cannot hydrate the committed model catalog:\n${hydrationErrors.map((error) => ` - ${error}`).join("\n")}`);
}
generatedDataProviders = hydratedProviders;
}
if (!generatorOptions.jsonOnly) {
@@ -2526,7 +2515,7 @@ async function generateModels() {
const stagingRoot = mkdtempSync(join(providersDir, ".model-generation-"));
const stagedDataDir = join(stagingRoot, "data");
const previousDataDir = join(stagingRoot, "previous-data");
let restoreStructuralCatalog: (() => void) | undefined;
let restoreGeneratedCatalog: (() => void) | undefined;
try {
mkdirSync(stagedDataDir, { recursive: true });
const fileContents: Record<string, string> = {};
@@ -2543,7 +2532,6 @@ async function generateModels() {
validateModelDataDirectory(modelDataStructure, stagedDataDir);
if (!generatorOptions.dataOnly) {
// Generate TypeScript structural catalogs only after the model data is complete and valid.
const previousShardContents = new Map(
readdirSync(providersDir)
.filter((entry) => entry.endsWith(".models.ts"))
@@ -2551,7 +2539,7 @@ async function generateModels() {
);
const aggregatorPath = join(packageRoot, "src/models.generated.ts");
const previousAggregator = readFileSync(aggregatorPath, "utf8");
restoreStructuralCatalog = () => {
restoreGeneratedCatalog = () => {
for (const entry of readdirSync(providersDir)) {
if (entry.endsWith(".models.ts")) rmSync(join(providersDir, entry));
}
@@ -2568,21 +2556,12 @@ async function generateModels() {
const catalogConstName = (providerId: string) =>
`${providerId.toUpperCase().replace(/[^A-Z0-9]+/g, "_")}_MODELS`;
const generatedShardFiles = new Set<string>();
function emitModelShape(model: Model<any>, indent: string): string {
return `${indent}${JSON.stringify(model.id)}: Model<${JSON.stringify(model.api)}> & {\n${indent}\tid: ${JSON.stringify(model.id)};\n${indent}\tprovider: ${JSON.stringify(model.provider)};\n${indent}};\n`;
}
for (const providerId of sortedProviderIds) {
const models = providers[providerId];
let output = generatedHeader;
output += `import values from "./data/${providerId}.json" with { type: "json" };\n`;
output += `import type { Model } from "../types.ts";\n\n`;
output += `export const ${catalogConstName(providerId)} = values as {\n`;
for (const modelId of Object.keys(models).sort()) {
output += emitModelShape(models[modelId], "\t");
}
output += `};\n`;
output += `import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";\n\n`;
output += `export const ${catalogConstName(providerId)}: ModelCatalog<typeof values, ${JSON.stringify(providerId)}> =\n`;
output += `\tflattenModelCatalog(${JSON.stringify(providerId)}, values);\n`;
const filename = `${providerId}.models.ts`;
generatedShardFiles.add(filename);
writeFileSync(join(providersDir, filename), output);
@@ -2590,19 +2569,22 @@ async function generateModels() {
for (const entry of readdirSync(providersDir)) {
if (entry.endsWith(".models.ts") && !generatedShardFiles.has(entry)) rmSync(join(providersDir, entry));
}
console.log(`Generated ${sortedProviderIds.length} catalog structures under src/providers/`);
let output = generatedHeader;
for (const providerId of sortedProviderIds) {
output += `import { ${catalogConstName(providerId)} } from "./providers/${providerId}.models.ts";\n`;
}
output += `\nexport const MODELS = {\n`;
output += `\nexport const MODELS: {\n`;
for (const providerId of sortedProviderIds) {
output += `\treadonly ${JSON.stringify(providerId)}: typeof ${catalogConstName(providerId)};\n`;
}
output += `} = {\n`;
for (const providerId of sortedProviderIds) {
output += `\t${JSON.stringify(providerId)}: ${catalogConstName(providerId)},\n`;
}
output += `} as const;\n`;
output += `};\n`;
writeFileSync(aggregatorPath, output);
console.log("Generated src/models.generated.ts");
console.log("Generated provider catalogs and src/models.generated.ts");
}
const hadPreviousData = existsSync(dataDir);
@@ -2615,14 +2597,14 @@ async function generateModels() {
if (hadPreviousData && existsSync(previousDataDir)) renameSync(previousDataDir, dataDir);
throw error;
}
restoreStructuralCatalog = undefined;
restoreGeneratedCatalog = undefined;
console.log(
generatorOptions.dataOnly
? "Hydrated JSON model values under src/providers/data/"
: "Generated JSON model values under src/providers/data/",
);
} catch (error) {
restoreStructuralCatalog?.();
restoreGeneratedCatalog?.();
throw error;
} finally {
rmSync(stagingRoot, { recursive: true, force: true });
+105 -99
View File
@@ -2,7 +2,7 @@ import { createHash } from "node:crypto";
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
import { join } from "node:path";
export const MODEL_DATA_SCHEMA_VERSION = 1;
export const MODEL_DATA_SCHEMA_VERSION = 2;
export const MODEL_DATA_MANIFEST_FILE = ".manifest.json";
export type ModelDataStructure = Record<string, Record<string, string>>;
@@ -13,21 +13,13 @@ export interface ModelDataManifest {
files: Record<string, string>;
}
const JSON_STRING_PATTERN = '"(?:\\\\.|[^"\\\\])*"';
const MODEL_SHAPE_PATTERN = new RegExp(`^\\t(${JSON_STRING_PATTERN}): Model<(${JSON_STRING_PATTERN})> & \\{$`);
const MODEL_ID_PATTERN = new RegExp(`^\\t\\tid: (${JSON_STRING_PATTERN});$`);
const MODEL_PROVIDER_PATTERN = new RegExp(`^\\t\\tprovider: (${JSON_STRING_PATTERN});$`);
const MODEL_DATA_IMPORT_PATTERN =
/^import \{ [A-Z][A-Z0-9_]*_MODELS \} from "\.\/providers\/([^"/]+)\.models\.ts";$/gm;
function sha256(value: string): string {
return createHash("sha256").update(value).digest("hex");
}
function parseJsonString(value: string, description: string): string {
const parsed: unknown = JSON.parse(value);
if (typeof parsed !== "string") throw new Error(`${description} is not a string`);
return parsed;
}
function sortedRecord<T>(entries: Iterable<readonly [string, T]>): Record<string, T> {
return Object.fromEntries(Array.from(entries).sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)));
}
@@ -46,84 +38,6 @@ function describeSetDifference(expected: readonly string[], actual: readonly str
.join("; ");
}
function parseProviderStructure(path: string, providerId: string): Record<string, string> {
const source = readFileSync(path, "utf8");
const expectedImport = `import values from "./data/${providerId}.json" with { type: "json" };`;
if (!source.includes(expectedImport)) {
throw new Error(`${path} does not import ${providerId}.json`);
}
const models = new Map<string, string>();
const lines = source.split("\n");
for (let index = 0; index < lines.length; index++) {
const shapeMatch = MODEL_SHAPE_PATTERN.exec(lines[index]);
if (!shapeMatch) continue;
const idMatch = MODEL_ID_PATTERN.exec(lines[index + 1] ?? "");
const providerMatch = MODEL_PROVIDER_PATTERN.exec(lines[index + 2] ?? "");
if (!idMatch || !providerMatch || lines[index + 3] !== "\t};") {
throw new Error(`${path}:${index + 1} has a malformed generated model declaration`);
}
const key = parseJsonString(shapeMatch[1], `${path}:${index + 1} model key`);
const api = parseJsonString(shapeMatch[2], `${path}:${index + 1} model API`);
const id = parseJsonString(idMatch[1], `${path}:${index + 2} model ID`);
const provider = parseJsonString(providerMatch[1], `${path}:${index + 3} provider ID`);
if (id !== key) throw new Error(`${path}:${index + 1} declares key ${key} with ID ${id}`);
if (provider !== providerId) {
throw new Error(`${path}:${index + 1} declares provider ${provider} instead of ${providerId}`);
}
if (models.has(key)) throw new Error(`${path} declares model ${key} more than once`);
models.set(key, api);
index += 3;
}
if (models.size === 0) throw new Error(`${path} contains no generated model declarations`);
return sortedRecord(models);
}
export function readModelDataStructure(packageRoot: string): ModelDataStructure {
const providersDir = join(packageRoot, "src", "providers");
const shardProviderIds = readdirSync(providersDir)
.filter((entry) => entry.endsWith(".models.ts"))
.map((entry) => entry.slice(0, -".models.ts".length))
.sort();
if (shardProviderIds.length === 0) throw new Error(`No generated provider shards found under ${providersDir}`);
const aggregator = readFileSync(join(packageRoot, "src", "models.generated.ts"), "utf8");
const importedProviderIds = Array.from(
aggregator.matchAll(/^import \{ [A-Z0-9_]+_MODELS \} from "\.\/providers\/([^"/]+)\.models\.ts";$/gm),
(match) => match[1],
).sort();
if (!sameStrings(shardProviderIds, importedProviderIds)) {
throw new Error(
`Generated model aggregator and provider shards do not match (${describeSetDifference(shardProviderIds, importedProviderIds)})`,
);
}
return sortedRecord(
shardProviderIds.map((providerId) => [
providerId,
parseProviderStructure(join(providersDir, `${providerId}.models.ts`), providerId),
] as const),
);
}
export function modelDataStructureHash(structure: ModelDataStructure): string {
return sha256(JSON.stringify(structure));
}
export function createModelDataManifest(
structure: ModelDataStructure,
fileContents: Readonly<Record<string, string>>,
): ModelDataManifest {
return {
schemaVersion: MODEL_DATA_SCHEMA_VERSION,
structureHash: modelDataStructureHash(structure),
files: sortedRecord(Object.entries(fileContents).map(([file, content]) => [file, sha256(content)] as const)),
};
}
function isRecord(value: unknown): value is Record<string, unknown> {
return typeof value === "object" && value !== null && !Array.isArray(value);
}
@@ -143,6 +57,76 @@ function readJsonObject(path: string, description: string, errors: string[]): Re
return parsed;
}
function readProviderStructure(path: string, providerId: string): Record<string, string> {
const errors: string[] = [];
const groups = readJsonObject(path, `${providerId}.json`, errors);
if (!groups) throw new Error(errors.join("\n"));
const models = new Map<string, string>();
for (const [api, value] of Object.entries(groups)) {
if (!isRecord(value)) throw new Error(`${path} API group ${JSON.stringify(api)} must be an object`);
for (const modelId of Object.keys(value)) {
if (models.has(modelId)) throw new Error(`${path} contains model ${modelId} in more than one API group`);
models.set(modelId, api);
}
}
if (models.size === 0) throw new Error(`${path} contains no generated model data`);
return sortedRecord(models);
}
export function readModelDataProviderIds(packageRoot: string): string[] {
const aggregatorPath = join(packageRoot, "src", "models.generated.ts");
const aggregator = readFileSync(aggregatorPath, "utf8");
const providerIds = Array.from(aggregator.matchAll(MODEL_DATA_IMPORT_PATTERN), (match) => match[1]).sort();
if (providerIds.length === 0) throw new Error(`No generated provider imports found in ${aggregatorPath}`);
if (new Set(providerIds).size !== providerIds.length) {
throw new Error(`Generated model aggregator contains duplicate provider imports: ${aggregatorPath}`);
}
return providerIds;
}
export function readModelDataStructure(packageRoot: string): ModelDataStructure {
const providersDir = join(packageRoot, "src", "providers");
const dataDir = join(providersDir, "data");
const providerIds = readModelDataProviderIds(packageRoot);
const expectedShards = providerIds.map((providerId) => `${providerId}.models.ts`).sort();
const actualShards = readdirSync(providersDir)
.filter((entry) => entry.endsWith(".models.ts"))
.sort();
if (!sameStrings(expectedShards, actualShards)) {
throw new Error(
`Generated model aggregator and provider shards do not match (${describeSetDifference(expectedShards, actualShards)})`,
);
}
return sortedRecord(
providerIds.map((providerId) => [
providerId,
readProviderStructure(join(dataDir, `${providerId}.json`), providerId),
]),
);
}
export function modelDataStructureHash(structure: ModelDataStructure): string {
const normalized = sortedRecord(
Object.entries(structure).map(
([providerId, models]) => [providerId, sortedRecord(Object.entries(models))] as const,
),
);
return sha256(JSON.stringify(normalized));
}
export function createModelDataManifest(
structure: ModelDataStructure,
fileContents: Readonly<Record<string, string>>,
): ModelDataManifest {
return {
schemaVersion: MODEL_DATA_SCHEMA_VERSION,
structureHash: modelDataStructureHash(structure),
files: sortedRecord(Object.entries(fileContents).map(([file, content]) => [file, sha256(content)] as const)),
};
}
function validateModelValue(
value: unknown,
providerId: string,
@@ -209,7 +193,7 @@ export function validateModelDataDirectory(structure: ModelDataStructure, dataDi
.filter((entry) => entry.endsWith(".json") && entry !== MODEL_DATA_MANIFEST_FILE)
.sort();
if (!sameStrings(expectedFiles, actualFiles)) {
errors.push(`provider data files do not match the structural catalog (${describeSetDifference(expectedFiles, actualFiles)})`);
errors.push(`provider data files do not match the generated catalog (${describeSetDifference(expectedFiles, actualFiles)})`);
}
const manifestPath = join(dataDir, MODEL_DATA_MANIFEST_FILE);
@@ -221,7 +205,7 @@ export function validateModelDataDirectory(structure: ModelDataStructure, dataDi
}
const expectedStructureHash = modelDataStructureHash(structure);
if (manifest?.structureHash !== expectedStructureHash) {
errors.push("model data generation stamp does not match the structural catalog");
errors.push("model data generation stamp does not match the generated catalog");
}
const manifestFiles = isRecord(manifest?.files) ? manifest.files : undefined;
if (!manifestFiles) errors.push("model data manifest has no file hashes");
@@ -240,15 +224,37 @@ export function validateModelDataDirectory(structure: ModelDataStructure, dataDi
if (manifestFiles && manifestFiles[filename] !== sha256(content)) {
errors.push(`${filename} does not match its manifest hash`);
}
const values = readJsonObject(path, filename, errors);
if (!values) continue;
const expectedModelIds = Object.keys(expectedModels).sort();
const actualModelIds = Object.keys(values).sort();
if (!sameStrings(expectedModelIds, actualModelIds)) {
errors.push(`${filename} model IDs do not match the structural catalog (${describeSetDifference(expectedModelIds, actualModelIds)})`);
const groups = readJsonObject(path, filename, errors);
if (!groups) continue;
const actualModels = new Map<string, string>();
for (const [api, value] of Object.entries(groups)) {
if (!isRecord(value)) {
errors.push(`${filename} API group ${JSON.stringify(api)} must be an object`);
continue;
}
for (const [modelId, model] of Object.entries(value)) {
if (actualModels.has(modelId)) {
errors.push(`${providerId}/${modelId} appears in more than one API group`);
continue;
}
actualModels.set(modelId, api);
validateModelValue(model, providerId, modelId, api, errors);
}
}
for (const [modelId, api] of Object.entries(expectedModels)) {
if (modelId in values) validateModelValue(values[modelId], providerId, modelId, api, errors);
const expectedModelIds = Object.keys(expectedModels).sort();
const actualModelIds = Array.from(actualModels.keys()).sort();
if (!sameStrings(expectedModelIds, actualModelIds)) {
errors.push(`${filename} model IDs do not match the generated catalog (${describeSetDifference(expectedModelIds, actualModelIds)})`);
}
for (const [modelId, expectedApi] of Object.entries(expectedModels)) {
const actualApi = actualModels.get(modelId);
if (actualApi !== undefined && actualApi !== expectedApi) {
errors.push(
`${providerId}/${modelId} is grouped under API ${JSON.stringify(actualApi)}, expected ${JSON.stringify(expectedApi)}`,
);
}
}
}
+27
View File
@@ -0,0 +1,27 @@
import type { Api, Model, ProviderId } from "./types.ts";
export type ModelGroups = Record<string, Record<string, object>>;
type ModelId<TGroups extends ModelGroups> = {
[TApi in keyof TGroups]: keyof TGroups[TApi];
}[keyof TGroups] &
string;
type ModelApi<TGroups extends ModelGroups, TModelId extends ModelId<TGroups>> = {
[TApi in keyof TGroups]: TModelId extends keyof TGroups[TApi] ? TApi : never;
}[keyof TGroups] &
Api;
export type ModelCatalog<TGroups extends ModelGroups, TProvider extends ProviderId> = {
[TModelId in ModelId<TGroups>]: Model<ModelApi<TGroups, TModelId>> & {
id: TModelId;
provider: TProvider;
};
};
export function flattenModelCatalog<const TProvider extends ProviderId, const TGroups extends ModelGroups>(
_provider: TProvider,
groups: TGroups,
): ModelCatalog<TGroups, TProvider> {
return Object.assign({}, ...Object.values(groups)) as ModelCatalog<TGroups, TProvider>;
}
+40 -2
View File
@@ -39,7 +39,45 @@ import { XIAOMI_TOKEN_PLAN_SGP_MODELS } from "./providers/xiaomi-token-plan-sgp.
import { ZAI_MODELS } from "./providers/zai.models.ts";
import { ZAI_CODING_CN_MODELS } from "./providers/zai-coding-cn.models.ts";
export const MODELS = {
export const MODELS: {
readonly "amazon-bedrock": typeof AMAZON_BEDROCK_MODELS;
readonly "ant-ling": typeof ANT_LING_MODELS;
readonly "anthropic": typeof ANTHROPIC_MODELS;
readonly "azure-openai-responses": typeof AZURE_OPENAI_RESPONSES_MODELS;
readonly "cerebras": typeof CEREBRAS_MODELS;
readonly "cloudflare-ai-gateway": typeof CLOUDFLARE_AI_GATEWAY_MODELS;
readonly "cloudflare-workers-ai": typeof CLOUDFLARE_WORKERS_AI_MODELS;
readonly "deepseek": typeof DEEPSEEK_MODELS;
readonly "fireworks": typeof FIREWORKS_MODELS;
readonly "github-copilot": typeof GITHUB_COPILOT_MODELS;
readonly "google": typeof GOOGLE_MODELS;
readonly "google-vertex": typeof GOOGLE_VERTEX_MODELS;
readonly "groq": typeof GROQ_MODELS;
readonly "huggingface": typeof HUGGINGFACE_MODELS;
readonly "kimi-coding": typeof KIMI_CODING_MODELS;
readonly "minimax": typeof MINIMAX_MODELS;
readonly "minimax-cn": typeof MINIMAX_CN_MODELS;
readonly "mistral": typeof MISTRAL_MODELS;
readonly "moonshotai": typeof MOONSHOTAI_MODELS;
readonly "moonshotai-cn": typeof MOONSHOTAI_CN_MODELS;
readonly "nvidia": typeof NVIDIA_MODELS;
readonly "openai": typeof OPENAI_MODELS;
readonly "openai-codex": typeof OPENAI_CODEX_MODELS;
readonly "opencode": typeof OPENCODE_MODELS;
readonly "opencode-go": typeof OPENCODE_GO_MODELS;
readonly "openrouter": typeof OPENROUTER_MODELS;
readonly "qwen-token-plan": typeof QWEN_TOKEN_PLAN_MODELS;
readonly "qwen-token-plan-cn": typeof QWEN_TOKEN_PLAN_CN_MODELS;
readonly "together": typeof TOGETHER_MODELS;
readonly "vercel-ai-gateway": typeof VERCEL_AI_GATEWAY_MODELS;
readonly "xai": typeof XAI_MODELS;
readonly "xiaomi": typeof XIAOMI_MODELS;
readonly "xiaomi-token-plan-ams": typeof XIAOMI_TOKEN_PLAN_AMS_MODELS;
readonly "xiaomi-token-plan-cn": typeof XIAOMI_TOKEN_PLAN_CN_MODELS;
readonly "xiaomi-token-plan-sgp": typeof XIAOMI_TOKEN_PLAN_SGP_MODELS;
readonly "zai": typeof ZAI_MODELS;
readonly "zai-coding-cn": typeof ZAI_CODING_CN_MODELS;
} = {
"amazon-bedrock": AMAZON_BEDROCK_MODELS,
"ant-ling": ANT_LING_MODELS,
"anthropic": ANTHROPIC_MODELS,
@@ -77,4 +115,4 @@ export const MODELS = {
"xiaomi-token-plan-sgp": XIAOMI_TOKEN_PLAN_SGP_MODELS,
"zai": ZAI_MODELS,
"zai-coding-cn": ZAI_CODING_CN_MODELS,
} as const;
};
@@ -2,443 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/amazon-bedrock.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const AMAZON_BEDROCK_MODELS = values as {
"amazon.nova-2-lite-v1:0": Model<"bedrock-converse-stream"> & {
id: "amazon.nova-2-lite-v1:0";
provider: "amazon-bedrock";
};
"amazon.nova-lite-v1:0": Model<"bedrock-converse-stream"> & {
id: "amazon.nova-lite-v1:0";
provider: "amazon-bedrock";
};
"amazon.nova-micro-v1:0": Model<"bedrock-converse-stream"> & {
id: "amazon.nova-micro-v1:0";
provider: "amazon-bedrock";
};
"amazon.nova-pro-v1:0": Model<"bedrock-converse-stream"> & {
id: "amazon.nova-pro-v1:0";
provider: "amazon-bedrock";
};
"anthropic.claude-fable-5": Model<"bedrock-converse-stream"> & {
id: "anthropic.claude-fable-5";
provider: "amazon-bedrock";
};
"anthropic.claude-haiku-4-5-20251001-v1:0": Model<"bedrock-converse-stream"> & {
id: "anthropic.claude-haiku-4-5-20251001-v1:0";
provider: "amazon-bedrock";
};
"anthropic.claude-opus-4-1-20250805-v1:0": Model<"bedrock-converse-stream"> & {
id: "anthropic.claude-opus-4-1-20250805-v1:0";
provider: "amazon-bedrock";
};
"anthropic.claude-opus-4-5-20251101-v1:0": Model<"bedrock-converse-stream"> & {
id: "anthropic.claude-opus-4-5-20251101-v1:0";
provider: "amazon-bedrock";
};
"anthropic.claude-opus-4-6-v1": Model<"bedrock-converse-stream"> & {
id: "anthropic.claude-opus-4-6-v1";
provider: "amazon-bedrock";
};
"anthropic.claude-opus-4-7": Model<"bedrock-converse-stream"> & {
id: "anthropic.claude-opus-4-7";
provider: "amazon-bedrock";
};
"anthropic.claude-opus-4-8": Model<"bedrock-converse-stream"> & {
id: "anthropic.claude-opus-4-8";
provider: "amazon-bedrock";
};
"anthropic.claude-sonnet-4-5-20250929-v1:0": Model<"bedrock-converse-stream"> & {
id: "anthropic.claude-sonnet-4-5-20250929-v1:0";
provider: "amazon-bedrock";
};
"anthropic.claude-sonnet-4-6": Model<"bedrock-converse-stream"> & {
id: "anthropic.claude-sonnet-4-6";
provider: "amazon-bedrock";
};
"anthropic.claude-sonnet-5": Model<"bedrock-converse-stream"> & {
id: "anthropic.claude-sonnet-5";
provider: "amazon-bedrock";
};
"au.anthropic.claude-haiku-4-5-20251001-v1:0": Model<"bedrock-converse-stream"> & {
id: "au.anthropic.claude-haiku-4-5-20251001-v1:0";
provider: "amazon-bedrock";
};
"au.anthropic.claude-opus-4-6-v1": Model<"bedrock-converse-stream"> & {
id: "au.anthropic.claude-opus-4-6-v1";
provider: "amazon-bedrock";
};
"au.anthropic.claude-opus-4-8": Model<"bedrock-converse-stream"> & {
id: "au.anthropic.claude-opus-4-8";
provider: "amazon-bedrock";
};
"au.anthropic.claude-sonnet-4-5-20250929-v1:0": Model<"bedrock-converse-stream"> & {
id: "au.anthropic.claude-sonnet-4-5-20250929-v1:0";
provider: "amazon-bedrock";
};
"au.anthropic.claude-sonnet-4-6": Model<"bedrock-converse-stream"> & {
id: "au.anthropic.claude-sonnet-4-6";
provider: "amazon-bedrock";
};
"au.anthropic.claude-sonnet-5": Model<"bedrock-converse-stream"> & {
id: "au.anthropic.claude-sonnet-5";
provider: "amazon-bedrock";
};
"deepseek.r1-v1:0": Model<"bedrock-converse-stream"> & {
id: "deepseek.r1-v1:0";
provider: "amazon-bedrock";
};
"deepseek.v3-v1:0": Model<"bedrock-converse-stream"> & {
id: "deepseek.v3-v1:0";
provider: "amazon-bedrock";
};
"deepseek.v3.2": Model<"bedrock-converse-stream"> & {
id: "deepseek.v3.2";
provider: "amazon-bedrock";
};
"eu.anthropic.claude-fable-5": Model<"bedrock-converse-stream"> & {
id: "eu.anthropic.claude-fable-5";
provider: "amazon-bedrock";
};
"eu.anthropic.claude-haiku-4-5-20251001-v1:0": Model<"bedrock-converse-stream"> & {
id: "eu.anthropic.claude-haiku-4-5-20251001-v1:0";
provider: "amazon-bedrock";
};
"eu.anthropic.claude-opus-4-5-20251101-v1:0": Model<"bedrock-converse-stream"> & {
id: "eu.anthropic.claude-opus-4-5-20251101-v1:0";
provider: "amazon-bedrock";
};
"eu.anthropic.claude-opus-4-6-v1": Model<"bedrock-converse-stream"> & {
id: "eu.anthropic.claude-opus-4-6-v1";
provider: "amazon-bedrock";
};
"eu.anthropic.claude-opus-4-7": Model<"bedrock-converse-stream"> & {
id: "eu.anthropic.claude-opus-4-7";
provider: "amazon-bedrock";
};
"eu.anthropic.claude-opus-4-8": Model<"bedrock-converse-stream"> & {
id: "eu.anthropic.claude-opus-4-8";
provider: "amazon-bedrock";
};
"eu.anthropic.claude-sonnet-4-5-20250929-v1:0": Model<"bedrock-converse-stream"> & {
id: "eu.anthropic.claude-sonnet-4-5-20250929-v1:0";
provider: "amazon-bedrock";
};
"eu.anthropic.claude-sonnet-4-6": Model<"bedrock-converse-stream"> & {
id: "eu.anthropic.claude-sonnet-4-6";
provider: "amazon-bedrock";
};
"eu.anthropic.claude-sonnet-5": Model<"bedrock-converse-stream"> & {
id: "eu.anthropic.claude-sonnet-5";
provider: "amazon-bedrock";
};
"global.anthropic.claude-fable-5": Model<"bedrock-converse-stream"> & {
id: "global.anthropic.claude-fable-5";
provider: "amazon-bedrock";
};
"global.anthropic.claude-haiku-4-5-20251001-v1:0": Model<"bedrock-converse-stream"> & {
id: "global.anthropic.claude-haiku-4-5-20251001-v1:0";
provider: "amazon-bedrock";
};
"global.anthropic.claude-opus-4-5-20251101-v1:0": Model<"bedrock-converse-stream"> & {
id: "global.anthropic.claude-opus-4-5-20251101-v1:0";
provider: "amazon-bedrock";
};
"global.anthropic.claude-opus-4-6-v1": Model<"bedrock-converse-stream"> & {
id: "global.anthropic.claude-opus-4-6-v1";
provider: "amazon-bedrock";
};
"global.anthropic.claude-opus-4-7": Model<"bedrock-converse-stream"> & {
id: "global.anthropic.claude-opus-4-7";
provider: "amazon-bedrock";
};
"global.anthropic.claude-opus-4-8": Model<"bedrock-converse-stream"> & {
id: "global.anthropic.claude-opus-4-8";
provider: "amazon-bedrock";
};
"global.anthropic.claude-sonnet-4-5-20250929-v1:0": Model<"bedrock-converse-stream"> & {
id: "global.anthropic.claude-sonnet-4-5-20250929-v1:0";
provider: "amazon-bedrock";
};
"global.anthropic.claude-sonnet-4-6": Model<"bedrock-converse-stream"> & {
id: "global.anthropic.claude-sonnet-4-6";
provider: "amazon-bedrock";
};
"global.anthropic.claude-sonnet-5": Model<"bedrock-converse-stream"> & {
id: "global.anthropic.claude-sonnet-5";
provider: "amazon-bedrock";
};
"google.gemma-3-27b-it": Model<"bedrock-converse-stream"> & {
id: "google.gemma-3-27b-it";
provider: "amazon-bedrock";
};
"google.gemma-3-4b-it": Model<"bedrock-converse-stream"> & {
id: "google.gemma-3-4b-it";
provider: "amazon-bedrock";
};
"jp.anthropic.claude-haiku-4-5-20251001-v1:0": Model<"bedrock-converse-stream"> & {
id: "jp.anthropic.claude-haiku-4-5-20251001-v1:0";
provider: "amazon-bedrock";
};
"jp.anthropic.claude-opus-4-7": Model<"bedrock-converse-stream"> & {
id: "jp.anthropic.claude-opus-4-7";
provider: "amazon-bedrock";
};
"jp.anthropic.claude-opus-4-8": Model<"bedrock-converse-stream"> & {
id: "jp.anthropic.claude-opus-4-8";
provider: "amazon-bedrock";
};
"jp.anthropic.claude-sonnet-4-5-20250929-v1:0": Model<"bedrock-converse-stream"> & {
id: "jp.anthropic.claude-sonnet-4-5-20250929-v1:0";
provider: "amazon-bedrock";
};
"jp.anthropic.claude-sonnet-4-6": Model<"bedrock-converse-stream"> & {
id: "jp.anthropic.claude-sonnet-4-6";
provider: "amazon-bedrock";
};
"jp.anthropic.claude-sonnet-5": Model<"bedrock-converse-stream"> & {
id: "jp.anthropic.claude-sonnet-5";
provider: "amazon-bedrock";
};
"meta.llama3-1-70b-instruct-v1:0": Model<"bedrock-converse-stream"> & {
id: "meta.llama3-1-70b-instruct-v1:0";
provider: "amazon-bedrock";
};
"meta.llama3-1-8b-instruct-v1:0": Model<"bedrock-converse-stream"> & {
id: "meta.llama3-1-8b-instruct-v1:0";
provider: "amazon-bedrock";
};
"meta.llama3-3-70b-instruct-v1:0": Model<"bedrock-converse-stream"> & {
id: "meta.llama3-3-70b-instruct-v1:0";
provider: "amazon-bedrock";
};
"meta.llama4-maverick-17b-instruct-v1:0": Model<"bedrock-converse-stream"> & {
id: "meta.llama4-maverick-17b-instruct-v1:0";
provider: "amazon-bedrock";
};
"meta.llama4-scout-17b-instruct-v1:0": Model<"bedrock-converse-stream"> & {
id: "meta.llama4-scout-17b-instruct-v1:0";
provider: "amazon-bedrock";
};
"minimax.minimax-m2": Model<"bedrock-converse-stream"> & {
id: "minimax.minimax-m2";
provider: "amazon-bedrock";
};
"minimax.minimax-m2.1": Model<"bedrock-converse-stream"> & {
id: "minimax.minimax-m2.1";
provider: "amazon-bedrock";
};
"minimax.minimax-m2.5": Model<"bedrock-converse-stream"> & {
id: "minimax.minimax-m2.5";
provider: "amazon-bedrock";
};
"mistral.devstral-2-123b": Model<"bedrock-converse-stream"> & {
id: "mistral.devstral-2-123b";
provider: "amazon-bedrock";
};
"mistral.magistral-small-2509": Model<"bedrock-converse-stream"> & {
id: "mistral.magistral-small-2509";
provider: "amazon-bedrock";
};
"mistral.ministral-3-14b-instruct": Model<"bedrock-converse-stream"> & {
id: "mistral.ministral-3-14b-instruct";
provider: "amazon-bedrock";
};
"mistral.ministral-3-3b-instruct": Model<"bedrock-converse-stream"> & {
id: "mistral.ministral-3-3b-instruct";
provider: "amazon-bedrock";
};
"mistral.ministral-3-8b-instruct": Model<"bedrock-converse-stream"> & {
id: "mistral.ministral-3-8b-instruct";
provider: "amazon-bedrock";
};
"mistral.mistral-large-3-675b-instruct": Model<"bedrock-converse-stream"> & {
id: "mistral.mistral-large-3-675b-instruct";
provider: "amazon-bedrock";
};
"mistral.pixtral-large-2502-v1:0": Model<"bedrock-converse-stream"> & {
id: "mistral.pixtral-large-2502-v1:0";
provider: "amazon-bedrock";
};
"mistral.voxtral-mini-3b-2507": Model<"bedrock-converse-stream"> & {
id: "mistral.voxtral-mini-3b-2507";
provider: "amazon-bedrock";
};
"mistral.voxtral-small-24b-2507": Model<"bedrock-converse-stream"> & {
id: "mistral.voxtral-small-24b-2507";
provider: "amazon-bedrock";
};
"moonshot.kimi-k2-thinking": Model<"bedrock-converse-stream"> & {
id: "moonshot.kimi-k2-thinking";
provider: "amazon-bedrock";
};
"moonshotai.kimi-k2.5": Model<"bedrock-converse-stream"> & {
id: "moonshotai.kimi-k2.5";
provider: "amazon-bedrock";
};
"nvidia.nemotron-nano-12b-v2": Model<"bedrock-converse-stream"> & {
id: "nvidia.nemotron-nano-12b-v2";
provider: "amazon-bedrock";
};
"nvidia.nemotron-nano-3-30b": Model<"bedrock-converse-stream"> & {
id: "nvidia.nemotron-nano-3-30b";
provider: "amazon-bedrock";
};
"nvidia.nemotron-nano-9b-v2": Model<"bedrock-converse-stream"> & {
id: "nvidia.nemotron-nano-9b-v2";
provider: "amazon-bedrock";
};
"nvidia.nemotron-super-3-120b": Model<"bedrock-converse-stream"> & {
id: "nvidia.nemotron-super-3-120b";
provider: "amazon-bedrock";
};
"openai.gpt-5.4": Model<"bedrock-converse-stream"> & {
id: "openai.gpt-5.4";
provider: "amazon-bedrock";
};
"openai.gpt-5.5": Model<"bedrock-converse-stream"> & {
id: "openai.gpt-5.5";
provider: "amazon-bedrock";
};
"openai.gpt-5.6-luna": Model<"bedrock-converse-stream"> & {
id: "openai.gpt-5.6-luna";
provider: "amazon-bedrock";
};
"openai.gpt-5.6-sol": Model<"bedrock-converse-stream"> & {
id: "openai.gpt-5.6-sol";
provider: "amazon-bedrock";
};
"openai.gpt-5.6-terra": Model<"bedrock-converse-stream"> & {
id: "openai.gpt-5.6-terra";
provider: "amazon-bedrock";
};
"openai.gpt-oss-120b": Model<"bedrock-converse-stream"> & {
id: "openai.gpt-oss-120b";
provider: "amazon-bedrock";
};
"openai.gpt-oss-120b-1:0": Model<"bedrock-converse-stream"> & {
id: "openai.gpt-oss-120b-1:0";
provider: "amazon-bedrock";
};
"openai.gpt-oss-20b": Model<"bedrock-converse-stream"> & {
id: "openai.gpt-oss-20b";
provider: "amazon-bedrock";
};
"openai.gpt-oss-20b-1:0": Model<"bedrock-converse-stream"> & {
id: "openai.gpt-oss-20b-1:0";
provider: "amazon-bedrock";
};
"openai.gpt-oss-safeguard-120b": Model<"bedrock-converse-stream"> & {
id: "openai.gpt-oss-safeguard-120b";
provider: "amazon-bedrock";
};
"openai.gpt-oss-safeguard-20b": Model<"bedrock-converse-stream"> & {
id: "openai.gpt-oss-safeguard-20b";
provider: "amazon-bedrock";
};
"qwen.qwen3-235b-a22b-2507-v1:0": Model<"bedrock-converse-stream"> & {
id: "qwen.qwen3-235b-a22b-2507-v1:0";
provider: "amazon-bedrock";
};
"qwen.qwen3-32b-v1:0": Model<"bedrock-converse-stream"> & {
id: "qwen.qwen3-32b-v1:0";
provider: "amazon-bedrock";
};
"qwen.qwen3-coder-30b-a3b-v1:0": Model<"bedrock-converse-stream"> & {
id: "qwen.qwen3-coder-30b-a3b-v1:0";
provider: "amazon-bedrock";
};
"qwen.qwen3-coder-480b-a35b-v1:0": Model<"bedrock-converse-stream"> & {
id: "qwen.qwen3-coder-480b-a35b-v1:0";
provider: "amazon-bedrock";
};
"qwen.qwen3-coder-next": Model<"bedrock-converse-stream"> & {
id: "qwen.qwen3-coder-next";
provider: "amazon-bedrock";
};
"qwen.qwen3-next-80b-a3b": Model<"bedrock-converse-stream"> & {
id: "qwen.qwen3-next-80b-a3b";
provider: "amazon-bedrock";
};
"qwen.qwen3-vl-235b-a22b": Model<"bedrock-converse-stream"> & {
id: "qwen.qwen3-vl-235b-a22b";
provider: "amazon-bedrock";
};
"us.anthropic.claude-fable-5": Model<"bedrock-converse-stream"> & {
id: "us.anthropic.claude-fable-5";
provider: "amazon-bedrock";
};
"us.anthropic.claude-haiku-4-5-20251001-v1:0": Model<"bedrock-converse-stream"> & {
id: "us.anthropic.claude-haiku-4-5-20251001-v1:0";
provider: "amazon-bedrock";
};
"us.anthropic.claude-opus-4-1-20250805-v1:0": Model<"bedrock-converse-stream"> & {
id: "us.anthropic.claude-opus-4-1-20250805-v1:0";
provider: "amazon-bedrock";
};
"us.anthropic.claude-opus-4-5-20251101-v1:0": Model<"bedrock-converse-stream"> & {
id: "us.anthropic.claude-opus-4-5-20251101-v1:0";
provider: "amazon-bedrock";
};
"us.anthropic.claude-opus-4-6-v1": Model<"bedrock-converse-stream"> & {
id: "us.anthropic.claude-opus-4-6-v1";
provider: "amazon-bedrock";
};
"us.anthropic.claude-opus-4-7": Model<"bedrock-converse-stream"> & {
id: "us.anthropic.claude-opus-4-7";
provider: "amazon-bedrock";
};
"us.anthropic.claude-opus-4-8": Model<"bedrock-converse-stream"> & {
id: "us.anthropic.claude-opus-4-8";
provider: "amazon-bedrock";
};
"us.anthropic.claude-sonnet-4-5-20250929-v1:0": Model<"bedrock-converse-stream"> & {
id: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
provider: "amazon-bedrock";
};
"us.anthropic.claude-sonnet-4-6": Model<"bedrock-converse-stream"> & {
id: "us.anthropic.claude-sonnet-4-6";
provider: "amazon-bedrock";
};
"us.anthropic.claude-sonnet-5": Model<"bedrock-converse-stream"> & {
id: "us.anthropic.claude-sonnet-5";
provider: "amazon-bedrock";
};
"us.deepseek.r1-v1:0": Model<"bedrock-converse-stream"> & {
id: "us.deepseek.r1-v1:0";
provider: "amazon-bedrock";
};
"us.meta.llama4-maverick-17b-instruct-v1:0": Model<"bedrock-converse-stream"> & {
id: "us.meta.llama4-maverick-17b-instruct-v1:0";
provider: "amazon-bedrock";
};
"us.meta.llama4-scout-17b-instruct-v1:0": Model<"bedrock-converse-stream"> & {
id: "us.meta.llama4-scout-17b-instruct-v1:0";
provider: "amazon-bedrock";
};
"writer.palmyra-x4-v1:0": Model<"bedrock-converse-stream"> & {
id: "writer.palmyra-x4-v1:0";
provider: "amazon-bedrock";
};
"writer.palmyra-x5-v1:0": Model<"bedrock-converse-stream"> & {
id: "writer.palmyra-x5-v1:0";
provider: "amazon-bedrock";
};
"xai.grok-4.3": Model<"bedrock-converse-stream"> & {
id: "xai.grok-4.3";
provider: "amazon-bedrock";
};
"zai.glm-4.7": Model<"bedrock-converse-stream"> & {
id: "zai.glm-4.7";
provider: "amazon-bedrock";
};
"zai.glm-4.7-flash": Model<"bedrock-converse-stream"> & {
id: "zai.glm-4.7-flash";
provider: "amazon-bedrock";
};
"zai.glm-5": Model<"bedrock-converse-stream"> & {
id: "zai.glm-5";
provider: "amazon-bedrock";
};
};
export const AMAZON_BEDROCK_MODELS: ModelCatalog<typeof values, "amazon-bedrock"> =
flattenModelCatalog("amazon-bedrock", values);
+3 -15
View File
@@ -2,19 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/ant-ling.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const ANT_LING_MODELS = values as {
"Ling-2.6-1T": Model<"openai-completions"> & {
id: "Ling-2.6-1T";
provider: "ant-ling";
};
"Ling-2.6-flash": Model<"openai-completions"> & {
id: "Ling-2.6-flash";
provider: "ant-ling";
};
"Ring-2.6-1T": Model<"openai-completions"> & {
id: "Ring-2.6-1T";
provider: "ant-ling";
};
};
export const ANT_LING_MODELS: ModelCatalog<typeof values, "ant-ling"> =
flattenModelCatalog("ant-ling", values);
+3 -59
View File
@@ -2,63 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/anthropic.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const ANTHROPIC_MODELS = values as {
"claude-fable-5": Model<"anthropic-messages"> & {
id: "claude-fable-5";
provider: "anthropic";
};
"claude-haiku-4-5": Model<"anthropic-messages"> & {
id: "claude-haiku-4-5";
provider: "anthropic";
};
"claude-haiku-4-5-20251001": Model<"anthropic-messages"> & {
id: "claude-haiku-4-5-20251001";
provider: "anthropic";
};
"claude-opus-4-1": Model<"anthropic-messages"> & {
id: "claude-opus-4-1";
provider: "anthropic";
};
"claude-opus-4-1-20250805": Model<"anthropic-messages"> & {
id: "claude-opus-4-1-20250805";
provider: "anthropic";
};
"claude-opus-4-5": Model<"anthropic-messages"> & {
id: "claude-opus-4-5";
provider: "anthropic";
};
"claude-opus-4-5-20251101": Model<"anthropic-messages"> & {
id: "claude-opus-4-5-20251101";
provider: "anthropic";
};
"claude-opus-4-6": Model<"anthropic-messages"> & {
id: "claude-opus-4-6";
provider: "anthropic";
};
"claude-opus-4-7": Model<"anthropic-messages"> & {
id: "claude-opus-4-7";
provider: "anthropic";
};
"claude-opus-4-8": Model<"anthropic-messages"> & {
id: "claude-opus-4-8";
provider: "anthropic";
};
"claude-sonnet-4-5": Model<"anthropic-messages"> & {
id: "claude-sonnet-4-5";
provider: "anthropic";
};
"claude-sonnet-4-5-20250929": Model<"anthropic-messages"> & {
id: "claude-sonnet-4-5-20250929";
provider: "anthropic";
};
"claude-sonnet-4-6": Model<"anthropic-messages"> & {
id: "claude-sonnet-4-6";
provider: "anthropic";
};
"claude-sonnet-5": Model<"anthropic-messages"> & {
id: "claude-sonnet-5";
provider: "anthropic";
};
};
export const ANTHROPIC_MODELS: ModelCatalog<typeof values, "anthropic"> =
flattenModelCatalog("anthropic", values);
@@ -2,191 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/azure-openai-responses.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const AZURE_OPENAI_RESPONSES_MODELS = values as {
"gpt-4": Model<"azure-openai-responses"> & {
id: "gpt-4";
provider: "azure-openai-responses";
};
"gpt-4-turbo": Model<"azure-openai-responses"> & {
id: "gpt-4-turbo";
provider: "azure-openai-responses";
};
"gpt-4.1": Model<"azure-openai-responses"> & {
id: "gpt-4.1";
provider: "azure-openai-responses";
};
"gpt-4.1-mini": Model<"azure-openai-responses"> & {
id: "gpt-4.1-mini";
provider: "azure-openai-responses";
};
"gpt-4.1-nano": Model<"azure-openai-responses"> & {
id: "gpt-4.1-nano";
provider: "azure-openai-responses";
};
"gpt-4o": Model<"azure-openai-responses"> & {
id: "gpt-4o";
provider: "azure-openai-responses";
};
"gpt-4o-2024-05-13": Model<"azure-openai-responses"> & {
id: "gpt-4o-2024-05-13";
provider: "azure-openai-responses";
};
"gpt-4o-2024-08-06": Model<"azure-openai-responses"> & {
id: "gpt-4o-2024-08-06";
provider: "azure-openai-responses";
};
"gpt-4o-2024-11-20": Model<"azure-openai-responses"> & {
id: "gpt-4o-2024-11-20";
provider: "azure-openai-responses";
};
"gpt-4o-mini": Model<"azure-openai-responses"> & {
id: "gpt-4o-mini";
provider: "azure-openai-responses";
};
"gpt-5": Model<"azure-openai-responses"> & {
id: "gpt-5";
provider: "azure-openai-responses";
};
"gpt-5-chat-latest": Model<"azure-openai-responses"> & {
id: "gpt-5-chat-latest";
provider: "azure-openai-responses";
};
"gpt-5-codex": Model<"azure-openai-responses"> & {
id: "gpt-5-codex";
provider: "azure-openai-responses";
};
"gpt-5-mini": Model<"azure-openai-responses"> & {
id: "gpt-5-mini";
provider: "azure-openai-responses";
};
"gpt-5-nano": Model<"azure-openai-responses"> & {
id: "gpt-5-nano";
provider: "azure-openai-responses";
};
"gpt-5-pro": Model<"azure-openai-responses"> & {
id: "gpt-5-pro";
provider: "azure-openai-responses";
};
"gpt-5.1": Model<"azure-openai-responses"> & {
id: "gpt-5.1";
provider: "azure-openai-responses";
};
"gpt-5.1-chat-latest": Model<"azure-openai-responses"> & {
id: "gpt-5.1-chat-latest";
provider: "azure-openai-responses";
};
"gpt-5.1-codex": Model<"azure-openai-responses"> & {
id: "gpt-5.1-codex";
provider: "azure-openai-responses";
};
"gpt-5.1-codex-max": Model<"azure-openai-responses"> & {
id: "gpt-5.1-codex-max";
provider: "azure-openai-responses";
};
"gpt-5.1-codex-mini": Model<"azure-openai-responses"> & {
id: "gpt-5.1-codex-mini";
provider: "azure-openai-responses";
};
"gpt-5.2": Model<"azure-openai-responses"> & {
id: "gpt-5.2";
provider: "azure-openai-responses";
};
"gpt-5.2-chat-latest": Model<"azure-openai-responses"> & {
id: "gpt-5.2-chat-latest";
provider: "azure-openai-responses";
};
"gpt-5.2-codex": Model<"azure-openai-responses"> & {
id: "gpt-5.2-codex";
provider: "azure-openai-responses";
};
"gpt-5.2-pro": Model<"azure-openai-responses"> & {
id: "gpt-5.2-pro";
provider: "azure-openai-responses";
};
"gpt-5.3-chat-latest": Model<"azure-openai-responses"> & {
id: "gpt-5.3-chat-latest";
provider: "azure-openai-responses";
};
"gpt-5.3-codex": Model<"azure-openai-responses"> & {
id: "gpt-5.3-codex";
provider: "azure-openai-responses";
};
"gpt-5.3-codex-spark": Model<"azure-openai-responses"> & {
id: "gpt-5.3-codex-spark";
provider: "azure-openai-responses";
};
"gpt-5.4": Model<"azure-openai-responses"> & {
id: "gpt-5.4";
provider: "azure-openai-responses";
};
"gpt-5.4-mini": Model<"azure-openai-responses"> & {
id: "gpt-5.4-mini";
provider: "azure-openai-responses";
};
"gpt-5.4-nano": Model<"azure-openai-responses"> & {
id: "gpt-5.4-nano";
provider: "azure-openai-responses";
};
"gpt-5.4-pro": Model<"azure-openai-responses"> & {
id: "gpt-5.4-pro";
provider: "azure-openai-responses";
};
"gpt-5.5": Model<"azure-openai-responses"> & {
id: "gpt-5.5";
provider: "azure-openai-responses";
};
"gpt-5.5-pro": Model<"azure-openai-responses"> & {
id: "gpt-5.5-pro";
provider: "azure-openai-responses";
};
"gpt-5.6-luna": Model<"azure-openai-responses"> & {
id: "gpt-5.6-luna";
provider: "azure-openai-responses";
};
"gpt-5.6-sol": Model<"azure-openai-responses"> & {
id: "gpt-5.6-sol";
provider: "azure-openai-responses";
};
"gpt-5.6-terra": Model<"azure-openai-responses"> & {
id: "gpt-5.6-terra";
provider: "azure-openai-responses";
};
"gpt-realtime-2.1": Model<"azure-openai-responses"> & {
id: "gpt-realtime-2.1";
provider: "azure-openai-responses";
};
"o1": Model<"azure-openai-responses"> & {
id: "o1";
provider: "azure-openai-responses";
};
"o1-pro": Model<"azure-openai-responses"> & {
id: "o1-pro";
provider: "azure-openai-responses";
};
"o3": Model<"azure-openai-responses"> & {
id: "o3";
provider: "azure-openai-responses";
};
"o3-deep-research": Model<"azure-openai-responses"> & {
id: "o3-deep-research";
provider: "azure-openai-responses";
};
"o3-mini": Model<"azure-openai-responses"> & {
id: "o3-mini";
provider: "azure-openai-responses";
};
"o3-pro": Model<"azure-openai-responses"> & {
id: "o3-pro";
provider: "azure-openai-responses";
};
"o4-mini": Model<"azure-openai-responses"> & {
id: "o4-mini";
provider: "azure-openai-responses";
};
"o4-mini-deep-research": Model<"azure-openai-responses"> & {
id: "o4-mini-deep-research";
provider: "azure-openai-responses";
};
};
export const AZURE_OPENAI_RESPONSES_MODELS: ModelCatalog<typeof values, "azure-openai-responses"> =
flattenModelCatalog("azure-openai-responses", values);
+3 -15
View File
@@ -2,19 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/cerebras.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const CEREBRAS_MODELS = values as {
"gemma-4-31b": Model<"openai-completions"> & {
id: "gemma-4-31b";
provider: "cerebras";
};
"gpt-oss-120b": Model<"openai-completions"> & {
id: "gpt-oss-120b";
provider: "cerebras";
};
"zai-glm-4.7": Model<"openai-completions"> & {
id: "zai-glm-4.7";
provider: "cerebras";
};
};
export const CEREBRAS_MODELS: ModelCatalog<typeof values, "cerebras"> =
flattenModelCatalog("cerebras", values);
@@ -2,175 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/cloudflare-ai-gateway.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const CLOUDFLARE_AI_GATEWAY_MODELS = values as {
"claude-3-5-haiku": Model<"anthropic-messages"> & {
id: "claude-3-5-haiku";
provider: "cloudflare-ai-gateway";
};
"claude-3-haiku": Model<"anthropic-messages"> & {
id: "claude-3-haiku";
provider: "cloudflare-ai-gateway";
};
"claude-3-opus": Model<"anthropic-messages"> & {
id: "claude-3-opus";
provider: "cloudflare-ai-gateway";
};
"claude-3-sonnet": Model<"anthropic-messages"> & {
id: "claude-3-sonnet";
provider: "cloudflare-ai-gateway";
};
"claude-3.5-haiku": Model<"anthropic-messages"> & {
id: "claude-3.5-haiku";
provider: "cloudflare-ai-gateway";
};
"claude-3.5-sonnet": Model<"anthropic-messages"> & {
id: "claude-3.5-sonnet";
provider: "cloudflare-ai-gateway";
};
"claude-fable-5": Model<"anthropic-messages"> & {
id: "claude-fable-5";
provider: "cloudflare-ai-gateway";
};
"claude-haiku-4-5": Model<"anthropic-messages"> & {
id: "claude-haiku-4-5";
provider: "cloudflare-ai-gateway";
};
"claude-opus-4": Model<"anthropic-messages"> & {
id: "claude-opus-4";
provider: "cloudflare-ai-gateway";
};
"claude-opus-4-1": Model<"anthropic-messages"> & {
id: "claude-opus-4-1";
provider: "cloudflare-ai-gateway";
};
"claude-opus-4-5": Model<"anthropic-messages"> & {
id: "claude-opus-4-5";
provider: "cloudflare-ai-gateway";
};
"claude-opus-4-6": Model<"anthropic-messages"> & {
id: "claude-opus-4-6";
provider: "cloudflare-ai-gateway";
};
"claude-opus-4-7": Model<"anthropic-messages"> & {
id: "claude-opus-4-7";
provider: "cloudflare-ai-gateway";
};
"claude-opus-4-8": Model<"anthropic-messages"> & {
id: "claude-opus-4-8";
provider: "cloudflare-ai-gateway";
};
"claude-sonnet-4": Model<"anthropic-messages"> & {
id: "claude-sonnet-4";
provider: "cloudflare-ai-gateway";
};
"claude-sonnet-4-5": Model<"anthropic-messages"> & {
id: "claude-sonnet-4-5";
provider: "cloudflare-ai-gateway";
};
"claude-sonnet-4-6": Model<"anthropic-messages"> & {
id: "claude-sonnet-4-6";
provider: "cloudflare-ai-gateway";
};
"claude-sonnet-5": Model<"anthropic-messages"> & {
id: "claude-sonnet-5";
provider: "cloudflare-ai-gateway";
};
"gpt-4": Model<"openai-responses"> & {
id: "gpt-4";
provider: "cloudflare-ai-gateway";
};
"gpt-4-turbo": Model<"openai-responses"> & {
id: "gpt-4-turbo";
provider: "cloudflare-ai-gateway";
};
"gpt-4o": Model<"openai-responses"> & {
id: "gpt-4o";
provider: "cloudflare-ai-gateway";
};
"gpt-4o-mini": Model<"openai-responses"> & {
id: "gpt-4o-mini";
provider: "cloudflare-ai-gateway";
};
"gpt-5.1": Model<"openai-responses"> & {
id: "gpt-5.1";
provider: "cloudflare-ai-gateway";
};
"gpt-5.1-codex": Model<"openai-responses"> & {
id: "gpt-5.1-codex";
provider: "cloudflare-ai-gateway";
};
"gpt-5.2": Model<"openai-responses"> & {
id: "gpt-5.2";
provider: "cloudflare-ai-gateway";
};
"gpt-5.2-codex": Model<"openai-responses"> & {
id: "gpt-5.2-codex";
provider: "cloudflare-ai-gateway";
};
"gpt-5.3-codex": Model<"openai-responses"> & {
id: "gpt-5.3-codex";
provider: "cloudflare-ai-gateway";
};
"gpt-5.4": Model<"openai-responses"> & {
id: "gpt-5.4";
provider: "cloudflare-ai-gateway";
};
"gpt-5.5": Model<"openai-responses"> & {
id: "gpt-5.5";
provider: "cloudflare-ai-gateway";
};
"gpt-5.6-luna": Model<"openai-responses"> & {
id: "gpt-5.6-luna";
provider: "cloudflare-ai-gateway";
};
"gpt-5.6-sol": Model<"openai-responses"> & {
id: "gpt-5.6-sol";
provider: "cloudflare-ai-gateway";
};
"gpt-5.6-terra": Model<"openai-responses"> & {
id: "gpt-5.6-terra";
provider: "cloudflare-ai-gateway";
};
"o1": Model<"openai-responses"> & {
id: "o1";
provider: "cloudflare-ai-gateway";
};
"o3": Model<"openai-responses"> & {
id: "o3";
provider: "cloudflare-ai-gateway";
};
"o3-mini": Model<"openai-responses"> & {
id: "o3-mini";
provider: "cloudflare-ai-gateway";
};
"o3-pro": Model<"openai-responses"> & {
id: "o3-pro";
provider: "cloudflare-ai-gateway";
};
"o4-mini": Model<"openai-responses"> & {
id: "o4-mini";
provider: "cloudflare-ai-gateway";
};
"workers-ai/@cf/moonshotai/kimi-k2.5": Model<"openai-completions"> & {
id: "workers-ai/@cf/moonshotai/kimi-k2.5";
provider: "cloudflare-ai-gateway";
};
"workers-ai/@cf/moonshotai/kimi-k2.6": Model<"openai-completions"> & {
id: "workers-ai/@cf/moonshotai/kimi-k2.6";
provider: "cloudflare-ai-gateway";
};
"workers-ai/@cf/nvidia/nemotron-3-120b-a12b": Model<"openai-completions"> & {
id: "workers-ai/@cf/nvidia/nemotron-3-120b-a12b";
provider: "cloudflare-ai-gateway";
};
"workers-ai/@cf/zai-org/glm-4.7-flash": Model<"openai-completions"> & {
id: "workers-ai/@cf/zai-org/glm-4.7-flash";
provider: "cloudflare-ai-gateway";
};
"workers-ai/@cf/zai-org/glm-5.2": Model<"openai-completions"> & {
id: "workers-ai/@cf/zai-org/glm-5.2";
provider: "cloudflare-ai-gateway";
};
};
export const CLOUDFLARE_AI_GATEWAY_MODELS: ModelCatalog<typeof values, "cloudflare-ai-gateway"> =
flattenModelCatalog("cloudflare-ai-gateway", values);
@@ -2,59 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/cloudflare-workers-ai.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const CLOUDFLARE_WORKERS_AI_MODELS = values as {
"@cf/google/gemma-4-26b-a4b-it": Model<"openai-completions"> & {
id: "@cf/google/gemma-4-26b-a4b-it";
provider: "cloudflare-workers-ai";
};
"@cf/ibm-granite/granite-4.0-h-micro": Model<"openai-completions"> & {
id: "@cf/ibm-granite/granite-4.0-h-micro";
provider: "cloudflare-workers-ai";
};
"@cf/meta/llama-3.3-70b-instruct-fp8-fast": Model<"openai-completions"> & {
id: "@cf/meta/llama-3.3-70b-instruct-fp8-fast";
provider: "cloudflare-workers-ai";
};
"@cf/meta/llama-4-scout-17b-16e-instruct": Model<"openai-completions"> & {
id: "@cf/meta/llama-4-scout-17b-16e-instruct";
provider: "cloudflare-workers-ai";
};
"@cf/mistralai/mistral-small-3.1-24b-instruct": Model<"openai-completions"> & {
id: "@cf/mistralai/mistral-small-3.1-24b-instruct";
provider: "cloudflare-workers-ai";
};
"@cf/moonshotai/kimi-k2.6": Model<"openai-completions"> & {
id: "@cf/moonshotai/kimi-k2.6";
provider: "cloudflare-workers-ai";
};
"@cf/moonshotai/kimi-k2.7-code": Model<"openai-completions"> & {
id: "@cf/moonshotai/kimi-k2.7-code";
provider: "cloudflare-workers-ai";
};
"@cf/nvidia/nemotron-3-120b-a12b": Model<"openai-completions"> & {
id: "@cf/nvidia/nemotron-3-120b-a12b";
provider: "cloudflare-workers-ai";
};
"@cf/openai/gpt-oss-120b": Model<"openai-completions"> & {
id: "@cf/openai/gpt-oss-120b";
provider: "cloudflare-workers-ai";
};
"@cf/openai/gpt-oss-20b": Model<"openai-completions"> & {
id: "@cf/openai/gpt-oss-20b";
provider: "cloudflare-workers-ai";
};
"@cf/qwen/qwen3-30b-a3b-fp8": Model<"openai-completions"> & {
id: "@cf/qwen/qwen3-30b-a3b-fp8";
provider: "cloudflare-workers-ai";
};
"@cf/zai-org/glm-4.7-flash": Model<"openai-completions"> & {
id: "@cf/zai-org/glm-4.7-flash";
provider: "cloudflare-workers-ai";
};
"@cf/zai-org/glm-5.2": Model<"openai-completions"> & {
id: "@cf/zai-org/glm-5.2";
provider: "cloudflare-workers-ai";
};
};
export const CLOUDFLARE_WORKERS_AI_MODELS: ModelCatalog<typeof values, "cloudflare-workers-ai"> =
flattenModelCatalog("cloudflare-workers-ai", values);
+3 -11
View File
@@ -2,15 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/deepseek.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const DEEPSEEK_MODELS = values as {
"deepseek-v4-flash": Model<"openai-completions"> & {
id: "deepseek-v4-flash";
provider: "deepseek";
};
"deepseek-v4-pro": Model<"openai-completions"> & {
id: "deepseek-v4-pro";
provider: "deepseek";
};
};
export const DEEPSEEK_MODELS: ModelCatalog<typeof values, "deepseek"> =
flattenModelCatalog("deepseek", values);
+3 -67
View File
@@ -2,71 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/fireworks.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const FIREWORKS_MODELS = values as {
"accounts/fireworks/models/deepseek-v4-flash": Model<"anthropic-messages"> & {
id: "accounts/fireworks/models/deepseek-v4-flash";
provider: "fireworks";
};
"accounts/fireworks/models/deepseek-v4-pro": Model<"anthropic-messages"> & {
id: "accounts/fireworks/models/deepseek-v4-pro";
provider: "fireworks";
};
"accounts/fireworks/models/glm-5p1": Model<"anthropic-messages"> & {
id: "accounts/fireworks/models/glm-5p1";
provider: "fireworks";
};
"accounts/fireworks/models/glm-5p2": Model<"openai-completions"> & {
id: "accounts/fireworks/models/glm-5p2";
provider: "fireworks";
};
"accounts/fireworks/models/gpt-oss-120b": Model<"anthropic-messages"> & {
id: "accounts/fireworks/models/gpt-oss-120b";
provider: "fireworks";
};
"accounts/fireworks/models/gpt-oss-20b": Model<"anthropic-messages"> & {
id: "accounts/fireworks/models/gpt-oss-20b";
provider: "fireworks";
};
"accounts/fireworks/models/kimi-k2p6": Model<"anthropic-messages"> & {
id: "accounts/fireworks/models/kimi-k2p6";
provider: "fireworks";
};
"accounts/fireworks/models/kimi-k2p7-code": Model<"anthropic-messages"> & {
id: "accounts/fireworks/models/kimi-k2p7-code";
provider: "fireworks";
};
"accounts/fireworks/models/minimax-m2p7": Model<"anthropic-messages"> & {
id: "accounts/fireworks/models/minimax-m2p7";
provider: "fireworks";
};
"accounts/fireworks/models/minimax-m3": Model<"anthropic-messages"> & {
id: "accounts/fireworks/models/minimax-m3";
provider: "fireworks";
};
"accounts/fireworks/models/qwen3p7-plus": Model<"anthropic-messages"> & {
id: "accounts/fireworks/models/qwen3p7-plus";
provider: "fireworks";
};
"accounts/fireworks/routers/glm-5p1-fast": Model<"anthropic-messages"> & {
id: "accounts/fireworks/routers/glm-5p1-fast";
provider: "fireworks";
};
"accounts/fireworks/routers/glm-5p2-fast": Model<"openai-completions"> & {
id: "accounts/fireworks/routers/glm-5p2-fast";
provider: "fireworks";
};
"accounts/fireworks/routers/kimi-k2p6-fast": Model<"anthropic-messages"> & {
id: "accounts/fireworks/routers/kimi-k2p6-fast";
provider: "fireworks";
};
"accounts/fireworks/routers/kimi-k2p6-turbo": Model<"anthropic-messages"> & {
id: "accounts/fireworks/routers/kimi-k2p6-turbo";
provider: "fireworks";
};
"accounts/fireworks/routers/kimi-k2p7-code-fast": Model<"anthropic-messages"> & {
id: "accounts/fireworks/routers/kimi-k2p7-code-fast";
provider: "fireworks";
};
};
export const FIREWORKS_MODELS: ModelCatalog<typeof values, "fireworks"> =
flattenModelCatalog("fireworks", values);
@@ -2,119 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/github-copilot.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const GITHUB_COPILOT_MODELS = values as {
"claude-fable-5": Model<"openai-completions"> & {
id: "claude-fable-5";
provider: "github-copilot";
};
"claude-haiku-4.5": Model<"anthropic-messages"> & {
id: "claude-haiku-4.5";
provider: "github-copilot";
};
"claude-opus-4.5": Model<"anthropic-messages"> & {
id: "claude-opus-4.5";
provider: "github-copilot";
};
"claude-opus-4.6": Model<"anthropic-messages"> & {
id: "claude-opus-4.6";
provider: "github-copilot";
};
"claude-opus-4.7": Model<"anthropic-messages"> & {
id: "claude-opus-4.7";
provider: "github-copilot";
};
"claude-opus-4.8": Model<"anthropic-messages"> & {
id: "claude-opus-4.8";
provider: "github-copilot";
};
"claude-sonnet-4": Model<"anthropic-messages"> & {
id: "claude-sonnet-4";
provider: "github-copilot";
};
"claude-sonnet-4.5": Model<"anthropic-messages"> & {
id: "claude-sonnet-4.5";
provider: "github-copilot";
};
"claude-sonnet-4.6": Model<"anthropic-messages"> & {
id: "claude-sonnet-4.6";
provider: "github-copilot";
};
"claude-sonnet-5": Model<"anthropic-messages"> & {
id: "claude-sonnet-5";
provider: "github-copilot";
};
"gemini-2.5-pro": Model<"openai-completions"> & {
id: "gemini-2.5-pro";
provider: "github-copilot";
};
"gemini-3-flash-preview": Model<"openai-completions"> & {
id: "gemini-3-flash-preview";
provider: "github-copilot";
};
"gemini-3.1-pro-preview": Model<"openai-completions"> & {
id: "gemini-3.1-pro-preview";
provider: "github-copilot";
};
"gemini-3.5-flash": Model<"openai-completions"> & {
id: "gemini-3.5-flash";
provider: "github-copilot";
};
"gpt-4.1": Model<"openai-completions"> & {
id: "gpt-4.1";
provider: "github-copilot";
};
"gpt-5-mini": Model<"openai-responses"> & {
id: "gpt-5-mini";
provider: "github-copilot";
};
"gpt-5.2": Model<"openai-responses"> & {
id: "gpt-5.2";
provider: "github-copilot";
};
"gpt-5.2-codex": Model<"openai-responses"> & {
id: "gpt-5.2-codex";
provider: "github-copilot";
};
"gpt-5.3-codex": Model<"openai-responses"> & {
id: "gpt-5.3-codex";
provider: "github-copilot";
};
"gpt-5.4": Model<"openai-responses"> & {
id: "gpt-5.4";
provider: "github-copilot";
};
"gpt-5.4-mini": Model<"openai-responses"> & {
id: "gpt-5.4-mini";
provider: "github-copilot";
};
"gpt-5.4-nano": Model<"openai-responses"> & {
id: "gpt-5.4-nano";
provider: "github-copilot";
};
"gpt-5.5": Model<"openai-responses"> & {
id: "gpt-5.5";
provider: "github-copilot";
};
"gpt-5.6-luna": Model<"openai-responses"> & {
id: "gpt-5.6-luna";
provider: "github-copilot";
};
"gpt-5.6-sol": Model<"openai-responses"> & {
id: "gpt-5.6-sol";
provider: "github-copilot";
};
"gpt-5.6-terra": Model<"openai-responses"> & {
id: "gpt-5.6-terra";
provider: "github-copilot";
};
"kimi-k2.7-code": Model<"openai-completions"> & {
id: "kimi-k2.7-code";
provider: "github-copilot";
};
"mai-code-1-flash-picker": Model<"openai-responses"> & {
id: "mai-code-1-flash-picker";
provider: "github-copilot";
};
};
export const GITHUB_COPILOT_MODELS: ModelCatalog<typeof values, "github-copilot"> =
flattenModelCatalog("github-copilot", values);
@@ -2,47 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/google-vertex.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const GOOGLE_VERTEX_MODELS = values as {
"gemini-2.5-flash": Model<"google-vertex"> & {
id: "gemini-2.5-flash";
provider: "google-vertex";
};
"gemini-2.5-flash-lite": Model<"google-vertex"> & {
id: "gemini-2.5-flash-lite";
provider: "google-vertex";
};
"gemini-2.5-pro": Model<"google-vertex"> & {
id: "gemini-2.5-pro";
provider: "google-vertex";
};
"gemini-3-flash-preview": Model<"google-vertex"> & {
id: "gemini-3-flash-preview";
provider: "google-vertex";
};
"gemini-3.1-flash-lite": Model<"google-vertex"> & {
id: "gemini-3.1-flash-lite";
provider: "google-vertex";
};
"gemini-3.1-pro-preview": Model<"google-vertex"> & {
id: "gemini-3.1-pro-preview";
provider: "google-vertex";
};
"gemini-3.1-pro-preview-customtools": Model<"google-vertex"> & {
id: "gemini-3.1-pro-preview-customtools";
provider: "google-vertex";
};
"gemini-3.5-flash": Model<"google-vertex"> & {
id: "gemini-3.5-flash";
provider: "google-vertex";
};
"gemini-flash-latest": Model<"google-vertex"> & {
id: "gemini-flash-latest";
provider: "google-vertex";
};
"gemini-flash-lite-latest": Model<"google-vertex"> & {
id: "gemini-flash-lite-latest";
provider: "google-vertex";
};
};
export const GOOGLE_VERTEX_MODELS: ModelCatalog<typeof values, "google-vertex"> =
flattenModelCatalog("google-vertex", values);
+3 -75
View File
@@ -2,79 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/google.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const GOOGLE_MODELS = values as {
"gemini-2.0-flash": Model<"google-generative-ai"> & {
id: "gemini-2.0-flash";
provider: "google";
};
"gemini-2.0-flash-lite": Model<"google-generative-ai"> & {
id: "gemini-2.0-flash-lite";
provider: "google";
};
"gemini-2.5-flash": Model<"google-generative-ai"> & {
id: "gemini-2.5-flash";
provider: "google";
};
"gemini-2.5-flash-lite": Model<"google-generative-ai"> & {
id: "gemini-2.5-flash-lite";
provider: "google";
};
"gemini-2.5-pro": Model<"google-generative-ai"> & {
id: "gemini-2.5-pro";
provider: "google";
};
"gemini-3-flash-preview": Model<"google-generative-ai"> & {
id: "gemini-3-flash-preview";
provider: "google";
};
"gemini-3-pro-preview": Model<"google-generative-ai"> & {
id: "gemini-3-pro-preview";
provider: "google";
};
"gemini-3.1-flash-lite": Model<"google-generative-ai"> & {
id: "gemini-3.1-flash-lite";
provider: "google";
};
"gemini-3.1-flash-lite-preview": Model<"google-generative-ai"> & {
id: "gemini-3.1-flash-lite-preview";
provider: "google";
};
"gemini-3.1-pro-preview": Model<"google-generative-ai"> & {
id: "gemini-3.1-pro-preview";
provider: "google";
};
"gemini-3.1-pro-preview-customtools": Model<"google-generative-ai"> & {
id: "gemini-3.1-pro-preview-customtools";
provider: "google";
};
"gemini-3.5-flash": Model<"google-generative-ai"> & {
id: "gemini-3.5-flash";
provider: "google";
};
"gemini-3.5-flash-lite": Model<"google-generative-ai"> & {
id: "gemini-3.5-flash-lite";
provider: "google";
};
"gemini-3.6-flash": Model<"google-generative-ai"> & {
id: "gemini-3.6-flash";
provider: "google";
};
"gemini-flash-latest": Model<"google-generative-ai"> & {
id: "gemini-flash-latest";
provider: "google";
};
"gemini-flash-lite-latest": Model<"google-generative-ai"> & {
id: "gemini-flash-lite-latest";
provider: "google";
};
"gemma-4-26b-a4b-it": Model<"google-generative-ai"> & {
id: "gemma-4-26b-a4b-it";
provider: "google";
};
"gemma-4-31b-it": Model<"google-generative-ai"> & {
id: "gemma-4-31b-it";
provider: "google";
};
};
export const GOOGLE_MODELS: ModelCatalog<typeof values, "google"> =
flattenModelCatalog("google", values);
+3 -31
View File
@@ -2,35 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/groq.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const GROQ_MODELS = values as {
"llama-3.1-8b-instant": Model<"openai-completions"> & {
id: "llama-3.1-8b-instant";
provider: "groq";
};
"llama-3.3-70b-versatile": Model<"openai-completions"> & {
id: "llama-3.3-70b-versatile";
provider: "groq";
};
"meta-llama/llama-4-scout-17b-16e-instruct": Model<"openai-completions"> & {
id: "meta-llama/llama-4-scout-17b-16e-instruct";
provider: "groq";
};
"openai/gpt-oss-120b": Model<"openai-completions"> & {
id: "openai/gpt-oss-120b";
provider: "groq";
};
"openai/gpt-oss-20b": Model<"openai-completions"> & {
id: "openai/gpt-oss-20b";
provider: "groq";
};
"openai/gpt-oss-safeguard-20b": Model<"openai-completions"> & {
id: "openai/gpt-oss-safeguard-20b";
provider: "groq";
};
"qwen/qwen3-32b": Model<"openai-completions"> & {
id: "qwen/qwen3-32b";
provider: "groq";
};
};
export const GROQ_MODELS: ModelCatalog<typeof values, "groq"> =
flattenModelCatalog("groq", values);
+3 -199
View File
@@ -2,203 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/huggingface.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const HUGGINGFACE_MODELS = values as {
"MiniMaxAI/MiniMax-M2": Model<"openai-completions"> & {
id: "MiniMaxAI/MiniMax-M2";
provider: "huggingface";
};
"MiniMaxAI/MiniMax-M2.1": Model<"openai-completions"> & {
id: "MiniMaxAI/MiniMax-M2.1";
provider: "huggingface";
};
"MiniMaxAI/MiniMax-M2.5": Model<"openai-completions"> & {
id: "MiniMaxAI/MiniMax-M2.5";
provider: "huggingface";
};
"MiniMaxAI/MiniMax-M2.7": Model<"openai-completions"> & {
id: "MiniMaxAI/MiniMax-M2.7";
provider: "huggingface";
};
"MiniMaxAI/MiniMax-M3": Model<"openai-completions"> & {
id: "MiniMaxAI/MiniMax-M3";
provider: "huggingface";
};
"Qwen/Qwen3-235B-A22B": Model<"openai-completions"> & {
id: "Qwen/Qwen3-235B-A22B";
provider: "huggingface";
};
"Qwen/Qwen3-235B-A22B-Thinking-2507": Model<"openai-completions"> & {
id: "Qwen/Qwen3-235B-A22B-Thinking-2507";
provider: "huggingface";
};
"Qwen/Qwen3-32B": Model<"openai-completions"> & {
id: "Qwen/Qwen3-32B";
provider: "huggingface";
};
"Qwen/Qwen3-Coder-30B-A3B-Instruct": Model<"openai-completions"> & {
id: "Qwen/Qwen3-Coder-30B-A3B-Instruct";
provider: "huggingface";
};
"Qwen/Qwen3-Coder-480B-A35B-Instruct": Model<"openai-completions"> & {
id: "Qwen/Qwen3-Coder-480B-A35B-Instruct";
provider: "huggingface";
};
"Qwen/Qwen3-Coder-Next": Model<"openai-completions"> & {
id: "Qwen/Qwen3-Coder-Next";
provider: "huggingface";
};
"Qwen/Qwen3-Next-80B-A3B-Instruct": Model<"openai-completions"> & {
id: "Qwen/Qwen3-Next-80B-A3B-Instruct";
provider: "huggingface";
};
"Qwen/Qwen3-Next-80B-A3B-Thinking": Model<"openai-completions"> & {
id: "Qwen/Qwen3-Next-80B-A3B-Thinking";
provider: "huggingface";
};
"Qwen/Qwen3.5-122B-A10B": Model<"openai-completions"> & {
id: "Qwen/Qwen3.5-122B-A10B";
provider: "huggingface";
};
"Qwen/Qwen3.5-27B": Model<"openai-completions"> & {
id: "Qwen/Qwen3.5-27B";
provider: "huggingface";
};
"Qwen/Qwen3.5-35B-A3B": Model<"openai-completions"> & {
id: "Qwen/Qwen3.5-35B-A3B";
provider: "huggingface";
};
"Qwen/Qwen3.5-397B-A17B": Model<"openai-completions"> & {
id: "Qwen/Qwen3.5-397B-A17B";
provider: "huggingface";
};
"Qwen/Qwen3.5-9B": Model<"openai-completions"> & {
id: "Qwen/Qwen3.5-9B";
provider: "huggingface";
};
"Qwen/Qwen3.6-27B": Model<"openai-completions"> & {
id: "Qwen/Qwen3.6-27B";
provider: "huggingface";
};
"Qwen/Qwen3.6-35B-A3B": Model<"openai-completions"> & {
id: "Qwen/Qwen3.6-35B-A3B";
provider: "huggingface";
};
"XiaomiMiMo/MiMo-V2-Flash": Model<"openai-completions"> & {
id: "XiaomiMiMo/MiMo-V2-Flash";
provider: "huggingface";
};
"XiaomiMiMo/MiMo-V2.5-Pro": Model<"openai-completions"> & {
id: "XiaomiMiMo/MiMo-V2.5-Pro";
provider: "huggingface";
};
"deepseek-ai/DeepSeek-R1": Model<"openai-completions"> & {
id: "deepseek-ai/DeepSeek-R1";
provider: "huggingface";
};
"deepseek-ai/DeepSeek-R1-0528": Model<"openai-completions"> & {
id: "deepseek-ai/DeepSeek-R1-0528";
provider: "huggingface";
};
"deepseek-ai/DeepSeek-V3.2": Model<"openai-completions"> & {
id: "deepseek-ai/DeepSeek-V3.2";
provider: "huggingface";
};
"deepseek-ai/DeepSeek-V4-Flash": Model<"openai-completions"> & {
id: "deepseek-ai/DeepSeek-V4-Flash";
provider: "huggingface";
};
"deepseek-ai/DeepSeek-V4-Pro": Model<"openai-completions"> & {
id: "deepseek-ai/DeepSeek-V4-Pro";
provider: "huggingface";
};
"google/gemma-4-26B-A4B-it": Model<"openai-completions"> & {
id: "google/gemma-4-26B-A4B-it";
provider: "huggingface";
};
"google/gemma-4-31B-it": Model<"openai-completions"> & {
id: "google/gemma-4-31B-it";
provider: "huggingface";
};
"meta-llama/Llama-3.3-70B-Instruct": Model<"openai-completions"> & {
id: "meta-llama/Llama-3.3-70B-Instruct";
provider: "huggingface";
};
"moonshotai/Kimi-K2-Instruct": Model<"openai-completions"> & {
id: "moonshotai/Kimi-K2-Instruct";
provider: "huggingface";
};
"moonshotai/Kimi-K2-Instruct-0905": Model<"openai-completions"> & {
id: "moonshotai/Kimi-K2-Instruct-0905";
provider: "huggingface";
};
"moonshotai/Kimi-K2-Thinking": Model<"openai-completions"> & {
id: "moonshotai/Kimi-K2-Thinking";
provider: "huggingface";
};
"moonshotai/Kimi-K2.5": Model<"openai-completions"> & {
id: "moonshotai/Kimi-K2.5";
provider: "huggingface";
};
"moonshotai/Kimi-K2.6": Model<"openai-completions"> & {
id: "moonshotai/Kimi-K2.6";
provider: "huggingface";
};
"moonshotai/Kimi-K2.7-Code": Model<"openai-completions"> & {
id: "moonshotai/Kimi-K2.7-Code";
provider: "huggingface";
};
"openai/gpt-oss-120b": Model<"openai-completions"> & {
id: "openai/gpt-oss-120b";
provider: "huggingface";
};
"openai/gpt-oss-20b": Model<"openai-completions"> & {
id: "openai/gpt-oss-20b";
provider: "huggingface";
};
"stepfun-ai/Step-3.5-Flash": Model<"openai-completions"> & {
id: "stepfun-ai/Step-3.5-Flash";
provider: "huggingface";
};
"stepfun-ai/Step-3.7-Flash": Model<"openai-completions"> & {
id: "stepfun-ai/Step-3.7-Flash";
provider: "huggingface";
};
"zai-org/GLM-4.5": Model<"openai-completions"> & {
id: "zai-org/GLM-4.5";
provider: "huggingface";
};
"zai-org/GLM-4.5-Air": Model<"openai-completions"> & {
id: "zai-org/GLM-4.5-Air";
provider: "huggingface";
};
"zai-org/GLM-4.5V": Model<"openai-completions"> & {
id: "zai-org/GLM-4.5V";
provider: "huggingface";
};
"zai-org/GLM-4.6": Model<"openai-completions"> & {
id: "zai-org/GLM-4.6";
provider: "huggingface";
};
"zai-org/GLM-4.7": Model<"openai-completions"> & {
id: "zai-org/GLM-4.7";
provider: "huggingface";
};
"zai-org/GLM-4.7-Flash": Model<"openai-completions"> & {
id: "zai-org/GLM-4.7-Flash";
provider: "huggingface";
};
"zai-org/GLM-5": Model<"openai-completions"> & {
id: "zai-org/GLM-5";
provider: "huggingface";
};
"zai-org/GLM-5.1": Model<"openai-completions"> & {
id: "zai-org/GLM-5.1";
provider: "huggingface";
};
"zai-org/GLM-5.2": Model<"openai-completions"> & {
id: "zai-org/GLM-5.2";
provider: "huggingface";
};
};
export const HUGGINGFACE_MODELS: ModelCatalog<typeof values, "huggingface"> =
flattenModelCatalog("huggingface", values);
@@ -2,19 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/kimi-coding.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const KIMI_CODING_MODELS = values as {
"k3": Model<"anthropic-messages"> & {
id: "k3";
provider: "kimi-coding";
};
"kimi-for-coding": Model<"anthropic-messages"> & {
id: "kimi-for-coding";
provider: "kimi-coding";
};
"kimi-for-coding-highspeed": Model<"anthropic-messages"> & {
id: "kimi-for-coding-highspeed";
provider: "kimi-coding";
};
};
export const KIMI_CODING_MODELS: ModelCatalog<typeof values, "kimi-coding"> =
flattenModelCatalog("kimi-coding", values);
+3 -15
View File
@@ -2,19 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/minimax-cn.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const MINIMAX_CN_MODELS = values as {
"MiniMax-M2.7": Model<"anthropic-messages"> & {
id: "MiniMax-M2.7";
provider: "minimax-cn";
};
"MiniMax-M2.7-highspeed": Model<"anthropic-messages"> & {
id: "MiniMax-M2.7-highspeed";
provider: "minimax-cn";
};
"MiniMax-M3": Model<"anthropic-messages"> & {
id: "MiniMax-M3";
provider: "minimax-cn";
};
};
export const MINIMAX_CN_MODELS: ModelCatalog<typeof values, "minimax-cn"> =
flattenModelCatalog("minimax-cn", values);
+3 -15
View File
@@ -2,19 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/minimax.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const MINIMAX_MODELS = values as {
"MiniMax-M2.7": Model<"anthropic-messages"> & {
id: "MiniMax-M2.7";
provider: "minimax";
};
"MiniMax-M2.7-highspeed": Model<"anthropic-messages"> & {
id: "MiniMax-M2.7-highspeed";
provider: "minimax";
};
"MiniMax-M3": Model<"anthropic-messages"> & {
id: "MiniMax-M3";
provider: "minimax";
};
};
export const MINIMAX_MODELS: ModelCatalog<typeof values, "minimax"> =
flattenModelCatalog("minimax", values);
+3 -123
View File
@@ -2,127 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/mistral.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const MISTRAL_MODELS = values as {
"codestral-latest": Model<"mistral-conversations"> & {
id: "codestral-latest";
provider: "mistral";
};
"devstral-2512": Model<"mistral-conversations"> & {
id: "devstral-2512";
provider: "mistral";
};
"devstral-latest": Model<"mistral-conversations"> & {
id: "devstral-latest";
provider: "mistral";
};
"devstral-medium-2507": Model<"mistral-conversations"> & {
id: "devstral-medium-2507";
provider: "mistral";
};
"devstral-medium-latest": Model<"mistral-conversations"> & {
id: "devstral-medium-latest";
provider: "mistral";
};
"devstral-small-2505": Model<"mistral-conversations"> & {
id: "devstral-small-2505";
provider: "mistral";
};
"devstral-small-2507": Model<"mistral-conversations"> & {
id: "devstral-small-2507";
provider: "mistral";
};
"labs-devstral-small-2512": Model<"mistral-conversations"> & {
id: "labs-devstral-small-2512";
provider: "mistral";
};
"magistral-medium-latest": Model<"mistral-conversations"> & {
id: "magistral-medium-latest";
provider: "mistral";
};
"magistral-small": Model<"mistral-conversations"> & {
id: "magistral-small";
provider: "mistral";
};
"ministral-3b-latest": Model<"mistral-conversations"> & {
id: "ministral-3b-latest";
provider: "mistral";
};
"ministral-8b-latest": Model<"mistral-conversations"> & {
id: "ministral-8b-latest";
provider: "mistral";
};
"mistral-large-2411": Model<"mistral-conversations"> & {
id: "mistral-large-2411";
provider: "mistral";
};
"mistral-large-2512": Model<"mistral-conversations"> & {
id: "mistral-large-2512";
provider: "mistral";
};
"mistral-large-latest": Model<"mistral-conversations"> & {
id: "mistral-large-latest";
provider: "mistral";
};
"mistral-medium-2505": Model<"mistral-conversations"> & {
id: "mistral-medium-2505";
provider: "mistral";
};
"mistral-medium-2508": Model<"mistral-conversations"> & {
id: "mistral-medium-2508";
provider: "mistral";
};
"mistral-medium-2604": Model<"mistral-conversations"> & {
id: "mistral-medium-2604";
provider: "mistral";
};
"mistral-medium-3.5": Model<"mistral-conversations"> & {
id: "mistral-medium-3.5";
provider: "mistral";
};
"mistral-medium-latest": Model<"mistral-conversations"> & {
id: "mistral-medium-latest";
provider: "mistral";
};
"mistral-nemo": Model<"mistral-conversations"> & {
id: "mistral-nemo";
provider: "mistral";
};
"mistral-small-2506": Model<"mistral-conversations"> & {
id: "mistral-small-2506";
provider: "mistral";
};
"mistral-small-2603": Model<"mistral-conversations"> & {
id: "mistral-small-2603";
provider: "mistral";
};
"mistral-small-latest": Model<"mistral-conversations"> & {
id: "mistral-small-latest";
provider: "mistral";
};
"open-mistral-7b": Model<"mistral-conversations"> & {
id: "open-mistral-7b";
provider: "mistral";
};
"open-mistral-nemo": Model<"mistral-conversations"> & {
id: "open-mistral-nemo";
provider: "mistral";
};
"open-mixtral-8x22b": Model<"mistral-conversations"> & {
id: "open-mixtral-8x22b";
provider: "mistral";
};
"open-mixtral-8x7b": Model<"mistral-conversations"> & {
id: "open-mixtral-8x7b";
provider: "mistral";
};
"pixtral-12b": Model<"mistral-conversations"> & {
id: "pixtral-12b";
provider: "mistral";
};
"pixtral-large-latest": Model<"mistral-conversations"> & {
id: "pixtral-large-latest";
provider: "mistral";
};
};
export const MISTRAL_MODELS: ModelCatalog<typeof values, "mistral"> =
flattenModelCatalog("mistral", values);
@@ -2,47 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/moonshotai-cn.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const MOONSHOTAI_CN_MODELS = values as {
"kimi-k2-0711-preview": Model<"openai-completions"> & {
id: "kimi-k2-0711-preview";
provider: "moonshotai-cn";
};
"kimi-k2-0905-preview": Model<"openai-completions"> & {
id: "kimi-k2-0905-preview";
provider: "moonshotai-cn";
};
"kimi-k2-thinking": Model<"openai-completions"> & {
id: "kimi-k2-thinking";
provider: "moonshotai-cn";
};
"kimi-k2-thinking-turbo": Model<"openai-completions"> & {
id: "kimi-k2-thinking-turbo";
provider: "moonshotai-cn";
};
"kimi-k2-turbo-preview": Model<"openai-completions"> & {
id: "kimi-k2-turbo-preview";
provider: "moonshotai-cn";
};
"kimi-k2.5": Model<"openai-completions"> & {
id: "kimi-k2.5";
provider: "moonshotai-cn";
};
"kimi-k2.6": Model<"openai-completions"> & {
id: "kimi-k2.6";
provider: "moonshotai-cn";
};
"kimi-k2.7-code": Model<"openai-completions"> & {
id: "kimi-k2.7-code";
provider: "moonshotai-cn";
};
"kimi-k2.7-code-highspeed": Model<"openai-completions"> & {
id: "kimi-k2.7-code-highspeed";
provider: "moonshotai-cn";
};
"kimi-k3": Model<"openai-completions"> & {
id: "kimi-k3";
provider: "moonshotai-cn";
};
};
export const MOONSHOTAI_CN_MODELS: ModelCatalog<typeof values, "moonshotai-cn"> =
flattenModelCatalog("moonshotai-cn", values);
+3 -43
View File
@@ -2,47 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/moonshotai.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const MOONSHOTAI_MODELS = values as {
"kimi-k2-0711-preview": Model<"openai-completions"> & {
id: "kimi-k2-0711-preview";
provider: "moonshotai";
};
"kimi-k2-0905-preview": Model<"openai-completions"> & {
id: "kimi-k2-0905-preview";
provider: "moonshotai";
};
"kimi-k2-thinking": Model<"openai-completions"> & {
id: "kimi-k2-thinking";
provider: "moonshotai";
};
"kimi-k2-thinking-turbo": Model<"openai-completions"> & {
id: "kimi-k2-thinking-turbo";
provider: "moonshotai";
};
"kimi-k2-turbo-preview": Model<"openai-completions"> & {
id: "kimi-k2-turbo-preview";
provider: "moonshotai";
};
"kimi-k2.5": Model<"openai-completions"> & {
id: "kimi-k2.5";
provider: "moonshotai";
};
"kimi-k2.6": Model<"openai-completions"> & {
id: "kimi-k2.6";
provider: "moonshotai";
};
"kimi-k2.7-code": Model<"openai-completions"> & {
id: "kimi-k2.7-code";
provider: "moonshotai";
};
"kimi-k2.7-code-highspeed": Model<"openai-completions"> & {
id: "kimi-k2.7-code-highspeed";
provider: "moonshotai";
};
"kimi-k3": Model<"openai-completions"> & {
id: "kimi-k3";
provider: "moonshotai";
};
};
export const MOONSHOTAI_MODELS: ModelCatalog<typeof values, "moonshotai"> =
flattenModelCatalog("moonshotai", values);
+3 -79
View File
@@ -2,83 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/nvidia.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const NVIDIA_MODELS = values as {
"meta/llama-3.1-70b-instruct": Model<"openai-completions"> & {
id: "meta/llama-3.1-70b-instruct";
provider: "nvidia";
};
"meta/llama-3.1-8b-instruct": Model<"openai-completions"> & {
id: "meta/llama-3.1-8b-instruct";
provider: "nvidia";
};
"meta/llama-3.2-11b-vision-instruct": Model<"openai-completions"> & {
id: "meta/llama-3.2-11b-vision-instruct";
provider: "nvidia";
};
"meta/llama-3.2-90b-vision-instruct": Model<"openai-completions"> & {
id: "meta/llama-3.2-90b-vision-instruct";
provider: "nvidia";
};
"meta/llama-3.3-70b-instruct": Model<"openai-completions"> & {
id: "meta/llama-3.3-70b-instruct";
provider: "nvidia";
};
"minimaxai/minimax-m3": Model<"openai-completions"> & {
id: "minimaxai/minimax-m3";
provider: "nvidia";
};
"mistralai/mistral-large-3-675b-instruct-2512": Model<"openai-completions"> & {
id: "mistralai/mistral-large-3-675b-instruct-2512";
provider: "nvidia";
};
"mistralai/mistral-small-4-119b-2603": Model<"openai-completions"> & {
id: "mistralai/mistral-small-4-119b-2603";
provider: "nvidia";
};
"moonshotai/kimi-k2.6": Model<"openai-completions"> & {
id: "moonshotai/kimi-k2.6";
provider: "nvidia";
};
"nvidia/nemotron-3-nano-30b-a3b": Model<"openai-completions"> & {
id: "nvidia/nemotron-3-nano-30b-a3b";
provider: "nvidia";
};
"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning": Model<"openai-completions"> & {
id: "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning";
provider: "nvidia";
};
"nvidia/nemotron-3-super-120b-a12b": Model<"openai-completions"> & {
id: "nvidia/nemotron-3-super-120b-a12b";
provider: "nvidia";
};
"nvidia/nemotron-3-ultra-550b-a55b": Model<"openai-completions"> & {
id: "nvidia/nemotron-3-ultra-550b-a55b";
provider: "nvidia";
};
"nvidia/nvidia-nemotron-nano-9b-v2": Model<"openai-completions"> & {
id: "nvidia/nvidia-nemotron-nano-9b-v2";
provider: "nvidia";
};
"openai/gpt-oss-120b": Model<"openai-completions"> & {
id: "openai/gpt-oss-120b";
provider: "nvidia";
};
"openai/gpt-oss-20b": Model<"openai-completions"> & {
id: "openai/gpt-oss-20b";
provider: "nvidia";
};
"stepfun-ai/step-3.5-flash": Model<"openai-completions"> & {
id: "stepfun-ai/step-3.5-flash";
provider: "nvidia";
};
"stepfun-ai/step-3.7-flash": Model<"openai-completions"> & {
id: "stepfun-ai/step-3.7-flash";
provider: "nvidia";
};
"z-ai/glm-5.2": Model<"openai-completions"> & {
id: "z-ai/glm-5.2";
provider: "nvidia";
};
};
export const NVIDIA_MODELS: ModelCatalog<typeof values, "nvidia"> =
flattenModelCatalog("nvidia", values);
@@ -2,35 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/openai-codex.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const OPENAI_CODEX_MODELS = values as {
"gpt-5.3-codex-spark": Model<"openai-codex-responses"> & {
id: "gpt-5.3-codex-spark";
provider: "openai-codex";
};
"gpt-5.4": Model<"openai-codex-responses"> & {
id: "gpt-5.4";
provider: "openai-codex";
};
"gpt-5.4-mini": Model<"openai-codex-responses"> & {
id: "gpt-5.4-mini";
provider: "openai-codex";
};
"gpt-5.5": Model<"openai-codex-responses"> & {
id: "gpt-5.5";
provider: "openai-codex";
};
"gpt-5.6-luna": Model<"openai-codex-responses"> & {
id: "gpt-5.6-luna";
provider: "openai-codex";
};
"gpt-5.6-sol": Model<"openai-codex-responses"> & {
id: "gpt-5.6-sol";
provider: "openai-codex";
};
"gpt-5.6-terra": Model<"openai-codex-responses"> & {
id: "gpt-5.6-terra";
provider: "openai-codex";
};
};
export const OPENAI_CODEX_MODELS: ModelCatalog<typeof values, "openai-codex"> =
flattenModelCatalog("openai-codex", values);
+3 -187
View File
@@ -2,191 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/openai.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const OPENAI_MODELS = values as {
"gpt-4": Model<"openai-responses"> & {
id: "gpt-4";
provider: "openai";
};
"gpt-4-turbo": Model<"openai-responses"> & {
id: "gpt-4-turbo";
provider: "openai";
};
"gpt-4.1": Model<"openai-responses"> & {
id: "gpt-4.1";
provider: "openai";
};
"gpt-4.1-mini": Model<"openai-responses"> & {
id: "gpt-4.1-mini";
provider: "openai";
};
"gpt-4.1-nano": Model<"openai-responses"> & {
id: "gpt-4.1-nano";
provider: "openai";
};
"gpt-4o": Model<"openai-responses"> & {
id: "gpt-4o";
provider: "openai";
};
"gpt-4o-2024-05-13": Model<"openai-responses"> & {
id: "gpt-4o-2024-05-13";
provider: "openai";
};
"gpt-4o-2024-08-06": Model<"openai-responses"> & {
id: "gpt-4o-2024-08-06";
provider: "openai";
};
"gpt-4o-2024-11-20": Model<"openai-responses"> & {
id: "gpt-4o-2024-11-20";
provider: "openai";
};
"gpt-4o-mini": Model<"openai-responses"> & {
id: "gpt-4o-mini";
provider: "openai";
};
"gpt-5": Model<"openai-responses"> & {
id: "gpt-5";
provider: "openai";
};
"gpt-5-chat-latest": Model<"openai-responses"> & {
id: "gpt-5-chat-latest";
provider: "openai";
};
"gpt-5-codex": Model<"openai-responses"> & {
id: "gpt-5-codex";
provider: "openai";
};
"gpt-5-mini": Model<"openai-responses"> & {
id: "gpt-5-mini";
provider: "openai";
};
"gpt-5-nano": Model<"openai-responses"> & {
id: "gpt-5-nano";
provider: "openai";
};
"gpt-5-pro": Model<"openai-responses"> & {
id: "gpt-5-pro";
provider: "openai";
};
"gpt-5.1": Model<"openai-responses"> & {
id: "gpt-5.1";
provider: "openai";
};
"gpt-5.1-chat-latest": Model<"openai-responses"> & {
id: "gpt-5.1-chat-latest";
provider: "openai";
};
"gpt-5.1-codex": Model<"openai-responses"> & {
id: "gpt-5.1-codex";
provider: "openai";
};
"gpt-5.1-codex-max": Model<"openai-responses"> & {
id: "gpt-5.1-codex-max";
provider: "openai";
};
"gpt-5.1-codex-mini": Model<"openai-responses"> & {
id: "gpt-5.1-codex-mini";
provider: "openai";
};
"gpt-5.2": Model<"openai-responses"> & {
id: "gpt-5.2";
provider: "openai";
};
"gpt-5.2-chat-latest": Model<"openai-responses"> & {
id: "gpt-5.2-chat-latest";
provider: "openai";
};
"gpt-5.2-codex": Model<"openai-responses"> & {
id: "gpt-5.2-codex";
provider: "openai";
};
"gpt-5.2-pro": Model<"openai-responses"> & {
id: "gpt-5.2-pro";
provider: "openai";
};
"gpt-5.3-chat-latest": Model<"openai-responses"> & {
id: "gpt-5.3-chat-latest";
provider: "openai";
};
"gpt-5.3-codex": Model<"openai-responses"> & {
id: "gpt-5.3-codex";
provider: "openai";
};
"gpt-5.3-codex-spark": Model<"openai-responses"> & {
id: "gpt-5.3-codex-spark";
provider: "openai";
};
"gpt-5.4": Model<"openai-responses"> & {
id: "gpt-5.4";
provider: "openai";
};
"gpt-5.4-mini": Model<"openai-responses"> & {
id: "gpt-5.4-mini";
provider: "openai";
};
"gpt-5.4-nano": Model<"openai-responses"> & {
id: "gpt-5.4-nano";
provider: "openai";
};
"gpt-5.4-pro": Model<"openai-responses"> & {
id: "gpt-5.4-pro";
provider: "openai";
};
"gpt-5.5": Model<"openai-responses"> & {
id: "gpt-5.5";
provider: "openai";
};
"gpt-5.5-pro": Model<"openai-responses"> & {
id: "gpt-5.5-pro";
provider: "openai";
};
"gpt-5.6-luna": Model<"openai-responses"> & {
id: "gpt-5.6-luna";
provider: "openai";
};
"gpt-5.6-sol": Model<"openai-responses"> & {
id: "gpt-5.6-sol";
provider: "openai";
};
"gpt-5.6-terra": Model<"openai-responses"> & {
id: "gpt-5.6-terra";
provider: "openai";
};
"gpt-realtime-2.1": Model<"openai-responses"> & {
id: "gpt-realtime-2.1";
provider: "openai";
};
"o1": Model<"openai-responses"> & {
id: "o1";
provider: "openai";
};
"o1-pro": Model<"openai-responses"> & {
id: "o1-pro";
provider: "openai";
};
"o3": Model<"openai-responses"> & {
id: "o3";
provider: "openai";
};
"o3-deep-research": Model<"openai-responses"> & {
id: "o3-deep-research";
provider: "openai";
};
"o3-mini": Model<"openai-responses"> & {
id: "o3-mini";
provider: "openai";
};
"o3-pro": Model<"openai-responses"> & {
id: "o3-pro";
provider: "openai";
};
"o4-mini": Model<"openai-responses"> & {
id: "o4-mini";
provider: "openai";
};
"o4-mini-deep-research": Model<"openai-responses"> & {
id: "o4-mini-deep-research";
provider: "openai";
};
};
export const OPENAI_MODELS: ModelCatalog<typeof values, "openai"> =
flattenModelCatalog("openai", values);
@@ -2,67 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/opencode-go.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const OPENCODE_GO_MODELS = values as {
"deepseek-v4-flash": Model<"openai-completions"> & {
id: "deepseek-v4-flash";
provider: "opencode-go";
};
"deepseek-v4-pro": Model<"openai-completions"> & {
id: "deepseek-v4-pro";
provider: "opencode-go";
};
"glm-5.1": Model<"openai-completions"> & {
id: "glm-5.1";
provider: "opencode-go";
};
"glm-5.2": Model<"openai-completions"> & {
id: "glm-5.2";
provider: "opencode-go";
};
"grok-4.5": Model<"openai-responses"> & {
id: "grok-4.5";
provider: "opencode-go";
};
"kimi-k2.6": Model<"openai-completions"> & {
id: "kimi-k2.6";
provider: "opencode-go";
};
"kimi-k2.7-code": Model<"openai-completions"> & {
id: "kimi-k2.7-code";
provider: "opencode-go";
};
"kimi-k3": Model<"openai-completions"> & {
id: "kimi-k3";
provider: "opencode-go";
};
"mimo-v2.5": Model<"openai-completions"> & {
id: "mimo-v2.5";
provider: "opencode-go";
};
"mimo-v2.5-pro": Model<"openai-completions"> & {
id: "mimo-v2.5-pro";
provider: "opencode-go";
};
"minimax-m2.7": Model<"openai-completions"> & {
id: "minimax-m2.7";
provider: "opencode-go";
};
"minimax-m3": Model<"anthropic-messages"> & {
id: "minimax-m3";
provider: "opencode-go";
};
"qwen3.6-plus": Model<"openai-completions"> & {
id: "qwen3.6-plus";
provider: "opencode-go";
};
"qwen3.7-max": Model<"anthropic-messages"> & {
id: "qwen3.7-max";
provider: "opencode-go";
};
"qwen3.7-plus": Model<"anthropic-messages"> & {
id: "qwen3.7-plus";
provider: "opencode-go";
};
};
export const OPENCODE_GO_MODELS: ModelCatalog<typeof values, "opencode-go"> =
flattenModelCatalog("opencode-go", values);
+3 -227
View File
@@ -2,231 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/opencode.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const OPENCODE_MODELS = values as {
"big-pickle": Model<"openai-completions"> & {
id: "big-pickle";
provider: "opencode";
};
"claude-fable-5": Model<"anthropic-messages"> & {
id: "claude-fable-5";
provider: "opencode";
};
"claude-haiku-4-5": Model<"anthropic-messages"> & {
id: "claude-haiku-4-5";
provider: "opencode";
};
"claude-opus-4-1": Model<"anthropic-messages"> & {
id: "claude-opus-4-1";
provider: "opencode";
};
"claude-opus-4-5": Model<"anthropic-messages"> & {
id: "claude-opus-4-5";
provider: "opencode";
};
"claude-opus-4-6": Model<"anthropic-messages"> & {
id: "claude-opus-4-6";
provider: "opencode";
};
"claude-opus-4-7": Model<"anthropic-messages"> & {
id: "claude-opus-4-7";
provider: "opencode";
};
"claude-opus-4-8": Model<"anthropic-messages"> & {
id: "claude-opus-4-8";
provider: "opencode";
};
"claude-sonnet-4": Model<"anthropic-messages"> & {
id: "claude-sonnet-4";
provider: "opencode";
};
"claude-sonnet-4-5": Model<"anthropic-messages"> & {
id: "claude-sonnet-4-5";
provider: "opencode";
};
"claude-sonnet-4-6": Model<"anthropic-messages"> & {
id: "claude-sonnet-4-6";
provider: "opencode";
};
"claude-sonnet-5": Model<"anthropic-messages"> & {
id: "claude-sonnet-5";
provider: "opencode";
};
"deepseek-v4-flash": Model<"openai-completions"> & {
id: "deepseek-v4-flash";
provider: "opencode";
};
"deepseek-v4-flash-free": Model<"openai-completions"> & {
id: "deepseek-v4-flash-free";
provider: "opencode";
};
"deepseek-v4-pro": Model<"openai-completions"> & {
id: "deepseek-v4-pro";
provider: "opencode";
};
"gemini-3-flash": Model<"google-generative-ai"> & {
id: "gemini-3-flash";
provider: "opencode";
};
"gemini-3.1-pro": Model<"google-generative-ai"> & {
id: "gemini-3.1-pro";
provider: "opencode";
};
"gemini-3.5-flash": Model<"google-generative-ai"> & {
id: "gemini-3.5-flash";
provider: "opencode";
};
"gemini-3.5-flash-lite": Model<"google-generative-ai"> & {
id: "gemini-3.5-flash-lite";
provider: "opencode";
};
"gemini-3.6-flash": Model<"google-generative-ai"> & {
id: "gemini-3.6-flash";
provider: "opencode";
};
"glm-5": Model<"openai-completions"> & {
id: "glm-5";
provider: "opencode";
};
"glm-5.1": Model<"openai-completions"> & {
id: "glm-5.1";
provider: "opencode";
};
"glm-5.2": Model<"openai-completions"> & {
id: "glm-5.2";
provider: "opencode";
};
"gpt-5": Model<"openai-responses"> & {
id: "gpt-5";
provider: "opencode";
};
"gpt-5-codex": Model<"openai-responses"> & {
id: "gpt-5-codex";
provider: "opencode";
};
"gpt-5-nano": Model<"openai-responses"> & {
id: "gpt-5-nano";
provider: "opencode";
};
"gpt-5.1": Model<"openai-responses"> & {
id: "gpt-5.1";
provider: "opencode";
};
"gpt-5.1-codex": Model<"openai-responses"> & {
id: "gpt-5.1-codex";
provider: "opencode";
};
"gpt-5.1-codex-max": Model<"openai-responses"> & {
id: "gpt-5.1-codex-max";
provider: "opencode";
};
"gpt-5.1-codex-mini": Model<"openai-responses"> & {
id: "gpt-5.1-codex-mini";
provider: "opencode";
};
"gpt-5.2": Model<"openai-responses"> & {
id: "gpt-5.2";
provider: "opencode";
};
"gpt-5.2-codex": Model<"openai-responses"> & {
id: "gpt-5.2-codex";
provider: "opencode";
};
"gpt-5.3-codex": Model<"openai-responses"> & {
id: "gpt-5.3-codex";
provider: "opencode";
};
"gpt-5.4": Model<"openai-responses"> & {
id: "gpt-5.4";
provider: "opencode";
};
"gpt-5.4-mini": Model<"openai-responses"> & {
id: "gpt-5.4-mini";
provider: "opencode";
};
"gpt-5.4-nano": Model<"openai-responses"> & {
id: "gpt-5.4-nano";
provider: "opencode";
};
"gpt-5.4-pro": Model<"openai-responses"> & {
id: "gpt-5.4-pro";
provider: "opencode";
};
"gpt-5.5": Model<"openai-responses"> & {
id: "gpt-5.5";
provider: "opencode";
};
"gpt-5.5-pro": Model<"openai-responses"> & {
id: "gpt-5.5-pro";
provider: "opencode";
};
"gpt-5.6-luna": Model<"openai-responses"> & {
id: "gpt-5.6-luna";
provider: "opencode";
};
"gpt-5.6-sol": Model<"openai-responses"> & {
id: "gpt-5.6-sol";
provider: "opencode";
};
"gpt-5.6-terra": Model<"openai-responses"> & {
id: "gpt-5.6-terra";
provider: "opencode";
};
"grok-4.5": Model<"openai-responses"> & {
id: "grok-4.5";
provider: "opencode";
};
"grok-build-0.1": Model<"openai-completions"> & {
id: "grok-build-0.1";
provider: "opencode";
};
"kimi-k2.5": Model<"openai-completions"> & {
id: "kimi-k2.5";
provider: "opencode";
};
"kimi-k2.6": Model<"openai-completions"> & {
id: "kimi-k2.6";
provider: "opencode";
};
"kimi-k2.7-code": Model<"openai-completions"> & {
id: "kimi-k2.7-code";
provider: "opencode";
};
"laguna-s-2.1-free": Model<"openai-completions"> & {
id: "laguna-s-2.1-free";
provider: "opencode";
};
"mimo-v2.5-free": Model<"openai-completions"> & {
id: "mimo-v2.5-free";
provider: "opencode";
};
"minimax-m2.5": Model<"openai-completions"> & {
id: "minimax-m2.5";
provider: "opencode";
};
"minimax-m2.7": Model<"openai-completions"> & {
id: "minimax-m2.7";
provider: "opencode";
};
"minimax-m3": Model<"openai-completions"> & {
id: "minimax-m3";
provider: "opencode";
};
"nemotron-3-ultra-free": Model<"openai-completions"> & {
id: "nemotron-3-ultra-free";
provider: "opencode";
};
"north-mini-code-free": Model<"openai-completions"> & {
id: "north-mini-code-free";
provider: "opencode";
};
"qwen3.5-plus": Model<"anthropic-messages"> & {
id: "qwen3.5-plus";
provider: "opencode";
};
"qwen3.6-plus": Model<"anthropic-messages"> & {
id: "qwen3.6-plus";
provider: "opencode";
};
};
export const OPENCODE_MODELS: ModelCatalog<typeof values, "opencode"> =
flattenModelCatalog("opencode", values);
File diff suppressed because it is too large Load Diff
@@ -2,67 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/qwen-token-plan-cn.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const QWEN_TOKEN_PLAN_CN_MODELS = values as {
"MiniMax-M2.5": Model<"openai-completions"> & {
id: "MiniMax-M2.5";
provider: "qwen-token-plan-cn";
};
"deepseek-v3.2": Model<"openai-completions"> & {
id: "deepseek-v3.2";
provider: "qwen-token-plan-cn";
};
"deepseek-v4-flash": Model<"openai-completions"> & {
id: "deepseek-v4-flash";
provider: "qwen-token-plan-cn";
};
"deepseek-v4-pro": Model<"openai-completions"> & {
id: "deepseek-v4-pro";
provider: "qwen-token-plan-cn";
};
"glm-5": Model<"openai-completions"> & {
id: "glm-5";
provider: "qwen-token-plan-cn";
};
"glm-5.1": Model<"openai-completions"> & {
id: "glm-5.1";
provider: "qwen-token-plan-cn";
};
"glm-5.2": Model<"openai-completions"> & {
id: "glm-5.2";
provider: "qwen-token-plan-cn";
};
"kimi-k2.5": Model<"openai-completions"> & {
id: "kimi-k2.5";
provider: "qwen-token-plan-cn";
};
"kimi-k2.6": Model<"openai-completions"> & {
id: "kimi-k2.6";
provider: "qwen-token-plan-cn";
};
"kimi-k2.7-code": Model<"openai-completions"> & {
id: "kimi-k2.7-code";
provider: "qwen-token-plan-cn";
};
"qwen3.6-flash": Model<"openai-completions"> & {
id: "qwen3.6-flash";
provider: "qwen-token-plan-cn";
};
"qwen3.6-plus": Model<"openai-completions"> & {
id: "qwen3.6-plus";
provider: "qwen-token-plan-cn";
};
"qwen3.7-max": Model<"openai-completions"> & {
id: "qwen3.7-max";
provider: "qwen-token-plan-cn";
};
"qwen3.7-plus": Model<"openai-completions"> & {
id: "qwen3.7-plus";
provider: "qwen-token-plan-cn";
};
"qwen3.8-max-preview": Model<"openai-completions"> & {
id: "qwen3.8-max-preview";
provider: "qwen-token-plan-cn";
};
};
export const QWEN_TOKEN_PLAN_CN_MODELS: ModelCatalog<typeof values, "qwen-token-plan-cn"> =
flattenModelCatalog("qwen-token-plan-cn", values);
@@ -2,67 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/qwen-token-plan.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const QWEN_TOKEN_PLAN_MODELS = values as {
"MiniMax-M2.5": Model<"openai-completions"> & {
id: "MiniMax-M2.5";
provider: "qwen-token-plan";
};
"deepseek-v3.2": Model<"openai-completions"> & {
id: "deepseek-v3.2";
provider: "qwen-token-plan";
};
"deepseek-v4-flash": Model<"openai-completions"> & {
id: "deepseek-v4-flash";
provider: "qwen-token-plan";
};
"deepseek-v4-pro": Model<"openai-completions"> & {
id: "deepseek-v4-pro";
provider: "qwen-token-plan";
};
"glm-5": Model<"openai-completions"> & {
id: "glm-5";
provider: "qwen-token-plan";
};
"glm-5.1": Model<"openai-completions"> & {
id: "glm-5.1";
provider: "qwen-token-plan";
};
"glm-5.2": Model<"openai-completions"> & {
id: "glm-5.2";
provider: "qwen-token-plan";
};
"kimi-k2.5": Model<"openai-completions"> & {
id: "kimi-k2.5";
provider: "qwen-token-plan";
};
"kimi-k2.6": Model<"openai-completions"> & {
id: "kimi-k2.6";
provider: "qwen-token-plan";
};
"kimi-k2.7-code": Model<"openai-completions"> & {
id: "kimi-k2.7-code";
provider: "qwen-token-plan";
};
"qwen3.6-flash": Model<"openai-completions"> & {
id: "qwen3.6-flash";
provider: "qwen-token-plan";
};
"qwen3.6-plus": Model<"openai-completions"> & {
id: "qwen3.6-plus";
provider: "qwen-token-plan";
};
"qwen3.7-max": Model<"openai-completions"> & {
id: "qwen3.7-max";
provider: "qwen-token-plan";
};
"qwen3.7-plus": Model<"openai-completions"> & {
id: "qwen3.7-plus";
provider: "qwen-token-plan";
};
"qwen3.8-max-preview": Model<"openai-completions"> & {
id: "qwen3.8-max-preview";
provider: "qwen-token-plan";
};
};
export const QWEN_TOKEN_PLAN_MODELS: ModelCatalog<typeof values, "qwen-token-plan"> =
flattenModelCatalog("qwen-token-plan", values);
+3 -67
View File
@@ -2,71 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/together.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const TOGETHER_MODELS = values as {
"MiniMaxAI/MiniMax-M2.7": Model<"openai-completions"> & {
id: "MiniMaxAI/MiniMax-M2.7";
provider: "together";
};
"MiniMaxAI/MiniMax-M3": Model<"openai-completions"> & {
id: "MiniMaxAI/MiniMax-M3";
provider: "together";
};
"Qwen/Qwen2.5-7B-Instruct-Turbo": Model<"openai-completions"> & {
id: "Qwen/Qwen2.5-7B-Instruct-Turbo";
provider: "together";
};
"Qwen/Qwen3.5-9B": Model<"openai-completions"> & {
id: "Qwen/Qwen3.5-9B";
provider: "together";
};
"Qwen/Qwen3.6-Plus": Model<"openai-completions"> & {
id: "Qwen/Qwen3.6-Plus";
provider: "together";
};
"Qwen/Qwen3.7-Max": Model<"openai-completions"> & {
id: "Qwen/Qwen3.7-Max";
provider: "together";
};
"deepseek-ai/DeepSeek-V4-Pro": Model<"openai-completions"> & {
id: "deepseek-ai/DeepSeek-V4-Pro";
provider: "together";
};
"google/gemma-4-31B-it": Model<"openai-completions"> & {
id: "google/gemma-4-31B-it";
provider: "together";
};
"meta-llama/Llama-3.3-70B-Instruct-Turbo": Model<"openai-completions"> & {
id: "meta-llama/Llama-3.3-70B-Instruct-Turbo";
provider: "together";
};
"moonshotai/Kimi-K2.6": Model<"openai-completions"> & {
id: "moonshotai/Kimi-K2.6";
provider: "together";
};
"moonshotai/Kimi-K2.7-Code": Model<"openai-completions"> & {
id: "moonshotai/Kimi-K2.7-Code";
provider: "together";
};
"nvidia/nemotron-3-ultra-550b-a55b": Model<"openai-completions"> & {
id: "nvidia/nemotron-3-ultra-550b-a55b";
provider: "together";
};
"openai/gpt-oss-120b": Model<"openai-completions"> & {
id: "openai/gpt-oss-120b";
provider: "together";
};
"openai/gpt-oss-20b": Model<"openai-completions"> & {
id: "openai/gpt-oss-20b";
provider: "together";
};
"thinkingmachines/Inkling": Model<"openai-completions"> & {
id: "thinkingmachines/Inkling";
provider: "together";
};
"zai-org/GLM-5.2": Model<"openai-completions"> & {
id: "zai-org/GLM-5.2";
provider: "together";
};
};
export const TOGETHER_MODELS: ModelCatalog<typeof values, "together"> =
flattenModelCatalog("together", values);
@@ -2,775 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/vercel-ai-gateway.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const VERCEL_AI_GATEWAY_MODELS = values as {
"alibaba/qwen-3-14b": Model<"anthropic-messages"> & {
id: "alibaba/qwen-3-14b";
provider: "vercel-ai-gateway";
};
"alibaba/qwen-3-235b": Model<"anthropic-messages"> & {
id: "alibaba/qwen-3-235b";
provider: "vercel-ai-gateway";
};
"alibaba/qwen-3-30b": Model<"anthropic-messages"> & {
id: "alibaba/qwen-3-30b";
provider: "vercel-ai-gateway";
};
"alibaba/qwen-3-32b": Model<"anthropic-messages"> & {
id: "alibaba/qwen-3-32b";
provider: "vercel-ai-gateway";
};
"alibaba/qwen-3.6-max-preview": Model<"anthropic-messages"> & {
id: "alibaba/qwen-3.6-max-preview";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3-235b-a22b-thinking": Model<"anthropic-messages"> & {
id: "alibaba/qwen3-235b-a22b-thinking";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3-coder": Model<"anthropic-messages"> & {
id: "alibaba/qwen3-coder";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3-coder-30b-a3b": Model<"anthropic-messages"> & {
id: "alibaba/qwen3-coder-30b-a3b";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3-coder-next": Model<"anthropic-messages"> & {
id: "alibaba/qwen3-coder-next";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3-coder-plus": Model<"anthropic-messages"> & {
id: "alibaba/qwen3-coder-plus";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3-max": Model<"anthropic-messages"> & {
id: "alibaba/qwen3-max";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3-max-preview": Model<"anthropic-messages"> & {
id: "alibaba/qwen3-max-preview";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3-max-thinking": Model<"anthropic-messages"> & {
id: "alibaba/qwen3-max-thinking";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3-next-80b-a3b-instruct": Model<"anthropic-messages"> & {
id: "alibaba/qwen3-next-80b-a3b-instruct";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3-next-80b-a3b-thinking": Model<"anthropic-messages"> & {
id: "alibaba/qwen3-next-80b-a3b-thinking";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3-vl-235b-a22b-instruct": Model<"anthropic-messages"> & {
id: "alibaba/qwen3-vl-235b-a22b-instruct";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3-vl-instruct": Model<"anthropic-messages"> & {
id: "alibaba/qwen3-vl-instruct";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3-vl-thinking": Model<"anthropic-messages"> & {
id: "alibaba/qwen3-vl-thinking";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3.5-flash": Model<"anthropic-messages"> & {
id: "alibaba/qwen3.5-flash";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3.5-plus": Model<"anthropic-messages"> & {
id: "alibaba/qwen3.5-plus";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3.6-27b": Model<"anthropic-messages"> & {
id: "alibaba/qwen3.6-27b";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3.6-plus": Model<"anthropic-messages"> & {
id: "alibaba/qwen3.6-plus";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3.7-max": Model<"anthropic-messages"> & {
id: "alibaba/qwen3.7-max";
provider: "vercel-ai-gateway";
};
"alibaba/qwen3.7-plus": Model<"anthropic-messages"> & {
id: "alibaba/qwen3.7-plus";
provider: "vercel-ai-gateway";
};
"amazon/nova-2-lite": Model<"anthropic-messages"> & {
id: "amazon/nova-2-lite";
provider: "vercel-ai-gateway";
};
"amazon/nova-lite": Model<"anthropic-messages"> & {
id: "amazon/nova-lite";
provider: "vercel-ai-gateway";
};
"amazon/nova-micro": Model<"anthropic-messages"> & {
id: "amazon/nova-micro";
provider: "vercel-ai-gateway";
};
"amazon/nova-pro": Model<"anthropic-messages"> & {
id: "amazon/nova-pro";
provider: "vercel-ai-gateway";
};
"anthropic/claude-3-haiku": Model<"anthropic-messages"> & {
id: "anthropic/claude-3-haiku";
provider: "vercel-ai-gateway";
};
"anthropic/claude-fable-5": Model<"anthropic-messages"> & {
id: "anthropic/claude-fable-5";
provider: "vercel-ai-gateway";
};
"anthropic/claude-haiku-4.5": Model<"anthropic-messages"> & {
id: "anthropic/claude-haiku-4.5";
provider: "vercel-ai-gateway";
};
"anthropic/claude-opus-4": Model<"anthropic-messages"> & {
id: "anthropic/claude-opus-4";
provider: "vercel-ai-gateway";
};
"anthropic/claude-opus-4.1": Model<"anthropic-messages"> & {
id: "anthropic/claude-opus-4.1";
provider: "vercel-ai-gateway";
};
"anthropic/claude-opus-4.5": Model<"anthropic-messages"> & {
id: "anthropic/claude-opus-4.5";
provider: "vercel-ai-gateway";
};
"anthropic/claude-opus-4.6": Model<"anthropic-messages"> & {
id: "anthropic/claude-opus-4.6";
provider: "vercel-ai-gateway";
};
"anthropic/claude-opus-4.7": Model<"anthropic-messages"> & {
id: "anthropic/claude-opus-4.7";
provider: "vercel-ai-gateway";
};
"anthropic/claude-opus-4.7-fast": Model<"anthropic-messages"> & {
id: "anthropic/claude-opus-4.7-fast";
provider: "vercel-ai-gateway";
};
"anthropic/claude-opus-4.8": Model<"anthropic-messages"> & {
id: "anthropic/claude-opus-4.8";
provider: "vercel-ai-gateway";
};
"anthropic/claude-opus-4.8-fast": Model<"anthropic-messages"> & {
id: "anthropic/claude-opus-4.8-fast";
provider: "vercel-ai-gateway";
};
"anthropic/claude-sonnet-4": Model<"anthropic-messages"> & {
id: "anthropic/claude-sonnet-4";
provider: "vercel-ai-gateway";
};
"anthropic/claude-sonnet-4.5": Model<"anthropic-messages"> & {
id: "anthropic/claude-sonnet-4.5";
provider: "vercel-ai-gateway";
};
"anthropic/claude-sonnet-4.6": Model<"anthropic-messages"> & {
id: "anthropic/claude-sonnet-4.6";
provider: "vercel-ai-gateway";
};
"anthropic/claude-sonnet-5": Model<"anthropic-messages"> & {
id: "anthropic/claude-sonnet-5";
provider: "vercel-ai-gateway";
};
"arcee-ai/trinity-large-thinking": Model<"anthropic-messages"> & {
id: "arcee-ai/trinity-large-thinking";
provider: "vercel-ai-gateway";
};
"arcee-ai/trinity-mini": Model<"anthropic-messages"> & {
id: "arcee-ai/trinity-mini";
provider: "vercel-ai-gateway";
};
"bytedance/seed-1.6": Model<"anthropic-messages"> & {
id: "bytedance/seed-1.6";
provider: "vercel-ai-gateway";
};
"bytedance/seed-1.8": Model<"anthropic-messages"> & {
id: "bytedance/seed-1.8";
provider: "vercel-ai-gateway";
};
"cohere/command-a": Model<"anthropic-messages"> & {
id: "cohere/command-a";
provider: "vercel-ai-gateway";
};
"deepseek/deepseek-r1": Model<"anthropic-messages"> & {
id: "deepseek/deepseek-r1";
provider: "vercel-ai-gateway";
};
"deepseek/deepseek-v3": Model<"anthropic-messages"> & {
id: "deepseek/deepseek-v3";
provider: "vercel-ai-gateway";
};
"deepseek/deepseek-v3.1": Model<"anthropic-messages"> & {
id: "deepseek/deepseek-v3.1";
provider: "vercel-ai-gateway";
};
"deepseek/deepseek-v3.1-terminus": Model<"anthropic-messages"> & {
id: "deepseek/deepseek-v3.1-terminus";
provider: "vercel-ai-gateway";
};
"deepseek/deepseek-v3.2": Model<"anthropic-messages"> & {
id: "deepseek/deepseek-v3.2";
provider: "vercel-ai-gateway";
};
"deepseek/deepseek-v3.2-thinking": Model<"anthropic-messages"> & {
id: "deepseek/deepseek-v3.2-thinking";
provider: "vercel-ai-gateway";
};
"deepseek/deepseek-v4-flash": Model<"anthropic-messages"> & {
id: "deepseek/deepseek-v4-flash";
provider: "vercel-ai-gateway";
};
"deepseek/deepseek-v4-pro": Model<"anthropic-messages"> & {
id: "deepseek/deepseek-v4-pro";
provider: "vercel-ai-gateway";
};
"google/gemini-2.5-flash": Model<"anthropic-messages"> & {
id: "google/gemini-2.5-flash";
provider: "vercel-ai-gateway";
};
"google/gemini-2.5-flash-lite": Model<"anthropic-messages"> & {
id: "google/gemini-2.5-flash-lite";
provider: "vercel-ai-gateway";
};
"google/gemini-2.5-pro": Model<"anthropic-messages"> & {
id: "google/gemini-2.5-pro";
provider: "vercel-ai-gateway";
};
"google/gemini-3-flash": Model<"anthropic-messages"> & {
id: "google/gemini-3-flash";
provider: "vercel-ai-gateway";
};
"google/gemini-3-pro-preview": Model<"anthropic-messages"> & {
id: "google/gemini-3-pro-preview";
provider: "vercel-ai-gateway";
};
"google/gemini-3.1-flash-lite": Model<"anthropic-messages"> & {
id: "google/gemini-3.1-flash-lite";
provider: "vercel-ai-gateway";
};
"google/gemini-3.1-flash-lite-preview": Model<"anthropic-messages"> & {
id: "google/gemini-3.1-flash-lite-preview";
provider: "vercel-ai-gateway";
};
"google/gemini-3.1-pro-preview": Model<"anthropic-messages"> & {
id: "google/gemini-3.1-pro-preview";
provider: "vercel-ai-gateway";
};
"google/gemini-3.5-flash": Model<"anthropic-messages"> & {
id: "google/gemini-3.5-flash";
provider: "vercel-ai-gateway";
};
"google/gemini-3.5-flash-lite": Model<"anthropic-messages"> & {
id: "google/gemini-3.5-flash-lite";
provider: "vercel-ai-gateway";
};
"google/gemini-3.6-flash": Model<"anthropic-messages"> & {
id: "google/gemini-3.6-flash";
provider: "vercel-ai-gateway";
};
"google/gemma-4-26b-a4b-it": Model<"anthropic-messages"> & {
id: "google/gemma-4-26b-a4b-it";
provider: "vercel-ai-gateway";
};
"google/gemma-4-31b-it": Model<"anthropic-messages"> & {
id: "google/gemma-4-31b-it";
provider: "vercel-ai-gateway";
};
"inception/mercury-2": Model<"anthropic-messages"> & {
id: "inception/mercury-2";
provider: "vercel-ai-gateway";
};
"inception/mercury-coder-small": Model<"anthropic-messages"> & {
id: "inception/mercury-coder-small";
provider: "vercel-ai-gateway";
};
"interfaze/interfaze-beta": Model<"anthropic-messages"> & {
id: "interfaze/interfaze-beta";
provider: "vercel-ai-gateway";
};
"kwaipilot/kat-coder-air-v2.5": Model<"anthropic-messages"> & {
id: "kwaipilot/kat-coder-air-v2.5";
provider: "vercel-ai-gateway";
};
"kwaipilot/kat-coder-pro-v1": Model<"anthropic-messages"> & {
id: "kwaipilot/kat-coder-pro-v1";
provider: "vercel-ai-gateway";
};
"kwaipilot/kat-coder-pro-v2": Model<"anthropic-messages"> & {
id: "kwaipilot/kat-coder-pro-v2";
provider: "vercel-ai-gateway";
};
"kwaipilot/kat-coder-pro-v2.5": Model<"anthropic-messages"> & {
id: "kwaipilot/kat-coder-pro-v2.5";
provider: "vercel-ai-gateway";
};
"meta/llama-3.1-70b": Model<"anthropic-messages"> & {
id: "meta/llama-3.1-70b";
provider: "vercel-ai-gateway";
};
"meta/llama-3.1-8b": Model<"anthropic-messages"> & {
id: "meta/llama-3.1-8b";
provider: "vercel-ai-gateway";
};
"meta/llama-3.3-70b": Model<"anthropic-messages"> & {
id: "meta/llama-3.3-70b";
provider: "vercel-ai-gateway";
};
"meta/llama-4-maverick": Model<"anthropic-messages"> & {
id: "meta/llama-4-maverick";
provider: "vercel-ai-gateway";
};
"meta/llama-4-scout": Model<"anthropic-messages"> & {
id: "meta/llama-4-scout";
provider: "vercel-ai-gateway";
};
"meta/muse-spark-1.1": Model<"anthropic-messages"> & {
id: "meta/muse-spark-1.1";
provider: "vercel-ai-gateway";
};
"minimax/minimax-m2": Model<"anthropic-messages"> & {
id: "minimax/minimax-m2";
provider: "vercel-ai-gateway";
};
"minimax/minimax-m2.1": Model<"anthropic-messages"> & {
id: "minimax/minimax-m2.1";
provider: "vercel-ai-gateway";
};
"minimax/minimax-m2.1-lightning": Model<"anthropic-messages"> & {
id: "minimax/minimax-m2.1-lightning";
provider: "vercel-ai-gateway";
};
"minimax/minimax-m2.5": Model<"anthropic-messages"> & {
id: "minimax/minimax-m2.5";
provider: "vercel-ai-gateway";
};
"minimax/minimax-m2.5-highspeed": Model<"anthropic-messages"> & {
id: "minimax/minimax-m2.5-highspeed";
provider: "vercel-ai-gateway";
};
"minimax/minimax-m2.7": Model<"anthropic-messages"> & {
id: "minimax/minimax-m2.7";
provider: "vercel-ai-gateway";
};
"minimax/minimax-m2.7-highspeed": Model<"anthropic-messages"> & {
id: "minimax/minimax-m2.7-highspeed";
provider: "vercel-ai-gateway";
};
"minimax/minimax-m3": Model<"anthropic-messages"> & {
id: "minimax/minimax-m3";
provider: "vercel-ai-gateway";
};
"mistral/codestral": Model<"anthropic-messages"> & {
id: "mistral/codestral";
provider: "vercel-ai-gateway";
};
"mistral/devstral-2": Model<"anthropic-messages"> & {
id: "mistral/devstral-2";
provider: "vercel-ai-gateway";
};
"mistral/devstral-small-2": Model<"anthropic-messages"> & {
id: "mistral/devstral-small-2";
provider: "vercel-ai-gateway";
};
"mistral/magistral-medium": Model<"anthropic-messages"> & {
id: "mistral/magistral-medium";
provider: "vercel-ai-gateway";
};
"mistral/magistral-small": Model<"anthropic-messages"> & {
id: "mistral/magistral-small";
provider: "vercel-ai-gateway";
};
"mistral/ministral-14b": Model<"anthropic-messages"> & {
id: "mistral/ministral-14b";
provider: "vercel-ai-gateway";
};
"mistral/ministral-3b": Model<"anthropic-messages"> & {
id: "mistral/ministral-3b";
provider: "vercel-ai-gateway";
};
"mistral/ministral-8b": Model<"anthropic-messages"> & {
id: "mistral/ministral-8b";
provider: "vercel-ai-gateway";
};
"mistral/mistral-large-3": Model<"anthropic-messages"> & {
id: "mistral/mistral-large-3";
provider: "vercel-ai-gateway";
};
"mistral/mistral-medium": Model<"anthropic-messages"> & {
id: "mistral/mistral-medium";
provider: "vercel-ai-gateway";
};
"mistral/mistral-medium-3.5": Model<"anthropic-messages"> & {
id: "mistral/mistral-medium-3.5";
provider: "vercel-ai-gateway";
};
"mistral/mistral-nemo": Model<"anthropic-messages"> & {
id: "mistral/mistral-nemo";
provider: "vercel-ai-gateway";
};
"mistral/mistral-small": Model<"anthropic-messages"> & {
id: "mistral/mistral-small";
provider: "vercel-ai-gateway";
};
"mistral/pixtral-12b": Model<"anthropic-messages"> & {
id: "mistral/pixtral-12b";
provider: "vercel-ai-gateway";
};
"moonshotai/kimi-k2": Model<"anthropic-messages"> & {
id: "moonshotai/kimi-k2";
provider: "vercel-ai-gateway";
};
"moonshotai/kimi-k2-thinking": Model<"anthropic-messages"> & {
id: "moonshotai/kimi-k2-thinking";
provider: "vercel-ai-gateway";
};
"moonshotai/kimi-k2.5": Model<"anthropic-messages"> & {
id: "moonshotai/kimi-k2.5";
provider: "vercel-ai-gateway";
};
"moonshotai/kimi-k2.6": Model<"anthropic-messages"> & {
id: "moonshotai/kimi-k2.6";
provider: "vercel-ai-gateway";
};
"moonshotai/kimi-k2.7-code": Model<"anthropic-messages"> & {
id: "moonshotai/kimi-k2.7-code";
provider: "vercel-ai-gateway";
};
"moonshotai/kimi-k2.7-code-highspeed": Model<"anthropic-messages"> & {
id: "moonshotai/kimi-k2.7-code-highspeed";
provider: "vercel-ai-gateway";
};
"moonshotai/kimi-k3": Model<"anthropic-messages"> & {
id: "moonshotai/kimi-k3";
provider: "vercel-ai-gateway";
};
"nvidia/nemotron-3-nano-30b-a3b": Model<"anthropic-messages"> & {
id: "nvidia/nemotron-3-nano-30b-a3b";
provider: "vercel-ai-gateway";
};
"nvidia/nemotron-3-super-120b-a12b": Model<"anthropic-messages"> & {
id: "nvidia/nemotron-3-super-120b-a12b";
provider: "vercel-ai-gateway";
};
"nvidia/nemotron-3-ultra-550b-a55b": Model<"anthropic-messages"> & {
id: "nvidia/nemotron-3-ultra-550b-a55b";
provider: "vercel-ai-gateway";
};
"nvidia/nemotron-nano-12b-v2-vl": Model<"anthropic-messages"> & {
id: "nvidia/nemotron-nano-12b-v2-vl";
provider: "vercel-ai-gateway";
};
"nvidia/nemotron-nano-9b-v2": Model<"anthropic-messages"> & {
id: "nvidia/nemotron-nano-9b-v2";
provider: "vercel-ai-gateway";
};
"openai/gpt-3.5-turbo": Model<"anthropic-messages"> & {
id: "openai/gpt-3.5-turbo";
provider: "vercel-ai-gateway";
};
"openai/gpt-4-turbo": Model<"anthropic-messages"> & {
id: "openai/gpt-4-turbo";
provider: "vercel-ai-gateway";
};
"openai/gpt-4.1": Model<"anthropic-messages"> & {
id: "openai/gpt-4.1";
provider: "vercel-ai-gateway";
};
"openai/gpt-4.1-mini": Model<"anthropic-messages"> & {
id: "openai/gpt-4.1-mini";
provider: "vercel-ai-gateway";
};
"openai/gpt-4.1-nano": Model<"anthropic-messages"> & {
id: "openai/gpt-4.1-nano";
provider: "vercel-ai-gateway";
};
"openai/gpt-4o": Model<"anthropic-messages"> & {
id: "openai/gpt-4o";
provider: "vercel-ai-gateway";
};
"openai/gpt-4o-mini": Model<"anthropic-messages"> & {
id: "openai/gpt-4o-mini";
provider: "vercel-ai-gateway";
};
"openai/gpt-5": Model<"anthropic-messages"> & {
id: "openai/gpt-5";
provider: "vercel-ai-gateway";
};
"openai/gpt-5-chat": Model<"anthropic-messages"> & {
id: "openai/gpt-5-chat";
provider: "vercel-ai-gateway";
};
"openai/gpt-5-codex": Model<"anthropic-messages"> & {
id: "openai/gpt-5-codex";
provider: "vercel-ai-gateway";
};
"openai/gpt-5-mini": Model<"anthropic-messages"> & {
id: "openai/gpt-5-mini";
provider: "vercel-ai-gateway";
};
"openai/gpt-5-nano": Model<"anthropic-messages"> & {
id: "openai/gpt-5-nano";
provider: "vercel-ai-gateway";
};
"openai/gpt-5-pro": Model<"anthropic-messages"> & {
id: "openai/gpt-5-pro";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.1-codex": Model<"anthropic-messages"> & {
id: "openai/gpt-5.1-codex";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.1-codex-max": Model<"anthropic-messages"> & {
id: "openai/gpt-5.1-codex-max";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.1-codex-mini": Model<"anthropic-messages"> & {
id: "openai/gpt-5.1-codex-mini";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.1-instant": Model<"anthropic-messages"> & {
id: "openai/gpt-5.1-instant";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.1-thinking": Model<"anthropic-messages"> & {
id: "openai/gpt-5.1-thinking";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.2": Model<"anthropic-messages"> & {
id: "openai/gpt-5.2";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.2-chat": Model<"anthropic-messages"> & {
id: "openai/gpt-5.2-chat";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.2-codex": Model<"anthropic-messages"> & {
id: "openai/gpt-5.2-codex";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.2-pro": Model<"anthropic-messages"> & {
id: "openai/gpt-5.2-pro";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.3-chat": Model<"anthropic-messages"> & {
id: "openai/gpt-5.3-chat";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.3-codex": Model<"anthropic-messages"> & {
id: "openai/gpt-5.3-codex";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.4": Model<"anthropic-messages"> & {
id: "openai/gpt-5.4";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.4-mini": Model<"anthropic-messages"> & {
id: "openai/gpt-5.4-mini";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.4-nano": Model<"anthropic-messages"> & {
id: "openai/gpt-5.4-nano";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.4-pro": Model<"anthropic-messages"> & {
id: "openai/gpt-5.4-pro";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.5": Model<"anthropic-messages"> & {
id: "openai/gpt-5.5";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.5-pro": Model<"anthropic-messages"> & {
id: "openai/gpt-5.5-pro";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.6-luna": Model<"anthropic-messages"> & {
id: "openai/gpt-5.6-luna";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.6-sol": Model<"anthropic-messages"> & {
id: "openai/gpt-5.6-sol";
provider: "vercel-ai-gateway";
};
"openai/gpt-5.6-terra": Model<"anthropic-messages"> & {
id: "openai/gpt-5.6-terra";
provider: "vercel-ai-gateway";
};
"openai/gpt-oss-120b": Model<"anthropic-messages"> & {
id: "openai/gpt-oss-120b";
provider: "vercel-ai-gateway";
};
"openai/gpt-oss-20b": Model<"anthropic-messages"> & {
id: "openai/gpt-oss-20b";
provider: "vercel-ai-gateway";
};
"openai/gpt-oss-safeguard-20b": Model<"anthropic-messages"> & {
id: "openai/gpt-oss-safeguard-20b";
provider: "vercel-ai-gateway";
};
"openai/o1": Model<"anthropic-messages"> & {
id: "openai/o1";
provider: "vercel-ai-gateway";
};
"openai/o3": Model<"anthropic-messages"> & {
id: "openai/o3";
provider: "vercel-ai-gateway";
};
"openai/o3-deep-research": Model<"anthropic-messages"> & {
id: "openai/o3-deep-research";
provider: "vercel-ai-gateway";
};
"openai/o3-mini": Model<"anthropic-messages"> & {
id: "openai/o3-mini";
provider: "vercel-ai-gateway";
};
"openai/o3-pro": Model<"anthropic-messages"> & {
id: "openai/o3-pro";
provider: "vercel-ai-gateway";
};
"openai/o4-mini": Model<"anthropic-messages"> & {
id: "openai/o4-mini";
provider: "vercel-ai-gateway";
};
"poolside/laguna-s-2.1": Model<"anthropic-messages"> & {
id: "poolside/laguna-s-2.1";
provider: "vercel-ai-gateway";
};
"poolside/laguna-s-2.1-free": Model<"anthropic-messages"> & {
id: "poolside/laguna-s-2.1-free";
provider: "vercel-ai-gateway";
};
"sakana/fugu-ultra": Model<"anthropic-messages"> & {
id: "sakana/fugu-ultra";
provider: "vercel-ai-gateway";
};
"stepfun/step-3.5-flash": Model<"anthropic-messages"> & {
id: "stepfun/step-3.5-flash";
provider: "vercel-ai-gateway";
};
"stepfun/step-3.7-flash": Model<"anthropic-messages"> & {
id: "stepfun/step-3.7-flash";
provider: "vercel-ai-gateway";
};
"thinkingmachines/inkling": Model<"anthropic-messages"> & {
id: "thinkingmachines/inkling";
provider: "vercel-ai-gateway";
};
"xai/grok-4.1-fast-non-reasoning": Model<"anthropic-messages"> & {
id: "xai/grok-4.1-fast-non-reasoning";
provider: "vercel-ai-gateway";
};
"xai/grok-4.1-fast-reasoning": Model<"anthropic-messages"> & {
id: "xai/grok-4.1-fast-reasoning";
provider: "vercel-ai-gateway";
};
"xai/grok-4.20-multi-agent": Model<"anthropic-messages"> & {
id: "xai/grok-4.20-multi-agent";
provider: "vercel-ai-gateway";
};
"xai/grok-4.20-multi-agent-beta": Model<"anthropic-messages"> & {
id: "xai/grok-4.20-multi-agent-beta";
provider: "vercel-ai-gateway";
};
"xai/grok-4.20-non-reasoning": Model<"anthropic-messages"> & {
id: "xai/grok-4.20-non-reasoning";
provider: "vercel-ai-gateway";
};
"xai/grok-4.20-non-reasoning-beta": Model<"anthropic-messages"> & {
id: "xai/grok-4.20-non-reasoning-beta";
provider: "vercel-ai-gateway";
};
"xai/grok-4.20-reasoning": Model<"anthropic-messages"> & {
id: "xai/grok-4.20-reasoning";
provider: "vercel-ai-gateway";
};
"xai/grok-4.20-reasoning-beta": Model<"anthropic-messages"> & {
id: "xai/grok-4.20-reasoning-beta";
provider: "vercel-ai-gateway";
};
"xai/grok-4.3": Model<"anthropic-messages"> & {
id: "xai/grok-4.3";
provider: "vercel-ai-gateway";
};
"xai/grok-4.5": Model<"anthropic-messages"> & {
id: "xai/grok-4.5";
provider: "vercel-ai-gateway";
};
"xai/grok-build-0.1": Model<"anthropic-messages"> & {
id: "xai/grok-build-0.1";
provider: "vercel-ai-gateway";
};
"xiaomi/mimo-v2.5": Model<"anthropic-messages"> & {
id: "xiaomi/mimo-v2.5";
provider: "vercel-ai-gateway";
};
"xiaomi/mimo-v2.5-pro": Model<"anthropic-messages"> & {
id: "xiaomi/mimo-v2.5-pro";
provider: "vercel-ai-gateway";
};
"zai/glm-4.5": Model<"anthropic-messages"> & {
id: "zai/glm-4.5";
provider: "vercel-ai-gateway";
};
"zai/glm-4.5-air": Model<"anthropic-messages"> & {
id: "zai/glm-4.5-air";
provider: "vercel-ai-gateway";
};
"zai/glm-4.5v": Model<"anthropic-messages"> & {
id: "zai/glm-4.5v";
provider: "vercel-ai-gateway";
};
"zai/glm-4.6": Model<"anthropic-messages"> & {
id: "zai/glm-4.6";
provider: "vercel-ai-gateway";
};
"zai/glm-4.6v": Model<"anthropic-messages"> & {
id: "zai/glm-4.6v";
provider: "vercel-ai-gateway";
};
"zai/glm-4.6v-flash": Model<"anthropic-messages"> & {
id: "zai/glm-4.6v-flash";
provider: "vercel-ai-gateway";
};
"zai/glm-4.7": Model<"anthropic-messages"> & {
id: "zai/glm-4.7";
provider: "vercel-ai-gateway";
};
"zai/glm-4.7-flash": Model<"anthropic-messages"> & {
id: "zai/glm-4.7-flash";
provider: "vercel-ai-gateway";
};
"zai/glm-4.7-flashx": Model<"anthropic-messages"> & {
id: "zai/glm-4.7-flashx";
provider: "vercel-ai-gateway";
};
"zai/glm-5": Model<"anthropic-messages"> & {
id: "zai/glm-5";
provider: "vercel-ai-gateway";
};
"zai/glm-5-turbo": Model<"anthropic-messages"> & {
id: "zai/glm-5-turbo";
provider: "vercel-ai-gateway";
};
"zai/glm-5.1": Model<"anthropic-messages"> & {
id: "zai/glm-5.1";
provider: "vercel-ai-gateway";
};
"zai/glm-5.2": Model<"anthropic-messages"> & {
id: "zai/glm-5.2";
provider: "vercel-ai-gateway";
};
"zai/glm-5.2-fast": Model<"anthropic-messages"> & {
id: "zai/glm-5.2-fast";
provider: "vercel-ai-gateway";
};
"zai/glm-5v-turbo": Model<"anthropic-messages"> & {
id: "zai/glm-5v-turbo";
provider: "vercel-ai-gateway";
};
};
export const VERCEL_AI_GATEWAY_MODELS: ModelCatalog<typeof values, "vercel-ai-gateway"> =
flattenModelCatalog("vercel-ai-gateway", values);
+3 -15
View File
@@ -2,19 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/xai.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const XAI_MODELS = values as {
"grok-4.3": Model<"openai-completions"> & {
id: "grok-4.3";
provider: "xai";
};
"grok-4.5": Model<"openai-responses"> & {
id: "grok-4.5";
provider: "xai";
};
"grok-build-0.1": Model<"openai-completions"> & {
id: "grok-build-0.1";
provider: "xai";
};
};
export const XAI_MODELS: ModelCatalog<typeof values, "xai"> =
flattenModelCatalog("xai", values);
@@ -2,19 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/xiaomi-token-plan-ams.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const XIAOMI_TOKEN_PLAN_AMS_MODELS = values as {
"mimo-v2-pro": Model<"openai-completions"> & {
id: "mimo-v2-pro";
provider: "xiaomi-token-plan-ams";
};
"mimo-v2.5": Model<"openai-completions"> & {
id: "mimo-v2.5";
provider: "xiaomi-token-plan-ams";
};
"mimo-v2.5-pro": Model<"openai-completions"> & {
id: "mimo-v2.5-pro";
provider: "xiaomi-token-plan-ams";
};
};
export const XIAOMI_TOKEN_PLAN_AMS_MODELS: ModelCatalog<typeof values, "xiaomi-token-plan-ams"> =
flattenModelCatalog("xiaomi-token-plan-ams", values);
@@ -2,19 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/xiaomi-token-plan-cn.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const XIAOMI_TOKEN_PLAN_CN_MODELS = values as {
"mimo-v2-pro": Model<"openai-completions"> & {
id: "mimo-v2-pro";
provider: "xiaomi-token-plan-cn";
};
"mimo-v2.5": Model<"openai-completions"> & {
id: "mimo-v2.5";
provider: "xiaomi-token-plan-cn";
};
"mimo-v2.5-pro": Model<"openai-completions"> & {
id: "mimo-v2.5-pro";
provider: "xiaomi-token-plan-cn";
};
};
export const XIAOMI_TOKEN_PLAN_CN_MODELS: ModelCatalog<typeof values, "xiaomi-token-plan-cn"> =
flattenModelCatalog("xiaomi-token-plan-cn", values);
@@ -2,19 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/xiaomi-token-plan-sgp.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const XIAOMI_TOKEN_PLAN_SGP_MODELS = values as {
"mimo-v2-pro": Model<"openai-completions"> & {
id: "mimo-v2-pro";
provider: "xiaomi-token-plan-sgp";
};
"mimo-v2.5": Model<"openai-completions"> & {
id: "mimo-v2.5";
provider: "xiaomi-token-plan-sgp";
};
"mimo-v2.5-pro": Model<"openai-completions"> & {
id: "mimo-v2.5-pro";
provider: "xiaomi-token-plan-sgp";
};
};
export const XIAOMI_TOKEN_PLAN_SGP_MODELS: ModelCatalog<typeof values, "xiaomi-token-plan-sgp"> =
flattenModelCatalog("xiaomi-token-plan-sgp", values);
+3 -27
View File
@@ -2,31 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/xiaomi.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const XIAOMI_MODELS = values as {
"mimo-v2-flash": Model<"openai-completions"> & {
id: "mimo-v2-flash";
provider: "xiaomi";
};
"mimo-v2-omni": Model<"openai-completions"> & {
id: "mimo-v2-omni";
provider: "xiaomi";
};
"mimo-v2-pro": Model<"openai-completions"> & {
id: "mimo-v2-pro";
provider: "xiaomi";
};
"mimo-v2.5": Model<"openai-completions"> & {
id: "mimo-v2.5";
provider: "xiaomi";
};
"mimo-v2.5-pro": Model<"openai-completions"> & {
id: "mimo-v2.5-pro";
provider: "xiaomi";
};
"mimo-v2.5-pro-ultraspeed": Model<"openai-completions"> & {
id: "mimo-v2.5-pro-ultraspeed";
provider: "xiaomi";
};
};
export const XIAOMI_MODELS: ModelCatalog<typeof values, "xiaomi"> =
flattenModelCatalog("xiaomi", values);
@@ -2,31 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/zai-coding-cn.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const ZAI_CODING_CN_MODELS = values as {
"glm-4.5-air": Model<"openai-completions"> & {
id: "glm-4.5-air";
provider: "zai-coding-cn";
};
"glm-4.7": Model<"openai-completions"> & {
id: "glm-4.7";
provider: "zai-coding-cn";
};
"glm-5-turbo": Model<"openai-completions"> & {
id: "glm-5-turbo";
provider: "zai-coding-cn";
};
"glm-5.1": Model<"openai-completions"> & {
id: "glm-5.1";
provider: "zai-coding-cn";
};
"glm-5.2": Model<"openai-completions"> & {
id: "glm-5.2";
provider: "zai-coding-cn";
};
"glm-5v-turbo": Model<"openai-completions"> & {
id: "glm-5v-turbo";
provider: "zai-coding-cn";
};
};
export const ZAI_CODING_CN_MODELS: ModelCatalog<typeof values, "zai-coding-cn"> =
flattenModelCatalog("zai-coding-cn", values);
+3 -27
View File
@@ -2,31 +2,7 @@
// Do not edit manually - run 'npm run generate-models' to update
import values from "./data/zai.json" with { type: "json" };
import type { Model } from "../types.ts";
import { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";
export const ZAI_MODELS = values as {
"glm-4.5-air": Model<"openai-completions"> & {
id: "glm-4.5-air";
provider: "zai";
};
"glm-4.7": Model<"openai-completions"> & {
id: "glm-4.7";
provider: "zai";
};
"glm-5-turbo": Model<"openai-completions"> & {
id: "glm-5-turbo";
provider: "zai";
};
"glm-5.1": Model<"openai-completions"> & {
id: "glm-5.1";
provider: "zai";
};
"glm-5.2": Model<"openai-completions"> & {
id: "glm-5.2";
provider: "zai";
};
"glm-5v-turbo": Model<"openai-completions"> & {
id: "glm-5v-turbo";
provider: "zai";
};
};
export const ZAI_MODELS: ModelCatalog<typeof values, "zai"> =
flattenModelCatalog("zai", values);
@@ -0,0 +1,9 @@
import { expectTypeOf, it } from "vitest";
import { XAI_MODELS } from "../src/providers/xai.models.ts";
it("derives model API, ID, and provider literals from grouped model data", () => {
expectTypeOf(XAI_MODELS["grok-4.5"].api).toEqualTypeOf<"openai-responses">();
expectTypeOf(XAI_MODELS["grok-4.5"].id).toEqualTypeOf<"grok-4.5">();
expectTypeOf(XAI_MODELS["grok-4.5"].provider).toEqualTypeOf<"xai">();
expectTypeOf(XAI_MODELS["grok-4.3"].api).toEqualTypeOf<"openai-completions">();
});
+38 -7
View File
@@ -30,14 +30,18 @@ function createFixture(): {
mkdirSync(dataDir, { recursive: true });
writeFileSync(
join(packageRoot, "src", "models.generated.ts"),
'import { TEST_PROVIDER_MODELS } from "./providers/test-provider.models.ts";\n\nexport const MODELS = {\n\t"test-provider": TEST_PROVIDER_MODELS,\n} as const;\n',
'import { TEST_PROVIDER_MODELS } from "./providers/test-provider.models.ts";\n',
);
writeFileSync(
join(providersDir, "test-provider.models.ts"),
'// generated\n\nimport values from "./data/test-provider.json" with { type: "json" };\nimport type { Model } from "../types.ts";\n\nexport const TEST_PROVIDER_MODELS = values as {\n\t"model-a": Model<"openai-completions"> & {\n\t\tid: "model-a";\n\t\tprovider: "test-provider";\n\t};\n};\n',
'import values from "./data/test-provider.json" with { type: "json" };\nimport { flattenModelCatalog, type ModelCatalog } from "../model-catalog.ts";\n\nexport const TEST_PROVIDER_MODELS: ModelCatalog<typeof values, "test-provider"> =\n\tflattenModelCatalog("test-provider", values);\n',
);
const structure = readModelDataStructure(packageRoot);
const structure: ModelDataStructure = {
"test-provider": {
"model-a": "openai-completions",
},
};
const values: Record<string, unknown> = {
"model-a": {
id: "model-a",
@@ -61,9 +65,10 @@ function writeFixtureData(
structure: ModelDataStructure,
values: Record<string, unknown>,
manifestSchemaVersion = MODEL_DATA_SCHEMA_VERSION,
apiGroup = "openai-completions",
): void {
const filename = "test-provider.json";
const content = `${JSON.stringify(values)}\n`;
const content = `${JSON.stringify({ [apiGroup]: values })}\n`;
writeFileSync(join(dataDir, filename), content);
const manifest = createModelDataManifest(structure, { [filename]: content });
manifest.schemaVersion = manifestSchemaVersion;
@@ -71,8 +76,9 @@ function writeFixtureData(
}
describe("generated model data validation", () => {
it("validates complete data against generated structural catalogs", () => {
const { dataDir, structure } = createFixture();
it("reads and validates API-grouped model data", () => {
const { dataDir, packageRoot, structure } = createFixture();
expect(readModelDataStructure(packageRoot)).toEqual(structure);
expect(() => validateModelDataDirectory(structure, dataDir)).not.toThrow();
});
@@ -94,6 +100,31 @@ describe("generated model data validation", () => {
expect(() => validateModelDataDirectory(fixture.structure, fixture.dataDir)).toThrow(expectedMessage);
});
it("rejects a model in the wrong API group", () => {
const fixture = createFixture();
writeFixtureData(
fixture.dataDir,
fixture.structure,
fixture.values,
MODEL_DATA_SCHEMA_VERSION,
"anthropic-messages",
);
expect(() => validateModelDataDirectory(fixture.structure, fixture.dataDir)).toThrow("grouped under API");
});
it("rejects duplicate model IDs across API groups", () => {
const fixture = createFixture();
const filename = "test-provider.json";
const content = `${JSON.stringify({
"openai-completions": fixture.values,
"anthropic-messages": fixture.values,
})}\n`;
writeFileSync(join(fixture.dataDir, filename), content);
const manifest = createModelDataManifest(fixture.structure, { [filename]: content });
writeFileSync(join(fixture.dataDir, MODEL_DATA_MANIFEST_FILE), `${JSON.stringify(manifest)}\n`);
expect(() => validateModelDataDirectory(fixture.structure, fixture.dataDir)).toThrow("more than one API group");
});
it("rejects missing model IDs and stale file hashes", () => {
const fixture = createFixture();
writeFileSync(join(fixture.dataDir, "test-provider.json"), "{}\n");
@@ -112,7 +143,7 @@ describe("generated model data validation", () => {
expect(() => validateModelDataDirectory(fixture.structure, fixture.dataDir)).toThrow("generation stamp");
});
it("rejects missing provider shards referenced by the aggregator", () => {
it("rejects missing provider shards imported by the aggregator", () => {
const { packageRoot } = createFixture();
writeFileSync(
join(packageRoot, "src", "models.generated.ts"),
+16
View File
@@ -74,6 +74,22 @@ try {
}
}
const contributingInputs = new Set(
Object.values(agentTreeshakeBuild.metafile.outputs).flatMap((output) =>
Object.entries(output.inputs)
.filter(([, contribution]) => contribution.bytesInOutput > 0)
.map(([input]) => input),
),
);
const catalogInputs = Array.from(contributingInputs).filter((input) =>
normalizePath(input).includes("packages/ai/src/providers/data/"),
);
if (catalogInputs.length !== 1 || !normalizePath(catalogInputs[0]).endsWith("/anthropic.json")) {
throw new Error(
`Agent selective-provider bundle catalogs: expected only anthropic.json, found ${catalogInputs.join(", ") || "none"}`,
);
}
const aiSdkPackages = [
"@anthropic-ai/sdk",
"@aws-sdk/client-bedrock-runtime",