1ad712d96344763ba7bc52243de16b3963f41786
4
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
7a79949ccb |
qoder 0.2.52: an account's model list on a job token Qoder lists only the free model for is renewed once and read again
star21321321124_93024 (Discord #general, 2026-11-01): a Qoder CN personal
account with all 1500 credits left listed one model in magpie, the free
Flash ("Qoder CN: 1 model"), so agents saw only that one.
Cause, from Qoder CN's real bytes: gateway.qoder.com.cn's
/algo/api/v2/model/list answers a caller it doesn't take for an account
with every model that costs credits `enable: false` and the free
Qwen3.8-Flash on, in every scene (captured 2026-11-01 for an unknown uid,
kept as testdata/cn-listing-free-view.json). plugins#484 saw the same view
for a stale job token on qoder.com. 0.2.49 renewed the job token when a
chat asked for a model that list had off, but provider.models (the list
magpie and its agents see) read it as it came, so the account showed
the free model alone and nothing renewed it.
Now models() marks such a listing (freeView: some paid model, none on),
and the provider.models hook renews the job token once through relogin
(same lock and 5-minute rule as #474/#484), saves it, reads the list
again and says the renewal on the next usage read or answer. A renewed
token that still gets the free view is remembered and not renewed for the
list again, so an account that really has only the free models doesn't
spend a refresh token each time magpie lists.
Tests (cn-free-view.test.mjs, from the captured bytes; the account's list
is the same bytes with each model on):
- free view on jt-1 -> one refresh, all 10 app models listed, jt-2 saved;
listing again spends none.
- the next usage read says "renewed".
- free view on the renewed token too: listed as it is, one refresh over
three lists an hour apart.
- a list with paid models on spends none; freeView's edge cases.
Run on mote (Bun 1.4.2):
- cn-free-view.test.mjs against origin/main's index.mjs: 4 of 6 fail
(the list is ["qfmodel"]); with this change 6 pass.
- Broken by hand: the stillFree guard off, the "renewed once" test fails
(3 refreshes).
- bun test in packages/qoder: 345 pass, 0 fail. bun scripts/check.mjs: ok.
Checked live (read only): qoder.com's listing for the owner's account has
every model on in every scene, the same with its device token and with a
bogus token (qoder.com keys the list on the uid). Qoder CN's CLI
(@qodercn-ai/qoderclicn 1.1.81) reads the same /api/v2/model/list.
Not tried: a real Qoder CN account (none here), so it is not confirmed
that a renewal gives the reporter back the full list; if their token is
honoured and the list is still the free view, the account itself has
the paid models off and this change lists it as it is.
|
||
|
|
fd40b20c3b |
qoder 0.2.43: the check-in says when to ask again, as the 10:00 (UTC+8) campaign opens
sdytman on Discord: Qoder's daily credits start at 10:00, can the plugin's
check-in follow it? Qoder's /me/campaigns lists each day's CLAIM_BENEFIT
campaign with startAt 10:00 and endAt 09:59 the next day, both UTC+8
("Daily reset: 10:00 (UTC+8)"), read with a real account at 09:27 CST on
10-28. Qoder.app 0.4.3 polls that list every 5 minutes and treats
startAt <= now < endAt as active; there is no next-time field. A check-in
before 10:00 met yesterday's campaign, and magpie settled for the Beijing
day, so today's campaign waited until tomorrow, or was lost.
checkin now returns until: the next campaign's opening (the later of
endAt and startAt + 1 day, or the next startAt in the gap) plus a minute,
on done, claimed and "not offered yet". All in epoch time, so the
machine's zone doesn't matter; qoder and qoder-cn share the code. magpie
asks again at until once it reads it (yetone/magpie, next release).
Run (mote): checkin-window, native-checkin and checkin tests under
TZ=UTC, Etc/GMT+8 and Asia/Shanghai, 66 pass each; HOME=$(mktemp -d)
bun test, 2938 pass 0 fail 8 skip; bun scripts/check.mjs. A real qoder
account at 09:35 CST: claimed 100, until 2026-10-28T02:01:00Z.
Broken by hand: nextOpens returning endAt only, 11 of 13 checkin-window
tests red; askAgain returning {}, 12 of 13 red.
Not tried: a real Qoder CN account (none here); the server's list in the
09:59-10:00 gap.
|
||
|
|
f573cfdcba |
qoder: Qoder's queue (code 10605) is a 503 to retry after its wait, not a lapsed sign-in (#98); 0.2.14
failure() turned every 401/403 into "the sign-in lapsed — sign in again".
Qoder answered every chat on a real trial account (2026-10-12) with
403 {"code":"10605","message":"{...\"retryAfterSeconds\":30,
\"serviceAvailable\":false...}"}: its queue for the model, while the same
token read the models and usage.
Codes are now read as Qoder's own client reads them (the QoderErrorCode
table in Qoder.app's qoder-agent-sdk worker), whatever the HTTP status:
- 10605, or a queue state with isQueued or serviceAvailable false: 503
with Retry-After from retryAfterSeconds (30 when absent), no
X-Magpie-Sign-In. magpie's gateway counts a 503 as busy and asks again
after Retry-After (patience.go busy/noteBusy).
- 110, 112-119, 122 (usage/credits used up): 429.
- 406, 416, 430, 80411, 80412, 100400-100403 (refusals of the request): 400.
- 105 (loginExpired) or no code: the 401 as before.
Both the HTTP status path and the in-stream statusCodeValue path go
through failure(); errorResponse sends Retry-After.
Run: bun test (sandbox HOME) 1137 pass 0 fail; bun scripts/check.mjs ok.
busy.test.mjs uses the literal body as testdata; its 4 tests all fail
against the previous index.mjs and pass with this one. Not tried: a real
10605 after the change (the account's queue was open again by then: a
real chat on fast answered "ok"); the quota and request codes' HTTP
status from Qoder is not seen, only their meaning from Qoder's client.
|
||
|
|
04e188aaec |
qoder 0.2.13: an account lists the models Qoder's app shows, Fast (0.8×) among them, and keeps Performance (#97)
Qoder's model listing (/algo/api/v2/model/list) has a list per scene. The plugin read only "chat", while its requests are sent as Qoder's app (product and session_type "app"). On 2026-10-12 the app scene lists Fast (key fast, 0.8×) where chat still lists Performance (1.1×), so magpie showed Performance and never Fast, which Qoder's app shows (yygutn, #97). The models hook now lists the app scene in its order and adds each model only chat still lists after the model it follows there, so a pick of Performance stays served. Each key once; the app's entry wins. A listing with one scene gives that one. New app models show from the account's own listing without a plugin release. The fallback list gains Fast. Verified: - The real listing read through the plugin on the owner's Qoder account (sandbox HOME, credential copied in memory, nothing written, no token renewed): fast "Fast" rate 0.8 and performance rate 1.1 both listed. - models.test.mjs runs on that real listing (testdata/listing.json, the chat and app scenes); all 4 tests fail with modelInfos put back to listing.chat, and pass with the change. - bun test (sandbox HOME/TMPDIR): 1133 pass, 0 fail. bun scripts/check.mjs ok. Not verified: a real chat on fast. Every model on that account (fast, performance, efficient, qfmodel) was refused with 403 code 10605 (serviceAvailable false, queueType p3, retryAfterSeconds 30) though the trial has 143/300 credits; the plugin reports that as a lapsed sign-in, filed separately. Qoder CN's listing wasn't read (no CN account). |