Pre-flight Checklist
π Bug Description
When a local Ollama provider is correctly defined in opencode.json, its models do not appear in
the SDD phase model picker. The TUI only lists ollama-cloud (a paid cloud service), with no
indication that local models are supported or why they are not shown.
Related to #375 (LM Studio, v1.23.0). Unlike that report, in v1.40.2 opencode.json IS already
read via LoadConfigProviders + MergeCustomProviders β that part is fixed. The remaining
friction is a different, undocumented requirement.
π Steps to Reproduce
-
Configure a local Ollama provider in ~/.config/opencode/opencode.json:
"provider": {
"ollama": {
"name": "Ollama (local)",
"npm": "@ai-sdk/openai-compatible",
"options": { "baseURL": "http://localhost:11434/v1" },
"models": {
"qwen3-coder:30b": { "name": "Qwen3 Coder 30B" }
}
}
}
2. Run gentle-ai β OpenCode SDD Profiles β Create new profile
3. Reach the provider selection screen
2.
3.
### β
Expected Behavior
The "ollama" provider appears in the picker with the configured local models available for assignment to SDD phases.
### β Actual Behavior
"ollama" does not appear. Only "ollama-cloud" is shown (a separate cloud provider requiring OLLAMA_API_KEY). The local models are silently excluded with no error or warning.
### Gentle AI Version
1.40.2
### Operating System
Linux (Ubuntu/Debian)
### AI Agent / Client
OpenCode
### π Affected Area
TUI (terminal UI)
### π‘ Logs / Error Output
```shell
No error output β the exclusion is silent.
Additional Context
Root cause found in internal/opencode/models.go:
func FilterModelsForSDD(provider Provider) []Model {
var models []Model
for _, m := range provider.Models {
if m.ToolCall { // false by default in Go β all custom models excluded
models = append(models, m)
}
}
return models
}
type ConfigModel struct {
Name string `json:"name"`
ToolCall bool `json:"tool_call"` // not mentioned in any docs
}
The ConfigProvider struct only reads "name" and "tool_call" per model. Since "tool_call"
defaults to false, any model in opencode.json without that field is invisible to the SDD picker.
Workaround:
add "tool_call": true to each model entry in opencode.json that supports tool calling.
This immediately fixes the issue β the provider and models appear in the picker on the next
gentle-ai run.
Suggested fix options (in order of effort):
A. Docs: add a "Local Ollama / LM Studio" section to docs/opencode-profiles.md explaining the
tool_call requirement with a minimal example.
B. TUI warning: when a provider has models but none pass FilterModelsForSDD, show a hint
instead of silently omitting the provider.
C. Auto-detect: query GET /v1/models on local providers at startup and infer tool_call support
from model family (Qwen, Llama, Gemma β true; embedding/OCR β false).
Pre-flight Checklist
status:approvedπ Bug Description
When a local Ollama provider is correctly defined in
opencode.json, its models do not appear inthe SDD phase model picker. The TUI only lists
ollama-cloud(a paid cloud service), with noindication that local models are supported or why they are not shown.
Related to #375 (LM Studio, v1.23.0). Unlike that report, in v1.40.2
opencode.jsonIS alreadyread via
LoadConfigProviders+MergeCustomProvidersβ that part is fixed. The remainingfriction is a different, undocumented requirement.
π Steps to Reproduce
Configure a local Ollama provider in ~/.config/opencode/opencode.json:
"provider": {
"ollama": {
"name": "Ollama (local)",
"npm": "@ai-sdk/openai-compatible",
"options": { "baseURL": "http://localhost:11434/v1" },
"models": {
"qwen3-coder:30b": { "name": "Qwen3 Coder 30B" }
}
}
}
Additional Context
Root cause found in internal/opencode/models.go:
The ConfigProvider struct only reads "name" and "tool_call" per model. Since "tool_call"
defaults to false, any model in opencode.json without that field is invisible to the SDD picker.
Workaround:
add "tool_call": true to each model entry in opencode.json that supports tool calling.
This immediately fixes the issue β the provider and models appear in the picker on the next
gentle-ai run.
Suggested fix options (in order of effort):
A. Docs: add a "Local Ollama / LM Studio" section to docs/opencode-profiles.md explaining the
tool_call requirement with a minimal example.
B. TUI warning: when a provider has models but none pass FilterModelsForSDD, show a hint
instead of silently omitting the provider.
C. Auto-detect: query GET /v1/models on local providers at startup and infer tool_call support
from model family (Qwen, Llama, Gemma β true; embedding/OCR β false).