Commit ae3d6fd7 authored by ianshaw's avatar ianshaw
Browse files

fix(antigravity): 扩展 isSignatureRelatedError 检测 thinking 结构错误

- 添加对 "Expected thinking/redacted_thinking" 错误的检测
- 修复 antigravity 服务中 thinking 模式启用时的结构约束错误
- 确保此类错误能触发重试逻辑
parent 118ca5cf
......@@ -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 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment