fix(zen): strip images for the Zen models that reject them (#1043) - #1070
fix(zen): strip images for the Zen models that reject them (#1043)#1070lidge-jun wants to merge 1 commit into
Conversation
The opencode-zen entry declared no noVisionModels and no modality metadata, and both the sidecar and the fail-closed strip key on that list. So an image part went to the upstream verbatim and the whole request came back 400. Zen publishes nothing to derive this from - its /v1/models returns only id, object, created, owned_by, which is the root cause rather than the evidence. So each of the eight free models was probed against the live endpoint with a text control first: six reject images, and big-pickle rejects them with the exact deserialize error quoted in the issue. Two models accept images and are deliberately excluded. A community report claimed the free MiMo model refuses them; it does not, and listing it would have silently swapped a working image for a caption - a worse failure than the 400 this fixes, because nothing surfaces it. The negative assertion in the parity test exists to make a future classify-everything patch fail loudly. This is a dated exception list, not a capability model. Zen discovers its roster live while this list is static, so re-probe before extending it. Closes #1043. The Zen half of #1024 goes with it; that issue's TR half depends on reporter configuration for a provider that is not in the registry.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
Summary
The
opencode-zenentry declared nonoVisionModelsand no modality metadata, and both the vision sidecar and the fail-closed strip key on that list. So animage_urlpart went upstream verbatim and the whole request came back 400.Zen publishes nothing to derive this from. Its
/v1/modelsreturns onlyid,object,created,owned_by— no capability field at all, which is the root cause rather than the evidence. The reporter's suggested fix (strip wheneverinputModalitieslacks"image") would therefore do nothing for exactly the provider that motivated the issue: the metadata isundefinedthere, and live-discovered modalities are never copied into the request-time provider config. It would also flip a deliberate regression guard asserting that unlisted models keep forwarding images.So each of the eight Zen free models was measured against the live endpoint on 2026-08-05, text control first, then a 1×1 PNG:
big-pickleinvalid_request_error … unknown variant 'image_url'nemotron-3-ultra-free[404] No endpoints found that support image inputling-3.0-flash-freenorth-mini-code-freelaguna-s-2.1-freedeepseek-v4-flash-free[400] Model only supports text inputmimo-v2.5-free200, narrates the imagelongcat-2.0-free200, completionbig-picklereproduces the reported error verbatim, so the defect is confirmed end to end rather than by analogy.Two models accept images and are deliberately excluded. A community report claimed the free MiMo model refuses them; it does not. Listing it would have silently swapped a working image for a caption — a worse failure than the 400 this fixes, because nothing surfaces it. The parity test carries a negative assertion so a future "classify all the free models" patch fails loudly instead of shipping.
This is a dated exception list, not a capability model. Zen discovers its roster live while this list is static, so the constant carries its measurement date and the docs say to re-probe before extending it. The general modality-driven default remains a follow-up, and it needs live modality metadata to become canonical first.
Closes #1043. This also closes the Zen half of #1024; that issue's
TR/moonshotai/kimi-k3-freehalf depends on reporter configuration for a provider that is not in the registry, so #1024 stays open.Residual worth naming. The probe ran unauthenticated while
opencode-zenis key-auth. Re-probing with the client header removed entirely gave identical results, and a bogus bearer token returnsAuthErrorbefore any model logic — so capability is enforced upstream of authentication and the header was never load-bearing. What is still unproven is whether an authenticated account is served a different roster under the same ids. A reviewer with a Zen key can settle that in one command; the fallback, if it differs, is to scope the list toopencode-freealone.Verification
Activation evidence: the new e2e case drives a listed Zen model end to end and asserts the effect — image bytes absent from the captured upstream body, omission marker present — not merely a 200. Removing the registry classification fails 3 tests; restoring it returns 39 pass / 0 fail.
Checklist