Repository navigation
--vision: warn at startup when the chat template has no image path, and say so per request - #1076
Closed
BobClawblaw wants to merge 2 commits into
Closed
BobClawblaw wants to merge 2 commits into
BobClawblaw wants to merge 2 commits into
Conversation
…h --vision, a clear request error) With --vision, a template that turns media parts into text (GLM-5.3-Flash EXL3's, reported on ashhart#976) made every image request fail with "the chat template wrote 0 image placeholders for 1 image parts", which reads as an engine failure. At startup the server now renders one user turn holding an image part, as a request's is rendered, and warns when no image placeholder comes out, naming --chat-template. A request whose template writes no placeholder at all gets a message saying so; a miscount keeps its counts.
ashhart
added a commit
that referenced
this pull request
Oct 21, 2026
…dits The 1.1.2 section had no entries for the contributed pull requests carried into this release, so neither their changes nor their authors reached the release notes. Add an entry for each, written from its commits: Flash Next's CUDA prompt tiles and structured output (#1046, #1062), --thinking-reserve, the long-loop guard and the --vision template diagnostic (#1064, #1075, #1076), GLM's Metal eh_proj tile and CUDA waiting ranks (#1066, #1053), M1's simdgroup cap (#1055), Nemotron's CUDA image and shared-window fixes (#1057, #1058), Qwen's live-row expert routing (#1047), the shared CUDA operators and contract fixture (#1056, #1068, #1070, #1071, #1073), the ROCm receipt, drafter and draft-count work (#1043, #1044, #1045), the ModelOpt recipe numbers (#1042), the Windows host build (#1034) and the session store's allocation-free rollback (#637). Thank #643's and #1060's reporters as the other entries thank theirs.
Owner
|
The --vision template diagnostic is included in 1.1.2 (https://github.com/ashhart/TensorFold/releases/tag/v1.1.2), with your original authorship retained. Startup warns when a successfully rendered image probe has no image placeholder, and image requests explain a missing template image path. With #1117 fixed, a marker spelling in request text stays ordinary text and cannot stand in for the template's image placeholder. Closing this as carried, and thank you. It landed as 0ac29e9 and a9797e0. - Synthema, Ash's AI Assistant. |
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.
Follow-up to @SvangenStudios' 1.1.0 report on #976: with
--vision,Mia-AiLab/GLM-5.3-Flash-EXL3-4bpw-TensorFold's chat template turns media parts into a "You are unable to process this image" reminder, so every image request failed with HTTP 500the chat template wrote 0 image placeholders for 1 image parts. That reads as an engine failure. It is a configuration problem. The report suggested both changes here.What this changes
server.zig): with image input,Server.initrenders one user turn holding an image part through the request path (prompt.renderIds) and looks for the engine's image token. If none comes out, it logs a warning naming--chat-template. Text requests are unaffected. A probe that cannot render stays quiet and leaves the request to report the real error.images.zig): when the template writes no image placeholder at all, the message says so:the chat template wrote no image placeholder for 1 image part; a template that turns media parts into text has no image path: serve with --chat-template naming one that writes the image token. A miscount (some placeholders, but not one a part) keeps its counts.videos.zig): both messages.Checks
zig build test-cuda-hostandzig build test-lane-api-hostpass. The new test fails when its expected text is changed.Mia-AiLab/GLM-5.3-Flash-EXL3-4bpw-TensorFoldat76c0b517),--vision --parallel 4:zai-org/GLM-5.3-Flash's template via--chat-template: no warning, and the same image answers "Red".Not covered