mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-17 16:12:21 -06:00
74500f334e
* fix(ai): enforce message_stop only for direct Anthropic models The Anthropic SSE transport threw 'stream ended before message_stop' only when a refusal buffer happened to be non-empty, so a truncated first-party stream could pass silently while compatible proxy providers that legitimately omit message_stop failed intermittently. The invariant now keys off the transport contract owner: direct Anthropic models always require message_stop; proxy providers are exempt. * test(ai): cover proxy streams ending without message_stop ClawSweeper P1: the proxy exemption had no focused test, so the lenient branch could regress silently. A non-anthropic provider through a custom endpoint now proves stopReason=stop with no error when the stream ends without message_stop.