[PR #774] [MERGED] add version api and show server version in cli #15593

Closed
opened 2026-04-16 05:02:52 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/774
Author: @mxyng
Created: 10/12/2023
Status: Merged
Merged: 12/6/2023
Merged by: @mxyng

Base: mainHead: mxyng/server-version


📝 Commits (6)

  • 5c59455 cmd: use existing cmd context
  • 1ebdbd9 server: add version handler
  • 0db4706 api: add version api handler
  • 0f0cd26 cmd: add server version
  • cde13bc cmd: only print server version when different
  • 4b77fcb comments

📊 Changes

3 files changed (+71 additions, -30 deletions)

View changed files

📝 api/client.go (+12 -0)
📝 cmd/cmd.go (+56 -30)
📝 server/routes.go (+3 -0)

📄 Description

some minor refactor of the cmd package

Example: server and client are the same version

$ ollama --version
Your ollama version 0.0.0

Example: server and client have different versions

$ ollama --version
Your ollama version 99.99.99999
Warning: Your client version is 0.0.0

Example: server is not accessible

$ ollama --version
Warning: Your server is not accessible
Your client version is 0.0.0

🔄 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/774 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 10/12/2023 **Status:** ✅ Merged **Merged:** 12/6/2023 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/server-version` --- ### 📝 Commits (6) - [`5c59455`](https://github.com/ollama/ollama/commit/5c59455b59a3a6b53bad0f029b17d90aec173bfc) cmd: use existing cmd context - [`1ebdbd9`](https://github.com/ollama/ollama/commit/1ebdbd9694de0746dd0860ffb88f25559794665b) server: add version handler - [`0db4706`](https://github.com/ollama/ollama/commit/0db4706ec243dbeaf5db71b5d31dbb53d32e63b4) api: add version api handler - [`0f0cd26`](https://github.com/ollama/ollama/commit/0f0cd265a7a494dce095be6a69aead01a234907b) cmd: add server version - [`cde13bc`](https://github.com/ollama/ollama/commit/cde13bcdeabec1aac945a126a14ee41ef366126d) cmd: only print server version when different - [`4b77fcb`](https://github.com/ollama/ollama/commit/4b77fcb2b94f0e98a89243ff2b55a0b7a4333ebb) comments ### 📊 Changes **3 files changed** (+71 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `api/client.go` (+12 -0) 📝 `cmd/cmd.go` (+56 -30) 📝 `server/routes.go` (+3 -0) </details> ### 📄 Description some minor refactor of the cmd package Example: server and client are the same version ``` $ ollama --version Your ollama version 0.0.0 ``` Example: server and client have different versions ``` $ ollama --version Your ollama version 99.99.99999 Warning: Your client version is 0.0.0 ``` Example: server is not accessible ``` $ ollama --version Warning: Your server is not accessible Your client version is 0.0.0 ``` --- <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-16 05:02:52 -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#15593