workbuddy 0.2.9: a model declared before the account's list is read takes images (#572)
kongbai01203 found WorkBuddy AI's kimi-k3 listed as image: false and reasoning: false. That is the list the plugin declares (configModels): what magpie has before an account's own list is read, for an API key whose CLI reads no config, or when /v3/config can't be read. It declared every model text-only. The live list already says kimi-k3 takes images. Read on 2026-11-01 with the owner's real accounts: both sites' /v3/config mark every model supportsImages (WorkBuddy AI's glm-5.3 aside, which textOnly already turns off, measured 10-13). Through this plugin's own loader fetch, a chat to www.workbuddy.ai's kimi-k3 with a 32x16 PNG, blue left and yellow right, answered "Blue yellow" (HTTP 200). kimi-k3-1, the id in the report, is a copilot.tencent.com model: www.workbuddy.ai answers it 400 11102 "service info not found". A declared model now takes images unless textOnly says its site drops them. Run (mote-run, bun 1.4.2, HOME=$(mktemp -d)): packages/workbuddy bun test, 301 pass 0 fail. Broken by hand: with index.mjs at origin/main, declared-images.test.mjs is 0 pass 2 fail. Not tried: the static list's models the live config no longer lists (gpt-5.5, kimi-k2.6, ...) with an image; they are declared as the config said of every model.
This commit is contained in:
@@ -260,7 +260,9 @@ through as it came.
|
||||
When you are signed in, the models are the ones WorkBuddy's product config
|
||||
gives its CLI agent (`GET /v3/config`), with their context, image input and
|
||||
reasoning levels. Until then, or if WorkBuddy doesn't answer, the list below
|
||||
is used.
|
||||
is used. Since 0.2.9 its models take images, as the config says of every
|
||||
model, except WorkBuddy AI's GLM models, whose images WorkBuddy AI drops
|
||||
(#572).
|
||||
|
||||
`workbuddy`:
|
||||
- Auto
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
// plugins#572 (kongbai01203): WorkBuddy AI's kimi-k3 read as image: false
|
||||
// and reasoning: false, the list the plugin declares before an account's
|
||||
// own is read. That list said no model took images, while both sites'
|
||||
// /v3/config mark every one supportsImages (read 2026-11-01), and a chat to
|
||||
// www.workbuddy.ai's kimi-k3 with a blue|yellow PNG answered "Blue yellow".
|
||||
// Only WorkBuddy AI's GLM models drop images (textOnly).
|
||||
import { expect, test } from "bun:test"
|
||||
import { WorkBuddyAIAuthPlugin, _internal } from "./index.mjs"
|
||||
|
||||
test("a declared model takes images unless its site drops them", () => {
|
||||
const ai = _internal.configModels(_internal.SITES["workbuddy-ai"])
|
||||
expect(ai["kimi-k3"].modalities.input).toEqual(["text", "image"])
|
||||
expect(ai["kimi-k3"].attachment).toBe(true)
|
||||
expect(ai["glm-5.3"].modalities.input).toEqual(["text"])
|
||||
expect(ai["glm-5.3"].attachment).toBe(false)
|
||||
for (const site of ["workbuddy", "workbuddy-ai"]) {
|
||||
for (const [id, m] of Object.entries(_internal.configModels(_internal.SITES[site]))) {
|
||||
const img = !(site === "workbuddy-ai" && id.startsWith("glm-"))
|
||||
expect([site, id, m.modalities.input.includes("image")]).toEqual([site, id, img])
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
test("the config hook declares kimi-k3 with images", async () => {
|
||||
const h = await WorkBuddyAIAuthPlugin({ client: {} })
|
||||
const cfg = {}
|
||||
await h.config(cfg)
|
||||
const m = cfg.provider["workbuddy-ai"].models["kimi-k3"]
|
||||
expect(m.modalities.input).toContain("image")
|
||||
})
|
||||
@@ -2949,11 +2949,19 @@ function variants(efforts) {
|
||||
|
||||
// configModels is the site's own list as a provider's models, each on the
|
||||
// API it is served on: a Claude model on Messages, the rest on chat.
|
||||
// A model declared here (before an account's list is read, for a key
|
||||
// whose CLI reads no config, or when /v3/config can't be read) takes images
|
||||
// unless textOnly says the site drops them: both sites' configs mark every
|
||||
// model supportsImages (read 2026-11-01), and a chat to WorkBuddy AI's
|
||||
// kimi-k3 with a two-colour PNG named both colours (plugins#572). Declared
|
||||
// text-only, as before, every model read as one that can't see.
|
||||
function configModels(site) {
|
||||
return Object.fromEntries(site.models.map(([id, name, context, efforts]) => [id, {
|
||||
name,
|
||||
limit: { context, output: 0 },
|
||||
tool_call: true,
|
||||
attachment: !textOnly(site, id),
|
||||
modalities: { input: textOnly(site, id) ? ["text"] : ["text", "image"], output: ["text"] },
|
||||
// OpenCode (and magpie's host) read a config model's package and URL
|
||||
// from provider: { npm, api }, not api
|
||||
...(nativeOf(site, id) ? { provider: { npm: NPM_MESSAGES, api: apiMessages(site) } } : {}),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@magpie-community/opencode-workbuddy-auth",
|
||||
"version": "0.2.8",
|
||||
"version": "0.2.9",
|
||||
"description": "OpenCode provider plugins for WorkBuddy's plans: WorkBuddy (CodeBuddy, copilot.tencent.com) and WorkBuddy AI (www.workbuddy.ai)",
|
||||
"type": "module",
|
||||
"main": "./index.mjs",
|
||||
|
||||
Reference in New Issue
Block a user