Fix Responses JSON schema alias serialization (#38519)

Signed-off-by: noobhappylife <aratar1991@hotmail.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
noobHappylife
2026-04-09 10:50:16 +08:00
committed by GitHub
co-authored by OpenAI Codex
parent d37b378762
commit 2a49284c8a
6 changed files with 104 additions and 32 deletions
@@ -106,7 +106,7 @@ def serialize_message(msg):
return msg.to_dict()
else:
# fallback to pydantic dump
return msg.model_dump_json(by_alias=True)
return msg.model_dump(mode="json", by_alias=True)
def serialize_messages(msgs):