Commit Graph
6 Commits
Author SHA1 Message Date
yetone af4a0b365d mimo 0.1.9: an account with a Token Plan and no app membership gets answers (yetone: 2 个模型中有 2 个没有响应). The app's /route answers such an account 403 membership_required ("未开通会员或会员已到期,请订阅后使用") for every model. The plugin now reads the plan's tp- key and endpoint from the open platform with the same passToken (/tokenPlan/apiKey's openaiBaseUrl, /tokenPlan/apiKey/raw), sends the request there with Bearer <key> and no cookies, mimo-pro/mimo-flash asked as mimo-v2.6-pro/mimo-v2.6-flash, and goes straight to the plan for an hour after. A key the plan turns away (401) is read again next time; no plan or no key passes the app's 403 through as it was. The usage card's Token Plan window is the account's allowance, not an aside, when there is no app plan.
Tested on the owner's real account (Token Plan Lite, no app membership): mimo-pro, mimo-flash (streamed) and mimo-auto answered 200 through the loader's fetch; usage shows Token Plan Lite with the "Token Plan" window. bun test (990 pass) and scripts/check.mjs under a temp HOME; 3 of the new tests fail on 0.1.8.
2026-10-09 01:50:45 +08:00
yetone bf01ffc4d9 mimo 0.1.8: a Token Plan bought at the open platform shows on the card (yetone: 我明明已经订阅了啊为啥说我是 free 账号啊). The card read only the MiMo app's /user/xiaomi/subscription/self, which is empty for an account whose plan is the platform's Token Plan, so it said Free. The same passToken signs on at platform.xiaomimimo.com (401 loginUrl, sid api-platform, through /sts), whose /api/v1/tokenPlan/detail and /usage give the plan, its end (UTC), renewal and credits: the card's plan is the Token Plan when the app has none, and its credits are an aside window (they are spent by the tp- key, not this account's requests). A platform that can't be read leaves the card as it was. Tested against the reporter's real account (Token Plan Lite, 6.81M / 4.1B credits, the second read keeping the platform session); the new tests use its literal replies and 3 of them fail on 0.1.7. 2026-10-07 00:49:43 +08:00
yetone 7dd0b4e0b4 mimo 0.1.6: magpie renews the sign-in ahead of time through auth.refresh
auth.refresh with refreshLead 10 minutes before the day's session ends:
the account signs on again, once per account (the request path joins it),
and the new session (access, expires) is given. A passToken Xiaomi no
longer takes is signIn "expired"; any other failure throws and 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:22 +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 5a18bbdac4 Name the scope @magpie-community (the org's name, spelled right) 2026-09-30 17:04:47 +08:00
yetone fd05920836 mimo: Xiaomi MiMo (the MiMo app's Xiaomi account) — Xiaomi sign-in page or QR polled until done, regional servers, session cookies renewed every 24h and on a 401, MiMo Pro and Flash over chat completions 2026-09-30 17:00:13 +08:00