OpenRouter encrypted reasoning metadata can be lost when an empty reasoning replay closes the reasoning item before response.output_item.done arrives.
Expected behavior:
- encrypted reasoning stays open until the final
response.output_item.done event
- final
encrypted_content is preserved in reasoning metadata
- the reasoning part closes once
Actual behavior:
- an empty
reasoning_item_created replay can close the item early
- the later
output_item.done metadata is ignored because the reasoning part is no longer open
OpenRouter encrypted reasoning metadata can be lost when an empty reasoning replay closes the reasoning item before
response.output_item.donearrives.Expected behavior:
response.output_item.doneeventencrypted_contentis preserved in reasoning metadataActual behavior:
reasoning_item_createdreplay can close the item earlyoutput_item.donemetadata is ignored because the reasoning part is no longer open