Skip to content

fix(core): handle multimodal and null message fields in ChatGPT and Claude importers - #2234

Merged
phernandez merged 2 commits into
mainfrom
salvage/pr-2231
Dec 6, 2026
Merged

phernandez merged 2 commits into
mainfrom
salvage/pr-2231

Conversation

@phernandez

Copy link
Copy Markdown
Member

Salvages #2231 by @GEM-ICE so CI runs; their commit is kept as authored. Fixes #2230.

  • ChatGPT: keeps text from multimodal_text messages and mixed parts, and skips null metadata, content and parts instead of crashing the batch.
  • Claude conversations: keeps the top-level text when content holds only thinking or tool-use blocks, and handles null text, attachments and extracted content.

On top: dropped a redundant empty-message check and the __new__-built test that covered it (the CLI test reaches every branch), and added the changelog entry.

Verified: just fast-check; just fast-test tests/cli/test_import_chatgpt.py tests/cli/test_import_claude_conversations.py tests/importers (61 passed).

🤖 Generated with Claude Code

https://claude.ai/code/session_01CMYVKz9DguvH7PfmUPwps2

GEM-ICE and others added 2 commits December 6, 2026 11:16
…laude importers

Signed-off-by: ICE0803 <2325043156@qq.com>
… importer

An empty message has no content dict, so the isinstance check already returns
"". Adds the changelog entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CMYVKz9DguvH7PfmUPwps2
Signed-off-by: phernandez <paul@basicmachines.co>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 6, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-06T17:20:52.730368Z 03c8b28 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.

@phernandez
phernandez merged commit d14293f into main Dec 6, 2026
51 checks passed
@phernandez
phernandez deleted the salvage/pr-2231 branch December 6, 2026 17:54
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.

[BUG] ChatGPT and Claude conversation importers crash or silently drop message content on multimodal, thinking, and null fields

2 participants