Skip to content

Feature: Auto-convert reasoning_content to content.blocks format for Apertus template #18

@ochafik

Description

@ochafik

Feature Request

The Apertus template uses a unique format for reasoning content:

  • Standard format: message.reasoning_content = "text"
  • Apertus format: message.content = {"blocks": [{"type": "thoughts", "text": "..."}]}

Models Using Blocks Format

Based on research of templates in llama.cpp, there are multiple variants:

  1. Apertus - Uses content.blocks format with types: thoughts, tool_calls, tool_outputs, response
  2. Ministral 14B Reasoning - Uses message content as array of blocks (text, thinking, image, image_url)
  3. Mistral-Small 3.2-24B - Similar array-based blocks
  4. unsloth-mistral-Devstral-Small - Similar array-based blocks

OpenAI Standard

OpenAI uses a different approach - they keep content as string and add reasoning_content field:
{
"role": "assistant",
"content": "This is the actual response text",
"reasoning_content": "This is the reasoning/thinking process"
}

This is different from blocks format. Also see o1 reasoning format, DeepSeek V3, Qwen thinking, GLM-4.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions