Skip to content

fix(prompt): keep OpenAI Responses reasoning items that only carry encrypted content - #2291

Open
elgamal-ahmed wants to merge 1 commit into
JetBrains:developfrom
elgamal-ahmed:claude/funny-archimedes-zyxiaf
Open

elgamal-ahmed wants to merge 1 commit into
JetBrains:developfrom
elgamal-ahmed:claude/funny-archimedes-zyxiaf

Conversation

@elgamal-ahmed

@elgamal-ahmed elgamal-ahmed commented Oct 3, 2026 •

Copy link
Copy Markdown

Keeps a reasoning output item that carries only encrypted_content in the OpenAI Responses streaming path, instead of dropping it.

ResponseOutputItemDone treated an item with no summary and no content as hidden reasoning and returned null, so with store = false and include = [reasoning.encrypted_content] the encrypted payload never reached the caller and could not be replayed on the next turn, while processResponsesAPIResponse kept the same item. The guard now also requires the encrypted content to be absent, so a genuinely empty hidden item is still ignored. I checked it with isNullOrEmpty() rather than against null, because an empty string would be sent back as "encrypted_content": "" and rejected by the API.

Tests: a new OpenAIResponsesStreamingReasoningTest streams an encrypted only reasoning item and follows it through to the next request body, where it has to come back with its id and its encrypted content, plus a guard that a fully empty hidden item is still ignored. I have not been able to run the module's jvmTest task locally, so I am relying on CI for it.

closes #2287

…crypted content

While streaming, a reasoning output item with no summary and no content was
treated as hidden reasoning and dropped, even when it carried
encrypted_content. With store = false and reasoning.encrypted_content
requested, that silently lost the item the next request has to replay, while
the non-streaming path kept it. Ignore such an item only when it has no
encrypted content either.

Closes JetBrains#2287
@elgamal-ahmed elgamal-ahmed changed the title fix(prompt): keep OpenAI Responses reasoning items that only carry en… fix(prompt): keep OpenAI Responses reasoning items that only carry encrypted content Oct 3, 2026

This branch has not been deployed

No deployments
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.

OpenAI Responses streaming drops reasoning items that have encrypted_content but no summary

1 participant