Codex 接入 / Codex API gateway
Codex CLI 接入 Routin:config.toml 与 Responses API
Codex CLI on Routin: config.toml and the Responses API
OpenAI Codex CLI 通过自定义 model_provider 走 Routin。Base URL 使用 OpenAI 兼容地址,wire_api 设为 responses。
Point the OpenAI Codex CLI at Routin with a custom model_provider. Use the OpenAI-compatible base URL and set wire_api to responses.
接入要点 / Setup facts
- 协议 / Protocol: OpenAI Responses API
- Base URL:
https://api.routin.ai/v1 - base_url = "https://api.routin.ai/v1",env_key 读取 OPENAI_API_KEY(值为 Routin API Key)。 / Set base_url to https://api.routin.ai/v1 and env_key to OPENAI_API_KEY (the value is a Routin API key).
- wire_api = "responses"。Codex 默认走 Responses API,不是 Chat Completions。 / wire_api = "responses". Codex uses the Responses API, not Chat Completions.
- model 必须写在文件顶部,且是 Routin 目录中的模型 id。 / Keep model at the top of config.toml and use a Routin catalog model id.