Skip to content

fix(backend): call vram.EstimateModelMultiContext (master build broken: undefined vram.EstimateModel) - #10426

Merged
mudler merged 1 commit into
masterfrom
fix/vram-estimate-model
Jun 21, 2026
Merged

fix(backend): call vram.EstimateModelMultiContext (master build broken: undefined vram.EstimateModel)#10426
mudler merged 1 commit into
masterfrom
fix/vram-estimate-model

Conversation

@localai-bot

Copy link
Copy Markdown
Collaborator

Problem

core/backend/options.go:93 calls vram.EstimateModel(ctx, input), but the vram package has no such function (it exposes EstimateModelMultiContext). Master HEAD does not compile:

core/backend/options.go:93:22: undefined: vram.EstimateModel

This breaks the Go build, golangci-lint, build-test, tests-ui-e2e, and the image builds on every PR (introduced by #9527).

Fix

Call vram.EstimateModelMultiContext(ctx, input, nil). A nil context-size slice defaults to a single 8192-token estimate, and the returned MultiContextEstimate.SizeBytes is exactly what the caller already consumes (result.SizeBytes), so model size-estimation behavior is unchanged.

One-line change; build and golangci-lint pass on core/backend/....

Assisted-by: Claude:claude-opus-4-8

🤖 Generated with Claude Code

…mate

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 <mudler@localai.io>
@mudler
mudler merged commit 7b462a0 into master Jun 21, 2026
57 of 59 checks passed
@mudler
mudler deleted the fix/vram-estimate-model branch June 21, 2026 15:51
@localai-bot localai-bot added the bug Something isn't working label Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants