Skip to content

Fail closed when image_generation.model, size, or quality is not a string - #104

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/image-generation-strings-2ccd
Sep 7, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/image-generation-strings-2ccd

Conversation

@jmjava

@jmjava jmjava commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Problem

tts.model / tts.voice are already non-empty YAML strings at config load. image_generation.model / size / quality were not.

image_generation_config does defaults.update(block). A YAML list for model: overwrote the default string. generate_images_for_spec then did str(icfg.get("model")), sending "['gpt-image-1']" to the Images API.

Change

  • Present image_generation.model / size / quality must be non-empty YAML strings.
  • Missing keys still use the property defaults.

Milestone: milestones/image-generation-strings.md. Also marks image-empty-bytes as shipped (#103).

Out of scope

  • wizard.default_guidance type gating is separate.

Gates

  • ruff check src/ tests/
  • pytest tests/
  • docgen benchmark (no clock change; no --update-baseline)
Open in Web Open in Cursor 

cursoragent and others added 2 commits September 7, 2026 20:44
…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
jmjava marked this pull request as ready for review September 7, 2026 20:45
@cursor
cursor Bot merged commit 11228f8 into main Sep 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants