[PR #13807] [MERGED] Clean up the manifest and modelpath #45647

Closed
opened 2026-04-25 01:18:20 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13807
Author: @pdevine
Created: 1/21/2026
Status: Merged
Merged: 1/21/2026
Merged by: @pdevine

Base: mainHead: pdevine/manifest-cleanup


📝 Commits (4)

  • 6e43944 housekeeping: move manifest implementation
  • 51631bc replace modelpath.go w/ types/model/name.go
  • 5818394 gofumpt the gofmt
  • 369dfe0 change function names

📊 Changes

20 files changed (+410 additions, -597 deletions)

View changed files

📝 manifest/layer.go (+9 -9)
📝 manifest/manifest.go (+33 -8)
📝 manifest/manifest_test.go (+1 -1)
manifest/paths.go (+95 -0)
📝 server/create.go (+31 -30)
📝 server/create_test.go (+2 -1)
📝 server/download.go (+7 -5)
📝 server/images.go (+75 -130)
📝 server/model.go (+9 -8)
server/modelpath.go (+0 -146)
server/modelpath_test.go (+0 -153)
📝 server/routes.go (+22 -21)
📝 server/routes_create_test.go (+4 -3)
📝 server/routes_delete_test.go (+3 -2)
📝 server/upload.go (+11 -9)
📝 types/model/name.go (+38 -13)
📝 types/model/name_test.go (+5 -4)
📝 x/create/client/create.go (+17 -17)
📝 x/server/show.go (+22 -18)
📝 x/server/show_test.go (+26 -19)

📄 Description

This change cleans up code in the server/ directory by:

  • moving the manifest code into its own top-level directory (manifest/) out of server/; and
  • removing server/modelpath.go and consolidating it with types/model/

When we added types/model/ it was mostly redundant to server/modelpath.go but because it didn't have a way of handling the protocol scheme it was never a full replacement. This change adds the protocol scheme and removes it entirely.
We also have been adding code into x/ which needs to get a manifest, however, there is a chance for adding circularly dependencies if server/routes.go needs to call out to something in x/ and a model in x/ needs to get the manifest.


🔄 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/13807 **Author:** [@pdevine](https://github.com/pdevine) **Created:** 1/21/2026 **Status:** ✅ Merged **Merged:** 1/21/2026 **Merged by:** [@pdevine](https://github.com/pdevine) **Base:** `main` ← **Head:** `pdevine/manifest-cleanup` --- ### 📝 Commits (4) - [`6e43944`](https://github.com/ollama/ollama/commit/6e43944c94df392362b22c31d1e05a6622941d9e) housekeeping: move manifest implementation - [`51631bc`](https://github.com/ollama/ollama/commit/51631bcba05f5a996d1e0691420eb4b467f2c313) replace modelpath.go w/ types/model/name.go - [`5818394`](https://github.com/ollama/ollama/commit/581839400291619fa644e86cd67671a5bf10a209) gofumpt the gofmt - [`369dfe0`](https://github.com/ollama/ollama/commit/369dfe07baa35e5d3500d36a2501680de40cf279) change function names ### 📊 Changes **20 files changed** (+410 additions, -597 deletions) <details> <summary>View changed files</summary> 📝 `manifest/layer.go` (+9 -9) 📝 `manifest/manifest.go` (+33 -8) 📝 `manifest/manifest_test.go` (+1 -1) ➕ `manifest/paths.go` (+95 -0) 📝 `server/create.go` (+31 -30) 📝 `server/create_test.go` (+2 -1) 📝 `server/download.go` (+7 -5) 📝 `server/images.go` (+75 -130) 📝 `server/model.go` (+9 -8) ➖ `server/modelpath.go` (+0 -146) ➖ `server/modelpath_test.go` (+0 -153) 📝 `server/routes.go` (+22 -21) 📝 `server/routes_create_test.go` (+4 -3) 📝 `server/routes_delete_test.go` (+3 -2) 📝 `server/upload.go` (+11 -9) 📝 `types/model/name.go` (+38 -13) 📝 `types/model/name_test.go` (+5 -4) 📝 `x/create/client/create.go` (+17 -17) 📝 `x/server/show.go` (+22 -18) 📝 `x/server/show_test.go` (+26 -19) </details> ### 📄 Description This change cleans up code in the `server/` directory by: * moving the manifest code into its own top-level directory (`manifest/`) out of `server/`; and * removing `server/modelpath.go` and consolidating it with `types/model/` When we added `types/model/` it was mostly redundant to `server/modelpath.go` but because it didn't have a way of handling the protocol scheme it was never a full replacement. This change adds the protocol scheme and removes it entirely. We also have been adding code into `x/` which needs to get a manifest, however, there is a chance for adding circularly dependencies if `server/routes.go` needs to call out to something in `x/` and a model in `x/` needs to get the manifest. --- <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 01:18:20 -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#45647