GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [FEATURE]: Support decision models from local OpenAI-compatible providers (LM Studio /v1/systemone) · Issue #64306 · anomalyco/opencode

[FEATURE]: Support decision models from local OpenAI-compatible providers (LM Studio /v1/systemone) #64306

New issue
Copy link
New issue
Copy link
Closed
Closed
[FEATURE]: Support decision models from local OpenAI-compatible providers (LM Studio /v1/systemone)#64306
Copy link
Labels
area/providersProviders and model listsplatform/windowsWindowstype/featureNew behaviour or an improvementversion/v2OpenCode 2.x

Description

@Mawericksracing
Mawericksracing
opened on Nov 16, 2026
Issue body actions

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-compatible has no decisions module.
  • Declaring "type": "decision" on a custom provider's model makes the model disappear from the catalog. A/B is unambiguous: without type the model appears in /api/model, with type: "decision" it is silently dropped (same result with a per-model package: "@opencode/ai/providers/typesafe-ai").
  • Overriding the native lmstudio provider is ignored: the log reports retained 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)

  1. Add a decisions transport to openai-compatible that posts to {baseURL}/systemone (or {baseURL}/decisions) when a model is declared type: "decision". This also covers llama.cpp's System One API and any Jev-compatible server, not just LM Studio.
  2. 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.
  3. At minimum, stop discarding type: "decision" models from custom providers, and route them through the System One protocol.

Steps to reproduce

  1. LM Studio 0.4.28: download a decision model (rizzo-flow) and start the server on 127.0.0.1:1234.
  2. 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" }
    }
  }
}
  1. opencode api get /api/model -> no local-rizz models.
  2. Remove "type": "decision" -> the model appears, but the decisions endpoint rejects it.
  3. POST /api/experimental/generate/decisions with {"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/systemone reachable 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

  1. opencodejr commented on Nov 16, 2026

    @opencodejr
    opencodejrBot
    on Nov 16, 2026
    Contributor
    More actions

    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 native lmstudio provider 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:

    • a new @opencode/ai/providers/openai-compatible/decisions entrypoint that sends System One requests to the provider's base URL;
    • LM Studio discovery that now lists decision models as decision models with that package, instead of filtering them out;
    • support for running a local decision model without an API key (before, this failed with 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-flow should be listed as a decision model.

    On a model disappearing when it has "type": "decision": the providers docs say type "Defaults to chat; 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's package to @opencode/ai/providers/openai-compatible/decisions (instead of the TypeSafe one) together with type: "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:

    • feat(core): run LM Studio decision models #63200: native LM Studio decision models and the openai-compatible decisions entrypoint (merged)
    • core: LM Studio model discovery fails silently with decision-type models #56213 / fix(core): accept decision-type models from LM Studio #56214: the earlier LM Studio discovery fix for decision models
    • feat(core): discover models for configured OpenAI-compatible providers #57161: model discovery for configured OpenAI-compatible providers
  2. opencodejr
    added
    area/providersProviders and model lists
    platform/windowsWindows
    type/featureNew behaviour or an improvement
    version/v2OpenCode 2.x
    on Nov 16, 2026
  3. neriousy commented on Nov 23, 2026

    @neriousy
    neriousy
    on Nov 23, 2026
    Member
    More actions

    Since v2.3.0 (#63200), LM Studio decision models are listed as decision models and run without an API key. On a custom provider, set the model's package to @opencode/ai/providers/openai-compatible/decisions with type: "decision". A per-provider or per-model decision endpoint would be a separate request.

  4. neriousy
    closed this as completedon Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/providersProviders and model listsplatform/windowsWindowstype/featureNew behaviour or an improvementversion/v2OpenCode 2.x

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.