Skip to content

fix(config): O93 agent.reasoningBudget 支持 config set/show/env - #98

Merged
QiaolongLi1201 merged 4 commits into
mainfrom
fix/o93-config-reasoning-budget
Oct 11, 2026
Merged

QiaolongLi1201 merged 4 commits into
mainfrom
fix/o93-config-reasoning-budget

Conversation

@QiaolongLi1201

@QiaolongLi1201 QiaolongLi1201 commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

O93:moss config set agent.reasoningBudget

把原先只能靠 MOSS_REASONING_BUDGET 设置的推理档位,接到配置面(set/unset/show/env/help),并补齐不受信项目「只许调低」规则。

合门

  1. en/zh config --help:说明含义、可选值 off|adaptive|high、耗时/费用;并写明 off = 不把预算升到 high,不是关掉模型自带推理。
  2. 文本 config show:显示推理强度当前值与来源(不只 --json)。
  3. 不受信只许调低(off < adaptive < high):用户有效值 = 用户配置,未设视为默认 adaptive。项目值 ≤ 用户有效值 → 生效(来源 project);项目值 > 用户有效值 → 丢弃并记入 ignoredProjectRouting。受信不受限。MOSS_REASONING_BUDGET 仍最高优先。提示走现有 untrusted-folder notice(config show / -p / TUI 启动同一套;每文件夹对同一提示行只打一次)。
  4. 空值 config set agent.reasoningBudget:报错列出 off|adaptive|high。
  5. 无效 env(如 MOSS_REASONING_BUDGET=max):stderr 一次警告 + configWarnings,再回落配置/默认。

出站字段(QA 抓包佐证,非阻塞)

  • 配置/env 不会在请求体里写 reasoningBudget 字段名。
  • 与历史 MOSS_REASONING_BUDGET 同一条路径:在 agent-loop-llm-call 里把档位落实为每次调用的 reasoning(ThinkingLevel),再经 pi-ai-adapter 放进出站 stream options 的 reasoning。
  • high:强制 reasoning: "high"。
  • adaptive:在验证失败/回合出错等压力下,若本轮已有配置的推理档,可升到 high。
  • off:不升档,保留模型/会话已有推理档;不是关闭 provider 原生 thinking。
  • 相对 base 抓包时:对走 Moss openai-completions / pi-ai 适配器、且会带 reasoning 档的思考型模型(例如 glm 系列开了 reasoning 的请求),对比 MOSS_REASONING_BUDGET=high 与 moss config set agent.reasoningBudget high 出站 reasoning 应一致;off 在压力场景下不应再被升到 high。

测试

test/config-reasoning-budget-o93.spec.mjs:QA1 不受信 project off + 用户 high → off;QA2/2b/2c 不受信 project high + 用户未设 → adaptive + -p/TUI 提示含 reasoningBudget;QA3 受信 high;QA4 env 压过项目。撤掉「只许调低」比较后相关用例变红。全量 npm test 353 绿。

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Help (en/zh) explains meaning and cost/latency; text config show lists
value+source; untrusted projects drop reasoningBudget with the usual
skipped-settings tip; empty set lists off|adaptive|high; invalid
MOSS_REASONING_BUDGET warns once (stderr + configWarnings) then falls back.
Untrusted folders keep a project agent.reasoningBudget when it is <= the
user effective value (unset user => adaptive); a raise is dropped into
ignoredProjectRouting so config show, -p, and TUI startup share the same
untrusted-folder notice. Help clarifies off = do not escalate (not disable
provider thinking). QA cases + revert-red covered in
test/config-reasoning-budget-o93.spec.mjs.
@QiaolongLi1201
QiaolongLi1201 merged commit f26ff95 into main Oct 11, 2026
6 of 12 checks passed
@QiaolongLi1201
QiaolongLi1201 deleted the fix/o93-config-reasoning-budget branch October 11, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant