hermes - 💡(How to fix) Fix openai-codex gpt-image-2 drifts on Chinese named-character prompts vs ChatGPT UI [1 participants]

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…
GitHub stats
NousResearch/hermes-agent#15138Fetched 2026-04-25 06:24:23
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

openai-codex image generation is correctly routing to gpt-image-2, but for well-known character prompts (especially non-English / Chinese named entities) the output can drift into an unrelated original character, while the same prompt works as expected in the ChatGPT web UI.

This looks like a behavior gap between the Hermes openai-codex Responses image-generation path and the ChatGPT UI path, rather than a local config problem.

Root Cause

  • #14317 added the openai-codex backend.
  • #14819 seems relevant because it adds per-call output controls and changes the default Codex tier to gpt-image-2-auto.

Code Example

image_gen config: {'provider': 'openai-codex'}
provider: openai-codex
display: OpenAI (Codex auth)
available: True
default_model: gpt-image-2-medium
models: ['gpt-image-2-low', 'gpt-image-2-medium', 'gpt-image-2-high']

---

API_MODEL = "gpt-image-2"
_CODEX_CHAT_MODEL = "gpt-5.4"

---

生成一张名侦探柯南里灰原哀的角色设定图

---

{
  "success": true,
  "model": "gpt-image-2-medium",
  "prompt": "生成一张名侦探柯南里灰原哀的角色设定图",
  "aspect_ratio": "landscape",
  "provider": "openai-codex",
  "size": "1536x1024",
  "quality": "medium"
}

---

灰原哀的角色设定图
RAW_BUFFERClick to expand / collapse

Summary

openai-codex image generation is correctly routing to gpt-image-2, but for well-known character prompts (especially non-English / Chinese named entities) the output can drift into an unrelated original character, while the same prompt works as expected in the ChatGPT web UI.

This looks like a behavior gap between the Hermes openai-codex Responses image-generation path and the ChatGPT UI path, rather than a local config problem.

Environment

  • Hermes Agent: v0.11.0 (2026.4.23)
  • Provider: openai-codex
  • Image model/tier returned by Hermes: gpt-image-2-medium
  • Codex auth: available
  • image_gen.provider: openai-codex
  • Output size returned: 1536x1024
  • Quality returned: medium

Provider verification:

image_gen config: {'provider': 'openai-codex'}
provider: openai-codex
display: OpenAI (Codex auth)
available: True
default_model: gpt-image-2-medium
models: ['gpt-image-2-low', 'gpt-image-2-medium', 'gpt-image-2-high']

The plugin code also confirms the image tool model is gpt-image-2:

API_MODEL = "gpt-image-2"
_CODEX_CHAT_MODEL = "gpt-5.4"

Reproduction

Ask Hermes to generate an image using the openai-codex image backend with this exact Chinese prompt:

生成一张名侦探柯南里灰原哀的角色设定图

Observed tool result:

{
  "success": true,
  "model": "gpt-image-2-medium",
  "prompt": "生成一张名侦探柯南里灰原哀的角色设定图",
  "aspect_ratio": "landscape",
  "provider": "openai-codex",
  "size": "1536x1024",
  "quality": "medium"
}

Expected behavior

The output should depict Ai Haibara / 灰原哀 from Detective Conan, similar to what the ChatGPT web UI produces for the same prompt.

Actual behavior

The output does not resemble Ai Haibara. Instead, it looks like an unrelated original anime character sheet: a young adult / original “scientist/detective” style character, with generated fictional details such as a new name/organization, rather than the requested Detective Conan character.

In another run with:

灰原哀的角色设定图

Hermes generated an original character labeled roughly like “白川灯里 / Shirakawa Akari” with “Lucid Lab” style invented worldbuilding. This suggests the model/tool path may be treating the named character as inspiration rather than grounding it to the known entity.

Why this seems like a Hermes/openai-codex path issue

The same prompt reportedly works fine in the ChatGPT web UI, but fails through Hermes openai-codex.

The local Hermes config appears correct and is not falling back to FAL:

  • image_gen.provider=openai-codex
  • openai-codex is available
  • returned provider is openai-codex
  • returned model tier is gpt-image-2-medium

So this does not look like the earlier “provider not configured” issue or an accidental FAL route.

Possible cause / question

Maybe the ChatGPT UI applies additional prompt/entity rewriting or grounding before calling image generation, while the Hermes openai-codex plugin sends the user prompt directly through the Codex Responses image tool. This could make non-English famous-character/entity prompts behave worse than the web UI.

Questions:

  1. Is openai-codex expected to match ChatGPT web UI image behavior for named entities / non-English prompts?
  2. Would the pending gpt-image-2-auto / per-call output controls work in #14819 help align the behavior with ChatGPT UI defaults?
  3. Should the plugin use quality="auto" by default, or expose a closer-to-ChatGPT default path?
  4. Is there any known prompt rewriting / localization / entity grounding step missing from this Codex OAuth image path?

Related

  • #14317 added the openai-codex backend.
  • #14819 seems relevant because it adds per-call output controls and changes the default Codex tier to gpt-image-2-auto.

extent analysis

TL;DR

The issue might be resolved by modifying the prompt or utilizing additional features from the openai-codex provider to better handle non-English named entities.

Guidance

  1. Verify the openai-codex configuration: Ensure that the openai-codex provider is correctly configured and that the gpt-image-2-medium model is being used as intended.
  2. Test prompt modification: Attempt to modify the prompt to include additional context or information that might help the model better understand the request, such as including the character's full name or the series they are from.
  3. Investigate per-call output controls: Look into the pending gpt-image-2-auto feature and per-call output controls mentioned in #14819 to see if they can help align the behavior with ChatGPT UI defaults.
  4. Check for prompt rewriting or entity grounding: Research if there are any known prompt rewriting, localization, or entity grounding steps that are missing from the current Codex OAuth image path.

Example

No code snippet is provided as the issue seems to be related to the configuration and usage of the openai-codex provider rather than a specific code problem.

Notes

The issue might be specific to the interaction between the Hermes openai-codex plugin and the openai-codex provider, and resolving it may require further investigation into the provider's capabilities and limitations.

Recommendation

Apply workaround: Modify the prompt to include additional context and investigate the use of per-call output controls to better align the behavior with ChatGPT UI defaults. This approach may help improve the handling of non-English named entities without requiring significant changes to the underlying configuration.

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…

FAQ

Expected behavior

The output should depict Ai Haibara / 灰原哀 from Detective Conan, similar to what the ChatGPT web UI produces for the same prompt.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING