Skip to content

Best Practices for Configuring and Using Codex with AGIOne ​

Codex + CC Switch + AGIOne — AI Coding Setup Guide ​

A clear step-by-step guide to configure Codex Desktop with CC Switch and AGIOne (agione.pro) API tokens for AI-assisted coding.

Architecture Overview ​

Plain
Codex Desktop (AI coding client)
        │
        │  Requests go through local route
        ▼
CC Switch (local proxy — protocol conversion + provider management)
        │
        │  Forwards to upstream API
        ▼
AGIOne (https://agione.pro/hyperone/xapi/api)
        │
        │  Routes to models
        ▼
DeepSeek / GLM / Gemini / GPT, etc.

Why Routing mode? AGIOne uses Chat Completions protocol, while Codex uses Responses protocol. CC Switch's Routing mode handles the conversion automatically.


Step 1: Download & Install Codex Desktop ​

  1. Go to OpenAI's official website and download Codex Desktop.

Codex Desktop download page

- macOS: `.dmg` file

- Windows: `.exe` installer

- Linux: `.AppImage` or `.deb`
  1. Install and launch Codex.

  2. You may be asked to log in with your OpenAI/ChatGPT account — you can skip this wait cc switch configuration finshed.


Step 2: Download & Install CC Switch ​

  1. Go to the official download page: https://ccswitch.io or https://github.com/farion1231/cc-switch/releases

CC Switch GitHub Releases download page

  1. Choose your platform:

    • macOS (Apple Silicon): CC-Switch-v4.0.5-mac-aarch64.dmg

    • macOS (Intel): CC-Switch-v4.0.5-mac-x64.dmg

    • Windows: CC-Switch-v4.0.5-win-x64-setup.exe

    • Linux: .deb, .rpm, or .AppImage

  2. Install and launch the CC Switch.


Step 3: Access AGIOne & Get API Key ​

  1. Open your browser and go to https://agione.pro** or your private agione platform.**

  2. Log in or create an account.

  3. Once logged in, go to Settings , My Keys to Model API Keys.

AGIOne Settings - My Keys - Model API Keys page

  1. Click Create API Key (or + Create).
  • Give it a name (e.g., codex-cc-switch)

Create Model API Key dialog

  • Copy the generated key — it starts with ak- and is only shown once.

View and copy the Access Key


Step 4: Find Your Model Info ​

  1. In AGIOne, go to Model Services in the top menu.

AGIOne Model Services menu

  1. Find the model you want to use. Examples:

    • DeepSeek-V4-Flash: deepseek/deepseek-v4-flash/02acd — fast, low cost, good for daily coding

Search and select the DeepSeek-V4-Flash model

  1. Copy the Model ID && Base URL
  • Go to Quick Start, Copy Model ID

Quick Start page - copy Model ID

  • Go to Quick Start, Copy Base URL

Quick Start page - copy Base URL

  • Confirm what protocols the model supports.

Protocols supported by the model


Step 5: Configure CC Switch ​

5.1 Open Codex page in CC Switch ​

  1. In CC Switch, click Codex in the left sidebar.

Codex option in the CC Switch left sidebar

  1. You'll see three tabs at the top: Direct / Routing / Aggregation.

Direct / Routing / Aggregation tabs on the Codex page

5.2 Switch to Routing mode ​

  1. Click the Routing tab.

  2. Routing mode starts with a local proxy service. Codex sends all requests through it first.

5.3 Add AGIOne as a provider ​

  1. Click Add Provider.

Click Add Provider

  1. Choose Custom Configuration.

Choose Custom Configuration

  1. Fill in the fields:
FieldValue
NameAGIOne
API Keyak-xxxxxxxx (your key from Step 3)
API Request URL<Copy Base URL of the AGIOne Platform>
Full URLOff
Default Model<Copy Model ID of the AGIOne Platform>

Fill in the AGIOne provider fields

5.4 Configure Advanced Options ​

Expand Advanced Options and set:

SettingValue
Upstream FormatChat Completions (routing required) | depends on the protocol types supported by the model
Prompt cache routingAuto (recommended)
Supports Thinking Mode<depends on the Thinking mode supported by the model> | DeepSeek Support, There is Enabled
Supports Reasoning Effort<depends on the Thinking mode supported by the model> | DeepSeek Support, There is Enabled

Advanced Options settings

5.5 Model Mapping ​

  1. Click + **Add manually to **add which models do you want to use.

Model Mapping - add manually

You can get more models from agione platform and fill in model on there to use it.

  1. Click Save.

5.6 Activate routing ​

  1. In the provider list, find AGIOne.

  2. Click Route here.

Click Route here on the AGIOne entry

  1. Confirm the top of the page shows Routing is active → AGIOne.

Routing is active - AGIOne


Step 6: Test in Codex ​

  1. Fully quit Codex (Cmd+Q on macOS) and reopen it.

  2. Start a new chat in Codex.

  3. Send a test message:

Plain
Hello! Tell me who you are and which model you are using.

Send a test message in Codex

  1. If you get a reply, the setup is working!

Codex receives the model reply


Step 7: verify Usage in AGIOne ​

  1. Go back to AGIOne Dashboard (https://agione.pro).

  2. Check the Usage or Call Logs page to see your API calls.

AGIOne Call Logs page


Configuration Files (Auto-generated) ​

CC Switch manages these files automatically:

~/.codex/auth.json

JSON
{
  "OPENAI_API_KEY": "ak-xxxxxxxx"
}

~/.codex/config.toml (key fields)

TOML
model_provider = "custom"
model = "deepseek/deepseek-v4-flash/02acd"
model_reasoning_effort = "high"
model_catalog_json = "cc-switch-model-catalog.json"

[model_providers.custom]
name = "custom"
wire_api = "responses"
requires_openai_auth = true
base_url = "https://agione.pro/hyperone/xapi/api"

Troubleshooting ​

IssueLikely CauseFix
Fetch Models failsWrong API Key or no balanceCheck key and AGIOne balance
Codex returns 401Key not saved properlyRe-save provider in CC Switch
Codex returns 404Wrong Base URLConfirm https://agione.pro/hyperone/xapi/api
No models in CodexCodex not restartedFully quit and reopen Codex
Requests hangNetwork issue or model overloadCheck network, try another model

ResourceURL
AGIOnehttps://agione.pro
CC Switch Officialhttps://ccswitch.io
CC Switch GitHubhttps://github.com/farion1231/cc-switch
CC Switch Releaseshttps://github.com/farion1231/cc-switch/releases

Guide generated: 2026-10-09 | Verified on: macOS + Codex Desktop + CC Switch v4.0.5 + AGIOne