Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions apps/desktop/scripts/pragent-shim/meebox_pragent_shim/cli/specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,19 @@
},
# codex:exec 非交互 + --json(JSONL 事件流);末位 `-` 让 stdin 作完整 prompt;
# --skip-git-repo-check 容许临时目录运行,--sandbox read-only 只读不改文件。
# 低算力档:-c model_reasoning_effort=minimal(codex 默认推理较重,编排通道无需,调低提速)。
# 默认禁用 web_search / image_gen:评审与编排在只读临时目录里跑,这两个工具用不到,
# 关掉既收敛工具面、又省 ~3K tokens(工具定义不再随每次请求下发)。键值:
# web_search 是字符串枚举(disabled / cached / live),用 `-c web_search=disabled`;
# image_gen 是 feature flag,用 `-c features.image_generation=false`(等价 --disable image_generation)。
# 低算力档:-c model_reasoning_effort=low(codex 默认推理较重,编排通道无需,调低提速)。
# 不用 minimal:gpt-5.x-codex 不支持 minimal(仅 none/low/medium/high/xhigh,传 minimal 报 400),
# 且 minimal 还与 web_search / image_gen 互斥;low 普遍受支持、与工具兼容,作低算力档更稳。
"codex": {
"flags": ["exec", "--json", "--skip-git-repo-check", "--sandbox", "read-only", "-"],
"low_effort_flags": ["-c", "model_reasoning_effort=minimal"],
"flags": [
"exec", "--json", "--skip-git-repo-check", "--sandbox", "read-only",
"-c", "web_search=disabled", "-c", "features.image_generation=false", "-",
],
"low_effort_flags": ["-c", "model_reasoning_effort=low"],
"parser": _parse_codex_output,
"strip_env": ("OPENAI_API_KEY", "CODEX_API_KEY"),
},
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/main/ipc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ export function registerIpcHandlers({
...(activeLlm ? buildPragentEnv(activeLlm) : {}),
CONFIG__RESPONSE_LANGUAGE: getMainLanguage(),
// Agent 编排通道(规划 / 判读 / 收尾 / 对话)是路由 + 轻量综合,非深度代码分析(那在
// pr-agent /review 里)。本机 CLI 模式下调低推理档(codex: model_reasoning_effort=minimal
// pr-agent /review 里)。本机 CLI 模式下调低推理档(codex: model_reasoning_effort=low
// 提速;仅作用于本 chat spawn,pr-agent 工具 run 的 env 不含此项 → /review 仍满档推理。
// 非 CLI 模式(API)由 CLI handler 之外的路径处理,该 env 无副作用。
MEEBOX_CLI_REASONING: 'low',
Expand Down
Loading