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
aheritier
force-pushed
the
gemini-output-capability
branch
2 times, most recently
from
August 24, 2026 15:12
ebd9306 to
33c6981
Compare
aheritier
force-pushed
the
gemini-output-capability
branch
from
August 25, 2026 20:24
33c6981 to
5bb315a
Compare
aheritier
force-pushed
the
gemini-output-capability
branch
2 times, most recently
from
September 1, 2026 16:19
35efc65 to
5bb315a
Compare
aheritier
force-pushed
the
gemini-output-capability
branch
from
September 1, 2026 16:29
5bb315a to
d1bcf0a
Compare
This was referenced Sep 2, 2026
aheritier
force-pushed
the
gemini-output-capability
branch
2 times, most recently
from
September 7, 2026 11:19
475db3f to
a8c6997
Compare
Add ModelConfig.OutputCapabilities (output_capabilities.image in YAML), a latest-only tri-state override for a model's generative output capability. Explicit false has highest precedence, explicit true follows, and an omitted flag — including output_capabilities: {} — is left for models.dev resolution in 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 true, false, omitted, and empty-block YAML states, shorthand behavior, cloning, schema strictness, and selector validation.
Resolve image-output capability with one explicit precedence chain: false disables it, true enables it, and an omitted image flag — whether output_capabilities is absent or {} — enables it only when the exact known models.dev record lists image in Modalities.Output. Unknown models, unavailable catalogue data, and lookup failures stay off.
Keep lookup case-insensitive and bounded by the existing models.dev timeout. Capability is never inferred from provider or model-name patterns.
aheritier
force-pushed
the
gemini-output-capability
branch
from
September 7, 2026 11:34
a8c6997 to
54e8365
Compare
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.