Compare commits
23
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ceac8a58b | ||
|
|
f107afc57c | ||
|
|
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
@@ -5,6 +5,7 @@ import { mkdir, readdir, rm } from "node:fs/promises";
|
||||
import { z } from "zod";
|
||||
|
||||
import { AuthoredModel, AuthoredModelShape } from "../src/schema.js";
|
||||
import { google } from "./sync/google.js";
|
||||
import { openrouter } from "./sync/openrouter.js";
|
||||
|
||||
const ExistingModel = AuthoredModelShape.partial()
|
||||
@@ -26,6 +27,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 +46,21 @@ 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: {
|
||||
google: SyncProvider<any>;
|
||||
openrouter: SyncProvider<any>;
|
||||
} = {
|
||||
google,
|
||||
openrouter,
|
||||
};
|
||||
|
||||
export const groups = {
|
||||
aggregators: ["openrouter"],
|
||||
direct: ["google"],
|
||||
} as const;
|
||||
|
||||
type ProviderID = keyof typeof providers;
|
||||
@@ -73,6 +83,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 +91,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 +174,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 +234,7 @@ function summarize(
|
||||
provider: { id: string; name: string },
|
||||
files: SyncResult["files"],
|
||||
unchanged: number,
|
||||
notices: string[],
|
||||
): SyncResult {
|
||||
return {
|
||||
id: provider.id,
|
||||
@@ -224,6 +244,7 @@ function summarize(
|
||||
updated: files.filter((file) => file.status === "updated").length,
|
||||
deleted: files.filter((file) => file.status === "deleted").length,
|
||||
unchanged,
|
||||
notices,
|
||||
files,
|
||||
};
|
||||
}
|
||||
@@ -282,6 +303,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,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,
|
||||
};
|
||||
}
|
||||
@@ -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)];
|
||||
}
|
||||
|
||||
|
||||
@@ -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,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"]
|
||||
@@ -1,25 +0,0 @@
|
||||
name = "Gemini 2.5 Flash Preview 09-25"
|
||||
family = "gemini-flash"
|
||||
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.30
|
||||
output = 2.50
|
||||
cache_read = 0.075
|
||||
input_audio = 1.00
|
||||
|
||||
[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"
|
||||
@@ -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"]
|
||||
@@ -0,0 +1,13 @@
|
||||
name = "MiniMax M2.5 Highspeed"
|
||||
reasoning = false
|
||||
|
||||
[extends]
|
||||
from = "minimax/MiniMax-M2.5-highspeed"
|
||||
|
||||
[cost]
|
||||
input = 0.193
|
||||
output = 1.238
|
||||
|
||||
[limit]
|
||||
context = 100_000
|
||||
output = 131_072
|
||||
@@ -0,0 +1,13 @@
|
||||
name = "MiniMax M2.5"
|
||||
reasoning = false
|
||||
|
||||
[extends]
|
||||
from = "minimax/MiniMax-M2.5"
|
||||
|
||||
[cost]
|
||||
input = 0.193
|
||||
output = 1.238
|
||||
|
||||
[limit]
|
||||
context = 100_000
|
||||
output = 131_072
|
||||
@@ -0,0 +1,16 @@
|
||||
name = "MiniMax M2.7 Highspeed"
|
||||
reasoning = true
|
||||
|
||||
[extends]
|
||||
from = "minimax/MiniMax-M2.7-highspeed"
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.33
|
||||
output = 1.32
|
||||
|
||||
[limit]
|
||||
context = 100_000
|
||||
output = 131_072
|
||||
@@ -0,0 +1,16 @@
|
||||
name = "MiniMax M2.7"
|
||||
reasoning = true
|
||||
|
||||
[extends]
|
||||
from = "minimax/MiniMax-M2.7"
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.33
|
||||
output = 1.32
|
||||
|
||||
[limit]
|
||||
context = 100_000
|
||||
output = 131_072
|
||||
@@ -0,0 +1,13 @@
|
||||
name = "Mistral Large 3"
|
||||
attachment = false
|
||||
|
||||
[extends]
|
||||
from = "mistral/mistral-large-2512"
|
||||
|
||||
[limit]
|
||||
context = 128_000
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
@@ -0,0 +1,12 @@
|
||||
name = "Mistral Medium 2505"
|
||||
|
||||
[extends]
|
||||
from = "mistral/mistral-medium-2505"
|
||||
|
||||
[limit]
|
||||
context = 128_000
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
output = ["text"]
|
||||
@@ -0,0 +1,13 @@
|
||||
name = "Mistral Small 2503"
|
||||
reasoning = false
|
||||
|
||||
[extends]
|
||||
from = "mistral/mistral-small-2603"
|
||||
|
||||
[limit]
|
||||
context = 128_000
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
output = ["text"]
|
||||
@@ -0,0 +1,17 @@
|
||||
name = "Qwen3.6 27B"
|
||||
reasoning = false
|
||||
|
||||
[extends]
|
||||
from = "alibaba/qwen3.6-27b"
|
||||
|
||||
[cost]
|
||||
input = 1.10
|
||||
output = 3.30
|
||||
|
||||
[limit]
|
||||
context = 262_144
|
||||
output = 262_144
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
output = ["text"]
|
||||
@@ -0,0 +1,12 @@
|
||||
name = "Step 3.5 Flash 2603"
|
||||
reasoning = true
|
||||
|
||||
[extends]
|
||||
from = "stepfun/step-3.5-flash-2603"
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[limit]
|
||||
context = 262_144
|
||||
output = 65_536
|
||||
@@ -0,0 +1,12 @@
|
||||
name = "Step 3.5 Flash"
|
||||
reasoning = true
|
||||
|
||||
[extends]
|
||||
from = "stepfun/step-3.5-flash"
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[limit]
|
||||
context = 262_144
|
||||
output = 65_536
|
||||
@@ -0,0 +1,12 @@
|
||||
name = "StepFun 3.5 Flash"
|
||||
reasoning = true
|
||||
|
||||
[extends]
|
||||
from = "stepfun/step-3.5-flash"
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[limit]
|
||||
context = 262_144
|
||||
output = 65_536
|
||||
@@ -0,0 +1,5 @@
|
||||
name = "routing.run"
|
||||
env = ["ROUTING_RUN_API_KEY"]
|
||||
npm = "@ai-sdk/openai-compatible"
|
||||
api = "https://api.routing.run/v1"
|
||||
doc = "https://docs.routing.run/api-reference/models"
|
||||
@@ -15,12 +15,6 @@ input = 1.25
|
||||
output = 10.00
|
||||
cache_read = 0.125
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 200_000 }
|
||||
input = 2.50
|
||||
output = 15.00
|
||||
cache_read = 0.25
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
output = 65_536
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
name = "gpt-5.4"
|
||||
family = "gpt"
|
||||
release_date = "2026-04-27"
|
||||
last_updated = "2026-04-27"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = false
|
||||
knowledge = "2025-08-31"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 2.50
|
||||
output = 15.00
|
||||
cache_read = 0.25
|
||||
|
||||
[limit]
|
||||
context = 1_050_000
|
||||
input = 922_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -0,0 +1,128 @@
|
||||
TODO: delete
|
||||
|
||||
# Model Sync Scripts
|
||||
|
||||
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.
|
||||
|
||||
## Commands
|
||||
|
||||
- `bun models:sync aggregators` syncs every provider in the `aggregators` group.
|
||||
- `bun models:sync openrouter` syncs only OpenRouter.
|
||||
- `bun models:sync direct` syncs every provider in the `direct` group.
|
||||
- `bun models:sync google` syncs only Google.
|
||||
- `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.
|
||||
|
||||
Sync runs also write `.sync/model-sync-report.md` for the automation workflow PR body. Do not commit that report from local runs.
|
||||
|
||||
## Runner Responsibilities
|
||||
|
||||
`packages/core/script/sync-models.ts` handles the shared behavior:
|
||||
|
||||
- Reads existing TOML files from the provider `modelsDir`.
|
||||
- Parses existing files with `Bun.TOML.parse` and `AuthoredModelShape.partial()`.
|
||||
- Calls the provider module to fetch, parse, and translate source models.
|
||||
- Validates translated models with `AuthoredModel` before writing.
|
||||
- Formats TOML consistently for all synced providers.
|
||||
- Compares semantic model data before writing to avoid formatting-only churn.
|
||||
- Replaces symlinked files safely by removing the symlink before writing.
|
||||
- Removes existing files that are no longer present in the desired synced set.
|
||||
- Writes `.sync/model-sync-report.md` for GitHub Actions.
|
||||
|
||||
Because the runner removes files missing from the desired set, a provider module should only skip source models when deleting existing local files for those skipped IDs is intentional.
|
||||
|
||||
## Provider Modules
|
||||
|
||||
Provider modules live in `packages/core/script/sync/`. A provider exports an object satisfying `SyncProvider<SourceModel>`:
|
||||
|
||||
```ts
|
||||
export const provider = {
|
||||
id: "provider-id",
|
||||
name: "Provider Name",
|
||||
modelsDir: "providers/provider-id/models",
|
||||
async fetchModels() {
|
||||
return fetch("https://example.com/models").then((response) => response.json());
|
||||
},
|
||||
parseModels(raw) {
|
||||
return ProviderResponse.parse(raw).data;
|
||||
},
|
||||
translateModel(model, context) {
|
||||
return {
|
||||
id: model.id,
|
||||
model: buildModel(model, context.existing(model.id)),
|
||||
};
|
||||
},
|
||||
} satisfies SyncProvider<ProviderModel>;
|
||||
```
|
||||
|
||||
Keep provider modules focused on provider-specific logic:
|
||||
|
||||
- Define Zod schemas for the provider API response.
|
||||
- Fetch from the provider API, including auth headers when needed.
|
||||
- Convert provider pricing units to per-1M-token catalog prices.
|
||||
- Convert dates, modalities, limits, capabilities, and model IDs into catalog fields.
|
||||
- Preserve existing hand-authored fields only when the provider API is not authoritative for that field.
|
||||
- Return `undefined` from `translateModel` only when skipped source models should be treated as absent from the synced catalog.
|
||||
|
||||
Do not put TOML scanning, writing, deletion, reporting, or generic comparison logic in provider modules.
|
||||
|
||||
## Adding A Provider
|
||||
|
||||
1. Create `packages/core/script/sync/<provider>.ts`.
|
||||
2. Define strict-enough Zod schemas for the provider response.
|
||||
3. Export a `SyncProvider` implementation with `fetchModels`, `parseModels`, and `translateModel`.
|
||||
4. Add the provider to `providers` in `packages/core/script/sync-models.ts`.
|
||||
5. Add the provider ID to an existing group or create a new group in `groups`.
|
||||
6. Update `.github/workflows/sync-models.yml` matrix labels and titles if the new group should run in automation.
|
||||
7. Run `bun models:sync <provider> --dry-run` to inspect the first diff.
|
||||
8. Run `bun models:sync <provider>` to write files.
|
||||
9. Run `bun models:sync <provider> --dry-run` again and expect a clean result.
|
||||
10. Run `bun validate`.
|
||||
|
||||
Prefer small, provider-specific PRs when adding a provider. If the provider has ambiguous source data, keep it out of shared groups until the source-of-truth behavior is clear.
|
||||
|
||||
## Automation
|
||||
|
||||
`.github/workflows/sync-models.yml` runs on a daily schedule and manually through `workflow_dispatch`.
|
||||
|
||||
The workflow:
|
||||
|
||||
- Checks out `dev`.
|
||||
- Installs dependencies with Bun.
|
||||
- Runs `bun models:sync ${{ matrix.group }}`.
|
||||
- Runs `bun validate`.
|
||||
- Creates or updates a sync PR only when `providers` changed.
|
||||
- Uses `.sync/model-sync-report.md` as the PR body.
|
||||
|
||||
Actions are pinned by commit SHA. Keep new workflow actions pinned the same way.
|
||||
|
||||
## OpenRouter Notes
|
||||
|
||||
OpenRouter is implemented in `packages/core/script/sync/openrouter.ts`.
|
||||
|
||||
- Source endpoint: `https://openrouter.ai/api/v1/models`.
|
||||
- Optional auth: `OPENROUTER_API_KEY`.
|
||||
- Model IDs map directly to TOML paths under `providers/openrouter/models`.
|
||||
- API prices are per-token strings and are converted to per-1M-token numbers.
|
||||
- `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.
|
||||
|
||||
## Google Notes
|
||||
|
||||
Google is implemented in `packages/core/script/sync/google.ts`.
|
||||
|
||||
- Source endpoint: `https://generativelanguage.googleapis.com/v1beta/models`.
|
||||
- Required auth: `GOOGLE_API_KEY`, `GEMINI_API_KEY`, or `GOOGLE_GENERATIVE_AI_API_KEY`.
|
||||
- Model IDs are derived from the `models/{model}` resource names.
|
||||
- The API is authoritative for display names, token limits, temperature metadata, and the `thinking` flag when present.
|
||||
- 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.
|
||||
|
||||
## 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.
|
||||
|
||||
Do not add Vercel model changes to OpenRouter sync PRs.
|
||||
Reference in new issue
Block a user