Compare commits
44
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a74991397 | ||
|
|
5fdcea6b36 | ||
|
|
31e56480b4 | ||
|
|
92a621594e | ||
|
|
d2db353ceb | ||
|
|
900ae509d2 | ||
|
|
cd3e99025f | ||
|
|
1098981eb6 | ||
|
|
27a151cf53 | ||
|
|
41ff42ab7f | ||
|
|
adf1cbdecd | ||
|
|
10ddc78ce0 | ||
|
|
7ae897e440 | ||
|
|
02e452c2e8 | ||
|
|
f05b63fff5 | ||
|
|
e277d60236 | ||
|
|
b01277a737 | ||
|
|
a5da5aa429 | ||
|
|
5ceac8a58b | ||
|
|
11e1d5623a | ||
|
|
f107afc57c | ||
|
|
e789d7c1f2 | ||
|
|
899668ad49 | ||
|
|
8c677f0134 | ||
|
|
462c7877d9 | ||
|
|
55871f9dca | ||
|
|
4f7194a3c8 | ||
|
|
f65f0148da | ||
|
|
14952f8855 | ||
|
|
d7c6d3ad12 | ||
|
|
356bc79d08 | ||
|
|
a89b1ed726 | ||
|
|
a998576773 | ||
|
|
fbe842bbea | ||
|
|
6c0c3d1b10 | ||
|
|
db0a7cf611 | ||
|
|
d775e37e3b | ||
|
|
36753063d9 | ||
|
|
1b77511903 | ||
|
|
eb96594d47 | ||
|
|
327332efe3 | ||
|
|
e65703382a | ||
|
|
2cb5a99b98 | ||
|
|
0c2e47e8ba |
No files matched your search
@@ -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
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
.idea
|
||||
dist
|
||||
.DS_Store
|
||||
.sync/
|
||||
node_modules
|
||||
data/tokenspeed-monitor.sqlite
|
||||
data/tokenspeed-monitor.sqlite-shm
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -5,7 +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({
|
||||
@@ -26,6 +29,9 @@ export interface SyncProvider<SourceModel> {
|
||||
id: string;
|
||||
name: string;
|
||||
modelsDir: string;
|
||||
skipCreates?: boolean;
|
||||
sourceID?(model: SourceModel): string;
|
||||
skippedNotice?(ids: string[]): string[];
|
||||
fetchModels(): Promise<unknown>;
|
||||
parseModels(raw: unknown): SourceModel[];
|
||||
translateModel(
|
||||
@@ -42,15 +48,26 @@ export interface SyncResult {
|
||||
updated: number;
|
||||
deleted: number;
|
||||
unchanged: number;
|
||||
notices: string[];
|
||||
files: Array<{ status: "created" | "updated" | "deleted"; path: string }>;
|
||||
}
|
||||
|
||||
export const providers = {
|
||||
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"],
|
||||
cloudflare: ["cloudflare-workers-ai"],
|
||||
direct: ["google", "xai"],
|
||||
} as const;
|
||||
|
||||
type ProviderID = keyof typeof providers;
|
||||
@@ -73,6 +90,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 skippedRemote: string[] = [];
|
||||
|
||||
for (const sourceModel of sourceModels) {
|
||||
const translated = provider.translateModel(sourceModel, {
|
||||
@@ -80,9 +98,17 @@ export async function syncProvider<SourceModel>(
|
||||
return existing.get(`${id}.toml`)?.toml;
|
||||
},
|
||||
});
|
||||
if (translated === undefined) continue;
|
||||
if (translated === undefined) {
|
||||
if (provider.skipCreates) skippedRemote.push(provider.sourceID?.(sourceModel) ?? "unknown");
|
||||
continue;
|
||||
}
|
||||
|
||||
const relativePath = `${translated.id}.toml`;
|
||||
if (provider.skipCreates && !existing.has(relativePath)) {
|
||||
skippedRemote.push(translated.id);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (desired.has(relativePath)) {
|
||||
throw new Error(`Duplicate synced model path: ${provider.id}/${relativePath}`);
|
||||
}
|
||||
@@ -155,7 +181,7 @@ export async function syncProvider<SourceModel>(
|
||||
}
|
||||
}
|
||||
|
||||
const result = summarize(provider, files, unchanged);
|
||||
const result = summarize(provider, files, unchanged, provider.skippedNotice?.(skippedRemote) ?? []);
|
||||
console.log(
|
||||
`${options.dryRun ? "Dry run: " : ""}${result.created} created, ${result.updated} updated, ${result.deleted} removed, ${result.unchanged} unchanged`,
|
||||
);
|
||||
@@ -215,6 +241,7 @@ function summarize(
|
||||
provider: { id: string; name: string },
|
||||
files: SyncResult["files"],
|
||||
unchanged: number,
|
||||
notices: string[],
|
||||
): SyncResult {
|
||||
return {
|
||||
id: provider.id,
|
||||
@@ -224,6 +251,7 @@ function summarize(
|
||||
updated: files.filter((file) => file.status === "updated").length,
|
||||
deleted: files.filter((file) => file.status === "deleted").length,
|
||||
unchanged,
|
||||
notices,
|
||||
files,
|
||||
};
|
||||
}
|
||||
@@ -282,6 +310,17 @@ async function writeReport(target: string, results: SyncResult[]) {
|
||||
lines.push("", "</details>");
|
||||
}
|
||||
|
||||
const noticeResults = results.filter((item) => item.notices.length > 0);
|
||||
if (noticeResults.length > 0) {
|
||||
lines.push("", "## Notices");
|
||||
for (const result of noticeResults) {
|
||||
lines.push("", `### ${result.name}`);
|
||||
for (const notice of result.notices) {
|
||||
lines.push(`- ${notice}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lines.push("", "This PR was created automatically by the daily model sync workflow.");
|
||||
await Bun.write(".sync/model-sync-report.md", `${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 "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import type { ExistingModel, SyncProvider, SyncedModel } from "../sync-models.js";
|
||||
|
||||
const API_ENDPOINT = "https://generativelanguage.googleapis.com/v1beta/models";
|
||||
|
||||
const GoogleModel = z.object({
|
||||
name: z.string(),
|
||||
baseModelId: z.string().optional(),
|
||||
version: z.string().optional(),
|
||||
displayName: z.string().optional(),
|
||||
description: z.string().optional(),
|
||||
inputTokenLimit: z.number().int().nonnegative(),
|
||||
outputTokenLimit: z.number().int().nonnegative(),
|
||||
supportedGenerationMethods: z.array(z.string()).optional(),
|
||||
temperature: z.number().optional(),
|
||||
topP: z.number().optional(),
|
||||
topK: z.number().optional(),
|
||||
maxTemperature: z.number().optional(),
|
||||
thinking: z.boolean().optional(),
|
||||
}).passthrough();
|
||||
|
||||
const GoogleResponse = z.object({
|
||||
models: z.array(GoogleModel).optional(),
|
||||
nextPageToken: z.string().optional(),
|
||||
}).passthrough();
|
||||
|
||||
type GoogleModel = z.infer<typeof GoogleModel>;
|
||||
|
||||
export const google = {
|
||||
id: "google",
|
||||
name: "Google",
|
||||
modelsDir: "providers/google/models",
|
||||
skipCreates: true,
|
||||
sourceID(model) {
|
||||
return model.name.replace(/^models\//, "");
|
||||
},
|
||||
skippedNotice(ids) {
|
||||
if (ids.length === 0) return [];
|
||||
return [
|
||||
`${ids.length} Google models returned by the API were not created because the Models API does not provide authoritative modalities, pricing, knowledge cutoff, release date, tool calling, or structured output metadata. Existing models are still updated from API-authoritative fields.`,
|
||||
`Skipped remote IDs: ${ids.map((id) => `\`${id}\``).join(", ")}`,
|
||||
];
|
||||
},
|
||||
async fetchModels() {
|
||||
const key = process.env.GOOGLE_API_KEY
|
||||
?? process.env.GEMINI_API_KEY
|
||||
?? process.env.GOOGLE_GENERATIVE_AI_API_KEY;
|
||||
if (key === undefined) {
|
||||
throw new Error("Google sync requires GOOGLE_API_KEY, GEMINI_API_KEY, or GOOGLE_GENERATIVE_AI_API_KEY");
|
||||
}
|
||||
|
||||
const models: GoogleModel[] = [];
|
||||
let pageToken: string | undefined;
|
||||
|
||||
do {
|
||||
const url = new URL(API_ENDPOINT);
|
||||
url.searchParams.set("key", key);
|
||||
url.searchParams.set("pageSize", "1000");
|
||||
if (pageToken !== undefined) url.searchParams.set("pageToken", pageToken);
|
||||
|
||||
const response = await fetch(url);
|
||||
if (!response.ok) {
|
||||
throw new Error(`Google models request failed: ${response.status} ${response.statusText}`);
|
||||
}
|
||||
|
||||
const page = GoogleResponse.parse(await response.json());
|
||||
models.push(...page.models ?? []);
|
||||
pageToken = page.nextPageToken;
|
||||
} while (pageToken !== undefined);
|
||||
|
||||
return { models };
|
||||
},
|
||||
parseModels(raw) {
|
||||
return GoogleResponse.parse(raw).models ?? [];
|
||||
},
|
||||
translateModel(model, context) {
|
||||
const id = model.name.replace(/^models\//, "");
|
||||
const existing = context.existing(id);
|
||||
if (existing === undefined) return undefined;
|
||||
|
||||
return {
|
||||
id,
|
||||
model: buildModel(model, existing),
|
||||
};
|
||||
},
|
||||
} satisfies SyncProvider<GoogleModel>;
|
||||
|
||||
function buildModel(model: GoogleModel, existing: ExistingModel): SyncedModel {
|
||||
const name = existing.name;
|
||||
const releaseDate = existing.release_date;
|
||||
const lastUpdated = existing.last_updated;
|
||||
const attachment = existing.attachment;
|
||||
const reasoning = existing.reasoning;
|
||||
const toolCall = existing.tool_call;
|
||||
const openWeights = existing.open_weights;
|
||||
const limit = existing.limit;
|
||||
const modalities = existing.modalities;
|
||||
|
||||
if (
|
||||
name === undefined
|
||||
|| releaseDate === undefined
|
||||
|| lastUpdated === undefined
|
||||
|| attachment === undefined
|
||||
|| reasoning === undefined
|
||||
|| toolCall === undefined
|
||||
|| openWeights === undefined
|
||||
|| limit === undefined
|
||||
|| modalities === undefined
|
||||
) {
|
||||
throw new Error(`Google model ${model.name} has incomplete local TOML metadata required for sync`);
|
||||
}
|
||||
|
||||
return {
|
||||
name: model.displayName ?? name,
|
||||
family: existing.family,
|
||||
release_date: releaseDate,
|
||||
last_updated: lastUpdated,
|
||||
attachment,
|
||||
reasoning: model.thinking ?? reasoning,
|
||||
temperature: model.temperature !== undefined || model.maxTemperature !== undefined
|
||||
? true
|
||||
: existing.temperature,
|
||||
tool_call: toolCall,
|
||||
structured_output: existing.structured_output,
|
||||
knowledge: existing.knowledge,
|
||||
open_weights: openWeights,
|
||||
status: existing.status,
|
||||
interleaved: existing.interleaved,
|
||||
cost: existing.cost,
|
||||
limit: {
|
||||
input: limit.input,
|
||||
context: model.inputTokenLimit,
|
||||
output: model.outputTokenLimit,
|
||||
},
|
||||
modalities,
|
||||
};
|
||||
}
|
||||
@@ -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>;
|
||||
@@ -73,12 +73,14 @@ function price(value: string | undefined) {
|
||||
: undefined;
|
||||
}
|
||||
|
||||
function modalities(values: string[], fallback: string[]) {
|
||||
const allowed = new Set(["text", "audio", "image", "video", "pdf"]);
|
||||
type Modality = "text" | "audio" | "image" | "video" | "pdf";
|
||||
|
||||
function modalities(values: string[], fallback: Modality[]): Modality[] {
|
||||
const allowed = new Set<Modality>(["text", "audio", "image", "video", "pdf"]);
|
||||
const result = values
|
||||
.map((value) => value.toLowerCase())
|
||||
.map((value) => value === "file" ? "pdf" : value)
|
||||
.filter((value) => allowed.has(value));
|
||||
.filter((value): value is Modality => allowed.has(value as Modality));
|
||||
return [...new Set(result.length > 0 ? result : fallback)];
|
||||
}
|
||||
|
||||
@@ -95,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"]);
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
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));
|
||||
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 },
|
||||
};
|
||||
}
|
||||
@@ -82,6 +82,7 @@ export const ModelFamilyValues = [
|
||||
|
||||
// xAI Grok
|
||||
"grok",
|
||||
"grok-build",
|
||||
"grok-vision",
|
||||
"grok-beta",
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# See https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-moonshot-ai-kimi-k2-thinking.html
|
||||
name = "Kimi K2 Thinking"
|
||||
release_date = "2025-12-02"
|
||||
family = "kimi-thinking"
|
||||
@@ -15,8 +16,8 @@ input = 0.6
|
||||
output = 2.5
|
||||
|
||||
[limit]
|
||||
context = 256_000
|
||||
output = 256_000
|
||||
context = 262_143
|
||||
output = 16_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# See https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-moonshot-ai-kimi-k2-5.html
|
||||
name = "Kimi K2.5"
|
||||
family = "kimi"
|
||||
release_date = "2026-02-06"
|
||||
@@ -15,8 +16,8 @@ input = 0.6
|
||||
output = 3
|
||||
|
||||
[limit]
|
||||
context = 256_000
|
||||
output = 256_000
|
||||
context = 262_143
|
||||
output = 16_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
|
||||
@@ -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"]
|
||||
+22
@@ -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"]
|
||||
+22
@@ -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,7 @@
|
||||
[extends]
|
||||
from = "deepseek/deepseek-v4-flash"
|
||||
|
||||
[cost]
|
||||
input = 0.14
|
||||
output = 0.28
|
||||
cache_read = 0.03
|
||||
@@ -0,0 +1,24 @@
|
||||
name = "Agentic Chat (GPT-5.5)"
|
||||
family = "gpt"
|
||||
release_date = "2026-04-23"
|
||||
last_updated = "2026-04-23"
|
||||
knowledge = "2025-08-31"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = false
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 1_050_000
|
||||
input = 922_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -1,3 +0,0 @@
|
||||
[extends]
|
||||
from = "google/gemini-2.5-flash-lite-preview-09-2025"
|
||||
omit = ["structured_output"]
|
||||
@@ -1,2 +0,0 @@
|
||||
[extends]
|
||||
from = "google/gemini-2.5-flash-preview-04-17"
|
||||
@@ -1,3 +0,0 @@
|
||||
[extends]
|
||||
from = "google/gemini-2.5-flash-preview-05-20"
|
||||
omit = ["structured_output"]
|
||||
@@ -1,3 +0,0 @@
|
||||
[extends]
|
||||
from = "google/gemini-2.5-pro-preview-05-06"
|
||||
omit = ["structured_output"]
|
||||
@@ -1,3 +0,0 @@
|
||||
[extends]
|
||||
from = "google/gemini-2.5-pro-preview-06-05"
|
||||
omit = ["structured_output"]
|
||||
@@ -1,23 +0,0 @@
|
||||
name = "Gemini 1.5 Flash-8B"
|
||||
family = "gemini-flash"
|
||||
release_date = "2024-10-03"
|
||||
last_updated = "2024-10-03"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
temperature = true
|
||||
knowledge = "2024-04"
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.0375
|
||||
output = 0.15
|
||||
cache_read = 0.01
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 8_192
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "audio", "video"]
|
||||
output = ["text"]
|
||||
@@ -1,23 +0,0 @@
|
||||
name = "Gemini 1.5 Flash"
|
||||
family = "gemini-flash"
|
||||
release_date = "2024-05-14"
|
||||
last_updated = "2024-05-14"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
temperature = true
|
||||
knowledge = "2024-04"
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.075
|
||||
output = 0.30
|
||||
cache_read = 0.01875
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 8_192
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "audio", "video"]
|
||||
output = ["text"]
|
||||
@@ -1,23 +0,0 @@
|
||||
name = "Gemini 1.5 Pro"
|
||||
family = "gemini-pro"
|
||||
release_date = "2024-02-15"
|
||||
last_updated = "2024-02-15"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
temperature = true
|
||||
knowledge = "2024-04"
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 1.25
|
||||
output = 5.00
|
||||
cache_read = 0.3125
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 8_192
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "audio", "video"]
|
||||
output = ["text"]
|
||||
@@ -1,18 +1,18 @@
|
||||
name = "Gemini 2.0 Flash Lite"
|
||||
name = "Gemini 2.0 Flash-Lite"
|
||||
family = "gemini-flash-lite"
|
||||
release_date = "2024-12-11"
|
||||
last_updated = "2024-12-11"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
temperature = true
|
||||
knowledge = "2024-06"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2024-06"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.075
|
||||
output = 0.30
|
||||
output = 0.3
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
name = "Gemini 2.5 Flash Image (Preview)"
|
||||
family = "gemini-flash"
|
||||
release_date = "2025-08-26"
|
||||
last_updated = "2025-08-26"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2025-06"
|
||||
tool_call = false
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.30
|
||||
output = 30
|
||||
cache_read = 0.075
|
||||
|
||||
[limit]
|
||||
context = 32_768
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
output = ["text", "image"]
|
||||
@@ -1,16 +1,16 @@
|
||||
name = "Gemini 2.5 Flash Image"
|
||||
name = "Nano Banana"
|
||||
family = "gemini-flash"
|
||||
release_date = "2025-08-26"
|
||||
last_updated = "2025-08-26"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2025-06"
|
||||
tool_call = false
|
||||
knowledge = "2025-06"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.30
|
||||
input = 0.3
|
||||
output = 30
|
||||
cache_read = 0.075
|
||||
|
||||
@@ -20,4 +20,4 @@ output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
output = ["text", "image"]
|
||||
output = ["text", "image"]
|
||||
@@ -1,24 +0,0 @@
|
||||
name = "Gemini 2.5 Flash Lite Preview 06-17"
|
||||
family = "gemini-flash-lite"
|
||||
release_date = "2025-06-17"
|
||||
last_updated = "2025-06-17"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2025-01"
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.10
|
||||
output = 0.40
|
||||
cache_read = 0.025
|
||||
input_audio = 0.30
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
output = 65_536
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "audio", "video", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -1,24 +0,0 @@
|
||||
name = "Gemini 2.5 Flash Lite Preview 09-25"
|
||||
family = "gemini-flash-lite"
|
||||
release_date = "2025-09-25"
|
||||
last_updated = "2025-09-25"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2025-01"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.10
|
||||
output = 0.40
|
||||
cache_read = 0.025
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
output = 65_536
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "audio", "video", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -1,20 +1,20 @@
|
||||
name = "Gemini 2.5 Flash Lite"
|
||||
name = "Gemini 2.5 Flash-Lite"
|
||||
family = "gemini-flash-lite"
|
||||
release_date = "2025-06-17"
|
||||
last_updated = "2025-06-17"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2025-01"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2025-01"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.10
|
||||
output = 0.40
|
||||
input = 0.1
|
||||
output = 0.4
|
||||
cache_read = 0.01
|
||||
input_audio = 0.30
|
||||
input_audio = 0.3
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
name = "Gemini 2.5 Flash Preview 04-17"
|
||||
family = "gemini-flash"
|
||||
release_date = "2025-04-17"
|
||||
last_updated = "2025-04-17"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2025-01"
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.15
|
||||
output = 0.60
|
||||
cache_read = 0.0375
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
output = 65_536
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "audio", "video", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -4,19 +4,19 @@ release_date = "2025-05-01"
|
||||
last_updated = "2025-05-01"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = false
|
||||
knowledge = "2025-01"
|
||||
temperature = true
|
||||
tool_call = false
|
||||
knowledge = "2025-01"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.50
|
||||
output = 10.00
|
||||
input = 0.5
|
||||
output = 10
|
||||
|
||||
[limit]
|
||||
context = 8_000
|
||||
output = 16_000
|
||||
context = 8_192
|
||||
output = 16_384
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["audio"]
|
||||
output = ["audio"]
|
||||
@@ -1,24 +0,0 @@
|
||||
name = "Gemini 2.5 Pro Preview 05-06"
|
||||
family = "gemini-pro"
|
||||
release_date = "2025-05-06"
|
||||
last_updated = "2025-05-06"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2025-01"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 1.25
|
||||
output = 10.00
|
||||
cache_read = 0.31
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
output = 65_536
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "audio", "video", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -1,24 +0,0 @@
|
||||
name = "Gemini 2.5 Pro Preview 06-05"
|
||||
family = "gemini-pro"
|
||||
release_date = "2025-06-05"
|
||||
last_updated = "2025-06-05"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2025-01"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 1.25
|
||||
output = 10.00
|
||||
cache_read = 0.31
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
output = 65_536
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "audio", "video", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -4,19 +4,19 @@ release_date = "2025-05-01"
|
||||
last_updated = "2025-05-01"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = false
|
||||
knowledge = "2025-01"
|
||||
temperature = true
|
||||
tool_call = false
|
||||
knowledge = "2025-01"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 1.00
|
||||
output = 20.00
|
||||
input = 1
|
||||
output = 20
|
||||
|
||||
[limit]
|
||||
context = 8_000
|
||||
output = 16_000
|
||||
context = 8_192
|
||||
output = 16_384
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["audio"]
|
||||
output = ["audio"]
|
||||
@@ -11,19 +11,19 @@ knowledge = "2025-01"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 2.00
|
||||
output = 12.00
|
||||
cache_read = 0.20
|
||||
input = 2
|
||||
output = 12
|
||||
cache_read = 0.2
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 200_000 }
|
||||
input = 4.00
|
||||
output = 18.00
|
||||
cache_read = 0.40
|
||||
input = 4
|
||||
output = 18
|
||||
cache_read = 0.4
|
||||
|
||||
[limit]
|
||||
context = 1000000
|
||||
output = 64000
|
||||
context = 1_048_576
|
||||
output = 65_536
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video", "audio", "pdf"]
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
name = "Gemini 3.1 Flash Image (Preview)"
|
||||
name = "Nano Banana 2"
|
||||
family = "gemini-flash"
|
||||
release_date = "2026-02-26"
|
||||
last_updated = "2026-02-26"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2025-01"
|
||||
tool_call = false
|
||||
knowledge = "2025-01"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.50
|
||||
output = 60.00
|
||||
input = 0.5
|
||||
output = 60
|
||||
|
||||
[limit]
|
||||
context = 131_072
|
||||
output = 32_768
|
||||
context = 65_536
|
||||
output = 65_536
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
|
||||
+9
-8
@@ -1,24 +1,25 @@
|
||||
name = "Gemini 2.5 Flash Preview 05-20"
|
||||
name = "Gemini 3.5 Flash"
|
||||
family = "gemini-flash"
|
||||
release_date = "2025-05-20"
|
||||
last_updated = "2025-05-20"
|
||||
release_date = "2026-05-19"
|
||||
last_updated = "2026-05-19"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2025-01"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2025-01"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.15
|
||||
output = 0.60
|
||||
cache_read = 0.0375
|
||||
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", "audio", "video", "pdf"]
|
||||
input = ["text", "image", "video", "audio", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -5,17 +5,17 @@ last_updated = "2025-05-20"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = false
|
||||
knowledge = "2025-05"
|
||||
tool_call = false
|
||||
knowledge = "2025-05"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.15
|
||||
output = 0.00
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 2_048
|
||||
output = 3_072
|
||||
output = 1
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
name = "Gemini Live 2.5 Flash Preview Native Audio"
|
||||
family = "gemini-flash"
|
||||
release_date = "2025-06-17"
|
||||
last_updated = "2025-09-18"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = false
|
||||
knowledge = "2025-01"
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.50
|
||||
output = 2.00
|
||||
input_audio = 3.00
|
||||
output_audio = 12.00
|
||||
|
||||
[limit]
|
||||
context = 131_072
|
||||
output = 65_536
|
||||
|
||||
[modalities]
|
||||
input = ["text", "audio", "video"]
|
||||
output = ["text", "audio"]
|
||||
@@ -1,24 +0,0 @@
|
||||
name = "Gemini Live 2.5 Flash"
|
||||
family = "gemini-flash"
|
||||
release_date = "2025-09-01"
|
||||
last_updated = "2025-09-01"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2025-01"
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.50
|
||||
output = 2.00
|
||||
input_audio = 3.00
|
||||
output_audio = 12.00
|
||||
|
||||
[limit]
|
||||
context = 128_000
|
||||
output = 8_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "audio", "video"]
|
||||
output = ["text", "audio"]
|
||||
@@ -1,23 +0,0 @@
|
||||
name = "Gemma 3 12B"
|
||||
family = "gemma"
|
||||
release_date = "2025-03-13"
|
||||
last_updated = "2025-03-13"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
temperature = true
|
||||
knowledge = "2024-10"
|
||||
tool_call = false
|
||||
structured_output = true
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 32_768
|
||||
output = 8_192
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
output = ["text"]
|
||||
@@ -1,23 +0,0 @@
|
||||
name = "Gemma 3 27B"
|
||||
family = "gemma"
|
||||
release_date = "2025-03-12"
|
||||
last_updated = "2025-03-12"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
temperature = true
|
||||
knowledge = "2024-10"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 131_072
|
||||
output = 8_192
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
output = ["text"]
|
||||
@@ -1,22 +0,0 @@
|
||||
name = "Gemma 3 4B"
|
||||
family = "gemma"
|
||||
release_date = "2025-03-13"
|
||||
last_updated = "2025-03-13"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
temperature = true
|
||||
knowledge = "2024-10"
|
||||
tool_call = false
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 32_768
|
||||
output = 8_192
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
output = ["text"]
|
||||
@@ -1,22 +0,0 @@
|
||||
name = "Gemma 3n 2B"
|
||||
family = "gemma"
|
||||
release_date = "2025-07-09"
|
||||
last_updated = "2025-07-09"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
temperature = true
|
||||
knowledge = "2024-10"
|
||||
tool_call = false
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 8_192
|
||||
output = 2_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
@@ -1,22 +0,0 @@
|
||||
name = "Gemma 3n 4B"
|
||||
family = "gemma"
|
||||
release_date = "2025-05-20"
|
||||
last_updated = "2025-05-20"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
temperature = true
|
||||
knowledge = "2024-10"
|
||||
tool_call = false
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 8_192
|
||||
output = 2_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
@@ -1,8 +1,8 @@
|
||||
name = "Gemma 4 26B"
|
||||
name = "Gemma 4 26B A4B IT"
|
||||
family = "gemma"
|
||||
release_date = "2026-04-02"
|
||||
last_updated = "2026-04-02"
|
||||
attachment = false
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
@@ -10,8 +10,8 @@ structured_output = true
|
||||
open_weights = true
|
||||
|
||||
[limit]
|
||||
context = 256000
|
||||
output = 8192
|
||||
context = 262_144
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
name = "Gemma 4 31B"
|
||||
name = "Gemma 4 31B IT"
|
||||
family = "gemma"
|
||||
release_date = "2026-04-02"
|
||||
last_updated = "2026-04-02"
|
||||
attachment = false
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
@@ -10,8 +10,8 @@ structured_output = true
|
||||
open_weights = true
|
||||
|
||||
[limit]
|
||||
context = 256000
|
||||
output = 8192
|
||||
context = 262_144
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name = "Google"
|
||||
env = ["GOOGLE_GENERATIVE_AI_API_KEY", "GEMINI_API_KEY"]
|
||||
env = ["GOOGLE_API_KEY", "GOOGLE_GENERATIVE_AI_API_KEY", "GEMINI_API_KEY"]
|
||||
npm = "@ai-sdk/google"
|
||||
doc = "https://ai.google.dev/gemini-api/docs/models"
|
||||
@@ -1,2 +0,0 @@
|
||||
[extends]
|
||||
from = "google/gemini-2.5-flash-lite-preview-09-2025"
|
||||
@@ -1,2 +0,0 @@
|
||||
[extends]
|
||||
from = "google/gemma-3-12b-it"
|
||||
@@ -1,2 +0,0 @@
|
||||
[extends]
|
||||
from = "google/gemma-3-4b-it"
|
||||
@@ -1,2 +0,0 @@
|
||||
[extends]
|
||||
from = "google/gemma-3n-e2b-it"
|
||||
@@ -1,2 +0,0 @@
|
||||
[extends]
|
||||
from = "google/gemma-3n-e4b-it"
|
||||
+12
-9
@@ -1,25 +1,28 @@
|
||||
name = "Gemini 2.5 Flash Preview 09-25"
|
||||
name = "Gemini 3.5 Flash"
|
||||
family = "gemini-flash"
|
||||
release_date = "2025-09-25"
|
||||
last_updated = "2025-09-25"
|
||||
release_date = "2026-05-19"
|
||||
last_updated = "2026-05-19"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2025-01"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2025-01"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.30
|
||||
output = 2.50
|
||||
cache_read = 0.075
|
||||
input_audio = 1.00
|
||||
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", "audio", "video", "pdf"]
|
||||
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,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
|
||||
<path d="M4 12a8 8 0 0 1 8-8h8v8a8 8 0 0 1-8 8H4v-8Z" stroke="currentColor" stroke-width="2" stroke-linejoin="round"/>
|
||||
<path d="M8 12h8M12 8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 292 B |
@@ -0,0 +1,26 @@
|
||||
name = "DeepSeek V3.2"
|
||||
family = "deepseek"
|
||||
release_date = "2025-12-01"
|
||||
last_updated = "2025-12-01"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2024-07"
|
||||
open_weights = true
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.4928
|
||||
output = 0.7392
|
||||
|
||||
[limit]
|
||||
context = 163_840
|
||||
output = 163_840
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
output = ["text"]
|
||||
@@ -0,0 +1,16 @@
|
||||
name = "DeepSeek V4 Flash 6bit"
|
||||
reasoning = true
|
||||
|
||||
[extends]
|
||||
from = "deepseek/deepseek-v4-flash"
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.4928
|
||||
output = 0.7392
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 131_072
|
||||
@@ -0,0 +1,16 @@
|
||||
name = "DeepSeek V4 Flash"
|
||||
reasoning = true
|
||||
|
||||
[extends]
|
||||
from = "deepseek/deepseek-v4-flash"
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.4928
|
||||
output = 0.7392
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 131_072
|
||||
@@ -0,0 +1,16 @@
|
||||
name = "DeepSeek V4 Pro 6bit"
|
||||
reasoning = true
|
||||
|
||||
[extends]
|
||||
from = "deepseek/deepseek-v4-pro"
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.4928
|
||||
output = 0.7392
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 131_072
|
||||
@@ -0,0 +1,16 @@
|
||||
name = "DeepSeek V4 Pro"
|
||||
reasoning = true
|
||||
|
||||
[extends]
|
||||
from = "deepseek/deepseek-v4-pro"
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.4928
|
||||
output = 0.7392
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 131_072
|
||||
@@ -0,0 +1,18 @@
|
||||
name = "Gemma 4 31B IT"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
|
||||
[extends]
|
||||
from = "google/gemma-4-31b-it"
|
||||
|
||||
[cost]
|
||||
input = 0.10
|
||||
output = 0.30
|
||||
|
||||
[limit]
|
||||
context = 131_072
|
||||
output = 65_536
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
output = ["text"]
|
||||
@@ -0,0 +1,16 @@
|
||||
name = "GLM 5.1 6bit"
|
||||
reasoning = true
|
||||
|
||||
[extends]
|
||||
from = "zai/glm-5.1"
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 1.00
|
||||
output = 3.00
|
||||
|
||||
[limit]
|
||||
context = 202_752
|
||||
output = 202_752
|
||||
@@ -0,0 +1,16 @@
|
||||
name = "GLM 5.1"
|
||||
reasoning = true
|
||||
|
||||
[extends]
|
||||
from = "zai/glm-5.1"
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 1.00
|
||||
output = 3.00
|
||||
|
||||
[limit]
|
||||
context = 202_752
|
||||
output = 202_752
|
||||
@@ -0,0 +1,19 @@
|
||||
name = "Kimi K2.5"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
|
||||
[extends]
|
||||
from = "moonshotai/kimi-k2.5"
|
||||
omit = ["interleaved"]
|
||||
|
||||
[cost]
|
||||
input = 0.462
|
||||
output = 2.42
|
||||
|
||||
[limit]
|
||||
context = 131_072
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
output = ["text"]
|
||||
@@ -0,0 +1,20 @@
|
||||
name = "Kimi K2.6 6bit"
|
||||
reasoning = true
|
||||
|
||||
[extends]
|
||||
from = "moonshotai/kimi-k2.6"
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.462
|
||||
output = 2.42
|
||||
|
||||
[limit]
|
||||
context = 262_144
|
||||
output = 262_144
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
output = ["text"]
|
||||
@@ -0,0 +1,20 @@
|
||||
name = "Kimi K2.6"
|
||||
reasoning = true
|
||||
|
||||
[extends]
|
||||
from = "moonshotai/kimi-k2.6"
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.462
|
||||
output = 2.42
|
||||
|
||||
[limit]
|
||||
context = 262_144
|
||||
output = 262_144
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
output = ["text"]
|
||||
@@ -0,0 +1,21 @@
|
||||
name = "MiMo V2.5 Pro 6bit"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
|
||||
[extends]
|
||||
from = "xiaomi/mimo-v2.5-pro"
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.45
|
||||
output = 1.35
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 262_144
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
output = ["text"]
|
||||
@@ -0,0 +1,21 @@
|
||||
name = "MiMo V2.5 Pro"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
|
||||
[extends]
|
||||
from = "xiaomi/mimo-v2.5-pro"
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.45
|
||||
output = 1.35
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 262_144
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
output = ["text"]
|
||||
Loaded 100 of 141 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user