> ## Documentation Index
> Fetch the complete documentation index at: https://docs.axuremart.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 模型配置

> 通过 cc switch 配置 GPT（Codex）模型

## 第一步：下载安装 cc switch

点击对应系统的按钮直接下载安装包，下载后双击安装。

<CardGroup cols={2}>
  <Card title="Windows 版本" icon="windows" href="https://github.com/farion1231/cc-switch/releases/download/v3.16.5/CC-Switch-v3.16.5-Windows.msi">
    CC-Switch-v3.16.5-Windows.msi
  </Card>

  <Card title="Mac 版本" icon="apple" href="https://github.com/farion1231/cc-switch/releases/download/v3.17.0/CC-Switch-v3.17.0-macOS.dmg">
    CC-Switch-v3.17.0-macOS.dmg
  </Card>
</CardGroup>

## 第二步：配置模型

### 1、令牌分组必须勾选 codex 分组

<Frame>
  <img src="https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-18.png?fit=max&auto=format&n=oHetu81dZtjYE4sA&q=85&s=d9cab66327dad84e90bfb48913915d9d" alt="勾选 codex 分组" width="1955" height="901" data-path="images/img-18.png" />
</Frame>

### 2、cc switch 创建供应商并配置

1. 打开后在 codex 分类下创建供应商

<Frame>
  <img src="https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-19.png?fit=max&auto=format&n=oHetu81dZtjYE4sA&q=85&s=a33e5ce3879b2a6cb5f8f9b8f4b851be" alt="创建供应商" width="1316" height="811" data-path="images/img-19.png" />
</Frame>

2. 配置供应商

<Frame>
  <img src="https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-20.png?fit=max&auto=format&n=oHetu81dZtjYE4sA&q=85&s=45b3c37883027d782f848667c9f815bc" alt="配置供应商" width="1316" height="811" data-path="images/img-20.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-21.png?fit=max&auto=format&n=oHetu81dZtjYE4sA&q=85&s=e3875c4bc0dc206104454c827b85f152" alt="配置供应商" width="1316" height="811" data-path="images/img-21.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-22.png?fit=max&auto=format&n=oHetu81dZtjYE4sA&q=85&s=572c048b7bea8acb4d395923b186937d" alt="配置供应商" width="1316" height="811" data-path="images/img-22.png" />
</Frame>

| 配置项 | 填写内容 |
| - | - |
| 供应商类型 | 自定义配置 |
| 名称 | 自己随意填写 |
| 官网链接 | `https://ai.axuremart.com` |
| API key | API 官网创建令牌后复制 |
| 请求地址 | `https://ai.axuremart.com/v1` |

### 3、检查一下 config.toml 配置

<Warning>确保 `[model_providers.custom]` 的配置与图中一致，否则无法调用模型。</Warning>

如不一致，到对应路径下找到 `config.toml` 文件修改。文件所在路径：`~/.codex/config.toml`（Windows 为 `C:\Users\你的用户名\.codex\config.toml`）。

```toml theme={null}
[model_providers.custom]
name = "OpenAI"
wire_api = "responses"
requires_openai_auth = false
http_headers = { "x-openai-actor-authorization" = "local-image-extension" }
base_url = "https://ai.axuremart.com/v1"
experimental_bearer_token = "这里填写你的令牌key"
```

<Frame>
  <img src="https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-23.png?fit=max&auto=format&n=oHetu81dZtjYE4sA&q=85&s=8eba3efb45b583482729d777c2ba9eec" alt="config.toml 配置" width="2072" height="1372" data-path="images/img-23.png" />
</Frame>

### 4、启用供应商

<Frame>
  <img src="https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-24.png?fit=max&auto=format&n=oHetu81dZtjYE4sA&q=85&s=597e5b4bff2ef047421b235f7796688f" alt="启用供应商" width="1316" height="811" data-path="images/img-24.png" />
</Frame>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.