Compare commits

..
Author SHA1 Message Date
Aiden Cline eccae0b54e sync openrouter models with extends 2026-05-20 20:32:11 -05:00
Aiden Cline 4cca29405f Merge pull request #1817 from dpuyosa/dev
Venice: Remove Grok 4.1 Fast and add Grok Build 0.1
2026-05-20 20:26:45 -05:00
Aiden Cline e40d9dd338 Merge pull request #1818 from anomalyco/cloudflare-sync-env
chore(sync): isolate cloudflare credentials
2026-05-20 20:26:22 -05:00
Aiden Cline 6a74991397 chore(sync): isolate cloudflare credentials 2026-05-20 20:19:47 -05:00
dpuyosa 035999cb58 [venice] Replace Grok 4.1 Fast with Grok Build 0.1
- Remove deprecated grok-41-fast model entry
- Add grok-build-0-1 with 200K token tiered pricing
- Update context to 256K and output limit to 65,536
2026-05-21 02:36:19 +02:00
Frank cec56bf1bc update zen models 2026-05-20 19:43:25 -04:00
Aiden Cline 85f0cdcb2f Merge pull request #1816 from anomalyco/xai-sync
Add PDF input modality to Grok models
2026-05-20 18:12:47 -05:00
Aiden Cline ef80d4df4e Infer PDF modality for xAI image models 2026-05-20 18:12:11 -05:00
Aiden Cline af0ef00109 Update xAI Grok PDF modalities 2026-05-20 18:06:33 -05:00
Aiden Cline 5fdcea6b36 Merge pull request #1815 from anomalyco/cloudflare-ai-gateway
chore(sync): add cloudflare workers ai sync
2026-05-20 18:02:28 -05:00
Aiden Cline 31e56480b4 chore(sync): add cloudflare workers ai sync 2026-05-20 16:55:29 -05:00
Aiden Cline 92a621594e Merge pull request #1813 from anomalyco/sync-xai
chore(sync): add xai model sync
2026-05-20 16:02:38 -05:00
Aiden Cline d2db353ceb chore: ignore sync reports 2026-05-20 16:01:51 -05:00
Aiden Cline 900ae509d2 Merge pull request #1808 from ajussak/scaleway
Added Mistral Medium 3.5 128B from Scaleway
2026-05-20 15:58:00 -05:00
Adrien Jussak cd3e99025f Update Mistral Medium 3.5 128B model configuration to extend from mistral-medium-2604 and adjust context window size. 2026-05-20 20:43:45 +02:00
Aiden Cline 1098981eb6 chore(sync): add xai model sync 2026-05-20 13:23:02 -05:00
Aiden Cline 27a151cf53 Merge pull request #1811 from anomalyco/xai-grok-build-model
Add xAI Grok Build model
2026-05-20 13:05:06 -05:00
Aiden Cline 41ff42ab7f Merge pull request #1810 from fhennerkes/dev
poe: add Gemini-3.5-Flash model
2026-05-20 13:04:47 -05:00
Aiden Cline adf1cbdecd add xai grok build model 2026-05-20 13:04:13 -05:00
Frank 10ddc78ce0 update zen models 2026-05-20 14:02:01 -04:00
fhennerkesandClaude Opus 4.7 7ae897e440 poe: add Gemini-3.5-Flash model
Add new Google model from Poe API (released 2026-05-19).
Uses extends format inheriting from google/gemini-3.5-flash with
Poe-specific overrides (name format, no temperature, markup pricing,
limited input modalities).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 10:52:15 -07:00
Aiden Cline 02e452c2e8 Merge pull request #1805 from anomalyco/sync-google
sync google models
2026-05-20 10:53:57 -05:00
Aiden Cline f05b63fff5 Merge pull request #1807 from anomalyco/automation/sync-models-aggregators
chore(sync): update aggregator model catalogs
2026-05-20 10:34:30 -05:00
Adrien Jussak e277d60236 Add Mistral Medium 3.5 128B to Scaleway 2026-05-20 16:14:37 +02:00
github-actions[bot] b01277a737 chore(sync): update aggregator model catalogs 2026-05-20 09:25:37 +00:00
Frank a5da5aa429 update zen models 2026-05-20 04:14:28 -04:00
Aiden Cline 11e1d5623a Merge pull request #1806 from Cahl-Dee/grid-model-updates-2026-05
Grid model updates 2026-05
2026-05-19 23:42:26 -05:00
Carl DiClementi e789d7c1f2 Merge branch 'anomalyco:dev' into grid-model-updates-2026-05 2026-05-19 16:06:23 -05:00
Cahl-Dee 899668ad49 added new code and agent models and updated existing text models 2026-05-19 16:04:58 -05:00
175 changed files with 1862 additions and 1104 deletions

No files matched your search

+6
View File
@@ -23,6 +23,10 @@ jobs:
title: "chore(sync): update aggregator model catalogs"
branch: automation/sync-models-aggregators
labels: automation,model-sync,sync-group:aggregators,provider:openrouter
- group: cloudflare
title: "chore(sync): update cloudflare model catalogs"
branch: automation/sync-models-cloudflare
labels: automation,model-sync,sync-group:cloudflare,provider:cloudflare-workers-ai
steps:
- name: Checkout code
@@ -42,6 +46,8 @@ jobs:
run: bun models:sync ${{ matrix.group }}
env:
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
CLOUDFLARE_WORKERS_AI_SYNC_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_WORKERS_AI_SYNC_ACCOUNT_ID }}
CLOUDFLARE_WORKERS_AI_SYNC_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_AI_SYNC_API_TOKEN }}
- name: Validate models
run: bun validate
+1
View File
@@ -3,6 +3,7 @@
.idea
dist
.DS_Store
.sync/
node_modules
data/tokenspeed-monitor.sqlite
data/tokenspeed-monitor.sqlite-shm
+1
View File
@@ -17,6 +17,7 @@
"scripts": {
"validate": "bun ./packages/core/script/validate.ts",
"compare:migrations": "bun ./packages/core/script/compare-model-migrations.ts",
"cloudflare:sync": "bun ./packages/core/script/sync-models.ts cloudflare-workers-ai",
"chutes:generate": "bun ./packages/core/script/generate-chutes.ts",
"databricks:generate": "bun ./packages/core/script/generate-databricks.ts",
"helicone:generate": "bun ./packages/core/script/generate-helicone.ts",
+78 -30
View File
@@ -5,23 +5,44 @@ import { mkdir, readdir, rm } from "node:fs/promises";
import { z } from "zod";
import { AuthoredModel, AuthoredModelShape } from "../src/schema.js";
import { cloudflareWorkersAi } from "./sync/cloudflare-workers-ai.js";
import { google } from "./sync/google.js";
import { openrouter } from "./sync/openrouter.js";
import { xai } from "./sync/xai.js";
const ExistingModel = AuthoredModelShape.partial()
.extend({
extends: z
.object({
from: z.string(),
omit: z.array(z.string()).optional(),
})
.strict()
.optional(),
const ExtendsConfig = z
.object({
from: z.string(),
omit: z.array(z.string()).optional(),
})
.strict();
const ExistingExtendsConfig = z
.object({
from: z.string(),
omit: z.array(z.string()).optional(),
})
.passthrough();
const ExistingModel = AuthoredModelShape.partial()
.extend({
extends: ExistingExtendsConfig.optional(),
})
.strict();
const SyncedExtendsModel = AuthoredModelShape.partial()
.extend({
id: z.string(),
extends: ExtendsConfig,
})
.strict();
const SyncedAuthoredModel = z.union([AuthoredModel, SyncedExtendsModel]);
export type ExistingModel = z.infer<typeof ExistingModel>;
export type SyncedModel = Omit<z.infer<typeof AuthoredModelShape>, "id">;
export type SyncedFullModel = Omit<z.infer<typeof AuthoredModelShape>, "id">;
export type SyncedExtendsModel = Omit<z.infer<typeof SyncedExtendsModel>, "id">;
export type SyncedModel = SyncedFullModel | SyncedExtendsModel;
export interface SyncProvider<SourceModel> {
id: string;
@@ -51,16 +72,21 @@ export interface SyncResult {
}
export const providers: {
"cloudflare-workers-ai": SyncProvider<any>;
google: SyncProvider<any>;
openrouter: SyncProvider<any>;
xai: SyncProvider<any>;
} = {
"cloudflare-workers-ai": cloudflareWorkersAi,
google,
openrouter,
xai,
};
export const groups = {
aggregators: ["openrouter"],
direct: ["google"],
cloudflare: ["cloudflare-workers-ai"],
direct: ["google", "xai"],
} as const;
type ProviderID = keyof typeof providers;
@@ -82,7 +108,7 @@ export async function syncProvider<SourceModel>(
const existing = await readExisting(provider.modelsDir);
const sourceModels = provider.parseModels(await provider.fetchModels());
const desired = new Map<string, { model: z.infer<typeof AuthoredModel>; content: string }>();
const desired = new Map<string, { model: z.infer<typeof SyncedAuthoredModel>; content: string }>();
const skippedRemote: string[] = [];
for (const sourceModel of sourceModels) {
@@ -106,7 +132,7 @@ export async function syncProvider<SourceModel>(
throw new Error(`Duplicate synced model path: ${provider.id}/${relativePath}`);
}
const parsed = AuthoredModel.safeParse({
const parsed = SyncedAuthoredModel.safeParse({
id: translated.id,
...translated.model,
});
@@ -252,9 +278,9 @@ function summarize(
function sameModel(
relativePath: string,
current: ExistingModel,
desired: z.infer<typeof AuthoredModel>,
desired: z.infer<typeof SyncedAuthoredModel>,
) {
const parsed = AuthoredModel.safeParse({
const parsed = SyncedAuthoredModel.safeParse({
id: relativePath.slice(0, -5),
...current,
});
@@ -330,24 +356,38 @@ function formatNumber(n: number) {
return Number.isInteger(n) ? formatInteger(n) : String(n);
}
function formatToml(model: z.infer<typeof AuthoredModel>) {
function formatToml(model: z.infer<typeof SyncedAuthoredModel>) {
const lines: string[] = [];
const extendsLines: string[] = [];
lines.push(`name = ${quote(model.name)}`);
if ("extends" in model) {
extendsLines.push("[extends]");
extendsLines.push(`from = ${quote(model.extends.from)}`);
if (model.extends.omit !== undefined) {
extendsLines.push(`omit = [${model.extends.omit.map(quote).join(", ")}]`);
}
}
if (model.name !== undefined) lines.push(`name = ${quote(model.name)}`);
if (model.family !== undefined) lines.push(`family = ${quote(model.family)}`);
lines.push(`release_date = ${quote(model.release_date)}`);
lines.push(`last_updated = ${quote(model.last_updated)}`);
lines.push(`attachment = ${model.attachment}`);
lines.push(`reasoning = ${model.reasoning}`);
if (model.release_date !== undefined) lines.push(`release_date = ${quote(model.release_date)}`);
if (model.last_updated !== undefined) lines.push(`last_updated = ${quote(model.last_updated)}`);
if (model.attachment !== undefined) lines.push(`attachment = ${model.attachment}`);
if (model.reasoning !== undefined) lines.push(`reasoning = ${model.reasoning}`);
if (model.temperature !== undefined) lines.push(`temperature = ${model.temperature}`);
lines.push(`tool_call = ${model.tool_call}`);
if (model.tool_call !== undefined) lines.push(`tool_call = ${model.tool_call}`);
if (model.structured_output !== undefined) {
lines.push(`structured_output = ${model.structured_output}`);
}
if (model.knowledge !== undefined) lines.push(`knowledge = ${quote(model.knowledge)}`);
lines.push(`open_weights = ${model.open_weights}`);
if (model.open_weights !== undefined) lines.push(`open_weights = ${model.open_weights}`);
if (model.status !== undefined) lines.push(`status = ${quote(model.status)}`);
if (extendsLines.length > 0) {
if (lines.length > 0) lines.push("");
lines.push(...extendsLines);
}
if (model.interleaved !== undefined) {
lines.push("");
if (model.interleaved === true) {
@@ -389,14 +429,22 @@ function formatToml(model: z.infer<typeof AuthoredModel>) {
}
}
lines.push("", "[limit]");
lines.push(`context = ${formatInteger(model.limit.context)}`);
if (model.limit.input !== undefined) lines.push(`input = ${formatInteger(model.limit.input)}`);
lines.push(`output = ${formatInteger(model.limit.output)}`);
if (model.limit !== undefined) {
lines.push("", "[limit]");
if (model.limit.context !== undefined) lines.push(`context = ${formatInteger(model.limit.context)}`);
if (model.limit.input !== undefined) lines.push(`input = ${formatInteger(model.limit.input)}`);
if (model.limit.output !== undefined) lines.push(`output = ${formatInteger(model.limit.output)}`);
}
lines.push("", "[modalities]");
lines.push(`input = [${model.modalities.input.map(quote).join(", ")}]`);
lines.push(`output = [${model.modalities.output.map(quote).join(", ")}]`);
if (model.modalities !== undefined) {
lines.push("", "[modalities]");
if (model.modalities.input !== undefined) {
lines.push(`input = [${model.modalities.input.map(quote).join(", ")}]`);
}
if (model.modalities.output !== undefined) {
lines.push(`output = [${model.modalities.output.map(quote).join(", ")}]`);
}
}
return `${lines.join("\n")}\n`;
}
@@ -0,0 +1,176 @@
import { z } from "zod";
import type { ExistingModel, SyncProvider } from "../sync-models.js";
import {
buildOpenRouterModel,
OpenRouterModel,
OpenRouterResponse,
} from "./openrouter.js";
const API_BASE = "https://api.cloudflare.com/client/v4/accounts";
const CloudflareOpenRouterResponse = z.object({
result: z.union([OpenRouterResponse, z.array(OpenRouterModel)]).optional(),
result_info: z.object({
page: z.number().optional(),
total_pages: z.number().optional(),
}).passthrough().optional(),
}).passthrough();
const CloudflareModel = z.object({
id: z.string(),
name: z.string(),
created: z.number(),
hugging_face_id: z.string().nullable().optional(),
context_length: z.number(),
max_output_length: z.number().nullable().optional(),
input_modalities: z.array(z.string()).optional(),
output_modalities: z.array(z.string()).optional(),
pricing: z.object({
prompt: z.string(),
completion: z.string(),
internal_reasoning: z.string().optional(),
input_cache_read: z.string().optional(),
input_cache_write: z.string().optional(),
}),
supported_features: z.array(z.string()).optional(),
supported_sampling_parameters: z.array(z.string()).optional(),
}).passthrough();
const CloudflareResponse = z.object({
data: z.array(CloudflareModel),
}).passthrough();
type CloudflareModel = z.infer<typeof CloudflareModel>;
export const cloudflareWorkersAi = {
id: "cloudflare-workers-ai",
name: "Cloudflare Workers AI",
modelsDir: "providers/cloudflare-workers-ai/models",
async fetchModels() {
const accountID = process.env.CLOUDFLARE_WORKERS_AI_SYNC_ACCOUNT_ID;
const token = process.env.CLOUDFLARE_WORKERS_AI_SYNC_API_TOKEN;
if (accountID === undefined || token === undefined) {
throw new Error(
"Cloudflare Workers AI sync requires CLOUDFLARE_WORKERS_AI_SYNC_ACCOUNT_ID and CLOUDFLARE_WORKERS_AI_SYNC_API_TOKEN",
);
}
const first = await fetchPage(accountID, token, 1);
const models = parseCloudflareModels(first);
const pageInfo = CloudflareOpenRouterResponse.safeParse(first).success
? CloudflareOpenRouterResponse.parse(first).result_info
: undefined;
for (let page = 2; page <= (pageInfo?.total_pages ?? 1); page++) {
models.push(...parseCloudflareModels(await fetchPage(accountID, token, page)));
}
return { data: models };
},
parseModels(raw) {
return parseCloudflareModels(raw);
},
translateModel(model, context) {
const normalized = normalizeModel(model);
const id = normalized.id.replace(/^workers-ai\//, "");
return {
id,
model: buildWorkersAiModel(normalized, context.existing(id)),
};
},
} satisfies SyncProvider<CloudflareModel>;
function buildWorkersAiModel(model: z.infer<typeof OpenRouterModel>, existing: ExistingModel | undefined) {
const synced = buildOpenRouterModel(model, existing);
return {
...synced,
name: existing?.name ?? synced.name,
release_date: existing?.release_date ?? synced.release_date,
last_updated: existing?.last_updated ?? synced.last_updated,
limit: {
...synced.limit,
output: existing?.limit?.output ?? synced.limit.output,
},
};
}
async function fetchPage(accountID: string, token: string, page: number) {
const url = new URL(`${API_BASE}/${accountID}/ai/models/search`);
url.searchParams.set("format", "openrouter");
url.searchParams.set("per_page", "1000");
url.searchParams.set("page", String(page));
const response = await fetch(url, {
headers: { Authorization: `Bearer ${token}` },
});
if (!response.ok) {
throw new Error(
`Cloudflare Workers AI models request failed: ${response.status} ${response.statusText}${await responseDetails(response)}`,
);
}
return response.json();
}
function parseCloudflareModels(raw: unknown) {
const cloudflare = CloudflareResponse.safeParse(raw);
if (cloudflare.success) return cloudflare.data.data;
const direct = OpenRouterResponse.safeParse(raw);
if (direct.success) return direct.data.data;
const wrapped = CloudflareOpenRouterResponse.parse(raw);
if (wrapped.result === undefined) {
throw new Error("Cloudflare Workers AI response did not include model data");
}
return Array.isArray(wrapped.result) ? wrapped.result : wrapped.result.data;
}
function normalizeModel(model: CloudflareModel) {
if ("architecture" in model && "top_provider" in model && "supported_parameters" in model) {
return OpenRouterModel.parse(model);
}
return OpenRouterModel.parse({
id: model.id.startsWith("@cf/") ? model.id : `@cf/${model.id.replace(/^@cf\//, "")}`,
name: model.name,
created: model.created,
hugging_face_id: model.hugging_face_id ?? null,
knowledge_cutoff: null,
context_length: model.context_length,
architecture: {
input_modalities: model.input_modalities ?? ["text"],
output_modalities: model.output_modalities ?? ["text"],
},
pricing: model.pricing,
top_provider: {
context_length: model.context_length,
max_completion_tokens: model.max_output_length ?? null,
},
supported_parameters: [
...model.supported_sampling_parameters ?? [],
...model.supported_features ?? [],
],
});
}
async function responseDetails(response: Response) {
const text = await response.text();
if (text.length === 0) return "";
try {
const body = z.object({
errors: z.array(z.object({
code: z.union([z.string(), z.number()]).optional(),
message: z.string().optional(),
}).passthrough()).optional(),
}).passthrough().parse(JSON.parse(text));
const details = body.errors
?.map((error) => [error.code, error.message].filter(Boolean).join(": "))
.filter((message) => message.length > 0)
.join("; ");
return details === undefined || details.length === 0 ? "" : ` (${details})`;
} catch {
return "";
}
}
+222 -32
View File
@@ -1,11 +1,34 @@
import { z } from "zod";
import { readFileSync, readdirSync } from "node:fs";
import path from "node:path";
import { ModelFamilyValues } from "../../src/family.js";
import type { ExistingModel, SyncProvider } from "../sync-models.js";
import type { ExistingModel, SyncProvider, SyncedFullModel, SyncedModel } from "../sync-models.js";
const API_ENDPOINT = "https://openrouter.ai/api/v1/models";
const PROVIDERS_DIR = path.join(import.meta.dirname, "..", "..", "..", "..", "providers");
const modelFilesByProvider = new Map<string, Set<string>>();
const canonicalTomlByModel = new Map<string, Record<string, unknown>>();
const OpenRouterModel = z.object({
const CANONICAL_PROVIDER_PREFIXES = {
anthropic: "anthropic",
cohere: "cohere",
deepseek: "deepseek",
google: "google",
meta: "llama",
"meta-llama": "llama",
minimax: "minimax",
mistralai: "mistral",
moonshotai: "moonshotai",
openai: "openai",
"x-ai": "xai",
xai: "xai",
xiaomi: "xiaomi",
zai: "zai",
"z-ai": "zai",
} as const;
export const OpenRouterModel = z.object({
id: z.string(),
name: z.string(),
created: z.number(),
@@ -30,11 +53,11 @@ const OpenRouterModel = z.object({
supported_parameters: z.array(z.string()),
});
const OpenRouterResponse = z.object({
export const OpenRouterResponse = z.object({
data: z.array(OpenRouterModel),
}).passthrough();
type OpenRouterModel = z.infer<typeof OpenRouterModel>;
export type OpenRouterModel = z.infer<typeof OpenRouterModel>;
export const openrouter = {
id: "openrouter",
@@ -56,7 +79,7 @@ export const openrouter = {
translateModel(model, context) {
return {
id: model.id,
model: buildModel(model, context.existing(model.id)),
model: buildOpenRouterModel(model, context.existing(model.id)),
};
},
} satisfies SyncProvider<OpenRouterModel>;
@@ -97,7 +120,7 @@ function inferFamily(model: OpenRouterModel, name: string) {
});
}
function buildModel(model: OpenRouterModel, existing: ExistingModel | undefined) {
export function buildOpenRouterModel(model: OpenRouterModel, existing: ExistingModel | undefined): SyncedModel {
const params = new Set(model.supported_parameters);
const name = model.name.replace(/^[^:]+:\s+/, "");
const input = modalities(model.architecture.input_modalities, ["text"]);
@@ -107,38 +130,205 @@ function buildModel(model: OpenRouterModel, existing: ExistingModel | undefined)
const reasoning = params.has("reasoning") || params.has("include_reasoning");
const context = model.top_provider.context_length ?? model.context_length;
const family = inferFamily(model, name);
const releaseDate = dateFromTimestamp(model.created);
const familyValue = existing?.family === "o" && family !== "o"
? family
: (existing?.family ?? family);
const attachment = input.some((value) => value !== "text");
const toolCall = params.has("tools") || params.has("tool_choice");
const structuredOutput = params.has("structured_outputs");
const knowledge = model.knowledge_cutoff?.slice(0, 10) ?? existing?.knowledge;
const openWeights = Boolean(model.hugging_face_id);
const cost = prompt !== undefined && completion !== undefined
? {
input: prompt,
output: completion,
reasoning: reasoning ? price(model.pricing.internal_reasoning) : undefined,
cache_read: price(model.pricing.input_cache_read),
cache_write: price(model.pricing.input_cache_write),
tiers: existing?.cost?.tiers,
}
: existing?.cost;
const limit = {
context,
input: existing?.limit?.input,
output: model.top_provider.max_completion_tokens ?? existing?.limit?.output ?? context,
};
const canonical = resolveCanonicalModel(model.id);
if (canonical !== undefined) {
return {
extends: {
from: canonical.from,
omit: canonicalOmit(canonical.provider, canonical.modelID, cost, limit),
},
...canonicalRuntimeOverrides(canonical.provider, canonical.modelID, {
name: model.id.endsWith(":free") ? name : undefined,
attachment,
reasoning,
}),
temperature: params.has("temperature"),
tool_call: toolCall,
structured_output: structuredOutput,
status: existing?.status,
interleaved: existing?.interleaved,
cost,
limit,
modalities: { input, output },
};
}
return {
name,
family: existing?.family === "o" && family !== "o"
? family
: (existing?.family ?? family),
release_date: dateFromTimestamp(model.created),
last_updated: dateFromTimestamp(model.created),
attachment: input.some((value) => value !== "text"),
family: familyValue,
release_date: releaseDate,
last_updated: releaseDate,
attachment,
reasoning,
temperature: params.has("temperature"),
tool_call: params.has("tools") || params.has("tool_choice"),
structured_output: params.has("structured_outputs"),
knowledge: model.knowledge_cutoff?.slice(0, 10) ?? existing?.knowledge,
open_weights: Boolean(model.hugging_face_id),
tool_call: toolCall,
structured_output: structuredOutput,
knowledge,
open_weights: openWeights,
status: existing?.status,
interleaved: existing?.interleaved,
cost: prompt !== undefined && completion !== undefined
? {
input: prompt,
output: completion,
reasoning: reasoning ? price(model.pricing.internal_reasoning) : undefined,
cache_read: price(model.pricing.input_cache_read),
cache_write: price(model.pricing.input_cache_write),
tiers: existing?.cost?.tiers,
}
: existing?.cost,
limit: {
context,
input: existing?.limit?.input,
output: model.top_provider.max_completion_tokens ?? existing?.limit?.output ?? context,
},
cost,
limit,
modalities: { input, output },
};
} satisfies SyncedFullModel;
}
function resolveCanonicalModel(openrouterID: string) {
const [prefix, ...modelParts] = openrouterID.split("/");
if (prefix === undefined || modelParts.length === 0) return undefined;
if (openrouterID.startsWith("~/") || prefix.startsWith("~")) return undefined;
const provider = CANONICAL_PROVIDER_PREFIXES[prefix as keyof typeof CANONICAL_PROVIDER_PREFIXES];
if (provider === undefined) return undefined;
const modelID = modelParts.join("/").replace(/:free$/, "");
const candidates = canonicalCandidates(provider, modelID);
const match = candidates.find((candidate) => {
return canonicalModelExists(provider, candidate);
});
return match === undefined
? undefined
: {
from: `${provider}/${match}`,
provider,
modelID: match,
};
}
function canonicalModelExists(provider: string, modelID: string) {
let files = modelFilesByProvider.get(provider);
if (files === undefined) {
try {
files = new Set(readdirSync(path.join(PROVIDERS_DIR, provider, "models")));
} catch {
files = new Set();
}
modelFilesByProvider.set(provider, files);
}
return files.has(`${modelID}.toml`);
}
function canonicalOmit(
provider: string,
modelID: string,
cost: SyncedFullModel["cost"],
limit: SyncedFullModel["limit"],
) {
const toml = canonicalToml(provider, modelID);
const omit = ["provider", "experimental"].filter((key) => toml[key] !== undefined);
const baseCost = toml.cost;
if (baseCost !== undefined && baseCost !== null && typeof baseCost === "object" && !Array.isArray(baseCost)) {
if (cost === undefined) {
omit.push("cost");
} else {
for (const key of ["reasoning", "cache_read", "cache_write", "input_audio", "output_audio", "tiers"] as const) {
if ((baseCost as Record<string, unknown>)[key] !== undefined && cost[key] === undefined) {
omit.push(`cost.${key}`);
}
}
if (hasLegacyContextOver200k(baseCost) && cost.tiers === undefined) {
omit.push("cost.context_over_200k");
}
}
}
const baseLimit = toml.limit;
if (
baseLimit !== undefined &&
baseLimit !== null &&
typeof baseLimit === "object" &&
!Array.isArray(baseLimit) &&
(baseLimit as Record<string, unknown>).input !== undefined &&
limit.input === undefined
) {
omit.push("limit.input");
}
return omit.length > 0 ? omit : undefined;
}
function hasLegacyContextOver200k(cost: object) {
const tiers = (cost as { tiers?: unknown }).tiers;
if (!Array.isArray(tiers) || tiers.length !== 1) return false;
const tier = tiers[0];
if (tier === null || typeof tier !== "object" || Array.isArray(tier)) return false;
const tierConfig = (tier as { tier?: unknown }).tier;
if (tierConfig === null || typeof tierConfig !== "object" || Array.isArray(tierConfig)) return false;
const size = (tierConfig as { size?: unknown }).size;
return typeof size === "number" && size >= 200_000;
}
function canonicalRuntimeOverrides(
provider: string,
modelID: string,
values: Pick<SyncedFullModel, "name" | "attachment" | "reasoning">,
) {
const toml = canonicalToml(provider, modelID);
return Object.fromEntries(
Object.entries(values).filter(([key, value]) => value !== undefined && toml[key] !== value),
);
}
function canonicalToml(provider: string, modelID: string) {
const key = `${provider}/${modelID}`;
let toml = canonicalTomlByModel.get(key);
if (toml === undefined) {
const filePath = path.join(PROVIDERS_DIR, provider, "models", `${modelID}.toml`);
toml = Bun.TOML.parse(readFileSync(filePath, "utf8")) as Record<string, unknown>;
canonicalTomlByModel.set(key, toml);
}
return toml;
}
function canonicalCandidates(provider: string, modelID: string) {
const candidates = [modelID];
if (provider === "anthropic") {
candidates.push(modelID.replace(/(claude-(?:opus|sonnet|haiku)-\d+)\.(\d+)/, "$1-$2"));
candidates.push(modelID.replace(/^claude-3\.5-/, "claude-3-5-"));
}
if (provider === "llama") {
candidates.push(modelID.replace(/^llama-(\d+)-(\d+)/, "llama-$1.$2"));
candidates.push(modelID.replace(/^llama-(4)-(maverick|scout)$/, "llama-$1-$2-17b"));
}
if (provider === "mistral") {
candidates.push(modelID.replace(/-latest$/, ""));
}
if (provider === "minimax") {
candidates.push(modelID.replace(/^minimax-m/, "MiniMax-M"));
}
return [...new Set(candidates)];
}
+206
View File
@@ -0,0 +1,206 @@
import { z } from "zod";
import type { ExistingModel, SyncProvider, SyncedModel } from "../sync-models.js";
const API_BASE = "https://api.x.ai/v1";
const XAIModel = z.object({
id: z.string(),
canonical_id: z.string().optional(),
created: z.number().int().nonnegative(),
aliases: z.array(z.string()).optional(),
input_modalities: z.array(z.string()).optional(),
output_modalities: z.array(z.string()).optional(),
prompt_text_token_price: z.number().int().nonnegative().optional(),
cached_prompt_text_token_price: z.number().int().nonnegative().optional(),
completion_text_token_price: z.number().int().nonnegative().optional(),
max_prompt_length: z.number().int().nonnegative().optional(),
}).passthrough();
const XAIModelList = z.object({
models: z.array(XAIModel),
}).passthrough();
const XAIResponse = z.object({
models: z.array(XAIModel),
});
const XAIAPIKey = z.object({
acls: z.array(z.string()),
}).passthrough();
type XAIModel = z.infer<typeof XAIModel>;
export const xai = {
id: "xai",
name: "xAI",
modelsDir: "providers/xai/models",
skipCreates: true,
sourceID(model) {
return model.id;
},
skippedNotice(ids) {
if (ids.length === 0) return [];
return [
`${ids.length} xAI models returned by the API were not created because the Models API does not provide enough authoritative metadata for the catalog, especially output token limits and some feature/capability flags. Existing models are still updated from API-authoritative fields.`,
`Skipped remote IDs: ${ids.map((id) => `\`${id}\``).join(", ")}`,
];
},
async fetchModels() {
const key = process.env.XAI_API_KEY;
if (key === undefined) throw new Error("xAI sync requires XAI_API_KEY");
await assertFullModelAccess(key);
const models = await Promise.all([
fetchTypedModels(key, "language-models"),
fetchTypedModels(key, "image-generation-models"),
fetchTypedModels(key, "video-generation-models"),
]);
return { models: models.flat() };
},
parseModels(raw) {
const models = XAIResponse.parse(raw).models;
const seen = new Set<string>();
const expanded: XAIModel[] = [];
for (const model of models) {
if (!seen.has(model.id)) {
seen.add(model.id);
expanded.push(model);
}
}
for (const model of models) {
for (const alias of model.aliases ?? []) {
if (seen.has(alias)) continue;
seen.add(alias);
expanded.push({ ...model, id: alias, canonical_id: model.id });
}
}
return expanded;
},
translateModel(model, context) {
const existing = context.existing(model.id);
if (existing === undefined) return undefined;
return {
id: model.id,
model: buildModel(model, existing),
};
},
} satisfies SyncProvider<XAIModel>;
async function assertFullModelAccess(key: string) {
const response = await fetch(`${API_BASE}/api-key`, {
headers: { Authorization: `Bearer ${key}` },
});
if (!response.ok) {
throw new Error(`xAI API key metadata request failed: ${response.status} ${response.statusText}`);
}
const apiKey = XAIAPIKey.parse(await response.json());
if (!apiKey.acls.includes("api-key:model:*")) {
throw new Error("xAI sync requires XAI_API_KEY to include api-key:model:* so the model list is not ACL-filtered");
}
}
async function fetchTypedModels(key: string, endpoint: string) {
const response = await fetch(`${API_BASE}/${endpoint}`, {
headers: { Authorization: `Bearer ${key}` },
});
if (!response.ok) {
throw new Error(`xAI ${endpoint} request failed: ${response.status} ${response.statusText}`);
}
return XAIModelList.parse(await response.json()).models;
}
function dateFromTimestamp(timestamp: number) {
return new Date(timestamp * 1000).toISOString().slice(0, 10);
}
type Modality = "text" | "audio" | "image" | "video" | "pdf";
function modalities(values: string[] | undefined, fallback: Modality[]) {
const allowed = new Set<Modality>(["text", "audio", "image", "video", "pdf"]);
const result = (values ?? [])
.map((value) => value.toLowerCase())
.filter((value): value is Modality => allowed.has(value as Modality));
if (result.includes("image")) result.push("pdf");
return [...new Set(result.length > 0 ? result : fallback)];
}
function tokenPrice(value: number | undefined) {
if (value === undefined) return undefined;
return value / 10_000;
}
function cost(model: XAIModel, existing: ExistingModel) {
const input = tokenPrice(model.prompt_text_token_price);
const output = tokenPrice(model.completion_text_token_price);
if (input === undefined || output === undefined) return existing.cost;
return {
input,
output,
reasoning: existing.cost?.reasoning,
cache_read: tokenPrice(model.cached_prompt_text_token_price),
cache_write: existing.cost?.cache_write,
input_audio: existing.cost?.input_audio,
output_audio: existing.cost?.output_audio,
tiers: existing.cost?.tiers,
};
}
function buildModel(model: XAIModel, existing: ExistingModel): SyncedModel {
const name = existing.name;
const attachment = existing.attachment;
const reasoning = existing.reasoning;
const toolCall = existing.tool_call;
const openWeights = existing.open_weights;
const limit = existing.limit;
const releaseDate = existing.release_date;
const lastUpdated = existing.last_updated;
if (
name === undefined
|| attachment === undefined
|| reasoning === undefined
|| toolCall === undefined
|| openWeights === undefined
|| limit === undefined
|| (model.canonical_id !== undefined && releaseDate === undefined)
|| (model.canonical_id !== undefined && lastUpdated === undefined)
) {
throw new Error(`xAI model ${model.id} has incomplete local TOML metadata required for sync`);
}
const input = modalities(model.input_modalities, existing.modalities?.input ?? ["text"]);
const output = modalities(model.output_modalities, existing.modalities?.output ?? ["text"]);
const created = dateFromTimestamp(model.created);
return {
name,
family: existing.family,
release_date: model.canonical_id === undefined ? created : releaseDate!,
last_updated: model.canonical_id === undefined ? created : lastUpdated!,
attachment: input.some((value) => value !== "text"),
reasoning,
temperature: existing.temperature,
tool_call: toolCall,
structured_output: existing.structured_output,
knowledge: existing.knowledge,
open_weights: openWeights,
status: existing.status,
interleaved: existing.interleaved,
cost: cost(model, existing),
limit: {
input: limit.input,
context: model.max_prompt_length ?? limit.context,
output: limit.output,
},
modalities: { input, output },
};
}
+1
View File
@@ -82,6 +82,7 @@ export const ModelFamilyValues = [
// xAI Grok
"grok",
"grok-build",
"grok-vision",
"grok-beta",
@@ -0,0 +1,22 @@
name = "Gemma Sea Lion V4 27B It"
family = "gemma"
release_date = "2025-09-23"
last_updated = "2025-09-23"
attachment = false
reasoning = false
temperature = true
tool_call = false
structured_output = false
open_weights = true
[cost]
input = 0.351
output = 0.555
[limit]
context = 128_000
output = 128_000
[modalities]
input = ["text"]
output = ["text"]
@@ -0,0 +1,22 @@
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
output = 4.881
[limit]
context = 80_000
output = 80_000
[modalities]
input = ["text"]
output = ["text"]
@@ -0,0 +1,22 @@
name = "Gemma 3 12B It"
family = "gemma"
release_date = "2025-03-18"
last_updated = "2025-03-18"
attachment = false
reasoning = false
temperature = true
tool_call = false
structured_output = false
open_weights = true
[cost]
input = 0.345
output = 0.556
[limit]
context = 80_000
output = 80_000
[modalities]
input = ["text"]
output = ["text"]
@@ -6,15 +6,16 @@ attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
open_weights = true
[cost]
input = 0.10
output = 0.30
input = 0.1
output = 0.3
[limit]
context = 256000
output = 16384
context = 256_000
output = 16_384
[modalities]
input = ["text", "image"]
@@ -0,0 +1,22 @@
name = "Granite 4.0 H Micro"
family = "granite"
release_date = "2025-10-07"
last_updated = "2025-10-07"
attachment = false
reasoning = false
temperature = true
tool_call = true
structured_output = false
open_weights = true
[cost]
input = 0.017
output = 0.112
[limit]
context = 131_000
output = 131_000
[modalities]
input = ["text"]
output = ["text"]
@@ -0,0 +1,22 @@
name = "Llama 2 7B Chat fp16"
family = "llama"
release_date = "2023-11-07"
last_updated = "2023-11-07"
attachment = false
reasoning = false
temperature = true
tool_call = false
structured_output = false
open_weights = true
[cost]
input = 0.556
output = 6.667
[limit]
context = 4_096
output = 4_096
[modalities]
input = ["text"]
output = ["text"]
@@ -0,0 +1,22 @@
name = "Llama 3 8B Instruct Awq"
family = "llama"
release_date = "2024-05-09"
last_updated = "2024-05-09"
attachment = false
reasoning = false
temperature = true
tool_call = false
structured_output = false
open_weights = true
[cost]
input = 0.123
output = 0.266
[limit]
context = 8_192
output = 8_192
[modalities]
input = ["text"]
output = ["text"]
@@ -0,0 +1,22 @@
name = "Llama 3 8B Instruct"
family = "llama"
release_date = "2024-04-18"
last_updated = "2024-04-18"
attachment = false
reasoning = false
temperature = true
tool_call = false
structured_output = false
open_weights = true
[cost]
input = 0.282
output = 0.827
[limit]
context = 7_968
output = 7_968
[modalities]
input = ["text"]
output = ["text"]
@@ -0,0 +1,22 @@
name = "Llama 3.1 8B Instruct Awq"
family = "llama"
release_date = "2024-07-25"
last_updated = "2024-07-25"
attachment = false
reasoning = false
temperature = true
tool_call = false
structured_output = false
open_weights = true
[cost]
input = 0.123
output = 0.266
[limit]
context = 8_192
output = 8_192
[modalities]
input = ["text"]
output = ["text"]
@@ -0,0 +1,22 @@
name = "Llama 3.1 8B Instruct fp8"
family = "llama"
release_date = "2024-07-25"
last_updated = "2024-07-25"
attachment = false
reasoning = false
temperature = true
tool_call = false
structured_output = false
open_weights = true
[cost]
input = 0.152
output = 0.287
[limit]
context = 32_000
output = 32_000
[modalities]
input = ["text"]
output = ["text"]
@@ -0,0 +1,22 @@
name = "Llama 3.2 11B Vision Instruct"
family = "llama"
release_date = "2024-09-25"
last_updated = "2024-09-25"
attachment = true
reasoning = false
temperature = true
tool_call = false
structured_output = false
open_weights = true
[cost]
input = 0.0485
output = 0.676
[limit]
context = 128_000
output = 128_000
[modalities]
input = ["text", "image"]
output = ["text"]
@@ -0,0 +1,22 @@
name = "Llama 3.2 1B Instruct"
family = "llama"
release_date = "2024-09-25"
last_updated = "2024-09-25"
attachment = false
reasoning = false
temperature = true
tool_call = false
structured_output = false
open_weights = true
[cost]
input = 0.027
output = 0.201
[limit]
context = 60_000
output = 60_000
[modalities]
input = ["text"]
output = ["text"]
@@ -0,0 +1,22 @@
name = "Llama 3.2 3B Instruct"
family = "llama"
release_date = "2024-09-25"
last_updated = "2024-09-25"
attachment = false
reasoning = false
temperature = true
tool_call = false
structured_output = false
open_weights = true
[cost]
input = 0.0509
output = 0.335
[limit]
context = 80_000
output = 80_000
[modalities]
input = ["text"]
output = ["text"]
@@ -0,0 +1,22 @@
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
output = 2.253
[limit]
context = 24_000
output = 24_000
[modalities]
input = ["text"]
output = ["text"]
@@ -6,6 +6,7 @@ attachment = true
reasoning = false
temperature = true
tool_call = true
structured_output = false
open_weights = true
[cost]
@@ -13,8 +14,8 @@ input = 0.27
output = 0.85
[limit]
context = 128000
output = 16384
context = 131_000
output = 16_384
[modalities]
input = ["text", "image"]
@@ -0,0 +1,22 @@
name = "Llama Guard 3 8B"
family = "llama"
release_date = "2025-01-22"
last_updated = "2025-01-22"
attachment = false
reasoning = false
temperature = true
tool_call = false
structured_output = false
open_weights = true
[cost]
input = 0.484
output = 0.03
[limit]
context = 131_072
output = 131_072
[modalities]
input = ["text"]
output = ["text"]
@@ -0,0 +1,22 @@
name = "Mistral 7B Instruct V0.1"
family = "mistral"
release_date = "2023-11-07"
last_updated = "2023-11-07"
attachment = false
reasoning = false
temperature = true
tool_call = false
structured_output = false
open_weights = true
[cost]
input = 0.11
output = 0.19
[limit]
context = 2_824
output = 2_824
[modalities]
input = ["text"]
output = ["text"]
@@ -0,0 +1,22 @@
name = "Mistral Small 3.1 24B Instruct"
family = "mistral-small"
release_date = "2025-03-18"
last_updated = "2025-03-18"
attachment = false
reasoning = false
temperature = true
tool_call = true
structured_output = false
open_weights = true
[cost]
input = 0.351
output = 0.555
[limit]
context = 128_000
output = 128_000
[modalities]
input = ["text"]
output = ["text"]
@@ -4,9 +4,9 @@ release_date = "2026-04-20"
last_updated = "2026-04-20"
attachment = true
reasoning = true
structured_output = true
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-01"
open_weights = true
@@ -15,11 +15,11 @@ field = "reasoning_content"
[cost]
input = 0.95
output = 4.00
output = 4
cache_read = 0.16
[limit]
context = 256_000
context = 262_144
output = 256_000
[modalities]
@@ -6,14 +6,15 @@ attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
open_weights = true
[interleaved]
field = "reasoning_content"
[cost]
input = 0.50
output = 1.50
input = 0.5
output = 1.5
[limit]
context = 256_000
@@ -1,10 +1,12 @@
name = "GPT OSS 120B"
family = "gpt-oss"
release_date = "2025-08-05"
last_updated = "2025-08-05"
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
open_weights = true
[cost]
@@ -12,8 +14,8 @@ input = 0.35
output = 0.75
[limit]
context = 128000
output = 16384
context = 128_000
output = 16_384
[modalities]
input = ["text"]
@@ -1,10 +1,12 @@
name = "GPT OSS 20B"
family = "gpt-oss"
release_date = "2025-08-05"
last_updated = "2025-08-05"
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
open_weights = true
[cost]
@@ -12,8 +14,8 @@ input = 0.2
output = 0.3
[limit]
context = 128000
output = 16384
context = 128_000
output = 16_384
[modalities]
input = ["text"]
@@ -0,0 +1,22 @@
name = "Qwen2.5 Coder 32B Instruct"
family = "qwen"
release_date = "2025-02-27"
last_updated = "2025-02-27"
attachment = false
reasoning = false
temperature = true
tool_call = false
structured_output = false
open_weights = true
[cost]
input = 0.66
output = 1
[limit]
context = 32_768
output = 32_768
[modalities]
input = ["text"]
output = ["text"]
@@ -0,0 +1,22 @@
name = "Qwen3 30B A3b fp8"
family = "qwen"
release_date = "2025-04-30"
last_updated = "2025-04-30"
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = false
open_weights = true
[cost]
input = 0.0509
output = 0.335
[limit]
context = 32_768
output = 32_768
[modalities]
input = ["text"]
output = ["text"]
@@ -0,0 +1,22 @@
name = "Qwq 32B"
family = "qwen"
release_date = "2025-03-05"
last_updated = "2025-03-05"
attachment = false
reasoning = true
temperature = true
tool_call = false
structured_output = false
open_weights = true
[cost]
input = 0.66
output = 1
[limit]
context = 24_000
output = 24_000
[modalities]
input = ["text"]
output = ["text"]
@@ -6,12 +6,13 @@ attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-04"
open_weights = true
[cost]
input = 0.06
output = 0.40
input = 0.0605
output = 0.4
[limit]
context = 131_072
@@ -0,0 +1,28 @@
name = "Gemini 3.5 Flash"
family = "gemini-flash"
release_date = "2026-05-19"
last_updated = "2026-05-19"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-01"
open_weights = false
[cost]
input = 1.50
output = 9.00
cache_read = 0.15
input_audio = 1.50
[limit]
context = 1_048_576
output = 65_536
[modalities]
input = ["text", "image", "video", "audio", "pdf"]
output = ["text"]
[provider]
npm = "@ai-sdk/google"
@@ -0,0 +1,23 @@
name = "Grok Build 0.1"
family = "grok-build"
release_date = "2026-05-20"
last_updated = "2026-05-20"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
open_weights = false
[cost]
input = 1.00
output = 2.00
cache_read = 0.20
[limit]
context = 256_000
output = 256_000
[modalities]
input = ["text", "image"]
output = ["text"]
@@ -8,6 +8,7 @@ temperature = true
tool_call = true
knowledge = "2025-01"
open_weights = true
status = "deprecated"
[cost]
input = 0
@@ -1,14 +1,9 @@
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
structured_output = true
knowledge = "2025-02-28"
open_weights = false
[extends]
from = "anthropic/claude-haiku-4-5"
[cost]
input = 1
@@ -1,14 +1,9 @@
name = "Claude Opus 4.1"
family = "claude-opus"
release_date = "2025-08-05"
last_updated = "2025-08-05"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-01-31"
open_weights = false
[extends]
from = "anthropic/claude-opus-4-1"
[cost]
input = 15
@@ -1,14 +1,9 @@
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
structured_output = true
knowledge = "2025-05-30"
open_weights = false
[extends]
from = "anthropic/claude-opus-4-5"
[cost]
input = 5
@@ -1,14 +1,10 @@
name = "Claude Opus 4.6"
family = "claude-opus"
release_date = "2026-02-04"
last_updated = "2026-02-04"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-05-31"
open_weights = false
[extends]
from = "anthropic/claude-opus-4-6"
omit = ["experimental"]
[cost]
input = 5
@@ -1,14 +1,10 @@
name = "Claude Opus 4.7"
family = "claude-opus"
release_date = "2026-04-16"
last_updated = "2026-04-16"
attachment = true
reasoning = true
temperature = false
tool_call = true
structured_output = true
knowledge = "2026-01-31"
open_weights = false
[extends]
from = "anthropic/claude-opus-4-7"
omit = ["experimental"]
[cost]
input = 5
@@ -1,14 +1,9 @@
name = "Claude Sonnet 4.5"
family = "claude-sonnet"
release_date = "2025-09-29"
last_updated = "2025-09-29"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-01-31"
open_weights = false
[extends]
from = "anthropic/claude-sonnet-4-5"
[cost]
input = 3
@@ -1,14 +1,9 @@
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
structured_output = true
knowledge = "2025-08-31"
open_weights = false
[extends]
from = "anthropic/claude-sonnet-4-6"
[cost]
input = 3
@@ -1,14 +1,9 @@
name = "Command R (08-2024)"
family = "command-r"
release_date = "2024-08-30"
last_updated = "2024-08-30"
attachment = false
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2024-03-31"
open_weights = false
[extends]
from = "cohere/command-r-08-2024"
[cost]
input = 0.15
@@ -1,14 +1,9 @@
name = "Command R+ (08-2024)"
family = "command-r"
release_date = "2024-08-30"
last_updated = "2024-08-30"
attachment = false
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2024-03-31"
open_weights = false
[extends]
from = "cohere/command-r-plus-08-2024"
[cost]
input = 2.5
@@ -1,14 +1,9 @@
name = "Command R7B (12-2024)"
family = "command-r"
release_date = "2024-12-14"
last_updated = "2024-12-14"
attachment = false
reasoning = false
temperature = true
tool_call = false
structured_output = true
knowledge = "2024-08-31"
open_weights = false
[extends]
from = "cohere/command-r7b-12-2024"
[cost]
input = 0.0375
@@ -1,14 +1,11 @@
name = "DeepSeek V3"
family = "deepseek"
release_date = "2024-12-26"
last_updated = "2024-12-26"
attachment = false
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2024-07-31"
open_weights = true
[extends]
from = "deepseek/deepseek-chat"
omit = ["cost.cache_read"]
[cost]
input = 0.32
@@ -1,13 +1,9 @@
name = "DeepSeek V4 Flash"
family = "deepseek"
release_date = "2026-04-24"
last_updated = "2026-04-24"
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
open_weights = true
[extends]
from = "deepseek/deepseek-v4-flash"
[interleaved]
field = "reasoning_content"
@@ -1,13 +1,11 @@
name = "DeepSeek V4 Flash (free)"
family = "deepseek"
release_date = "2026-04-24"
last_updated = "2026-04-24"
attachment = false
reasoning = true
temperature = false
tool_call = true
structured_output = false
open_weights = true
[extends]
from = "deepseek/deepseek-v4-flash"
omit = ["cost.cache_read"]
[cost]
input = 0
@@ -1,13 +1,9 @@
name = "DeepSeek V4 Pro"
family = "deepseek"
release_date = "2026-04-24"
last_updated = "2026-04-24"
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
open_weights = true
[extends]
from = "deepseek/deepseek-v4-pro"
[interleaved]
field = "reasoning_content"
@@ -17,7 +17,7 @@ cache_read = 0.025
cache_write = 0.083333
[limit]
context = 1_048_576
context = 1_000_000
output = 8_192
[modalities]
@@ -1,14 +1,10 @@
name = "Nano Banana (Gemini 2.5 Flash Image)"
family = "gemini"
release_date = "2025-10-07"
last_updated = "2025-10-07"
attachment = true
reasoning = false
temperature = true
tool_call = false
structured_output = true
knowledge = "2025-01-31"
open_weights = false
[extends]
from = "google/gemini-2.5-flash-image"
[cost]
input = 0.3
@@ -1,14 +1,10 @@
name = "Gemini 2.5 Flash Lite"
family = "gemini-flash-lite"
release_date = "2025-07-22"
last_updated = "2025-07-22"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-01-31"
open_weights = false
[extends]
from = "google/gemini-2.5-flash-lite"
omit = ["cost.input_audio"]
[cost]
input = 0.1
@@ -1,14 +1,10 @@
name = "Gemini 2.5 Flash"
family = "gemini-flash"
release_date = "2025-06-17"
last_updated = "2025-06-17"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-01-31"
open_weights = false
[extends]
from = "google/gemini-2.5-flash"
omit = ["cost.input_audio"]
[cost]
input = 0.3
@@ -1,14 +1,10 @@
name = "Gemini 2.5 Pro"
family = "gemini"
release_date = "2025-06-17"
last_updated = "2025-06-17"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-01-31"
open_weights = false
[extends]
from = "google/gemini-2.5-pro"
omit = ["cost.tiers", "cost.context_over_200k"]
[cost]
input = 1.25
@@ -1,14 +1,10 @@
name = "Gemini 3 Flash Preview"
family = "gemini-flash"
release_date = "2025-12-17"
last_updated = "2025-12-17"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-01"
open_weights = false
[extends]
from = "google/gemini-3-flash-preview"
omit = ["cost.input_audio"]
[interleaved]
field = "reasoning_details"
@@ -1,14 +1,9 @@
name = "Nano Banana 2 (Gemini 3.1 Flash Image Preview)"
family = "gemini-flash"
release_date = "2026-02-26"
last_updated = "2026-02-26"
attachment = true
reasoning = true
temperature = true
tool_call = false
structured_output = true
knowledge = "2025-01"
open_weights = false
[extends]
from = "google/gemini-3.1-flash-image-preview"
[cost]
input = 0.5
@@ -1,13 +1,10 @@
name = "Gemini 3.1 Flash Lite Preview"
family = "gemini-flash-lite"
release_date = "2026-03-03"
last_updated = "2026-03-03"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
open_weights = false
[extends]
from = "google/gemini-3.1-flash-lite-preview"
omit = ["cost.input_audio"]
[cost]
input = 0.25
@@ -1,13 +1,10 @@
name = "Gemini 3.1 Flash Lite"
family = "gemini"
release_date = "2026-05-07"
last_updated = "2026-05-07"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
open_weights = false
[extends]
from = "google/gemini-3.1-flash-lite"
omit = ["cost.input_audio"]
[cost]
input = 0.25
@@ -1,14 +1,9 @@
name = "Gemini 3.1 Pro Preview Custom Tools"
family = "gemini-pro"
release_date = "2026-02-25"
last_updated = "2026-02-25"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-01"
open_weights = false
[extends]
from = "google/gemini-3.1-pro-preview-customtools"
[interleaved]
field = "reasoning_details"
@@ -1,14 +1,9 @@
name = "Gemini 3.1 Pro Preview"
family = "gemini-pro"
release_date = "2026-02-19"
last_updated = "2026-02-19"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-01"
open_weights = false
[extends]
from = "google/gemini-3.1-pro-preview"
[interleaved]
field = "reasoning_details"
@@ -0,0 +1,22 @@
temperature = true
tool_call = true
structured_output = true
[extends]
from = "google/gemini-3.5-flash"
omit = ["cost.input_audio"]
[cost]
input = 1.5
output = 9
reasoning = 9
cache_read = 0.15
cache_write = 0.083333
[limit]
context = 1_048_576
output = 65_536
[modalities]
input = ["text", "image", "video", "pdf", "audio"]
output = ["text"]
@@ -1,14 +1,9 @@
name = "Gemma 4 26B A4B "
family = "gemma"
release_date = "2026-04-03"
last_updated = "2026-04-03"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-01"
open_weights = true
[extends]
from = "google/gemma-4-26b-a4b-it"
[cost]
input = 0.06
@@ -1,14 +1,10 @@
name = "Gemma 4 26B A4B (free)"
family = "gemma"
release_date = "2026-04-03"
last_updated = "2026-04-03"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = false
knowledge = "2025-01"
open_weights = true
[extends]
from = "google/gemma-4-26b-a4b-it"
[cost]
input = 0
@@ -1,14 +1,9 @@
name = "Gemma 4 31B"
family = "gemma"
release_date = "2026-04-02"
last_updated = "2026-04-02"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-01"
open_weights = true
[extends]
from = "google/gemma-4-31b-it"
[cost]
input = 0.12
@@ -1,14 +1,10 @@
name = "Gemma 4 31B (free)"
family = "gemma"
release_date = "2026-04-02"
last_updated = "2026-04-02"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = false
knowledge = "2025-01"
open_weights = true
[extends]
from = "google/gemma-4-31b-it"
[cost]
input = 0
@@ -10,9 +10,9 @@ structured_output = true
open_weights = false
[cost]
input = 0.3
output = 2.5
cache_read = 0.06
input = 0.075
output = 0.625
cache_read = 0.015
[limit]
context = 262_144
@@ -1,14 +1,10 @@
name = "Llama 3.3 70B Instruct"
family = "llama"
release_date = "2024-12-06"
last_updated = "2024-12-06"
attachment = false
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2023-12-31"
open_weights = true
[extends]
from = "llama/llama-3.3-70b-instruct"
[cost]
input = 0.1
@@ -1,14 +1,11 @@
name = "Llama 3.3 70B Instruct (free)"
family = "llama"
release_date = "2024-12-06"
last_updated = "2024-12-06"
attachment = false
reasoning = false
temperature = true
tool_call = true
structured_output = false
knowledge = "2023-12-31"
open_weights = true
[extends]
from = "llama/llama-3.3-70b-instruct"
[cost]
input = 0
@@ -1,13 +1,9 @@
name = "MiniMax M2.1"
family = "minimax"
release_date = "2025-12-23"
last_updated = "2025-12-23"
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
open_weights = true
[extends]
from = "minimax/MiniMax-M2.1"
[interleaved]
field = "reasoning_details"
@@ -1,13 +1,10 @@
name = "MiniMax M2.5"
family = "minimax"
release_date = "2026-02-12"
last_updated = "2026-02-12"
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
open_weights = true
[extends]
from = "minimax/MiniMax-M2.5"
omit = ["cost.cache_read", "cost.cache_write"]
[interleaved]
field = "reasoning_details"
@@ -1,13 +1,11 @@
name = "MiniMax M2.5 (free)"
family = "minimax"
release_date = "2026-02-12"
last_updated = "2026-02-12"
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = false
open_weights = true
[extends]
from = "minimax/MiniMax-M2.5"
omit = ["cost.cache_read", "cost.cache_write"]
[interleaved]
field = "reasoning_details"
@@ -1,13 +1,10 @@
name = "MiniMax M2.7"
family = "minimax"
release_date = "2026-03-18"
last_updated = "2026-03-18"
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
open_weights = true
[extends]
from = "minimax/MiniMax-M2.7"
omit = ["cost.cache_read", "cost.cache_write"]
[cost]
input = 0.279
@@ -1,13 +1,9 @@
name = "MiniMax M2"
family = "minimax"
release_date = "2025-10-23"
last_updated = "2025-10-23"
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
open_weights = true
[extends]
from = "minimax/MiniMax-M2"
[interleaved]
field = "reasoning_details"
@@ -1,14 +1,10 @@
name = "Devstral 2 2512"
family = "devstral"
release_date = "2025-12-09"
last_updated = "2025-12-09"
attachment = true
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-12"
open_weights = true
[extends]
from = "mistral/devstral-2512"
[cost]
input = 0.4
@@ -1,14 +1,10 @@
name = "Mistral Large 2411"
family = "mistral-large"
release_date = "2024-11-19"
last_updated = "2024-11-19"
attachment = true
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2024-07-31"
open_weights = false
[extends]
from = "mistral/mistral-large-2411"
[cost]
input = 2
@@ -1,13 +1,9 @@
name = "Mistral Large 3 2512"
family = "mistral-large"
release_date = "2025-12-01"
last_updated = "2025-12-01"
attachment = true
reasoning = false
temperature = true
tool_call = true
structured_output = true
open_weights = false
[extends]
from = "mistral/mistral-large-2512"
[cost]
input = 0.5
@@ -1,14 +1,9 @@
name = "Mistral Nemo"
family = "mistral-nemo"
release_date = "2024-07-19"
last_updated = "2024-07-19"
attachment = false
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2024-04-30"
open_weights = true
[extends]
from = "mistral/mistral-nemo"
[cost]
input = 0.02
@@ -1,14 +1,9 @@
name = "Mistral Small 4"
family = "mistral-small"
release_date = "2026-03-16"
last_updated = "2026-03-16"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-06"
open_weights = true
[extends]
from = "mistral/mistral-small-2603"
[cost]
input = 0.15
@@ -1,14 +1,10 @@
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
structured_output = true
knowledge = "2024-08"
open_weights = true
[extends]
from = "moonshotai/kimi-k2-thinking"
omit = ["cost.cache_read"]
[interleaved]
field = "reasoning_details"
@@ -1,14 +1,10 @@
name = "Kimi K2.5"
family = "kimi"
release_date = "2026-01-27"
last_updated = "2026-01-27"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-01"
open_weights = true
[extends]
from = "moonshotai/kimi-k2.5"
[interleaved]
field = "reasoning_details"
@@ -1,13 +1,9 @@
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
open_weights = true
[extends]
from = "moonshotai/kimi-k2.6"
[interleaved]
field = "reasoning_details"
@@ -1,14 +1,10 @@
name = "GPT-3.5 Turbo"
family = "gpt"
release_date = "2023-05-28"
last_updated = "2023-05-28"
attachment = false
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2021-09-30"
open_weights = false
[extends]
from = "openai/gpt-3.5-turbo"
omit = ["cost.cache_read"]
[cost]
input = 0.5
@@ -1,14 +1,9 @@
name = "GPT-4 Turbo"
family = "gpt"
release_date = "2024-04-09"
last_updated = "2024-04-09"
attachment = true
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2023-12-31"
open_weights = false
[extends]
from = "openai/gpt-4-turbo"
[cost]
input = 10
@@ -1,14 +1,9 @@
name = "GPT-4.1 Mini"
family = "gpt-mini"
release_date = "2025-04-14"
last_updated = "2025-04-14"
attachment = true
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2024-06-30"
open_weights = false
[extends]
from = "openai/gpt-4.1-mini"
[cost]
input = 0.4
@@ -1,14 +1,9 @@
name = "GPT-4.1 Nano"
family = "gpt"
release_date = "2025-04-14"
last_updated = "2025-04-14"
attachment = true
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2024-06-30"
open_weights = false
[extends]
from = "openai/gpt-4.1-nano"
[cost]
input = 0.1
@@ -1,14 +1,9 @@
name = "GPT-4.1"
family = "gpt"
release_date = "2025-04-14"
last_updated = "2025-04-14"
attachment = true
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2024-06-30"
open_weights = false
[extends]
from = "openai/gpt-4.1"
[cost]
input = 2
@@ -1,14 +1,10 @@
name = "GPT-4"
family = "gpt"
release_date = "2023-05-28"
last_updated = "2023-05-28"
attachment = false
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2021-09-30"
open_weights = false
[extends]
from = "openai/gpt-4"
[cost]
input = 30
@@ -1,14 +1,9 @@
name = "GPT-4o (2024-05-13)"
family = "gpt"
release_date = "2024-05-13"
last_updated = "2024-05-13"
attachment = true
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2023-10-31"
open_weights = false
[extends]
from = "openai/gpt-4o-2024-05-13"
[cost]
input = 5
@@ -1,14 +1,9 @@
name = "GPT-4o (2024-08-06)"
family = "gpt"
release_date = "2024-08-06"
last_updated = "2024-08-06"
attachment = true
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2023-10-31"
open_weights = false
[extends]
from = "openai/gpt-4o-2024-08-06"
[cost]
input = 2.5
@@ -1,14 +1,9 @@
name = "GPT-4o (2024-11-20)"
family = "gpt"
release_date = "2024-11-20"
last_updated = "2024-11-20"
attachment = true
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2023-10-31"
open_weights = false
[extends]
from = "openai/gpt-4o-2024-11-20"
[cost]
input = 2.5
@@ -1,14 +1,9 @@
name = "GPT-4o-mini"
family = "gpt-mini"
release_date = "2024-07-18"
last_updated = "2024-07-18"
attachment = true
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2023-10-31"
open_weights = false
[extends]
from = "openai/gpt-4o-mini"
[cost]
input = 0.15
@@ -1,14 +1,10 @@
name = "GPT-4o"
family = "gpt"
release_date = "2024-05-13"
last_updated = "2024-05-13"
attachment = true
reasoning = false
temperature = true
tool_call = true
structured_output = true
knowledge = "2023-10-31"
open_weights = false
[extends]
from = "openai/gpt-4o"
omit = ["cost.cache_read"]
[cost]
input = 2.5
@@ -1,14 +1,11 @@
name = "GPT-5 Codex"
family = "gpt-codex"
release_date = "2025-09-23"
last_updated = "2025-09-23"
attachment = true
reasoning = true
temperature = false
tool_call = true
structured_output = true
knowledge = "2024-09-30"
open_weights = false
[extends]
from = "openai/gpt-5-codex"
omit = ["limit.input"]
[cost]
input = 1.25
@@ -1,14 +1,10 @@
name = "GPT-5 Mini"
family = "gpt-mini"
release_date = "2025-08-07"
last_updated = "2025-08-07"
attachment = true
reasoning = true
temperature = false
tool_call = true
structured_output = true
knowledge = "2024-05-31"
open_weights = false
[extends]
from = "openai/gpt-5-mini"
omit = ["limit.input"]
[cost]
input = 0.25
@@ -1,14 +1,10 @@
name = "GPT-5 Nano"
family = "gpt-nano"
release_date = "2025-08-07"
last_updated = "2025-08-07"
attachment = true
reasoning = true
temperature = false
tool_call = true
structured_output = true
knowledge = "2024-05-31"
open_weights = false
[extends]
from = "openai/gpt-5-nano"
omit = ["limit.input"]
[cost]
input = 0.05
@@ -1,14 +1,10 @@
name = "GPT-5 Pro"
family = "gpt-pro"
release_date = "2025-10-06"
last_updated = "2025-10-06"
attachment = true
reasoning = true
temperature = false
tool_call = true
structured_output = true
knowledge = "2024-09-30"
open_weights = false
[extends]
from = "openai/gpt-5-pro"
omit = ["limit.input"]
[cost]
input = 15
@@ -1,14 +1,10 @@
name = "GPT-5.1-Codex-Max"
family = "gpt-codex"
release_date = "2025-12-04"
last_updated = "2025-12-04"
attachment = true
reasoning = true
temperature = false
tool_call = true
structured_output = true
knowledge = "2024-09-30"
open_weights = false
[extends]
from = "openai/gpt-5.1-codex-max"
omit = ["limit.input"]
[cost]
input = 1.25
@@ -1,14 +1,10 @@
name = "GPT-5.1-Codex-Mini"
family = "gpt-codex"
release_date = "2025-11-13"
last_updated = "2025-11-13"
attachment = true
reasoning = true
temperature = false
tool_call = true
structured_output = true
knowledge = "2024-09-30"
open_weights = false
[extends]
from = "openai/gpt-5.1-codex-mini"
omit = ["limit.input"]
[cost]
input = 0.25
Loaded 100 of 175 files, more files were not shown because too many files have changed in this diff. Show more