Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

fix: restore modelfile system in prompt template (#1425)

Bruce MacDonalde3f925fc1bae
diff --git a/server/images.go b/server/images.go
index 68b2770a0..2700cb560 100644
--- a/server/images.go
+++ b/server/images.go
@@ -64,6 +64,11 @@ func (m *Model) Prompt(p PromptVars) (string, error) {
return "", err
}
+ if p.System == "" {
+ // use the default system prompt for this model if one is not specified
+ p.System = m.System
+ }
+
vars := map[string]any{
"System": p.System,
"Prompt": p.Prompt,