Commit Graph
2 Commits
Author SHA1 Message Date
yetone 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.
2026-10-12 21:22:50 +08:00
yetone 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).
2026-10-12 21:04:10 +08:00