Skip to content

AWS Proxy Implementation: Stream Missing Space After "data:" Differs from OpenAI's SSE Format #60

@AskNathan

Description

@AskNathan

When using your proxy service with streaming enabled (stream=true), there's an inconsistency with OpenAI's original SSE format. The proxy returns data chunks without a space after "data:", while OpenAI's API includes a space.
OpenAI's original format:
data: {"id":"xxx","object":"chat.completion.chunk","choices":[{"delta":{"content":"Hello"}}]}
Current proxy output:
data:{"id":"xxx","object":"chat.completion.chunk","choices":[{"delta":{"content":"Hello"}}]}
This inconsistency causes errors in client applications that are designed to work with OpenAI's original format. Many existing OpenAI clients expect the space after "data:" as they're built based on OpenAI's implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions