From 3df766f4d553cc22788ba5bfb4a573b96c265903 Mon Sep 17 00:00:00 2001 From: OhYee Date: Tue, 3 Feb 2026 11:22:44 +0800 Subject: [PATCH] fix(api): use dynamic baseUrl instead of hardcoded localhost MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace hardcoded 'http://127.0.0.1:8080' with dynamic info.baseUrl to support configurable API endpoints. This allows the ModelAPI to work with different base URLs configured in the info object rather than being locked to localhost. 将硬编码的 'http://127.0.0.1:8080' 替换为动态的 info.baseUrl, 以支持可配置的 API 端点。 这使得 ModelAPI 能够使用 info 对象中配置的不同基础 URL, 而不是锁定到本地主机。 Change-Id: I6c29429edc03add8e0440bcfd9f44c27ab015d4b Signed-off-by: OhYee --- src/model/api/model-api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/model/api/model-api.ts b/src/model/api/model-api.ts index 3c20cee..5a4ea0a 100644 --- a/src/model/api/model-api.ts +++ b/src/model/api/model-api.ts @@ -25,7 +25,7 @@ export class ModelAPI { const provider = createOpenAICompatible({ name: model || info.model || '', apiKey: info.apiKey, - baseURL: 'http://127.0.0.1:8080', // info.baseUrl, + baseURL: info.baseUrl || '', headers: info.headers, });