refactor(renderer): migrate to renderers thinking_retention#1743
Open
hallerite wants to merge 1 commit into
Open
refactor(renderer): migrate to renderers thinking_retention#1743hallerite wants to merge 1 commit into
thinking_retention#1743hallerite wants to merge 1 commit into
Conversation
The renderers package replaced the two boolean flags `preserve_all_thinking` and `preserve_thinking_between_tool_calls` with a single ordinal field `thinking_retention: Literal["template", "tool_cycle", "all"]`. `_resolve_renderer_config` carried the old booleans from `AutoRendererConfig` onto the resolved concrete config by name; update it to carry the single `thinking_retention` field instead (mirrors renderers' own auto carry-over). Also update the renderer-client test and the stale `ClientConfig` docs (which still listed the removed booleans as top-level fields — the real config exposes them via the typed `renderer_config`). Requires a renderers release that includes `thinking_retention`; the `renderers>=` floor should be raised to that version once published. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ApprovabilityVerdict: Approved Mechanical refactor consolidating two boolean configuration flags ( You can customize Macroscope's approvability policy. Learn more. |
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.
What
The
rendererspackage replaced the two boolean flagspreserve_all_thinkingandpreserve_thinking_between_tool_callswith a single ordinal field:(See renderers PR: PrimeIntellect-ai/renderers#88.)
Changes
verifiers/clients/renderer_client.py—_resolve_renderer_configcarried the old booleans fromAutoRendererConfigonto the resolved concrete config by name. Now carries the singlethinking_retentionfield (mirrors renderers' own auto carry-over):tests/test_renderer_client.py—AutoRendererConfig(thinking_retention="all")and the corresponding expectation.docs/reference.md— theClientConfigsnippet still listedpreserve_*as top-level fields, but the real config exposes the renderer settings via the typedrenderer_config. Fixed the snippet + the explanatory paragraph to describethinking_retention.ClientConfigitself does not re-declare these fields — it holds a typedrenderer_config: RendererConfig, so the field flows through pydantic; this PR only updates the by-name access in_resolve_renderer_config.Requires a
renderersrelease that includesthinking_retention. The current floorrenderers>=0.1.8.dev28is>=, so it auto-picks up the new release — but CI will fail until renderers publishes a version withthinking_retention, and the floor should be raised to that version once it's out. Verified locally against the renderers branch (refactor/thinking-retention): the affectedtest_renderer_clientcases pass.Test plan
ruff checkclean on changed filestests/test_renderer_client.py -k "threads_chat_template_kwargs or auto_resolves"pass against the local renderers branch🤖 Generated with Claude Code
Note
Low Risk
Narrow adapter/docs/test updates for a renderers API rename; behavior is intended to match the old booleans once the matching renderers release is installed.
Overview
Aligns verifiers with the renderers package replacing
preserve_all_thinking/preserve_thinking_between_tool_callswith a singlethinking_retentionfield ("template"|"tool_cycle"|"all").RendererClient._resolve_renderer_confignow copies onlythinking_retentionfromAutoRendererConfigonto the resolved concrete config when mergingchat_template_kwargs(instead of the two booleans).Tests use
AutoRendererConfig(thinking_retention="all")and expect"template"for non-auto bases.docs/reference.mddocuments renderer thinking via typedrenderer_configandthinking_retention, not obsolete top-levelpreserve_*flags onClientConfig.Reviewed by Cursor Bugbot for commit c4e5c19. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Migrate renderer client to unified
thinking_retentionfield inRendererConfigReplaces the two boolean fields
preserve_all_thinkingandpreserve_thinking_between_tool_callswith a singlethinking_retentionfield accepting'template'(default),'tool_cycle', or'all'._resolve_renderer_confignow propagatesthinking_retentioninstead of the prior boolean flags when resolvingAutoRendererConfiginto a concreteRendererConfigClientConfigreplaces the two preserve booleans with arenderer_config: RendererConfig | Nonefield, whereNoneis treated asAutoRendererConfig()preserve_all_thinking=Truemust switch tothinking_retention='all';preserve_thinking_between_tool_callsmaps tothinking_retention='tool_cycle'Macroscope summarized c4e5c19.