[PR #5405] [CLOSED] server/routers.go: Fix checkNameExists #11766

Closed
opened 2026-04-12 23:38:30 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/5405
Author: @coolljt0725
Created: 7/1/2024
Status: Closed

Base: mainHead: fix_check_exist


📝 Commits (1)

  • 8f66151 server/routers.go: Fix checkNameExists

📊 Changes

2 files changed (+1 additions, -42 deletions)

View changed files

📝 server/routes.go (+1 -11)
📝 server/routes_test.go (+0 -31)

📄 Description

When copy a model with a existed name, it suppose to error out, but it success.
The old checkNameExists only report exist model name in case the name is different, but they are same when both of
them convert to upper case, it means TEST and test is a same name, but test and test is not a same name.

# ollama cp tinyllama tinyllama
copied 'tinyllama' to 'tinyllama'

And we should not check name existence on create and pull, because
it suppose to replace some layers of the existing model


🔄 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/5405 **Author:** [@coolljt0725](https://github.com/coolljt0725) **Created:** 7/1/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix_check_exist` --- ### 📝 Commits (1) - [`8f66151`](https://github.com/ollama/ollama/commit/8f661518334ff05955cf5072925e126414087439) server/routers.go: Fix checkNameExists ### 📊 Changes **2 files changed** (+1 additions, -42 deletions) <details> <summary>View changed files</summary> 📝 `server/routes.go` (+1 -11) 📝 `server/routes_test.go` (+0 -31) </details> ### 📄 Description When copy a model with a existed name, it suppose to error out, but it success. The old `checkNameExists` only report exist model name in case the name is different, but they are same when both of them convert to upper case, it means `TEST` and `test` is a same name, but `test` and `test` is not a same name. ``` # ollama cp tinyllama tinyllama copied 'tinyllama' to 'tinyllama' ``` And we should not check name existence on create and pull, because it suppose to replace some layers of the existing model --- <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-12 23:38:30 -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#11766