mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-10 00:11:19 +00:00
fix(agents): recover thinking errors from provider body (#98411)
This commit is contained in:
parent
d18b843a47
commit
95aced10b0
2 changed files with 13 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue