在 Codex 中使用 FishXCode
视频教程
安装 Codex
bash
pnpm install -g @openai/codexbash
npm install -g @openai/codexbash
yarn global add @openai/codexbash
bunx --global @openai/codex配置环境变量
访问 https://fishxcode.com/console/token 获取 API Key
创建
~/.codex/config.toml文件,添加配置:tomlmodel_provider = "fishxcode" model = "gpt-5.4" review_model = "gpt-5.4" model_reasoning_effort = "medium" model_reasoning_summary = "detailed" disable_response_storage = true preferred_auth_method = "apikey" model_verbosity = "high" [model_providers.fishxcode] name = "OpenAI using Chat Completions" base_url = "https://api.fishxcode.com/v1" wire_api = "responses" requires_openai_auth = true [features] skills = true image_generation = false创建
~/.codex/auth.json文件,将OPENAI_API_KEY的值设置为你的 FishXCode API Key:json{ "OPENAI_API_KEY": "your_api_key_here" }
直接启动使用
bash
cd my-project
codex在 VSCode 中使用
安装 Codex 扩展
进入设置,切换为 JSON 配置模式
添加配置项:
json{ "chatgpt.apiBase": "https://api.fishxcode.com/v1", "chatgpt.config": { "preferred_auth_method": "api_key", "model_provider": "fishxcode" } }点击 Codex 图标开始使用