fix(anthropic): set role='assistant' on message_start streaming update (#4329)

Co-authored-by: Leela Karthik U <wqtk@novonordisk.com>
Co-authored-by: Giles Odigwe <79032838+giles17@users.noreply.github.com>
This commit is contained in:
Leela Karthik Uttarkar
2026-03-04 00:23:43 +00:00
committed by GitHub
co-authored by Leela Karthik U Giles Odigwe
parent b0ac3939c1
commit e3ea71ec2e
2 changed files with 123 additions and 0 deletions
@@ -894,6 +894,7 @@ class AnthropicClient(
usage_details.append(Content.from_usage(usage_details=details))
return ChatResponseUpdate(
role="assistant",
response_id=event.message.id,
contents=[
*self._parse_contents_from_anthropic(event.message.content),