feat(pi-openrouter): replace runtime provider override with models.json sync CLI
The extension overrode pi's built-in openrouter provider at runtime, which replaced the full catalog with a curated list, dropped openRouterRouting compat, and only existed in processes that load extensions — headless children and subagents resolved models differently and broke. pi core supports per-model api/baseUrl in models.json (verified against completions, responses, and messages surfaces), so the entire routed provider is expressible as config. pi-openrouter is now a CLI: - src/rules.ts: surface policy as data — family defaults (anthropic/* -> messages, openai/* -> responses), surface compat rules, and benchmark- proven exceptions with revalidateAfter dates that sync warns about - src/generate.ts: deterministic whole-catalog generation from the live /models API; output depends only on (catalog, rules), never on the installed pi version's built-in catalog - src/sync.ts + src/cli.ts: pi-openrouter sync [--check] [--stdout] [--file] rewrites providers.openrouter.models (tool-owned) while preserving modelOverrides, provider compat, and other providers; fetch failure aborts without touching models.json - benchmark harness unchanged apart from the shared model builder No preferred_min_throughput floor: its interaction with allow_fallbacks under congestion is untested.
L
Luke Parke committed
276845784b30c3ee881a05a052ac10cf39a3c330
Parent: 71bcff9