fix: enhance error handling for Gemini API key validation
Some checks failed
Publish Docker image / Push Docker image to multiple registries (push) Has been cancelled
Some checks failed
Publish Docker image / Push Docker image to multiple registries (push) Has been cancelled
This commit is contained in:
parent
e146b14d46
commit
2ae9997f29
@ -35,6 +35,8 @@ func ShouldDisableChannel(err *model.Error, statusCode int) bool {
|
|||||||
strings.Contains(lowerMessage, "balance") ||
|
strings.Contains(lowerMessage, "balance") ||
|
||||||
strings.Contains(lowerMessage, "permission denied") ||
|
strings.Contains(lowerMessage, "permission denied") ||
|
||||||
strings.Contains(lowerMessage, "organization has been restricted") || // groq
|
strings.Contains(lowerMessage, "organization has been restricted") || // groq
|
||||||
|
strings.Contains(lowerMessage, "api key not valid") || // gemini
|
||||||
|
strings.Contains(lowerMessage, "api key expired") || // gemini
|
||||||
strings.Contains(lowerMessage, "已欠费") {
|
strings.Contains(lowerMessage, "已欠费") {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user