[PR #15069] model: normalize Unicode hyphens in model names #77295

Open
opened 2026-05-05 09:57:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15069
Author: @ssam18
Created: 3/26/2026
Status: 🔄 Open

Base: mainHead: fix/unicode-hyphen-model-name


📝 Commits (2)

  • 53b08e7 model: normalize Unicode hyphens in model names
  • 45915e7 Merge remote-tracking branch 'upstream/main' into fix/unicode-hyphen-model-name

📊 Changes

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

View changed files

📝 types/model/name.go (+23 -0)
📝 types/model/name_test.go (+49 -0)

📄 Description

Model names containing Unicode hyphen-like characters, most commonly the non-breaking hyphen (U+2011), are now accepted wherever a regular ASCII hyphen is valid.

This is a real pain point: when a model name like granite4:tiny-h is displayed in a browser or copied from a rich-text source, the hyphen can silently become U+2011. The user then runs ollama rm granite4:tiny‑h and gets a cryptic name granite4:tiny‑h is invalid error with no hint about what went wrong.


🔄 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/15069 **Author:** [@ssam18](https://github.com/ssam18) **Created:** 3/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/unicode-hyphen-model-name` --- ### 📝 Commits (2) - [`53b08e7`](https://github.com/ollama/ollama/commit/53b08e795dd246e9e8458b4f25bc799ea544b065) model: normalize Unicode hyphens in model names - [`45915e7`](https://github.com/ollama/ollama/commit/45915e7efe02018603204cda67b9f8ad4773828e) Merge remote-tracking branch 'upstream/main' into fix/unicode-hyphen-model-name ### 📊 Changes **2 files changed** (+72 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `types/model/name.go` (+23 -0) 📝 `types/model/name_test.go` (+49 -0) </details> ### 📄 Description Model names containing Unicode hyphen-like characters, most commonly the non-breaking hyphen (U+2011), are now accepted wherever a regular ASCII hyphen is valid. This is a real pain point: when a model name like `granite4:tiny-h` is displayed in a browser or copied from a rich-text source, the hyphen can silently become U+2011. The user then runs `ollama rm granite4:tiny‑h` and gets a cryptic `name granite4:tiny‑h is invalid` error with no hint about what went wrong. --- <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-05-05 09:57:49 -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#77295