Compare commits
15
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33be44552c | ||
|
|
285ca1a865 | ||
|
|
55b630c1f6 | ||
|
|
20756bbba8 | ||
|
|
9260d4d112 | ||
|
|
022e6350c7 | ||
|
|
2fc28466e8 | ||
|
|
a700d92235 | ||
|
|
95cfda05be | ||
|
|
0f1783dad9 | ||
|
|
7dfc7867f1 | ||
|
|
62ac8db1b8 | ||
|
|
877da3f734 | ||
|
|
62e9bdadb6 | ||
|
|
1dd2250d1e |
No files matched your search
+1
-1
@@ -23,7 +23,7 @@
|
||||
"databricks:generate": "bun ./packages/core/script/generate-databricks.ts",
|
||||
"helicone:generate": "bun ./packages/core/script/generate-helicone.ts",
|
||||
"venice:generate": "bun ./packages/core/script/generate-venice.ts",
|
||||
"vercel:generate": "bun ./packages/core/script/generate-vercel.ts",
|
||||
"vercel:generate": "bun ./packages/core/script/sync-models.ts vercel",
|
||||
"wandb:generate": "bun ./packages/core/script/generate-wandb.ts",
|
||||
"digitalocean:generate": "bun ./packages/core/script/generate-digitalocean.ts",
|
||||
"ambient:generate": "bun ./packages/core/script/generate-ambient.ts",
|
||||
|
||||
@@ -1,589 +0,0 @@
|
||||
#!/usr/bin/env bun
|
||||
|
||||
/**
|
||||
* Generates Vercel model TOML files from the AI Gateway API.
|
||||
*
|
||||
* Flags:
|
||||
* --dry-run: Preview changes without writing files
|
||||
* --new-only: Only create new models, skip updating existing ones
|
||||
*/
|
||||
|
||||
import { z } from "zod";
|
||||
import path from "node:path";
|
||||
import { mkdir } from "node:fs/promises";
|
||||
import { ModelFamilyValues } from "../src/family.js";
|
||||
|
||||
const API_ENDPOINT = "https://ai-gateway.vercel.sh/v1/models";
|
||||
|
||||
enum ModelType {
|
||||
Language = "language",
|
||||
Embedding = "embedding",
|
||||
Image = "image",
|
||||
Video = "video",
|
||||
Reranking = "reranking",
|
||||
}
|
||||
|
||||
enum SkipZeroFields {
|
||||
LimitContext = "limit.context",
|
||||
LimitInput = "limit.input",
|
||||
LimitOutput = "limit.output",
|
||||
}
|
||||
|
||||
const PricingTier = z.object({
|
||||
cost: z.string(),
|
||||
min: z.number(),
|
||||
max: z.number().optional(),
|
||||
});
|
||||
|
||||
const Pricing = z.object({
|
||||
input: z.string().optional(),
|
||||
output: z.string().optional(),
|
||||
input_cache_read: z.string().optional(),
|
||||
input_cache_write: z.string().optional(),
|
||||
input_tiers: z.array(PricingTier).optional(),
|
||||
output_tiers: z.array(PricingTier).optional(),
|
||||
input_cache_read_tiers: z.array(PricingTier).optional(),
|
||||
input_cache_write_tiers: z.array(PricingTier).optional(),
|
||||
}).passthrough();
|
||||
|
||||
const VercelModel = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
created: z.number(),
|
||||
released: z.number().optional(),
|
||||
context_window: z.number(),
|
||||
max_tokens: z.number(),
|
||||
type: z.nativeEnum(ModelType),
|
||||
tags: z.array(z.string()).optional().default([]),
|
||||
pricing: Pricing.optional(),
|
||||
}).passthrough();
|
||||
|
||||
const VercelResponse = z.object({
|
||||
data: z.array(VercelModel),
|
||||
}).passthrough();
|
||||
|
||||
interface ExistingModel {
|
||||
name?: string;
|
||||
family?: string;
|
||||
attachment?: boolean;
|
||||
reasoning?: boolean;
|
||||
tool_call?: boolean;
|
||||
structured_output?: boolean;
|
||||
temperature?: boolean;
|
||||
knowledge?: string;
|
||||
release_date?: string;
|
||||
last_updated?: string;
|
||||
open_weights?: boolean;
|
||||
interleaved?: boolean | { field: string };
|
||||
status?: string;
|
||||
cost?: {
|
||||
input?: number;
|
||||
output?: number;
|
||||
cache_read?: number;
|
||||
cache_write?: number;
|
||||
};
|
||||
limit?: {
|
||||
context?: number;
|
||||
input?: number;
|
||||
output?: number;
|
||||
};
|
||||
modalities?: {
|
||||
input?: string[];
|
||||
output?: string[];
|
||||
};
|
||||
}
|
||||
|
||||
interface MergedModel {
|
||||
name: string;
|
||||
family?: string;
|
||||
attachment: boolean;
|
||||
reasoning: boolean;
|
||||
tool_call: boolean;
|
||||
structured_output?: boolean;
|
||||
temperature: boolean;
|
||||
knowledge?: string;
|
||||
release_date: string;
|
||||
last_updated: string;
|
||||
open_weights: boolean;
|
||||
interleaved?: boolean | { field: string };
|
||||
status?: string;
|
||||
cost?: {
|
||||
input: number;
|
||||
output: number;
|
||||
cache_read?: number;
|
||||
cache_write?: number;
|
||||
};
|
||||
limit: {
|
||||
context: number;
|
||||
input?: number;
|
||||
output: number;
|
||||
};
|
||||
modalities: {
|
||||
input: string[];
|
||||
output: string[];
|
||||
};
|
||||
}
|
||||
|
||||
interface Changes {
|
||||
field: string;
|
||||
oldValue: string;
|
||||
newValue: string;
|
||||
}
|
||||
|
||||
function timestampToDate(timestamp: number): string {
|
||||
const date = new Date(timestamp * 1000);
|
||||
return date.toISOString().slice(0, 10);
|
||||
}
|
||||
|
||||
function getTodayDate(): string {
|
||||
return new Date().toISOString().slice(0, 10);
|
||||
}
|
||||
|
||||
// Number utilities
|
||||
function formatNumber(n: number): string {
|
||||
if (n >= 1000) {
|
||||
return n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, "_");
|
||||
}
|
||||
return n.toString();
|
||||
}
|
||||
|
||||
function isSubstring(target: string, family: string): boolean {
|
||||
return target.toLowerCase().includes(family.toLowerCase());
|
||||
}
|
||||
|
||||
function matchesFamily(target: string, family: string): boolean {
|
||||
const targetLower = target.toLowerCase();
|
||||
const familyLower = family.toLowerCase();
|
||||
let familyIdx = 0;
|
||||
|
||||
for (let i = 0; i < targetLower.length && familyIdx < familyLower.length; i++) {
|
||||
if (targetLower[i] === familyLower[familyIdx]) {
|
||||
familyIdx++;
|
||||
}
|
||||
}
|
||||
|
||||
return familyIdx === familyLower.length;
|
||||
}
|
||||
|
||||
function inferFamily(modelId: string, modelName: string): string | undefined {
|
||||
const sortedFamilies = [...ModelFamilyValues].sort((a, b) => b.length - a.length);
|
||||
|
||||
// First pass: try exact substring matches
|
||||
for (const family of sortedFamilies) {
|
||||
if (isSubstring(modelId, family)) {
|
||||
return family;
|
||||
}
|
||||
}
|
||||
|
||||
for (const family of sortedFamilies) {
|
||||
if (isSubstring(modelName, family)) {
|
||||
return family;
|
||||
}
|
||||
}
|
||||
|
||||
// Second pass: fall back to subsequence matching
|
||||
for (const family of sortedFamilies) {
|
||||
if (matchesFamily(modelId, family)) {
|
||||
return family;
|
||||
}
|
||||
}
|
||||
|
||||
for (const family of sortedFamilies) {
|
||||
if (matchesFamily(modelName, family)) {
|
||||
return family;
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function buildInputModalities(tags: string[]): string[] {
|
||||
const mods: string[] = ["text"];
|
||||
const tagSet = new Set(tags);
|
||||
|
||||
if (tagSet.has("vision")) mods.push("image");
|
||||
if (tagSet.has("file-input")) mods.push("pdf");
|
||||
|
||||
return mods;
|
||||
}
|
||||
|
||||
function buildOutputModalities(modelType: ModelType, tags: string[]): string[] {
|
||||
const mods: string[] = ["text"];
|
||||
const tagSet = new Set(tags);
|
||||
|
||||
if (modelType === ModelType.Image || tagSet.has("image-generation")) {
|
||||
mods.push("image");
|
||||
} else if (modelType === ModelType.Video) {
|
||||
mods.push("video");
|
||||
}
|
||||
|
||||
return mods;
|
||||
}
|
||||
|
||||
async function loadExistingModel(filePath: string): Promise<ExistingModel | null> {
|
||||
try {
|
||||
const file = Bun.file(filePath);
|
||||
if (!(await file.exists())) {
|
||||
return null;
|
||||
}
|
||||
const toml = await import(filePath, { with: { type: "toml" } }).then(
|
||||
(mod) => mod.default,
|
||||
);
|
||||
return toml as ExistingModel;
|
||||
} catch (e) {
|
||||
console.warn(`Warning: Failed to parse existing file ${filePath}:`, e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function isOpenAIModel(modelId: string): boolean {
|
||||
return modelId.startsWith("openai/");
|
||||
}
|
||||
|
||||
function mergeModel(
|
||||
apiModel: z.infer<typeof VercelModel>,
|
||||
existing: ExistingModel | null,
|
||||
): MergedModel {
|
||||
const tagSet = new Set(apiModel.tags);
|
||||
const inputModalities = buildInputModalities(apiModel.tags);
|
||||
const outputModalities = buildOutputModalities(apiModel.type, apiModel.tags);
|
||||
|
||||
// Preserve existing values when available (previously manually specified)
|
||||
const name = existing?.name ?? apiModel.name;
|
||||
const attachment = existing?.attachment ?? (tagSet.has("vision") || tagSet.has("file-input"));
|
||||
const reasoning = existing?.reasoning ?? tagSet.has("reasoning");
|
||||
const toolCall = existing?.tool_call ?? tagSet.has("tool-use");
|
||||
const openWeights = existing?.open_weights ?? false;
|
||||
const family = existing?.family ?? inferFamily(apiModel.id, apiModel.name);
|
||||
const structuredOutput = existing?.structured_output;
|
||||
const knowledge = existing?.knowledge;
|
||||
const interleaved = existing?.interleaved;
|
||||
const status = existing?.status;
|
||||
|
||||
// Release date: use API, fallback to existing, then today
|
||||
const releaseDate = apiModel.released
|
||||
? timestampToDate(apiModel.released)
|
||||
: (existing?.release_date ?? getTodayDate());
|
||||
|
||||
// Preserve existing limits if API returns 0 (indicates missing/invalid data)
|
||||
const contextLimit = apiModel.context_window > 0
|
||||
? apiModel.context_window
|
||||
: (existing?.limit?.context ?? 0);
|
||||
const outputLimit = apiModel.max_tokens > 0
|
||||
? apiModel.max_tokens
|
||||
: (existing?.limit?.output ?? 0);
|
||||
|
||||
const merged: MergedModel = {
|
||||
name,
|
||||
family,
|
||||
attachment,
|
||||
reasoning,
|
||||
tool_call: toolCall,
|
||||
temperature: true,
|
||||
release_date: releaseDate,
|
||||
last_updated: getTodayDate(),
|
||||
open_weights: openWeights,
|
||||
...(structuredOutput !== undefined && { structured_output: structuredOutput }),
|
||||
...(knowledge && { knowledge }),
|
||||
...(interleaved !== undefined && { interleaved }),
|
||||
...(status && { status }),
|
||||
limit: {
|
||||
context: contextLimit,
|
||||
...(isOpenAIModel(apiModel.id) && contextLimit > outputLimit && { input: contextLimit - outputLimit }),
|
||||
output: outputLimit,
|
||||
},
|
||||
modalities: {
|
||||
input: inputModalities,
|
||||
output: outputModalities,
|
||||
},
|
||||
};
|
||||
|
||||
if (apiModel.pricing) {
|
||||
const inputPrice = apiModel.pricing.input_tiers?.[0]?.cost ?? apiModel.pricing.input;
|
||||
const outputPrice = apiModel.pricing.output_tiers?.[0]?.cost ?? apiModel.pricing.output;
|
||||
const cacheReadPrice = apiModel.pricing.input_cache_read_tiers?.[0]?.cost ?? apiModel.pricing.input_cache_read;
|
||||
const cacheWritePrice = apiModel.pricing.input_cache_write_tiers?.[0]?.cost ?? apiModel.pricing.input_cache_write;
|
||||
|
||||
if (inputPrice && outputPrice) {
|
||||
merged.cost = {
|
||||
input: parseFloat(inputPrice) * 1_000_000,
|
||||
output: parseFloat(outputPrice) * 1_000_000,
|
||||
...(cacheReadPrice && {
|
||||
cache_read: parseFloat(cacheReadPrice) * 1_000_000,
|
||||
}),
|
||||
...(cacheWritePrice && {
|
||||
cache_write: parseFloat(cacheWritePrice) * 1_000_000,
|
||||
}),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return merged;
|
||||
}
|
||||
|
||||
function formatToml(model: MergedModel): string {
|
||||
const lines: string[] = [];
|
||||
|
||||
lines.push(`name = "${model.name.replace(/"/g, '\\"')}"`);
|
||||
if (model.family) {
|
||||
lines.push(`family = "${model.family}"`);
|
||||
}
|
||||
lines.push(`attachment = ${model.attachment}`);
|
||||
lines.push(`reasoning = ${model.reasoning}`);
|
||||
lines.push(`tool_call = ${model.tool_call}`);
|
||||
if (model.structured_output !== undefined) {
|
||||
lines.push(`structured_output = ${model.structured_output}`);
|
||||
}
|
||||
lines.push(`temperature = ${model.temperature}`);
|
||||
if (model.knowledge) {
|
||||
lines.push(`knowledge = "${model.knowledge}"`);
|
||||
}
|
||||
lines.push(`release_date = "${model.release_date}"`);
|
||||
lines.push(`last_updated = "${model.last_updated}"`);
|
||||
lines.push(`open_weights = ${model.open_weights}`);
|
||||
if (model.status) {
|
||||
lines.push(`status = "${model.status}"`);
|
||||
}
|
||||
|
||||
if (model.interleaved !== undefined) {
|
||||
lines.push("");
|
||||
if (model.interleaved === true) {
|
||||
lines.push(`interleaved = true`);
|
||||
} else if (typeof model.interleaved === "object") {
|
||||
lines.push(`[interleaved]`);
|
||||
lines.push(`field = "${model.interleaved.field}"`);
|
||||
}
|
||||
}
|
||||
|
||||
if (model.cost) {
|
||||
lines.push("");
|
||||
lines.push(`[cost]`);
|
||||
lines.push(`input = ${model.cost.input}`);
|
||||
lines.push(`output = ${model.cost.output}`);
|
||||
if (model.cost.cache_read !== undefined) {
|
||||
lines.push(`cache_read = ${model.cost.cache_read}`);
|
||||
}
|
||||
if (model.cost.cache_write !== undefined) {
|
||||
lines.push(`cache_write = ${model.cost.cache_write}`);
|
||||
}
|
||||
}
|
||||
|
||||
lines.push("");
|
||||
lines.push(`[limit]`);
|
||||
lines.push(`context = ${formatNumber(model.limit.context)}`);
|
||||
if (model.limit.input !== undefined) {
|
||||
lines.push(`input = ${formatNumber(model.limit.input)}`);
|
||||
}
|
||||
lines.push(`output = ${formatNumber(model.limit.output)}`);
|
||||
|
||||
lines.push("");
|
||||
lines.push(`[modalities]`);
|
||||
lines.push(`input = [${model.modalities.input.map((m) => `"${m}"`).join(", ")}]`);
|
||||
lines.push(`output = [${model.modalities.output.map((m) => `"${m}"`).join(", ")}]`);
|
||||
|
||||
return lines.join("\n") + "\n";
|
||||
}
|
||||
|
||||
function detectChanges(
|
||||
existing: ExistingModel | null,
|
||||
merged: MergedModel,
|
||||
): Changes[] {
|
||||
if (!existing) return [];
|
||||
|
||||
const changes: Changes[] = [];
|
||||
const EPSILON = 0.001; // price diff to ignore (per million tokens)
|
||||
|
||||
const shouldSkipZero = (field: string, oldVal: unknown, newVal: unknown): boolean => {
|
||||
if (!Object.values(SkipZeroFields).includes(field as SkipZeroFields)) {
|
||||
return false;
|
||||
}
|
||||
return (typeof oldVal === "number" && oldVal === 0) || (typeof newVal === "number" && newVal === 0);
|
||||
};
|
||||
|
||||
const formatValue = (val: unknown): string => {
|
||||
if (typeof val === "number") return formatNumber(val);
|
||||
if (Array.isArray(val)) return `[${val.join(", ")}]`;
|
||||
if (val === undefined) return "(none)";
|
||||
return String(val);
|
||||
};
|
||||
|
||||
const isMaterialPriceDiff = (oldPrice: unknown, newPrice: unknown): boolean => {
|
||||
// 0 → undefined is not material (cost removed)
|
||||
if (oldPrice === 0 && newPrice === undefined) return false;
|
||||
|
||||
if (oldPrice !== undefined && newPrice !== undefined) {
|
||||
return Math.abs((oldPrice as number) - (newPrice as number)) > EPSILON;
|
||||
}
|
||||
|
||||
return oldPrice !== newPrice;
|
||||
};
|
||||
|
||||
const compare = (field: string, oldVal: unknown, newVal: unknown) => {
|
||||
if (shouldSkipZero(field, oldVal, newVal)) return;
|
||||
|
||||
const isDiff = field.startsWith("cost.")
|
||||
? isMaterialPriceDiff(oldVal, newVal)
|
||||
: JSON.stringify(oldVal) !== JSON.stringify(newVal);
|
||||
|
||||
if (isDiff) {
|
||||
changes.push({
|
||||
field,
|
||||
oldValue: formatValue(oldVal),
|
||||
newValue: formatValue(newVal),
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
compare("name", existing.name, merged.name);
|
||||
compare("family", existing.family, merged.family);
|
||||
compare("attachment", existing.attachment, merged.attachment);
|
||||
compare("reasoning", existing.reasoning, merged.reasoning);
|
||||
compare("tool_call", existing.tool_call, merged.tool_call);
|
||||
compare("structured_output", existing.structured_output, merged.structured_output);
|
||||
compare("open_weights", existing.open_weights, merged.open_weights);
|
||||
compare("release_date", existing.release_date, merged.release_date);
|
||||
compare("cost.input", existing.cost?.input, merged.cost?.input);
|
||||
compare("cost.output", existing.cost?.output, merged.cost?.output);
|
||||
compare("cost.cache_read", existing.cost?.cache_read, merged.cost?.cache_read);
|
||||
compare("cost.cache_write", existing.cost?.cache_write, merged.cost?.cache_write);
|
||||
compare("limit.context", existing.limit?.context, merged.limit.context);
|
||||
compare("limit.input", existing.limit?.input, merged.limit.input);
|
||||
compare("limit.output", existing.limit?.output, merged.limit.output);
|
||||
compare("modalities.input", existing.modalities?.input, merged.modalities.input);
|
||||
|
||||
return changes;
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const args = process.argv.slice(2);
|
||||
const dryRun = args.includes("--dry-run");
|
||||
const newOnly = args.includes("--new-only");
|
||||
|
||||
const modelsDir = path.join(
|
||||
import.meta.dirname,
|
||||
"..",
|
||||
"..",
|
||||
"..",
|
||||
"providers",
|
||||
"vercel",
|
||||
"models",
|
||||
);
|
||||
|
||||
console.log(`${dryRun ? "[DRY RUN] " : ""}${newOnly ? "[NEW ONLY] " : ""}Fetching Vercel models from API...`);
|
||||
|
||||
const res = await fetch(API_ENDPOINT);
|
||||
if (!res.ok) {
|
||||
console.error(`Failed to fetch API: ${res.status} ${res.statusText}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const json = await res.json();
|
||||
const parsed = VercelResponse.safeParse(json);
|
||||
if (!parsed.success) {
|
||||
console.error("Invalid API response:", parsed.error.errors);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const apiModels = parsed.data.data;
|
||||
|
||||
const existingFiles = new Set<string>();
|
||||
try {
|
||||
for await (const file of new Bun.Glob("**/*.toml").scan({
|
||||
cwd: modelsDir,
|
||||
absolute: false,
|
||||
})) {
|
||||
existingFiles.add(file);
|
||||
}
|
||||
} catch {
|
||||
}
|
||||
|
||||
console.log(`Found ${apiModels.length} models in API, ${existingFiles.size} existing files\n`);
|
||||
|
||||
const apiModelIds = new Set<string>();
|
||||
|
||||
let created = 0;
|
||||
let updated = 0;
|
||||
let unchanged = 0;
|
||||
|
||||
for (const apiModel of apiModels) {
|
||||
// Skip these since OpenCode does not support image / video / reranking yet
|
||||
if (
|
||||
apiModel.type === ModelType.Image ||
|
||||
apiModel.type === ModelType.Video ||
|
||||
apiModel.type === ModelType.Reranking
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const relativePath = `${apiModel.id}.toml`;
|
||||
const filePath = path.join(modelsDir, relativePath);
|
||||
const dirPath = path.dirname(filePath);
|
||||
|
||||
apiModelIds.add(relativePath);
|
||||
|
||||
const existing = await loadExistingModel(filePath);
|
||||
const merged = mergeModel(apiModel, existing);
|
||||
const tomlContent = formatToml(merged);
|
||||
|
||||
if (existing === null) {
|
||||
created++;
|
||||
if (dryRun) {
|
||||
console.log(`[DRY RUN] Would create: ${relativePath}`);
|
||||
console.log(` name = "${merged.name}"`);
|
||||
if (merged.family) {
|
||||
console.log(` family = "${merged.family}" (inferred)`);
|
||||
}
|
||||
console.log("");
|
||||
} else {
|
||||
await mkdir(dirPath, { recursive: true });
|
||||
await Bun.write(filePath, tomlContent);
|
||||
console.log(`Created: ${relativePath}`);
|
||||
}
|
||||
} else {
|
||||
if (newOnly) {
|
||||
unchanged++;
|
||||
continue;
|
||||
}
|
||||
|
||||
const changes = detectChanges(existing, merged);
|
||||
|
||||
if (changes.length > 0) {
|
||||
updated++;
|
||||
if (dryRun) {
|
||||
console.log(`[DRY RUN] Would update: ${relativePath}`);
|
||||
} else {
|
||||
await mkdir(dirPath, { recursive: true });
|
||||
await Bun.write(filePath, tomlContent);
|
||||
console.log(`Updated: ${relativePath}`);
|
||||
}
|
||||
for (const change of changes) {
|
||||
console.log(` ${change.field}: ${change.oldValue} → ${change.newValue}`);
|
||||
}
|
||||
console.log("");
|
||||
} else {
|
||||
unchanged++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const orphaned: string[] = [];
|
||||
for (const file of existingFiles) {
|
||||
if (!apiModelIds.has(file)) {
|
||||
orphaned.push(file);
|
||||
console.log(`Warning: Orphaned file (not in API): ${file}`);
|
||||
}
|
||||
}
|
||||
|
||||
console.log("");
|
||||
if (dryRun) {
|
||||
console.log(
|
||||
`Summary: ${created} would be created, ${updated} would be updated, ${unchanged} unchanged, ${orphaned.length} orphaned`,
|
||||
);
|
||||
} else {
|
||||
console.log(
|
||||
`Summary: ${created} created, ${updated} updated, ${unchanged} unchanged, ${orphaned.length} orphaned`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
await main();
|
||||
@@ -1,5 +1,5 @@
|
||||
import path from "node:path";
|
||||
import { mkdir, readdir, rm } from "node:fs/promises";
|
||||
import { lstat, mkdir, readdir, rm } from "node:fs/promises";
|
||||
import { mergeDeep } from "remeda";
|
||||
import { z } from "zod";
|
||||
|
||||
@@ -8,6 +8,7 @@ import { cloudflareWorkersAi } from "./providers/cloudflare-workers-ai.js";
|
||||
import { google } from "./providers/google.js";
|
||||
import { openrouter } from "./providers/openrouter.js";
|
||||
import { ovhcloud } from "./providers/ovhcloud.js";
|
||||
import { vercel } from "./providers/vercel.js";
|
||||
import { xai } from "./providers/xai.js";
|
||||
|
||||
const ExistingModelType = AuthoredModelShape.partial()
|
||||
@@ -44,6 +45,10 @@ export interface SyncProvider<SourceModel> {
|
||||
name: string;
|
||||
modelsDir: string;
|
||||
skipCreates?: boolean;
|
||||
deleteMissing?: boolean;
|
||||
preserveSymlinks?: boolean;
|
||||
sameModel?(current: ExistingModel, desired: SyncedModel): boolean;
|
||||
missingNotice?(paths: string[]): string[];
|
||||
sourceID?(model: SourceModel): string;
|
||||
skippedNotice?(ids: string[]): string[];
|
||||
fetchModels(): Promise<unknown>;
|
||||
@@ -71,17 +76,19 @@ export const providers: {
|
||||
google: SyncProvider<any>;
|
||||
openrouter: SyncProvider<any>;
|
||||
ovhcloud: SyncProvider<any>;
|
||||
vercel: SyncProvider<any>;
|
||||
xai: SyncProvider<any>;
|
||||
} = {
|
||||
"cloudflare-workers-ai": cloudflareWorkersAi,
|
||||
google,
|
||||
openrouter,
|
||||
ovhcloud,
|
||||
vercel,
|
||||
xai,
|
||||
};
|
||||
|
||||
export const groups = {
|
||||
aggregators: ["openrouter"],
|
||||
aggregators: ["openrouter", "vercel"],
|
||||
cloudflare: ["cloudflare-workers-ai"],
|
||||
direct: ["google", "ovhcloud", "xai"],
|
||||
} as const;
|
||||
@@ -103,7 +110,7 @@ export async function syncProvider<SourceModel>(
|
||||
): Promise<SyncResult> {
|
||||
console.log(`\nSyncing ${provider.name}...`);
|
||||
|
||||
const existing = await readExisting(provider.modelsDir);
|
||||
const { models: existing, brokenSymlinks } = await readExisting(provider.modelsDir);
|
||||
const sourceModels = provider.parseModels(await provider.fetchModels());
|
||||
const desired = new Map<string, { model: z.infer<typeof SyncedAuthoredModel>; content: string }>();
|
||||
const skippedRemote: string[] = [];
|
||||
@@ -157,12 +164,18 @@ export async function syncProvider<SourceModel>(
|
||||
console.log(`Would create ${relativePath}`);
|
||||
} else {
|
||||
await mkdir(path.dirname(filePath), { recursive: true });
|
||||
if (await isSymlink(filePath)) await rm(filePath, { force: true });
|
||||
await Bun.write(filePath, file.content);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!sameModel(relativePath, current.authored, file.model)) {
|
||||
if (current.symlink && provider.preserveSymlinks) {
|
||||
unchanged++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!(provider.sameModel?.(current.authored, file.model) ?? sameModel(relativePath, current.authored, file.model))) {
|
||||
if (options.newOnly) {
|
||||
unchanged++;
|
||||
continue;
|
||||
@@ -180,8 +193,15 @@ export async function syncProvider<SourceModel>(
|
||||
}
|
||||
}
|
||||
|
||||
for (const relativePath of existing.keys()) {
|
||||
const missingLocal: string[] = [];
|
||||
for (const relativePath of new Set([...existing.keys(), ...brokenSymlinks])) {
|
||||
if (desired.has(relativePath)) continue;
|
||||
if (provider.deleteMissing === false) {
|
||||
missingLocal.push(relativePath);
|
||||
console.log(`Retaining model missing from source: ${relativePath}`);
|
||||
unchanged++;
|
||||
continue;
|
||||
}
|
||||
if (options.newOnly) {
|
||||
console.log(`Skipping removal in new-only mode: ${relativePath}`);
|
||||
unchanged++;
|
||||
@@ -197,7 +217,10 @@ export async function syncProvider<SourceModel>(
|
||||
}
|
||||
}
|
||||
|
||||
const result = summarize(provider, files, unchanged, provider.skippedNotice?.(skippedRemote) ?? []);
|
||||
const result = summarize(provider, files, unchanged, [
|
||||
...provider.skippedNotice?.(skippedRemote) ?? [],
|
||||
...provider.missingNotice?.(missingLocal) ?? [],
|
||||
]);
|
||||
console.log(
|
||||
`${options.dryRun ? "Dry run: " : ""}${result.created} created, ${result.updated} updated, ${result.deleted} removed, ${result.unchanged} unchanged`,
|
||||
);
|
||||
@@ -252,13 +275,24 @@ async function readExisting(modelsDir: string) {
|
||||
toml: ExistingModel;
|
||||
symlink: boolean;
|
||||
}>();
|
||||
const brokenSymlinks = new Set<string>();
|
||||
let modelMetadata: Record<string, Record<string, unknown>> | undefined;
|
||||
|
||||
for (const { file, symlink } of await tomlFiles(modelsDir)) {
|
||||
const text = await Bun.file(path.join(modelsDir, file)).text();
|
||||
const filePath = path.join(modelsDir, file);
|
||||
let text: string;
|
||||
try {
|
||||
text = await Bun.file(filePath).text();
|
||||
} catch (error) {
|
||||
if (symlink && error instanceof Error && "code" in error && error.code === "ENOENT") {
|
||||
brokenSymlinks.add(file);
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
const parsed = ExistingModel.safeParse(Bun.TOML.parse(text));
|
||||
if (!parsed.success) {
|
||||
parsed.error.cause = { path: path.join(modelsDir, file) };
|
||||
parsed.error.cause = { path: filePath };
|
||||
throw parsed.error;
|
||||
}
|
||||
|
||||
@@ -268,12 +302,21 @@ async function readExisting(modelsDir: string) {
|
||||
}
|
||||
const toml = authored.base_model === undefined
|
||||
? authored
|
||||
: resolveBaseModel(authored, modelMetadata ?? {}, path.join(modelsDir, file));
|
||||
: resolveBaseModel(authored, modelMetadata ?? {}, filePath);
|
||||
|
||||
existing.set(file, { authored, toml, symlink });
|
||||
}
|
||||
|
||||
return existing;
|
||||
return { models: existing, brokenSymlinks };
|
||||
}
|
||||
|
||||
async function isSymlink(filePath: string) {
|
||||
try {
|
||||
return (await lstat(filePath)).isSymbolicLink();
|
||||
} catch (error) {
|
||||
if (error instanceof Error && "code" in error && error.code === "ENOENT") return false;
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
async function readModelMetadata(modelsDir: string) {
|
||||
@@ -586,7 +629,7 @@ function formatToml(model: z.infer<typeof SyncedAuthoredModel>) {
|
||||
|
||||
for (const tier of model.cost.tiers ?? []) {
|
||||
lines.push("", "[[cost.tiers]]");
|
||||
lines.push(`tier = { type = ${quote(tier.tier.type)}, size = ${formatInteger(tier.tier.size)} }`);
|
||||
lines.push(`tier = { type = ${quote(tier.tier.type ?? "context")}, size = ${formatInteger(tier.tier.size)} }`);
|
||||
lines.push(`input = ${formatNumber(tier.input)}`);
|
||||
lines.push(`output = ${formatNumber(tier.output)}`);
|
||||
if (tier.reasoning !== undefined) lines.push(`reasoning = ${formatNumber(tier.reasoning)}`);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { existsSync, readFileSync } from "node:fs";
|
||||
import { readFileSync, readdirSync } from "node:fs";
|
||||
import path from "node:path";
|
||||
|
||||
import { ModelFamilyValues } from "../../family.js";
|
||||
@@ -8,8 +8,10 @@ import type { ExistingModel, SyncProvider, SyncedFullModel, SyncedModel } from "
|
||||
const API_ENDPOINT = "https://openrouter.ai/api/v1/models";
|
||||
const MODELS_DIR = path.join(import.meta.dirname, "..", "..", "..", "..", "..", "models");
|
||||
const modelMetadataByID = new Map<string, Record<string, unknown>>();
|
||||
const modelMetadataFilesByProvider = new Map<string, Set<string>>();
|
||||
|
||||
const CANONICAL_PROVIDER_PREFIXES = {
|
||||
alibaba: { provider: "alibaba", metadata: "alibaba" },
|
||||
anthropic: { provider: "anthropic", metadata: "anthropic" },
|
||||
cohere: { provider: "cohere", metadata: "cohere" },
|
||||
deepseek: { provider: "deepseek", metadata: "deepseek" },
|
||||
@@ -161,15 +163,12 @@ export function buildOpenRouterModel(
|
||||
input: existing?.limit?.input,
|
||||
output: model.top_provider.max_completion_tokens ?? existing?.limit?.output ?? context,
|
||||
};
|
||||
const canonical = existing?.base_model ?? baseModel ?? resolveCanonicalModel(model.id)?.from;
|
||||
const canonical = existing?.base_model ?? baseModel ?? resolveCanonicalBaseModel(model.id);
|
||||
|
||||
if (canonical !== undefined) {
|
||||
return {
|
||||
base_model: canonical,
|
||||
base_model_omit: existing?.base_model === canonical
|
||||
? existing.base_model_omit ?? baseModelOmit(canonical, limit)
|
||||
: baseModelOmit(canonical, limit),
|
||||
...baseModelOverrides(canonical, {
|
||||
return factorBaseModel(
|
||||
canonical,
|
||||
{
|
||||
name: baseModel !== undefined || model.id.endsWith(":free") ? name : undefined,
|
||||
attachment,
|
||||
reasoning,
|
||||
@@ -180,9 +179,11 @@ export function buildOpenRouterModel(
|
||||
interleaved: existing?.interleaved,
|
||||
limit,
|
||||
modalities: { input, output },
|
||||
}),
|
||||
cost,
|
||||
};
|
||||
cost,
|
||||
},
|
||||
limit,
|
||||
existing?.base_model === canonical ? existing.base_model_omit : undefined,
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -205,7 +206,7 @@ export function buildOpenRouterModel(
|
||||
} satisfies SyncedFullModel;
|
||||
}
|
||||
|
||||
function resolveCanonicalModel(openrouterID: string) {
|
||||
export function resolveCanonicalBaseModel(openrouterID: string) {
|
||||
const [prefix, ...modelParts] = openrouterID.split("/");
|
||||
if (prefix === undefined || modelParts.length === 0) return undefined;
|
||||
if (openrouterID.startsWith("~/") || prefix.startsWith("~")) return undefined;
|
||||
@@ -219,17 +220,33 @@ function resolveCanonicalModel(openrouterID: string) {
|
||||
return modelMetadataExists(canonical.metadata, candidate);
|
||||
});
|
||||
|
||||
return match === undefined
|
||||
? undefined
|
||||
: {
|
||||
from: `${canonical.metadata}/${match}`,
|
||||
provider: canonical.provider,
|
||||
modelID: match,
|
||||
};
|
||||
return match === undefined ? undefined : `${canonical.metadata}/${match}`;
|
||||
}
|
||||
|
||||
function modelMetadataExists(provider: string, modelID: string) {
|
||||
return existsSync(path.join(MODELS_DIR, provider, `${modelID}.toml`));
|
||||
let files = modelMetadataFilesByProvider.get(provider);
|
||||
if (files === undefined) {
|
||||
try {
|
||||
files = new Set(readdirSync(path.join(MODELS_DIR, provider)));
|
||||
} catch {
|
||||
files = new Set();
|
||||
}
|
||||
modelMetadataFilesByProvider.set(provider, files);
|
||||
}
|
||||
return files.has(`${modelID}.toml`);
|
||||
}
|
||||
|
||||
export function factorBaseModel(
|
||||
modelID: string,
|
||||
values: Partial<SyncedFullModel>,
|
||||
limit: SyncedFullModel["limit"],
|
||||
existingOmit?: string[],
|
||||
): SyncedModel {
|
||||
return {
|
||||
base_model: modelID,
|
||||
base_model_omit: existingOmit ?? baseModelOmit(modelID, limit),
|
||||
...baseModelOverrides(modelID, values),
|
||||
};
|
||||
}
|
||||
|
||||
function baseModelOmit(
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { ModelFamilyValues } from "../../family.js";
|
||||
import type { ExistingModel, SyncProvider, SyncedFullModel, SyncedModel } from "../index.js";
|
||||
import { factorBaseModel, resolveCanonicalBaseModel } from "./openrouter.js";
|
||||
|
||||
const API_ENDPOINT = "https://ai-gateway.vercel.sh/v1/models";
|
||||
|
||||
const ModelType = z.enum(["language", "embedding", "image", "video", "reranking"]);
|
||||
|
||||
const PricingTier = z.object({
|
||||
cost: z.string(),
|
||||
min: z.number(),
|
||||
max: z.number().optional(),
|
||||
});
|
||||
|
||||
const Pricing = z.object({
|
||||
input: z.string().optional(),
|
||||
output: z.string().optional(),
|
||||
input_cache_read: z.string().optional(),
|
||||
input_cache_write: z.string().optional(),
|
||||
input_tiers: z.array(PricingTier).optional(),
|
||||
output_tiers: z.array(PricingTier).optional(),
|
||||
input_cache_read_tiers: z.array(PricingTier).optional(),
|
||||
input_cache_write_tiers: z.array(PricingTier).optional(),
|
||||
}).passthrough();
|
||||
|
||||
export const VercelModel = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
created: z.number(),
|
||||
released: z.number().optional(),
|
||||
context_window: z.number(),
|
||||
max_tokens: z.number(),
|
||||
type: ModelType,
|
||||
tags: z.array(z.string()).optional().default([]),
|
||||
pricing: Pricing.optional(),
|
||||
}).passthrough();
|
||||
|
||||
const VercelResponse = z.object({
|
||||
data: z.array(VercelModel),
|
||||
}).passthrough();
|
||||
|
||||
export type VercelModel = z.infer<typeof VercelModel>;
|
||||
|
||||
export const vercel = {
|
||||
id: "vercel",
|
||||
name: "Vercel AI Gateway",
|
||||
modelsDir: "providers/vercel/models",
|
||||
deleteMissing: false,
|
||||
preserveSymlinks: true,
|
||||
missingNotice(paths) {
|
||||
return paths.map((model) => `Vercel model is no longer returned by the API: ${model}`);
|
||||
},
|
||||
async fetchModels() {
|
||||
const response = await fetch(API_ENDPOINT);
|
||||
if (!response.ok) {
|
||||
throw new Error(`Vercel AI Gateway request failed: ${response.status} ${response.statusText}`);
|
||||
}
|
||||
return response.json();
|
||||
},
|
||||
parseModels(raw) {
|
||||
return VercelResponse.parse(raw).data;
|
||||
},
|
||||
translateModel(model, context) {
|
||||
if (model.type === "image" || model.type === "video" || model.type === "reranking") {
|
||||
return undefined;
|
||||
}
|
||||
return {
|
||||
id: model.id,
|
||||
model: buildVercelModel(model, context.existing(model.id)),
|
||||
};
|
||||
},
|
||||
sameModel(current, desired) {
|
||||
return sameVercelModel(current, desired);
|
||||
},
|
||||
} satisfies SyncProvider<VercelModel>;
|
||||
|
||||
export function buildVercelModel(model: VercelModel, existing: ExistingModel | undefined): SyncedModel {
|
||||
const tags = new Set(model.tags);
|
||||
const releaseDate = model.released
|
||||
? dateFromTimestamp(model.released)
|
||||
: existing?.release_date ?? new Date().toISOString().slice(0, 10);
|
||||
const context = model.context_window > 0
|
||||
? model.context_window
|
||||
: existing?.limit?.context ?? 0;
|
||||
const output = model.max_tokens > 0
|
||||
? model.max_tokens
|
||||
: existing?.limit?.output ?? 0;
|
||||
const input = model.id.startsWith("openai/") && context > output
|
||||
? context - output
|
||||
: undefined;
|
||||
const cost = buildCost(model.pricing, existing?.cost);
|
||||
|
||||
const synced: SyncedFullModel = {
|
||||
name: existing?.name ?? model.name,
|
||||
family: existing?.family ?? inferFamily(model.id, model.name),
|
||||
release_date: releaseDate,
|
||||
last_updated: existing?.last_updated ?? releaseDate,
|
||||
attachment: existing?.attachment ?? (tags.has("vision") || tags.has("file-input")),
|
||||
reasoning: existing?.reasoning ?? tags.has("reasoning"),
|
||||
reasoning_options: existing?.reasoning_options,
|
||||
temperature: true,
|
||||
tool_call: existing?.tool_call ?? tags.has("tool-use"),
|
||||
structured_output: existing?.structured_output,
|
||||
knowledge: existing?.knowledge,
|
||||
open_weights: existing?.open_weights ?? false,
|
||||
status: existing?.status,
|
||||
interleaved: existing?.interleaved,
|
||||
experimental: existing?.experimental,
|
||||
provider: existing?.provider,
|
||||
cost,
|
||||
limit: { context, input, output },
|
||||
modalities: {
|
||||
input: ["text", tags.has("vision") ? "image" : undefined, tags.has("file-input") ? "pdf" : undefined]
|
||||
.filter((value): value is "text" | "image" | "pdf" => value !== undefined),
|
||||
output: tags.has("image-generation") ? ["text", "image"] : ["text"],
|
||||
},
|
||||
};
|
||||
|
||||
const baseModel = existing?.base_model ?? resolveCanonicalBaseModel(model.id);
|
||||
if (baseModel === undefined) return synced;
|
||||
|
||||
const { last_updated: _lastUpdated, ...overrides } = synced;
|
||||
return factorBaseModel(baseModel, overrides, synced.limit, existing?.base_model_omit);
|
||||
}
|
||||
|
||||
function dateFromTimestamp(timestamp: number) {
|
||||
return new Date(timestamp * 1000).toISOString().slice(0, 10);
|
||||
}
|
||||
|
||||
function price(value: string | undefined) {
|
||||
if (value === undefined) return undefined;
|
||||
const number = Number(value);
|
||||
return Number.isFinite(number) && number >= 0
|
||||
? Math.round(number * 1_000_000_000_000) / 1_000_000
|
||||
: undefined;
|
||||
}
|
||||
|
||||
function buildCost(pricing: VercelModel["pricing"], existing?: ExistingModel["cost"]) {
|
||||
const input = price(pricing?.input_tiers?.[0]?.cost ?? pricing?.input);
|
||||
const output = price(pricing?.output_tiers?.[0]?.cost ?? pricing?.output);
|
||||
if (input === undefined || output === undefined) return undefined;
|
||||
return {
|
||||
input,
|
||||
output,
|
||||
reasoning: existing?.reasoning,
|
||||
cache_read: price(pricing?.input_cache_read_tiers?.[0]?.cost ?? pricing?.input_cache_read),
|
||||
cache_write: price(pricing?.input_cache_write_tiers?.[0]?.cost ?? pricing?.input_cache_write),
|
||||
tiers: existing?.tiers,
|
||||
};
|
||||
}
|
||||
|
||||
function inferFamily(modelID: string, name: string) {
|
||||
const targets = [modelID, name].map((value) => value.toLowerCase());
|
||||
const families = [...ModelFamilyValues].sort((a, b) => b.length - a.length);
|
||||
return families.find((family) => targets.some((target) => target.includes(family.toLowerCase())))
|
||||
?? families.find((family) => targets.some((target) => isSubsequence(target, family.toLowerCase())));
|
||||
}
|
||||
|
||||
function isSubsequence(target: string, value: string) {
|
||||
let index = 0;
|
||||
for (const character of target) {
|
||||
if (character === value[index]) index++;
|
||||
}
|
||||
return index === value.length;
|
||||
}
|
||||
|
||||
function sameVercelModel(current: ExistingModel, desired: SyncedModel) {
|
||||
const desiredModel = desired as ExistingModel;
|
||||
const fields: Array<[unknown, unknown, boolean?]> = [
|
||||
[current.base_model, desiredModel.base_model],
|
||||
[current.base_model_omit, desiredModel.base_model_omit],
|
||||
[current.name, desiredModel.name],
|
||||
[current.family, desiredModel.family],
|
||||
[current.attachment, desiredModel.attachment],
|
||||
[current.reasoning, desiredModel.reasoning],
|
||||
[current.tool_call, desiredModel.tool_call],
|
||||
[current.structured_output, desiredModel.structured_output],
|
||||
[current.open_weights, desiredModel.open_weights],
|
||||
[current.release_date, desiredModel.release_date],
|
||||
[current.cost?.input, desiredModel.cost?.input, true],
|
||||
[current.cost?.output, desiredModel.cost?.output, true],
|
||||
[current.cost?.cache_read, desiredModel.cost?.cache_read, true],
|
||||
[current.cost?.cache_write, desiredModel.cost?.cache_write, true],
|
||||
[current.limit?.context, desiredModel.limit?.context],
|
||||
[current.limit?.input, desiredModel.limit?.input],
|
||||
[current.limit?.output, desiredModel.limit?.output],
|
||||
[current.modalities?.input, desiredModel.modalities?.input],
|
||||
];
|
||||
|
||||
return fields.every(([currentValue, desiredValue, cost]) => {
|
||||
if (cost && currentValue === 0 && desiredValue === undefined) return true;
|
||||
if (cost && typeof currentValue === "number" && typeof desiredValue === "number") {
|
||||
return Math.abs(currentValue - desiredValue) <= 0.001;
|
||||
}
|
||||
if (
|
||||
(currentValue === 0 || desiredValue === 0)
|
||||
&& (typeof currentValue === "number" || typeof desiredValue === "number")
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return JSON.stringify(currentValue) === JSON.stringify(desiredValue);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
import { expect, test } from "bun:test";
|
||||
import path from "node:path";
|
||||
import { mkdtemp, mkdir, readlink, symlink } from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
|
||||
import { syncProvider, type SyncProvider, type SyncedFullModel } from "../src/sync/index.js";
|
||||
|
||||
const model: SyncedFullModel = {
|
||||
name: "Test model",
|
||||
release_date: "2026-01-01",
|
||||
last_updated: "2026-01-01",
|
||||
attachment: false,
|
||||
reasoning: false,
|
||||
tool_call: false,
|
||||
open_weights: false,
|
||||
cost: { input: 1, output: 2 },
|
||||
limit: { context: 1_000, output: 100 },
|
||||
modalities: { input: ["text"], output: ["text"] },
|
||||
};
|
||||
|
||||
async function fixture() {
|
||||
const root = await mkdtemp(path.join(os.tmpdir(), "models-dev-sync-"));
|
||||
const modelsDir = path.join(root, "providers", "test", "models");
|
||||
await mkdir(modelsDir, { recursive: true });
|
||||
return { root, modelsDir };
|
||||
}
|
||||
|
||||
function provider(
|
||||
modelsDir: string,
|
||||
ids: string[],
|
||||
deleteMissing = true,
|
||||
preserveSymlinks = false,
|
||||
): SyncProvider<string> {
|
||||
return {
|
||||
id: "test",
|
||||
name: "Test",
|
||||
modelsDir,
|
||||
deleteMissing,
|
||||
preserveSymlinks,
|
||||
missingNotice: (paths) => paths.map((item) => `missing: ${item}`),
|
||||
async fetchModels() {
|
||||
return ids;
|
||||
},
|
||||
parseModels(raw) {
|
||||
return raw as string[];
|
||||
},
|
||||
translateModel(id) {
|
||||
return { id, model };
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
test("sync repairs a broken symlink returned by the source", async () => {
|
||||
const { modelsDir } = await fixture();
|
||||
const filePath = path.join(modelsDir, "model.toml");
|
||||
await symlink("missing.toml", filePath);
|
||||
|
||||
const result = await syncProvider(provider(modelsDir, ["model"]));
|
||||
|
||||
expect(result.created).toBe(1);
|
||||
expect(await Bun.file(filePath).text()).toContain('name = "Test model"');
|
||||
expect(readlink(filePath)).rejects.toThrow();
|
||||
});
|
||||
|
||||
test("sync preserves valid symlink aliases when configured", async () => {
|
||||
const { root, modelsDir } = await fixture();
|
||||
const targetPath = path.join(root, "target.toml");
|
||||
const filePath = path.join(modelsDir, "model.toml");
|
||||
await Bun.write(targetPath, `name = "Alias target"\n`);
|
||||
await symlink(targetPath, filePath);
|
||||
|
||||
const result = await syncProvider(provider(modelsDir, ["model"], true, true));
|
||||
|
||||
expect(result.updated).toBe(0);
|
||||
expect(await readlink(filePath)).toBe(targetPath);
|
||||
});
|
||||
|
||||
test("sync removes a broken symlink absent from the source", async () => {
|
||||
const { modelsDir } = await fixture();
|
||||
const filePath = path.join(modelsDir, "model.toml");
|
||||
await symlink("missing.toml", filePath);
|
||||
|
||||
const result = await syncProvider(provider(modelsDir, []));
|
||||
|
||||
expect(result.deleted).toBe(1);
|
||||
expect(await Bun.file(filePath).exists()).toBe(false);
|
||||
});
|
||||
|
||||
test("non-deleting sync reports missing broken symlinks", async () => {
|
||||
const { modelsDir } = await fixture();
|
||||
const filePath = path.join(modelsDir, "model.toml");
|
||||
await symlink("missing.toml", filePath);
|
||||
|
||||
const result = await syncProvider(provider(modelsDir, [], false));
|
||||
|
||||
expect(result.deleted).toBe(0);
|
||||
expect(result.notices).toEqual(["missing: model.toml"]);
|
||||
expect(await readlink(filePath)).toBe("missing.toml");
|
||||
});
|
||||
@@ -0,0 +1,77 @@
|
||||
import { expect, test } from "bun:test";
|
||||
|
||||
import { buildVercelModel, type VercelModel } from "../src/sync/providers/vercel.js";
|
||||
|
||||
const model: VercelModel = {
|
||||
id: "openai/gpt-test",
|
||||
name: "GPT Test",
|
||||
created: 1_700_000_000,
|
||||
released: 1_710_000_000,
|
||||
context_window: 128_000,
|
||||
max_tokens: 32_000,
|
||||
type: "language",
|
||||
tags: ["reasoning", "tool-use", "vision", "file-input"],
|
||||
pricing: {
|
||||
input: "0.000001",
|
||||
output: "0.000004",
|
||||
input_cache_read: "0.0000001",
|
||||
},
|
||||
};
|
||||
|
||||
test("Vercel models translate gateway metadata", () => {
|
||||
const synced = buildVercelModel(model, undefined);
|
||||
|
||||
expect(synced).toMatchObject({
|
||||
name: "GPT Test",
|
||||
release_date: "2024-03-09",
|
||||
last_updated: "2024-03-09",
|
||||
attachment: true,
|
||||
reasoning: true,
|
||||
tool_call: true,
|
||||
open_weights: false,
|
||||
cost: { input: 1, output: 4, cache_read: 0.1 },
|
||||
limit: { context: 128_000, input: 96_000, output: 32_000 },
|
||||
modalities: { input: ["text", "image", "pdf"], output: ["text"] },
|
||||
});
|
||||
});
|
||||
|
||||
test("Vercel models preserve curated metadata and missing limits", () => {
|
||||
const synced = buildVercelModel({
|
||||
...model,
|
||||
context_window: 0,
|
||||
max_tokens: 0,
|
||||
}, {
|
||||
name: "Curated name",
|
||||
release_date: "2024-01-01",
|
||||
last_updated: "2025-01-01",
|
||||
reasoning_options: [{ type: "effort", values: ["low", "high"] }],
|
||||
cost: {
|
||||
input: 2,
|
||||
output: 8,
|
||||
tiers: [{
|
||||
tier: { type: "context", size: 200_000 },
|
||||
input: 3,
|
||||
output: 12,
|
||||
}],
|
||||
},
|
||||
limit: { context: 64_000, input: 48_000, output: 16_000 },
|
||||
});
|
||||
|
||||
expect(synced.name).toBe("Curated name");
|
||||
expect(synced.last_updated).toBe("2025-01-01");
|
||||
expect(synced.reasoning_options).toEqual([{ type: "effort", values: ["low", "high"] }]);
|
||||
expect(synced.cost?.tiers).toHaveLength(1);
|
||||
expect(synced.limit).toEqual({ context: 64_000, input: 48_000, output: 16_000 });
|
||||
});
|
||||
|
||||
test("Vercel models use canonical metadata when available", () => {
|
||||
const synced = buildVercelModel({
|
||||
...model,
|
||||
id: "nvidia/nemotron-3-ultra-550b-a55b",
|
||||
name: "Nemotron 3 Ultra",
|
||||
}, undefined);
|
||||
|
||||
expect("base_model" in synced ? synced.base_model : undefined)
|
||||
.toBe("nvidia/nemotron-3-ultra-550b-a55b");
|
||||
expect("last_updated" in synced ? synced.last_updated : undefined).toBeUndefined();
|
||||
});
|
||||
+1
-11
@@ -1,13 +1,7 @@
|
||||
base_model = "deepseek/deepseek-r1"
|
||||
name = "Deepseek R1 Distill Qwen 32B"
|
||||
family = "deepseek"
|
||||
release_date = "2025-01-22"
|
||||
last_updated = "2025-01-22"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = false
|
||||
structured_output = false
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0.497
|
||||
@@ -16,7 +10,3 @@ output = 4.881
|
||||
[limit]
|
||||
context = 80_000
|
||||
output = 80_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
@@ -1,13 +1,4 @@
|
||||
name = "Gemma 4 26B A4B IT"
|
||||
family = "gemma"
|
||||
release_date = "2025-12-15"
|
||||
last_updated = "2025-12-15"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = true
|
||||
base_model = "google/gemma-4-26b-a4b-it"
|
||||
|
||||
[cost]
|
||||
input = 0.1
|
||||
@@ -16,7 +7,3 @@ output = 0.3
|
||||
[limit]
|
||||
context = 256_000
|
||||
output = 16_384
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
output = ["text"]
|
||||
+1
-11
@@ -1,13 +1,7 @@
|
||||
base_model = "meta/llama-3.3-70b-instruct"
|
||||
name = "Llama 3.3 70B Instruct fp8 Fast"
|
||||
family = "llama"
|
||||
release_date = "2024-12-06"
|
||||
last_updated = "2024-12-06"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = false
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0.293
|
||||
@@ -16,7 +10,3 @@ output = 2.253
|
||||
[limit]
|
||||
context = 24_000
|
||||
output = 24_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
+1
-12
@@ -1,13 +1,6 @@
|
||||
base_model = "meta/llama-4-scout-17b-instruct"
|
||||
name = "Llama 4 Scout 17B 16E Instruct"
|
||||
family = "llama"
|
||||
release_date = "2025-04-16"
|
||||
last_updated = "2025-04-16"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = false
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0.27
|
||||
@@ -16,7 +9,3 @@ output = 0.85
|
||||
[limit]
|
||||
context = 131_000
|
||||
output = 16_384
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
output = ["text"]
|
||||
@@ -1,14 +1,4 @@
|
||||
name = "Kimi K2.6"
|
||||
family = "kimi"
|
||||
release_date = "2026-04-20"
|
||||
last_updated = "2026-04-20"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2025-01"
|
||||
open_weights = true
|
||||
base_model = "moonshotai/kimi-k2.6"
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
name = "Spotlight"
|
||||
release_date = "2025-05-05"
|
||||
last_updated = "2025-05-05"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = false
|
||||
structured_output = false
|
||||
knowledge = "2025-03-31"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.18
|
||||
output = 0.18
|
||||
|
||||
[limit]
|
||||
context = 131_072
|
||||
output = 65_537
|
||||
|
||||
[modalities]
|
||||
input = ["image", "text"]
|
||||
output = ["text"]
|
||||
@@ -1,23 +0,0 @@
|
||||
name = "ERNIE 4.5 VL 28B A3B"
|
||||
family = "ernie"
|
||||
release_date = "2025-08-12"
|
||||
last_updated = "2025-08-12"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = false
|
||||
knowledge = "2025-03-31"
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0.14
|
||||
output = 0.56
|
||||
|
||||
[limit]
|
||||
context = 30_000
|
||||
output = 8_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
output = ["text"]
|
||||
@@ -2,11 +2,12 @@ base_model = "google/gemma-4-31b-it"
|
||||
|
||||
[cost]
|
||||
input = 0.12
|
||||
output = 0.37
|
||||
output = 0.36
|
||||
cache_read = 0.09
|
||||
|
||||
[limit]
|
||||
context = 262_144
|
||||
output = 16_384
|
||||
context = 256_000
|
||||
output = 8_192
|
||||
|
||||
[modalities]
|
||||
input = ["image", "text", "video"]
|
||||
|
||||
@@ -11,8 +11,8 @@ knowledge = "2023-12-31"
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0.04
|
||||
output = 0.04
|
||||
input = 0.14
|
||||
output = 0.14
|
||||
|
||||
[limit]
|
||||
context = 8_192
|
||||
|
||||
@@ -7,4 +7,4 @@ output = 1.2
|
||||
|
||||
[limit]
|
||||
context = 196_608
|
||||
output = 131_072
|
||||
output = 196_608
|
||||
@@ -1,23 +0,0 @@
|
||||
name = "GPT-4 Turbo (older v1106)"
|
||||
family = "gpt"
|
||||
release_date = "2023-11-06"
|
||||
last_updated = "2023-11-06"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2023-04-30"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 10
|
||||
output = 30
|
||||
|
||||
[limit]
|
||||
context = 128_000
|
||||
output = 4_096
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
@@ -1,21 +1,21 @@
|
||||
name = "Qwen3-14B"
|
||||
family = "qwen"
|
||||
release_date = "2025-04"
|
||||
release_date = "2025-04-01"
|
||||
last_updated = "2025-04"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2025-04"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.06
|
||||
input = 0.12
|
||||
output = 0.24
|
||||
|
||||
[limit]
|
||||
context = 40960
|
||||
output = 16384
|
||||
context = 40_960
|
||||
output = 16_384
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
name = "Qwen3 235B A22B Instruct 2507"
|
||||
family = "qwen"
|
||||
release_date = "2025-04"
|
||||
release_date = "2025-04-01"
|
||||
last_updated = "2025-04"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2025-04"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.13
|
||||
output = 0.6
|
||||
input = 0.22
|
||||
output = 0.88
|
||||
|
||||
[limit]
|
||||
context = 40960
|
||||
output = 16384
|
||||
context = 262_144
|
||||
output = 16_384
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
name = "Qwen3-30B-A3B"
|
||||
family = "qwen"
|
||||
release_date = "2025-04"
|
||||
release_date = "2025-04-01"
|
||||
last_updated = "2025-04"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2025-04"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.08
|
||||
output = 0.29
|
||||
|
||||
[limit]
|
||||
context = 40960
|
||||
output = 16384
|
||||
context = 40_960
|
||||
output = 16_384
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
name = "Qwen 3.32B"
|
||||
family = "qwen"
|
||||
release_date = "2025-04"
|
||||
release_date = "2025-04-01"
|
||||
last_updated = "2025-04"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2025-04"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.1
|
||||
output = 0.3
|
||||
input = 0.16
|
||||
output = 0.64
|
||||
|
||||
[limit]
|
||||
context = 40960
|
||||
output = 16384
|
||||
context = 128_000
|
||||
output = 8_192
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
name = "Qwen 3.6 Max Preview"
|
||||
family = "qwen"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
release_date = "2026-04-20"
|
||||
last_updated = "2026-04-24"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
@@ -19,5 +19,5 @@ context = 240_000
|
||||
output = 64_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
input = ["text", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -1,21 +1,21 @@
|
||||
name = "Qwen3 235B A22B Thinking 2507"
|
||||
family = "qwen"
|
||||
release_date = "2025-04"
|
||||
release_date = "2025-09-24"
|
||||
last_updated = "2025-04"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2025-04"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.3
|
||||
output = 2.9
|
||||
input = 0.4
|
||||
output = 4
|
||||
|
||||
[limit]
|
||||
context = 262114
|
||||
output = 262114
|
||||
context = 131_072
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
name = "Qwen 3 Coder 30B A3B Instruct"
|
||||
family = "qwen"
|
||||
release_date = "2025-04"
|
||||
release_date = "2025-04-01"
|
||||
last_updated = "2025-04"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2025-04"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.07
|
||||
output = 0.27
|
||||
input = 0.15
|
||||
output = 0.6
|
||||
|
||||
[limit]
|
||||
context = 160000
|
||||
output = 32768
|
||||
context = 262_144
|
||||
output = 8_192
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,22 +1,11 @@
|
||||
name = "Qwen3 Coder Plus"
|
||||
family = "qwen"
|
||||
release_date = "2025-07-23"
|
||||
last_updated = "2025-07-23"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
knowledge = "2025-04"
|
||||
tool_call = true
|
||||
base_model = "alibaba/qwen3-coder-plus"
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 1.0
|
||||
output = 5.0
|
||||
input = 1
|
||||
output = 5
|
||||
cache_read = 0.2
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 1_000_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
output = 65_536
|
||||
@@ -1,21 +1,22 @@
|
||||
name = "Qwen3 Coder 480B A35B Instruct"
|
||||
family = "qwen"
|
||||
release_date = "2025-04"
|
||||
release_date = "2025-04-01"
|
||||
last_updated = "2025-04"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2025-04"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.38
|
||||
output = 1.53
|
||||
input = 1.5
|
||||
output = 7.5
|
||||
cache_read = 0.3
|
||||
|
||||
[limit]
|
||||
context = 262144
|
||||
output = 66536
|
||||
context = 262_144
|
||||
output = 65_536
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -4,17 +4,13 @@ release_date = "2025-11-14"
|
||||
last_updated = "2025-11-14"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = false
|
||||
temperature = true
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.01
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 32768
|
||||
output = 32768
|
||||
context = 32_768
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -4,17 +4,13 @@ release_date = "2025-06-05"
|
||||
last_updated = "2025-06-05"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = false
|
||||
temperature = true
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.02
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 32768
|
||||
output = 32768
|
||||
context = 32_768
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -4,17 +4,13 @@ release_date = "2025-06-05"
|
||||
last_updated = "2025-06-05"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = false
|
||||
temperature = true
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.05
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 32768
|
||||
output = 32768
|
||||
context = 32_768
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,23 +1,10 @@
|
||||
name = "Qwen3 Max"
|
||||
family = "qwen"
|
||||
release_date = "2025-09-23"
|
||||
last_updated = "2025-09-23"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
knowledge = "2025-04"
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
base_model = "alibaba/qwen3-max"
|
||||
|
||||
[cost]
|
||||
input = 1.2
|
||||
output = 6.0
|
||||
cached_input = 0.24
|
||||
output = 6
|
||||
cache_read = 0.24
|
||||
|
||||
[limit]
|
||||
context = 262_144
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
@@ -1,22 +1,7 @@
|
||||
base_model = "alibaba/qwen3-next-80b-a3b-instruct"
|
||||
name = "Qwen3 Next 80B A3B Instruct"
|
||||
family = "qwen"
|
||||
release_date = "2025-09-12"
|
||||
last_updated = "2025-09-12"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
knowledge = "2025-04"
|
||||
tool_call = true
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0.09
|
||||
output = 1.1
|
||||
|
||||
[limit]
|
||||
context = 262144
|
||||
output = 32768
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
input = 0.15
|
||||
output = 1.2
|
||||
@@ -1,22 +1,8 @@
|
||||
base_model = "alibaba/qwen3-next-80b-a3b-thinking"
|
||||
name = "Qwen3 Next 80B A3B Thinking"
|
||||
family = "qwen"
|
||||
release_date = "2025-09-12"
|
||||
last_updated = "2025-09-12"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2025-09"
|
||||
tool_call = true
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0.15
|
||||
output = 1.5
|
||||
|
||||
[limit]
|
||||
context = 131_072
|
||||
output = 65536
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
output = 1.2
|
||||
@@ -1,21 +1,21 @@
|
||||
name = "Qwen3 VL 235B A22B Instruct"
|
||||
family = "qwen"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
tool_call = false
|
||||
temperature = true
|
||||
release_date = "2025-09-24"
|
||||
last_updated = "2026-05-01"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.39999999999999997
|
||||
output = 1.5999999999999999
|
||||
input = 0.4
|
||||
output = 1.6
|
||||
|
||||
[limit]
|
||||
context = 131_072
|
||||
output = 129_024
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -5,18 +5,18 @@ last_updated = "2025-09-24"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
temperature = true
|
||||
knowledge = "2025-04"
|
||||
tool_call = true
|
||||
knowledge = "2025-04"
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0.7
|
||||
output = 2.8
|
||||
input = 0.4
|
||||
output = 1.6
|
||||
|
||||
[limit]
|
||||
context = 131_072
|
||||
output = 129_024
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -5,18 +5,18 @@ last_updated = "2025-09-24"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2025-09"
|
||||
tool_call = true
|
||||
knowledge = "2025-09"
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0.7
|
||||
output = 8.4
|
||||
input = 0.4
|
||||
output = 4
|
||||
|
||||
[limit]
|
||||
context = 131_072
|
||||
output = 129_024
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -1,12 +1,6 @@
|
||||
base_model = "alibaba/qwen3.5-plus"
|
||||
name = "Qwen 3.5 Plus"
|
||||
family = "qwen"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
release_date = "2026-02-16"
|
||||
last_updated = "2026-02-19"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.4
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
base_model = "alibaba/qwen3.6-27b"
|
||||
name = "Qwen 3.6 27B"
|
||||
family = "qwen3.6"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
release_date = "2026-04-22"
|
||||
last_updated = "2026-05-01"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.6
|
||||
output = 3.5999999999999996
|
||||
output = 3.6
|
||||
|
||||
[limit]
|
||||
context = 256_000
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
base_model = "alibaba/qwen3.6-plus"
|
||||
name = "Qwen 3.6 Plus"
|
||||
family = "qwen"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
release_date = "2026-04-02"
|
||||
last_updated = "2026-04-03"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.5
|
||||
output = 3
|
||||
cache_read = 0.09999999999999999
|
||||
cache_read = 0.1
|
||||
cache_write = 0.625
|
||||
|
||||
[limit]
|
||||
|
||||
@@ -1,23 +1,17 @@
|
||||
base_model = "alibaba/qwen3.7-max"
|
||||
name = "Qwen 3.7 Max"
|
||||
family = "qwen"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
release_date = "2026-05-21"
|
||||
last_updated = "2026-05-21"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 2.5
|
||||
output = 7.5
|
||||
cache_read = 0.5
|
||||
cache_write = 3.125
|
||||
input = 1.25
|
||||
output = 3.75
|
||||
cache_read = 0.25
|
||||
cache_write = 1.5625
|
||||
|
||||
[limit]
|
||||
context = 991_000
|
||||
output = 64_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
input = ["text", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -0,0 +1,19 @@
|
||||
base_model = "alibaba/qwen3.7-plus"
|
||||
name = "Qwen 3.7 Plus"
|
||||
family = "qwen3.7-plus"
|
||||
release_date = "2026-06-01"
|
||||
attachment = true
|
||||
|
||||
[cost]
|
||||
input = 0.4
|
||||
output = 1.6
|
||||
cache_read = 0.08
|
||||
cache_write = 0.5
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 64_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -6,16 +6,17 @@ attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
knowledge = "2024-10"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.3
|
||||
output = 2.5
|
||||
cache_read = 0.075
|
||||
|
||||
[limit]
|
||||
context = 1000000
|
||||
output = 1000000
|
||||
context = 1_000_000
|
||||
output = 1_000_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
name = "Titan Text Embeddings V2"
|
||||
family = "titan-embed"
|
||||
release_date = "2024-04"
|
||||
release_date = "2024-04-01"
|
||||
last_updated = "2024-04"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = false
|
||||
temperature = true
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.02
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 8192
|
||||
output = 1536
|
||||
context = 8_192
|
||||
output = 1_536
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,26 +1,10 @@
|
||||
base_model = "anthropic/claude-haiku-4-5"
|
||||
name = "Claude Haiku 4.5"
|
||||
family = "claude-haiku"
|
||||
release_date = "2025-10-15"
|
||||
last_updated = "2025-10-15"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
knowledge = "2025-02-28"
|
||||
open_weights = false
|
||||
|
||||
interleaved = true
|
||||
|
||||
[cost]
|
||||
input = 1.00
|
||||
output = 5.00
|
||||
cache_read = 0.10
|
||||
input = 1
|
||||
output = 5
|
||||
cache_read = 0.1
|
||||
cache_write = 1.25
|
||||
|
||||
[limit]
|
||||
context = 200_000
|
||||
output = 64_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -1,26 +1,11 @@
|
||||
base_model = "anthropic/claude-opus-4-5"
|
||||
name = "Claude Opus 4.5"
|
||||
family = "claude-opus"
|
||||
release_date = "2025-11-24"
|
||||
last_updated = "2025-11-24"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
knowledge = "2025-03-31"
|
||||
open_weights = false
|
||||
release_date = "2024-11-24"
|
||||
|
||||
interleaved = true
|
||||
|
||||
[cost]
|
||||
input = 5.00
|
||||
output = 25.00
|
||||
input = 5
|
||||
output = 25
|
||||
cache_read = 0.5
|
||||
cache_write = 18.75
|
||||
|
||||
[limit]
|
||||
context = 200_000
|
||||
output = 64_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
cache_write = 6.25
|
||||
@@ -1,26 +1,9 @@
|
||||
name = "Claude Opus 4.6"
|
||||
family = "claude-opus"
|
||||
release_date = "2026-02"
|
||||
last_updated = "2026-02"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
knowledge = "2025-05-31"
|
||||
open_weights = false
|
||||
base_model = "anthropic/claude-opus-4-6"
|
||||
|
||||
interleaved = true
|
||||
|
||||
[cost]
|
||||
input = 5.00
|
||||
output = 25.00
|
||||
cache_read = 0.50
|
||||
input = 5
|
||||
output = 25
|
||||
cache_read = 0.5
|
||||
cache_write = 6.25
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -1,23 +1,8 @@
|
||||
name = "Claude Opus 4.7"
|
||||
family = "claude-opus"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = false
|
||||
release_date = "2026-04-16"
|
||||
last_updated = "2026-04-16"
|
||||
open_weights = false
|
||||
base_model = "anthropic/claude-opus-4-7"
|
||||
temperature = true
|
||||
|
||||
[cost]
|
||||
input = 5
|
||||
output = 25
|
||||
cache_read = 0.5
|
||||
cache_write = 6.25
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -1,23 +1,8 @@
|
||||
name = "Claude Opus 4.8"
|
||||
family = "claude-opus"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
base_model = "anthropic/claude-opus-4-8"
|
||||
temperature = true
|
||||
release_date = "2026-05-28"
|
||||
last_updated = "2026-05-28"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 5
|
||||
output = 25
|
||||
cache_read = 0.5
|
||||
cache_write = 6.25
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -1,33 +1,20 @@
|
||||
name = "Claude Sonnet 4.6"
|
||||
family = "claude-sonnet"
|
||||
release_date = "2026-02-17"
|
||||
last_updated = "2026-02-17"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
knowledge = "2025-08-31"
|
||||
open_weights = false
|
||||
base_model = "anthropic/claude-sonnet-4-6"
|
||||
|
||||
interleaved = true
|
||||
|
||||
[cost]
|
||||
input = 3.00
|
||||
output = 15.00
|
||||
cache_read = 0.30
|
||||
input = 3
|
||||
output = 15
|
||||
cache_read = 0.3
|
||||
cache_write = 3.75
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 200_000 }
|
||||
input = 6.00
|
||||
output = 22.50
|
||||
cache_read = 0.60
|
||||
cache_write = 7.50
|
||||
tier = { type = "context", size = 200_000 }
|
||||
input = 6
|
||||
output = 22.5
|
||||
cache_read = 0.6
|
||||
cache_write = 7.5
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -1,17 +1,17 @@
|
||||
name = "Trinity Large Preview"
|
||||
family = "trinity"
|
||||
release_date = "2025-01"
|
||||
release_date = "2025-01-01"
|
||||
last_updated = "2025-01"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2024-10"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.25
|
||||
output = 1.00
|
||||
output = 1
|
||||
|
||||
[limit]
|
||||
context = 131_000
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
name = "Trinity Mini"
|
||||
family = "trinity"
|
||||
release_date = "2025-12"
|
||||
release_date = "2025-12-01"
|
||||
last_updated = "2025-12"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
knowledge = "2024-10"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.05
|
||||
input = 0.045
|
||||
output = 0.15
|
||||
|
||||
[limit]
|
||||
context = 131072
|
||||
output = 131072
|
||||
context = 131_072
|
||||
output = 131_072
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
name = "Seed 1.6"
|
||||
family = "seed"
|
||||
release_date = "2025-09"
|
||||
release_date = "2025-09-01"
|
||||
last_updated = "2025-09"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2024-10"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.25
|
||||
@@ -15,8 +15,8 @@ output = 2
|
||||
cache_read = 0.05
|
||||
|
||||
[limit]
|
||||
context = 256000
|
||||
output = 32000
|
||||
context = 256_000
|
||||
output = 32_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
name = "Seed 1.8"
|
||||
family = "seed"
|
||||
release_date = "2025-10"
|
||||
release_date = "2025-09-01"
|
||||
last_updated = "2025-10"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2024-10"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.25
|
||||
@@ -15,8 +15,8 @@ output = 2
|
||||
cache_read = 0.05
|
||||
|
||||
[limit]
|
||||
context = 256000
|
||||
output = 64000
|
||||
context = 256_000
|
||||
output = 64_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
|
||||
@@ -4,17 +4,13 @@ release_date = "2025-04-15"
|
||||
last_updated = "2025-04-15"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = false
|
||||
temperature = true
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.12
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 8192
|
||||
output = 1536
|
||||
context = 8_192
|
||||
output = 1_536
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -5,17 +5,18 @@ last_updated = "2025-09-22"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2025-07"
|
||||
tool_call = true
|
||||
knowledge = "2025-07"
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0.27
|
||||
output = 1.00
|
||||
output = 1
|
||||
cache_read = 0.135
|
||||
|
||||
[limit]
|
||||
context = 131072
|
||||
output = 65536
|
||||
context = 131_072
|
||||
output = 65_536
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -6,16 +6,17 @@ attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2024-07"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.3
|
||||
output = 1
|
||||
input = 0.56
|
||||
output = 1.68
|
||||
cache_read = 0.28
|
||||
|
||||
[limit]
|
||||
context = 163840
|
||||
output = 128000
|
||||
context = 163_840
|
||||
output = 8_192
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -6,20 +6,19 @@ attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2024-07"
|
||||
open_weights = false
|
||||
|
||||
interleaved = true
|
||||
|
||||
[cost]
|
||||
input = 0.28
|
||||
output = 0.42
|
||||
cache_read = 0.03
|
||||
input = 0.62
|
||||
output = 1.85
|
||||
|
||||
[limit]
|
||||
context = 128000
|
||||
output = 64000
|
||||
context = 128_000
|
||||
output = 8_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -6,18 +6,18 @@ attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
knowledge = "2024-07"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.27
|
||||
output = 0.4
|
||||
cache_read = 0.22
|
||||
input = 0.28
|
||||
output = 0.42
|
||||
cache_read = 0.028
|
||||
|
||||
[limit]
|
||||
context = 163842
|
||||
output = 8000
|
||||
context = 128_000
|
||||
output = 8_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -6,16 +6,17 @@ attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2024-07"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.77
|
||||
output = 0.77
|
||||
input = 0.27
|
||||
output = 1.12
|
||||
cache_read = 0.135
|
||||
|
||||
[limit]
|
||||
context = 163840
|
||||
output = 16384
|
||||
context = 163_840
|
||||
output = 163_840
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,22 +1,12 @@
|
||||
name = "DeepSeek V4 Flash"
|
||||
base_model = "deepseek/deepseek-v4-flash"
|
||||
family = "deepseek"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
release_date = "2026-04-23"
|
||||
last_updated = "2026-04-24"
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0.14
|
||||
output = 0.28
|
||||
cache_read = 0.028
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 384_000
|
||||
cache_read = 0.0028
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -1,22 +1,12 @@
|
||||
name = "DeepSeek V4 Pro"
|
||||
base_model = "deepseek/deepseek-v4-pro"
|
||||
family = "deepseek"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
release_date = "2026-04-23"
|
||||
last_updated = "2026-04-24"
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 1.74
|
||||
output = 3.48
|
||||
cache_read = 0.145
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 384_000
|
||||
input = 0.435
|
||||
output = 0.87
|
||||
cache_read = 0.0036
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
input = ["text", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -1,21 +1,18 @@
|
||||
base_model = "google/gemini-2.5-flash-image"
|
||||
name = "Nano Banana (Gemini 2.5 Flash Image)"
|
||||
family = "gemini-flash"
|
||||
release_date = "2025-03-20"
|
||||
last_updated = "2025-03-20"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
knowledge = "2025-01"
|
||||
|
||||
[cost]
|
||||
input = 0.3
|
||||
output = 2.5
|
||||
cache_read = 0.03
|
||||
|
||||
[limit]
|
||||
context = 32768
|
||||
output = 32768
|
||||
context = 32_768
|
||||
output = 65_536
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,23 +1,11 @@
|
||||
base_model = "google/gemini-2.5-flash-lite"
|
||||
name = "Gemini 2.5 Flash Lite"
|
||||
family = "gemini-flash-lite"
|
||||
release_date = "2025-06-17"
|
||||
last_updated = "2025-06-17"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2025-01"
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.10
|
||||
output = 0.40
|
||||
input = 0.1
|
||||
output = 0.4
|
||||
cache_read = 0.01
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
output = 65_536
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "audio", "video", "pdf"]
|
||||
output = ["text"]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -6,8 +6,8 @@ attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2025-03"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.5
|
||||
@@ -15,8 +15,8 @@ output = 3
|
||||
cache_read = 0.05
|
||||
|
||||
[limit]
|
||||
context = 1000000
|
||||
output = 64000
|
||||
context = 1_000_000
|
||||
output = 65_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
name = "Nano Banana Pro (Gemini 3 Pro Image)"
|
||||
family = "gemini-pro"
|
||||
release_date = "2025-09"
|
||||
release_date = "2025-09-01"
|
||||
last_updated = "2025-09"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
knowledge = "2025-03"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 2
|
||||
output = 120
|
||||
output = 12
|
||||
cache_read = 0.2
|
||||
|
||||
[limit]
|
||||
context = 65536
|
||||
output = 32768
|
||||
context = 65_536
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,29 +1,20 @@
|
||||
name = "Gemini 3 Pro Preview"
|
||||
family = "gemini-pro"
|
||||
release_date = "2025-11-18"
|
||||
last_updated = "2025-11-18"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
knowledge = "2025-01"
|
||||
open_weights = false
|
||||
base_model = "google/gemini-3-pro-preview"
|
||||
|
||||
[cost]
|
||||
input = 2.00
|
||||
output = 12.00
|
||||
cache_read = 0.20
|
||||
input = 2
|
||||
output = 12
|
||||
cache_read = 0.2
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 200_000 }
|
||||
input = 4.00
|
||||
output = 18.00
|
||||
cache_read = 0.40
|
||||
tier = { type = "context", size = 200_000 }
|
||||
input = 4
|
||||
output = 18
|
||||
cache_read = 0.4
|
||||
|
||||
[limit]
|
||||
context = 1000000
|
||||
output = 64000
|
||||
context = 1_000_000
|
||||
output = 64_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video", "audio", "pdf"]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -1,16 +1,11 @@
|
||||
base_model = "google/gemini-3.1-flash-image-preview"
|
||||
name = "Gemini 3.1 Flash Image Preview (Nano Banana 2)"
|
||||
family = "gemini"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = false
|
||||
temperature = true
|
||||
release_date = "2026-02-26"
|
||||
last_updated = "2026-03-06"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.5
|
||||
output = 3
|
||||
cache_read = 0.05
|
||||
|
||||
[limit]
|
||||
context = 131_072
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
name = "Gemini 3.1 Flash Image (Nano Banana 2)"
|
||||
family = "gemini"
|
||||
release_date = "2026-05-28"
|
||||
last_updated = "2026-05-28"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.5
|
||||
output = 3
|
||||
cache_read = 0.05
|
||||
|
||||
[limit]
|
||||
context = 131_072
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
output = ["text", "image"]
|
||||
@@ -1,18 +1,10 @@
|
||||
name = "Gemini 3.1 Flash Lite Preview"
|
||||
base_model = "google/gemini-3.1-flash-lite-preview"
|
||||
family = "gemini"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
release_date = "2026-03-03"
|
||||
last_updated = "2026-03-06"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.25
|
||||
output = 1.50
|
||||
cache_read = 0.025
|
||||
cache_write = 1.00
|
||||
output = 1.5
|
||||
cache_read = 0.03
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
name = "Gemini 3.1 Flash Lite"
|
||||
base_model = "google/gemini-3.1-flash-lite"
|
||||
family = "gemini"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
release_date = "2026-05-07"
|
||||
last_updated = "2026-05-08"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.25
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
name = "Gemini 3.1 Pro Preview"
|
||||
base_model = "google/gemini-3.1-pro-preview"
|
||||
family = "gemini"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
release_date = "2026-02-19"
|
||||
last_updated = "2026-02-24"
|
||||
open_weights = false
|
||||
release_date = "2025-11-18"
|
||||
|
||||
[cost]
|
||||
input = 2
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
name = "Gemini 3.5 Flash"
|
||||
base_model = "google/gemini-3.5-flash"
|
||||
family = "gemini"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
release_date = "2026-05-19"
|
||||
last_updated = "2026-05-21"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 1.5
|
||||
|
||||
@@ -1,21 +1,7 @@
|
||||
name = "Gemini Embedding 001"
|
||||
base_model = "google/gemini-embedding-001"
|
||||
family = "gemini-embedding"
|
||||
release_date = "2025-05-20"
|
||||
last_updated = "2025-05-20"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = false
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.15
|
||||
output = 0
|
||||
temperature = true
|
||||
|
||||
[limit]
|
||||
context = 8192
|
||||
output = 1536
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
context = 8_192
|
||||
output = 1_536
|
||||
@@ -1,16 +1,10 @@
|
||||
name = "Gemma 4 26B A4B IT"
|
||||
family = "gemma"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
release_date = "2026-04-02"
|
||||
last_updated = "2026-04-03"
|
||||
base_model = "google/gemma-4-26b-a4b-it"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.13
|
||||
output = 0.39999999999999997
|
||||
input = 0.15
|
||||
output = 0.6
|
||||
cache_read = 0.015
|
||||
|
||||
[limit]
|
||||
context = 262_144
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
name = "Gemma 4 31B IT"
|
||||
family = "gemma"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
release_date = "2026-04-02"
|
||||
last_updated = "2026-04-03"
|
||||
base_model = "google/gemma-4-31b-it"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.14
|
||||
output = 0.39999999999999997
|
||||
output = 0.4
|
||||
|
||||
[limit]
|
||||
context = 262_144
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
name = "Text Embedding 005"
|
||||
family = "text-embedding"
|
||||
release_date = "2024-08"
|
||||
release_date = "2024-08-01"
|
||||
last_updated = "2024-08"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = false
|
||||
temperature = true
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.03
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 8192
|
||||
output = 1536
|
||||
context = 8_192
|
||||
output = 1_536
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
name = "Text Multilingual Embedding 002"
|
||||
family = "text-embedding"
|
||||
release_date = "2024-03"
|
||||
release_date = "2024-03-01"
|
||||
last_updated = "2024-03"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = false
|
||||
temperature = true
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.03
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 8192
|
||||
output = 1536
|
||||
context = 8_192
|
||||
output = 1_536
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
name = "Mercury Coder Small Beta"
|
||||
family = "mercury"
|
||||
release_date = "2025-02-26"
|
||||
last_updated = "2025-02-26"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.25
|
||||
output = 1
|
||||
|
||||
[limit]
|
||||
context = 32_000
|
||||
output = 16_384
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
@@ -6,12 +6,17 @@ attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
knowledge = "2024-10"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.03
|
||||
output = 1.2
|
||||
cache_read = 0.06
|
||||
|
||||
[limit]
|
||||
context = 256000
|
||||
output = 32000
|
||||
context = 256_000
|
||||
output = 32_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -6,12 +6,12 @@ attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2024-10"
|
||||
open_weights = false
|
||||
|
||||
[limit]
|
||||
context = 128000
|
||||
output = 8192
|
||||
context = 128_000
|
||||
output = 100_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -6,16 +6,16 @@ attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2023-12"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.4
|
||||
output = 0.4
|
||||
input = 0.72
|
||||
output = 0.72
|
||||
|
||||
[limit]
|
||||
context = 131072
|
||||
output = 16384
|
||||
context = 128_000
|
||||
output = 8_192
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -6,16 +6,16 @@ attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2023-12"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.03
|
||||
output = 0.05
|
||||
input = 0.22
|
||||
output = 0.22
|
||||
|
||||
[limit]
|
||||
context = 131072
|
||||
output = 16384
|
||||
context = 128_000
|
||||
output = 8_192
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -6,18 +6,18 @@ attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2024-10"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.3
|
||||
output = 2.4
|
||||
cache_read = 0.03
|
||||
cache_write = 0.38
|
||||
cache_write = 0.375
|
||||
|
||||
[limit]
|
||||
context = 204800
|
||||
output = 131072
|
||||
context = 204_800
|
||||
output = 131_072
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
base_model = "minimax/MiniMax-M2.1"
|
||||
name = "MiniMax M2.1"
|
||||
family = "minimax"
|
||||
release_date = "2025-10-27"
|
||||
last_updated = "2025-10-27"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2024-10"
|
||||
open_weights = false
|
||||
|
||||
interleaved = true
|
||||
|
||||
@@ -15,12 +10,4 @@ interleaved = true
|
||||
input = 0.3
|
||||
output = 1.2
|
||||
cache_read = 0.03
|
||||
cache_write = 0.38
|
||||
|
||||
[limit]
|
||||
context = 204800
|
||||
output = 131072
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
cache_write = 0.375
|
||||
@@ -1,11 +1,6 @@
|
||||
base_model = "minimax/MiniMax-M2.5-highspeed"
|
||||
name = "MiniMax M2.5 High Speed"
|
||||
family = "minimax"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
release_date = "2026-02-12"
|
||||
last_updated = "2026-03-13"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
@@ -15,9 +10,5 @@ cache_read = 0.03
|
||||
cache_write = 0.375
|
||||
|
||||
[limit]
|
||||
context = 0
|
||||
output = 0
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
context = 204_800
|
||||
output = 131_000
|
||||
@@ -1,11 +1,5 @@
|
||||
base_model = "minimax/MiniMax-M2.5"
|
||||
name = "MiniMax M2.5"
|
||||
family = "minimax"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
release_date = "2026-02-12"
|
||||
last_updated = "2026-02-19"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
@@ -17,7 +11,3 @@ cache_write = 0.375
|
||||
[limit]
|
||||
context = 204_800
|
||||
output = 131_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
@@ -1,12 +1,6 @@
|
||||
base_model = "minimax/MiniMax-M2.7-highspeed"
|
||||
name = "MiniMax M2.7 High Speed"
|
||||
family = "minimax"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
release_date = "2026-03-18"
|
||||
last_updated = "2026-03-18"
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0.6
|
||||
@@ -17,7 +11,3 @@ cache_write = 0.375
|
||||
[limit]
|
||||
context = 204_800
|
||||
output = 131_100
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
output = ["text"]
|
||||
@@ -1,12 +1,6 @@
|
||||
base_model = "minimax/MiniMax-M2.7"
|
||||
name = "Minimax M2.7"
|
||||
family = "minimax"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
release_date = "2026-03-18"
|
||||
last_updated = "2026-03-18"
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0.3
|
||||
@@ -17,7 +11,3 @@ cache_write = 0.375
|
||||
[limit]
|
||||
context = 204_800
|
||||
output = 131_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -1,26 +1,15 @@
|
||||
base_model = "minimax/MiniMax-M2"
|
||||
name = "MiniMax M2"
|
||||
family = "minimax"
|
||||
release_date = "2025-10-27"
|
||||
last_updated = "2025-10-27"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
knowledge = "2024-10"
|
||||
open_weights = true
|
||||
|
||||
interleaved = true
|
||||
|
||||
[cost]
|
||||
input = 0.27
|
||||
output = 1.15
|
||||
input = 0.3
|
||||
output = 1.2
|
||||
cache_read = 0.03
|
||||
cache_write = 0.38
|
||||
cache_write = 0.375
|
||||
|
||||
[limit]
|
||||
context = 262114
|
||||
output = 262114
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
context = 205_000
|
||||
output = 205_000
|
||||
@@ -0,0 +1,17 @@
|
||||
base_model = "minimax/MiniMax-M3"
|
||||
name = "MiniMax M3"
|
||||
family = "minimax-m3"
|
||||
release_date = "2026-05-31"
|
||||
|
||||
[cost]
|
||||
input = 0.3
|
||||
output = 1.2
|
||||
cache_read = 0.06
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 1_000_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -4,17 +4,13 @@ release_date = "2025-05-28"
|
||||
last_updated = "2025-05-28"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = false
|
||||
temperature = true
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.15
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 8192
|
||||
output = 1536
|
||||
context = 8_192
|
||||
output = 1_536
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -6,12 +6,16 @@ attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2024-10"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.4
|
||||
output = 2
|
||||
|
||||
[limit]
|
||||
context = 256000
|
||||
output = 256000
|
||||
context = 256_000
|
||||
output = 256_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -6,12 +6,16 @@ attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2024-10"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.1
|
||||
output = 0.3
|
||||
|
||||
[limit]
|
||||
context = 256000
|
||||
output = 256000
|
||||
context = 256_000
|
||||
output = 256_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -4,17 +4,13 @@ release_date = "2023-12-11"
|
||||
last_updated = "2023-12-11"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = false
|
||||
temperature = true
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.1
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 8192
|
||||
output = 1536
|
||||
context = 8_192
|
||||
output = 1_536
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -6,16 +6,16 @@ attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2024-04"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.04
|
||||
output = 0.17
|
||||
input = 0.02
|
||||
output = 0.04
|
||||
|
||||
[limit]
|
||||
context = 60288
|
||||
output = 16000
|
||||
context = 131_072
|
||||
output = 131_072
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
name = "Kimi K2 Thinking Turbo"
|
||||
family = "kimi-thinking"
|
||||
release_date = "2025-11-06"
|
||||
last_updated = "2025-11-06"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
base_model = "moonshotai/kimi-k2-thinking-turbo"
|
||||
open_weights = false
|
||||
knowledge = "2024-08"
|
||||
|
||||
interleaved = true
|
||||
|
||||
@@ -17,9 +9,5 @@ output = 8
|
||||
cache_read = 0.15
|
||||
|
||||
[limit]
|
||||
context = 262114
|
||||
output = 262114
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
context = 262_114
|
||||
output = 262_114
|
||||
@@ -1,25 +1,13 @@
|
||||
name = "Kimi K2 Thinking"
|
||||
family = "kimi-thinking"
|
||||
release_date = "2025-11-06"
|
||||
last_updated = "2025-11-06"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
base_model = "moonshotai/kimi-k2-thinking"
|
||||
open_weights = false
|
||||
knowledge = "2024-08"
|
||||
|
||||
interleaved = true
|
||||
|
||||
[cost]
|
||||
input = 0.47
|
||||
output = 2
|
||||
cache_read = 0.14
|
||||
input = 0.6
|
||||
output = 2.5
|
||||
cache_read = 0.15
|
||||
|
||||
[limit]
|
||||
context = 216144
|
||||
output = 216144
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
context = 262_114
|
||||
output = 262_114
|
||||
@@ -6,16 +6,17 @@ attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
knowledge = "2024-08"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 2.4
|
||||
output = 10
|
||||
input = 1.15
|
||||
output = 8
|
||||
cache_read = 0.15
|
||||
|
||||
[limit]
|
||||
context = 256000
|
||||
output = 16384
|
||||
context = 256_000
|
||||
output = 16_384
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,24 +1,20 @@
|
||||
name = "Kimi K2.5"
|
||||
base_model = "moonshotai/kimi-k2.5"
|
||||
family = "kimi"
|
||||
release_date = "2026-01-26"
|
||||
last_updated = "2026-01-26"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
knowledge = "2025-01"
|
||||
open_weights = true
|
||||
|
||||
interleaved = true
|
||||
|
||||
[cost]
|
||||
input = 0.60
|
||||
output = 1.20
|
||||
input = 0.6
|
||||
output = 3
|
||||
cache_read = 0.1
|
||||
|
||||
[limit]
|
||||
context = 262_144
|
||||
output = 262_144
|
||||
context = 262_114
|
||||
output = 262_114
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
input = ["text", "image"]
|
||||
output = ["text"]
|
||||
@@ -1,12 +1,5 @@
|
||||
name = "Kimi K2.6"
|
||||
family = "kimi-k2.6"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
temperature = true
|
||||
base_model = "moonshotai/kimi-k2.6"
|
||||
release_date = "2026-04-20"
|
||||
last_updated = "2026-04-24"
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0.95
|
||||
|
||||
Loaded 100 of 172 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user