[PR #11329] server: export RegistryOptions to make the public API usable #44757

Open
opened 2026-04-25 00:25:41 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11329
Author: @richardjennings
Created: 7/8/2025
Status: 🔄 Open

Base: mainHead: 11309


📝 Commits (1)

  • f232d96 server: export RegistryOptions to make the public API usable.

📊 Changes

6 files changed (+20 additions, -20 deletions)

View changed files

📝 server/auth.go (+1 -1)
📝 server/download.go (+5 -5)
📝 server/images.go (+6 -6)
📝 server/model.go (+1 -1)
📝 server/routes.go (+2 -2)
📝 server/upload.go (+5 -5)

📄 Description

Export RegistryOptions to allow using the exported image API in the server package.

For example:

package main

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

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

resolves: #11309


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/11329 **Author:** [@richardjennings](https://github.com/richardjennings) **Created:** 7/8/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `11309` --- ### 📝 Commits (1) - [`f232d96`](https://github.com/ollama/ollama/commit/f232d96b63a710cd41bace724391f8d3a0991873) server: export RegistryOptions to make the public API usable. ### 📊 Changes **6 files changed** (+20 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `server/auth.go` (+1 -1) 📝 `server/download.go` (+5 -5) 📝 `server/images.go` (+6 -6) 📝 `server/model.go` (+1 -1) 📝 `server/routes.go` (+2 -2) 📝 `server/upload.go` (+5 -5) </details> ### 📄 Description Export RegistryOptions to allow using the exported image API in the server package. For example: ``` package main import ( "context" "github.com/ollama/ollama/api" "github.com/ollama/ollama/server" ) func main() { _ = server.PullModel(context.TODO(), "mistral", &server.RegistryOptions{}, func(a api.ProgressResponse) {}) } ``` resolves: #11309 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-25 00:25:42 -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#44757