Skip to content

[Platform] Serialize assistant message content as content parts in Open Responses bridge - #2357

Open
chr-hertel wants to merge 1 commit into
symfony:mainfrom
chr-hertel:fix/open-responses-assistant-content-parts
Open

[Platform] Serialize assistant message content as content parts in Open Responses bridge#2357
chr-hertel wants to merge 1 commit into
symfony:mainfrom
chr-hertel:fix/open-responses-assistant-content-parts

Conversation

@chr-hertel

@chr-hertel chr-hertel commented Jul 21, 2026

Copy link
Copy Markdown
Member
Q A
Bug fix? yes
New feature? no
Docs? no
Issues Fix #2346
License MIT
  • AssistantMessageNormalizer emitted content as a raw string for text-only assistant messages; strict Responses API implementations (e.g. litellm) reject that and expect an output message item
  • Now emits the fully-specified output message item: type: message, id (derived from the message UUID), status: completed, and content as output_text parts with annotations — the shape strict validators (litellm/Pydantic) require, since a partial item matches neither EasyInputMessageParam nor ResponseOutputMessageParam
  • Verified live against OpenAI, Azure OpenAI, and Scaleway (which runs a strict litellm-style validator and rejected both the old raw string and intermediate partial shapes)
  • Added contract-level regression test reproducing the message bag from the issue

🤖 Generated with Claude Code

@chr-hertel
chr-hertel force-pushed the fix/open-responses-assistant-content-parts branch from ef3e7c5 to 843e3d7 Compare July 21, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Platform Issues & PRs about the AI Platform component Status: Reviewed

Projects

None yet

3 participants