Commit e4bc223
feat(qwen3): Add strip_thinking_from_history option to Qwen3Renderer
Add a `strip_thinking_from_history` parameter to `Qwen3Renderer.__init__`:
- When `True` (default): strips `<think>...</think>` blocks from assistant
messages in multi-turn history
- When `False`: preserves thinking blocks in history (useful for certain
RL scenarios)
This matches how Qwen3 models were trained - they only see their own thinking
during the current turn, not from previous turns. The default behavior is
unchanged (stripping is enabled).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 46b3bbd commit e4bc223
1 file changed
+17
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
473 | 486 | | |
474 | 487 | | |
475 | 488 | | |
476 | 489 | | |
477 | 490 | | |
478 | | - | |
479 | | - | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
480 | 495 | | |
481 | 496 | | |
482 | 497 | | |
| |||
0 commit comments