mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 09:38:02 +00:00
fix: 修复gemini转发未响应问题
This commit is contained in:
@@ -279,7 +279,7 @@ async function sendGeminiRequest({
|
||||
// 添加代理配置
|
||||
const proxyAgent = createProxyAgent(proxy)
|
||||
if (proxyAgent) {
|
||||
axiosConfig.httpAgent = proxyAgent
|
||||
// 只设置 httpsAgent,因为目标 URL 是 HTTPS (cloudcode.googleapis.com)
|
||||
axiosConfig.httpsAgent = proxyAgent
|
||||
axiosConfig.proxy = false
|
||||
logger.info(`🌐 Using proxy for Gemini API request: ${ProxyHelper.getProxyDescription(proxy)}`)
|
||||
@@ -389,7 +389,7 @@ async function getAvailableModels(accessToken, proxy, projectId, location = 'us-
|
||||
|
||||
const proxyAgent = createProxyAgent(proxy)
|
||||
if (proxyAgent) {
|
||||
axiosConfig.httpAgent = proxyAgent
|
||||
// 只设置 httpsAgent,因为目标 URL 是 HTTPS (cloudcode.googleapis.com)
|
||||
axiosConfig.httpsAgent = proxyAgent
|
||||
axiosConfig.proxy = false
|
||||
logger.info(
|
||||
@@ -492,7 +492,7 @@ async function countTokens({
|
||||
// 添加代理配置
|
||||
const proxyAgent = createProxyAgent(proxy)
|
||||
if (proxyAgent) {
|
||||
axiosConfig.httpAgent = proxyAgent
|
||||
// 只设置 httpsAgent,因为目标 URL 是 HTTPS (cloudcode.googleapis.com)
|
||||
axiosConfig.httpsAgent = proxyAgent
|
||||
axiosConfig.proxy = false
|
||||
logger.info(
|
||||
|
||||
Reference in New Issue
Block a user