Skip to content

[FEAT]: Send previous reasoning blocks back to model #6260

Description

@CFkc5yLD-5ze

While some models [ A) Gemma ] strongly recommend against it, others [ B) Qwen ] actually advocate for exactly this behavior for intended experience. Would be nice to see opt-in toggle in Settings implemented.

In multi-turn conversations, the historical model output should only include the final response. Thoughts from previous model turns must not be added before the next user turn begins, with the exception of tool call turns where thinking content should be preserved.

By default, Qwen3.8 retains thinking blocks from all historical messages, maintaining a complete reasoning trace across the conversation. This behavior, known as preserved thinking, ensures full context continuity and is especially beneficial for agent scenarios where decision consistency and reduced redundant reasoning are critical. It also improves KV cache utilization, optimizing inference efficiency in both thinking and non-thinking modes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions