Repository navigation
feat: refresh Franklin models through shared Model Core - #181
Conversation
VickyXAI
left a comment
There was a problem hiding this comment.
Thanks for this — the direction is right and the suite is green locally (765/765). Holding the merge on one regression plus a few product calls.
Blocking — a failed snapshot fetch skips the gateway fetch. In @blockrun/model-catalog refresh(), the catalogUrl fetch runs first inside the same try; if it throws, the gateway /v1/models fetch never runs and the client falls back to the bundled snapshot. Reproduced against this branch:
- default:
source: live, 106 models BLOCKRUN_MODEL_CATALOG_URLunreachable:source: bundled,lastError: "fetch failed", gateway never contacted
So a GitHub outage, or any network where raw.githubusercontent.com is blocked (mainland China, some corporate proxies), pins users to stale models and prices — worse than main, which only needs the gateway. A policy-fetch failure should keep the last good policy and still refresh gateway rows. Fixing this in model-catalog; will re-pin here.
Product calls (owner decision before merge):
- Rolling shortcuts (
opus,sonnet,grok, …) are now driven at runtime from model-catalogmain. A push there retargets every installed Franklin within ~5 min, including price, with no release. - Existing aliases move in this PR:
claudeOpus 5 → Sonnet 5.5,sonnet→ Sonnet 5.5,grok→ Grok 4.7. - The picker goes from the curated ~24 rows to every available chat model (82); the trim tests are deleted.
- Only aliases targeting
FREE_DEFAULT_MODELare locked free; other legacy free aliases (laguna,ultra-550b) can be remapped remotely.
Minor:
- The gateway models request no longer sends Franklin's
User-Agent. start.tsnow awaits up to two sequential 4 s requests before startup continues.- The README section lands below the closing footer
</div>.
- Franklin's shortcuts now win over the shared policy. Remote policy can add aliases but can no longer retarget one users rely on (opus, sonnet, claude, grok, gemini) or turn a free alias paid without a release. - The picker shows Auto plus the policy's curated groups; uncurated models stay behind +more / Ctrl+A instead of all 80+ rows in the main list. - getGatewayModels() throws again when only bundled data is available, so callers keep their stale-cache and static-picker fallbacks instead of treating the packaged snapshot as live for five minutes. - Gateway catalog requests send Franklin's User-Agent again. - Startup warms the catalog in the background instead of blocking on it. - README section moved above License. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ateway rows) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Franklin's model picker and price estimates drifted when gateway models changed. This integration consumes the public BlockRun Model Core, with its runtime pinned to
2b55804b109cd132bd988096fb3617fb48e67cfb. It refreshes shared policy and the active gateway's live model catalog without requiring a Franklin release for ordinary model-list and pricing updates.Final merged behavior:
The review's blocking policy-outage regression was fixed in Model Core #1 and incorporated before merge. This description reflects the final merged implementation, not the initial revision. The remaining README wording is corrected in Franklin #183.
Validation:
4dad775dfbc822ee8174c00d3207c1eb947afc69: Node 20/22 CI, macOS/Windows desktop builds, and Brand numbers all passed.npm testpassed 766 tests; pinned Model Corenpm run checkpassed 21 tests, with zero failures/skips.