Skip to content

[Feature Request] Parse <think> tags into OpenAI-compatible reasoning_content in Local Server #1569

Description

@ukyonagata0105

Which version of LM Studio?
Example: LM Studio 0.3.5, 0.3.9
LM Studio 0.3.9 (or latest applicable Local Server)

Which operating system?
macOS

What is the bug?
(Feature Request) Currently, when using "high-reasoning" or distilled local models (like DeepSeek-R1 distills, GLM-4.7 high-reasoning, etc.), they output their thinking process wrapped in <think>...</think> tags directly into the standard content text stream.

This makes it difficult for modern AI clients (like Claude Code, Cline, Cursor, Oh My OpenCode) to differentiate between the thinking process and the actual response, resulting in the raw <think> tags cluttering the UI.

Feature Request:
Could you add an option (or default behavior for known reasoning models) in the Local Server to automatically parse text enclosed in <think>...</think> tags and stream them as reasoning_content in the API payload (following the new OpenAI API spec for "o1"-like models) instead of plain content?

This would allow external coding agents to natively fold and style the reasoning process in their UI, leading to a much cleaner UX.

Screenshots
(None)

Logs
(None applicable)

To Reproduce

  1. Start LM Studio Local Server.
  2. Load a high-reasoning model that outputs <think> tags (e.g., qwen/qwen3-4b-thinking, glm-4.7-high-reasoning-distill, etc).
  3. Query the /v1/chat/completions endpoint.
  4. Observe that the payload returns <think> inside content rather than as structured reasoning_content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions