Skip to content

Conversation

@joschu
Copy link
Collaborator

@joschu joschu commented Nov 10, 2025

No description provided.

Renderer that forces inclusion of a thinking block for DsV3 models.
"""

def _render_message(self, message: Message) -> tuple[list[int], list[int], list[int]]:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied this from the NoThinking renderer. Not sure exactly why it's here.

@joschu joschu requested a review from opherlieber November 10, 2025 02:54
if new_content.startswith("</think>"):
new_content = new_content[len("</think>") :]
if not new_content.startswith("<think>"):
new_content = "<think>" + new_content
Copy link
Contributor

@opherlieber opherlieber Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to support/use the Message's 'thinking' field here like gpt-oss? If we do want to support <think> also directly in the content, should we enforce here that there is also a </think> followed by an actual message after it? And not sure if for multi-message interaction the thinking tokens should be rendered in all previous assistant messages, or be kept only in the last message like in gpt-oss?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good questions. Haven't thought these things through yet. No rush to merge this one -- still experimenting with it in my use case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re: thinking field, we might as well prioritize supporting the most advanced tool use systems that are being released, which would include gpt-oss and kimi-k2-thinking, which use interleaved CoT + tool calls. So I'm in favor of whatever improves the support for those models.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what's the right policy for possibly hiding CoT -- in gpt-oss, I assume we include all the thinking traces from the current turn (i.e., back until the last user message), in cases where we have multiple assistant messages including tool calls?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in gpt-oss we include thinking tokens from the current turn, even if there are multiple assistant channel messages

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants