From cb9093181d7c57e4c2c6fc02ab93f5a6ae9c9253 Mon Sep 17 00:00:00 2001 From: yetone Date: Tue, 13 Oct 2026 01:48:32 +0800 Subject: [PATCH] workbuddy 0.1.16: WorkBuddy AI's GLM models are text-only, so magpie's image-describing model reads their images (Yirasumi on Discord) What: for the workbuddy-ai provider only, a model whose id starts with glm- is listed without image input (capabilities.input.image and attachment false), whatever /v3/config's supportsImages says. Why: checked on 2026-10-13 with a real WorkBuddy AI account. Its www.workbuddy.ai/v3/config marks every model supportsImages: true, but an image sent to glm-5.3-flash, glm-5.3 or glm-5.2 is taken out by the server and replaced with "[System reminder: the current model does not support images. Content filtered. ...]". Its other models (deepseek-v4.1-flash, kimi, gemini, grok, gpt) read images, and WorkBuddy (China, copilot.tencent.com)'s glm-5.3-flash does too. Listed as taking images, magpie sent them straight through and the model never saw them; listed text-only, magpie's image-describing model reads them first. A user who set the model's image support by hand in magpie keeps it (magpie's ModelImages setting is applied over the provider's list). Scoped by site (SITES["workbuddy-ai"].noImages = /^glm-/) and family, not a list of three ids, so a later GLM on WorkBuddy AI is covered. Run: TMPDIR= HOME=/home bun test in packages/workbuddy: 68 pass. The new test fails on the old index.mjs (glm-5.3-flash listed with images). bun scripts/check.mjs green. Not run: a live chat through the plugin with an image (the account check above was done before this change). --- packages/workbuddy/index.mjs | 22 +++++++++++++++++-- packages/workbuddy/package.json | 2 +- packages/workbuddy/usage.test.mjs | 35 +++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 3 deletions(-) diff --git a/packages/workbuddy/index.mjs b/packages/workbuddy/index.mjs index e576aab..18b8fda 100644 --- a/packages/workbuddy/index.mjs +++ b/packages/workbuddy/index.mjs @@ -77,9 +77,27 @@ const SITES = { platform: "workbuddy-ai", ai: true, models: AI_MODELS, + // models whose images WorkBuddy AI drops though its config says they + // take them (see textOnly) + noImages: /^glm-/, }, } +// textOnly says whether site drops the images sent to model, whatever its +// config says. On 2026-10-13, with a real WorkBuddy AI account (Yirasumi on +// Discord), www.workbuddy.ai's /v3/config marked every model +// supportsImages: true, but a chat to glm-5.3-flash, glm-5.3 or glm-5.2 +// came back saying "[System reminder: the current model does not support +// images. Content filtered. ...]": the server had taken the image out. +// Its other models (deepseek-v4.1-flash, kimi, gemini, grok, gpt) read +// them, and WorkBuddy (China)'s glm-5.3-flash does too, so this is WorkBuddy +// AI's GLM models alone. Said text-only, magpie's image-describing model +// reads the image for them; a user who said the model takes images keeps +// their own answer (magpie's settings, over what this list says). +function textOnly(site, model) { + return !!site.noImages?.test(model) +} + const NPM = "@ai-sdk/openai-compatible" const hex = () => randomBytes(16).toString("hex") const sleep = (ms) => new Promise((r) => setTimeout(r, ms)) @@ -1180,7 +1198,7 @@ async function liveModels(site, a) { if (d) { m.context = d.maxInputTokens m.output = d.maxOutputTokens - m.images = d.supportsImages === true + m.images = d.supportsImages === true && !textOnly(site, id) const r = creditsOf(d.credits) if (r !== undefined) { m.free = r === 0 @@ -1394,4 +1412,4 @@ export const WorkBuddyAuthPlugin = makePlugin(SITES.workbuddy) export const WorkBuddyAIAuthPlugin = makePlugin(SITES["workbuddy-ai"]) // for tests -export const _internal = { runsOutOf, packagesOf, endOf, enterpriseHeaders, enterpriseOf, liveModels, browserSignIn, withSystem, normalizeToolChoice, fitTools, fitted, renamed, unflagged, usageOf, desktopHeld, explained, REFUSED_HINT, EXHAUSTED_HINT, freeCredits, creditsOf, fresh, SITES, renewing, renewed, SESSION, attend, turnKey, conversationKey, signatureOf } +export const _internal = { textOnly, runsOutOf, packagesOf, endOf, enterpriseHeaders, enterpriseOf, liveModels, browserSignIn, withSystem, normalizeToolChoice, fitTools, fitted, renamed, unflagged, usageOf, desktopHeld, explained, REFUSED_HINT, EXHAUSTED_HINT, freeCredits, creditsOf, fresh, SITES, renewing, renewed, SESSION, attend, turnKey, conversationKey, signatureOf } diff --git a/packages/workbuddy/package.json b/packages/workbuddy/package.json index f13ef55..d7e32db 100644 --- a/packages/workbuddy/package.json +++ b/packages/workbuddy/package.json @@ -1,6 +1,6 @@ { "name": "@magpie-community/opencode-workbuddy-auth", - "version": "0.1.15", + "version": "0.1.16", "description": "OpenCode provider plugins for WorkBuddy's plans: WorkBuddy (CodeBuddy, copilot.tencent.com) and WorkBuddy AI (www.workbuddy.ai)", "type": "module", "main": "./index.mjs", diff --git a/packages/workbuddy/usage.test.mjs b/packages/workbuddy/usage.test.mjs index ebaba32..6e194e9 100644 --- a/packages/workbuddy/usage.test.mjs +++ b/packages/workbuddy/usage.test.mjs @@ -186,6 +186,41 @@ test("each model's rate is its credits", async () => { for (const c of ["", null, undefined, "free", "x-1", "Infinity"]) expect(creditsOf(c)).toBeUndefined() }) +// WorkBuddy AI's GLM models take no images, though its config says every +// model does: on 2026-10-13 a real account's image sent to glm-5.3-flash, +// glm-5.3 and glm-5.2 came back as "[System reminder: the current model +// does not support images. Content filtered. ...]" (Yirasumi on Discord). +// Its other models read them, and WorkBuddy (China)'s GLM does too, so +// only WorkBuddy AI's GLM models lose images. +test("WorkBuddy AI's GLM models are text-only, its others and China's GLM keep images (Yirasumi on Discord)", async () => { + const ids = ["glm-5.3-flash", "glm-5.3", "glm-5.2", "glm-6", "deepseek-v4.1-flash", "kimi-k3", "gemini-3.5-flash", "gpt-5.5", "hy3"] + const cfg = () => ok({ + agents: [{ name: "cli", models: [...ids, "said-nothing"] }], + models: [...ids.map((id) => ({ id, name: id, supportsImages: id !== "hy3" })), { id: "said-nothing" }], + }) + const auth = { type: "oauth", access: "a", refresh: "r", expires: later(), uid: "u", domain: "" } + const images = async (plugin) => { + serve({ "/v3/config": cfg }) + const hooks = await plugin({ client: {} }) + const ms = await hooks.provider.models({ id: hooks.auth.provider, models: {} }, { auth }) + return Object.fromEntries(Object.entries(ms).map(([k, m]) => [k, [m.capabilities.input.image, m.capabilities.attachment]])) + } + expect(await images(WorkBuddyAIAuthPlugin)).toEqual({ + "glm-5.3-flash": [false, false], "glm-5.3": [false, false], "glm-5.2": [false, false], "glm-6": [false, false], + "deepseek-v4.1-flash": [true, true], "kimi-k3": [true, true], "gemini-3.5-flash": [true, true], "gpt-5.5": [true, true], + hy3: [false, false], "said-nothing": [false, false], + }) + expect(await images(WorkBuddyAuthPlugin)).toEqual({ + "glm-5.3-flash": [true, true], "glm-5.3": [true, true], "glm-5.2": [true, true], "glm-6": [true, true], + "deepseek-v4.1-flash": [true, true], "kimi-k3": [true, true], "gemini-3.5-flash": [true, true], "gpt-5.5": [true, true], + hy3: [false, false], "said-nothing": [false, false], + }) + const { textOnly, SITES } = _internal + // the family, by its id's start: not a model whose id only has glm in it + expect(textOnly(SITES["workbuddy-ai"], "my-glm-5")).toBe(false) + expect(textOnly(SITES.workbuddy, "glm-5.3-flash")).toBe(false) +}) + // the detail lists as www.workbuddy.ai sent them for a Pro account on // 2026-10-11 (ids left out): the Bonus Pack's 232.4 credits left end on // 10-13, before Pro's on 10-29; the Free Plan's daily slice (CapacityType