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

This commit is contained in:
Jeffrey Morgan 2025-05-05 09:01:33 -07:00 committed by GitHub
parent 913905028b
commit 1703d1472e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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...)
}