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:
@@ -904,22 +904,22 @@ async function handleStandardStreamGenerateContent(req, res) {
|
|||||||
stack: error.stack
|
stack: error.stack
|
||||||
})
|
})
|
||||||
|
|
||||||
// 处理速率限制
|
// 处理速率限制 暂时去掉此处的标记限流的处理
|
||||||
if (error.response?.status === 429 && accountId) {
|
// if (error.response?.status === 429 && accountId) {
|
||||||
logger.warn(
|
// logger.warn(
|
||||||
`⚠️ Gemini account ${accountId} rate limited (Standard Stream API), marking as limited`
|
// `⚠️ Gemini account ${accountId} rate limited (Standard Stream API), marking as limited`
|
||||||
)
|
// )
|
||||||
try {
|
// try {
|
||||||
const rateLimitAccountType = isApiAccount ? 'gemini-api' : 'gemini'
|
// const rateLimitAccountType = isApiAccount ? 'gemini-api' : 'gemini'
|
||||||
await unifiedGeminiScheduler.markAccountRateLimited(
|
// await unifiedGeminiScheduler.markAccountRateLimited(
|
||||||
accountId, // 账户 ID
|
// accountId, // 账户 ID
|
||||||
rateLimitAccountType,
|
// rateLimitAccountType,
|
||||||
sessionHash
|
// sessionHash
|
||||||
)
|
// )
|
||||||
} catch (limitError) {
|
// } catch (limitError) {
|
||||||
logger.warn('Failed to mark account as rate limited in scheduler:', limitError)
|
// logger.warn('Failed to mark account as rate limited in scheduler:', limitError)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (!res.headersSent) {
|
if (!res.headersSent) {
|
||||||
const statusCode = normalizedError.status || 500
|
const statusCode = normalizedError.status || 500
|
||||||
|
|||||||
@@ -1139,7 +1139,10 @@
|
|||||||
(account.platform === 'claude' ||
|
(account.platform === 'claude' ||
|
||||||
account.platform === 'claude-console' ||
|
account.platform === 'claude-console' ||
|
||||||
account.platform === 'openai' ||
|
account.platform === 'openai' ||
|
||||||
account.platform === 'openai-responses') &&
|
account.platform === 'openai-responses' ||
|
||||||
|
account.platform === 'gemini' ||
|
||||||
|
account.platform === 'gemini-api' ||
|
||||||
|
account.platform === 'ccr') &&
|
||||||
(account.status === 'unauthorized' ||
|
(account.status === 'unauthorized' ||
|
||||||
account.status !== 'active' ||
|
account.status !== 'active' ||
|
||||||
account.rateLimitStatus?.isRateLimited ||
|
account.rateLimitStatus?.isRateLimited ||
|
||||||
|
|||||||
Reference in New Issue
Block a user