GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Adding the auto-detection of ollama local with a variable for baseURL by dkudos · Pull Request #3726 · anomalyco/opencode

Adding the auto-detection of ollama local with a variable for baseURL #3726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dkudos wants to merge 8 commits into anomalyco:dev from dkudos:auto_detect_ollama

Uh oh!

There was an error while loading. Please reload this page.

Closed

Adding the auto-detection of ollama local with a variable for baseURL #3726

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit Hold shift + click to select a range
d3af6b2
adding the auto-detection of ollama local with a variable for baseURL
Nov 1, 2025
658d9d4
Merge branch 'sst:dev' into auto_detect_ollama
dkudos Nov 10, 2025
0ffb048
chore: format code
actions-user Nov 10, 2025
a0466df
Merge branch 'dev' into auto_detect_ollama
dkudos Nov 19, 2025
a50dc8f
Merge branch 'dev' into auto_detect_ollama
dkudos Nov 30, 2025
169e396
chore: format code
actions-user Nov 30, 2025
8968005
Update Nix flake.lock and hashes
actions-user Nov 30, 2025
9767105
Merge branch 'dev' into auto_detect_ollama
dkudos Dec 19, 2025
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
chore: format code
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@actions-user
actions-user committed Nov 10, 2025
commit 0ffb048299469ec3bdc857c4ae9ffbf266e5b9dc

There are no files selected for viewing

4 changes: 2 additions & 2 deletions 4 packages/opencode/src/provider/provider.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,11 @@ export namespace Provider {
}

type TagsResponse = { models?: Array<{ name: string; model: string }> }
const data = await fetch(`${url}/api/tags`, {
const data = (await fetch(`${url}/api/tags`, {
signal: AbortSignal.timeout(3000),
})
.then((r) => (r.ok ? r.json() : null))
.catch(() => null) as TagsResponse | null
.catch(() => null)) as TagsResponse | null

const models = data?.models || []
if (models.length === 0 && Object.keys(provider?.models || {}).length === 0) {
Expand Down
3 changes: 3 additions & 0 deletions 3 packages/web/src/content/docs/providers.mdx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ OpenCode provides zero-configuration support for Ollama, automatically detecting
#### Quick Start (Zero Config!)

1. **Start Ollama** (if not already running):

```bash
ollama serve
```
Expand All @@ -623,11 +624,13 @@ That's it! All your Ollama models will appear in the model list automatically.
OpenCode will automatically detect the Ollama server URL in the following priority:

1. **Environment variable**: If you set `OLLAMA_BASE_URL`, OpenCode will use that URL.

```bash
OLLAMA_BASE_URL=http://192.168.2.26:11434 opencode
```

Or add it to your bash profile:

```bash title="~/.bash_profile"
export OLLAMA_BASE_URL=http://192.168.2.26:11434
```
Expand Down
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.