# Keep Using OpenAI Models in Cursor After November 12

> Use CLIProxyAPI and Cloudflare Tunnel to keep OpenAI models in Cursor after the proposed November 12, 2026 cutoff, with setup and security caveats.

- Author: Kai Wang (AI Kai)
- Published: 2026-08-31
- Updated: 2026-08-31
- Topic: AI Dev Tools
- Tags: cursor, openai, cliproxyapi, cloudflare-tunnel, ai-dev-tools
- Canonical: https://hqman.me/blog/use-openai-models-in-cursor-after-november-12/

OpenAI models in Cursor do not have to depend on Cursor's direct OpenAI contract. CLIProxyAPI can expose the models available through your Codex sign-in as an OpenAI-compatible endpoint, and Cursor can send requests to that endpoint through its custom Base URL setting.

I tested this route and got it working before the cutoff. It gives Cursor users a fallback if OpenAI ends direct model access on the proposed November 12, 2026 date.

OpenAI has not endorsed this setup. CLIProxyAPI is a third-party open-source project, so treat it as a workaround that may break when Cursor, OpenAI, or the proxy changes its authentication and request formats.

## What changes on November 12

OpenAI says it intends to wind down the contract that provides its models to Cursor after SpaceX acquired the coding tool. The announcement calls November 12, 2026 a proposed shutoff date.

The decision concerns Cursor's direct model agreement. It does not say that OpenAI will shut down its API, Codex, or every custom endpoint that Cursor can call. I covered the contract change and the responses from Cursor and Anthropic in [this earlier breakdown](https://hqman.me/blog/cursor-openai-anthropic-spacex-model-access/).

The workaround uses a separate route:

1. CLIProxyAPI signs in to Codex through OAuth.
2. It serves an OpenAI-compatible API on your machine.
3. Cloudflare Tunnel gives that local service a public HTTPS URL.
4. Cursor sends GPT requests to the tunnel through its OpenAI Base URL override.

## 1. Install CLIProxyAPI

On macOS, install it with Homebrew:

```bash
brew install cliproxyapi
```

Sign in to Codex:

```bash
cliproxyapi --codex-login
```

The command opens an OpenAI login page. CLIProxyAPI stores the OAuth credential in its authentication directory after you finish the flow.

Open the Homebrew configuration file at `$(brew --prefix)/etc/cliproxyapi.conf`. Keep the service bound to localhost, leave remote management disabled, and replace the sample API keys with a long random secret:

```yaml
host: "127.0.0.1"
port: 8317

remote-management:
  allow-remote: false
  secret-key: ""

auth-dir: "~/.cli-proxy-api"

api-keys:
  - "replace-this-with-a-long-random-secret"
```

Start the service:

```bash
brew services start cliproxyapi
```

Check that the model endpoint responds before adding a tunnel:

```bash
curl http://127.0.0.1:8317/v1/models \
  -H "Authorization: Bearer replace-this-with-a-long-random-secret"
```

Linux and Windows users can follow the install options in the CLIProxyAPI quick-start guide. The configuration and Cursor steps stay the same.

## 2. Give Cursor an HTTPS endpoint

Cursor cannot reach a service bound to `127.0.0.1` from its server-side model path. A Cloudflare Quick Tunnel can expose the local proxy for testing:

```bash
brew install cloudflared
cloudflared tunnel --url http://127.0.0.1:8317
```

Cloudflare prints a random URL such as:

```text
https://random-words.trycloudflare.com
```

Keep the terminal process running. The URL stops working when the process exits and changes when you start a new Quick Tunnel.

Quick Tunnels are public and Cloudflare describes them as a development and testing feature. Your CLIProxyAPI key protects the model endpoint, so use a strong key and do not share the URL and key together. Use a named Cloudflare Tunnel with your own hostname if you need a stable endpoint.

## 3. Connect Cursor

Open `Cursor Settings > Models > OpenAI`, then:

1. Enable the OpenAI API key option.
2. Paste the API key from your CLIProxyAPI configuration.
3. Enable `Override OpenAI Base URL`.
4. Enter your tunnel URL with `/v1` at the end, such as `https://random-words.trycloudflare.com/v1`.
5. Select the GPT model you want to use and run a small test prompt.

Cursor's support forum says custom API keys and Base URL overrides require a Pro plan. Cursor also has a known routing issue where the OpenAI Base URL override can affect built-in models from other providers. Disable the override before switching back to Composer, Claude, Grok, or another Cursor-hosted model if requests start failing.

## A cleaner option if you do not need ChatGPT subscription usage

Cursor supports official OpenAI API keys for standard chat models. You can enter an API key from the OpenAI platform and keep the default OpenAI Base URL. OpenAI bills that usage through your API account, separate from a ChatGPT subscription.

That route removes CLIProxyAPI and Cloudflare Tunnel from the chain. Use it when you value stability over reusing the model access attached to your Codex sign-in.

## Limits to understand before relying on this

- November 12 remains a proposed cutoff date. OpenAI and Cursor could reach a different agreement.
- CLIProxyAPI is not an OpenAI or Cursor product. An OpenAI employee sharing a project does not make OpenAI support the integration.
- Cursor says custom keys work with standard chat models. Features that depend on Cursor's specialized models can still use Cursor's own infrastructure.
- A proxy can change request behavior, available models, or reasoning settings. Test it on a real task before making it your default.
- Check the terms and account rules that apply to your OpenAI plan. OAuth access through a third-party proxy can change without notice.

The setup gives you a working fallback today. Keep the official API-key route ready if you need a more stable option after November 12.

## Sources

- [OpenAI's decision on Cursor following the SpaceX acquisition](https://openai.com/index/our-decision-on-cursor-following-its-acquisition-by-spacex/)
- [CLIProxyAPI repository](https://github.com/router-for-me/CLIProxyAPI)
- [CLIProxyAPI quick start](https://help.router-for.me/introduction/quick-start)
- [CLIProxyAPI Codex OAuth setup](https://help.router-for.me/configuration/provider/codex)
- [Cursor API key documentation](https://cursor.com/docs/settings/api-keys)
- [Cursor support on custom model access and Pro plans](https://forum.cursor.com/t/custom-model-is-not-working/149384)
- [Cloudflare Quick Tunnel documentation](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/do-more-with-tunnels/trycloudflare/)
