Files
plugins/packages/opendesign/package.json
T
yetone e68748a78e opendesign 0.1.11: cap glm-5.3-flash and gemini-3.8-flash output at what amr-link takes (#827)
amr-link's /v1/models publishes context_budget 232000 for glm-5.3-flash
and 264000 for gemini-3.8-flash. Its API refuses anything over 131072 and
65536 with a 400, "Open Design: The request could not be completed.",
which names no field. Gitleonan measured this on 2026-11-09 with two
accounts (one of them took 232000 for GLM). A client that sends no limit,
such as Codex, gets the published number from magpie
(forwardTranslated's askedOutput), so every turn on those models failed.

modelOf now caps limit.output for those two models (CAP). It applies to
the seed and to every live catalog entry. A copy an earlier version kept
in the provider's config is capped too: config hands kept models back as
they were. models.mjs is left alone because refresh-models.mjs writes the
vendor's number back into it, and the live catalog's number overrides the
seed's anyway. A catalog number under the cap is used as it is.

This does not fix the red test dot through a Remote magpie. That comes
from the stream glm-5.3-flash sends when it reaches max_tokens: it ends
after content_block_stop with no message_delta or message_stop. magpie's
test asks for 16 tokens, and the model always thinks first, so it always
reaches the limit. On the issue I point to the magpie code for that path.

Run (on mote): bun test packages/opendesign gives 30 pass, 0 fail.
Broken by hand: with origin/main's index.mjs, the new test fails, and
with the config cap removed (the modelOf cap kept), it fails on the kept
gemini copy's 264000.
Not tried: a real amr-link request. There's no Open Design account here,
so the caps are the reporter's measurements, not ours.

Reported-by: Gitleonan
2026-11-09 09:56:29 +08:00

33 lines
810 B
JSON

{
"name": "@magpie-community/opencode-opendesign-auth",
"version": "0.1.11",
"description": "Open Design Cloud (Design Plan) in OpenCode and magpie: the account's device sign-in, its models, and the plan's 5-hour and 7-day allowance",
"type": "module",
"main": "./opencode.mjs",
"files": [
"index.mjs",
"opencode.mjs",
"opencode2.mjs",
"models.mjs",
"rates.mjs",
"refresh-models.mjs",
"README.md"
],
"keywords": [
"opencode",
"opencode-plugin",
"magpie",
"opendesign"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/magpie-community/plugins.git",
"directory": "packages/opendesign"
},
"magpie": {
"icon": "https://open-design.ai/favicon.svg"
},
"exports": { ".": "./opencode2.mjs" }
}