Merge pull request #468 from s-Joshua-s/fix/thinking-block-modification-error
fix(api): 修复 thinking 块被意外修改导致的 400 错误
This commit is contained in:
@@ -1168,6 +1168,12 @@ func isSignatureRelatedError(respBody []byte) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// Detect thinking block modification errors:
|
||||
// "thinking or redacted_thinking blocks in the latest assistant message cannot be modified"
|
||||
if strings.Contains(msg, "cannot be modified") && (strings.Contains(msg, "thinking") || strings.Contains(msg, "redacted_thinking")) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user