Skip to content

fix(models): align CLI catalogs and reasoning choices - #1082

Merged
crispinhu27 merged 9 commits into
mainfrom
feature/chat-model-catalog
Nov 19, 2026
Merged

crispinhu27 merged 9 commits into
mainfrom
feature/chat-model-catalog

Conversation

@crispinhu27

Copy link
Copy Markdown
Collaborator

What changed

  • Show concrete models in the chat and role pickers. The chat composer restores the browser's available model preference or selects the first model.
  • Update the Antigravity Gemini API catalog and load the account catalog from the selected machine. Group Claude and Gemini account variants under a single model and send the CLI ID for the chosen effort.
  • Preserve the effort metadata Codex and Claude Code return from account model discovery.
  • Use the Antigravity, Kimi Code, and Pi logos for their CLIs and recognize the brands of Kimi models, Cursor Composer, and Claude Code aliases.

Scope

  • Platform core / API / runner
  • Classic
  • Shared behavior contract

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 test passed all 403 tests.
  • npm --prefix chatbot run build passed.
  • go test ./internal/httpapi ./internal/runtime ./web -run 'Test.*(Model|Effort|Antigravity|Logo)' -count=1 -timeout=100s passed.
  • python3 scripts/check-public.py passed.
  • Chromium against a local LoopForge and MySQL instance verified the model picker, representative effort choices, and logos for all ten CLIs using captured CLI catalogs, built-in catalogs, and a local gateway.

Safety

  • The diff contains project sources and test fixtures intended for the public repository.
  • The bundled artwork includes source and license notes.

@Robert0622 Robert0622 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

该提交的聊天前端 403 项测试和生产构建通过,模型目录与思考强度相关的 Go/Web 测试也通过。补测了角色弹窗在目录变更后重新打开,以及 Runner 实时探测但尚未保存目录的情况,分别发现以下问题。

Comment thread web/app/agents.js Outdated
return;
}
applyAgentModelUI(currentAgentExecutorId(),model,f.elements.effort?.value);
applyAgentModelUI(currentAgentExecutorId(),model,f.elements.effort?.value,!a.id||currentAgentExecutorId()!==(a.executorId||'codebuddy'));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 新建角色会保存已下架的默认模型。在同一个页面先打开一次新建角色,目录只返回 retired-model。关闭弹窗,在服务端把目录更新为只有 current-model 再打开。实测未手动选择模型,目录刷新完成后界面仍选中 retired-model,PUT /api/agents 也提交了这个 ID。首次绘制从缓存自动选出的值被这里当作手动选择保留。建议保留用户明确选择的值,并在最新目录返回后重新核对自动选中的值。

Comment thread internal/httpapi/assistant_effort.go Outdated
var efforts []string
if runnerLogin && engine == runtime.AgentCLIAntigravity {
efforts = runtime.AgyAccountModelEfforts(id)
models := runtime.FoldAgyAccountModels(assistantEngineCustomModels(user, engine))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 生成时的强度校验没有使用当前 Runner 刚探测到的目录。用空的个人已保存目录实测,账号探测只返回某个 Gemini 系列的 low 和 medium,但同一机器的生成校验接受了 high,命令构造器最终写入 --model gemini-3.8-flash-high。旧标签页或 API 客户端因此可以提交账号没有返回的变体。建议让执行校验和选择器共用该机器的有效目录,按实际提供的档位解析模型 ID。

@Robert0622 Robert0622 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

角色表单刷新目录后已能正确保存新默认模型。聊天前端的 403 个现有测试、角色表单回归和后端模型测试均通过。复审还发现一个旧会话续聊场景,已在 React 发送流程和 Go 生成接口分别复现,见行内评论。

Comment thread internal/httpapi/assistant_effort.go Outdated

func (h *assistantHandlers) resolveAssistantTurnModel(ctx context.Context, user domain.User, model, effort string, runner domain.Runner) (string, error) {
if effort == "" {
return model, nil

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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
Robert0622 previously approved these changes Nov 19, 2026

@Robert0622 Robert0622 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

复审通过。恢复一个保存了 gemini-3.8-flash-high 的旧会话,测试 Runner 的当前目录只提供 low 和 medium。聊天界面提示重新选模型,生成接口返回 HTTP 400,未创建 generation。在同一会话重新选择有效模型和 medium 后,接口返回 HTTP 202,离线测试回复正常写入历史。

聊天前端 404 个仓库测试和 1 个独立复测用例全部通过。角色表单已验证会保存最新目录的默认模型,相关 Go 测试和前端构建也通过。

@Robert0622 Robert0622 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

复审合入 main 后的 4e9585b。聊天请求使用已校验的 Runner 模型 ID,附件路径也保留在工作区提示里。用旧会话重测,已下架的模型返回 HTTP 400,重新选择可用模型后返回 HTTP 202 并完成该轮。聊天前端 405 项(含独立复测)、角色表单和模型及工作区相关的 Go 回归均通过。另用 CodeBuddy iOA 的 DeepSeek V4.1 Flash 实际读取了 1000 项仓库清单,返回了指定仓库的正确分支。批准当前提交。

@crispinhu27
crispinhu27 merged commit 6f606cf into main Nov 19, 2026
16 checks passed
@crispinhu27
crispinhu27 deleted the feature/chat-model-catalog branch November 19, 2026 13:36
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.

2 participants