Skip to content

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

server: fix panic when runner.Options is nil (#10566)

Jeffrey Morgan1703d1472ed2
diff --git a/server/sched.go b/server/sched.go
index 6fbfcd80e..7586c83ff 100644
--- a/server/sched.go
+++ b/server/sched.go
@@ -691,11 +691,13 @@ func (runner *runnerRef) LogValue() slog.Value {
attrs = append(attrs,
slog.String("size", format.HumanBytes2(runner.estimatedTotal)),
slog.String("vram", format.HumanBytes2(runner.estimatedVRAM)),
- slog.Int("num_ctx", runner.NumCtx),
slog.Int("parallel", runner.numParallel),
slog.Int("pid", runner.pid),
slog.String("model", runner.modelPath),
)
+ if runner.Options != nil {
+ attrs = append(attrs, slog.Int("num_ctx", runner.Options.NumCtx))
+ }
return slog.GroupValue(attrs...)
}