Skip to content

Add Codex image generation outside Bedrock#2

Open
ex3ndr wants to merge 1 commit into
mainfrom
fix/codex-image-generation
Open

Add Codex image generation outside Bedrock#2
ex3ndr wants to merge 1 commit into
mainfrom
fix/codex-image-generation

Conversation

@ex3ndr

@ex3ndr ex3ndr commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an upstream-compatible image_gen tool backed by the Codex images endpoint
  • expose it only when the selected provider supplies image-generation capability, leaving AWS Bedrock unchanged
  • persist successful PNG output and return image content to the model; propagate API and empty-output failures safely

Upstream reference

Matches openai/codex rust-v0.144.3 (78ad6e6), especially provider capability gating in model-provider/src/provider.rs / amazon_bedrock/mod.rs and request/output handling in ext/image-generation/src/tool.rs.

Verification

  • pnpm --filter @slopus/rig exec vitest run --isolate=false sources/runtime/createCodingAssistantAgent.test.ts sources/providers/codex.test.ts sources/tools/codex/image_gen.test.ts sources/providers/routeProviderThroughGym.test.ts (27 passed)
  • pnpm --filter @slopus/rig check
  • pnpm --filter @slopus/rig build
  • pnpm lint
  • touched-file oxfmt --check

Happy2 needs no source change: it delegates provider and tool construction to @slopus/rig.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants