jzing.draw on Discord (#feedback, 2026-11-03): Qoder's 我的用量 said
套餐内 Credits 1,817 / 2,000 (剩余 183, refreshing 2026-11-22) and
资源包 2,400 / 3,400 (剩余 1,000). magpie's Routing row said a bare
"剩余 15%", which matched neither pool, so it read as the two not added up.
They were added up already (Total credits since 0.2.44, #454), but every
window sent only a share and a display string. The Routing row shows a
count only for a window with limit > 0, so it had no way to say which
figure it was. Now:
- every pool window and Total credits carry amount, limit and unit, so
magpie says "1,183 / 5,400 credits · 22% left" on the Routing row and
the Usage card, which is Qoder's 183 + 1,000.
- the plan's Credits window carries resetsAt = expiresAt, Qoder's
"将于 … 刷新" date (renewsOn in Qoder 0.4.3's buildUsageItemGroups).
Routing still counts the pools together and sets each pool aside; that
didn't change.
Run (mote, bun 1.4.2): bun test packages/qoder: 382 pass, 0 fail.
Broken by hand: with amount/limit/unit and resetsAt dropped from the
pool windows, the new test ("the plan and the resource pack read as
Qoder's own panel does…") fails.
Not tried: no real Qoder account. The fixture is built from the
reporter's screenshot numbers. The reporter's "15%" (85% used) isn't
reproduced from those numbers: the two pools together leave 22%. It may
be a reading taken later than the screenshot, or a dedicated resource
package Qoder's panel didn't show (the plugin counts those). Without
their reading this can't be told apart.
A Qoder CN / QwenWork phone account's card shows its masked phone
(phoneLabel / cardName, usage's `user`), a real email first, instead of its
uuid; accountId stays exactly what main computes. A renewal reads the name
outside the plugin-wide lock from the account's own site (a VPC token never
goes to the public hosts) and renames nothing. Rebased on a06512e, keeping
3c279f6's listing-renew change.
Reviewed at 6e39e8c (round 5). Run on mote (macOS, Bun 1.4.2) in a sandbox
HOME, at that head:
- bun test packages/qoder: 335 pass / 0 fail (listing-renew.test.mjs 5/0)
- bun scripts/check.mjs qoder: ok
Broken by hand: the device sign-in's cardName `realEmailOf(email) || label`
-> `label` (index.mjs:411) turns "qoder-cn: a device sign-in with an email
and a phone shows the email" red (334/1). Earlier rounds' breaks (renewal
cardName, own site, usage `who`) were red too.
CI (test, on-npm) green at 6e39e8c. Version 0.2.49 -> 0.2.50.
Not tried: a real Qoder CN or QwenWork phone account.
#290 (Codex side session on Ultimate read 0% from cache). Qoder's own
client (qoder-agent-sdk in Qoder.app 0.4.3, qodercli 1.1.75) sends, on
every agent_chat_generation request:
- cache_control {type: ephemeral} on the last non-thinking, non-tool
block of the last message when it is a user turn (none when the last
turn is tool results);
- each user turn's blocks as `contents` beside `content`;
- request_id / chat_record_id / request_set_id per request and a stable
session_id per conversation.
The plugin sent none of that, and gave a tool call without an id a new
random id on each request, so the prefix changed every turn. Now:
- cacheMarked() marks as above, without touching the caller's turns;
- session_id is a UUID-shaped sha256 of prompt_cache_key (Codex's
thread, which magpie forwards) or else of the system text and first
user turn; the key itself never goes out;
- an id-less call's id is sha256(turn, place, name, arguments).
Check-in (accomplish on Discord, 10-21: Qoder intl can't check in, CN
can). Only the international site needs Qoder's runtime-info helper;
on Windows only %LOCALAPPDATA%\Programs\Qoder was searched. A
machine-wide install under %ProgramFiles%\Qoder is now found too. This
is one possible cause, not a confirmed one: the reporter's error text
and OS are unknown.
Run at this tree (rebased on 15d536a):
- HOME=$(mktemp -d) bun test in packages/qoder: 173 pass, 0 fail.
- Red on the old index.mjs: 3 of 5 cache.test.mjs tests (marker,
session, stable call ids) and the new Program Files test.
- cn.test.mjs's exact-shape assertion updated to the marked last turn.
Not tried: a real Qoder account (no hit-rate measurement on Ultimate
or Fast), a real Windows machine-wide install, accomplish's account.
SITES.qoder asked qoder.com's device page for redirect_uri=qoder-app://,
the desktop app's own scheme (Qoder.app's Info.plist registers qoder and
qoder-app). On a Mac with Qoder.app installed the page's last hop opened
the desktop app instead of staying in the tab, while the plugin polls
openapi.qoder.sh for the device token and needs no callback at all.
Qoder's own clients treat the parameter as optional: Qoder.app's
app.asar adds redirect_uri only when its config has one
(authRedirectUris: stable qoder-app://, canary qoder-canary://), and
Qoder's CLI (@qoder-ai/qodercli 1.1.75, bundle/qodercli.js) builds
/device/selectAccounts from challenge, challenge_method, nonce,
machine_id and client_id alone, then polls /api/v1/deviceToken/poll.
qoder.com now gets the same: no redirect_uri, as qoder-cn already does.
cn.test.mjs's "qoder.com's sign-in is as it was" pinned the bug
(redirect_uri == qoder-app://); it now checks there is none.
Run:
- packages/qoder: HOME=<scratch> bun test: 167 pass, 0 fail.
- Broke it by hand (redirect back to "qoder-app://"): the #276 test in
cn.test.mjs fails (Expected false, Received true), 11 pass 1 fail.
- Repo root, as CI: TMPDIR=<scratch> HOME=<scratch>/home2 bun test:
1919 pass, 1 skip, 0 fail across 173 files; bun scripts/check.mjs ok.
Not tried against a real Qoder account here. The reporter (asuan-dev)
says the same one-line change on 0.2.21 signed in three accounts and
left the page on "Sign in success".
Hosts, client id and paths read from Qoder CN's own CLI (@qodercn-ai/qoderclicn 1.1.65): sign-in on qoder.cn, accounts on openapi.qoder.com.cn, models and chat on gateway.qoder.com.cn, client id e883ade2-…; signing unchanged. The same as magpie's built-in Qoder CN. When qoder.cn refuses a job token the account chats on its device token, renewed through /api/v1/deviceToken/refresh, as the CN CLI does. cn.test.mjs (12 tests, a local server standing in for every host) covers sign-in, polling, both tokens' refresh, a chat, models, usage and qoder.com unchanged; 6 fail with the CN chat host pointed back at api3.qoder.sh or the fallback off. Version 0.2.0.