Context
strip-gemma exists because llama-server has no working --reasoning-format option for Gemma 4:
--reasoning-format deepseek → content field empty, everything in reasoning_content
--reasoning-format none → raw <|channel>thought\n...<channel|> tags in content
--reasoning-format auto → doesn't recognize Gemma 4's channel tags
Proposed upstream fix
Teach --reasoning-format auto in llama-server to recognize Gemma 4's <|channel>thought\n...<channel|> tag pattern and split it into reasoning_content vs content, the same way it already handles DeepSeek's <think>...</think> tags.
Target files
common/chat.cpp — reasoning format parsing/extraction
common/common.h — enum common_reasoning_format (note: comment says "do not extend unless you absolutely have to" — prefer making auto smarter over adding a new enum value)
Related upstream issues
Affected communities (same problem, different stacks)
Acceptance criteria
Context
strip-gemma exists because llama-server has no working
--reasoning-formatoption for Gemma 4:--reasoning-format deepseek→ content field empty, everything in reasoning_content--reasoning-format none→ raw<|channel>thought\n...<channel|>tags in content--reasoning-format auto→ doesn't recognize Gemma 4's channel tagsProposed upstream fix
Teach
--reasoning-format autoin llama-server to recognize Gemma 4's<|channel>thought\n...<channel|>tag pattern and split it intoreasoning_contentvscontent, the same way it already handles DeepSeek's<think>...</think>tags.Target files
common/chat.cpp— reasoning format parsing/extractioncommon/common.h—enum common_reasoning_format(note: comment says "do not extend unless you absolutely have to" — prefer makingautosmarter over adding a new enum value)Related upstream issues
Affected communities (same problem, different stacks)
Acceptance criteria
--reasoning-format autocorrectly splits Gemma 4 channel tags in non-streaming responses--reasoning-format autocorrectly splits Gemma 4 channel tags in streaming (SSE) responses