[PR #15932] [CLOSED] launch: Refactor model list sort. #77658

Closed
opened 2026-05-05 10:20:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15932
Author: @benkyriakou
Created: 5/2/2026
Status: Closed

Base: mainHead: benk--refactor-model-list-sort


📝 Commits (1)

  • d463bdf launch: Refactor model list sort.

📊 Changes

4 files changed (+136 additions, -49 deletions)

View changed files

cmd/internal/cmputil/cmp.go (+15 -0)
cmd/internal/cmputil/cmp_test.go (+24 -0)
📝 cmd/launch/models.go (+48 -49)
cmd/launch/models_test.go (+49 -0)

📄 Description

The sorting of the recommended models was written in a rather confusing way - this refactors the sort to make better use of comparability and remove redundant checks to increase readability.


🔄 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/15932 **Author:** [@benkyriakou](https://github.com/benkyriakou) **Created:** 5/2/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `benk--refactor-model-list-sort` --- ### 📝 Commits (1) - [`d463bdf`](https://github.com/ollama/ollama/commit/d463bdfa040046b1bb5b50fa14dbad4f20401b3e) launch: Refactor model list sort. ### 📊 Changes **4 files changed** (+136 additions, -49 deletions) <details> <summary>View changed files</summary> ➕ `cmd/internal/cmputil/cmp.go` (+15 -0) ➕ `cmd/internal/cmputil/cmp_test.go` (+24 -0) 📝 `cmd/launch/models.go` (+48 -49) ➕ `cmd/launch/models_test.go` (+49 -0) </details> ### 📄 Description The sorting of the recommended models was written in a rather confusing way - this refactors the sort to make better use of comparability and remove redundant checks to increase readability. --- <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 10:20:06 -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#77658