A model whose source lists video input (antigravity/gemini-4-argon, say)
reached ZCode as text and image only, in config.json's modalities.input
and in provider_config.json's inputFormat, so ZCode never attached a
video to it. buildModels left the catalog's kinds out of the agent
model, and zcode.go rebuilt the list from m.Images.
- buildModels carries Entry.Modalities() into InputModalities and
OutputModalities.
- zcodeInputs adds "video" when the model lists it and the provider's
format is Messages or Chat. ZCode's own built-in rules (3.14.3's
zcode-builtin.json) use inputFormat.supportsVideo, so the key is one
its strict schema takes; it is written only when true.
Ported from Flandern1211's fork branch (fix/zcode-video-input,
e955d3c24), with these differences after review:
- Its gateway half (Messages video block and Chat video_url as a file
part) is on main already, since b4fc29a6e (#6135), so it is not
taken; TestZCodeVideoReachesCodeAssist keeps their captured ZCode
shapes as a guard.
- PDF is not offered (no supportsPdf, no "pdf" input), and Messages'
document block is not read as a file: a translated request still
loses a PDF (#5452), so ZCode would be told of a kind that doesn't
arrive.
Test: TestZCodeToldOfVideoInput, red on origin/main e4ea31321
("config.json's media/gemini takes [text image], want [text image
video]"), and red with the Responses gate taken out by hand.
Not tried: a real ZCode with a video against a real Gemini model here;
the reporter captured ZCode 0.17.1's video block and video_url on
Windows 11.
Co-authored-by: Flandern1211 <163982805+Flandern1211@users.noreply.github.com>
Ran (mica, at this tree on e4ea31321): gofmt -l internal (nothing),
go vet ./..., GOOS=windows go vet ./..., GOOS=linux go vet -tags nogui
./..., go test -tags nogui -timeout 45m ./internal/agent
./internal/gateway ./internal/catalog ./internal/provider: ok agent
(297s), gateway (1080s), catalog; provider red on TestHostBuildsNoList
only ("Host allocated 5 times"), #6479, red on main and untouched here
(baffcb65d on main since). Rebased on origin/main ea3edd4b1 (no change
to these files): the new tests and TestZCode/TestCrush again, ok.