Bamboo Relay

Codex desktop

Configure the Codex desktop app for local tasks through Bamboo Relay

This configuration applies to local Codex tasks using a custom API provider. It does not route ChatGPT web conversations or cloud tasks through Bamboo Relay.

Before changing settings

Create a Bamboo API key in API keys, select a Responses-compatible model in the model marketplace, and back up ~/.codex/config.toml and any existing authentication configuration. Merge the provider settings below rather than replacing unrelated preferences.

Custom-provider configuration

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"
supports_websockets = false

Replace the model placeholder. Make BAMBOO_API_KEY available to the process that launches the desktop app, using its supported environment/secret configuration. An export in an unrelated terminal does not change the environment of an already running desktop app. If your installation does not provide a reliable desktop environment setup, first verify the same provider with Codex CLI.

The official configuration documents env_key for custom providers. requires_openai_auth is a separate option for providers using OpenAI authentication; do not combine it with this environment-key setup. Never enter a Bamboo key in an OpenAI account sign-in form.

Restart and verify

Fully quit and restart the app, then create a new local task. Existing tasks may retain their original provider selection. Ask it to reply OK without reading files or using tools.

Open usage logs and confirm a new successful request with the selected model at the expected time. A visible answer alone does not prove which provider handled the request.

Troubleshooting

  • 401: Confirm the key is in the app process environment, enabled, and permitted to use the model and group.
  • 404 or protocol errors: The configured address must end in /v1, and the channel must serve /v1/responses.
  • Streaming failures: Check that the reverse proxy allows SSE without buffering or prematurely closing long requests.
  • Long-running tasks: Continuation, tool calls, and context compaction depend on the model and gateway supporting the corresponding Responses behavior.
  • Missing account features: Some cloud or account services require OpenAI sign-in and are separate from custom-provider local inference.

To revert, restore your saved provider settings and remove only the environment variable you added. Do not delete the entire ~/.codex directory.

Official custom-provider configuration, configuration reference, and authentication guide.

On this page