[PR #7921] [CLOSED] server: feedback before failing push on uppercase #59254

Closed
opened 2026-04-29 14:11:54 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/7921
Author: @BruceMacD
Created: 12/3/2024
Status: Closed

Base: mainHead: brucemacd/push-name-validation


📝 Commits (2)

  • 1be0804 server: feedback before failing push on uppercase
  • a5bc4b7 Update images_test.go

📊 Changes

2 files changed (+56 additions, -0 deletions)

View changed files

📝 server/images.go (+6 -0)
server/images_test.go (+50 -0)

📄 Description

When a username or model name is uppercase the registry will reject the push. This is done for file-system compatibility. If we rely on the registry error on push the message returned is 'file not found', which does not convey why the push actually failed.

Before:

> ollama push TEST_CAPS/x
retrieving manifest 
Error: file does not exist

> ollama push test_caps/X
retrieving manifest 
Error: file does not exist

Now:

> ollama push TEST_CAPS/x
retrieving manifest 
Error: namespace must be lowercase, but is TEST_CAPS

> ollama push test_caps/X
retrieving manifest 
Error: model name must be lowercase, but is X

An alternative option is to check this when the model is created, but I think its ok for users to name the model whatever they want on their local system. The model will still run.

related to #3501


🔄 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/7921 **Author:** [@BruceMacD](https://github.com/BruceMacD) **Created:** 12/3/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `brucemacd/push-name-validation` --- ### 📝 Commits (2) - [`1be0804`](https://github.com/ollama/ollama/commit/1be080403d6dab6a7784f75695a25aab9d7997ec) server: feedback before failing push on uppercase - [`a5bc4b7`](https://github.com/ollama/ollama/commit/a5bc4b7c1776fa80c119621b9e9a78fb8bac5d5a) Update images_test.go ### 📊 Changes **2 files changed** (+56 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `server/images.go` (+6 -0) ➕ `server/images_test.go` (+50 -0) </details> ### 📄 Description When a username or model name is uppercase the registry will reject the push. This is done for file-system compatibility. If we rely on the registry error on push the message returned is 'file not found', which does not convey why the push actually failed. Before: ```bash > ollama push TEST_CAPS/x retrieving manifest Error: file does not exist > ollama push test_caps/X retrieving manifest Error: file does not exist ``` Now: ```bash > ollama push TEST_CAPS/x retrieving manifest Error: namespace must be lowercase, but is TEST_CAPS > ollama push test_caps/X retrieving manifest Error: model name must be lowercase, but is X ``` An alternative option is to check this when the model is created, but I think its ok for users to name the model whatever they want on their local system. The model will still run. related to #3501 --- <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-29 14:11:54 -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#59254