#563: deepseek-v4.1-flash and deepseek-v4.1-flash-sg list a "none" level. Both sites' /v3/config call them onlyReasoning, so WorkBuddy's own client hides the off switch and the plugin listed none of it. They take it anyway. On WorkBuddy AI on 2026-10-31, reasoning_effort "none" answered 200 with 0 reasoning tokens (twice on -flash, once on -sg). "low" spent 1221 and 1127 reasoning tokens, and no effort (the plugin's default high) spent 1219. glm-5.3-flash still lists no none. The default effort stays the config's high. #561: on the China build (copilot.tencent.com), deepseek-v4.1-flash's context is capped at 100000 (SITES.workbuddy.contextCap, contextOf). A smaller config value is kept. The reporter's vendor error was "prompt is too long: 100001 tokens > 100000 maximum", seen 11 times on 2 accounts, while glm-5.3-flash on the same endpoint takes 1M. The config says 1000000 on both sites. WorkBuddy AI's deepseek-v4.1-flash took 148,793- and 181,887-token prompts, so that site keeps the million. Run: - deepseek-flash.test.mjs (new, against testdata/config-561.json, the real configs cut to the models compared) and efforts.test.mjs, against the old index.mjs on mote: 5 fail, 3 pass. The ones that pass are the glm/no-none and unchanged-sibling checks. - The workbuddy package on mote, HOME=$(mktemp -d) bun test: 297 pass, 0 fail. - bun scripts/check.mjs on mote: ok. - Real WorkBuddy AI account in a sandbox HOME, through the plugin loader: the none/low/default and long-prompt numbers above. Not tried: the China build itself. Both CN sign-ins I have (desktop on this Mac and on the Windows box) answer 401 on chat, so the 100000 cap rests on the reporter's literal error, not on a reply of my own.
68 lines
3.3 KiB
JavaScript
68 lines
3.3 KiB
JavaScript
// deepseek-v4.1-flash as each build serves it, against each build's own
|
|
// /v3/config (testdata/config-561.json: copilot.tencent.com's and
|
|
// www.workbuddy.ai's, 2026-10-31, cut to the models compared here).
|
|
// plugins#561: the China build turns a prompt over 100000 tokens away on
|
|
// it, though its config says 1000000; glm-5.3-flash on the same endpoint
|
|
// takes the million, and WorkBuddy AI's deepseek-v4.1-flash took 181,887.
|
|
// plugins#563: it takes reasoning_effort "none" (0 reasoning tokens),
|
|
// though the config says onlyReasoning, so it lists an off level.
|
|
import { afterEach, expect, test } from "bun:test"
|
|
import { readFileSync } from "node:fs"
|
|
import { _internal } from "./index.mjs"
|
|
|
|
const real = globalThis.fetch
|
|
afterEach(() => (globalThis.fetch = real))
|
|
|
|
const configs = JSON.parse(readFileSync(new URL("./testdata/config-561.json", import.meta.url), "utf8"))
|
|
|
|
async function listed(site) {
|
|
globalThis.fetch = async () => new Response(JSON.stringify(configs[site]))
|
|
const out = await _internal.liveModels(_internal.SITES[site], { access: "a", uid: "u" })
|
|
return Object.fromEntries(out.map((m) => [m.id, m]))
|
|
}
|
|
|
|
test("the China build's deepseek-v4.1-flash takes 100000 tokens, its other models what the config says", async () => {
|
|
const m = await listed("workbuddy")
|
|
expect(m["deepseek-v4.1-flash"].context).toBe(100000)
|
|
expect(m["glm-5.3-flash"].context).toBe(1000000)
|
|
expect(m["deepseek-v4-pro"].context).toBe(1000000)
|
|
})
|
|
|
|
test("WorkBuddy AI's deepseek-v4.1-flash keeps the config's million", async () => {
|
|
const m = await listed("workbuddy-ai")
|
|
expect(m["deepseek-v4.1-flash"].context).toBe(1000000)
|
|
expect(m["deepseek-v4.1-flash-sg"].context).toBe(1000000)
|
|
})
|
|
|
|
test("a config smaller than the cap is kept", () => {
|
|
const site = _internal.SITES.workbuddy
|
|
expect(_internal.contextOf(site, "deepseek-v4.1-flash", 64000)).toBe(64000)
|
|
expect(_internal.contextOf(site, "deepseek-v4.1-flash", undefined)).toBe(100000)
|
|
expect(_internal.contextOf(site, "glm-5.3-flash", 1000000)).toBe(1000000)
|
|
})
|
|
|
|
test("the China build's own model list caps it too", () => {
|
|
const cn = _internal.configModels(_internal.SITES.workbuddy)
|
|
expect(cn["deepseek-v4.1-flash"].limit.context).toBe(100000)
|
|
expect(cn["glm-5.3-flash"].limit.context).toBe(1000000)
|
|
})
|
|
|
|
test("deepseek-v4.1-flash lists none on both builds, its paid id too", async () => {
|
|
const cn = await listed("workbuddy")
|
|
const ai = await listed("workbuddy-ai")
|
|
expect(cn["deepseek-v4.1-flash"].efforts).toEqual(["none", "low", "high", "max"])
|
|
expect(ai["deepseek-v4.1-flash"].efforts).toEqual(["none", "low", "high", "max"])
|
|
expect(ai["deepseek-v4.1-flash-sg"].efforts).toEqual(["none", "low", "high", "max"])
|
|
// its default stays what the config says
|
|
expect(cn["deepseek-v4.1-flash"].effort).toBe("high")
|
|
expect(Object.keys(_internal.configModels(_internal.SITES.workbuddy)["deepseek-v4.1-flash"].variants)).toEqual(["none", "low", "high", "max"])
|
|
})
|
|
|
|
test("glm-5.3-flash, which can't turn thinking off, still lists no none", async () => {
|
|
const cn = await listed("workbuddy")
|
|
const ai = await listed("workbuddy-ai")
|
|
expect(cn["glm-5.3-flash"].efforts).toEqual(["low", "high", "max"])
|
|
expect(ai["glm-5.3-flash"].efforts).toEqual(["low", "high", "max"])
|
|
expect(cn["deepseek-v4-pro"].efforts).toEqual(["none", "high", "xhigh"])
|
|
})
|