Repository navigation
fix(models): align CLI catalogs and reasoning choices - #1082
Conversation
Robert0622
left a comment
There was a problem hiding this comment.
该提交的聊天前端 403 项测试和生产构建通过,模型目录与思考强度相关的 Go/Web 测试也通过。补测了角色弹窗在目录变更后重新打开,以及 Runner 实时探测但尚未保存目录的情况,分别发现以下问题。
| return; | ||
| } | ||
| applyAgentModelUI(currentAgentExecutorId(),model,f.elements.effort?.value); | ||
| applyAgentModelUI(currentAgentExecutorId(),model,f.elements.effort?.value,!a.id||currentAgentExecutorId()!==(a.executorId||'codebuddy')); |
There was a problem hiding this comment.
[P2] 新建角色会保存已下架的默认模型。在同一个页面先打开一次新建角色,目录只返回 retired-model。关闭弹窗,在服务端把目录更新为只有 current-model 再打开。实测未手动选择模型,目录刷新完成后界面仍选中 retired-model,PUT /api/agents 也提交了这个 ID。首次绘制从缓存自动选出的值被这里当作手动选择保留。建议保留用户明确选择的值,并在最新目录返回后重新核对自动选中的值。
| var efforts []string | ||
| if runnerLogin && engine == runtime.AgentCLIAntigravity { | ||
| efforts = runtime.AgyAccountModelEfforts(id) | ||
| models := runtime.FoldAgyAccountModels(assistantEngineCustomModels(user, engine)) |
There was a problem hiding this comment.
[P2] 生成时的强度校验没有使用当前 Runner 刚探测到的目录。用空的个人已保存目录实测,账号探测只返回某个 Gemini 系列的 low 和 medium,但同一机器的生成校验接受了 high,命令构造器最终写入 --model gemini-3.8-flash-high。旧标签页或 API 客户端因此可以提交账号没有返回的变体。建议让执行校验和选择器共用该机器的有效目录,按实际提供的档位解析模型 ID。
Robert0622
left a comment
There was a problem hiding this comment.
角色表单刷新目录后已能正确保存新默认模型。聊天前端的 403 个现有测试、角色表单回归和后端模型测试均通过。复审还发现一个旧会话续聊场景,已在 React 发送流程和 Go 生成接口分别复现,见行内评论。
|
|
||
| func (h *assistantHandlers) resolveAssistantTurnModel(ctx context.Context, user domain.User, model, effort string, runner domain.Runner) (string, error) { | ||
| if effort == "" { | ||
| return model, nil |
There was a problem hiding this comment.
[P2] 续聊时校验旧会话模型 ID 自带的思考强度
旧会话可以把强度存在模型 ID 里,effort 留空。我重新打开一个保存了 agy:gemini-3.8-flash-high 的会话,测试 Runner 的当前目录只提供 low 和 medium。目录加载完成后点击发送,前端仍提交这个 ID 和空 effort。同一目录下显式选 high 得到 HTTP 400,旧会话请求却得到 HTTP 202,最终生成的 CLI 参数仍为 --model gemini-3.8-flash-high。建议对 Runner 账号登录下已带变体后缀的 ID 核对当前目录。变体已下架时,在创建 generation 前提示重新选择模型。
Robert0622
left a comment
There was a problem hiding this comment.
复审通过。恢复一个保存了 gemini-3.8-flash-high 的旧会话,测试 Runner 的当前目录只提供 low 和 medium。聊天界面提示重新选模型,生成接口返回 HTTP 400,未创建 generation。在同一会话重新选择有效模型和 medium 后,接口返回 HTTP 202,离线测试回复正常写入历史。
聊天前端 404 个仓库测试和 1 个独立复测用例全部通过。角色表单已验证会保存最新目录的默认模型,相关 Go 测试和前端构建也通过。
Robert0622
left a comment
There was a problem hiding this comment.
复审合入 main 后的 4e9585b。聊天请求使用已校验的 Runner 模型 ID,附件路径也保留在工作区提示里。用旧会话重测,已下架的模型返回 HTTP 400,重新选择可用模型后返回 HTTP 202 并完成该轮。聊天前端 405 项(含独立复测)、角色表单和模型及工作区相关的 Go 回归均通过。另用 CodeBuddy iOA 的 DeepSeek V4.1 Flash 实际读取了 1000 项仓库清单,返回了指定仓库的正确分支。批准当前提交。
What changed
Scope
Compatibility
The existing model and credential schema stores the discovered efforts. Older Antigravity sessions that saved a variant ID restore the corresponding effort. Updated runners expose the native Codex and Claude Code capability metadata.
Validation
npm --prefix chatbot testpassed all 403 tests.npm --prefix chatbot run buildpassed.go test ./internal/httpapi ./internal/runtime ./web -run 'Test.*(Model|Effort|Antigravity|Logo)' -count=1 -timeout=100spassed.python3 scripts/check-public.pypassed.Safety