Repository navigation
fix(remote-connect): name the real models behind bot model aliases - #3814
Merged
Merged
Conversation
The IM bot /model menu listed the primary alias as a bare "主力模型" with no hint of which configured model it runs, and offered no entry for the fast alias at all, so a session switched to fast on desktop showed no current marker. Label both aliases with the model they resolve to, e.g. "主力模型(gpt-6.1-sol · OpenAI)", show "未配置" when the primary default is missing, list the fast alias when it is configured, and keep the session's selection on the pending menu so a re-rendered menu marks the right entry instead of always marking the primary one. Co-authored-by: OpenBitFun <318544290+bitfun-ai@users.noreply.github.com>
bobleer
marked this pull request as ready for review
November 8, 2026 01:45
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.
Summary
IM bot 的
/model菜单里,第 1 项只显示「主力模型」,看不出它实际指向哪个模型;快速模型别名则完全没有入口。这个 PR 让两个别名都带上实际解析到的模型名:主力模型(gpt-6.1-sol · OpenAI)/Primary model (alpha · Provider A);没配置主力模型时显示主力模型(未配置)快速模型(xxx · 供应商)一项(与桌面端模型选择器的 primary / fast 快捷项对齐)Type and Areas
Type: bug fix (UX)
Areas: Rust core — Remote Connect IM bot (
command_router.rs, botlocale.rs/state.rs)Motivation / Impact
switch_model_primary字符串作为第 1 项,没有读取目录里的default_models.primary。现在从同一份 model catalog 解析default_models.primary/default_models.fast。fast时,bot 菜单原来没有任何一项带「当前」标记;现在会标在快速模型那一项上。PendingAction::SelectModel现在会带上打开菜单时的会话选择,所以输入无效编号后重新渲染的菜单会标出正确的当前项,不会再固定标在主力模型上。(selection, label)列表(第 1 项是primary,配置了快速模型时接着是fast,然后是各个已启用模型),编号到选择的映射只存一份。PendingAction不做持久化,没有兼容性问题。Verification
cargo test -p openbitfun-core --features product-full --lib -- remote_connect::bot— 79 passed(包含新增的model_menu_names_the_models_behind_primary_and_fast、model_menu_flags_an_unconfigured_primary_model,以及扩展了断言的remote_model_switch_reads_and_updates_the_device_session)cargo test -p openbitfun-services-integrations --features remote-connect --lib -- bot— 74 passedcargo clippy -p openbitfun-core --features product-full --lib— 改动部分没有新增告警cargo fmt -p openbitfun-coreChecklist
Generated with OpenBitFun