Skip to content

feat(image-gen): add Codex CLI backend for image generation#14046

Open
zychenzy wants to merge 1 commit into
NousResearch:mainfrom
zychenzy:feat/codex-cli-image-gen-provider
Open

feat(image-gen): add Codex CLI backend for image generation#14046
zychenzy wants to merge 1 commit into
NousResearch:mainfrom
zychenzy:feat/codex-cli-image-gen-provider

Conversation

@zychenzy

Copy link
Copy Markdown

Summary

Add a bundled codex-cli image generation backend so Hermes can use Codex CLI's built-in image generation through the user's local Codex/ChatGPT login.

What this changes

  • add plugins/image_gen/codex_cli backend
  • detect availability via codex login status
  • resolve CODEX_HOME from env, config, or default ~/.codex
  • run generation through codex exec --json --full-auto --enable image_generation
  • discover generated image files from thread output or newly created files
  • add focused provider tests for success/error paths and config/env handling

Sample config

image_gen:
  provider: codex-cli
  model: codex-cli-default
  codex_cli:
    codex_home: ~/.codex-hermes

Files touched

  • plugins/image_gen/codex_cli/__init__.py
  • plugins/image_gen/codex_cli/plugin.yaml
  • tests/plugins/image_gen/test_codex_cli_provider.py

Validation

  • pytest -q tests/plugins/image_gen tests/agent/test_image_gen_registry.py tests/hermes_cli/test_plugin_scanner_recursion.py tests/tools/test_image_generation.py tests/tools/test_image_generation_env.py
  • 126 passed

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins tool/vision Vision analysis and image generation labels Apr 22, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related to #14047 (Codex auth fallback in OpenAI provider) — different approach to #11195. This adds a standalone codex-cli provider; #14047 extends the OpenAI provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have tool/vision Vision analysis and image generation type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants