Fail closed when image_generation.model, size, or quality is not a string - #104
Merged
Merged
Conversation
…ring A YAML list for model overwrote the default string in image_generation_config and was str()'d into the Images API. Require non-empty YAML strings at Config.from_yaml, same as tts.model. Co-authored-by: jmjava <jmjava@gmail.com>
Local ruff, pytest, and docgen benchmark are green on this branch. Co-authored-by: jmjava <jmjava@gmail.com>
jmjava
marked this pull request as ready for review
September 7, 2026 20:45
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.
Problem
tts.model/tts.voiceare already non-empty YAML strings at config load.image_generation.model/size/qualitywere not.image_generation_configdoesdefaults.update(block). A YAML list formodel:overwrote the default string.generate_images_for_specthen didstr(icfg.get("model")), sending"['gpt-image-1']"to the Images API.Change
image_generation.model/size/qualitymust be non-empty YAML strings.Milestone:
milestones/image-generation-strings.md. Also marksimage-empty-bytesas shipped (#103).Out of scope
wizard.default_guidancetype gating is separate.Gates
ruff check src/ tests/pytest tests/docgen benchmark(no clock change; no--update-baseline)