diff --git a/astrbot/core/provider/manager.py b/astrbot/core/provider/manager.py index bbf526d4e..3b50e4976 100644 --- a/astrbot/core/provider/manager.py +++ b/astrbot/core/provider/manager.py @@ -391,6 +391,7 @@ class ProviderManager: # 和配置文件保持同步 config_ids = [provider["id"] for provider in self.providers_config] + logger.debug(f"providers in user's config: {config_ids}") for key in list(self.inst_map.keys()): if key not in config_ids: await self.terminate_provider(key) diff --git a/dashboard/src/views/ProviderPage.vue b/dashboard/src/views/ProviderPage.vue index 941de4780..9915f0112 100644 --- a/dashboard/src/views/ProviderPage.vue +++ b/dashboard/src/views/ProviderPage.vue @@ -712,6 +712,19 @@ export default { // 2. 为每个provider创建一个并发的测试请求 const promises = this.config_data.provider.map(p => { + if (!p.enable) { + const index = this.providerStatuses.findIndex(s => s.id === p.id); + if (index !== -1) { + const disabledStatus = { + ...this.providerStatuses[index], + status: 'unavailable', + error: '该提供商未被用户启用' + }; + this.providerStatuses.splice(index, 1, disabledStatus); + } + return Promise.resolve(); + } + return axios.get(`/api/config/provider/check_one?id=${p.id}`) .then(res => { if (res.data && res.data.status === 'ok') { @@ -887,4 +900,9 @@ export default { .v-window { border-radius: 4px; } + +.status-card { + height: 120px; + overflow-y: auto; +}