mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 13:31:25 +00:00
fix: clean tool schemas and thinking blocks for google-antigravity (openclaw#19732) thanks @Oceanswave
Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Oceanswave <760674+Oceanswave@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -101,6 +101,12 @@ export function sanitizeAntigravityThinkingBlocks(messages: AgentMessage[]): Age
|
||||
const candidate =
|
||||
rec.thinkingSignature ?? rec.signature ?? rec.thought_signature ?? rec.thoughtSignature;
|
||||
if (!isValidAntigravitySignature(candidate)) {
|
||||
// Preserve reasoning content as plain text when signatures are invalid/missing.
|
||||
// Antigravity Claude rejects unsigned thinking blocks, but dropping them loses context.
|
||||
const thinkingText = (block as { thinking?: unknown }).thinking;
|
||||
if (typeof thinkingText === "string" && thinkingText.trim()) {
|
||||
nextContent.push({ type: "text", text: thinkingText } as AssistantContentBlock);
|
||||
}
|
||||
contentChanged = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user