Skip to content

feat: make ollama host configurable in goose2#8912

Merged
kalvinnchau merged 2 commits intomainfrom
kalvin/ollama-provider
Apr 29, 2026
Merged

feat: make ollama host configurable in goose2#8912
kalvinnchau merged 2 commits intomainfrom
kalvin/ollama-provider

Conversation

@kalvinnchau
Copy link
Copy Markdown
Collaborator

@kalvinnchau kalvinnchau commented Apr 29, 2026

Category: fix
User Impact: Users can configure Ollama with a custom host or port from goose2 instead of having it appear connected by default.
Problem: goose2 treated Ollama as connected because the backend default host counted as configured, even when users had not saved any Ollama settings. That made it unclear how to use a non-default Ollama host or port.
Solution: Ollama now reports configured status only when OLLAMA_HOST is explicitly set, and goose2 exposes a host field pre-filled with the effective local default so users can save or edit it.

File changes

crates/goose/src/providers/ollama.rs
Overrides Ollama inventory configuration status so the runtime fallback host does not make the provider appear configured. Adds focused tests for unset, environment, and saved-config host states.

ui/goose2/src/features/providers/providerCatalog.ts
Changes Ollama from a local zero-config entry to a configurable provider with an OLLAMA_HOST field and default host value.

ui/goose2/src/features/providers/providerCatalog.test.ts
Covers the Ollama catalog entry so the host field and default remain present.

ui/goose2/src/features/settings/ui/ModelProviderRow.test.tsx
Adds coverage that provider field defaults are pre-filled and saved from the setup form.

ui/goose2/src/features/settings/ui/modelProviderHelpers.tsx
Uses provider field defaults when initializing setup drafts and no saved config value exists.

ui/goose2/src/shared/types/providers.ts
Adds an optional defaultValue property to provider field metadata.

Reproduction Steps

  1. Open goose2 settings and go to model providers.
  2. Expand Ollama before setting OLLAMA_HOST.
  3. Confirm it is not shown as already connected and that the Host field is pre-filled with http://localhost:11434.
  4. Change the Host field to a custom Ollama endpoint or keep the default, then save.
  5. Confirm Ollama is marked connected and model inventory refresh starts for the saved host.

Screenshots/Demos

Not included. The UI change is a settings form field and can be verified with the reproduction steps above.

Verification

  • cargo fmt
  • pnpm exec biome format --write ...
  • git diff --check
  • git push -u origin HEAD pre-push checks passed, including goose2 pnpm test, pnpm check, pnpm build, Tauri cargo fmt --check, cargo check, and cargo clippy -- -D warnings.

before:

image

after:

image

@kalvinnchau kalvinnchau changed the title make ollama host configurable in goose2 feat: make ollama host configurable in goose2 Apr 29, 2026
Copy link
Copy Markdown
Collaborator

@baxen baxen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread crates/goose/src/providers/ollama.rs Outdated
@kalvinnchau kalvinnchau enabled auto-merge April 29, 2026 18:11
@kalvinnchau kalvinnchau added this pull request to the merge queue Apr 29, 2026
Merged via the queue into main with commit 000d7c5 Apr 29, 2026
27 checks passed
@kalvinnchau kalvinnchau deleted the kalvin/ollama-provider branch April 29, 2026 18:35
lifeizhou-ap added a commit that referenced this pull request Apr 30, 2026
* main: (24 commits)
  fix: copy and content improvements in goose2 (#8886)
  feat: make ollama host configurable in goose2 (#8912)
  polish sidebar navigation and project icons (#8896)
  fix: model picker stays usable during provider loading (#8900)
  feat: update provider row after saving credentials (#8914)
  feat: support google model inventory refresh (#8913)
  chore: Added goose 2 UI refactor review skill (#8903)
  blog: goose with peekaboo (#8884)
  blog: Built-in Local Inference blogpost. (#8808)
  perf: parallelize provider resolution and eagerly init SQLite pool (#8899)
  refactor: update goose2 credential management behind provider-scoped ACP/core API (#8887)
  fix: handle acp requests concurrently (#8781)
  build: set LLAMA_STATIC_CRT for Windows CUDA (#8901)
  perf: deduplicate _goose/providers/list RPC call at startup (#8873)
  chore: add a bit more instructions in the release pr (#8890)
  chore: disable spellcheck in model search (#8889)
  add skills to the chat composer (#8881)
  mergeable configs + cleanup (#8378)
  refactor: agent provider to use explicit type states (#8879)
  [goose2] MCP Apps: hydrate and replay app payloads in Goose2 (#8632)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants