# Use opencodex models in T3 Code through Claude Code

> Source: <https://gist.github.com/makeavish/986f2504dcf77175c60eb680ce6119f8>
> Published: 2026-08-13 16:18:47+00:00

T3 Code can list custom models under its Claude provider and still fail when you use one:

```
There's an issue with the selected model (gpt-5.6-sol).
It may not exist or you may not have access to it.
```

The model may be fine. T3 Code launches Claude Code through the Claude Agent SDK, so running `ocx claude`

in a terminal does not configure the Claude process that T3 starts. You need to pass the opencodex proxy settings through T3's Claude provider.

I verified this setup on macOS with T3 Code 0.0.33, Claude Code 2.1.229, and opencodex 2.14.1.

Claude Code, T3 Code, and opencodex should already be installed. Configure at least one model in opencodex, then check that the proxy is healthy:

```
ocx status
ocx health --json
```

Test your model outside T3 Code:

```
ocx claude \
  -p \
  --model gpt-5.6-sol \
  --output-format text \
  'Reply with exactly: OK'
```

Replace `gpt-5.6-sol`

with the route you configured. Fix opencodex first if this command fails.

Open **Settings → Providers → Claude**, expand the Claude provider, and add these environment variables:

| Variable | Value | Sensitive |
|---|---|---|
`ANTHROPIC_BASE_URL` |
`http://127.0.0.1:10100` |
No |
`CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY` |
`1` |
No |

If your opencodex proxy uses another port, change `10100`

to match it.

Keep **Binary path** set to the real Claude executable, usually `claude`

. Do not set it to `ocx`

: T3's Claude Agent SDK expects a Claude Code executable, while `ocx claude`

is a launcher that prepares the environment and then starts Claude.

In the same Claude provider settings, add the exact opencodex route to the custom model list if T3 does not already show it. For example:

```
gpt-5.6-sol
```

Quit T3 Code completely with **Cmd+Q**, then reopen it. T3 does not add changed provider variables to a Claude process that is already running.

Create a new thread, select the custom model under the Claude provider, and send a small test prompt:

```
Reply with exactly: OK
```

`ocx claude`

normally launches Claude Code with `ANTHROPIC_BASE_URL`

pointed at the local proxy and enables gateway model discovery. T3 Code starts Claude itself, but its provider settings let you pass the same variables to the Claude child process.

Without `ANTHROPIC_BASE_URL`

, Claude sends the request to Anthropic. Anthropic does not know an opencodex route such as `gpt-5.6-sol`

, so T3 shows the misleading model-access error. With the proxy URL set, Claude sends the request to opencodex, which resolves the route and calls the configured provider.

Quit T3 Code with **Cmd+Q** and reopen it. Starting a new thread is not enough if T3 is reusing the old Claude provider process.

Then confirm the proxy is still running:

```
ocx status
ocx health --json
```

Check the Claude provider's environment-variable names and the proxy port. Keep the binary path set to `claude`

.

`127.0.0.1`

means the device running the Claude process. Run opencodex on that device and configure the Claude provider for that T3 environment. A proxy running only on your Mac is not available at `127.0.0.1`

from another machine.

Do not copy an API key into T3 unless your opencodex configuration requires one. Follow opencodex's current authentication guidance for `ANTHROPIC_AUTH_TOKEN`

; setting it unnecessarily can disable the existing Claude subscription login and connectors.
