mirror of
https://github.com/usestrix/strix.git
synced 2026-10-15 04:18:10 +00:00
Fix _extract_text including thinking/reasoning blocks as visible text (fixes #1357)
_extract_text() in compaction.py was extracting all ResponseOutputText chunks regardless of chunk.type, which included reasoning/thinking blocks (type='reasoning') in the compaction summary. Filter to only include chunks with type='output_text'.
This commit is contained in:
parent
f1386cad37
commit
6cf2865eb5
1 changed files with 1 additions and 1 deletions
|
|
@ -294,7 +294,7 @@ def _extract_text(response: ModelResponse) -> str:
|
|||
parts.extend(
|
||||
chunk.text
|
||||
for chunk in item.content
|
||||
if isinstance(chunk, ResponseOutputText) and chunk.text
|
||||
if isinstance(chunk, ResponseOutputText) and chunk.type == "output_text" and chunk.text
|
||||
)
|
||||
return "".join(parts)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue