The native Qwen chat renderer preserves assistant reasoning text when the next request uses direct mode, whereas pinned MTPLX drops it with enable_thinking=False. Independently found in #111 full-request controls; the Unicode split correction is unrelated.
Oracle: MTPLX 2.12.2 9882703f3105363ddc37eca9f97aa09a1d387112, unchanged installed Bare-Speed tokenizer. Three messages: user ① Ⅷ ² 𝟘 भारत ́a\n; assistant content One ①. and reasoning_content Brief ² thought.; user Continue Ⅷ and 𝟘.\n x. _encode_messages_uncached with enable_thinking=False, preserve_reasoning_history=True emits an empty historical <think>\n\n</think>\n\n block; native encode_conversation with ReasoningMode::Direct includes the reasoning text. The native request is 68 tokens versus oracle 59. With empty direct-mode reasoning both produce the same 59 IDs. This is reachable when switching an existing reasoning conversation to direct mode.
Match the pinned template/server semantics for reasoning history across effort changes, including direct, low, medium, xhigh, preserve-history policy and system prompts. Trace full/history/continuation encoding and cache selection; ensure stale historical prefixes miss safely and compatible continuations retain reuse. Keep family-specific behavior in Qwen and preserve DS4-backed GLM/DeepSeek. Add exact rendered/token/context regression controls and isolated live/disk cache controls where changed history invalidates reuse. Run the repository commit gates and compare to the unmodified pinned oracle before closing.
The native Qwen chat renderer preserves assistant reasoning text when the next request uses direct mode, whereas pinned MTPLX drops it with enable_thinking=False. Independently found in #111 full-request controls; the Unicode split correction is unrelated.
Oracle: MTPLX 2.12.2 `9882703f3105363ddc37eca9f97aa09a1d387112`, unchanged installed Bare-Speed tokenizer. Three messages: user ` ① Ⅷ ² 𝟘 भारत ́a\n `; assistant content `One ①.` and reasoning_content `Brief ² thought.`; user `Continue Ⅷ and 𝟘.\n x`. `_encode_messages_uncached` with enable_thinking=False, preserve_reasoning_history=True emits an empty historical `<think>\n\n</think>\n\n` block; native `encode_conversation` with ReasoningMode::Direct includes the reasoning text. The native request is 68 tokens versus oracle 59. With empty direct-mode reasoning both produce the same 59 IDs. This is reachable when switching an existing reasoning conversation to direct mode.
Match the pinned template/server semantics for reasoning history across effort changes, including direct, low, medium, xhigh, preserve-history policy and system prompts. Trace full/history/continuation encoding and cache selection; ensure stale historical prefixes miss safely and compatible continuations retain reuse. Keep family-specific behavior in Qwen and preserve DS4-backed GLM/DeepSeek. Add exact rendered/token/context regression controls and isolated live/disk cache controls where changed history invalidates reuse. Run the repository commit gates and compare to the unmodified pinned oracle before closing.
hugo
added the bug label 2026-10-04 13:33:53 +00:00
Implemented and pushed in 7c18e738cdb17cb570c9e3ea90efdee79fddaea7.
Qwen direct mode now omits historical reasoning while retaining the empty think scaffold. Thinking modes use the pinned server's generation-segment tokenization, including separate newline tokens for empty thoughts. The text adapter drops content-empty/reasoning-only assistants and merges the resulting consecutive roles, which actual effort-switch tests exposed. The HTTP adapter keeps Qwen's default reasoning echoes even without tools; DS4/GLM policy stays unchanged.
Reviewed full/history/continuation, selected-model API policy, context counts, completed-history fast paths and cache-key migration against the unmodified pinned MTPLX. Affected old histories miss safely; valid live frontiers retain generated IDs. Raw rebuilt histories that need role merging fall back to the exact full prompt. No unconditional checkpoint-format change.
Verification: 304 exact oracle render/token/history/context/cache-path cases; actual low/medium/xhigh-to-direct requests match at 62 tokens; the reported direct example matches at 59 tokens. The current pre-change executable reproduces 65 versus 59 (the issue's earlier report stated 68), and independently reproduces 87 versus 88 for empty thinking history. Both failing baseline receipts are retained. Real-model old live/disk and old empty-thinking checkpoints miss; new direct warm/disk continuations reuse 61 tokens with identical complete state. Prior compatible-cache and NFC-cache controls retain 95 and 93 tokens respectively, with identical live/disk state. DS4 token/chat and HTTP family controls pass.
All four commit gates pass: formatting, warning-free Clippy, signed release bundle, and 320 application + 8 tool tests. An unrelated process-cleanup test failed once; its unchanged isolated retry and final full-suite run pass, with both logs retained. Evidence and reproduction: docs/issue117-reasoning-history/.
Implemented and pushed in `7c18e738cdb17cb570c9e3ea90efdee79fddaea7`.
Qwen direct mode now omits historical reasoning while retaining the empty think scaffold. Thinking modes use the pinned server's generation-segment tokenization, including separate newline tokens for empty thoughts. The text adapter drops content-empty/reasoning-only assistants and merges the resulting consecutive roles, which actual effort-switch tests exposed. The HTTP adapter keeps Qwen's default reasoning echoes even without tools; DS4/GLM policy stays unchanged.
Reviewed full/history/continuation, selected-model API policy, context counts, completed-history fast paths and cache-key migration against the unmodified pinned MTPLX. Affected old histories miss safely; valid live frontiers retain generated IDs. Raw rebuilt histories that need role merging fall back to the exact full prompt. No unconditional checkpoint-format change.
Verification: 304 exact oracle render/token/history/context/cache-path cases; actual low/medium/xhigh-to-direct requests match at 62 tokens; the reported direct example matches at 59 tokens. The current pre-change executable reproduces 65 versus 59 (the issue's earlier report stated 68), and independently reproduces 87 versus 88 for empty thinking history. Both failing baseline receipts are retained. Real-model old live/disk and old empty-thinking checkpoints miss; new direct warm/disk continuations reuse 61 tokens with identical complete state. Prior compatible-cache and NFC-cache controls retain 95 and 93 tokens respectively, with identical live/disk state. DS4 token/chat and HTTP family controls pass.
All four commit gates pass: formatting, warning-free Clippy, signed release bundle, and 320 application + 8 tool tests. An unrelated process-cleanup test failed once; its unchanged isolated retry and final full-suite run pass, with both logs retained. Evidence and reproduction: `docs/issue117-reasoning-history/`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The native Qwen chat renderer preserves assistant reasoning text when the next request uses direct mode, whereas pinned MTPLX drops it with enable_thinking=False. Independently found in #111 full-request controls; the Unicode split correction is unrelated.
Oracle: MTPLX 2.12.2
9882703f3105363ddc37eca9f97aa09a1d387112, unchanged installed Bare-Speed tokenizer. Three messages: user① Ⅷ ² 𝟘 भारत ́a\n; assistant contentOne ①.and reasoning_contentBrief ² thought.; userContinue Ⅷ and 𝟘.\n x._encode_messages_uncachedwith enable_thinking=False, preserve_reasoning_history=True emits an empty historical<think>\n\n</think>\n\nblock; nativeencode_conversationwith ReasoningMode::Direct includes the reasoning text. The native request is 68 tokens versus oracle 59. With empty direct-mode reasoning both produce the same 59 IDs. This is reachable when switching an existing reasoning conversation to direct mode.Match the pinned template/server semantics for reasoning history across effort changes, including direct, low, medium, xhigh, preserve-history policy and system prompts. Trace full/history/continuation encoding and cache selection; ensure stale historical prefixes miss safely and compatible continuations retain reuse. Keep family-specific behavior in Qwen and preserve DS4-backed GLM/DeepSeek. Add exact rendered/token/context regression controls and isolated live/disk cache controls where changed history invalidates reuse. Run the repository commit gates and compare to the unmodified pinned oracle before closing.
Implemented and pushed in
7c18e738cdb17cb570c9e3ea90efdee79fddaea7.Qwen direct mode now omits historical reasoning while retaining the empty think scaffold. Thinking modes use the pinned server's generation-segment tokenization, including separate newline tokens for empty thoughts. The text adapter drops content-empty/reasoning-only assistants and merges the resulting consecutive roles, which actual effort-switch tests exposed. The HTTP adapter keeps Qwen's default reasoning echoes even without tools; DS4/GLM policy stays unchanged.
Reviewed full/history/continuation, selected-model API policy, context counts, completed-history fast paths and cache-key migration against the unmodified pinned MTPLX. Affected old histories miss safely; valid live frontiers retain generated IDs. Raw rebuilt histories that need role merging fall back to the exact full prompt. No unconditional checkpoint-format change.
Verification: 304 exact oracle render/token/history/context/cache-path cases; actual low/medium/xhigh-to-direct requests match at 62 tokens; the reported direct example matches at 59 tokens. The current pre-change executable reproduces 65 versus 59 (the issue's earlier report stated 68), and independently reproduces 87 versus 88 for empty thinking history. Both failing baseline receipts are retained. Real-model old live/disk and old empty-thinking checkpoints miss; new direct warm/disk continuations reuse 61 tokens with identical complete state. Prior compatible-cache and NFC-cache controls retain 95 and 93 tokens respectively, with identical live/disk state. DS4 token/chat and HTTP family controls pass.
All four commit gates pass: formatting, warning-free Clippy, signed release bundle, and 320 application + 8 tool tests. An unrelated process-cleanup test failed once; its unchanged isolated retry and final full-suite run pass, with both logs retained. Evidence and reproduction:
docs/issue117-reasoning-history/.