# Configuring codex-plugin-cc to Use Custom Codex Endpoints or Base URLs

> Learn how to configure codex-plugin-cc with custom Codex endpoints or base URLs using the openai_base_url setting in config.toml. Integrate your services seamlessly.

- Repository: [OpenAI/codex-plugin-cc](https://github.com/openai/codex-plugin-cc)
- Tags: how-to-guide
- Published: 2026-07-07

---

**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`](https://github.com/openai/codex-plugin-cc/blob/main/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`](https://github.com/openai/codex-plugin-cc/blob/main/config.toml) file at either the user level (`~/.codex/config.toml`) or project level ([`.codex/config.toml`](https://github.com/openai/codex-plugin-cc/blob/main/.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:

```toml

# .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:

```bash
/codex:setup

```

The output should indicate the custom endpoint is active. You can then execute reviews using:

```bash
/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 the `CodexAppServerClient` instance and demonstrates that the plugin delegates all operations to the local Codex CLI.
- **[`.codex/config.toml`](https://github.com/openai/codex-plugin-cc/blob/main/.codex/config.toml)** – The project-level configuration file where `openai_base_url` is defined to override the default endpoint.
- **[`README.md`](https://github.com/openai/codex-plugin-cc/blob/main/README.md)** (lines 320-321) – Documents the `openai_base_url` setting for pointing the built-in OpenAI provider at a different endpoint.

## Summary

- `codex-plugin-cc` does not contain internal networking code; it relies entirely on the locally installed Codex CLI.
- Configure custom endpoints by setting `openai_base_url` in `~/.codex/config.toml` or [`.codex/config.toml`](https://github.com/openai/codex-plugin-cc/blob/main/.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`](https://github.com/openai/codex-plugin-cc/blob/main/config.toml) file.

### Where should I place the config.toml file for project-specific endpoints?

Create a [`.codex/config.toml`](https://github.com/openai/codex-plugin-cc/blob/main/.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`](https://github.com/openai/codex-plugin-cc/blob/main/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.