[PR #15104] [MERGED] server: preserve raw manifest bytes during pull #40899

Closed
opened 2026-04-23 01:41:09 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15104
Author: @BruceMacD
Created: 3/27/2026
Status: Merged
Merged: 3/27/2026
Merged by: @BruceMacD

Base: mainHead: brucemacd/manifest-sha


📝 Commits (1)

  • 6f7b1d9 server: preserve raw manifest bytes during pull

📊 Changes

2 files changed (+86 additions, -19 deletions)

View changed files

📝 server/images.go (+22 -19)
📝 server/images_test.go (+64 -0)

📄 Description

pullModelManifest unmarshals the registry response into a Go struct then re-marshals with json.Marshal before writing to disk. When the registry's JSON formatting or field ordering differs from Go's output, the local SHA256 won't match the registry's Ollama-Content-Digest header, causing false "out of date" warnings.

Preserve the raw bytes from the registry response and write them directly to disk so the local manifest is byte-for-byte identical to what the registry serves.


🔄 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/15104 **Author:** [@BruceMacD](https://github.com/BruceMacD) **Created:** 3/27/2026 **Status:** ✅ Merged **Merged:** 3/27/2026 **Merged by:** [@BruceMacD](https://github.com/BruceMacD) **Base:** `main` ← **Head:** `brucemacd/manifest-sha` --- ### 📝 Commits (1) - [`6f7b1d9`](https://github.com/ollama/ollama/commit/6f7b1d9d23f48cd85cfb36b86da2658ebf679fc0) server: preserve raw manifest bytes during pull ### 📊 Changes **2 files changed** (+86 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `server/images.go` (+22 -19) 📝 `server/images_test.go` (+64 -0) </details> ### 📄 Description pullModelManifest unmarshals the registry response into a Go struct then re-marshals with json.Marshal before writing to disk. When the registry's JSON formatting or field ordering differs from Go's output, the local SHA256 won't match the registry's Ollama-Content-Digest header, causing false "out of date" warnings. Preserve the raw bytes from the registry response and write them directly to disk so the local manifest is byte-for-byte identical to what the registry serves. --- <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-23 01:41:09 -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#40899