Expand description
2026-09-26: Split a model’s completed output into reasoning and answer, per reasoning-block format.
| Format | Delimiters |
|---|---|
ReasoningFormat::Qwen, ReasoningFormat::DeepSeekR1, ReasoningFormat::MiniMax | <think> / </think> |
ReasoningFormat::Mistral | [THINK] / [/THINK] |
ReasoningFormat::Gemma4 | `< |
The three <think> formats share one implementation and differ only in
name; they assume the prompt already opened the block. Mistral uses the
same implementation but expects the model to emit its own [THINK].
Gemma 4 has its own parser. At serve time the format comes from the
[reasoning] table of tool_defaults.toml, keyed by model_type, and a
thinking-capable model without an entry gets qwen
(main_modules/serve_phases/tokenizer_runtime.rs).
Owner: server. Invariants: none beyond the types.
Enums§
- Reasoning
Format - 2026-09-26: Supported reasoning-block formats; the module doc lists each one’s delimiters.
Traits§
- Reasoning
Parser - 2026-09-26: Splits reasoning blocks out of completed model output.