From 1a991041f1e2d21611dffd467d1cd0d225148ee6 Mon Sep 17 00:00:00 2001 From: mysoul12138 <839465496@qq.com> Date: Sat, 30 May 2026 15:13:03 +0800 Subject: [PATCH] fix: use getModelLabel() in _formatSessionModelWithGateway fallback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When gateway_routing is absent, _formatGatewayModelLabel returns '' and the fallback path returns raw s.model — which may contain an @provider: prefix (e.g. @token-plan-cn.xiaomimimo.com:mimo-v2.5-pro). getModelLabel() already handles stripping @provider: prefixes (ui.js:2855) but was never called in this fallback path. Route through it so the session list always displays a clean model name. Closes #3172 --- static/sessions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/sessions.js b/static/sessions.js index 0c89c1dabe9..76b9c7dc2f2 100644 --- a/static/sessions.js +++ b/static/sessions.js @@ -120,7 +120,7 @@ function _formatSessionModelWithGateway(s){ if(!s||!s.model)return''; const routing=(typeof _latestGatewayRoutingForSession==='function')?_latestGatewayRoutingForSession(s):(s.gateway_routing||null); if(typeof _formatGatewayModelLabel==='function'){ - return _formatGatewayModelLabel(s.model,s.model,routing)||s.model; + return _formatGatewayModelLabel(s.model,s.model,routing)||getModelLabel(s.model); } return s.model; }