[LIVE] [wyb123465/local-proxy] 1 endpoint(s)
ChatGPT
API Proxy/ChatGPT
2,121 characters
Status: [LIVE]
Endpoints found:
https://open.bigmodel.cn/api/paas/v4
Source: https://github.com/wyb123465/local-proxy
# Local Proxy
本地 LLM 代理服务器,替代 CCX,支持多国产模型供应商。
Codex 使用 OpenAI Responses API,但国产模型仅支持 Chat Completions API。
本代理在中间完成协议翻译,并将请求路由到对应供应商。
---
## 快速开始
### 1. 安装依赖
```bash
pip install -r requirements.txt
```
### 2. 配置 API Key
编辑 `config.json`,或启动后在 Web UI 中配置。
预置了 6 个供应商,只需填入对应 API Key:
| 供应商 | 申请地址 |
|--------|---------|
| DeepSeek | https://platform.deepseek.com |
| 智谱 (GLM) | https://open.bigmodel.cn |
| MiniMax | https://platform.minimaxi.com |
| 月之暗面 (Kimi) | https://platform.moonshot.cn |
| 通义千问 (Qwen) | https://dashscope.aliyun.com |
| 豆包 (Doubao) | https://console.volcengine.com/ark |
### 3. 启动
```bash
python proxy.py
```
或双击 `start.bat`。
启动后访问 http://localhost:2000 进入管理界面。
---
## 配合 Codex 使用
### 配置 cc switch
```bash
# API Base URL 指向代理
cc switch --base-url http://localhost:2000
# API Key 随便填(代理不验证,用自己的 Key)
cc switch --api-key sk-local
# 选择模型(会自动路由到对应供应商)
cc switch deepseek-chat
cc switch glm-4
cc switch qwen-max
```
### 工作流程
```
cc switch glm-4 # 告诉 Codex 用 glm-4
↓
Codex → 代理 (localhost:2000) # model="glm-4"
↓
代理查 model_map # glm-4 → zhipu / glm-4
↓
代理 → 智谱 API # 用智谱的 Key,翻译协议
↓
智谱返回 → 代理翻译 → Codex
```
### 切换模型
直接 `cc switch <模型名>`,代理自动路由到对应供应商。
可用的模型名见 Web UI 的 Model Map 列表,或 `http://localhost:2000/v1/models`。
---
## Web UI 说明
访问 http://localhost:2000
### System Status
显示当前端口、激活模型、供应商、已配置 Key 数量。
### Model Map
- **Default Mode