mirror of
https://github.com/JimLiu/baoyu-skills.git
synced 2026-07-13 22:29:48 +08:00
c3cbce9ce3
BREAKING CHANGE: removed `baoyu-imagine` and `baoyu-image-cards`. All functionality now lives under `baoyu-image-gen` and `baoyu-xhs-images` respectively. Cross-skill `## Image Generation Tools` examples updated across baoyu-article-illustrator, baoyu-comic, baoyu-cover-image, baoyu-infographic, and baoyu-slide-deck. Migration: existing `~/.baoyu-skills/baoyu-imagine/EXTEND.md` configs are auto-renamed to `…/baoyu-image-gen/EXTEND.md` on first run via the legacy-path resolver in `scripts/main.ts`.
1.8 KiB
1.8 KiB
name, description
| name | description |
|---|---|
| codex-image2-fallback | Fallback behavior when baoyu-image-gen lacks OpenAI API credentials but Codex/native image generation is available |
Codex Image2 Fallback
When using baoyu-image-gen with --provider openai --model gpt-image-2, the CLI can fail with:
OPENAI_API_KEY is required. Codex/ChatGPT desktop login does not automatically grant OpenAI Images API access to this script.
This is expected. The openai provider uses the public OpenAI Images API and needs OPENAI_API_KEY. Codex / ChatGPT image2 entitlement is a separate runtime-native path.
Practical fallback pattern
- Try
baoyu-image-genwhen provider credentials are available. - If it fails only because
OPENAI_API_KEYis missing, do not leave the user waiting. - Prefer a Codex/native raster backend in this order:
- Codex runtime native
imagegenskill/tool, if available. - Repo-level
scripts/codex-imagegen.sh, ifcodexCLI is installed/logged in and the calling skill supports the wrapper. - Hermes native
image_generate, if available.
- Codex runtime native
- Be transparent about reference-image behavior:
- If the fallback backend accepts references, pass the reference images.
- If it does not, derive a concise identity-preserving prompt from the references and state that it is a text-description fallback, not strict reference-image editing.
- Return the generated media path or structured backend error promptly.
User-facing wording
Use concise wording such as:
The OpenAI API path needs
OPENAI_API_KEY; Codex login is a separate image2 backend. I used the available Codex/native image backend instead. Reference images were [passed directly / reconstructed from visual traits].
Avoid implying that baoyu-image-gen --provider openai can use Codex OAuth without a dedicated provider implementation.