[PR #9485] [MERGED] server/internal/registry: take over pulls from server package #18256

Closed
opened 2026-04-16 06:29:58 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/9485
Author: @bmizerany
Created: 3/4/2025
Status: Merged
Merged: 3/5/2025
Merged by: @bmizerany

Base: mainHead: bmizerany/newpull


📝 Commits (1)

  • e46d46a server/internal/registry: take over pulls from server package

📊 Changes

11 files changed (+370 additions, -52 deletions)

View changed files

📝 api/types.go (+3 -3)
📝 go.mod (+1 -0)
📝 go.sum (+2 -0)
📝 server/internal/client/ollama/registry.go (+86 -31)
📝 server/internal/client/ollama/registry_test.go (+1 -1)
📝 server/internal/client/ollama/trace.go (+7 -3)
📝 server/internal/registry/server.go (+97 -0)
📝 server/internal/registry/server_test.go (+126 -4)
📝 server/internal/registry/testdata/models/manifests/example.com/library/smol/latest (+0 -0)
server/internal/registry/testdata/registry.txt (+22 -0)
📝 server/routes.go (+25 -10)

📄 Description

This commit replaces the old pull implementation in the server package
with the new, faster, more robust pull implementation in the registry
package.

The new endpoint, and now the remove endpoint too, are behind the
feature gate "client2" enabled only by setting the OLLAMA_EXPERIMENT
environment variable include "client2".

Currently, the progress indication is wired to perform the same as the
previous implementation to avoid making changes to the CLI, and because
the status reports happen at the start of the download, and the end of
the write to disk, the progress indication is not as smooth as it could
be. This is a known issue and will be addressed in a future change.

This implementation may be ~0.5-1.0% slower in rare cases, depending on
network and disk speed, but is generally MUCH faster and more robust
than the its predecessor in all other cases.


🔄 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/9485 **Author:** [@bmizerany](https://github.com/bmizerany) **Created:** 3/4/2025 **Status:** ✅ Merged **Merged:** 3/5/2025 **Merged by:** [@bmizerany](https://github.com/bmizerany) **Base:** `main` ← **Head:** `bmizerany/newpull` --- ### 📝 Commits (1) - [`e46d46a`](https://github.com/ollama/ollama/commit/e46d46ac6b7568b2058ba186e09fb754cf63878e) server/internal/registry: take over pulls from server package ### 📊 Changes **11 files changed** (+370 additions, -52 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+3 -3) 📝 `go.mod` (+1 -0) 📝 `go.sum` (+2 -0) 📝 `server/internal/client/ollama/registry.go` (+86 -31) 📝 `server/internal/client/ollama/registry_test.go` (+1 -1) 📝 `server/internal/client/ollama/trace.go` (+7 -3) 📝 `server/internal/registry/server.go` (+97 -0) 📝 `server/internal/registry/server_test.go` (+126 -4) 📝 `server/internal/registry/testdata/models/manifests/example.com/library/smol/latest` (+0 -0) ➕ `server/internal/registry/testdata/registry.txt` (+22 -0) 📝 `server/routes.go` (+25 -10) </details> ### 📄 Description This commit replaces the old pull implementation in the server package with the new, faster, more robust pull implementation in the registry package. The new endpoint, and now the remove endpoint too, are behind the feature gate "client2" enabled only by setting the OLLAMA_EXPERIMENT environment variable include "client2". Currently, the progress indication is wired to perform the same as the previous implementation to avoid making changes to the CLI, and because the status reports happen at the start of the download, and the end of the write to disk, the progress indication is not as smooth as it could be. This is a known issue and will be addressed in a future change. This implementation may be ~0.5-1.0% slower in rare cases, depending on network and disk speed, but is generally MUCH faster and more robust than the its predecessor in all other cases. --- <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-16 06:29:58 -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#18256