Commit Graph
29 Commits
Author SHA1 Message Date
yetone c397e96b77 qoder 0.2.18: a trimmed or wrapped 10605 is busy, not a lapsed sign-in
Releases #185. Run at this head: bun test packages/qoder: 138 pass, 0 fail; bun scripts/check.mjs qoder: ok; git diff --check clean.
2026-10-17 17:56:33 +08:00
yetone 29746c7c1e qoder: test that a BOM before a stream chunk's body doesn't drop its text
#185 trims a chunk's body before parsing it in events(), and nothing tested it. The envelope carries the BOM JSON-escaped, so the response's own decoding doesn't strip it.

Run: bun test packages/qoder: 138 pass, 0 fail. With JSON.parse(inner) back, the new test goes red (1 pass, 1 fail in stream.test.mjs).
2026-10-17 17:56:33 +08:00
lokic7123-star 656f3a1fb5 qoder: a trimmed or wrapped 10605 is busy, not a lapsed sign-in (#185)
`failure` parses the trimmed body, so a BOM-prefixed 10605 (the SSE envelope carries it as a JSON-escaped U+FEFF that `res.text()` doesn't strip) keeps its 503/Retry-After instead of reading as a lapsed sign-in. An outer body with no code, or code 401/403, whose message is a 10605 body is unwrapped to it; explicit 105/110/406 codes stay authoritative, and malformed or array messages are not unwrapped. Refs #167, #181.

What was run at c9e39e0 (reviewer, bun 1.4.2, macOS):
- bun test packages/qoder: 137 pass, 0 fail. bun scripts/check.mjs qoder: ok.
- Broken by hand: without the unwrap, the 8 wrapper tests go red; parsing `text` instead of the trimmed `msg`, the BOM test goes red; unwrapping regardless of the outer code, the explicit-code test goes red. The `inner.trim()` in events() had no test; a follow-up commit adds one.
- magpie (yetone/magpie main 85eef5d87) in a sandbox HOME, a copy of this package with api3/openapi pointed at a local fake, a planted plugin-auth.json, `magpie provider test qoder`: a 403 `{"code":403,"message":<10605 body>}`, the SSE `{"message":<10605 body>}` envelope and a BOM-prefixed 403 each gave 503 "Qoder is busy for efficient (this plan's queue: p3); try again in 30s"; a 105 still gave 401 lapsed. main's package gave 401 lapsed for the first two.
- Not tried: real Qoder accounts.
2026-10-17 17:54:35 +08:00
Euraxluo 5d7fb87f84 qoder 0.2.17: native daily check-in through auth.checkin (#179)
Adds auth.checkin to Qoder and Qoder CN. It lists the account's campaigns and claims a CLAIMABLE CLAIM_BENEFIT campaign, and the list and the claim go through the plugin's own campaigns path: device token, one rotation on 401/403, VPC host and native machine identity. The outcomes match magpie's built-in qoder_checkin.go:
- a CLAIMED campaign is done only while its startAt/endAt window is open;
- a daily campaign that is neither claimable nor active-claimed is failed, so it is asked again later;
- no daily campaign at all is inactive;
- a list or claim reply that can't be read is failed, never inactive or claimed.
The credit is the claim's own benefit.amount, else the campaign's. Bumps the package to 0.2.17.

Reviewed head 128ed2a. Ran at that head:
- bun test in packages/qoder, sandbox HOME/TMPDIR: 127 pass, 0 fail
- git merge-tree onto origin/main: clean
- PR CI: test and on-npm pass
- read every line of the checkin hook against magpie's internal/provider/qoder_checkin.go. The campaign shape and its seconds-based startAt/endAt match the real campaign JSON in qoder_checkin_test.go.
2026-10-17 10:31:33 +08:00
yetone 5d5d86e225 qoder 0.2.16: a tool call written into the text that can't be read, or that the stream ends inside, ends the turn as an error, never as the answer (#132)
A <tool_call> block whose JSON wasn't whole ({"path":}) was reprinted as
text, and one the stream ended inside was flushed as text; either way the
turn finished "stop" with a 200, the call lost and nothing to fail over on.
Mirrors trae since 0.2.5 (#38): a block on its way to being a call (its
content starts with "{" or holds "<function=") that can't be read, or is
cut short at the end, ends the turn as an error: the stream with the error
frame and no finish, a request not streamed (or one with nothing before the
block) a 502. A block whose JSON (or XML function) is whole when the stream
ends without its close is still the call. A tag in a code fence or inline
code, or one that isn't call-shaped (<tool_call>incomplete), stays text.

Siblings: only trae (already fixed) and qoder parse calls out of the text;
grep for tool_call/function=/invoke/DSML across packages/*/index.mjs finds
no other parser.

Run at this head:
- textcall.test.mjs (new, the issue's literal frames: closed with bad JSON,
  stream ends inside, readable control, whole JSON without its close, XML
  form, look-alike text; streamed whole and 3 chars per frame, and not
  streamed): 7 of 9 red on the 0.2.15 code (the control and look-alike
  tests passed there), all green after.
- packages/qoder: 118 pass, 0 fail.
- Whole repo as CI runs it: HOME/TMPDIR in a scratch dir, bun test:
  1320 pass, 0 fail; bun scripts/check.mjs: ok.
Not tried against a real Qoder account; the frames are the reporter's.
2026-10-15 07:10:01 +08:00
unship a6f09a0e9a qoder: add PAT (Personal Access Token) sign-in method (#103)
* qoder: add PAT (Personal Access Token) sign-in method

Add a new auth method that exchanges a PAT for a job token via
/api/v1/jobToken/exchange, bypassing the OAuth device flow. PATs are
long-lived (up to 1 year), avoiding the ~3-day re-authentication cycle
of OAuth refresh tokens.

Changes:
- Add patSignIn function for PAT → job token exchange
- Add "Sign in with Qoder PAT" method with password prompt
- Handle PAT accounts in usage (no device token available)
- Add pat.test.mjs with 10 tests covering both sites
- Update vpc.test.mjs for new method count

* qoder: use text prompt type for PAT (magpie has no password type)

magpie's prompt system only supports "text" and "select" types.
Change the PAT prompt from "password" to "text" to match.

* qoder: use password prompt type for PAT input

Now that magpie supports "password" prompt type, use it for PAT input
so the token is masked when typed in both GUI and TUI.

* qoder: address PR review — PAT kept, fields read as Qoder's client does

1. Store the PAT on the credential; when the job refresh lapses
   (SignInGone from refreshJob), re-exchange the PAT instead of
   marking the account signed out. The PAT lasts a year, the refresh
   two days.

2. Read the exchange response as Qoder's client does:
   - token from token, device_token or access_token
   - refresh from refresh_token or refreshToken
   - expiry from expire_time or expires_at (date) first, then
     expires_in in seconds (not milliseconds)

3. Use the openapi() helper for the exchange (no custom User-Agent);
   400/401/403 say "refused the PAT" rather than passing through the
   raw body.

4. Try the usage endpoint with the job token for PAT accounts; fall
   back to the "PAT" plan label if it won't accept it.

5. Exclude the PAT method from Qoder CN: its CLI uses device chat
   directly and never makes a job token, so a PAT exchange may not
   produce one the chat endpoint accepts.

* qoder: fix expires_in unit — milliseconds, not seconds

The real exchange response shows expires_in: 86400000 (24h in ms),
not 86400 (seconds). The expires_at date field takes precedence in
exchangeExpiry, so the fallback was not hit in practice, but correct
it for completeness.

* qoder: drive the renew test through the real refresh path, usage through fetchUsage

The renew test called the PAT sign-in directly, so it never met the
fallback it was named for. It now loads a stored expired credential
whose job refresh is refused, and checks the exchange is asked with the
stored PAT, the request goes on with the new token, and the saved
credential still carries the PAT — and fails when the fallback is
taken out. A second case keeps no PAT on the credential and expects
the sign-in gone to come out.

The PAT branch of usage built fetchUsage's request by hand and turned
every error into a plan of its own; it calls fetchUsage now, its
errors surfacing as the device path's do. A live PAT account answered
the usage endpoint 200 with a qoder envelope on the job token from the
exchange, said so in the comment there.

* qoder: a refused PAT re-exchange ends the sign-in

The renew fallback let a refused PAT through as a plain error, which
magpie read as a server fault and kept the account on. A PAT lapses
like a device sign-in does — expired, or revoked — so renew turns the
exchange's refusal into a lapsed sign-in: usage says "expired" and the
request answers 401, asking for a new PAT. Interactive sign-in keeps
the plain error.
2026-10-14 18:34:37 +08:00
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
yetone aa2d99bd13 qoder 0.2.12: a chat Qoder refuses (401/403) keeps Qoder's own reason in the error
Yayoi_no_yume on X: a request made right after signing in came back
"Qoder: the sign-in lapsed — sign in again" (401), and only installing and
signing in to Qoder CLI made it work. failure() replaced whatever Qoder said
with that fixed text, so the real reason for the refusal could not be seen.
The message is the same, with "(Qoder said <status>: <its message>)" added
when Qoder gave one; the account is still left unmarked (X-Magpie-Sign-In:
kept), as before.

usage.test.mjs gains the case (a 401 whose body says why); it fails on
0.2.11 and passes. bun test (89 pass) and scripts/check.mjs qoder under a
scratch HOME pass. Not tried against Qoder itself (no Qoder account here),
so the cause of the reporter's 401 is not known yet.
2026-10-10 01:10:39 +08:00
ayuand尤贺雨 d21d10f0da qoder 0.2.11: isolate VPC account state (#40)
Co-authored-by: 尤贺雨 <youheyu@sungrowpower.com>
2026-10-09 12:43:23 +08:00
yetone 5e80f39d3f qoder 0.2.10: international check-in finds Qoder's device identity runtime where Qoder CLI and the Linux desktop really keep it (ARNO on Discord: "device identity runtime not found")
0.2.9 (#49) looked for the CLI's cached runtime in ~/.qoder/.bin/umid-<platform>-<arch>-*/ on every platform. qodercli 1.1.66 (npm) and the worker in Qoder desktop 0.4.3 (extractBinary) make that folder only on Windows (umid-win32-<arch>-<hash>\runtime-info.exe with sgsdk.dll); on macOS and Linux they write a file, ~/.qoder/.bin/runtime-info-<platform>-<arch>-<hash>. And the Linux desktop installs to /opt/Qoder/resources/umid/runtime-info (Qoder 0.4.3's .deb and .rpm), which wasn't looked at. So a macOS user with only the CLI, and every Linux user, got HTTP 502 on the international check-in, while Qoder CN (which needs no runtime) checked in.

campaignRuntime now looks at /opt/Qoder on Linux, reads the CLI's cache as the CLI writes it (the newest matching file, a .tmp being written skipped), and follows the CLI's own folder settings (QODER_CONFIG_DIR, QODER_CLI_HOME, QODER_CONFIG_DIR_NAME). Windows and macOS desktop lookup is unchanged.

checkin.test.mjs lays out the CLI cache as qodercli writes it on win32/x64, darwin arm64/x64 and linux x64/arm64, plus /opt/Qoder and the config-folder variables: 6 of the new tests fail on 0.2.9 (the Windows case passes on both, as 0.2.9 had it right), all pass now. bun test packages/qoder (87 pass) and scripts/check.mjs qoder under a temp HOME pass. On this Mac the real lookup returns /Applications/Qoder.app/Contents/Resources/umid/runtime-info. Not run: the runtime itself against a real account, or on Linux/Windows.
2026-10-08 20:35:44 +08:00
yetone 972c0a9f81 qoder 0.2.9: international check-in sees the daily 100 credits (yetone/magpie#1268, #49)
Releases #49: international campaign requests carry Qoder's native device
identity (Cosy-MachineToken, Cosy-MachineType) from its own runtime-info
helper, as Qoder.app 0.4.3 does. Without it Qoder answers 200 with only
VIEW_DETAILS.

Verified with a real international account (GET only, no claim):
CLAIM_BENEFIT/CLAIMABLE/100 with the identity, VIEW_DETAILS only without.
bun test packages/qoder: 82 pass; check.mjs qoder passes.
2026-10-08 16:50:09 +08:00
Strelizia d8431fbfcf qoder: include native device identity in international campaigns (#49) 2026-10-08 16:49:44 +08:00
yetone ecca97cadd qoder 0.2.8: Qoder CN enterprise VPC sign-in (yetone/magpie#312) (#41)
A new method, Sign in with Qoder CN Enterprise (VPC), asks for the
instance (its name or <instance>.vpc.qoder.com.cn) and serves the account
from the instance's own hosts: <i>.vpc.qoder.com.cn for the sign-in page,
<i>-openapi.vpc.qoder.com.cn for poll, tokens, user info and usage, and
<i>-gateway.vpc.qoder.com.cn for models and chat, the paths unchanged, as
@qodercn-ai/qoderclicn 1.1.64 rewrites the public origins once a VPC
instance is set. The instance is kept on the account; an account with
none is served as before, and one with an instance that names none is
asked to sign in again rather than sent to the public hosts.

Not tried with a real VPC account. vpc.test.mjs builds its fixtures from
AwadYoo's redacted shapes on #312; 12 of its 13 tests fail on 0.2.7 (the
one that passes is the public sign-in staying as it was). bun test
packages/qoder: 67 pass; HOME=$(mktemp -d) bun test: 864 pass; bun
scripts/check.mjs: all pass.
2026-10-08 10:30:17 +08:00
yetone 72382fb8a1 qoder 0.2.7: the account's fetch sends Qoder's campaigns pages (the daily credits claim) as the account — GET <openapi>/sash/api/v1/me/campaigns and POST …/{id}/claim, on the device token as usage is read (a refused one rotated once), for qoder (openapi.qoder.sh) and qoder-cn (openapi.qoder.com.cn); any other page there is still refused. For magpie's Qoder check-in (Discord, ARNO, after wallechfox/qoder-checkin). checkin.test.mjs is new (4 of its 5 fail on 0.2.6); bun test (54 pass) and check.mjs qoder pass. Not tried against Qoder itself (no Qoder account here). 2026-10-06 11:25:37 +08:00
yetone a839119751 qoder 0.2.6: the window a request is sent holds the reply's max_tokens too (yetone/magpie#700 follow-up, kyzhouxu: a group's DeepSeek V4.1 Flash refused near 207K until Qoder's DeepSeek-Flash was taken out of it) — since 0.2.5 windowFor sends the model's default window (200K on the models context_config lists 200K/400K/1M for) while the request's estimate, a token per 3 bytes of its messages and tools, fits it, and asked for nothing of the reply: a 180K conversation with the 32000 max_tokens Qoder is sent went out with context_length 200000, which a prompt plus reply past 200K overflows, while magpie and the agents behind it are told the model takes 1M. The estimate now adds the reply's max_tokens (what qoderBody sends), so that request is sent 400K; a short one still gets the default window. Qoder's own metadata does say 1M for dfmodel: its live listing's max_input_tokens was 1000000 (the context 0.2.4 cached for it in a sandbox magpie on 2026-10-03, where MiniMax-M3 read 180000) and 0.2.5 reads 1M as its largest window, and docs.qoder.com/cli/model lists DeepSeek-V4-Flash with 200K / 400K / 1M, so the reported context stays 1M. When kyzhouxu's refusal happened isn't known: #700 itself (ynky007) was opened before 0.2.5, when every request was sent context_length 1000000, and their comment came after it (2026-10-04 03:34 UTC), so this is the way 0.2.5 can refuse a request under the window magpie reports, not shown to be what they hit. context.test.mjs gains the case (180K prompt: 200K with max_tokens 1000, 400K with 32000 and with none asked); it fails on 0.2.5 (200000) and passes; bun test (49 pass) and bun scripts/check.mjs qoder under a temp HOME pass. Not tried with a real Qoder account. 2026-10-04 12:00:17 +08:00
yetone a5f3321af3 qoder 0.2.5: a model's context is the largest window Qoder offers it, not max_input_tokens (yetone/magpie#722, Moody-Sin: qoder 的 qwen 3.8 flash 只有180K上下文) — modelInfo took the context from max_input_tokens, 180000 on Qwen3.8-Flash (and Qwen3.8-Max, Kimi-K3, GLM-5.3, MiniMax-M3, Sonus, Cantus), so magpie and every agent behind it were told 180K, and each request was sent context_length 180000. Qoder's client reads the windows a model offers from the listing's context_config ({name: {token_count, is_default}}; else available_context_windows / default_context_window), as qodercli's catalog does (YT/Yai in the Qoder.app 0.4.3 worker), and its Context setting offers 200K, 400K and 1M on Qwen3.8-Flash and twelve others (docs.qoder.com, model tier selector); max_input_tokens is only what a request naming no window gets. windowsOf reads them the same way; a model's context is now its largest window (max_input_tokens when it lists none), and windowFor sends the default window while the request fits it, else the smallest that holds it, else the largest — a larger window may change the rate, Qoder's docs say, so it is asked for only when the conversation needs it; the request is counted generously, a token per 3 bytes of its JSON. context.test.mjs (windows read from context_config and available_context_windows, a model without them keeping 180000, the default window sent for a short request and 400K/1M for longer ones) fails on the old code and passes; bun test (48 pass) and scripts/check.mjs qoder under a temp HOME pass. Not tried with a real Qoder account: the listing's context_config for qfmodel is read from Qoder's client code and docs, not from a live listing. 2026-10-04 06:50:17 +08:00
yetone bf7ced3156 qoder 0.2.4: Qoder's token usage is read — it comes in a chunk of its own after the finish, with no choices, and the stream was read only up to the finish, so every request through the plugin was counted as 0 tokens (found testing a real qmodel account: prompt_tokens 0 on every reply). events() now reads to [DONE], keeps the finish reason, and takes the usage, cached and reasoning tokens included, from whichever chunk carries it, as the built-in did (qoder.go). stream.test.mjs, a reply shaped as a real one, fails on the old code and passes. Tried with a real Qoder account in a sandbox magpie: chat, streamed chat and an Anthropic tool call all report their tokens (40 in / 120 out, 107 reasoning; 298 / 86 with the tool). 2026-10-03 16:10:04 +08:00
yetone 39d9cffe7d qoder 0.2.3: magpie renews the sign-in ahead of time through auth.refresh
auth.refresh with refreshLead 10 minutes (in-fetch: 5) for qoder and
qoder-cn: the job token through refreshJob, or a qoder-cn device-token chat
through refreshDevice (both pairs given). Under the request path's lock; a
spent map lets a request holding the old pair use the new one. 401/403 is
signIn "expired" as on the request path; anything else is retried.

The check before each request stays for OpenCode, which doesn't call the
hook (magpie 0.1.684+ does). refresh.test.mjs fails without the change;
HOME=$(mktemp -d) bun test passes (396 across the repo).
2026-10-03 12:07:23 +08:00
yetone 8f25b63718 publish from GitHub Actions with npm's trusted publishing, no one-time password [skip ci]
.github/workflows/publish.yml runs the tests (in a throwaway HOME) and
scripts/publish.sh on each package.json change pushed to main, or by hand;
npm's OIDC exchange stands in for a token and an OTP. Every package now
names magpie-community/plugins' publish.yml as its trusted publisher on
npmjs.com, and gets the repository field npm checks it against.
2026-10-03 00:00:23 +08:00
yetone e2c72b2ae7 qoder 0.2.2, workbuddy 0.1.6: each model's credit rate goes to magpie (rate, rateWas), as magpie's built-ins read it (yetone/magpie 33acb6bc, v0.1.667)
magpie now shows each model's credit rate in the provider's model list and an agent's picker (01huadalang on Discord: pick the cheap models without opening Qoder or WorkBuddy); a plugin gives it beside free on each model its provider.models hook lists. Qoder and Qoder CN: rate is the price_factor (priceFactor); rateWas an active promotion's before_promotion_price_factor, else an original_price_factor above the price (Qwen3.8-Flash: 0x, 0.1x struck through); a promotion's 0 that isn't free is its price before times its discount_factor; a listing with no price gives none — the rule of internal/qoder/models.go's ModelInfo.free. WorkBuddy and WorkBuddy AI: rate is the model's credits ("x0.03" is 0.03; x0.00 stays free; an unreadable, negative or infinite rate is neither free nor rated), as wbCredits reads it.

usage.test.mjs in each package gets a test fed a fake listing / fake /v3/config (the cases of core's TestParseModelsRate and TestWBCreditsRate); both fail against the previous index.mjs and pass now. No request was made to Qoder or WorkBuddy. bun test (HOME a temp dir) and bun scripts/check.mjs pass.
2026-10-02 22:54:55 +08:00
yetone 6fd444cf5b qoder 0.2.1: a model is free only at a price_factor of 0 — Qwen3.8-Max, 0.5× with an off-peak discount, is no longer marked free
Qoder's listing (as it came on 2026-10-02) carries is_free true on Qwen3.8-Max, whose price_factor is 0.5 and whose promotion is the off-peak 60% off (错峰 4 折, rule idle_time_model_credit_discount, before_promotion_price_factor 0.5); Qoder's own app ignores is_free in the model picker and shows 0.5×. freeOf took is_free true OR a price_factor of 0, so Max came out free. Now the price decides, as Qoder's app shows it: a price_factor (priceFactor) of 0 is free — Qwen3.8-Flash, 0× with original_price_factor 0.1 struck through, stays free — any other price is not, whatever is_free says, and a 0 that lasts only while an active promotion with a price before it runs is a discount, not free. is_free is read only from a listing that gives no price at all.

usage.test.mjs's new test feeds the listing's own entries (Max, Flash, Qwen3.7-Max, Kimi-K3) and promotion shapes; it fails against 0.2.0 (Max free). The built-in (internal/qoder/models.go, ModelInfo.free) has the same is_free || price 0 rule and needs the same change on magpie's side.
2026-10-02 21:50:13 +08:00
yetone 8c7e31911e qoder: Qoder CN (qoder.cn) as a second provider, qoder-cn (#1) (#4)
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.
2026-10-02 18:30:00 +08:00
yetone 083251d778 qoder 0.1.4: a job token refresh Qoder refuses while listing the models marks the account, as the built-in's model read through QoderCredentialOf did — the models hook throws with signIn: expired on a 401/403 refresh and falls back to the listed models on any other failure; a renewal made while listing is said renewed by the account's next usage read or answer, and the refresh errors read 'qoder job token refresh' as the built-in's did. Four new tests in usage.test.mjs fail against 0.1.3. 2026-10-01 06:53:59 +08:00
yetone 01aee5da28 all: a usage read says what it means for the sign-in, and a renewal clears the mark whatever follows, as the built-ins did (要保证插件跟内置的所有逻辑都要一模一样) — auth.usage returns signIn on every path: expired where the built-in's quota read marked the account (Zed's /users/me 401, Factory's and MiMo's refused renewals, Qoder's refused job refresh), renewed after a renewal, which took the mark off, kept everywhere else, so magpie no longer guesses from the words 'sign in again' (Kiro's, Devin's and ZCode's usage errors marked accounts their built-ins never did) nor clears on a clean read. A request after a renewal says renewed on any status; one without says kept, as the built-ins cleared only on renewal. Kiro, Cursor, Devin, Command Code, WorkBuddy, Grok and ZCode, whose built-ins never marked an account, say kept on every answer. New tests fail against 85d7dd0's index.mjs. 2026-10-01 04:53:29 +08:00
yetone 85d7dd0d0a all: each plugin fails with its built-in's status and marks the sign-in as it did, through X-Magpie-Sign-In (要保证插件跟内置的所有逻辑都要一模一样) — Factory's and MiMo's refused renewals are the built-ins' 502 marked expired, not 401s; Qoder's vendor 403 is the built-in's 401 kept, its model list's failure a 400, its job refresh refused marked expired; Zed's retried 401 is a 401 kept, not a 403; Kiro's unreachable refresh a 401 kept; Cursor's expired trial a 401 kept; a vendor 401 WorkBuddy, Grok, Devin, Command Code and ZCode passed on no longer marks the account, as their built-ins never did, and Grok and MiMo no longer retry what their built-ins sent once. Messages take the built-ins' words. New tests fail against the previous index.mjs. 2026-10-01 04:47:03 +08:00
yetone eab92c33a0 qoder 0.1.2: a chat Qoder refuses with a 403 stays a 403, only its 401 (the job token refused) is the 401 magpie marks the account lapsed on; a model the listing marks free (is_free, or a price_factor of 0, snake or camel case, as internal/qoder/models.go reads it) is marked free; errors no longer start with "Qoder: ", which magpie adds 2026-10-01 03:16:04 +08:00
yetone 4dd783a2c0 qoder 0.1.1: usage shows as magpie's built-in did — plan, period, windows and what they count, balanceqoder 2026-09-30 23:03:10 +08:00
yetone c5af8f5dec qoder: Qoder — device sign-in, one-use refresh tokens saved at once, COSY-signed chat generation; tried with a real request 2026-09-30 17:08:36 +08:00