Skip to content

Built-in image generation returns 404 through OpenCodex gateway #28

Description

@testerggf

Summary

Built-in image generation fails with HTTP 404 when Codex is routed through the OpenCodex gateway.

The same user request worked previously, but now a simple request such as “generate a cute cat” fails before an image is produced.

Environment

  • OpenCodex.app: 1.1.0
  • Gateway health: CodexBridge Engine V2, version 1.1.0
  • Codex model: gpt-5.6-luna
  • Managed base URL: http://127.0.0.1:25777/v1
  • macOS desktop installation

Reproduction

  1. Enable/use the OpenCodex-managed Codex provider.
  2. In Codex Desktop, invoke the built-in image generation tool with a minimal prompt, for example:
    Generate one adorable, fluffy kitten.
    
  3. Observe:
    image generation failed: http 404 Not Found
    {"error":"Endpoint not found"}
    

The same response can be reproduced locally without invoking a real image model:

curl --noproxy '*' -i -X POST \
  http://127.0.0.1:25777/v1/images/generations \
  -H 'Content-Type: application/json' \
  --data '{}'

Response:

HTTP/1.1 404 Not Found
{"error":"Endpoint not found"}

Evidence

  • The active Codex configuration routes requests through the local gateway at http://127.0.0.1:25777/v1.
  • The installed gateway returns {"error":"Endpoint not found"} for unmatched routes.
  • The installed bundle contains a native image bridge, but it sends image requests to https://chatgpt.com/backend-api/codex/responses.
  • The bridge is only reached from the internal /v1/responses flow after the provider emits the internal opencodex_generate_image tool call.
  • There is no /v1/images/generations route in the gateway.

Relevant installed bundle locations:

  • Contents/Resources/dist/server/gateway.js: fallback 404 route
  • Contents/Resources/dist/server/router.js: internal image-tool handling
  • Contents/Resources/dist/services/native_image_bridge.js: native image bridge

Expected behavior

Built-in image generation should either:

  1. be forwarded through the existing native /v1/responses image bridge, or
  2. expose a compatible POST /v1/images/generations route that translates the request to the native bridge.

Actual behavior

The built-in image-generation request reaches the local OpenCodex gateway, hits an unimplemented image endpoint, and fails with 404 before any image is generated.

This looks like a routing/compatibility regression introduced by the managed gateway path rather than a prompt, model quota, or API-key problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions