Commit Graph
2 Commits
Author SHA1 Message Date
yetone 622f950392 commandcode 0.1.20: Go, GOAT and Pro's month is said in credits; Provider has no month (#556)
NeuroPaw (#556): PLAN_NAMES sizes GOAT's month at 70 and Pro's at 80,
while Command Code's pricing now says GOAT "up to $100" and Pro "up to
$110", per model.

Checked against Command Code's live pages (2026-10-31). The usage limits
page says "on Go, GOAT and Pro, credits are usage-value units -
full-allowance models like GLM-5.2 get $1 of usage per credit", and that
GOAT's 14 credits in 5 hours and 35 in 7 days are "worth up to $20 / $50
of usage on a $100 model like Ling 3.1 Flash, or $14 / $35 on a $70 model
like GLM-5.2" (Pro: 16 / 40, up to $22 / $55 on a $110 model, $16 / $40
on an $80 one). billing/credits' windowLimits caps are those credits (the
recorded GOAT reply has caps 14 and 35, monthlyCredits 69.80). So the
month is 70 credits on GOAT and 80 on Pro, in the units monthlyCredits
counts in: the CLI's 70 and 80 still match, and raising them to 100 and
110 would mix dollars into a credit count. What was wrong is the card
calling those credits dollars ("$0.20 / $70.00"). The pricing page lists
Provider as "$15 /month ... Pay as you go" with no credits, and the
table's 15 made a "$x / $15.00" month for it.

- Go, GOAT and Pro (both Pro ids): the Credits window is the month's
  credits, said as credits ("0.20 / 70.00 credits"); bought and free
  credits, dollars at model cost, are said beside it ("+ $5.00 extra")
  and no longer added to the pool.
- Max, Ultra, Teams Pro (1 credit = $1): the CLI's pool, in dollars,
  unchanged.
- Provider: no month of credits, so its card is the balance.
- The 5-hour and weekly windows are unchanged.

The response has no field with the plan's total, so the month's size
still comes from the table; /alpha/usage/summary was not read (see Not
tried).

Run (mote, Bun 1.4.2, HOME=$(mktemp -d), at this tree on b70725c):
- bun test (whole repo): 4201 pass, 0 fail, 4210 tests across 329 files.
- bun scripts/check.mjs commandcode: ok.

Broken by hand:
- plan-credits.test.mjs against origin/main's index.mjs: 4 of 5 red
  (GOAT real reply, credits labels, GOAT extras, Provider balance); the
  Max parity test stays green, as it should.
- GOAT set to 100 (the issue's option 2) in the new index.mjs: 3 of 5
  red.

Not tried: a live Command Code account. Both keys here (~/.commandcode
and magpie's plugin account) are answered 401 by billing/credits,
billing/subscriptions and usage/summary today, so the GOAT reply is the
one recorded in testdata (2026-09/10). Which planId today's $20 Pro has
(individual-pro, 30 in the CLI, or individual-pro-v1, 80) is not
confirmed; both are left as the CLI has them.
2026-10-31 17:19:44 +08:00
yetone 8fc3833aa7 commandcode 0.1.13: the Credits window renews at the plan's period end, the CLI's free models are free, and a Go request's max_tokens stays within 200,000
Three things magpie's built-in Command Code did that the plugin didn't,
ahead of retiring the built-in:

- The Credits window had no reset, though the month's credits come back
  when the plan's period ends, which billing/subscriptions' currentPeriodEnd
  says (sub.until, already the card's "until"). allowanceOf now puts it on
  the window as resetsAt (yetone/magpie#2454). No period end, no reset.
- The models the CLI marks FREE (magpie's cmdFree, all 11: Space Bunny
  Alpha, Pixel Canary, Laguna S 2.1, the Ling 3.0/3.1 Flash ones, the
  MiniMax M3/M2.7 free ids, LongCat 2.0 free, Tencent Hy3) now say
  free: true on every list: the Provider API's, Go's, and Go's table when
  the list can't be had.
- A Go chat's max_tokens sent to /alpha/generate is kept within 200,000,
  the most Command Code takes ("Too big: expected number to be <=200000
  at params.max_tokens"; magpie's CommandCodeMaxOutput in cmdRequest).
  Before, a 384,000 ask failed the whole request.

Run: bun test in packages/commandcode: 49 pass, 0 fail. parity.test.mjs
is new; usage.test.mjs's two plan-with-period cases now expect the reset.
Broke each by hand and watched red: no resetsAt, 3 fail; no free flag,
3 fail; no cap, 1 fail. bun scripts/check.mjs commandcode: ok.
Live, with the owner's GOAT key: the card's Credits window says resetsAt
2026-10-28T16:16:42Z, the subscription's until; its list (71 models) has
poolside/laguna-s-2.1-free free, the only one of the 11 Command Code lists
today. Not tried live: a Go request over 200,000 (no Go key here).
2026-10-16 17:37:25 +08:00