Configuring codex-plugin-cc to Use Custom Codex Endpoints or Base URLs
No, codex-plugin-cc does not define custom endpoints internally; instead, you configure the openai_base_url setting in the Codex CLI's config.toml file, and the plugin automatically delegates to that configuration.
The openai/codex-plugin-cc repository provides a code review plugin that integrates with OpenAI's Codex CLI. If you need to route requests through a custom Codex endpoint or base URL, you cannot set this directly in the plugin; instead, you must configure the underlying Codex CLI that the plugin invokes.
How codex-plugin-cc Delegates Networking
The plugin contains no native networking logic for contacting Codex services. In plugins/codex/scripts/lib/codex.mjs, the code initializes a CodexAppServerClient that simply invokes the local codex binary. This means all authentication, provider selection, and endpoint configuration happens inside the Codex CLI itself, not within the plugin's configuration scope.
Setting Up Custom Codex Endpoints
To redirect requests to a custom endpoint, create or edit a config.toml file at either the user level (~/.codex/config.toml) or project level (.codex/config.toml in your repository root). Add the openai_base_url key to override the default OpenAI API endpoint.
Create a project-level configuration file:
# .codex/config.toml
openai_base_url = "https://my.custom.codex.server/v1"
Once this file exists in your project, the plugin will automatically use the custom endpoint for all subsequent operations because it delegates every command to the CLI, which reads this configuration. The README explicitly confirms this at lines 320-321: "If you need to point the built-in OpenAI provider at a different endpoint, set openai_base_url in your Codex config."
Verifying the Custom Endpoint Configuration
After updating the configuration, verify that the plugin recognizes the custom endpoint by running the setup command:
/codex:setup
The output should indicate the custom endpoint is active. You can then execute reviews using:
/codex:review --background
The CLI will now route requests to https://my.custom.codex.server/v1 instead of the default OpenAI API URL.
Key Implementation Details
The following files govern how codex-plugin-cc handles custom endpoints:
plugins/codex/scripts/lib/codex.mjs– Creates theCodexAppServerClientinstance and demonstrates that the plugin delegates all operations to the local Codex CLI..codex/config.toml– The project-level configuration file whereopenai_base_urlis defined to override the default endpoint.README.md(lines 320-321) – Documents theopenai_base_urlsetting for pointing the built-in OpenAI provider at a different endpoint.
Summary
codex-plugin-ccdoes not contain internal networking code; it relies entirely on the locally installed Codex CLI.- Configure custom endpoints by setting
openai_base_urlin~/.codex/config.tomlor.codex/config.toml. - The plugin automatically picks up these settings because it delegates all requests through the CLI.
- No plugin-level configuration is required to use custom Codex endpoints.
Frequently Asked Questions
Can I set a custom endpoint directly in the codex-plugin-cc configuration?
No. The plugin has no configuration option for custom endpoints. According to the source code in plugins/codex/scripts/lib/codex.mjs, the plugin creates a CodexAppServerClient that invokes the local codex binary, delegating all endpoint configuration to the CLI's own config.toml file.
Where should I place the config.toml file for project-specific endpoints?
Create a .codex/config.toml file in your repository root. The Codex CLI checks for project-level configuration before falling back to the user-level ~/.codex/config.toml. Setting openai_base_url in the project-level file ensures all team members using the plugin will route requests to the same custom endpoint.
Does codex-plugin-cc support multiple provider endpoints simultaneously?
The plugin itself does not manage provider selection or multiple endpoints. Because it delegates to the Codex CLI, endpoint selection is determined by the CLI's configuration. You can switch endpoints by modifying the openai_base_url value in your config.toml, but the plugin will use whichever endpoint the CLI is currently configured to use.
Will changing the endpoint in config.toml affect other Codex CLI usage?
Yes. Since the openai_base_url setting is read by the Codex CLI itself, any changes will affect all Codex CLI operations on your machine (or within that project, if using project-level config), not just the plugin. This includes direct CLI usage outside of the plugin context.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →