-
Notifications
You must be signed in to change notification settings - Fork 153
Unable to configure Ollama as an option. #154
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.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy stat 8000 ement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Did you put the config.json in the root of your project (cwd) you are trying to use opencode in? See #152 as it does not read from the central config. You have to create a Also looks like you did this in |
Is this true for the Homebrew-installed (non-NPM) version? Also, on MacOS it definitely reads from That said, I did indeed try creating a "root-project-level" |
so for config also check the updated example in the readme - i do have this working myself so must be some simpler error we should help catch |
closing this, readme should have all info to figure out your issues |
Having an issue very similar to #107 Can't even get
ollama
config to boot. Ollama is absolutely running. I use it for OpenWebUI, etc. I've tried both/v1
and/api
but neither seems to make a difference.Click to show full output ...
``` ❯ opencode --print-logs 2025-06-16T21:24:28 +22ms service=default version=0.1.62 args=--print-logs opencode 2025-06-16T21:24:28 +0ms service=app cwd=/Users/devuser/code/playground/blockchain-scanner-monorepo cre ating 2025-06-16T21:24:28 +2ms service=app git=/Users/devuser/code/playground/blockchain-scanner-monorepo git 2025-06-16T21:24:28 +2ms service=app name=provider registering service 2025-06-16T21:24:28 +0ms service=app name=config registering service 2025-06-16T21:24:28 +0ms service=config loaded 2025-06-16T21:24:28 +1ms service=models.dev refreshing 2025-06-16T21:24:28 +0ms service=provider init█▀▀█ █▀▀█ █▀▀ █▀▀▄ █▀▀ █▀▀█ █▀▀▄ █▀▀
█░░█ █░░█ █▀▀ █░░█ █░░ █░░█ █░░█ █▀▀
▀▀▀▀ █▀▀▀ ▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀▀ ▀▀▀ ▀▀▀
┌ Add credential
2025-06-16T21:24:28 +1ms service=models.dev refreshing
│
◇ Select provider
│ Other
│
◇ Enter provider id
│ ollama
│
▲ This only stores a credential for ollama - you will need configure it in opencode.json, check the docs for examples.
│
◇ Enter your API key
│ ▪▪▪▪▪
│
└ Done
2025-06-16T21:24:34 +6422ms service=app cwd=/Users/devuser/code/playground/blockchain-scanner-monorepo creating
2025-06-16T21:24:34 +0ms service=app git=/Users/devuser/code/playground/blockchain-scanner-monorepo git
2025-06-16T21:24:34 +0ms service=app name=provider registering service
2025-06-16T21:24:34 +0ms service=app name=config registering service
2025-06-16T21:24:34 +0ms service=config loaded
2025-06-16T21:24:34 +1ms service=models.dev refreshing
2025-06-16T21:24:34 +0ms service=provider init
2025-06-16T21:24:34 +0ms service=provider providerID=ollama found
2025-06-16T21:24:34 +0ms service=app name=share registering service
2025-06-16T21:24:34 +0ms service=bus type=storage.write subscribing
2025-06-16T21:24:34 +0ms service=app name=bus registering service
2025-06-16T21:24:34 +38ms service=server method=GET path=/event request
2025-06-16T21:24:34 +0ms service=server event connected
2025-06-16T21:24:34 +1ms service=bus type=* subscribing
2025-06-16T21:24:34 +1ms service=server duration=2 response
2025-06-16T21:24:34 +1ms service=server method=POST path=/file_search request
2025-06-16T21:24:34 +2ms service=server method=POST path=/path_get request
2025-06-16T21:24:34 +1ms service=server duration=1 response
2025-06-16T21:24:34 +1ms service=server method=POST path=/provider_list request
2025-06-16T21:24:34 +1ms message=TypeError: undefined is not an object (evaluating 'Y.models') UnknownError
2025-06-16T21:24:34 +0ms service=server duration=1 response
2025-06-16T21:24:34 +4ms service=server duration=9 response
Caught panic:
runtime error: invalid memory address or nil pointer dereference
Restoring terminal...
goroutine 66 [running]:
runtime/debug.Stack()
/opt/hostedtoolcache/go/1.24.4/x64/src/runtime/debug/stack.go:26 +0x64
runtime/debug.PrintStack()
/opt/hostedtoolcache/go/1.24.4/x64/src/runtime/debug/stack.go:18 +0x1c
github.com/charmbracelet/bubbletea/v2.(*Program).recoverFromPanic(0x140001a9200, {0x10543cfe0, 0x1059edc90})
/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.3/tea.go:1134 +0xb0
github.com/charmbracelet/bubbletea/v2.(*Program).handleCommands.func1.1.1()
/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.3/tea.go:482 +0x40
panic({0x10543cfe0?, 0x1059edc90?})
/opt/hostedtoolcache/go/1.24.4/x64/src/runtime/panic.go:792 +0x124
github.com/sst/opencode/internal/tui.appModel.Init.(App).InitializeProvider.func2()
/home/runner/work/opencode/opencode/packages/tui/internal/app/app.go:78 +0x64
github.com/charmbracelet/bub2025-06-16T21:24:34 +38ms service=bus type= unsubscribing
2025-06-16T21:24:34 +2ms service=server event disconnected
The text was updated successfully, but these errors were encountered: