codex --version
~/.codex/config.toml, and on Windows, it is $HOME\\.codex\\config.toml. If the file does not exist, create the .codex directory and the config.toml file first.config.toml file. If other configurations already exist in the file, add the following configuration to the beginning of the file.model_provider = "tencent-cloud-cmr"model = "ModelRouter/auto"disable_response_storage = true[model_providers.tencent-cloud-cmr]name = "Tencent Cloud CMR"base_url = "https://<user domain>/v1"env_key = "CMR_API_KEY"wire_api = "responses"
Configuration Item | Description |
model_provider | Specifies the custom model provider used by Codex. The value must be consistent with the name in [model_providers.tencent-cloud-cmr]. |
model | Specifies the model called by Codex. ModelRouter/auto indicates that an available model is selected based on the L1 CMR policy. You can also enter a model name or intent route name associated with the instance. |
disable_response_storage | Prohibits upstream services from storing response data. |
name | Specifies the model name displayed externally in the client. |
base_url | Enter the CMR instance domain name and append /v1 at the end. Codex automatically requests /v1/responses. |
env_key | Specifies the name of the environment variable that stores the CMR API Key. |
wire_api | The API protocol used by Codex. Enter responses as the fixed value. |
config.toml.CMR_API_KEY environment variable according to your operating system.launchctl setenv CMR_API_KEY "<USER_API_KEY>"
setx CMR_API_KEY "<USER_API_KEY>"
echo %CMR_API_KEY%
[Environment]::SetEnvironmentVariable("CMR_API_KEY", "USER_API_KEY", [EnvironmentVariableTarget]::User)
echo $env:CMR_API_KEY
config.toml file and environment variables to take effect. Tencent Cloud CMR is displayed in the lower-right corner of the client, matching the configured model name.base_url the CMR instance domain and does it end with /v1?CMR_API_KEY taken effect in the Codex process environment?model a model name or intent route name available for the current instance?Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback