Compare commits

...
Author SHA1 Message Date
Aiden Cline 5ceac8a58b updates 2026-05-19 23:43:01 -05:00
Aiden Cline f107afc57c sync 2026-05-19 22:56:50 -05:00
Aiden Cline 8c677f0134 sync google models 2026-05-19 15:58:06 -05:00
43 changed files with 244 additions and 503 deletions

No files matched your search

+35 -3
View File
@@ -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`);
}
+138
View File
@@ -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 -3
View File
@@ -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 +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,24 +0,0 @@
name = "Gemini 2.5 Flash Preview 05-20"
family = "gemini-flash"
release_date = "2025-05-20"
last_updated = "2025-05-20"
attachment = true
reasoning = true
temperature = true
knowledge = "2025-01"
tool_call = true
structured_output = 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"]
@@ -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"]
+4 -4
View File
@@ -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 -1
View File
@@ -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"
+14 -1
View File
@@ -4,12 +4,14 @@ TODO: delete
Model syncs are centralized in `packages/core/script/sync-models.ts`. The runner owns file IO, TOML formatting, validation, reporting, dry runs, and deletion behavior. Individual provider sync modules only fetch source data, parse it, and translate each source model into the catalog schema.
The current grouped sync target is `aggregators`, which runs OpenRouter only.
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.
@@ -108,6 +110,17 @@ OpenRouter is implemented in `packages/core/script/sync/openrouter.ts`.
- `structured_output` comes from `supported_parameters.includes("structured_outputs")` only.
- Existing `status`, `interleaved`, `knowledge`, `limit.input`, and `cost.tiers` may be preserved when OpenRouter is not authoritative enough for those fields.
## 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.