fix(TLS 驗證): 套用全域憑證忽略設定

This commit is contained in:
2026-06-26 09:20:57 +00:00
parent 4431f2fec5
commit bc0df06445
5 changed files with 21 additions and 10 deletions
+2
View File
@@ -1,4 +1,5 @@
import axios from 'axios';
import { getInsecureHttpsAgent } from './config.js';
import { warn } from './log.js';
/** 本次執行的 token 累計(跨所有 LLM 呼叫)。 */
@@ -176,6 +177,7 @@ async function fetchOpenRouterQuota({ apiKey, baseURL }, get) {
const resp = await get(`${stripSlash(baseURL)}/auth/key`, {
headers: { Authorization: `Bearer ${apiKey}` },
timeout: 30000,
httpsAgent: getInsecureHttpsAgent(),
});
const d = resp.data?.data || {};
const used = num(d.usage);