[GH-ISSUE #11309] Allow ollama/server/images.go::PullModel external usage #7460

Open
opened 2026-04-12 19:32:00 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @richardjennings on GitHub (Jul 6, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11309

Hello,

The exported PullModel method in ollama/server/images.go requires un-exported *registryOptions as an argument. A nil value results in nil pointer dereference panics for the following code:

package main

import (
	"context"
	"github.com/ollama/ollama/api"
	"github.com/ollama/ollama/server"
)

func main() {
	_ = server.PullModel(context.TODO(), "mistral", nil, func(a api.ProgressResponse) {})
}

Could a PR making the above example work be accepted ?

Originally created by @richardjennings on GitHub (Jul 6, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11309 Hello, The exported `PullModel` method in `ollama/server/images.go` requires un-exported `*registryOptions` as an argument. A `nil` value results in nil pointer dereference panics for the following code: ``` package main import ( "context" "github.com/ollama/ollama/api" "github.com/ollama/ollama/server" ) func main() { _ = server.PullModel(context.TODO(), "mistral", nil, func(a api.ProgressResponse) {}) } ``` Could a PR making the above example work be accepted ?
GiteaMirror added the feature request label 2026-04-12 19:32:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#7460