直接回答
这页说明团队如何使用 NextModel 的 OpenAI 兼容网关。 Register NextModel as a custom OpenAI-compatible model provider in Codex CLI. 这一页会补充接入步骤、配置重点和常见问题。
Provider config
Codex CLI reads providers from ~/.codex/config.toml. Declare NextModel as a custom provider, export the key it should read, and pick any catalog model id as the default model.
~/.codex/config.toml
model = "qwen/qwen3.7-max"
model_provider = "nextmodel"
[model_providers.nextmodel]
name = "NextModel"
base_url = "https://api.nextmodel.app/v1"
env_key = "NEXTMODEL_API_KEY"Shell
# export NEXTMODEL_API_KEY=<paste your NextModel key> once in your profile
codexVerify
One command proves the wiring before you start a session.
Verify
curl -s https://api.nextmodel.app/v1/models -H "Authorization: Bearer $NEXTMODEL_API_KEY" | head -c 300