diff --git a/src/openai/_base_client.py b/src/openai/_base_client.py index 58490e4430..9339a367b9 100644 --- a/src/openai/_base_client.py +++ b/src/openai/_base_client.py @@ -436,7 +436,7 @@ def _build_headers(self, options: FinalRequestOptions, *, retries_taken: int = 0 self._validate_headers(headers_dict, custom_headers) # headers are case-insensitive while dictionaries are not. - headers = httpx.Headers(headers_dict) + headers = httpx.Headers(headers_dict, encoding="utf-8") idempotency_header = self._idempotency_header if idempotency_header and options.idempotency_key and idempotency_header not in headers: