Follow-up to #326 (Guislabert). usage() applies loader()'s 32-hex Account ID check, so an invalid id returns the fallback plan row and never reaches the /accounts/{id} path. The "(Paid)" name rule lives in one paidName helper. Two parser tests cover a non-HTTP(S) baseTemplate and an unknown placeholder. Version 0.0.2.
Run at the reviewed head afd7878 (based on origin/main):
- bun scripts/check.mjs cloudflare-workers-ai: ok
- node --test in the package under a temp HOME: 15 of 15 pass
- main's src/index.mjs with the new tests: the invalid-Account-ID usage test fails (14 of 15), so it guards the fix
- afd7878 against 114900a: README CHANGELOG links dropped, version 0.0.2; src and tests unchanged
Not tried here: a real Cloudflare account (the author's run on 0.0.1 is on #326).
New community provider plugin @magpie-community/opencode-cloudflare-workers-ai-auth 0.0.1 (Guislabert): signs in to Cloudflare Workers AI with an API token and Account ID, lists the models models.dev has under cloudflare-workers-ai, marks the 8 paid-only models "(Paid)", and adds a Neurons/day quota row. registry.json gains its one entry.
Run at the reviewed head 84b3aaf (based on origin/main):
- bun scripts/check.mjs cloudflare-workers-ai: ok
- node --test in the package under a temp HOME: 12 of 12 pass
- models.dev outage repro (stubbed fetch, discoveryTTLMs 1, catalog reachable then down): the second request still goes out ("down: sent 2"). At 6e9fd73 it failed; review asked for this.
- registry.json diff against main: the one new entry only
Not tried: a real Cloudflare account; no request reached Cloudflare.