Skip to content

--reasoning-format deepseek doesn't work with external chat templates (--chat-template-file) #205

Description

@jerfletcher

Description

The --reasoning-format deepseek flag doesn't extract reasoning_content when using external chat templates via --chat-template-file. The feature/turboquant-kv-cache branch (AtomicBot-ai fork) has this issue — the reasoning format parsing only works with built-in templates.

Repro

llama-server -m model.gguf \
  --reasoning on --reasoning-format deepseek \
  --chat-template-file /path/to/qwen3.jinja

The template generates thinking\n markers. With --reasoning-format deepseek, the response should include a separate reasoning_content field, but the markers stay as raw text in content.

Expected

reasoning_content field with extracted thinking text. content field with just the answer.

Actual

reasoning_content absent. thinking\n[text] in content.

Cause

The turboquant fork is based on an older llama.cpp version where --reasoning-format support was incomplete for external chat templates. Upstream mainline handles this correctly. The fix would be syncing the server-side reasoning parsing from upstream.

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