mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-22 10:25:20 -06:00
b2787a1c7a
When a proxied Anthropic-Messages endpoint degrades a native tool_use block into plain text, the assistant emits antml:namespaced XML tags (<antml:invoke>, <antml:parameter>). These were not recognized by the visible-text sanitizer, leaking tool-call XML into user-visible replies. Added antml: (and mm:) namespace handling to: - TOOL_CALL_QUICK_RE regex for fast pre-check - TOOL_CALL_TAG_NAMES set for tag name recognition - Tag name scanner to accept ':' in tag names - TOOL_CALL_XML_PAYLOAD_START_RE for XML payload detection - shouldDetectXmlPayload to include antml:invoke tags Fixes #97750. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>