Files
magpie/docs
yetone b64ec9d64f gateway: a picked model that turns an image away gets it described, not another provider (xyenon)
xyenon (Discord #feedback) picked provider-1/DeepSeek-V4.1-Flash in pi
with an Image recognition model set. An image they sent wasn't
described; the request was answered by provider-2/DeepSeek-V4.1-Flash.

Cause: provider-1's list says nothing of images, so magpie took
models.dev's word for the model (catalog.SeesImages: text+image) and sent
the raw image. The relay answered DeepSeek's 400 "Failed to deserialize
the JSON body ... unknown variant `image_url`, expected `text`". That
matches shapeWords, so the try failed as a shape refusal and went on to
the next candidate: provider-1's fallback (or the next group member),
the same model at provider-2, which sees. The describer was never asked.

Fix: a 400/415/422 whose words say images aren't taken (imageRefused:
unknown variant image_url/input_image/image, OpenAI's "only supported by
certain models", OpenRouter's "no endpoints found that support image",
vLLM's "not a multimodal model", 不支持图片 and the like) marks the model
blind for this server's run (refuseSight; blindTo checks it first). With
a describer, the same candidate is asked again at once with the images
described (seenBody, or seenGroup for a group), before any fallback or
other member; the try reads failSight, which the Routing page tells as
its own story (en/zh/zh-TW/ja/de); the row then reads answered, as
for floor's and foreign's re-asks. Later requests
are described up front, for a direct pick and a group (user or auto)
alike, on Chat, Responses and Messages.

Kept on purpose: with no describer (Image recognition off, or no model
that sees), going on to a candidate whose copy sees is the only way to
answer, so it still does (TestRefusedImageWithNoDescriberGoesToOneThatSees).
Documented in docs/subsystems/gateway-routing.md, "A model that turns an
image away".

Run (on mote, through mote-run):
- TestPickedModelThatRefusesAnImageIsGivenItDescribed (9 subtests:
  direct pick with a fallback, user group, group/auto-…; each API),
  TestRefusedImageWithNoDescriberGoesToOneThatSees, TestImageRefused: ok.
- Broken by hand: with gateway.go/vision.go/routing.go reverted to
  origin/main (d9cf85ae8), all 9 subtests fail with "the same model at
  the other provider was asked 2 times" and the raw image sent there.
- go test -tags nogui ./internal/gateway -count=1 -timeout 45m: ok (996s)
  at the d9cf85ae8 base. After rebasing onto 4534561f6: the new tests
  and -run 'Vision|Image|Shape|Group' in internal/gateway ok, and the
  three vets and gofmt again clean.
- go vet ./internal/gateway (darwin), GOOS=linux and GOOS=windows
  go vet -tags nogui ./internal/gateway, gofmt -l: clean.
- GUI: routing-sight (new, 5 languages) and i18n-keys in chromium on
  mote: ok. routing-sight and routing-shape in webkit on the Linux box
  (wsl-run): ok. WebKit on mote couldn't launch (browserType.launch
  timed out at 180s beside other sessions' webkit stuck 2h, routing-shape
  untouched failed the same), so its webkit leg ran on Linux instead.

Not tried: a real pi session against a real text-only DeepSeek relay
(no such account here); the fixture uses DeepSeek's literal 400 body.
The full go test ./... and the whole GUI suite were not run.
2026-10-29 17:23:24 +08:00
..