mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 03:33:59 +00:00
fix(agents): recover thinking errors from provider body (#98411)
This commit is contained in:
@@ -737,6 +737,18 @@ describe("wrapAnthropicStreamWithRecovery", () => {
|
||||
errorMessage: terminalThinkingSignatureError,
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: "ProviderHttpError errorBody",
|
||||
createError: () =>
|
||||
Object.assign(new Error(genericizedProviderError), {
|
||||
errorBody: JSON.stringify({
|
||||
error: {
|
||||
message: terminalThinkingSignatureError,
|
||||
type: "invalid_request_error",
|
||||
},
|
||||
}),
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: "cyclic cause graph",
|
||||
createError: () => {
|
||||
|
||||
@@ -545,6 +545,7 @@ function shouldRecoverAnthropicThinkingError(
|
||||
current.error,
|
||||
current.rawError,
|
||||
current.errorMessage,
|
||||
current.errorBody,
|
||||
current.message,
|
||||
]);
|
||||
for (const candidate of candidates) {
|
||||
|
||||
Reference in New Issue
Block a user