Skip to content

openai-image-gen: validate --background and --style CLI options #36763

@shuofengzhang

Description

@shuofengzhang

Summary

skills/openai-image-gen/scripts/gen.py currently accepts any --background (GPT models) and --style (dall-e-3) value and forwards them directly to the Images API.

Invalid values fail only at request time with API errors, which is less clear for CLI users and causes avoidable failed requests.

Proposed improvement

  • Validate --background against transparent, opaque, and auto for GPT image models.
  • Validate --style against vivid and natural for dall-e-3.
  • Normalize accepted values to lowercase and fail fast with clear CLI errors for invalid input.

Implemented by PR: #36762

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions