Skip to content

fix: preserve content fields in Python serialization - #155

Open
rksharma-owg wants to merge 1 commit into
openai:mainfrom
rksharma-owg:codex/fix-message-content-serialization
Open

fix: preserve content fields in Python serialization#155
rksharma-owg wants to merge 1 commit into
openai:mainfrom
rksharma-owg:codex/fix-message-content-serialization

Conversation

@rksharma-owg

Copy link
Copy Markdown

Fixes #78

Summary

  • serialize concrete Content subclasses when Message.model_dump_json() is used
  • add a regression test for text message content

Validation

  • PYTHONPATH=python uv run --with pydantic --with pytest --python 3.13 --no-project pytest -q tests/test_message_serialization.py (1 passed)
  • python3.14 -m compileall -q python/openai_harmony tests/test_message_serialization.py
  • git diff origin/main --check

Before this change, the regression test produced content: [{}]; after the change it preserves the text field.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-08T04:59:27.131891Z 308266a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

Messages do not serialize properly

1 participant