Yaha AI Gateway
Integrations

Codex CLI

Integrate OpenAI Codex CLI with Yaha Gateway.

OpenAI Codex CLI uses the OpenAI Responses API (wire_api = "responses"). Yaha supports /v1/responses and the same Responses ↔ chat bridging used for Cursor BYOK.

Disable OAuth first

Codex prefers OAuth by default. Force API-key mode:

  1. Run /logout in the Codex CLI.
  2. Set preferred_auth_method = "apikey" in ~/.codex/config.toml.

Configuration

~/.codex/config.toml:

preferred_auth_method = "apikey"

openai_base_url = "https://gateway.yahagateway.io/v1"

Environment (session or .env in project root):

export OPENAI_API_KEY="yaha.<your-project-key>"

Custom provider block (alternative)

model = "gpt-5.2"
model_provider = "nova"

[model_providers.nova]
name = "Yaha AI Gateway"
base_url = "https://gateway.yahagateway.io/v1"
env_key = "OPENAI_API_KEY"
wire_api = "responses"

Notes

  • Base URL must include /v1.
  • Route OpenAI models to an openai upstream provider key on the project.
  • Yaha normalizes Responses payloads for upstream OpenAI (same layer as Cursor BYOK).

See also

On this page