From b4806c4366a434a555d96119e809c0d31a53a35b Mon Sep 17 00:00:00 2001 From: zhayujie Date: Sat, 28 Feb 2026 18:35:04 +0800 Subject: [PATCH] fix: model provider config --- channel/web/static/js/console.js | 3 ++- channel/web/web_channel.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/channel/web/static/js/console.js b/channel/web/static/js/console.js index 722fb35..c0b4201 100644 --- a/channel/web/static/js/console.js +++ b/channel/web/static/js/console.js @@ -909,7 +909,8 @@ function initConfigView(data) { const providerEl = document.getElementById('cfg-provider'); const providerOpts = Object.entries(configProviders).map(([pid, p]) => ({ value: pid, label: p.label })); - const detected = detectProvider(configCurrentModel); + // if use_linkai is enabled, always select linkai as the provider + const detected = data.use_linkai ? 'linkai' : detectProvider(configCurrentModel); cfgProviderValue = detected || (providerOpts[0] ? providerOpts[0].value : ''); initDropdown(providerEl, providerOpts, cfgProviderValue, onProviderChange); diff --git a/channel/web/web_channel.py b/channel/web/web_channel.py index 1f4aa07..56ac6ba 100644 --- a/channel/web/web_channel.py +++ b/channel/web/web_channel.py @@ -522,6 +522,7 @@ class ConfigHandler: "use_agent": use_agent, "title": title, "model": local_config.get("model", ""), + "use_linkai": bool(local_config.get("use_linkai", False)), "channel_type": local_config.get("channel_type", ""), "agent_max_context_tokens": local_config.get("agent_max_context_tokens", 50000), "agent_max_context_turns": local_config.get("agent_max_context_turns", 20),