Skip to content

Conversation

@mr-karan
Copy link
Contributor

The select_responses_options function was always adding 'reasoning.encrypted_content' to the include list for stateless requests, completely ignoring the LLM.enable_encrypted_reasoning flag.

This caused errors when using models that don't support encrypted content:
"Encrypted content is not supported with this model."

Changes:

  • Only include encrypted reasoning when enable_encrypted_reasoning=True
  • Add test to verify the flag is respected when set to False
  • Default behavior (False) now prevents encrypted content from being added

Fixes: https://github.com/OpenHands/OpenHands/issues/11406

The select_responses_options function was always adding
'reasoning.encrypted_content' to the include list for stateless requests,
completely ignoring the LLM.enable_encrypted_reasoning flag.

This caused errors when using models that don't support encrypted content:
  "Encrypted content is not supported with this model."

Changes:
- Only include encrypted reasoning when enable_encrypted_reasoning=True
- Add test to verify the flag is respected when set to False
- Default behavior (False) now prevents encrypted content from being added

Fixes: https://github.com/OpenHands/OpenHands/issues/11406
if "reasoning.encrypted_content" not in include_list:
include_list.append("reasoning.encrypted_content")
# Only add encrypted reasoning if the LLM has enable_encrypted_reasoning=True
if getattr(llm, "enable_encrypted_reasoning", False):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if getattr(llm, "enable_encrypted_reasoning", False):
if llm.enable_encrypted_reasoning:

LLM class is a pydantic model, the field always exists, right?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should make it True by default, but, as your PR does, respect it if set to False

enable_encrypted_reasoning: bool = Field(

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@OpenHands Lets make enable_encrypted_reasoning True by default, but make sure in this PR that we do respect it if set to False.

Run precommit and tests before pushing, then push to PR.

Copy link
Collaborator

@enyst enyst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Left a small question, but this looks good to me!

@blacksmith-sh
Copy link
Contributor

blacksmith-sh bot commented Nov 26, 2025

[Automatic Post]: It has been a while since there was any activity on this PR. @mr-karan, are you still working on it? If so, please go ahead, if not then please request review, close it, or request that someone else follow up.

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.

2 participants