Bamboo Relay

Codex CLI

Use Bamboo Relay as a custom Responses provider in Codex CLI

Create a key in API keys and choose a Responses-compatible model in the model marketplace.

Configure the provider

Make the key available in the terminal that will launch Codex:

export BAMBOO_API_KEY="sk-your-api-key"

Merge these settings into ~/.codex/config.toml, preserving unrelated preferences:

model = "your-model-id"
model_provider = "bamboo"

[model_providers.bamboo]
name = "Bamboo Relay"
base_url = "https://api.bamboonode.cn/v1"
env_key = "BAMBOO_API_KEY"
wire_api = "responses"

Replace your-model-id with a model your key can access. env_key reads the secret from the launching process environment. Keep it out of the TOML file and Git.

Verify

Run codex from the same terminal. Start a new local task and ask for a short response without reading files or using tools. Check usage logs for a successful request using your model.

Codex uses the Responses protocol. A provider supporting only Chat Completions will not work. A missing environment variable causes authentication failure; restart Codex after updating its environment. For the desktop app, follow the desktop guide.

Official custom-provider configuration.

On this page