Conversation
``GLM5Renderer.__init__`` no longer accepts ``clear_thinking``, and ``Qwen36Renderer.__init__`` no longer accepts ``preserve_thinking``. Both were chat-template-kwarg pass-throughs whose default values are now baked straight into the renderer: - GLM-5 default: drop ``<think>`` on past-cycle assistants, keep on in-flight cycle and trailing assistant. (What ``clear_thinking=True`` did before.) The render gate is now ``msg_idx > last_user_index or preserve_thinking`` — clean and consistent with the rest of the family. - Qwen3.6 default: identical to Qwen3.5 (``msg_idx > last_query_index`` via the inherited ``_should_render_thinking``). The class shrinks to just the ``_render_arg_value`` override, which is the only real template delta vs Qwen3.5. Callers who want the toggled-on behaviour pass ``preserve_all_thinking=True`` to ``create_renderer`` — the renderer-agnostic spelling of the same intent landed in #3/#5. Two regression tests pin the dropped kwargs (constructor must raise ``TypeError`` when either is passed). The README's §1 "Preserving past reasoning" subsection (added in #5) already motivates the override flags; no new prose needed here. §3.d is unchanged (still cross-links to the override flag for compaction). Bump 0.1.9 → 0.1.10. 895 tests pass locally. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PyPI's latest published renderers is 0.1.5 — the in-tree bumps in #3 → #5 → this PR (0.1.6 → 0.1.7 → 0.1.8 → 0.1.9 → 0.1.10) accumulated against PyPI without ever publishing. Roll forward to 0.1.6 once for the actual release; tag ``renderers-v0.1.6`` post-merge to fire the publish workflow (.github/workflows/publish.yml asserts the tag's ``-vX.Y.Z`` suffix matches pyproject.toml). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
`GLM5Renderer.init` no longer accepts `clear_thinking`, and `Qwen36Renderer.init` no longer accepts `preserve_thinking`. Both were chat-template-kwarg pass-throughs whose default values are now baked straight into the renderer.
Why
These kwargs hung over from when each renderer mirrored the model's Jinja chat-template signature kwarg-for-kwarg. The renderer-agnostic override layer landed in #3 / #5 (`preserve_all_thinking`, `preserve_thinking_between_tool_calls` — constructor-only attributes since #5) subsumes both, and they were the only "non-default" kwarg that the chat-template-pass-through ever needed:
Their default values are kept by baking the chat-template behaviour straight in:
Changes
Test plan
🤖 Generated with Claude Code