mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 09:38:02 +00:00
fix: 修复gemini转发的部分bug
This commit is contained in:
@@ -1084,8 +1084,12 @@ async function loadCodeAssist(client, projectId = null, proxyConfig = null) {
|
|||||||
tokenInfoConfig.httpsAgent = proxyAgent
|
tokenInfoConfig.httpsAgent = proxyAgent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
await axios(tokenInfoConfig)
|
await axios(tokenInfoConfig)
|
||||||
logger.info('📋 tokeninfo 接口验证成功')
|
logger.info('📋 tokeninfo 接口验证成功')
|
||||||
|
} catch (error) {
|
||||||
|
logger.info('tokeninfo 接口获取失败', error)
|
||||||
|
}
|
||||||
|
|
||||||
const userInfoConfig = {
|
const userInfoConfig = {
|
||||||
url: 'https://www.googleapis.com/oauth2/v2/userinfo',
|
url: 'https://www.googleapis.com/oauth2/v2/userinfo',
|
||||||
@@ -1101,8 +1105,12 @@ async function loadCodeAssist(client, projectId = null, proxyConfig = null) {
|
|||||||
userInfoConfig.httpsAgent = proxyAgent
|
userInfoConfig.httpsAgent = proxyAgent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
await axios(userInfoConfig)
|
await axios(userInfoConfig)
|
||||||
logger.info('📋 userinfo 接口获取成功')
|
logger.info('📋 userinfo 接口获取成功')
|
||||||
|
} catch (error) {
|
||||||
|
logger.info('userinfo 接口获取失败', error)
|
||||||
|
}
|
||||||
|
|
||||||
// 创建ClientMetadata
|
// 创建ClientMetadata
|
||||||
const clientMetadata = {
|
const clientMetadata = {
|
||||||
|
|||||||
Reference in New Issue
Block a user