Dev Main by v3.4 测试数据删除 #10

Merged
jacy merged 91 commits from dev into main 2026-07-28 17:19:22 +08:00
Showing only changes of commit 37038a7591 - Show all commits
@@ -50,6 +50,14 @@ export class LlmChatClient {
Authorization: `Bearer ${params.apiKey}`, Authorization: `Bearer ${params.apiKey}`,
}, },
body: JSON.stringify(body), body: JSON.stringify(body),
}).catch((err: unknown) => {
const cause =
err && typeof err === 'object' && 'cause' in err
? (err as { cause?: { code?: string; message?: string } }).cause
: undefined;
const detail = cause?.code || cause?.message || (err instanceof Error ? err.message : String(err));
this.logger.warn(`llm chat network error ${url}: ${detail}`);
throw new Error(`无法连接语言模型服务(${detail})。请检查 Base URL 是否可从服务器访问,或更换可达的模型网关`);
}); });
const text = await res.text(); const text = await res.text();