mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
feat(ai): refactor provider definitions (#11368)
This builds the model catalog from per-provider definitions and models.dev v2 data. It eplacer `generate-models.ts` with one `defineProvider()` file per built-in provider, shared model-family rules (Claude, GPT, DeepSeek, Kimi, Google), and source adapters. models.dev is read through its v2 API. Outputs and CLI flags are unchanged.
This commit is contained in:
parent
068e972c7b
commit
2e0f175bd5
120 changed files with 3952 additions and 3899 deletions
|
|
@ -63,7 +63,11 @@ const currentThinkingOutput = join(temporaryRoot, "after-thinking");
|
|||
let worktreeAdded = false;
|
||||
|
||||
function generateCatalog(cwd, outputDir, pretty = false) {
|
||||
const args = ["packages/ai/scripts/generate-models.ts", "--strict", "--json-only", "--json-output", outputDir];
|
||||
// Baselines from before the catalog moved still have the old generator.
|
||||
const generator = existsSync(join(cwd, "packages/ai/catalog/generate.ts"))
|
||||
? "packages/ai/catalog/generate.ts"
|
||||
: "packages/ai/scripts/generate-models.ts";
|
||||
const args = [generator, "--strict", "--json-only", "--json-output", outputDir];
|
||||
if (pretty) args.push("--pretty");
|
||||
run(process.execPath, args, { cwd, capture: true });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue