You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[feat] image generation: let gpt-image requests choose a quality level #220
The OpenAI gpt-image generation and edit endpoints accept quality (low / medium / high / auto), and both output and cost are tiered by it. OpenDirector never sends this parameter, so the choice is left entirely to OpenAI's auto. On the latest origin/main (520ce9ed), a request shaped exactly like a generation node's request for gpt-image-2 (1024×1024, short prompt) came back with quality: low, using the same 196 output image tokens as an explicit low request. Users cannot ask for high quality for final assets, nor pin low quality for drafts to keep costs predictable.
This change adds a quality option for the openai-gpt-image profile, defaulting to auto so existing requests stay the same.
User flow and key rules
The image node parameter panel shows "Quality: Auto / Low / Medium / High" only for gpt-image models. Other services do not show it and never send quality.
The selected quality is stored in the generation spec and fixed in the job's execution snapshot, so retries and recovery reuse it.
The Agent sets quality through the same generation parameter, equivalent to the UI entry.
Image tools (smart edit, outpaint, etc.) keep the default for now (see open questions).
Implementation impact
domain/input_rules.py: declare the selectable quality levels for openai-gpt-image.
Generation parameter contract: add the field and regenerate src/contracts/generated.ts; pass it through application/creation_generation.py and integrations/providers.py.
src/canvas parameter panel: add the option with zh-CN and en-US strings.
Acceptance criteria
Choosing "High" sends quality=high and the response's quality matches; "Auto" sends the same request as today.
Non-gpt-image services do not show the option and do not send quality.
Quality is recorded in the execution snapshot and survives reopening the project and retrying.
Both the UI and the Agent can set it; zh-CN and en-US strings are complete and npm run check:i18n passes.
Open questions
Should image tools (smart edit, outpaint, etc.) also expose quality, or always use the default?
changed the title [-][feat] 图片生成:gpt-image 支持选择画质(quality)[/-][+][feat] image generation: let gpt-image requests choose a quality level[/+]on Nov 7, 2026
Activity
[-][feat] 图片生成:gpt-image 支持选择画质(quality)[/-][+][feat] image generation: let gpt-image requests choose a quality level[/+]leekaimao commentedon Nov 9, 2026
已提交实现 PR:#243。
支持 GPT Image 的 Auto / Low / Medium / High,UI 与 Agent 共用质量参数和后端校验。质量随项目保存,并固定到任务快照;覆盖重开、历史参数恢复及任务恢复。Auto 保持原请求行为,其他图片服务不发送该字段,独立图片工具继续使用原默认值。
本地前端与 Python 回归、构建、契约和双语检查均通过;中英文浏览器流程使用隔离模型服务,并验证实际 PNG 解码。未调用真实 OpenAI API,真实服务返回的 quality 是否与请求匹配仍未验收。详细验证范围见 PR 描述。
[chore] repo: merge main into GPT Image quality branch
[chore] repo: merge latest main into GPT Image quality branch
[feat] providers: add GPT Image quality selection (#243)