[PR #14885] [MERGED] app: fix desktop app stuck loading when OLLAMA_HOST is an unspecified bind address #14894

Closed
opened 2026-04-13 01:05:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14885
Author: @hoyyeva
Created: 3/16/2026
Status: Merged
Merged: 3/19/2026
Merged by: @hoyyeva

Base: mainHead: hoyyeva/window-load-models


📝 Commits (2)

  • ef9baca app: fix desktop app stuck loading when OLLAMA_HOST is an unspecified bind address
  • 1bfb7ea clean up

📊 Changes

3 files changed (+55 additions, -1 deletions)

View changed files

📝 app/ui/ui.go (+1 -1)
📝 envconfig/config.go (+23 -0)
📝 envconfig/config_test.go (+31 -0)

📄 Description

This PR:

  • Add envconfig.ConnectableHost() that returns Host() with unspecified bind addresses (0.0.0.0, ::) replaced by loopback (127.0.0.1, ::1)
  • Use ConnectableHost() in api.ClientFromEnvironment() so all clients (desktop app, CLI, tools) automatically connect to a reachable address
  • Use ConnectableHost() directly in the desktop app's reverse proxy, the only call site that builds a connection outside of ClientFromEnvironment()

#13159 partically addressed this issue by adding retry logic and lazy proxy initialization to ollamaProxy(). However the retries still targeted the unreachable 0.0.0.0 address, so the underlying issue remainded.

Fixed #13377


🔄 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/14885 **Author:** [@hoyyeva](https://github.com/hoyyeva) **Created:** 3/16/2026 **Status:** ✅ Merged **Merged:** 3/19/2026 **Merged by:** [@hoyyeva](https://github.com/hoyyeva) **Base:** `main` ← **Head:** `hoyyeva/window-load-models` --- ### 📝 Commits (2) - [`ef9baca`](https://github.com/ollama/ollama/commit/ef9baca72b7d8cc8a62f9b00eaaf90fc5282ba9a) app: fix desktop app stuck loading when OLLAMA_HOST is an unspecified bind address - [`1bfb7ea`](https://github.com/ollama/ollama/commit/1bfb7ea91be19dff951a4943f7286c0af888219a) clean up ### 📊 Changes **3 files changed** (+55 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `app/ui/ui.go` (+1 -1) 📝 `envconfig/config.go` (+23 -0) 📝 `envconfig/config_test.go` (+31 -0) </details> ### 📄 Description This PR: - Add `envconfig.ConnectableHost()` that returns `Host()` with unspecified bind addresses (`0.0.0.0`, `::`) replaced by loopback (`127.0.0.1`, `::1`) - Use `ConnectableHost()` in `api.ClientFromEnvironment()` so all clients (desktop app, CLI, tools) automatically connect to a reachable address - Use `ConnectableHost()` directly in the desktop app's reverse proxy, the only call site that builds a connection outside of `ClientFromEnvironment()` #13159 partically addressed this issue by adding retry logic and lazy proxy initialization to `ollamaProxy()`. However the retries still targeted the unreachable `0.0.0.0` address, so the underlying issue remainded. Fixed #13377 --- <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-13 01:05: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#14894