Skip to content

Conversation

@jonwiggins
Copy link

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

  • stop relying on httpx’s JSON serializer so we can send request bodies with ensure_ascii=False
  • encode structured-output payloads as UTF-8 bytes while keeping the Content-Type: application/json header
  • add a regression test that captures the chat.completions.parse request and verifies the schema still contains plain emojis

Additional context & links

Structured outputs that include Pydantic schemas were being serialized with ensure_ascii=True, so emojis (and other non-BMP characters) arrived as surrogate escapes (e.g., \ud83d\ude0d). After this change the payload stays UTF‑8, preserving the characters end-to-end.

@jonwiggins jonwiggins requested a review from a team as a code owner October 14, 2025 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant