Fix the Codex problem by reconnecting 5 times each time. Then toggle Codex between HTTP-only and WebSocket modes.
该Skill可以解决Codex每次提示"重新连接5次"的问题。原因是WebSocket连接请求失败,切换为HTTP请求即可修复。 该技能可在默认支持 WebSocket 的模式与仅 HTTP 的回退模式之间切换。 如果你只想临时使用一次该行为,可以选择不安装此技能,将下方提示之一复制到 Codex 中执行即可。
This skill toggles Codex between the default WebSocket-capable mode and an HTTP-only fallback mode. You do not need to install the skill if you only want the behavior once. Copy one of the prompts below into Codex.
请帮我把 Codex 切换到 HTTP-only 模式。
要求:
- 修改 `C:\Users\<我的用户名>\.codex\config.toml`
- 修改前先自动创建时间戳备份
- 设置 `model_provider = "openai_http"`
- 添加或更新 `[model_providers.openai_http]`
- 使用以下配置:
- `base_url = "https://chatgpt.com/backend-api/codex"`
- `wire_api = "responses"`
- `requires_openai_auth = true`
- `supports_websockets = false`
- 保留其他配置不变,不要改插件、MCP、模型或其它无关设置
- 修改后请运行 `codex debug models` 验证配置可加载
- 告诉我需要重启 Codex 桌面 App
- 注意:这会修改 Codex 全局配置,也可能影响或被第三方配置管理工具覆盖,比如 `CC-switch`
请帮我把 Codex 恢复为默认 WebSocket/内置 OpenAI provider 模式。
要求:
- 修改 `C:\Users\<我的用户名>\.codex\config.toml`
- 修改前先自动创建时间戳备份
- 删除 `model_provider = "openai_http"`
- 删除整个 `[model_providers.openai_http]` 配置块
- 保留其他配置不变,不要改插件、MCP、模型或其它无关设置
- 修改后请运行 `codex debug models` 验证配置可加载
- 告诉我需要重启 Codex 桌面 App
- 注意:这会修改 Codex 全局配置,也可能影响或被第三方配置管理工具覆盖,比如 `CC-switch`
- The backup created by the skill script is timestamped and kept next to
config.toml. - If
ccswitchor another config manager rewrites the file later, run the switch again.