@magpie-community/opencode-cursor-auth 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +6 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -405,8 +405,12 @@ async function usage(tok, ids) {
405
405
  return bucket.has(model) || firstParty(model)
406
406
  }
407
407
  // Auto is always one, so the pool's list is never empty (which would
408
- // count every model)
409
- const pool = [...new Set(["auto", ...ids, ...(data.autoBucketModels ?? [])])].filter(inPool)
408
+ // count every model). A model listed at its context sizes (grok-4.7@256k)
409
+ // is still asked for by its bare name (grok-4.7) where it was picked
410
+ // before the list had sizes, and runs as its default, so the pool names
411
+ // that too (Will on Discord)
412
+ const asked = ids.flatMap((id) => [id, id.replace(/@[^@]*$/, "")])
413
+ const pool = [...new Set(["auto", ...asked, ...(data.autoBucketModels ?? [])])].filter(inPool)
410
414
  const num = (v) => (typeof v === "number" ? v : 0)
411
415
  // the two pools fit the line; the total goes in its tooltip
412
416
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magpie-community/opencode-cursor-auth",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Cursor subscriptions (Pro, Pro+, Ultra, Teams) in OpenCode and magpie, through the API cursor-agent talks to",
5
5
  "type": "module",
6
6
  "main": "./index.mjs",