opencode-lmstudio v1.0.0-rc.2
Pre-releaseopencode-lmstudio v1.0.0-rc.2
1.0.0-rc.2 hardens the typed v1 integration around LM Studio's native REST
API, effective loaded context, OpenCode's real npm package resolver, and ACP
stdio. It is published under npm next; stable npm latest remains on
0.3.1.
Track rollout status and report results in
#34.
Install
Pin the exact candidate in opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-lmstudio@1.0.0-rc.2"]
}The moving prerelease channel is opencode-lmstudio@next. Restart OpenCode
after changing plugin versions.
Compatibility
- OpenCode 1.17.7 or newer
- LM Studio 0.4.0 or newer
- Native
GET /api/v1/modelson the configured LM Studio server - OpenAI-compatible
/v1/chat/completionsfor inference - Node.js
22.22.2,24.15.0, or a supported version from26onward; or
Bun1.3.5or newer
The plugin does not fall back to the previous /api/v0 discovery shape. Stable
0.3.1 remains available separately.
Native model mapping
- Preserves native model
keyvalues and usesdisplay_namein OpenCode. - Includes
type: "llm"; excludes loaded and unloaded embedding records. - Maps
capabilities.visionto image input and attachment support. - Keeps tool calls enabled for LM Studio's native and default tool-use modes,
and reports each model's mode through structured discovery diagnostics. - Uses
max_context_lengthfor unloaded, on-demand models. - Uses loaded instance
config.context_lengthwhen active. - Uses the minimum context when multiple instances share a model key.
- Regenerates plugin-owned models and whitelists when the server list changes.
- Preserves explicit model overrides and whitelists.
LM Studio does not report a distinct generation limit, so the plugin's output
reserve remains explicit policy: one quarter of effective context, capped at
8,192 tokens. trained_for_tool_use is used as a native-vs-default diagnostic,
not as a reason to disable default tool support. Reasoning settings are not
translated into a non-equivalent OpenCode field. The full rationale is in
docs/v1-contract.md.
Release evidence
- Native v1 schema validation against LM Studio 0.4.16+2 live responses
- Nemotron and GLM vision records without model-name heuristics
- Unloaded, singly loaded, and multiply loaded context regressions
- Authenticated discovery/inference and 401 no-fallback coverage
- Changing-model-list and loaded/unloaded embedding regressions
- Source and packed-package real OpenCode CLI smoke tests
- OpenCode 1.17.7 minimum and 1.17.9 current compatibility targets
- Official ACP SDK 0.21.0 initialize/new-session and JSON-RPC stdout gate
- Linux and macOS ACP gates plus a Windows package/config/chat smoke; OpenCode
1.17.9 ACP itself currently hangs on the GitHub Windows runner and is not
claimed as passing - Direct packed-candidate and public npm spec resolution through OpenCode's
clean HOME/XDG cache - Five Microsoft TUI Test views rendered by browser xterm.js
- Dependency audit, coverage thresholds, package inspection, OIDC trusted
publishing, and npm provenance
Feedback requested
Please report:
- LM Studio and OpenCode versions;
- operating system;
- whether models appear and chat succeeds;
- loaded context values if a model is already active;
- authenticated-server behavior, if used; and
- whether ACP/editor startup remains clean.
Sanitize tokens, private URLs, model paths, configuration, and logs before
posting in #34.
Contributors
Community contributors and the pull requests or issue work incorporated into
the v1 line are recorded in
CONTRIBUTORS.md.