From 7b462a0d51e542b2e8785f8bfc4b9382c903e649 Mon Sep 17 00:00:00 2001 From: "LocalAI [bot]" <139863280+localai-bot@users.noreply.github.com> Date: Sun, 21 Jun 2026 17:51:46 +0200 Subject: [PATCH] fix(backend): call vram.EstimateModelMultiContext (master build broken: undefined vram.EstimateModel) (#10426) fix(backend): call vram.EstimateModelMultiContext for model size estimate core/backend/options.go called vram.EstimateModel, which does not exist in the vram package (it exposes EstimateModelMultiContext). This broke the build on master (undefined: vram.EstimateModel). Use EstimateModelMultiContext with a nil context-size slice (defaults to a single 8192 estimate); the returned MultiContextEstimate.SizeBytes is exactly what the caller consumes, so size estimation behavior is unchanged. Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Ettore Di Giacinto Co-authored-by: Ettore Di Giacinto --- core/backend/options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/backend/options.go b/core/backend/options.go index 3baab6902..528c10e52 100644 --- a/core/backend/options.go +++ b/core/backend/options.go @@ -90,7 +90,7 @@ func estimateModelSizeBytes(c config.ModelConfig, modelsPath string) int64 { ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() - result, err := vram.EstimateModel(ctx, input) + result, err := vram.EstimateModelMultiContext(ctx, input, nil) if err != nil || result.SizeBytes == 0 { return 0 }