AStudio has two pools: 通用积分 (general) and 星火积分 (Spark). Both
windows were sent as balances with aside: false and no model scope, and
magpie reads a balance window at <= 0 as used up for every model it
counts (allowanceOf on magpie main). So a Spark balance of 0 marked the
whole account used=100, and pace/smart never picked it, though
DeepSeek-V4-Flash and the other non-Spark models bill general points.
Change: the 星火积分 window now carries `models`, the Spark-series ids,
so magpie judges only those models on it (Limit.applies). Spark-series
means a catalog id starting with spark- (BOOTSTRAP's spark-x2.6,
spark-x2.6-4b, spark-x2.5, and the README's table): taken from the
account's live catalog (usage's provider.models) and, for ids that
catalog doesn't list, from BOOTSTRAP. A model the catalog marks free
(Spark-X2.6-Lite, 限免) is left out, since it spends no points; with no
model left the window is shown only (aside: true) rather than sent
unscoped. 通用积分 stays unscoped and still stops the account at 0.
Version 0.2.2.
Ran (wsl-run, magpie-desktop, HOME=$(mktemp -d)):
- bun test packages/astudio: 82 pass, 0 fail
- bun scripts/check.mjs: ok
- root bun test at base 017cd73e: 8211 pass, 19 skip, 0 fail (581 files)
Broken by hand: sending the Spark window without `models` (aside false
as before) turns 3 tests red, among them the reporter's case (general
1500, Spark 0: xopdsv4flash0731in judged not used up, spark-x2.6 still
used up on Spark).
Not tried: a real AStudio account or API call; magpie's own routing over
the new windows (the tests mirror allowanceOf/applies, read from magpie
main). Not known: whether a Spark model falls back to general points
when Spark is 0, so 通用积分 is left gating Spark models too, as before.
Reported-by: noblechang
39 lines
2.8 KiB
JSON
39 lines
2.8 KiB
JSON
{
|
|
"name": "@magpie-community/opencode-astudio-auth",
|
|
"version": "0.2.2",
|
|
"description": "AStudio (iFLYTEK Astron Studio) sign-in as an OpenCode/magpie provider: browser sign-in with one account-pool slot per account, or the desktop sign-in, over the Responses model gateway with live model catalog",
|
|
"type": "module",
|
|
"main": "./opencode.mjs",
|
|
"exports": { ".": "./opencode2.mjs" },
|
|
"files": [
|
|
"index.mjs",
|
|
"browser.mjs",
|
|
"opencode.mjs",
|
|
"opencode2.mjs",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"keywords": [
|
|
"opencode",
|
|
"opencode-plugin",
|
|
"magpie",
|
|
"astudio",
|
|
"astron",
|
|
"iflytek",
|
|
"xfyun"
|
|
],
|
|
"license": "MIT",
|
|
"scripts": {
|
|
"test": "node --test"
|
|
},
|
|
"magpie": {
|
|
"icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAVJSURBVFhHxVdrUxVHEDX55v9J/At5fNcqK6n4xcSUmqiJ8QUaUHmphEdQQQV8IBqFlFYZISDRxBAwEUIQDFoiivhAEAXuzuzudO9J9T5guZcraDSZqq69d3e2z+k+PTO9CxbEBoA34v9fx5gTQym1iJnXOI6TKaa13vpvTfyIT9d1FyXj+UNYAVjoOM5xvOYRYiycykRWVtabctVa18oErbVRShm5vkqLfIYYtXHsBZZlvSUPbNt2tdastZZJXmjye05TSq7Kv8Z/J/lhwRAswZySQCn1JQCZJAReGFgpNQVohZZEIk5ECHi2bX8xRUAKJSQgaQpeCB37zsVJ6DS6NxVpDFyunlFgE7+XYiKDYG2NE8iM9J+KPnQYRDkTNJ5meW5ZGo6tYFkKDVcJLV0mJJBCwg8yxMpMRyAAnZFeuWdD2yqwmPMI/Om4xpk2wqr9HjYeBkaf2bBty38+SwZSCIgEMwjEJVCThPFhxtMhg8kRFyoxTUZARp7auNTNqG4m5J8mlJ1jTEyKHys5A3ECMyRIIaAsKaYg2olRwmAnob+ZMdDkYaDVw70exsiQwdiYixtDhLY+g8YOg8MXCOeukF8bIolkIC7h/AmE6VXawuQzB3fbGDfqCddOMH4/Trhc6+GXOg+tjR462xnXehldN0V/xl+3DdhI9AGBmatCzY9AQCJcBbbCyN+EvjpGZy3j12OM5mrG2UOMkxWMYwcYNYcZdfUeGi4w2v8kDD5wfBlcR8G4ItVLZEDSKFIorZAYs3GridFew7h4lHG+ilF/k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},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/magpie-community/plugins.git",
|
|
"directory": "packages/astudio"
|
|
}
|
|
}
|