Repository navigation
Description
Description
I am running mistral.rs as my LLM service. If I configure it to load a model from my filesystem, then the model ID becomes the filesystem path, like /my/llms/Qwen3. (There does not appear to be a way to customize this today.)
So this works:
curl http://server.lan/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{ "model": "/my/llms/Qwen3", "messages": [...] }'
So I try to configure OpenCode as follows:
"provider": {
"philiplocal": {
"npm": "@ai-sdk/openai-compatible",
"name": "Philip's workstation",
"options": {
"baseURL": "http://server.lan/v1"
},
"models": {
"/my/llms/Qwen3": {
"name": "local Qwen3"
}
}
}
},
"model": "philiplocal//my/llms/Qwen3",
When I open OpenCode and send a chat message, I see this in the log file:
INFO 2026-03-02T07:39:05 +1ms service=llm providerID=philiplocal modelID=/my/llms/Qwen3 sessionID=ses_3528376f9ffeEJ9cVZte9u73vG small=false agent=plan mode=primary stream
INFO 2026-03-02T07:39:05 +0ms service=provider status=started providerID=philiplocal getSDK
INFO 2026-03-02T07:39:05 +0ms service=provider providerID=philiplocal pkg=@ai-sdk/openai-compatible using bundled provider
INFO 2026-03-02T07:39:05 +1ms service=provider status=completed duration=1 providerID=philiplocal getSDK
ERROR 2026-03-02T07:39:05 +0ms service=default e=ProviderModelNotFoundError rejection
Meanwhile, OpenCode UI is waiting indefinitely for a response until I quit the program. (This is probably a separate issue, that the error is not detected and surfaced to the user.)
When I instead change the OpenCode config to remove slashes from the model key, then OpenCode correctly immediately shows a server error: "Internal Server Error: Requested model 'Xyz' is not available..."
My conclusion is that OpenCode does not support model IDs with slashes.
This is a little strange because, based on the log file, it split my requested model into the correct providerID versus modelID -- so it's not entirely confused about slashes.
I will also pursue improving mistral.rs to support giving models custom names to avoid this problem, but it would be great if OpenCode allowed this usage.
Plugins
none
OpenCode version
1.2.13
Steps to reproduce
Create an OpenCode config file with a local provider and a model ID having slashes, and try to use it. (All detail is in the bug description.)
Screenshot and/or share link
No response
Operating System
NixOS unstable
Terminal
foot
Activity
github-actions commentedon Mar 2, 2026
This issue might be a duplicate of existing issues. Please check:
github-actions commentedon May 2, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.