From 153c0616d28172f8d62f01e1813af70765425589 Mon Sep 17 00:00:00 2001 From: SilenceLurker Date: Tue, 10 Mar 2026 23:19:51 +0800 Subject: [PATCH] feat(api-config): add model fetch, connection test, and Google AI Studio support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add "获取模型" button: fetches /v1/models and populates datalist autocomplete - Add "测试连接" button: tries GET /models first (free), falls back to minimal type-specific request if endpoint unsupported; shows inline result - Google AI Studio: auto-fill fixed endpoint URL, hide URL field, fetch models via native v1beta/models?key= API, test via same endpoint - Collapse Chat/Embedding/Rerank advanced params into
sections - Simplify provider options: remove ambiguous "实验性全兼容" option - Clear test result and model datalist cache on each modal open Co-Authored-By: Claude Sonnet 4.6 --- assets/api-config-panel.html | 125 ++++++++++++++-------- ui/api-config-bindings.js | 199 +++++++++++++++++++++++++++++++++++ 2 files changed, 283 insertions(+), 41 deletions(-) diff --git a/assets/api-config-panel.html b/assets/api-config-panel.html index a826ab0..b927a2d 100644 --- a/assets/api-config-panel.html +++ b/assets/api-config-panel.html @@ -41,7 +41,6 @@
连接配置列表 -
-
-
暂无连接配置,点击「新建配置」添加。
@@ -74,13 +71,12 @@ 为每个系统功能指定使用的连接配置。选单只会显示类型匹配的配置。
-