MCPcopy
hub / github.com/marimo-team/marimo / main

Function main

packages/llm-info/src/sync-models.ts:277–304  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

275}
276
277async function main(): Promise<void> {
278 try {
279 const dataDir = join(__dirname, "../data");
280 const args = parseCliArgs(process.argv.slice(2));
281 const max = args.maxPerProvider ?? MAX_MODELS_PER_PROVIDER;
282 const providers = args.providers?.join(",") ?? "all";
283 Logger.info(
284 `Fetching models.dev catalog (mode: ${args.mode}, max-per-provider: ${max}, providers: ${providers})...`,
285 );
286
287 const result = await syncModels({
288 ...args,
289 modelsYamlPath: join(dataDir, "models.yml"),
290 });
291
292 Logger.info(
293 `Sync complete: added ${result.added} new model(s), preserved ${result.preserved} existing entries.`,
294 );
295 Logger.info(
296 result.added > 0
297 ? "Review the diff (git diff packages/llm-info/data/models.yml) and open a PR."
298 : "No changes — models.yml is up to date.",
299 );
300 } catch (error) {
301 Logger.error("Sync failed:", error);
302 process.exit(1);
303 }
304}
305
306if (
307 process.argv[1] &&

Callers 1

sync-models.tsFile · 0.70

Calls 6

parseCliArgsFunction · 0.90
syncModelsFunction · 0.85
sliceMethod · 0.80
infoMethod · 0.80
joinMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…