From b1f5658437e4f6932202bf1501fba94153e030fc Mon Sep 17 00:00:00 2001 From: Edoardo Debenedetti Date: Thu, 12 Mar 2026 11:04:23 +0100 Subject: [PATCH 1/2] Add stream_thoughts to ResponseFormatOverrides Sync the SDK's ResponseFormatOverrides with the server by adding the missing stream_thoughts field, matching what the orchestrator already supports. Co-Authored-By: Claude Opus 4.6 --- src/sequrity/control/types/headers.py | 8 +++++++- test/control/test_headers.py | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/sequrity/control/types/headers.py b/src/sequrity/control/types/headers.py index e77ffe3..fbe3d98 100644 --- a/src/sequrity/control/types/headers.py +++ b/src/sequrity/control/types/headers.py @@ -594,6 +594,10 @@ class ResponseFormatOverrides(BaseModel): default=None, description="When True, returns only essential result value as plain text, stripping all metadata.", ) + stream_thoughts: bool | None = Field( + default=None, + description="Whether to stream the model's thinking process in the response.", + ) include_program: bool | None = Field( default=None, description="Whether to include the generated program in the response." ) @@ -711,6 +715,7 @@ def dual_llm( pllm_debug_info_level: DebugInfoLevel | None = None, # Response format strip_response_content: bool | None = None, + stream_thoughts: bool | None = None, include_program: bool | None = None, include_policy_check_history: bool | None = None, include_namespace_snapshot: bool | None = None, @@ -742,10 +747,11 @@ def dual_llm( response_fmt = None if any( v is not None - for v in [strip_response_content, include_program, include_policy_check_history, include_namespace_snapshot] + for v in [strip_response_content, stream_thoughts, include_program, include_policy_check_history, include_namespace_snapshot] ): response_fmt = ResponseFormatOverrides( strip_response_content=strip_response_content, + stream_thoughts=stream_thoughts, include_program=include_program, include_policy_check_history=include_policy_check_history, include_namespace_snapshot=include_namespace_snapshot, diff --git a/test/control/test_headers.py b/test/control/test_headers.py index deb852d..547a74a 100644 --- a/test/control/test_headers.py +++ b/test/control/test_headers.py @@ -314,6 +314,7 @@ def test_all_entries_set(self): ), response_format=ResponseFormatOverrides( strip_response_content=False, + stream_thoughts=True, include_program=True, include_policy_check_history=True, include_namespace_snapshot=True, From e8cc0e64575ab2ae29561a00b597a828d94930e7 Mon Sep 17 00:00:00 2001 From: Edoardo Debenedetti Date: Thu, 12 Mar 2026 11:10:03 +0100 Subject: [PATCH 2/2] Apply ruff formatting Co-Authored-By: Claude Opus 4.6 --- src/sequrity/control/types/headers.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/sequrity/control/types/headers.py b/src/sequrity/control/types/headers.py index fbe3d98..ac0517d 100644 --- a/src/sequrity/control/types/headers.py +++ b/src/sequrity/control/types/headers.py @@ -747,7 +747,13 @@ def dual_llm( response_fmt = None if any( v is not None - for v in [strip_response_content, stream_thoughts, include_program, include_policy_check_history, include_namespace_snapshot] + for v in [ + strip_response_content, + stream_thoughts, + include_program, + include_policy_check_history, + include_namespace_snapshot, + ] ): response_fmt = ResponseFormatOverrides( strip_response_content=strip_response_content,