magpie icon indicating copy to clipboard operation
magpie copied to clipboard

vision: a model whose vendor says text-only is still sent images — silence becomes a models.dev bare-id vote, and "Accepts images" overrides the vendor

Open MYCF711 opened this issue 1 month ago • 2 comments

vision: a text-only model still gets images — silence falls back to models.dev's bare-id votes, and "Accepts images" overrides the vendor

Environment

  • magpie 0.1.1932 (Windows, magpie-windows-amd64.exe tray)
  • Vision model: workbuddy/deepseek-v4.1-flash (Settings → Models → Image recognition, effort low)
  • Agent: DSH over http://127.0.0.1:3425/v1, model group/deepseek-v4.1-flash1017

What happens

Two independent paths send a base64 image to a model that cannot read images. In both, the agent is told the model takes images (/v1/models advertises modalities.input: ["text","image"]) and sends the image; magpie forwards it untouched; the upstream either refuses it or silently ignores it.

Case 1 — a plugin that says nothing (CodeArts)

codearts/deepseek-v4.1-flash-1017 and its 7 siblings were all text-only (capabilities.input { text: true }, no image key), but magpie treated them as vision-capable and forwarded screenshots. CodeArts answered

The request model is not multimodal (InferHub.001001020.406)

161 such attempts in the local routing history: 2026-10-25: 12, 10-26: 100, 10-27: 1, 10-28: 48 (last at 13:44), 2026-10-29: 0. 159 of the 161 were inside requests that eventually answered 200 by falling back to a seeing member; 2 ended 400. Every one of those 159 burned an upstream attempt first.

This is the same case the codearts 0.2.4 commit fixed from the plugin side (c2eb8de, "every model is text only, and an image it refuses is a 400"). The magpie-side possibility of the misjudgement remains.

Case 2 — a hand-ticked "Accepts images" that the vendor says no to (ima, magicrew)

settings.modelImages here had three overrides, all against a vendor image: false:

{"ima/deepseek-v4.1-flash": true,
 "ima/deepseek-v4.1-flash-think": true,
 "magicrew/mimo-v2.6-pro": true}

Measured with a 320×120 PNG reading MAGPIE-VISION-TEST 42, sent as image_url.url = "data:image/png;base64,…":

model what the model answered
ima/deepseek-v4.1-flash 200 — "图片似乎无法查看,当前无法获取图片信息…" (cannot see the image)
ima/deepseek-v4.1-flash-think 200 — "我无法获取这张图片的内容"
magicrew/mimo-v2.6-pro 400 — "模型 mimo-v2.6-pro 不支持多模态输入"

The vendor lists of both plugins already said image: false (imageSaid: true). The modelImages override is what turned them into "vision on".

Root cause (as read on main, 1cc33700)

  1. Silence becomes a models.dev vote. A plugin's model entry is only declared to magpie when capabilities.input.image is a boolean (internal/plugin/host.js:2003); internal/provider/plugins.go:283 only sets ImageInput when ImageSaid is true. With ImageInput == nil, vendorSees falls back to m.Images || catalog.SeesImages(m.ID), and catalog.SeesImages is the bare-id vote across every provider models.dev lists (the comment itself says "a few mislabel a text model"). deepseek-v4.1-flash-1017 is listed as image-capable by 9 third-party providers (cortecs, alibaba-token-plan, melious, llmgateway, digitalocean, requesty, hyper, engy, …), so CodeArts' text-only model votes "vision on".

    HOOKS.md says the opposite — "modalities.input … 不写则按 text 处理". The implementation does not.

  2. A hand tick beats a vendor's explicit no. SetModelImage (internal/provider/modelprefs.go:382, GUI entry internal/gui/providers.go:1766) accepts vision=true unconditionally, and ApplyImage lets the override win over ImageInput=false. Nothing warns that the vendor said no.

  3. No runtime correction. When the upstream does refuse the image, the failure is retried/fallen back, but the model's image flag is never corrected: the next request sends images to it again. 161 attempts over four days is what that looks like.

Suggested fix — three gates

  1. Silence means text-only for plugin models. In vendorSees (or in pluginCatalog), a plugin model with ImageSaid == false should return (false, true) rather than consulting catalog.SeesImages. Under-claiming refuses one image and names the model; over-claiming sends it upstream and fails mid-turn. The comment on DEFAULT_INPUT in dsh-llm-pi-ai puts the tradeoff the same way.
  2. Warn on a contradictory override. When vendorSees(p, model) returns known && !vendor, --vision on / the GUI checkbox should require a confirmation ("the vendor says this model takes no images") or be refused.
  3. Degrade on the upstream's own words. In the try loop, match image-refusal errors (not multimodal, does not support image input, InferHub.001001020.406) and: set ModelImages[provider/model] = false, then retry the request through seenBody (describe with the Vision model). Any plugin that under-declares in the future self-heals after one failure instead of failing for days.

A regression test could line up with what the codearts 0.2.4 test already asserts on the plugin side ("every model says it takes text alone") — the magpie side should assert that a plugin model without image in capabilities.input does not inherit catalog.SeesImages.

Related

  • #3317 asks for an opt-in model-first mode: send images to a model that can see, describe only if it refuses. This issue is the opposite direction — models that cannot see never reach the upstream in the first place, and a refusal must also correct the model's flag for later requests.
  • #1087 proposes probing image support during a model test. That would give the user a real answer instead of a vote; until it exists, this issue's gate 1 (silence = text-only) is the safe default.
  • #2460 is the same images := m.Images || catalog.SeesImages(m.ID) expression seen from the other side (AutoVision vs. the Providers UI); both would simplify if a plugin model's unanswered ImageInput were treated as false.

Evidence available

  • Local routing log (~/.config/magpie/routing/2026-10-2*.jsonl*): 6,700 image-bearing requests, 47 non-200 (of which 161 not multimodal attempts are listed above), every not multimodal attempt carrying tries[0].id == "codearts".
  • Reproduced 2026-10-29 on 0.1.1932 with a 1,815-byte PNG: ima/* answers "cannot see the image"; magicrew/mimo-v2.6-pro answers 400; after clearing the three modelImages overrides, all three answer the text in the image (MAGPIE-VISION-TEST 42) through the Vision description path.

MYCF711 avatar Oct 28 '26 18:10 MYCF711

Update from the reporter's side, because two of the three conditions in this issue have changed since I filed it — and the structural part has not.

Case 1 (CodeArts: a plugin that said nothing). The plugin fixed it on its side in 0.2.4 (c2eb8de): every model now declares capabilities.input with image: false, so the "silence falls back to models.dev's bare-id vote" path is no longer reachable for it. That makes this a latent bug rather than an active one — it still fires for any future plugin that omits image.

Case 2 (a hand tick beating the vendor's no). I cleared the three modelImages overrides while reproducing this, and they are still gone: settings.modelImages is now absent on this machine. So I cannot re-measure the override half here. Our two plugins now both send a boolean: magpie-ima-local-auth 0.3.2 sends input: { text: true, image: false } for every model, and magpie-magicrew-auth 0.3.42 forwards the vendor's own vision flag as input.image. Neither is silent any more.

What remains — the host side, unchanged as far as I can read main:

  1. vendorSees still falls back to catalog.SeesImages(m.ID) when ImageSaid is false. HOOKS.md says the opposite ("不写则按 text 处理"). Under-claiming refuses one image and names the model; over-claiming sends it upstream and fails the turn. Silence should mean text-only for a plugin model.
  2. SetModelImage / ApplyImage still let a manual "Accepts images" win over ImageInput == false with no warning. Even with our plugins declaring correctly, a user can tick a model that its vendor says is text-only and magpie will forward the image.
  3. No correction on the upstream's own refusal. CodeArts answered not multimodal for four days (161 attempts) and its flag never changed. A plugin that under-declares should self-heal after one refusal, not fail for days.

I am not asking you to change routing semantics — only that silence is text, a contradiction is at least surfaced, and a refusal corrects the flag for later requests. If you want, I can write the Go test for gate 1 against a fixture plugin that omits capabilities.input, the way the codearts plugin's own test asserts "every model says it takes text alone".

MYCF711 avatar Oct 29 '26 00:10 MYCF711

Answered: declaring the field on the plugin is the contract, models.dev stays as the fallback. That closes the structural half this issue was opened for; both plugins here now send an explicit boolean, so the silence path is latent rather than live. Closing.

MYCF711 avatar Nov 04 '26 12:11 MYCF711