diff --git a/src/openai/resources/chat/completions.py b/src/openai/resources/chat/completions.py index ceaf3c2fec..2bb2671fbb 100644 --- a/src/openai/resources/chat/completions.py +++ b/src/openai/resources/chat/completions.py @@ -812,6 +812,7 @@ def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> ChatCompletion | Stream[ChatCompletionChunk]: validate_response_format(response_format) + extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})} if stream else extra_headers return self._post( "/chat/completions", body=maybe_transform(