---
title: "CLIProxyAPI: Run GPT-5.6 Sol in Claude Code"
canonical: https://wavect.io/blog/claude-code-gpt-5-6-sol-cliproxyapi/
language: en
description: "Run GPT-5.6 Sol in Claude Code with CLIProxyAPI. Secure macOS setup, fixed Claudex alias, model checks, token settings and troubleshooting."
image: "https://wavect.io/img/blog/headers/header_claude-code-gpt-5-6-sol-cliproxyapi.png"
---

[**Back**](/blog/overview/)

[![Kevin Riedl](/img/team/kevin.webp)](/team/kevin-riedl/)

[Kevin Riedl](/team/kevin-riedl/) https://linkedin.com/in/wsdt

11 min read · 26 Jul 2026 Last reviewed August 7, 2026

[**Next**](/blog/claude-code-vs-opencode-team-cost-2026/)

# How to Run GPT-5.6 Sol in Claude Code with CLIProxyAPI

TL;DR

Claudex is an unofficial setup that keeps the Claude Code CLI and agent harness while CLIProxyAPI translates its Anthropic-format requests and routes them to OpenAI's GPT-5.6 Sol. The viral alias is incomplete unless it also sets ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN. On macOS, install CLIProxyAPI with Homebrew, bind it to 127.0.0.1, create a strong client API key, complete the Codex OAuth login, verify that /v1/models exposes gpt-5.6-sol, then launch Claude Code through a scoped claudex alias. Use ENABLE_TOOL_SEARCH=auto:5 or true when the proxy supports tool_reference; false loads all tool definitions into context. Treat CLAUDE_CODE_ALWAYS_ENABLE_EFFORT as an undocumented compatibility flag, not a stable requirement. This route is useful for individual experiments and reversible model comparisons, but it is not supported by Anthropic for non-Claude models and a local subscription proxy is not a production team gateway.

**Yes, CLIProxyAPI can route Claude Code's Anthropic-compatible requests to GPT-5.6 Sol through a local gateway.** Claude Code remains the agent harness that reads the repository, plans work, calls tools, and coordinates subagents. CLIProxyAPI translates the request and sends it to OpenAI through your Codex login. The community calls this combination **Claudex**, but Anthropic does not support using non-Claude models in Claude Code.

The popular four-line alias is not the setup. It only selects a model after the gateway is already installed, authenticated and connected. Without `ANTHROPIC_BASE_URL` and `ANTHROPIC_AUTH_TOKEN`, plain Claude Code has no reason to send traffic to CLIProxyAPI.

This guide gives you the missing connection, a safer localhost configuration, a test at each boundary, and an alias you can remove without changing normal `claude` sessions. Facts and commands were re-checked on 7 August 2026 against the current CLIProxyAPI repository and provider documentation.

## What Claudex is, and what it is not

| Layer | What runs there | Who maintains it |
| --- | --- | --- |
| Agent harness | Claude Code CLI, tools, permissions, memory and subagents | Anthropic |
| Protocol bridge | CLIProxyAPI on your machine, usually port 8317 | Independent open-source project |
| Model | `gpt-5.6-sol` | OpenAI |
| Authentication | Codex OAuth stored locally by the proxy, plus your own proxy client key | You |

CLIProxyAPI describes itself as an API service compatible with OpenAI, Gemini, Claude and Codex protocols. Its [source code is available on GitHub](https://github.com/router-for-me/CLIProxyAPI), but it is not an Anthropic or OpenAI product. Anthropic's gateway documentation says compatible gateways can connect to Claude Code, while also stating that Anthropic does not support routing Claude Code to non-Claude models. That distinction matters: the mechanism is possible, but this exact model pairing is unsupported by Anthropic.

This article targets implementation intent. If you are deciding between products, use our separate [Claude Code vs OpenCode team-cost comparison](/blog/claude-code-vs-opencode-team-cost-2026/). If you are choosing a production gateway, use the [LLM gateway comparison](/blog/llm-gateway-router-comparison-2026/). Keeping those questions separate prevents a setup tutorial from pretending to be a procurement framework.

## The two-minute claim, honestly

If Homebrew, Claude Code and an eligible Codex account are ready, the happy-path commands take a few minutes. The first secure setup can take longer because you should inspect the config, generate a client key, finish browser OAuth and verify the model list. Do not trade those checks for a faster screenshot.

## Step 1: install and start CLIProxyAPI on macOS

```
brew install cliproxyapi
brew services start cliproxyapi
```

These are the current commands in the [CLIProxyAPI quick start](https://help.router-for.me/introduction/quick-start). Homebrew normally uses `$(brew --prefix)/etc/cliproxyapi.conf`. Check the active path before editing a different copy.

## Step 2: bind the proxy to localhost and set a real client key

The project's example config uses an empty `host`, which binds all IPv4 and IPv6 interfaces. For a personal local proxy holding OAuth credentials, restrict it to `127.0.0.1`. Set a random client key under `api-keys` and leave remote management off:

```
host: "127.0.0.1"
port: 8317

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

api-keys:
  - "claudex-REPLACE-WITH-A-LONG-RANDOM-SECRET"
```

Generate the value locally with `openssl rand -hex 32`, place the result after a memorable prefix and do not paste it into a repository, issue or screenshot. The [official configuration reference](https://help.router-for.me/configuration/basic) documents the listen address, port, authentication directory and API-key list.

```
brew services restart cliproxyapi
```

## Step 3: connect your Codex account

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

A browser opens for OpenAI authentication. On a headless machine, the project's [Codex OAuth guide](https://help.router-for.me/configuration/provider/codex) documents `--no-browser` and a local callback on port 1455. Use the OpenAI workspace whose Codex allowance you intend to consume.

OAuth credentials are sensitive. CLIProxyAPI stores authentication material under its configured auth directory, commonly `~/.cli-proxy-api`. Keep that directory out of source control, protect the machine account and update the proxy promptly. Before using any subscription through a third-party client, check the current plan rules and provider terms yourself.

## Step 4: verify the proxy before opening Claude Code

Replace the placeholder with the client key you configured:

```
curl -sS http://127.0.0.1:8317/v1/models \
  -H "Authorization: Bearer claudex-REPLACE-WITH-A-LONG-RANDOM-SECRET"
```

Do not continue until the JSON contains `gpt-5.6-sol`. OpenAI lists that exact model ID, a 1.05 million token context window, 128,000 maximum output tokens and reasoning levels from none through max on the [GPT-5.6 Sol model page](https://developers.openai.com/api/docs/models/gpt-5.6-sol). Account access can still vary by plan and rollout. OpenAI's current help page lists Codex CLI 0.144.0 as the minimum version for GPT-5.6 access.

If the endpoint returns 401, the client key and `api-keys` entry do not match. If the model is absent, update CLIProxyAPI, confirm the OAuth account and check that the model is available in native Codex first. An alias cannot create provider access.

## Step 5: add the complete Claudex alias

Add this to `~/.zshrc`, substitute your key, then open a new shell:

```
alias claudex='ANTHROPIC_BASE_URL=http://127.0.0.1:8317 \
ANTHROPIC_AUTH_TOKEN=claudex-REPLACE-WITH-A-LONG-RANDOM-SECRET \
CLAUDE_CODE_SUBAGENT_MODEL=gpt-5.6-sol \
CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY=3 \
ENABLE_TOOL_SEARCH=auto:5 \
claude --model gpt-5.6-sol'
```

Run `claudex`, send a trivial prompt, then run `/status`. Claude Code's [gateway connection guide](https://code.claude.com/docs/en/llm-gateway-connect) says the status view should show the custom Anthropic base URL and the active auth-token source. That proves the session inherited the gateway settings. Plain `claude` remains unchanged because the variables are scoped to the alias.

## Why this alias differs from the viral version

| Variable | Keep? | Reason |
| --- | --- | --- |
| `ANTHROPIC_BASE_URL` | Yes | Actually routes Claude Code to the local gateway. |
| `ANTHROPIC_AUTH_TOKEN` | Yes | Authenticates the client to your proxy. This is not your OpenAI OAuth token. |
| `CLAUDE_CODE_SUBAGENT_MODEL` | Usually | Official Claude Code docs give it first priority when selecting a subagent model. |
| `CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY=3` | Optional | Reduces the default concurrency of 10. Useful for rate limits, but potentially slower. |
| `ENABLE_TOOL_SEARCH=false` | No by default | Loads every tool definition into the context on every turn. |
| `CLAUDE_CODE_ALWAYS_ENABLE_EFFORT=1` | Experimental | It is not in Anthropic's public environment-variable reference. Do not build a stable team workflow around it. |

Claude Code's current [tool-search documentation](https://code.claude.com/docs/en/agent-sdk/tool-search) says tool search is on by default, but normally falls back to eager loading when `ANTHROPIC_BASE_URL` points to a third-party host. Setting `auto:5` explicitly enables deferred discovery when tool definitions exceed five percent of context. Use `true` to force it. Use `false` only when CLIProxyAPI rejects the required beta header or `tool_reference` blocks. A smaller prompt is useful only if the proxy supports the protocol feature.

## How to set reasoning effort without relying on a hidden flag

GPT-5.6 Sol supports `none`, `low`, `medium`, `high`, `xhigh` and `max`. CLIProxyAPI officially supports effort suffixes such as `gpt-5.6-sol(high)` and translates them to OpenAI reasoning parameters. Start with `medium` or `high`, then measure accepted-task cost. More reasoning can use more allowance, take longer and trigger more tool work.

```
claude --model 'gpt-5.6-sol(high)'
```

Before changing a team default, read our [cost per token vs cost per completed task analysis](/blog/cost-per-token-vs-cost-per-task/). The cheapest or deepest individual call is not automatically the cheapest accepted change.

## Does GPT-5.6 Sol become better because it runs in Claude Code?

The model does not change. The harness does.

Claude Code chooses what repository context to read, how to expose tools, when to delegate, how permissions work and how results return to the conversation. GPT-5.6 Sol supplies the decisions and generated output inside that loop. Developers may prefer the combination because they prefer Claude Code's orchestration, not because the proxy improves OpenAI's model weights.

OpenAI calls GPT-5.6 Sol its frontier model for complex professional work and coding. Claude Code documents subagents, worktrees, hooks, skills and model routing. Combining those capabilities can be productive, but anecdotes are not a controlled benchmark. Compare native Codex, native Claude Code and Claudex on the same repository commit, acceptance tests, effort, permissions and review bar. Our [Claude Fable coding playbook](/blog/coding-with-claude-fable-5/) covers the alternative where Claude remains the orchestrator and judgment model.

## Troubleshooting Claudex

### Claude Code still uses Claude

Run `/status`. If the base URL is absent, the alias was not loaded. Run `source ~/.zshrc` or open a new terminal. Check for a settings-file value overriding the shell variable.

### 401 Unauthorized

Match `ANTHROPIC_AUTH_TOKEN` to an entry under CLIProxyAPI's `api-keys`. It is a local client credential, not the Codex OAuth token stored by the proxy.

### Unknown provider or unknown model

Query `/v1/models` first. Use the exact returned ID. Update the proxy and re-run Codex OAuth if native Codex has the model but the proxy does not.

### Tool search returns a 400 error

Change `ENABLE_TOOL_SEARCH=auto:5` to `false`. That sacrifices context efficiency but avoids sending unsupported tool-reference shapes. Re-test after a CLIProxyAPI update.

### Compaction happens at the wrong time

Claude Code may infer context limits from the model name. Its environment reference documents `CLAUDE_CODE_MAX_CONTEXT_TOKENS`, but only when `DISABLE_COMPACT` is also set. Avoid disabling compaction casually. Monitor `/context`, clear unrelated work and verify behavior with a disposable session before changing context assumptions.

## When Claudex is the right choice

- You want a reversible personal comparison of the Claude Code and Codex harnesses.
- You already understand local OAuth storage and proxy maintenance.
- You can verify output with tests, diffs and human review.
- You accept that Anthropic does not support non-Claude models through the gateway.

## When not to use this setup

- You need vendor support for the full client-to-model path.
- You are handling customer code, regulated data or company secrets without approved data-flow and access controls.
- You need centralized revocation, audit logs, per-user attribution, budgets and an incident owner.
- Your team assumes a ChatGPT subscription proxy is equivalent to a production API contract.

For team use, move beyond a shell alias. Anthropic recommends a gateway credential per developer, centralized configuration and secrets tooling. Add version pinning, model allowlists, spend limits, logs with redaction, update ownership and a rollback path. If you need that operating model rather than a weekend experiment, Wavect's [AI enablement and architecture service](/services/ai-enablement/) can design the gateway, evaluation and governance layer with your team.

## Primary sources and freshness boundary

Checked on 7 August 2026. Model access, Claude Code flags and proxy behavior change quickly. Re-check the [OpenAI GPT-5.6 Sol model page](https://developers.openai.com/api/docs/models/gpt-5.6-sol), [OpenAI GPT-5.6 availability guidance](https://help.openai.com/en/articles/20001354-gpt-56-in-chatgpt/), [Claude Code gateway connection guide](https://code.claude.com/docs/en/llm-gateway-connect), [Claude Code environment-variable reference](https://code.claude.com/docs/en/env-vars), [CLIProxyAPI quick start](https://help.router-for.me/introduction/quick-start), [Codex OAuth guide](https://help.router-for.me/configuration/provider/codex) and [CLIProxyAPI effort translation](https://help.router-for.me/configuration/thinking) before relying on the commands.

## Frequently Asked Questions

### Can Claude Code run GPT-5.6 Sol?

Yes, through an Anthropic-compatible gateway such as CLIProxyAPI. Claude Code remains the client and agent harness, while the gateway translates requests and routes them to GPT-5.6 Sol. Anthropic does not support routing Claude Code to non-Claude models, so treat the combination as an unofficial integration.

### What is Claudex?

Claudex is a community nickname for Claude Code used as the coding-agent harness with an OpenAI GPT model underneath. It is not a product from Anthropic, OpenAI or the CLIProxyAPI project.

### Why does the viral Claudex alias not work by itself?

It selects gpt-5.6-sol but does not necessarily point Claude Code at CLIProxyAPI or authenticate to the proxy. A complete scoped alias needs ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN after the proxy is installed, configured and connected to Codex OAuth.

### Should ENABLE_TOOL_SEARCH be false?

Not by default. False loads every tool definition into the context. Use auto:5 or true when CLIProxyAPI supports the required beta header and tool_reference blocks. Fall back to false only if the proxy rejects those protocol features.

### Does CLIProxyAPI expose my computer to the network?

Its example configuration binds all interfaces when host is empty. For a local personal setup, set host to 127.0.0.1, use a strong client API key, keep remote management off and do not expose port 8317 through a router or public tunnel.

### Is Claudex suitable for a company?

A local alias is suitable for a controlled experiment, not a production operating model. A company needs approved provider terms, per-user credentials, centralized revocation, audit and redaction, budgets, model allowlists, updates, evals and an incident owner.

## Final thoughts

Claudex is useful because it separates two choices that developers often bundle together: the agent harness and the model. You can keep Claude Code's workflow and test GPT-5.6 Sol underneath it. But the proxy, credentials and protocol bridge become part of your system, so they deserve the same verification as any other developer infrastructure.

Install the proxy, bind it to localhost, authenticate Codex, verify the model endpoint, then use a scoped alias. Keep plain Claude Code untouched. Measure the result on accepted tasks, not impressions. If the experiment becomes a team dependency, replace the personal alias with an owned gateway and governance model.

## You may also like..

[**Claude Code vs OpenCode: Which Costs Less for a Team in 2026?** Compare token overhead, caching, subscriptions, enterprise controls and cost per accepted task before choosing a harness.](/blog/claude-code-vs-opencode-team-cost-2026/) [**AI enablement or a generic AI consultancy?** Compare an owned, measurable production setup with a strategy-only engagement.](/compare/ai-enablement-vs-generic-ai-consultancy/)

Agent engineering

## Continue through this cluster

Coding agents, MCP, context systems, evaluation and the controls required for dependable automation.

[Start with the cornerstone**Graph Engineering for AI Agents: When Does a Knowledge Graph Pay Off?**](/blog/graph-engineering-ai-agents/)

- [Cloudflare Kitesurf Review: Cost, Limits and Production Fit](/blog/cloudflare-kitesurf-browser-ai-agents/)
- [GitHub Spec Kit Review: Is It Worth the Process?](/blog/github-spec-kit-production-guide/)
- [Internal AI Agent Marketplace: A 2026 Enterprise Build Guide](/blog/internal-ai-agent-marketplace/)
- [Is Linux the Best OS for AI Agents? A 2026 Infrastructure Guide](/blog/linux-for-ai-agents/)
- [MCP Cloud vs Manufact Cloud: MCP Hosting Guide](/blog/mcp-cloud-vs-manufact-cloud/)

Inbox, without the noise

## Follow the work that matters to you

Get a short email when we publish something new. Follow the whole blog or only the problems you care about.

[**Back**](/blog/overview/)

[![Kevin Riedl](/img/team/kevin.webp)](/team/kevin-riedl/)

[Kevin Riedl](/team/kevin-riedl/) https://linkedin.com/in/wsdt

11 min read · 26 Jul 2026 Last reviewed August 7, 2026

[**Next**](/blog/claude-code-vs-opencode-team-cost-2026/)

New posts by email ×

×

Get new posts by email

A short email when we publish. Free, no tracking.

## Structured Data

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@id": "https://wavect.io/#organization",
      "@type": [
        "Organization",
        "ProfessionalService",
        "LocalBusiness"
      ],
      "employee": [
        {
          "@id": "https://wavect.io/team/kevin-riedl/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Kevin Riedl",
          "url": "https://wavect.io/team/kevin-riedl/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        },
        {
          "@id": "https://wavect.io/team/christof-jori/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Christof Jori",
          "url": "https://wavect.io/team/christof-jori/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        }
      ],
      "founder": [
        {
          "@id": "https://wavect.io/team/kevin-riedl/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Kevin Riedl",
          "url": "https://wavect.io/team/kevin-riedl/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        },
        {
          "@id": "https://wavect.io/team/christof-jori/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Christof Jori",
          "url": "https://wavect.io/team/christof-jori/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        }
      ],
      "legalRepresentative": [
        {
          "@id": "https://wavect.io/team/kevin-riedl/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Kevin Riedl",
          "url": "https://wavect.io/team/kevin-riedl/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        },
        {
          "@id": "https://wavect.io/team/christof-jori/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Christof Jori",
          "url": "https://wavect.io/team/christof-jori/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        }
      ],
      "name": "Wavect GmbH",
      "subjectOf": {
        "@id": "https://wavect.io/verified-claims.json#dataset",
        "@type": "Dataset",
        "creator": {
          "@id": "https://wavect.io/#organization",
          "@type": [
            "Organization",
            "ProfessionalService",
            "LocalBusiness"
          ]
        },
        "description": "A machine-readable registry of quantitative and qualitative claims published by Wavect, with review dates, localized page appearances and public third-party citations where available.",
        "inLanguage": "en",
        "isAccessibleForFree": true,
        "license": "https://creativecommons.org/licenses/by/4.0/",
        "name": "Wavect verified publication claims",
        "url": "https://wavect.io/verified-claims.json"
      },
      "url": "https://wavect.io/"
    },
    {
      "@id": "https://wavect.io/team/kevin-riedl/#person",
      "@type": "Person",
      "jobTitle": "Managing Director",
      "name": "Kevin Riedl",
      "sameAs": [
        "https://www.wikidata.org/wiki/Q139796365",
        "https://www.linkedin.com/in/wsdt",
        "https://github.com/wsdt"
      ],
      "url": "https://wavect.io/team/kevin-riedl/",
      "worksFor": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      }
    },
    {
      "@id": "https://wavect.io/team/christof-jori/#person",
      "@type": "Person",
      "jobTitle": "Managing Director",
      "name": "Christof Jori",
      "sameAs": [
        "https://www.wikidata.org/wiki/Q139796367",
        "https://www.linkedin.com/in/jocr77/",
        "https://github.com/jo-chris"
      ],
      "url": "https://wavect.io/team/christof-jori/",
      "worksFor": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      }
    },
    {
      "@id": "https://wavect.io/#website",
      "@type": "WebSite",
      "inLanguage": [
        "en",
        "de",
        "es",
        "zh"
      ],
      "name": "Wavect",
      "potentialAction": {
        "@type": "SearchAction",
        "query-input": "required name=search_term_string",
        "target": {
          "@type": "EntryPoint",
          "urlTemplate": "https://wavect.io/search/?q={search_term_string}"
        }
      },
      "publisher": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      },
      "url": "https://wavect.io/"
    },
    {
      "@id": "https://wavect.io/blog/claude-code-gpt-5-6-sol-cliproxyapi/#webpage",
      "@type": "WebPage",
      "dateModified": "2026-07-26",
      "inLanguage": "en",
      "isPartOf": {
        "@id": "https://wavect.io/#website",
        "@type": "WebSite"
      },
      "lastReviewed": "2026-07-26",
      "url": "https://wavect.io/blog/claude-code-gpt-5-6-sol-cliproxyapi/"
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "abstract": "Claudex is an unofficial setup that keeps the Claude Code CLI and agent harness while CLIProxyAPI translates its Anthropic-format requests and routes them to OpenAI's GPT-5.6 Sol. The viral alias is incomplete unless it also sets ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN. On macOS, install CLIProxyAPI with Homebrew, bind it to 127.0.0.1, create a strong client API key, complete the Codex OAuth login, verify that /v1/models exposes gpt-5.6-sol, then launch Claude Code through a scoped claudex alias. Use ENABLE_TOOL_SEARCH=auto:5 or true when the proxy supports tool_reference; false loads all tool definitions into context. Treat CLAUDE_CODE_ALWAYS_ENABLE_EFFORT as an undocumented compatibility flag, not a stable requirement. This route is useful for individual experiments and reversible model comparisons, but it is not supported by Anthropic for non-Claude models and a local subscription proxy is not a production team gateway.",
  "articleBody": " Blog overview/AI and agents/Agent engineering How to Run GPT-5.6 Sol in Claude Code with CLIProxyAPI TL;DR Claudex is an unofficial setup that keeps the Claude Code CLI and agent harness while CLIProxyAPI translates its Anthropic-format requests and routes them to OpenAI's GPT-5.6 Sol. The viral alias is incomplete unless it also sets ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN. On macOS, install CLIProxyAPI with Homebrew, bind it to 127.0.0.1, create a strong client API key, complete the Codex OAuth login, verify that /v1/models exposes gpt-5.6-sol, then launch Claude Code through a scoped claudex alias. Use ENABLE_TOOL_SEARCH=auto:5 or true when the proxy supports tool_reference; false loads all tool definitions into context. Treat CLAUDE_CODE_ALWAYS_ENABLE_EFFORT as an undocumented compatibility flag, not a stable requirement. This route is useful for individual experiments and reversible model comparisons, but it is not supported by Anthropic for non-Claude models and a local subscription proxy is not a production team gateway. Yes, CLIProxyAPI can route Claude Code's Anthropic-compatible requests to GPT-5.6 Sol through a local gateway. Claude Code remains the agent harness that reads the repository, plans work, calls tools, and coordinates subagents. CLIProxyAPI translates the request and sends it to OpenAI through your Codex login. The community calls this combination Claudex, but Anthropic does not support using non-Claude models in Claude Code. The popular four-line alias is not the setup. It only selects a model after the gateway is already installed, authenticated and connected. Without ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN, plain Claude Code has no reason to send traffic to CLIProxyAPI. This guide gives you the missing connection, a safer localhost configuration, a test at each boundary, and an alias you can remove without changing normal claude sessions. Facts and commands were re-checked on 7 August 2026 against the current CLIProxyAPI repository and provider documentation. What Claudex is, and what it is not LayerWhat runs thereWho maintains it Agent harnessClaude Code CLI, tools, permissions, memory and subagentsAnthropic Protocol bridgeCLIProxyAPI on your machine, usually port 8317Independent open-source project Modelgpt-5.6-solOpenAI AuthenticationCodex OAuth stored locally by the proxy, plus your own proxy client keyYou CLIProxyAPI describes itself as an API service compatible with OpenAI, Gemini, Claude and Codex protocols. Its source code is available on GitHub, but it is not an Anthropic or OpenAI product. Anthropic's gateway documentation says compatible gateways can connect to Claude Code, while also stating that Anthropic does not support routing Claude Code to non-Claude models. That distinction matters: the mechanism is possible, but this exact model pairing is unsupported by Anthropic. This article targets implementation intent. If you are deciding between products, use our separate Claude Code vs OpenCode team-cost comparison. If you are choosing a production gateway, use the LLM gateway comparison. Keeping those questions separate prevents a setup tutorial from pretending to be a procurement framework. The two-minute claim, honestly If Homebrew, Claude Code and an eligible Codex account are ready, the happy-path commands take a few minutes. The first secure setup can take longer because you should inspect the config, generate a client key, finish browser OAuth and verify the model list. Do not trade those checks for a faster screenshot. Step 1: install and start CLIProxyAPI on macOS brew install cliproxyapi brew services start cliproxyapi These are the current commands in the CLIProxyAPI quick start. Homebrew normally uses $(brew --prefix)/etc/cliproxyapi.conf. Check the active path before editing a different copy. Step 2: bind the proxy to localhost and set a real client key The project's example config uses an empty host, which binds all IPv4 and IPv6 interfaces. For a personal local proxy holding OAuth credentials, restrict it to 127.0.0.1. Set a random client key under api-keys and leave remote management off: host: \"127.0.0.1\" port: 8317 remote-management: allow-remote: false secret-key: \"\" api-keys: - \"claudex-REPLACE-WITH-A-LONG-RANDOM-SECRET\" Generate the value locally with openssl rand -hex 32, place the result after a memorable prefix and do not paste it into a repository, issue or screenshot. The official configuration reference documents the listen address, port, authentication directory and API-key list. brew services restart cliproxyapi Step 3: connect your Codex account cliproxyapi --codex-login A browser opens for OpenAI authentication. On a headless machine, the project's Codex OAuth guide documents --no-browser and a local callback on port 1455. Use the OpenAI workspace whose Codex allowance you intend to consume. OAuth credentials are sensitive. CLIProxyAPI stores authentication material under its configured auth directory, commonly ~/.cli-proxy-api.",
  "articleSection": "Engineering",
  "author": {
    "@id": "https://wavect.io/team/kevin-riedl/#person",
    "@type": "Person",
    "name": "Kevin Riedl",
    "sameAs": [
      "https://www.wikidata.org/wiki/Q139796365",
      "https://www.linkedin.com/in/wsdt",
      "https://github.com/wsdt"
    ],
    "url": "https://wavect.io/team/kevin-riedl/"
  },
  "dateModified": "2026-08-07",
  "datePublished": "2026-07-26",
  "description": "Claudex is an unofficial setup that keeps the Claude Code CLI and agent harness while CLIProxyAPI translates its Anthropic-format requests and routes them to OpenAI's GPT-5.6 Sol. The viral alias is incomplete unless it also sets ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN. On macOS, install CLIProxyAPI with Homebrew, bind it to 127.0.0.1, create a strong client API key, complete the Codex OAuth login, verify that /v1/models exposes gpt-5.6-sol, then launch Claude Code through a scoped claudex alias. Use ENABLE_TOOL_SEARCH=auto:5 or true when the proxy supports tool_reference; false loads all tool definitions into context. Treat CLAUDE_CODE_ALWAYS_ENABLE_EFFORT as an undocumented compatibility flag, not a stable requirement. This route is useful for individual experiments and reversible model comparisons, but it is not supported by Anthropic for non-Claude models and a local subscription proxy is not a production team gateway.",
  "headline": "CLIProxyAPI: Run GPT-5.6 Sol Inside Claude Code",
  "image": "https://wavect.io/img/blog/headers/header_claude-code-gpt-5-6-sol-cliproxyapi.svg",
  "inLanguage": "en",
  "keywords": "AI Agents, Claude Code, GPT-5.6",
  "mainEntityOfPage": {
    "@id": "https://wavect.io/blog/claude-code-gpt-5-6-sol-cliproxyapi/",
    "@type": "WebPage"
  },
  "publisher": {
    "@id": "https://wavect.io/#organization",
    "@type": [
      "Organization",
      "ProfessionalService",
      "LocalBusiness"
    ]
  },
  "url": "https://wavect.io/blog/claude-code-gpt-5-6-sol-cliproxyapi/",
  "wordCount": 2408
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "item": "https://wavect.io/",
      "name": "Home",
      "position": 1
    },
    {
      "@type": "ListItem",
      "item": "https://wavect.io/blog/overview/",
      "name": "Blog overview",
      "position": 2
    },
    {
      "@type": "ListItem",
      "item": "https://wavect.io/blog/topics/ai-agents/",
      "name": "AI and agents",
      "position": 3
    },
    {
      "@type": "ListItem",
      "item": "https://wavect.io/blog/clusters/agent-engineering/",
      "name": "Agent engineering",
      "position": 4
    },
    {
      "@type": "ListItem",
      "item": "https://wavect.io/blog/claude-code-gpt-5-6-sol-cliproxyapi/",
      "name": "CLIProxyAPI: Run GPT-5.6 Sol in Claude Code | ",
      "position": 5
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes, through an Anthropic-compatible gateway such as CLIProxyAPI. Claude Code remains the client and agent harness, while the gateway translates requests and routes them to GPT-5.6 Sol. Anthropic does not support routing Claude Code to non-Claude models, so treat the combination as an unofficial integration."
      },
      "name": "Can Claude Code run GPT-5.6 Sol?"
    },
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Claudex is a community nickname for Claude Code used as the coding-agent harness with an OpenAI GPT model underneath. It is not a product from Anthropic, OpenAI or the CLIProxyAPI project."
      },
      "name": "What is Claudex?"
    },
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "It selects gpt-5.6-sol but does not necessarily point Claude Code at CLIProxyAPI or authenticate to the proxy. A complete scoped alias needs ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN after the proxy is installed, configured and connected to Codex OAuth."
      },
      "name": "Why does the viral Claudex alias not work by itself?"
    },
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Not by default. False loads every tool definition into the context. Use auto:5 or true when CLIProxyAPI supports the required beta header and tool_reference blocks. Fall back to false only if the proxy rejects those protocol features."
      },
      "name": "Should ENABLE_TOOL_SEARCH be false?"
    },
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Its example configuration binds all interfaces when host is empty. For a local personal setup, set host to 127.0.0.1, use a strong client API key, keep remote management off and do not expose port 8317 through a router or public tunnel."
      },
      "name": "Does CLIProxyAPI expose my computer to the network?"
    },
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A local alias is suitable for a controlled experiment, not a production operating model. A company needs approved provider terms, per-user credentials, centralized revocation, audit and redaction, budgets, model allowlists, updates, evals and an incident owner."
      },
      "name": "Is Claudex suitable for a company?"
    }
  ]
}
```
