anomalyco / anomalyco/opencode
opencode2: user-defined local provider models never enter the model catalog
@rekram1-node is already working on this.
Since Aug 16, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Summary
I downloaded opencode2 beta.
My user-defined local OpenAI-compatible provider (per the documented "Local models" config) is not visible, while it is working with opencode.
According to the model which investigated, it is parsed by the service but its model is never exposed in the catalog. opencode2 run -m <provider>/<model> fails with Model unavailable and the provider is absent from /api/provider.
Plugins
none
OpenCode version
opencode2 v0.0.0-next-17444 (channel: next)
Steps to reproduce
Steps to reproduce
- Create
~/.config/opencode/opencode.jsonc(also reproducible as a real file, non-symlink):{ "$schema": "https://opencode.ai/config.json", "providers": { "local-llama-cpp": { "name": "Local llama.cpp", "package": "aisdk:@ai-sdk/openai-compatible", "settings": { "baseURL": "http://localhost:11434/v1" }, "models": { "local-llm": { "modelID": "local-llm", "capabilities": { "tools": true, "input": ["text"], "output": ["text"] }, "limit": { "context": 114588, "output": 32768 } } } } } } opencode2 service restartopencode2 api get /api/provider— only the built-inopencodeprovider is listed;local-llama-cppis absent.opencode2 api get /api/model— only the 7 built-inopencodemodels are present.opencode2 run -m local-llama-cpp/local-llm "hi"→Error: Model unavailable: local-llama-cpp/local-llm
Expected Behavior
Per the Local models documentation, the local-llama-cpp/local-llm model should appear in the model picker and be runnable.
Actual Behavior
The provider is parsed and held by the service (confirmed via /api/config), but it never enters the model catalog: absent from /api/provider and /api/model, and run reports Model unavailable.
Screenshot and/or share link
No response
Operating System
Linux z390v2 7.1.8-arch1-3 x86_64 GNU/Linux
Terminal
Konsole / tmux
Additional Context
-
Distinct from https://github.com/anomalyco/opencode/issues/36834 (closed):
- There the model resolves but the request hangs / sends to
undefined/chat/completions; here the model never enters the catalog, so the failure is earlier (catalog build / model resolution). - Also its repro used the V1
npm/optionsshape, whereas this report uses the documented nativepackage: "aisdk:@ai-sdk/openai-compatible"+settings.baseURLshape.
- There the model resolves but the request hangs / sends to
-
The provider uses
aisdk:@ai-sdk/openai-compatible— the exact package the built-inopencodeprovider uses, so the package resolves. -
The config is confirmed loaded by the service:
opencode2 api get /api/configreturns the document withproviders.local-llama-cppand the model. No normalization warnings are emitted for the native V2 config. -
Reproduced with:
- Minimal native V2 config (above) as a symlink AND as a real file — identical failure, so the dotfiles symlink is not the cause.
- V1
provider/npm/optionssyntax (converted per the migration guide) — same failure.
-
The OpenAI-compatible endpoint itself works:
curl localhost:11434/v1/chat/completionsreturns a valid completion.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.