[frontend] dump openai responses type by alias (#38262)

Signed-off-by: cjackal <44624812+cjackal@users.noreply.github.com>
This commit is contained in:
cjackal
2026-03-27 14:58:20 +09:00
committed by GitHub
parent 7cc302dd87
commit 2babac0bed

View File

@@ -105,8 +105,8 @@ def serialize_message(msg):
elif hasattr(msg, "to_dict"):
return msg.to_dict()
else:
# fallback to pyandic dump
return msg.model_dump_json()
# fallback to pydantic dump
return msg.model_dump_json(by_alias=True)
def serialize_messages(msgs):