Codex desktop setup
Account login and inference are separate
Section titled “Account login and inference are separate”A WuDi key authenticates requests to WuDi. It is not an OpenAI password and does not guarantee acceptance by the app’s OpenAI API Key login. Use the client’s supported login method, then confirm whether the installed version supports custom providers. Otherwise, use Codex CLI.
1. Open user configuration
Section titled “1. Open user configuration”Where available, use Settings → Configuration → User config → Open config.toml. This illustration identifies the setting; menus can vary by version.

2. Merge the provider
Section titled “2. Merge the provider”model = "gpt-5.6-sol"model_provider = "wudi"
[model_providers.wudi]name = "WuDi API"base_url = "https://wudiapi.com/v1"env_key = "WUDI_API_KEY"wire_api = "responses"requires_openai_auth = falseBack up the file first. If [model_providers.wudi] already exists, edit that table rather than adding it twice. Changing sandbox or approval policies does not solve API connectivity.
3. Make the key available to the desktop process
Section titled “3. Make the key available to the desktop process”A desktop process may not inherit terminal-only variables. On Windows, add a user environment variable named WUDI_API_KEY, fully exit the app, then reopen it. On other systems, use the environment mechanism appropriate to the installed application. Prefer an official credential interface if the client provides one.
Keep real keys out of public project configuration. A terminal reading a variable while the app cannot is a process-environment difference, not proof of an invalid key.
4. Verify a new session
Section titled “4. Verify a new session”Select the intended provider and model, send a short request, and confirm it in the usage log. Check project overrides, workspace settings and profiles if the previous provider remains selected. Valid configuration syntax does not verify every advanced feature.
Restore or troubleshoot
Section titled “Restore or troubleshoot”Restore the backup and restart to undo the change. Test /v1/responses when diagnosing protocol errors. If the configuration option is missing, check the installed version rather than downloading an untrusted modified client.
Reference: official configuration reference.
