server : expose model architecture (modalities) in /v1/models#22709
Draft
julien-c wants to merge 1 commit intoggml-org:masterfrom
Draft
server : expose model architecture (modalities) in /v1/models#22709julien-c wants to merge 1 commit intoggml-org:masterfrom
julien-c wants to merge 1 commit intoggml-org:masterfrom
Conversation
Adds an `architecture` object to each entry in /v1/models:
"architecture": {
"input_modalities": ["text", "image"],
"output_modalities": ["text"]
}
`image` is included when the model's HF repo (or local model directory)
contains an mmproj file. Plumbing:
- common_cached_model_info gains input_modalities_image, set by scanning
the HF cache for *mmproj*.gguf entries in the same repo.
- common_preset mirrors the flag; both load_from_cache and
load_from_models_dir populate it.
- common_preset::merge OR-s the flag so it survives cascade().
output_modalities is currently always ["text"].
julien-c
commented
May 5, 2026
Comment on lines
+1183
to
+1186
| json architecture { | ||
| {"input_modalities", input_modalities}, | ||
| {"output_modalities", json::array({"text"})}, | ||
| }; |
Contributor
Author
There was a problem hiding this comment.
this is the API shape from OpenRouter for instance
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.
Overview
Adds an
architectureobject to each entry returned by/v1/models:imageis included when the model's HF repo (or local model directory) contains an mmproj file.output_modalitiesis currently always["text"].Requirements