Repository navigation
Description
Hello, I'm trying to get opencode working with an Ollama API provider, however it won't install via bun as it seems to be hardcoded to pull a package with the tag "beta".
Config:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"ollama-ollama": {
"npm": "ollama-ai-provider",
"name": "Ollama Local",
"options": {
"baseURL": "http://ollama.local:11434"
},
"models": {
"hf.co/unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:Q8_0": {
"name": "Qwen3 Coder 30B MoE - unsloth"
},
"qwen3-coder:30b-a3b-q8_0": {
"name": "Qwen3 Coder - ollama"
},
"hf.co/unsloth/Devstral-Small-2507-GGUF:Q8_0": {
"name": "Devstral"
}
}
}
}
}
Log:
INFO 2025-08-02T07:15:02 +0ms service=provider providerID=ollama-ollama modelID=hf.co/unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:Q8_0 getModel
INFO 2025-08-02T07:15:02 +1ms service=provider status=started providerID=ollama-ollama getSDK
INFO 2025-08-02T07:15:02 +0ms service=bun pkg=ollama-ai-provider version=beta installing package using Bun's default registry resolution
INFO 2025-08-02T07:15:02 +0ms service=bun cmd=["/Users/<censored>/.opencode/bin/opencode","add","--force","--exact","--cwd","/Users/<censored>/.cache/opencode","ollama-ai-provider@beta"] cwd=/Users/<censored>/.cache/opencode running
INFO 2025-08-02T07:15:04 +1573ms service=bun code=1 stdout=bun add v1.2.19 (aad3abea)
stderr=Resolving dependencies
Resolved, downloaded and extracted [2]
error: Package "ollama-ai-provider" with tag "beta" not found, but package exists
error: ollama-ai-provider@beta failed to resolve
done
Suspected line in opencode codebase
const mod = await import(await BunProc.install(pkg, "beta"))
I'm trying to get the Ollama API provider working as my experience with building my own apps with tool calling revealed that for some reason tool calling is much more reliable and consistent when using the ollama API vs the openai compatible API. I suspect that local models hosted with ollama might perform a little better this way.
I tried specifying tag as @latest, and it still appended @beta so ended up resolving to ollama-ai-provider@latest@beta. Is there a way to respect a tag specified via the npm entry, like ollama-ai-provider@latest or to add another entry for tag allowing to override the beta tag default?
Activity
thdxr commentedon Aug 3, 2025
we use aws sdk v5 and these third party providers don't yet work. we should probably only append the tag for @ai-sdk/* packages through
rekram1-node commentedon Dec 28, 2025
[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!