Repository navigation
server: /v1/models lists each model's input_types; a video it can't take is a 400, not a 500 (#3004) - #3019
Merged
Conversation
This was referenced Nov 12, 2026
ashhart
force-pushed
the
lead/models-input-types
branch
from
November 14, 2026 03:15
0029d0e to
eab1e7e
Compare
…ake is a 400 A client could not tell from /v1/models whether a model takes image or video parts, and a video_url part sent to a server whose model reads video but which has no libtfvideo (GLM-5.3-Flash with the default image) ended in HTTP 500 at the first video (#3004). Each model entry now ends with "input_types": ["text"], plus "image" with --vision, plus "video" when the checkpoint offers video and libtfvideo loads. The keys before it keep their order and bytes. There is no new option: the server decides it once at startup (input_types.zig), loading libtfvideo with the loader every video uses, which keeps its answer, and only when the model offers video. Server.media() takes its image and video flags from the same Inputs, so every request route (chat, completions, responses, messages, tokenize) refuses a video_url part on a server that does not list "video" with the 400 an unsupported part gets (invalid_request_error). The startup log names the missing library once. If libtfvideo still fails at a video, that is now a 400 naming the library instead of a 500. The 17 server goldens holding a /v1/models reply gain the key on each entry (the fake engine is text only) and 25 bytes of Content-Length per entry, and nothing else. New tests in models_input_types_test.zig cover the listing (text, image, image and video, and video without the library), the 400 for both kinds of model without video, and the library refusal. docs/api.md describes the key; docs/vision.md says when libtfvideo loads. Co-authored-by: WebReflection <[email protected]>
ashhart
force-pushed
the
lead/models-input-types
branch
from
November 14, 2026 10:56
eab1e7e to
b083373
Compare
Owner
Author
|
Thank you @WebReflection. This is merged into main with your commits under your own name, so you're credited as a TensorFold contributor. |
ashhart
added a commit
to akol1/TensorFold
that referenced
this pull request
Nov 14, 2026
ashhart
added a commit
to akol1/TensorFold
that referenced
this pull request
Nov 17, 2026
ashhart
added a commit
that referenced
this pull request
Nov 17, 2026
kinetick-labs
added a commit
to kinetick-labs/TensorFold
that referenced
this pull request
Nov 20, 2026
…per lists image and video input - engine_capabilities.zig: media joins the Capability enum (upstream checks every Info boolean is one) - status_routes.zig: /v1/models' input_types (upstream ashhart#3019) lists image and video when --vision-helper serves them - models_input_types_test.zig: its undefined Server fixture sets vision_helper to null
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3004, in the shape @WebReflection proposed (credited as co-author).
What changes
/v1/modelsentry ends withinput_types:["text"], plus"image"with--vision, plus"video"when the checkpoint reads video and the server loadslibtfvideo. Every other key keeps its bytes and order.video_urlpart sent to a model without video now gets HTTP 400 (invalid_request_error) instead of a 500 (server/videos.zig).server/input_types.zig, published bysrv.media()), so the listing and the refusals can't disagree. No new option.libtfvideoat startup (through the same loader every video uses) instead of at the first video, and says once in its log when it is missing. Without it, the refusal is the plain "no video" message every model without video gets.docs/api.mddocumentsinput_types;docs/vision.mdsays whenlibtfvideoloads.Tests
test-model-discovery-host36/36: the threeinput_typesarrays, and the video refusal as a 400.On main the new tests fail: missing key ("expected 6, found 5"), a null
input_types, and "expected 400, found 500".test-model-idle-host72/72,test-model-capabilities-host36/36,test-media-request-ownership-host83/83 + 58/58,test-server-cpu1,328 pass, 7 skipped.test-golden: 0 unexpected differences. The 17 changed goldens each differ from main only by the insertedinput_typeskey (and their Content-Length), checked mechanically.zig fmtclean; lean 0 new.Synthena (Ash's Agent)