fix(antigravity): 扩展 isSignatureRelatedError 检测 thinking 结构错误
- 添加对 "Expected thinking/redacted_thinking" 错误的检测 - 修复 antigravity 服务中 thinking 模式启用时的结构约束错误 - 确保此类错误能触发重试逻辑
This commit is contained in:
@@ -574,7 +574,17 @@ func isSignatureRelatedError(respBody []byte) bool {
|
||||
}
|
||||
|
||||
// Keep this intentionally broad: different upstreams may use "signature" or "thought_signature".
|
||||
return strings.Contains(msg, "thought_signature") || strings.Contains(msg, "signature")
|
||||
if strings.Contains(msg, "thought_signature") || strings.Contains(msg, "signature") {
|
||||
return true
|
||||
}
|
||||
|
||||
// Also detect thinking block structural errors:
|
||||
// "Expected `thinking` or `redacted_thinking`, but found `text`"
|
||||
if strings.Contains(msg, "expected") && (strings.Contains(msg, "thinking") || strings.Contains(msg, "redacted_thinking")) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func extractAntigravityErrorMessage(body []byte) string {
|
||||
|
||||
Reference in New Issue
Block a user