feat(#3996): resolve image output capability from models.dev - #4019
Draft
aheritier wants to merge 2 commits into
Draft
feat(#3996): resolve image output capability from models.dev#4019aheritier wants to merge 2 commits into
aheritier wants to merge 2 commits into
Conversation
Add ModelConfig.OutputCapabilities (output_capabilities.image in YAML), a latest-only tri-state override for a model's generative output capability. An explicit true or false is authoritative; an omitted flag is left for the models.dev resolver introduced by the following commit. No capability is ever inferred from the model name. Reject output_capabilities on first_available selectors because one block cannot unambiguously describe every candidate. Update the schema, model docs, and example, and cover YAML round trips, shorthand behavior, cloning, schema strictness, and selector validation.
Resolve an omitted output_capabilities.image flag from the model's models.dev output modalities, matching modality names case-insensitively. Explicit true or false overrides remain authoritative, while a missing store or catalogue record conservatively disables image output. Wire the resolver through provider base configuration, update schema and model documentation, and cover catalogue hits, misses, nil stores, and override precedence.
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.
What
Resolves Gemini image-output capability from models.dev, wires it into model/config validation, and documents/examples the capability.
Why
Allows image-output configuration to be validated from authoritative model metadata instead of hard-coded assumptions.
Validation
task test; config, schema, modelinfo, capability-resolution, and output-capability tests.Test instructions
Run:
task testUse
examples/gemini_image_output.yamlwith a Gemini model that advertises image output, then repeat with a model that does not. Expected: the capable model configuration is accepted and the incapable model configuration is rejected with a clear validation error.