hermes - 💡(How to fix) Fix image_generate and image_edit should support per-call quality, size, and count overrides

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

If a provider does not support a specific override, it should either ignore it safely or return a structured provider capability error.

Root Cause

Image generation workflows often need different output settings per request:

  • quick low-quality drafts vs high-quality final images
  • one-off exact dimensions for social, hero, portrait, or wide assets
  • multiple candidates in a single request when exploring visual directions
  • image edit requests that should preserve the same quality/size controls as generation

Global config is still useful as a default, but it is too coarse for agent-driven creative workflows.

Fix Action

Fix / Workaround

Local Downstream Patch Shape

A downstream local patch validated this approach for the OpenAI Codex image provider:

RAW_BUFFERClick to expand / collapse

Feature Description

image_generate / image_edit should support per-call image output controls such as quality, size, and output count (n) instead of forcing users to rely only on global image provider config.

Why this matters

Image generation workflows often need different output settings per request:

  • quick low-quality drafts vs high-quality final images
  • one-off exact dimensions for social, hero, portrait, or wide assets
  • multiple candidates in a single request when exploring visual directions
  • image edit requests that should preserve the same quality/size controls as generation

Global config is still useful as a default, but it is too coarse for agent-driven creative workflows.

Proposed Behavior

Add optional schema fields to image tools:

  • quality: provider-supported quality tier, e.g. low, medium, high
  • size: provider-supported explicit size or safe shortcut, e.g. 1024x1024, 1536x1024, portrait, landscape, wide, etc.
  • n: number of output images/candidates, clamped to a small safe range

If a field is omitted, existing global provider config should continue to apply.

If a provider does not support a specific override, it should either ignore it safely or return a structured provider capability error.

Local Downstream Patch Shape

A downstream local patch validated this approach for the OpenAI Codex image provider:

  • Tool schemas for both image_generate and image_edit accept optional quality, size, and n.
  • Provider defaults remain backward-compatible when fields are omitted.
  • quality is constrained to known values.
  • size supports safe shortcuts and validates literal dimensions before forwarding.
  • n is clamped to a small maximum to avoid accidental runaway cost/latency.
  • Multi-image responses preserve the existing image field while adding an images list.

Backward Compatibility

This can be fully backward-compatible:

  • Existing calls without the new fields behave exactly as before.
  • Existing provider config remains the default source of truth.
  • New fields are optional.
  • Providers can adopt support incrementally.

Suggested Tests

  • schema exposes optional quality, size, and n
  • default generation request remains unchanged when overrides are omitted
  • explicit overrides reach the provider payload
  • invalid size falls back safely
  • n is clamped
  • multi-image response includes both backward-compatible image and new images

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix image_generate and image_edit should support per-call quality, size, and count overrides