[PR #9775] [MERGED] server/internal/client/ollama: set User-Agent for registry client #18327

Closed
opened 2026-04-16 06:31:58 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/9775
Author: @bmizerany
Created: 3/14/2025
Status: Merged
Merged: 3/15/2025
Merged by: @bmizerany

Base: mainHead: bmizerany/client2useragent


📝 Commits (1)

  • 02cb010 server/internal/client/ollama: set User-Agent for registry client

📊 Changes

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

View changed files

📝 server/internal/client/ollama/registry.go (+12 -0)

📄 Description

This sets the agent header in DefaultRegistry to include the version of
the client, OS, and architecture in the previous format, with a minor
twist.

Note: The version is obtained from the build info, instead of the
version in version.Version, which should not longer be necessary, but we
can remove in a future commit. Using the build info is more accurate and
also provides extra build information if the build is not tagged, and if
it is "dirty". Previously, the version was just "0.0.0" with no other
helpful information. The ollama.com registry and others handle this
swimmingly.


🔄 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/9775 **Author:** [@bmizerany](https://github.com/bmizerany) **Created:** 3/14/2025 **Status:** ✅ Merged **Merged:** 3/15/2025 **Merged by:** [@bmizerany](https://github.com/bmizerany) **Base:** `main` ← **Head:** `bmizerany/client2useragent` --- ### 📝 Commits (1) - [`02cb010`](https://github.com/ollama/ollama/commit/02cb010a19cb61f784628f12cd80c2d4006c4d07) server/internal/client/ollama: set User-Agent for registry client ### 📊 Changes **1 file changed** (+12 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `server/internal/client/ollama/registry.go` (+12 -0) </details> ### 📄 Description This sets the agent header in DefaultRegistry to include the version of the client, OS, and architecture in the previous format, with a minor twist. Note: The version is obtained from the build info, instead of the version in version.Version, which should not longer be necessary, but we can remove in a future commit. Using the build info is more accurate and also provides extra build information if the build is not tagged, and if it is "dirty". Previously, the version was just "0.0.0" with no other helpful information. The ollama.com registry and others handle this swimmingly. --- <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 06:31:58 -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#18327