简介
codex已经是我日常工作中不可缺少的工具了。他能帮我写代码,帮我做自动化测试,帮我直接操控电脑,操控浏览器。但是他唯一的缺点就是需要付费。而且不便宜。我80%的时候都是需要他帮我做一些低级的工作,比如帮我在文件夹里找一个字段,帮我每个整点收集某个博主的推文。根本不需要深度思考,不需要gpt最新的5.5模型。
我就想能不能在我本地部署一个比较低级的模型,普通任务就在本地烧我的显卡来完成,这样就可以不给openai付费了。那我们今天就一起来操作一下 把codex接入ollama下载的本地模型
工具下载
链接:https://pan.quark.cn/s/6de73bb024e0
- Codex Installer.exe
- OllamaSetup.exe
视频教程
教程
Codex 官网 : https://chatgpt.com/codex/
Ollama 官网: https://ollama.com/
下载最新的 Codex 和 Ollama ,Ollama 保证在 0.24以上。
Ollama 下载大模型命令
ollama run qwen3.5:latest
ollama run qwen3.5:0.8b
ollama run qwen3.5:2b
…………
Ollama开启Codex命令
ollama launch codex-app
一些Bug
Bug内容:
failed to resolve feature override precedence: legacy `profile = "ollama-launch-codex-app"` config is no longer supported; use `--profile ollama-launch-codex-app` with `ollama-launch-codex-app.config.toml` instead
解决:
把 codex的配置文件修改成一下内容,codex配置文件位置 C:\Users\用户名\.codex\config.toml
model = "qwen3.6:27b"
model_provider = "ollama-launch-codex-app"
model_catalog_json = "C:\\Users\\HaliPC\\.codex\\ollama-launch-models.json"
model_reasoning_effort = "xhigh"
[model_providers.ollama-launch-codex-app]
name = "Ollama"
base_url = "http://127.0.0.1:11434/v1/"
wire_api = "responses"
[marketplaces.openai-bundled]
last_updated = "2026-06-01T16:45:10Z"
source_type = "local"
source = '\\?\C:\Users\HaliPC\.codex\.tmp\bundled-marketplaces\openai-bundled'
[desktop]
conversationDetailMode = "STEPS_COMMANDS"
ambient-suggestions-enabled = false
[plugins."chrome@openai-bundled"]
enabled = true


