Repository navigation
fix(omp): qualify model choice labels with their provider - #78
Merged
Merged
Conversation
OMP lists every model of every configured provider in one `model` select and names each choice with the bare model name, keeping the provider in the description. Pi — the multi-provider agent this repo already ships — names its choices `provider/model`, and that is what the pickers render, so a machine with several providers showed OMP models that could not be told apart. Qualify the labels in the OMP vendor module beside `ensure_omp_yolo_config_option` and call it from the two places that already gate on the OMP agent, before any config options leave the manager. The pickers keep rendering the advertised label, so Pi and Claude are untouched.
Contributor
Author
|
CI 说明:这个 PR 的 12 个 job 全部在
本分支相对 master 只多 3 个 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
OMP 把每个已配置 provider 的全部模型塞进 ACP 的同一个
model选择项里,同时:而仓库里已接入的 Pi 是
name: \${provider}/${name}``,picker 原样渲染。结果就是配了多个中转的机器上,OMP 会话的模型菜单是一串无法区分的重名模型(本机 16 个 provider / 102 个模型),provider 只能靠悬停 tooltip 看到。改法
放在 OMP 自己的供应商修补模块里,紧挨已有的
ensure_omp_yolo_config_option,只在已经判定为 OMP 的两个调用点触发:manager/protocol/vendor.rsqualify_omp_model_labels:只处理category=model的 select;只处理 description 以同一个provider/开头且 label 还没有前缀 的选项,把它写成provider/模型名manager/protocol/session_update.rsconfig_option_update路径,在已有的is_omp分支里调用manager/runner/controls_emit.rsis_omp分支里调用前端一行没改(
git diff master -- frontend为空)—— picker 继续渲染 agent advertised 的 label,所以 Pi(mcgrx/…)、Claude(sonnet)都不受影响,headless/mobile 等其它客户端也自动一致。验收
cargo test -p agents --lib:888 passed / 0 failedqualifies_omp_model_labels_with_their_provider(含cc-switch-open-router/stealth/ox-alpha这种嵌套 id)、leaves_labels_that_already_name_their_provider_alone(Pi 已带前缀 / Claude 别名都不动)deepseek/DeepSeek V4.1 Flash 1017、xai-oauth/Grok 4.20 (Non-Reasoning)等注意:预会话的模型列表来自 10 分钟 TTL 的能力目录缓存,改完要等缓存刷新(或新建会话)才看得到新标签。