# codex-deepseek-config **Repository Path**: xfnotes/codex-deepseek-config ## Basic Information - **Project Name**: codex-deepseek-config - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-08-10 - **Last Updated**: 2026-08-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # codex-deepseek-config(DeepSeek Codex 配置保险箱) 保存 DeepSeek V4 Flash/Pro 的完整 Codex 模型目录与配置示例,用于换环境后一键恢复。 ## 文件说明 - `cc-switch-model-catalog.json` —— 升级版模型目录(四档推理 none/low/high/max、并行工具调用、完整元数据) - `config.toml.example` —— CC-Switch 写出的 config.toml 参考(默认 high) - `install.sh` —— 一键安装脚本(自动备份旧文件) ## 在新机器上恢复 ```bash bash install.sh ``` 然后重启 Codex(新开会话)后生效。若想默认用满血推理,把 config.toml 中 model_reasoning_effort 改为 `"max"`;想关闭思考则改为 `"none"`。 ## 推理档位(DeepSeek 系列共四档) `supported_reasoning_levels` = `none / low / high / max`,对应 `model_reasoning_effort`: | 档位 | 含义 | |---|---| | none | 关闭思考(Disable Thinking) | | low | Fast responses with lighter reasoning | | high | Extra high reasoning depth for complex problems(默认) | | max | Maximum reasoning depth for the hardest problems | ## 为什么固定 multi_agent_version=v1(子代理关键,不要改回 v2) Codex 0.149 只支持 `wire_api = "responses"`(`chat` 已被官方移除)。MultiAgentV2 投递子代理任务时,把任务文本放在 `encrypted_content` 里——OpenAI 官方端点是服务端解密,而第三方网关(如本配置用的 opencode go)不识别这个字段,子代理只能看到空消息,表现为“准备好了 / 没收到任务”,甚至根代理后续请求报 `reasoning_text in the thinking mode must be passed back` 或子代理请求报 `'name' is a required property - 'tools.13.function'`。 DeepSeek 官方脚本 `codex-deepseek-setup.sh` 写的也是 `multi_agent_version: "v2"`,但那是针对官方 `api.deepseek.com` 的,且同样存在该问题(上游 [openai/codex#36586](https://github.com/openai/codex/issues/36586) 有完整复现)。我们的 API 是 cc-switch 里填的 opencode go,不能照抄官方脚本。 因此本仓库所有模型条目显式固定: - `multi_agent_version = "v1"`:任务以明文 user 消息投递,子代理能真正收到任务。代价是没有 V2 工具族(`followup_task` / `send_message` / `interrupt_agent` / `list_agents` / `wait_agent`),`spawn_agent` 可用。 - `supports_search_tool = false`:避免 `tool_search` 等非标准工具类型在严格 schema 的网关(glm 等)下被拒。 检查当前生效文件是否安全: ```bash jq -r '.models[] | [.slug, (.multi_agent_version // "-"), .supports_search_tool] | @tsv' ~/.codex/cc-switch-model-catalog.json ``` 出现 `v2` 或 `true` 即说明被改回,运行 `bash install.sh` 恢复。 ## 注意事项(重要,避免改错地方) 1. **生效文件**:Codex 运行时读取的是 `~/.codex/cc-switch-model-catalog.json`,改这个文件即可生效(新开会话后)。 2. **不要改这些地方**:cc-switch 的数据库(`~/.cc-switch/cc-switch.db`)只存模型简化字段(model/displayName/contextWindow),**不含推理档位**,改了不生效;`/usr/bin/cc-switch` 是程序二进制,其内置 catalog 会在重新生成时覆盖,禁止手改。 3. **会被覆盖**:CC-Switch 重建用量统计或重新生成 Provider/模型映射时,会重新生成 `~/.codex/cc-switch-model-catalog.json`,手工修改会被重置,且可能把 `multi_agent_version` 改回 v2。重置后重新运行 `install.sh` 即可恢复(脚本会先校验、拒绝含 v2 的文件)。 4. **跨设备**:请把本目录放到 Git 仓库(GitHub/Gitee 私有仓库)或网盘。