[PR #822] [MERGED] Fix /api/tags for no models. #10344

Closed
opened 2026-04-12 22:58:37 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/822
Author: @ggozad
Created: 10/17/2023
Status: Merged
Merged: 10/18/2023
Merged by: @mxyng

Base: mainHead: fix-tags-api


📝 Commits (1)

  • 8c6c2cb When the .ollama folder is broken or there are no models return an empty list on /api/tags

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 server/routes.go (+1 -1)

📄 Description

When the .ollama folder is broken, or no models exist, /api/tags returns {models: null} instead of the expected {models: []}.

Please review the change as minor as it is, as my experience with Go is close to nil.


🔄 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/822 **Author:** [@ggozad](https://github.com/ggozad) **Created:** 10/17/2023 **Status:** ✅ Merged **Merged:** 10/18/2023 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `fix-tags-api` --- ### 📝 Commits (1) - [`8c6c2cb`](https://github.com/ollama/ollama/commit/8c6c2cbc8cd23ab966132fe58d0140477f0b2138) When the .ollama folder is broken or there are no models return an empty list on /api/tags ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `server/routes.go` (+1 -1) </details> ### 📄 Description When the `.ollama` folder is broken, or no models exist, `/api/tags` returns `{models: null}` instead of the expected `{models: []}`. Please review the change as minor as it is, as my experience with Go is close to nil. --- <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 22:58:37 -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#10344