Skip to content

fix(chat): omit empty streaming delta role#670

Open
MukundaKatta wants to merge 1 commit into
openai:mainfrom
MukundaKatta:codex/chat-delta-role-nullable
Open

fix(chat): omit empty streaming delta role#670
MukundaKatta wants to merge 1 commit into
openai:mainfrom
MukundaKatta:codex/chat-delta-role-nullable

Conversation

@MukundaKatta
Copy link
Copy Markdown

Fixes #564.
Fixes #589.

Summary:

  • omit the chat completion streaming delta role when it is the zero value during JSON marshaling
  • mark the role field as nullable in SDK metadata
  • add regression coverage for marshaling content-only stream deltas

Tests:

  • go test . -run TestChatCompletionChunkChoiceDeltaMarshalOmitsEmptyRole -count=1

@MukundaKatta MukundaKatta requested a review from a team as a code owner May 15, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant