create: select the qwen3.5 parser and renderer for Qwen3.5/Next

Qwen3.5/Qwen3-Next architecture strings contain the substring "qwen3", so the
broad qwen3 match claimed them for the generic parser and qwen3-coder
renderer, whose template doesn't frame the thinking block — an empty
<think></think> leaked into content and think=false was ignored. Match the
family first via isQwen35Family so the parser, renderer, and
thinking-capability checks share one variant list.
This commit is contained in:
Jesse Gross
2026-06-03 09:42:38 -07:00
parent a6293eb516
commit d47859ce49
2 changed files with 22 additions and 0 deletions
+12
View File
@@ -628,6 +628,9 @@ func getParserName(modelDir string) string {
if strings.Contains(archLower, "gemma4") {
return "gemma4"
}
if isQwen35Family(archLower) {
return "qwen3.5"
}
if strings.Contains(archLower, "qwen3") {
return "qwen3"
}
@@ -651,6 +654,9 @@ func getParserName(modelDir string) string {
if strings.Contains(typeLower, "gemma4") {
return "gemma4"
}
if isQwen35Family(typeLower) {
return "qwen3.5"
}
if strings.Contains(typeLower, "qwen3") {
return "qwen3"
}
@@ -694,6 +700,9 @@ func getRendererName(modelDir string) string {
if strings.Contains(archLower, "deepseek") {
return "deepseek3"
}
if isQwen35Family(archLower) {
return "qwen3.5"
}
if strings.Contains(archLower, "qwen3") {
return "qwen3-coder"
}
@@ -717,6 +726,9 @@ func getRendererName(modelDir string) string {
if strings.Contains(typeLower, "deepseek") {
return "deepseek3"
}
if isQwen35Family(typeLower) {
return "qwen3.5"
}
if strings.Contains(typeLower, "qwen3") {
return "qwen3-coder"
}
+10
View File
@@ -699,6 +699,11 @@ func TestGetParserName(t *testing.T) {
configJSON: `{"architectures": ["Qwen3ForCausalLM"]}`,
want: "qwen3",
},
{
name: "qwen3.5 model",
configJSON: `{"architectures": ["Qwen3_5ForConditionalGeneration"]}`,
want: "qwen3.5",
},
{
name: "deepseek model",
configJSON: `{"architectures": ["DeepseekV3ForCausalLM"]}`,
@@ -754,6 +759,11 @@ func TestGetRendererName(t *testing.T) {
configJSON: `{"architectures": ["Qwen3ForCausalLM"]}`,
want: "qwen3-coder",
},
{
name: "qwen3.5 model",
configJSON: `{"architectures": ["Qwen3_5ForConditionalGeneration"]}`,
want: "qwen3.5",
},
{
name: "deepseek model",
configJSON: `{"architectures": ["DeepseekV3ForCausalLM"]}`,