Prerequisites
Description
An OpenAI-compatible Responses upstream may omit item.content from the initial response.output_item.added event for an assistant message. Bifrost currently forwards the missing field unchanged.
Strict Responses clients expect message items to contain a content array from the moment the item is added, even before the first content part arrives. Grok Build 1.0.5 rejects the event when content is absent.
Steps to reproduce
- Stream a Responses request through Bifrost.
- Have the upstream emit
response.output_item.added with an item whose type is message, but without content.
- Inspect the normalized event sent to the client.
Example upstream event:
{"type":"response.output_item.added","item":{"id":"msg_1","type":"message","role":"assistant"}}
Expected behavior
Bifrost emits the message item with "content":[] while preserving all other item fields and without mutating the source object.
Actual behavior
The content field remains absent, and strict Responses clients reject the stream.
Affected area(s)
Core (Go)
Version
Reproduced on transports/v1.6.11 and current dev (0ac7f7142).
Environment
Client: Grok Build 1.0.5
API: streaming Responses
Provider shape: OpenAI-compatible Responses
Severity
Medium (some functionality impaired)
Prerequisites
devbranch.Description
An OpenAI-compatible Responses upstream may omit
item.contentfrom the initialresponse.output_item.addedevent for an assistant message. Bifrost currently forwards the missing field unchanged.Strict Responses clients expect message items to contain a content array from the moment the item is added, even before the first content part arrives. Grok Build 1.0.5 rejects the event when
contentis absent.Steps to reproduce
response.output_item.addedwith an item whosetypeismessage, but withoutcontent.Example upstream event:
{"type":"response.output_item.added","item":{"id":"msg_1","type":"message","role":"assistant"}}Expected behavior
Bifrost emits the message item with
"content":[]while preserving all other item fields and without mutating the source object.Actual behavior
The
contentfield remains absent, and strict Responses clients reject the stream.Affected area(s)
Core (Go)
Version
Reproduced on
transports/v1.6.11and currentdev(0ac7f7142).Environment
Severity
Medium (some functionality impaired)