Compare commits

...
22 Commits
Author SHA1 Message Date
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
69 changed files with 1148 additions and 269 deletions

No files matched your search

+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",
+8 -1
View File
@@ -5,8 +5,10 @@ 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({
@@ -51,16 +53,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;
@@ -0,0 +1,174 @@
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_ACCOUNT_ID;
const token = process.env.CLOUDFLARE_API_TOKEN ?? process.env.CLOUDFLARE_API_KEY;
if (accountID === undefined || token === undefined) {
throw new Error("Cloudflare Workers AI sync requires CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_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 "";
}
}
+5 -5
View File
@@ -5,7 +5,7 @@ import type { ExistingModel, SyncProvider } from "../sync-models.js";
const API_ENDPOINT = "https://openrouter.ai/api/v1/models";
const OpenRouterModel = z.object({
export const OpenRouterModel = z.object({
id: z.string(),
name: z.string(),
created: z.number(),
@@ -30,11 +30,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 +56,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 +97,7 @@ function inferFamily(model: OpenRouterModel, name: string) {
});
}
function buildModel(model: OpenRouterModel, existing: ExistingModel | undefined) {
export function buildOpenRouterModel(model: OpenRouterModel, existing: ExistingModel | undefined) {
const params = new Set(model.supported_parameters);
const name = model.name.replace(/^[^:]+:\s+/, "");
const input = modalities(model.architecture.input_modalities, ["text"]);
+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"
@@ -8,6 +8,7 @@ temperature = true
tool_call = true
knowledge = "2025-01"
open_weights = true
status = "deprecated"
[cost]
input = 0
@@ -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]
@@ -0,0 +1,26 @@
name = "Gemini 3.5 Flash"
family = "gemini"
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-01"
open_weights = false
[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"]
@@ -10,9 +10,8 @@ structured_output = true
open_weights = true
[cost]
input = 0.14
input = 0.139
output = 1
cache_read = 0.05
[limit]
context = 262_144
@@ -10,9 +10,8 @@ structured_output = true
open_weights = true
[cost]
input = 0.15
input = 0.149
output = 1
cache_read = 0.05
[limit]
context = 262_144
@@ -13,13 +13,12 @@ open_weights = true
field = "reasoning_content"
[cost]
input = 0.98
output = 3.08
cache_read = 0.182
input = 0
output = 0
[limit]
context = 202_752
output = 131_072
context = 202_800
output = 202_800
[modalities]
input = ["text"]
@@ -7,13 +7,14 @@ reasoning = true
temperature = true
tool_call = true
structured_output = true
knowledge = "2025-01-01"
open_weights = false
[cost]
input = 0.5
output = 3
reasoning = 3
cache_read = 0.05
input = 1.5
output = 9
reasoning = 9
cache_read = 0.15
cache_write = 0.083333
[limit]
@@ -21,5 +22,5 @@ context = 1_048_576
output = 65_536
[modalities]
input = ["text", "image", "pdf", "audio", "video"]
input = ["text", "image", "video", "pdf", "audio"]
output = ["text"]
@@ -0,0 +1,17 @@
name = "Gemini-3.5-Flash"
temperature = false
[extends]
from = "google/gemini-3.5-flash"
omit = [
"cost.input_audio",
]
[cost]
input = 1.5152
output = 9.0909
cache_read = 0.1515
[modalities]
input = ["text", "image", "audio"]
output = ["text"]
@@ -0,0 +1,8 @@
name = "Mistral Medium 3.5 128B"
[extends]
from = "mistral/mistral-medium-2604"
[limit]
context = 256_000
output = 16_384
@@ -0,0 +1,22 @@
name = "Agent Max"
release_date = "2026-05-04"
last_updated = "2026-05-19"
# reflects last update to contract specification: https://thegrid.ai/docs/instrument-specifications/current-instruments
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
status = "beta"
open_weights = false
[interleaved]
field = "reasoning_content"
[limit]
context = 1_000_000
output = 128_000
[modalities]
input = ["text", "image"]
output = ["text"]
@@ -0,0 +1,19 @@
name = "Agent Prime"
release_date = "2026-05-04"
last_updated = "2026-05-19"
# reflects last update to contract specification: https://thegrid.ai/docs/instrument-specifications/current-instruments
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
status = "beta"
open_weights = false
[limit]
context = 128_000
output = 64_000
[modalities]
input = ["text"]
output = ["text"]
@@ -0,0 +1,19 @@
name = "Agent Standard"
release_date = "2026-05-04"
last_updated = "2026-05-19"
# reflects last update to contract specification: https://thegrid.ai/docs/instrument-specifications/current-instruments
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
status = "beta"
open_weights = false
[limit]
context = 128_000
output = 16_000
[modalities]
input = ["text"]
output = ["text"]
@@ -0,0 +1,22 @@
name = "Code Max"
release_date = "2026-05-04"
last_updated = "2026-05-19"
# reflects last update to contract specification: https://thegrid.ai/docs/instrument-specifications/current-instruments
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
status = "beta"
open_weights = false
[interleaved]
field = "reasoning_content"
[limit]
context = 1_000_000
output = 128_000
[modalities]
input = ["text", "image"]
output = ["text"]
@@ -0,0 +1,19 @@
name = "Code Prime"
release_date = "2026-05-04"
last_updated = "2026-05-19"
# reflects last update to contract specification: https://thegrid.ai/docs/instrument-specifications/current-instruments
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
status = "beta"
open_weights = false
[limit]
context = 128_000
output = 64_000
[modalities]
input = ["text"]
output = ["text"]
@@ -0,0 +1,19 @@
name = "Code Standard"
release_date = "2026-05-04"
last_updated = "2026-05-19"
# reflects last update to contract specification: https://thegrid.ai/docs/instrument-specifications/current-instruments
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
status = "beta"
open_weights = false
[limit]
context = 128_000
output = 16_000
[modalities]
input = ["text"]
output = ["text"]
+6 -3
View File
@@ -1,18 +1,21 @@
name = "Text Max"
release_date = "2026-03-24"
last_updated = "2026-03-24"
last_updated = "2026-05-19"
# reflects last update to contract specification: https://thegrid.ai/docs/instrument-specifications/current-instruments
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
status = "beta"
open_weights = false
[interleaved]
field = "reasoning_content"
[limit]
context = 1_000_000
output = 128_000
[modalities]
input = ["text"]
input = ["text", "image"]
output = ["text"]
+2 -2
View File
@@ -1,12 +1,12 @@
name = "Text Prime"
release_date = "2026-02-26"
last_updated = "2026-02-26"
last_updated = "2026-05-19"
# reflects last update to contract specification: https://thegrid.ai/docs/instrument-specifications/current-instruments
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
status = "beta"
open_weights = false
[limit]
@@ -1,12 +1,12 @@
name = "Text Standard"
release_date = "2026-02-26"
last_updated = "2026-02-26"
last_updated = "2026-05-19"
# reflects last update to contract specification: https://thegrid.ai/docs/instrument-specifications/current-instruments
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
status = "beta"
open_weights = false
[limit]
-23
View File
@@ -1,23 +0,0 @@
name = "Grok 2 (1212)"
family = "grok"
release_date = "2024-12-12"
last_updated = "2024-12-12"
attachment = false
reasoning = false
temperature = true
knowledge = "2024-08"
tool_call = true
open_weights = false
[cost]
input = 2.00
output = 10.00
cache_read = 2.00
[limit]
context = 131_072
output = 8_192
[modalities]
input = ["text"]
output = ["text"]
-23
View File
@@ -1,23 +0,0 @@
name = "Grok 2 Latest"
family = "grok"
release_date = "2024-08-20"
last_updated = "2024-12-12"
attachment = false
reasoning = false
temperature = true
knowledge = "2024-08"
tool_call = true
open_weights = false
[cost]
input = 2.00
output = 10.00
cache_read = 2.00
[limit]
context = 131_072
output = 8_192
[modalities]
input = ["text"]
output = ["text"]
@@ -1,23 +0,0 @@
name = "Grok 2 Vision (1212)"
family = "grok"
release_date = "2024-08-20"
last_updated = "2024-12-12"
attachment = true
reasoning = false
temperature = true
knowledge = "2024-08"
tool_call = true
open_weights = false
[cost]
input = 2.00
output = 10.00
cache_read = 2.00
[limit]
context = 8_192
output = 4_096
[modalities]
input = ["text", "image"]
output = ["text"]
@@ -1,23 +0,0 @@
name = "Grok 2 Vision Latest"
family = "grok"
release_date = "2024-08-20"
last_updated = "2024-12-12"
attachment = true
reasoning = false
temperature = true
knowledge = "2024-08"
tool_call = true
open_weights = false
[cost]
input = 2.00
output = 10.00
cache_read = 2.00
[limit]
context = 8_192
output = 4_096
[modalities]
input = ["text", "image"]
output = ["text"]
-23
View File
@@ -1,23 +0,0 @@
name = "Grok 2 Vision"
family = "grok"
release_date = "2024-08-20"
last_updated = "2024-08-20"
attachment = true
reasoning = false
temperature = true
knowledge = "2024-08"
tool_call = true
open_weights = false
[cost]
input = 2.00
output = 10.00
cache_read = 2.00
[limit]
context = 8_192
output = 4_096
[modalities]
input = ["text", "image"]
output = ["text"]
-23
View File
@@ -1,23 +0,0 @@
name = "Grok 2"
family = "grok"
release_date = "2024-08-20"
last_updated = "2024-08-20"
attachment = false
reasoning = false
temperature = true
knowledge = "2024-08"
tool_call = true
open_weights = false
[cost]
input = 2.00
output = 10.00
cache_read = 2.00
[limit]
context = 131_072
output = 8_192
[modalities]
input = ["text"]
output = ["text"]
@@ -9,20 +9,20 @@ tool_call = true
open_weights = false
[cost]
input = 2.00
output = 6.00
cache_read = 0.20
input = 1.25
output = 2.5
cache_read = 0.2
[[cost.tiers]]
tier = { size = 200_000 }
input = 4.00
output = 12.00
cache_read = 0.40
input = 4
output = 12
cache_read = 0.4
[limit]
context = 2_000_000
output = 30_000
[modalities]
input = ["text", "image"]
input = ["text", "image", "pdf"]
output = ["text"]
@@ -9,20 +9,20 @@ tool_call = true
open_weights = false
[cost]
input = 2.00
output = 6.00
cache_read = 0.20
input = 1.25
output = 2.5
cache_read = 0.2
[[cost.tiers]]
tier = { size = 200_000 }
input = 4.00
output = 12.00
cache_read = 0.40
input = 4
output = 12
cache_read = 0.4
[limit]
context = 2_000_000
output = 30_000
[modalities]
input = ["text", "image"]
input = ["text", "image", "pdf"]
output = ["text"]
@@ -9,20 +9,20 @@ tool_call = false
open_weights = false
[cost]
input = 2.00
output = 6.00
cache_read = 0.20
input = 1.25
output = 2.5
cache_read = 0.2
[[cost.tiers]]
tier = { size = 200_000 }
input = 4.00
output = 12.00
cache_read = 0.40
input = 4
output = 12
cache_read = 0.4
[limit]
context = 2_000_000
output = 30_000
[modalities]
input = ["text", "image"]
input = ["text", "image", "pdf"]
output = ["text"]
+8 -8
View File
@@ -1,7 +1,7 @@
name = "Grok 4.3"
family = "grok"
release_date = "2026-05-01"
last_updated = "2026-05-01"
release_date = "2026-04-17"
last_updated = "2026-04-17"
attachment = true
reasoning = true
temperature = true
@@ -10,19 +10,19 @@ open_weights = false
[cost]
input = 1.25
output = 2.50
cache_read = 0.20
output = 2.5
cache_read = 0.2
[[cost.tiers]]
tier = { size = 200_000 }
input = 2.50
output = 5.00
cache_read = 0.40
input = 2.5
output = 5
cache_read = 0.4
[limit]
context = 1_000_000
output = 30_000
[modalities]
input = ["text", "image"]
input = ["text", "image", "pdf"]
output = ["text"]
-23
View File
@@ -1,23 +0,0 @@
name = "Grok Beta"
family = "grok-beta"
release_date = "2024-11-01"
last_updated = "2024-11-01"
attachment = false
reasoning = false
temperature = true
knowledge = "2024-08"
tool_call = true
open_weights = false
[cost]
input = 5.00
output = 15.00
cache_read = 5.00
[limit]
context = 131_072
output = 4_096
[modalities]
input = ["text"]
output = ["text"]
+23
View File
@@ -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", "pdf"]
output = ["text"]
@@ -1,7 +1,7 @@
name = "Grok Imagine Image Quality"
family = "grok"
release_date = "2026-04"
last_updated = "2026-05-16"
release_date = "2026-04-03"
last_updated = "2026-04-03"
attachment = true
reasoning = false
temperature = false
@@ -9,7 +9,7 @@ tool_call = false
open_weights = false
[limit]
context = 1024
context = 8_000
output = 0
[modalities]
+3 -3
View File
@@ -1,7 +1,7 @@
name = "Grok Imagine Image"
family = "grok"
release_date = "2026-03"
last_updated = "2026-05-16"
release_date = "2026-01-28"
last_updated = "2026-01-28"
attachment = true
reasoning = false
temperature = false
@@ -9,7 +9,7 @@ tool_call = false
open_weights = false
[limit]
context = 1024
context = 8_000
output = 0
[modalities]
+4 -4
View File
@@ -1,7 +1,7 @@
name = "Grok Imagine Video"
family = "grok"
release_date = "2026-03"
last_updated = "2026-05-16"
release_date = "2026-01-28"
last_updated = "2026-01-28"
attachment = true
reasoning = false
temperature = false
@@ -9,9 +9,9 @@ tool_call = false
open_weights = false
[limit]
context = 1024
context = 1_024
output = 0
[modalities]
input = ["text", "image", "video"]
input = ["text", "image"]
output = ["video"]
@@ -1,23 +0,0 @@
name = "Grok Vision Beta"
family = "grok-vision"
release_date = "2024-11-01"
last_updated = "2024-11-01"
attachment = true
reasoning = false
temperature = true
knowledge = "2024-08"
tool_call = true
open_weights = false
[cost]
input = 5.00
output = 15.00
cache_read = 5.00
[limit]
context = 8_192
output = 4_096
[modalities]
input = ["text", "image"]
output = ["text"]
+24 -1
View File
@@ -4,14 +4,17 @@ TODO: delete
Model syncs are centralized in `packages/core/script/sync-models.ts`. The runner owns file IO, TOML formatting, validation, reporting, dry runs, and deletion behavior. Individual provider sync modules only fetch source data, parse it, and translate each source model into the catalog schema.
The grouped sync targets are `aggregators`, which runs OpenRouter, and `direct`, which runs direct provider APIs like Google.
The grouped sync targets are `aggregators`, which runs OpenRouter, and `direct`, which runs direct provider APIs like Google and xAI.
## Commands
- `bun models:sync aggregators` syncs every provider in the `aggregators` group.
- `bun models:sync openrouter` syncs only OpenRouter.
- `bun models:sync cloudflare-workers-ai` syncs only Cloudflare Workers AI.
- `bun models:sync cloudflare` syncs the Cloudflare sync group.
- `bun models:sync direct` syncs every provider in the `direct` group.
- `bun models:sync google` syncs only Google.
- `bun models:sync xai` syncs only xAI.
- `bun models:sync aggregators --dry-run` prints changes without writing model files.
- `bun models:sync aggregators --new-only` creates new model files but skips updates and removals.
- `bun validate` validates the generated catalog after a sync.
@@ -110,6 +113,16 @@ OpenRouter is implemented in `packages/core/script/sync/openrouter.ts`.
- `structured_output` comes from `supported_parameters.includes("structured_outputs")` only.
- Existing `status`, `interleaved`, `knowledge`, `limit.input`, and `cost.tiers` may be preserved when OpenRouter is not authoritative enough for those fields.
## Cloudflare Workers AI Notes
Cloudflare Workers AI is implemented in `packages/core/script/sync/cloudflare-workers-ai.ts`.
- Source endpoint: `https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/models/search?format=openrouter`.
- Required auth: `CLOUDFLARE_ACCOUNT_ID` and `CLOUDFLARE_API_TOKEN` (or `CLOUDFLARE_API_KEY`).
- The endpoint is parsed as Cloudflare's OpenRouter-like Workers AI metadata.
- Model IDs map directly to TOML paths under `providers/cloudflare-workers-ai/models`.
- This sync target does not manage `providers/cloudflare-ai-gateway`, because the AI Gateway `/compat/models` endpoint does not support `format=openrouter` and does not provide enough model metadata for authoritative catalog sync.
## Google Notes
Google is implemented in `packages/core/script/sync/google.ts`.
@@ -121,6 +134,16 @@ Google is implemented in `packages/core/script/sync/google.ts`.
- Local Google models missing from the API response are removed.
- New Google API models are reported in `.sync/model-sync-report.md` but not created automatically because the API does not provide authoritative modalities, pricing, knowledge cutoff, release date, tool calling, or structured output metadata.
## xAI Notes
xAI is implemented in `packages/core/script/sync/xai.ts`.
- Source endpoints: `https://api.x.ai/v1/language-models`, `https://api.x.ai/v1/image-generation-models`, and `https://api.x.ai/v1/video-generation-models`.
- Required auth: `XAI_API_KEY`.
- The richer typed endpoints provide model IDs, creation timestamps, modalities, pricing for language models, and prompt/input limits where available.
- Existing xAI models are updated from API-authoritative fields while local metadata is preserved for fields the API does not expose, especially output token limits and some feature/capability flags.
- New xAI API models are reported in `.sync/model-sync-report.md` but not created automatically because the API does not provide enough authoritative metadata for complete catalog entries.
## Vercel Status
Vercel is intentionally not wired into `bun models:sync` right now. Keep using the existing `vercel:generate` script until Vercel sync behavior is redesigned and reviewed separately.