joycode 0.2.6: verified 900k context for GPT-6.1 Sol and GLM-5.3 (#711)

GPT-6.1 Sol and GLM-5.3 join the measured-cap list from #707: when the
account's catalogue offers a larger extJson.contextWindowByPlatform["JoyCode
Desktop"] (1,000,000 for both), limit.context becomes the smaller of that and
900,000, floored to 100k. Only those exact ids: GLM-5.3-jcloud, GLM-5.3-agent
and GPT-6.1 Sol-preview stay at the catalogue's maxTotalTokens. Output limits,
missing or malformed metadata and the static fallback are unchanged. The caps
come from the author's real probes on 2026-11-04 (Sol ok at 900,064 input and
refused with context_length_exceeded near 1,000k; GLM-5.3 ok at 900,074 and
refused with code 1261 near 1,000k), so 900k is a verified tier, not a maximum.

Review: no new host, credential, dependency or workflow change; the diff is
the two map entries, tests, README/CHANGELOG and the version. 0.2.6 is free
(main 0.2.5, dist has up to 0.2.5; joycode is published to dist, not npm).
Head 69227598 is on current main (29555323).

Run at 69227598 on mote (Bun 1.4.2, Node 22): node --test
packages/joycode/*.test.mjs 82 pass 0 fail; bun scripts/check.mjs joycode
and bun scripts/check.mjs (all) exit 0. PR CI green.
Broken by hand: dropping the Sol entry, dropping the GLM-5.3 entry, and
matching ids by prefix instead of exactly each turn the exact-ids test red
(1 fail each).

Not tried: no JoyCode account here, so the probes were not re-run by the
reviewer.
This commit is contained in:
liangmouse
2026-11-04 15:21:20 +08:00
committed by GitHub
parent 2955532344
commit fec25163ab
5 changed files with 44 additions and 2 deletions
+5
View File
@@ -1,5 +1,10 @@
# 更新记录
## 0.2.6
- 将真实验证通过的 GPT-6.1 Sol 和 GLM-5.3 加入长上下文白名单,最高采用 900k;仍要求账号目录声明更大的 Desktop 窗口,输出上限不变。
- 2026-11-04 经 magpie Responses 实测:900,064 输入 Token、25 输出 Token,15.95 秒正常完成并返回三个正确标记;约 1,000k 输入填充加指令被拒绝为 `context_length_exceeded`。GLM-5.3 经 Chat Completions 实测 900,074 输入 Token、64 输出 Token,98.31 秒正常结束并返回全部标记;1,000k 档返回 `Prompt exceeds max length`。GLM 的 jcloud / agent 别名保持不变,原 Codex 会话压缩未重跑。
## 0.2.5
- 对账号目录声明长窗口且真实请求成功的 GPT-6 Astra 和 DeepSeek-V4.1-Flash,分别采用最高 900k / 1,000k 的保守上下文声明;按 100k 向下取整,输出上限不变。未知模型和静态回退不变。
+4
View File
@@ -47,6 +47,8 @@ magpie plugin login joycode
| 模型 ID | 保守的 context 声明 | 真实网关验证 |
|---|---:|---|
| `GLM-5.3` | 900,000 | 输入 900,074 Token,输出 64 Token,正常完成;约 1,000k 填充加指令返回 `Prompt exceeds max length` |
| `GPT-6.1 Sol` | 900,000 | 输入 900,064 Token,输出 25 Token,正常完成;约 1,000k 填充加指令返回 `context_length_exceeded` |
| `GPT-6 Astra` | 900,000 | 最大成功输入 921,497 Token;约 922,008 Token 填充加指令返回 `context_length_exceeded` |
| `DeepSeek-V4.1-Flash` | 1,000,000 | 输入 1,000,073 Token,输出 150 Token,正常结束;更大请求明确报总窗口 1,048,576 Token |
@@ -92,3 +94,5 @@ bun test # 浏览器登录、额度映射、模型倍率回归测
相关文档:[magpie 插件开发](https://usemagpie.ai/docs/zh/plugins)。版本变更见 [CHANGELOG.md](CHANGELOG.md)。
这是非官方适配插件,与京东或 magpie 官方无隶属关系。JoyCode 图标及商标归其权利人所有;代码的 MIT 许可不授予这些品牌资产的权利。
2026-11-04 补测:`GPT-6.1 Sol` 和 `GLM-5.3` 的 900k 档均找回全部标记,分别耗时 15.95 秒和 98.31 秒;两者的 1,000k 档均被上游拒绝,因此取已验证的 900k 档,不声称精确边界。`GLM-5.3-jcloud`、`GLM-5.3-agent` 未测试,不继承 `GLM-5.3` 的窗口。
+2
View File
@@ -52,6 +52,8 @@ const LOW_EFFORT_FALLBACKS = new Map([
// Input lengths verified against JoyCode; conservative context claims, not exact model limits.
const VERIFIED_CONTEXT_LIMITS = new Map([
['GPT-6 Astra', 900000],
['GPT-6.1 Sol', 900000],
['GLM-5.3', 900000],
['DeepSeek-V4.1-Flash', 1000000],
])
+32 -1
View File
@@ -56,6 +56,22 @@ test('raises context only for exact input-verified models and preserves output l
chatApiModel: 'GPT-6 Astra', maxTotalTokens: 200000, respMaxTokens: 17000,
extJson: { contextWindowByPlatform: { 'JoyCode Desktop': 1500000 } },
},
{
chatApiModel: 'GPT-6.1 Sol', maxTotalTokens: 200000, respMaxTokens: 16000,
extJson: { contextWindowByPlatform: { 'JoyCode Desktop': 1000000 } },
},
{
chatApiModel: 'GLM-5.3', maxTotalTokens: 200000, respMaxTokens: 22000,
extJson: { contextWindowByPlatform: { 'JoyCode Desktop': 1000000 } },
},
{
chatApiModel: 'GLM-5.3-jcloud', maxTotalTokens: 200000, respMaxTokens: 23000,
extJson: { contextWindowByPlatform: { 'JoyCode Desktop': 2000000 } },
},
{
chatApiModel: 'GLM-5.3-agent', maxTotalTokens: 200000, respMaxTokens: 24000,
extJson: { contextWindowByPlatform: { 'JoyCode Desktop': 2000000 } },
},
{
chatApiModel: 'DeepSeek-V4.1-Flash', maxTotalTokens: 200000, respMaxTokens: 18000,
extJson: JSON.stringify({
@@ -67,17 +83,31 @@ test('raises context only for exact input-verified models and preserves output l
chatApiModel: 'GPT-6 Astra-preview', maxTotalTokens: 200000, respMaxTokens: 19000,
extJson: { contextWindowByPlatform: { 'JoyCode Desktop': 2000000 } },
},
{
chatApiModel: 'GPT-6.1 Sol-preview', maxTotalTokens: 200000, respMaxTokens: 21000,
extJson: { contextWindowByPlatform: { 'JoyCode Desktop': 2000000 } },
},
{
chatApiModel: 'Claude-Opus-5-hq', maxTotalTokens: 200000, respMaxTokens: 20000,
extJson: { adapterType: 'anthropic', contextWindowByPlatform: { 'JoyCode Desktop': 2000000 } },
},
] })
assert.equal(models['GPT-6 Astra'].limit.context, 900000)
assert.equal(models['GPT-6.1 Sol'].limit.context, 900000)
assert.equal(models['GLM-5.3'].limit.context, 900000)
assert.equal(models['GLM-5.3-jcloud'].limit.context, 200000)
assert.equal(models['GLM-5.3-agent'].limit.context, 200000)
assert.equal(models['DeepSeek-V4.1-Flash'].limit.context, 1000000)
assert.equal(models['GPT-6 Astra-preview'].limit.context, 200000)
assert.equal(models['GPT-6.1 Sol-preview'].limit.context, 200000)
assert.equal(models['Claude-Opus-5-hq'].limit.context, 200000)
assert.equal(models['GPT-6 Astra'].limit.output, 17000)
assert.equal(models['GPT-6.1 Sol'].limit.output, 16000)
assert.equal(models['GLM-5.3'].limit.output, 22000)
assert.equal(models['GLM-5.3-jcloud'].limit.output, 23000)
assert.equal(models['GLM-5.3-agent'].limit.output, 24000)
assert.equal(models['DeepSeek-V4.1-Flash'].limit.output, 18000)
assert.equal(models['GPT-6.1 Sol-preview'].limit.output, 21000)
assert.equal(models['DeepSeek-V4.1-Flash'].api.npm, '@ai-sdk/openai')
})
test('floors smaller directory limits and preserves larger base contexts', async t => {
@@ -100,7 +130,8 @@ test('requires a valid numeric JoyCode Desktop directory context', async t => {
const cases = [
{ name: 'missing extJson', id: 'GPT-6 Astra' },
{ name: 'malformed extJson JSON', id: 'DeepSeek-V4.1-Flash', extJson: '{' },
{ name: 'missing platform entry', id: 'GPT-6 Astra', extJson: {} },
{ name: 'missing platform entry', id: 'GPT-6.1 Sol', extJson: {} },
{ name: 'GLM-5.3 missing platform entry', id: 'GLM-5.3', extJson: {} },
{ name: 'numeric string', id: 'DeepSeek-V4.1-Flash', extJson: { contextWindowByPlatform: { 'JoyCode Desktop': '1000000' } } },
{ name: 'nonpositive context', id: 'GPT-6 Astra', extJson: { contextWindowByPlatform: { 'JoyCode Desktop': 0 } } },
]
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@magpie-community/opencode-joycode-auth",
"version": "0.2.5",
"version": "0.2.6",
"description": "OpenCode provider plugin: JoyCode (JD Cloud JoyCoder IDE credits)",
"type": "module",
"main": "./opencode.mjs",