[PR #1323] [MERGED] validate model tags on copy #57247

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

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/1323
Author: @BruceMacD
Created: 11/29/2023
Status: Merged
Merged: 11/29/2023
Merged by: @BruceMacD

Base: mainHead: brucemacd/tag-validation


📝 Commits (1)

  • 8f8c84b validate model tags on copy

📊 Changes

2 files changed (+21 additions, -2 deletions)

View changed files

📝 server/modelpath.go (+14 -0)
📝 server/routes.go (+7 -2)

📄 Description

Validate model tags and name on copy/create.

Resolves #1247

Example errors:

ollama create mario:test:1 -f ~/models/mario/Modelfile
transferring model data
Error: invalid model path: ':' (colon) is not allowed in tag names

ollama create :test -f ~/models/mario/Modelfile
transferring model data
Error: invalid model path: model repository name is required

ollama cp brxce/nous-capybara brxce/capybara:1:2
Error: invalid model path: ':' (colon) is not allowed in tag names

ollama cp brxce/nous-capybara :1:2
Error: invalid model path: model repository name is required

🔄 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/1323 **Author:** [@BruceMacD](https://github.com/BruceMacD) **Created:** 11/29/2023 **Status:** ✅ Merged **Merged:** 11/29/2023 **Merged by:** [@BruceMacD](https://github.com/BruceMacD) **Base:** `main` ← **Head:** `brucemacd/tag-validation` --- ### 📝 Commits (1) - [`8f8c84b`](https://github.com/ollama/ollama/commit/8f8c84b476aa75df3d8e0f1e973a069e0cd69720) validate model tags on copy ### 📊 Changes **2 files changed** (+21 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `server/modelpath.go` (+14 -0) 📝 `server/routes.go` (+7 -2) </details> ### 📄 Description Validate model tags and name on copy/create. Resolves #1247 Example errors: ``` ollama create mario:test:1 -f ~/models/mario/Modelfile transferring model data Error: invalid model path: ':' (colon) is not allowed in tag names ollama create :test -f ~/models/mario/Modelfile transferring model data Error: invalid model path: model repository name is required ollama cp brxce/nous-capybara brxce/capybara:1:2 Error: invalid model path: ':' (colon) is not allowed in tag names ollama cp brxce/nous-capybara :1:2 Error: invalid model path: model repository name is required ``` --- <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 11:49:53 -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#57247