An enterprise seat's /billing/meter/get-user-resource-summary answers with
no packages, so the card showed no quota. WorkBuddy's own usage page reads
/billing/meter/get-enterprise-user-usage (credit / limitNum, with the cycle's
start and reset in Beijing time). When the summary gives no credits, wbQuota
now asks that meter and shows a Credits window ("196.13 / 2000", resetting at
cycleResetTime). A personal account's refusal there (400 10001 "uid or
enterpriseID is empty", seen on a real WorkBuddy AI Pro account on
2026-10-13) is ignored and the card stays as before. A paid account with
packages never asks it.
Moved users get the same from @magpie-community/opencode-workbuddy-auth
0.1.19 (plugins 169e4e6, on npm); the mover's min is raised to 0.1.19.
Run: workbuddy_enterprise_test.go, built from the reporter's literal
response bytes. TestWorkBuddyEnterpriseCredits and
TestWorkBuddyPersonalNotEnterprise pass, and both fail with the fallback
taken out. go test -run TestWorkBuddy ./internal/provider passes. Not tried
with a real enterprise account; "credit" is read as used, which the
reporter is asked to confirm.
Also run, rebased on e1b70c13d: go test -tags nogui ./internal/provider
(the whole package, 430s) and go test ./internal/gateway -run WorkBuddy
pass under a sandbox HOME; gofmt clean; go vet for darwin, linux and
windows (-tags nogui) pass. The reporter's follow-up (04:27Z) saw
"Credits 218.67 / 2000" on the same enterprise account after reinstalling,
while get-user-resource-summary still answered empty Packages: the
reinstall installed the plugin's 0.1.19, which carries this fallback.
Cursor 0.2.9: a default model whose own branch stops short of the asked
effort goes to its nearest effort, so the id and its parameters agree.
WorkBuddy 0.1.18: WorkBuddy 5.6+ keeps its desktop sign-in encrypted; the
plugin now says so and points to the browser sign-in, instead of
"isn't signed in" and a 502.
Both versions checked on registry.npmjs.org (dist-tags latest).
Run: gofmt -l, go vet (darwin, linux -tags nogui, windows) and
go test ./internal/provider -run 'Mov|Plugin|Migrat|Hand'.
WorkBuddy answers an account it restricted for unusual activity with
403 {"code":11140,"msg":"request illegal","displayMsg":{"en":"Your
account has been restricted due to unusual activity",...}}. failure()
read it as an unknown failure, so the account rested 1-10 minutes and
was asked again, refused, all day.
What changed:
- provider: WBRestricted knows the refusal by code 11140 (top level,
data or error; number or string; whole, so 111400 isn't it) or by its
displayMsg words. wbExplain ends the built-in's error with
WBRestrictedHint.
- gateway: a new failRestricted ("restricted") rests restrictedRest, 2h:
one refused request per account per 2h, and a lifted restriction (or a
misread refusal) comes back the same afternoon; Unrest lifts it at
once. It is read from the hint in the error (restrictedSaid; both the
built-in and the plugin translate the vendor's body before failure()
sees it, so the raw JSON never reaches it in a chat try), or from the
raw body only for a WorkBuddy candidate (restrictedRefused,
isWorkBuddy), since another vendor's 11140 is its own. Bare "request
illegal" is not matched. 11128 stays promptRefused and rests nobody.
The stale-allowance shortcut skips it, as it does model refusals.
drawsWorkBuddy now uses isWorkBuddy.
- plugin: @magpie-community/opencode-workbuddy-auth 0.1.17 (plugins
caf3908) ends the error with the same hint; the mover's min is 0.1.17
so keepMovedCurrent brings moved users to it.
- gui: Routing labels the try "account restricted by the vendor", says it
rests because only the vendor lifting it brings it back and to appeal,
shows the hint translated, and the account's row has "The restriction
is lifted — try it again" (POST /api/gateway/unrest). en, zh, zh-TW, ja,
de.
- docs/subsystems/gateway-routing.md says the above.
Run: gofmt -l (clean); go vet darwin, GOOS=linux -tags nogui, GOOS=windows
on gateway, provider, gui; go test ./internal/gateway ./internal/provider
./internal/gui (ok). New Go tests use the reporter's literal body through
the vendor's shape, the built-in's and the plugin's, a string code and the
words alone; another vendor's 11140, a non-WorkBuddy account with the same
body, 11128/14018/111400 not restricted; an e2e through the fake plugin
host where the restricted account is skipped by the next request.
Broken by hand, each went red: rest case removed, restrictedSaid removed,
the match unscoped, the raw match removed, the provider hint removed.
GUI: routing-wb-restricted (chromium and webkit x en/zh/zh-TW/ja/de x
1100/420px, 20 pass), routing-wb-refused, i18n-keys; after the rebase
every GUI test of the Routing page (107 files, both engines): 103 green.
The 4 red ones fail the same in WebKit on origin/main 689edbd6b run
alone and are filed: group-member-info (#1745), routing-sessions
(#1307, #1672), routing-steady (#1804, passed on this head on a rerun),
routing-group-fold's group-of-eight (#1672).
Rebased onto 2c30e5cee (with #1672's test fixes) and run again: vet x3,
go test ./internal/gateway ./internal/provider ok. On the final base
5756651e3 (only GUI assets and READMEs changed since): routing-wb-restricted
20/20, routing-wb-refused, i18n-keys, routing-held-dot, mono-icon-redraw,
routing-sessions 38/38, routing-group-fold 40/40; routing-steady's WebKit
case red again, the flake filed as #1804.
Not tried against a real restricted account;
plugin users on <0.1.17 rest by minutes until their plugin updates.
What: for workbuddy-ai alone, a model whose id starts with glm- is listed
with ImageInput false (wbSite.textOnly), whatever /v3/config's
supportsImages says: in the list fetched, in the built-in list shown
before it, and in a list saved before this change (Provider.available).
The workbuddy movers' min goes to 0.1.16, where the plugin does the same
(magpie-community/plugins cb90931).
Why: checked on 2026-10-13 with the owner's real WorkBuddy AI account.
www.workbuddy.ai/v3/config marks every model supportsImages: true, but
its server takes the image out of a chat to glm-5.3-flash, glm-5.3 or
glm-5.2 and puts "[System reminder: the current model does not support
images. Content filtered. ...]" in its place. Its other models read
images, and WorkBuddy (China)'s glm-5.3-flash does too, so China and the
other families are left as the config says. A user's own answer in
Settings (ModelImages) still wins: entryFor applies it over the list.
Run:
- go test ./internal/provider (full, ok); go test ./internal/gateway
-run 'WorkBuddy|WB|Vision|Describ|Image' (ok).
- TestWorkBuddyAIGLMIsTextOnly fails with textOnly turned off by hand;
TestWorkBuddyAISavedGLMIsTextOnly fails without the models.go case.
- gofmt -l; go vet darwin, GOOS=linux -tags nogui, GOOS=windows.
- Sandbox gateway (own HOME, port 3486, built-in WorkBuddy AI login from
the owner's migration backup, nothing live written): /v1/models lists
glm-5.3-flash, glm-5.3, glm-5.2 as text, deepseek, kimi, gemini, gpt,
grok with image. A blue|yellow split PNG sent to glm-5.3-flash was
described by workbuddy-ai/deepseek-v4.1-flash (Routing kind "vision"),
and glm-5.3-flash answered "left: blue, right: yellow". With
modelImages {"workbuddy-ai/glm-5.3": true} in the sandbox settings,
glm-5.3 listed image again and glm-5.3-flash stayed text.
Not run: the moved (plugin) path through a sandbox app; the plugin's own
bun tests cover its list, and magpie maps its input.image as ImageInput.
WorkBuddy 0.1.15 (wowyuarm's plugins#96): a system prompt sent as a developer message no longer fails the channel check with 400, an object tool_choice is sent the way WorkBuddy takes it, and max_completion_tokens goes as max_tokens so the output cap holds. Command Code 0.1.11 (plugins#91): a streamed Go reply the upstream cuts off after it has said something ends cut short with a note instead of losing the turn.
Only the movers' min strings and their notes change. Both versions were checked on npm with npm view. The plugins session ran #96 against the real WorkBuddy AI endpoint before and after the change.
Ran: gofmt -l, and go vet ./internal/provider on darwin and windows. go test ./internal/provider -run 'Mov|Migrat|Plugin|HandOver|Adopt' passed in 129s. The full suite was not run, because this is a two-string change.
WorkBuddy's Credits window had no reset, so in a Smart group every
WorkBuddy account ranked alike. workbuddy plugin 0.1.14 (plugins f0274d6)
reads WorkBuddy's own package lists (billing/meter/get-user-resource-paid-
packages and -free-packages, the calls WorkBuddy's client makes) and reports
on the Credits window when the soonest-ending package that still has credits
ends (runsOutAt) and how many credits it holds (runsOut). The daily Free
Plan slice (CapacityType 4) and code 001 aren't counted: they renew daily.
magpie carries runsOutAt from the plugin's usage window into QuotaWindow and
the routing Limit. Allowance.Renewal, which only Smart ranks on, treats it
as the window's reset when it is sooner than the real one. Pace, the tiers,
For, Full and resting are unchanged. The mover's min is raised to 0.1.14 so
moved users get the plugin. The usage card and account meter say "232.4
expire in 5h" in every language.
Run:
- plugin: bun test, 63 pass; 2 of the 3 new tests fail on 0.1.13's
index.mjs. Verified live on a workbuddy-ai account in a sandbox HOME:
Bonus Pack 232.4 left ending 10-12T16:39Z ranked before Pro (10-28).
- TestWorkBuddyCreditsRunOutForRouting and
TestSmartSpendsWorkBuddyCreditsRunningOutFirst: both fail with the
Renewal change removed by hand.
- GUI: credits-run-out.test.cjs in webkit and chromium, 5 languages, at
360/440/1000px, red on the old app.js; with i18n-keys, quota-*,
panel-usage, reset-each-title, usage-fold: 117 pass.
- go test ./... green (agent and gateway rerun with -timeout 30m after the
default 10m ran out under load from other sessions; 378s and 492s).
- gofmt -l clean; GOOS=linux and windows go vet of provider, plugin,
gateway clean.
Not tried: the CN workbuddy site (its token was stale, 401), so the CN
package list is assumed to have the same shape. The built-in WorkBuddy
(not moved users) doesn't get this. The account-line tooltip has no GUI
test of its own.
Plugin 0.1.13 sends X-Enterprise-Id and X-Tenant-Id for an enterprise
account, as WorkBuddy's own client does, so /v3/config gives the
enterprise's models rather than the personal plan's. The mover's min
makes keepMovedCurrent update moved users to it.
Run: go test -tags nogui ./internal/provider under a temp HOME; gofmt
-l; GOOS=linux and GOOS=windows go vet -tags nogui ./internal/provider.
npm view @magpie-community/opencode-workbuddy-auth version: 0.1.13.
WorkBuddy AI answers 11133 "Invalid request parameters" to a tool whose
parameters have no type, are empty or a root union, hold a pattern's \0
or a tuple's items, or whose name holds . : / a space or CJK; DeepSeek's
models refuse each, others some. Plugin 0.1.12 (magpie-community/plugins
17e7532) mends them and names the model's calls back.
Run: through a sandbox gateway (temp HOME, port 3486) with the plugin and
the owner's WorkBuddy AI account, deepseek-v4.1-flash, -sg, glm-5.3,
gpt-5.4, gemini-3.5-flash and kimi-k3 answer 200 to each shape (400
before), on Chat; a fs.read tool called over Messages comes back as
fs.read, streamed and not. go test -tags nogui ./internal/provider/ ok;
GOOS=linux/windows go vet ./internal/provider/ ok; npm view (npmjs) shows
0.1.12. Not done: the built-in WorkBuddy path, for users who haven't
moved; wyh's own ZCode/DeepSeek Harness tools were not seen.
Every step of one send (a tool result sent back, a retry) carries one
X-Conversation-Request-ID, the user's next message another, under one
X-Conversation-ID, as WorkBuddy 5.5.6's own client does (read in its
codebuddy.js). The China build now sends the client's attribution headers.
Verified: 0.1.11 resolves with npm view (latest). go test -tags nogui
./internal/provider under a temp HOME passes; go vet passes for darwin,
linux and windows. The plugin was tried at review against the real China
build and WorkBuddy AI, using credential copies in a sandbox HOME: 200
on every request, the same turn id across one send's steps and a new one
for the next message.
WorkBuddy answered "Illegal API invocation from an unapproved channel" to
Cindy's Codex and Claude Code modes. It matches a few exact phrases anywhere
in a chat (Claude Code's billing header, identity line and gitStatus main
branch line; Codex 0.159.2's first paragraph); workbuddy 0.1.9 rewrites them
to words that pass. Verified with real accounts through Cindy's bundled
Codex 0.159.2 and Claude Code 2.1.280 on workbuddy/glm-5.3-flash and
workbuddy-ai/deepseek-v4.1-flash.
Moody-Sin: the Routing page showed a WorkBuddy account as "已用 71%" only, which for a plan counted in credits says little. A quota window now carries its own count when the vendor counts in amounts — amount of limit, in unit (QuotaWindow, QuotaSpan for quota --json and /v1/magpie/quotas, and the routing trace's Weighed, from the window its share is of: Allowance.Count). WorkBuddy's built-in fills it from the resource summary, and @magpie-community/opencode-workbuddy-auth 0.1.8 tells it from auth.usage (amount / limit / unit, passed through host.js); the workbuddy mover's min is 0.1.8. The Routing page's stage and its list of what each account did, the Usage page's meter, the menu bar's tooltip and the TUI say "3,550 / 5,000 credits · 71% used", or "1,450 / 5,000 credits · 29% left" with Left on (积分 in Chinese); a window counted in shares alone reads as before.
quota-credits.test.cjs (WebKit, en/zh, used/left, Routing and Usage pages) fails on the old assets and passes; TestQuotaWindowCount, TestAllowanceCount, TestTraceTellsTheCount, TestPluginUsage (the count through the host) and TestWorkBuddyAccounts cover the Go side. Tried with the real WorkBuddy and WorkBuddy AI accounts in a sandbox magpie: moved onto the local plugin, /api/usage/quotas gives 33.29 / 3900 and 13.47 / 2250 credits and the Usage page reads "33.29 / 3,900 积分 · 已用 0.9%", "3,866.71 / 3,900 积分 · 剩余 99.1%" after a click on the count; not moved, the built-in gives the same for WorkBuddy. The Routing page with two real accounts of one provider wasn't tried (one account each). go vet, builds (darwin, GOOS=linux, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass.