Repository navigation
Description
Description
LM Studio 0.4.28 ships native decision models and a Jev / System One compatible endpoint: POST /v1/systemone accepting { model, state, questions } and answering noul (predicate), choice and score questions. That is the same protocol OpenCode already speaks through @opencode/ai/providers/typesafe-ai, so a fully local decision backend is now technically available — for example rizzo-flow, a 4B Spark X2.5 LoRA with 1M context, ~2.6 GB at Q4_K_M.
OpenCode already exposes decisions (/api/experimental/generate/decisions) and supports them for 8 built-in cloud providers (baseten, cloudflare-ai-gateway, cloudflare-workers-ai, digitalocean, opencode, openrouter, typesafe-ai, vercel-ai-gateway). There is no way to point them at a local endpoint:
@opencode/ai/providers/openai-compatiblehas nodecisionsmodule.- Declaring
"type": "decision"on a custom provider's model makes the model disappear from the catalog. A/B is unambiguous: withouttypethe model appears in/api/model, withtype: "decision"it is silently dropped (same result with a per-modelpackage: "@opencode/ai/providers/typesafe-ai"). - Overriding the native
lmstudioprovider is ignored: the log reportsretained native value over legacy value.
Result: POST /api/experimental/generate/decisions for lmstudio/rizzo-flow returns
422 UnsupportedModelError
lmstudio/rizzo-flow is a chat model, not a decision model
Why it matters: local decisions would enable privacy-preserving, zero-cost, rate-limit-free classifiers for permission auto-approval, context pruning plugins (fast-jev-compaction style), routing and retry logic. No API key, no data leaving the machine.
Proposed change (any of these unblocks it)
- Add a decisions transport to
openai-compatiblethat posts to{baseURL}/systemone(or{baseURL}/decisions) when a model is declaredtype: "decision". This also covers llama.cpp's System One API and any Jev-compatible server, not just LM Studio. - Let a provider or a single model declare its decision endpoint explicitly (e.g.
decision: { baseURL, model }), decoupling the capability from the 8 hardcoded provider packages. - At minimum, stop discarding
type: "decision"models from custom providers, and route them through the System One protocol.
Steps to reproduce
- LM Studio 0.4.28: download a decision model (
rizzo-flow) and start the server on127.0.0.1:1234. - Declare a custom provider:
"providers": {
"local-rizz": {
"package": "@opencode/ai/providers/openai-compatible",
"settings": { "baseURL": "http://127.0.0.1:1234/v1" },
"models": {
"rizzo-flow": { "name": "rizzo-flow 4B", "type": "decision" }
}
}
}opencode api get /api/model-> nolocal-rizzmodels.- Remove
"type": "decision"-> the model appears, but the decisions endpoint rejects it. POST /api/experimental/generate/decisionswith{"model":{"providerID":"lmstudio","id":"rizzo-flow"},"input":[...],"questions":[...]}->422 UnsupportedModelError.
Environment
- opencode
2.2.5 - Windows 11 build 26300.9974, Windows PowerShell 5.1
- LM Studio 0.4.28,
POST http://127.0.0.1:1234/v1/systemonereachable and working
Related
- core: LM Studio model discovery fails silently with decision-type models #56213 / fix(core): accept decision-type models from LM Studio #56214: LM Studio discovery used to fail with decision models. Fixed, but decision models are still filtered out of the model list and remain unusable for decisions.
Activity
opencodejr commentedon Nov 16, 2026
Thanks for the detailed request and the clear A/B test.
You're asking for decisions (
/api/experimental/generate/decisions) to work with local decision models served over LM Studio's System One endpoint (/v1/systemone), from the nativelmstudioprovider or from a custom OpenAI-compatible provider.Most of this has already been worked on: #63200 ("feat(core): run LM Studio decision models") was merged on the main branch after 2.2.5. It adds:
@opencode/ai/providers/openai-compatible/decisionsentrypoint that sends System One requests to the provider's base URL;Missing auth credential: apiKey).From what I can tell, this change is not in a published release yet, so 2.2.5 behaves as you describe. Once a release includes it,
lmstudio/rizzo-flowshould be listed as a decision model.On a model disappearing when it has
"type": "decision": the providers docs saytype"Defaults tochat; only chat models are offered for sessions". That is probably why it drops out of the list you checked. On a release that includes #63200, setting the model'spackageto@opencode/ai/providers/openai-compatible/decisions(instead of the TypeSafe one) together withtype: "decision"is the closest match to what the PR adds. I have not verified that this config works end to end.Your second proposal, an explicit per-provider or per-model decision endpoint setting, is not covered by that PR. Maintainers will consider it along with the rest of this request.
Related: