A key-only sign-in keeps no console token, so planIds() could never read the plan, the listing threw "plan read failed" and fell back to the static bootstrap list, which has no glm-5.3. models() now skips the plan read for auth.type "api" and lists the key's own /models (still through catalogModels, so the 403 stray and image-output models stay out). OAuth and password accounts still intersect the catalogue with the plan. glm-5.3 is not added to the bootstrap list: testdata.test.mjs holds that list to the recorded free plan, which doesn't cover glm-5.3. Run (mica, temp HOME): bun test in packages/sensenova, 59 pass; bun scripts/check.mjs sensenova ok. Broken by hand: with the old `await coveredOrThrow()` the new test fails (plan read attempted, glm-5.3 missing). Not tried: a real SenseNova key-only account.
39 lines
878 B
JSON
39 lines
878 B
JSON
{
|
|
"name": "@magpie-community/opencode-sensenova-auth",
|
|
"version": "0.2.4",
|
|
"description": "SenseNova (SenseTime 日日新) Token Plan in OpenCode and magpie: browser or password sign-in for the credit pools, windows and grants, plus the plan's models through a Token Plan API key",
|
|
"type": "module",
|
|
"main": "./opencode.mjs",
|
|
"exports": {
|
|
".": "./opencode2.mjs"
|
|
},
|
|
"files": [
|
|
"index.mjs",
|
|
"opencode.mjs",
|
|
"opencode2.mjs",
|
|
"lib/",
|
|
"README.md"
|
|
],
|
|
"keywords": [
|
|
"opencode",
|
|
"opencode-plugin",
|
|
"magpie",
|
|
"sensenova",
|
|
"sensetime",
|
|
"日日新",
|
|
"token-plan",
|
|
"credits",
|
|
"quota",
|
|
"glm"
|
|
],
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/magpie-community/plugins.git",
|
|
"directory": "packages/sensenova"
|
|
},
|
|
"magpie": {
|
|
"maxConcurrency": 1
|
|
}
|
|
}
|