You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Opencode wont start with this plugin 1.14.46 #24
13:14:31 [ajaym] in ~/.config/opencode oc
Error: 1 of 5 requests failed: config.get: opencode server GET http://opencode.internal/config?directory=%2FUsers%2Fuser%2F.config%2Fopencode → 400: (empty response body)
at DA (/$bunfs/root/chunk-yds7xgfj.js:469:644)
at <anonymous> (/$bunfs/root/chunk-yds7xgfj.js:469:6060)
at processTicksAndRejections (native:7:39)
I receive a similar error, when I try to start opencode TUI:
Error: 1 of 5 requests failed: config.get: Expected "text" | "audio" | "image" | "video" | "pdf", got "embedding"
at ["provider"]["lmstudio"]["models"]["text-embedding-nomic-embed-text-v1_5"]["modalities"]["output"][0]
at ej (B:/~BUN/root/chunk-5e1nbvt1.js:469:644)
at <anonymous> (B:/~BUN/root/chunk-5e1nbvt1.js:469:6060)
at processTicksAndRejections (native:7:39)
Reacted by h93xV2, Mert Can Yegilmez, Jonathan Libby, Neuralyze, Viktor, Igor Serwin, thelamedia, Alexander Kasimir, Askhat Saiapov and Mauricio Obenaus
TLDR: claude thinks it's because i have an embedding model hosted on lm studio as well, and when opencode or this plugin do model discovery, the model is exposed with the modality embedding - but opencode only accepts "text" | "audio" | "image" | "video" | "pdf", got "embedding".
it is unclear why this happens now, but the working theory is that while opencode never accepted embedding as a value here, it also didnt enforce it (but does now).
trying to throw out nomic as a quick fix now, but i think it's included with lm-studio per default? the other fast pathway would be to not use this plugin and hardcode the models instead of doing discovery.
Summary
After updating opencode from 1.14.30 to 1.14.46, the plugin causes opencode to fail startup with an HTTP 400 on GET /config because it registers embedding-only models (e.g. text-embedding-nomic-embed-text-v1.5) with modalities.output: ["embedding"], which is not an accepted value in opencode's config schema.
This worked fine on 1.14.30. opencode 1.14.47 notes "HTTP API schema validation errors now return a readable 400 response body" — i.e. the schema was already strict, but is now actively enforced/surfaced. The plugin itself hasn't changed (npm shows 0.3.0 from ~5 months ago); the breakage is triggered by opencode tightening validation.
opencode starts. Embedding models exposed by LM Studio should either be filtered out (they're not usable as a chat/coding agent target) or registered without a modalities field — opencode's schema currently only accepts text | audio | image | video | pdf as output modalities.
Suggested fix
In the model categorization / config-merge logic (the same area as #7), detect embedding models from LM Studio's /v1/models response and either:
skip them entirely when populating provider.lmstudio.models, or
emit them without modalities (or with an empty/omitted modalities.output) so the schema validator doesn't reject them.
LM Studio tags embedding models clearly in /v1/models (type: "embeddings" on the newer API, or model name prefix text-embedding-* as a fallback), so the filter is straightforward.
Workaround
Ejecting the embedding model in LM Studio, or downgrading opencode to 1.14.30, both make startup succeed. Neither is desirable long-term — embeddings in LM Studio are useful for other tools, and pinning opencode means missing fixes.
Environment
opencode 1.14.46 (also 1.14.47)
opencode-lmstudio 0.3.0
LM Studio (latest), serving on 127.0.0.1:1234
macOS, bun runtime (as bundled with opencode)
Happy to test a patch.
Reacted by Ajay Mamtora, Alexandre Nicolaie, dbul, HumanError13, Chris Powell, Marcin Lewandowski, Mert Can Yegilmez, TLN992, Neuralyze, Harshith Thota and 1 more
Is there a fix for this? In my case the embedding model isn't even. loaded... but still shows in the list. Seemingly another bug: lmstudio-ai/lmstudio-bug-tracker#763
Is there a fix for this? In my case the embedding model isn't even. loaded... but still shows in the list. Seemingly another bug: lmstudio-ai/lmstudio-bug-tracker#763
This projects seems kinda abandoned. No reply on issues or PRs from the maintainers. I wrote my own plugin instead. See if it works for you.
I ran into the exact same issue while using this plugin. Then I realized that OpenCode already has native support for LM Studio local models, so it looks like this plugin is no longer needed and can just be uninstalled.
I ran into the exact same issue while using this plugin. Then I realized that OpenCode already has native support for LM Studio local models, so it looks like this plugin is no longer needed and can just be uninstalled.
You sure ? I did not succeed...
I made a fork of this project to fix it and to work with an API key. This fork also supports "on the fly" modell list.
The built in support doesn't seem to automatically query lm studio.. so you
have to configure it manually in the config file...
──────────────────────────────────────
dan-generated content may be incorrect
On Fri, Jun 12, 2026 at 9:36 AM trigger2k20 ***@***.***> wrote:
*trigger2k20* left a comment (agustif/opencode-lmstudio#24)
<#24 (comment)>
I ran into the exact same issue while using this plugin. Then I realized
that OpenCode already has native support for LM Studio local models, so it
looks like this plugin is no longer needed and can just be uninstalled.
You sure ? I did not succeed...
I made a fork of this project to fix it and to work with an API key. This
fork also supports "on the fly" modell list.
—
Reply to this email directly, view it on GitHub
<#24?email_source=notifications&email_token=AAD4PPY5M7FQS37LZ2HPLQT47QBOBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRZGE3TMMZRGE3KM4TFMFZW63VGNVQW45LBNSSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4691763116>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD4PPYRIWB4BULSNYMJQM347QBOBAVCNFSNUABGKJSXA33TNF2G64TZHMYTCMJUG44TGMZYHA5US43TOVSTWNBUGE2TKNZXGU2TTILWAI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
The PR dynamically queries LM Studio through /v1/models, filters embedding
models from the OpenCode chat-model list, supports authenticated LM Studio
servers, and removes stale built-in models through the generated whitelist.
It has not been merged or published yet, so installing "opencode-lmstudio"
normally will not include these changes.
I ran into the exact same issue while using this plugin. Then I realized
that OpenCode already has native support for LM Studio local models, so it
looks like this plugin is no longer needed and can just be uninstalled.
You sure ? I did not succeed...
I made a fork of this project to fix it and to work with an API key. This
fork also supports "on the fly" modell list.
In that case there's no use of this plugin at all! And why's this some agent generated reply? Is this project that abandoned? At least approve qualifying PRs!
The built in support doesn't seem to automatically query lm studio.. so you
have to configure it manually in the config file...
──────────────────────────────────────
dan-generated content may be incorrect …
On Fri, Jun 12, 2026 at 9:36 AM trigger2k20 @.> wrote: trigger2k20 left a comment (agustif/opencode-lmstudio#24)
<(earlier comment)>
I ran into the exact same issue while using this plugin. Then I realized
that OpenCode already has native support for LM Studio local models, so it
looks like this plugin is no longer needed and can just be uninstalled.
You sure ? I did not succeed...
I made a fork of this project to fix it and to work with an API key. This
fork also supports "on the fly" modell list.
—
Reply to this email directly, view it on GitHub
<#24?email_source=notifications&email_token=AAD4PPY5M7FQS37LZ2HPLQT47QBOBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRZGE3TMMZRGE3KM4TFMFZW63VGNVQW45LBNSSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4691763116>,
or unsubscribe
<github.com/notifications/unsubscribe-auth/AAD4PPYRIWB4BULSNYMJQM347QBOBAVCNFSNUABGKJSXA33TNF2G64TZHMYTCMJUG44TGMZYHA5US43TOVSTWNBUGE2TKNZXGU2TTILWAI>
.
You are receiving this because you are subscribed to this thread.Message
ID: _@_.**>
In that case there's no use of this plugin at all! And why's this some agent generated reply? Is this project that abandoned? At least approve qualifying PRs!
@rashomon-gh Do you mean by "built" my Fork ? Did you try it ?
@agustif Thank you for reviewing and merging PR #29.
One remaining documentation/release issue: the README already recommends opencode-lmstudio@0.3.1, but npm currently still provides 0.3.0 as latest. Therefore, users following the README cannot install version 0.3.1 yet and will receive the previous package without the merged changes.
Therefore, please publish opencode-lmstudio@0.3.1 to npm, thanks.
I receive a similar error, when I try to start opencode TUI:
Error: 1 of 5 requests failed: config.get: Expected "text" | "audio" | "image" | "video" | "pdf", got "embedding"
at ["provider"]["lmstudio"]["models"]["text-embedding-nomic-embed-text-v1_5"]["modalities"]["output"][0]
at ej (B:/~BUN/root/chunk-5e1nbvt1.js:469:644)
at <anonymous> (B:/~BUN/root/chunk-5e1nbvt1.js:469:6060)
at processTicksAndRejections (native:7:39)
Is there a fix for this? In my case the embedding model isn't even. loaded... but still shows in the list. Seemingly another bug: lmstudio-ai/lmstudio-bug-tracker#763
You can fix the error by adding the following to opencode.json:
What worked for me was adding this config under the provider.lmstudio field, together with an 'input' field:
"provider": { "lmstudio": { "models": { "text-embedding-nomic-embed-text-v1_5": { "modalities": { "input": ["text"], "output": ["text"] } } } } },
But we should have patience and wait for the developer fix too. Thanks for the cool plugin!
opencode-lmstudio@1.0.0-rc.1 is now available and contains the typed-discovery fix for the startup failure reported in this thread.
The RC reads LM Studio's GET /api/v0/models metadata, registers only models reported as llm or vlm, and omits embeddings records from OpenCode's chat provider. It never emits "embedding" as an OpenCode output modality. The public npm package has passed real OpenCode startup and model-picker tests against a fixture containing LLM, VLM, and embedding records.
Could affected users retest with the exact RC, including setups where the embedding model is downloaded but not loaded?
Please report your OpenCode and LM Studio versions and whether startup, model selection, and chat now work without a manual embedding override. If the original validation error is gone, please confirm that this issue can be closed. If it persists, include the first current validation error and the sanitized embedding record returned by /api/v0/models.
The complete RC release matrix and reporting template are in #34.
Native /api/v1/models records with type: "llm" enter the chat provider; type: "embedding" records are excluded, so they cannot produce an invalid OpenCode chat modality. The public package passed clean-cache startup, model picker, and chat tests. This RC requires OpenCode 1.17.7 or newer; the originally reported 1.14.46 is below the supported minimum.
Please upgrade OpenCode, pin "plugin": ["opencode-lmstudio@1.0.0-rc.2"], restart, and test with your embedding model present in both downloaded/unloaded and loaded states if possible. If startup and chat now work without a manual override, please confirm this issue can be closed. If not, include the first current validation error and the sanitized embedding record. See #34 for the shared template.
Activity
HumanError13 commentedon May 11, 2026
I receive a similar error, when I try to start opencode TUI:
johannesrave commentedon May 12, 2026
TLDR: claude thinks it's because i have an embedding model hosted on lm studio as well, and when opencode or this plugin do model discovery, the model is exposed with the modality
embedding- but opencode only accepts"text" | "audio" | "image" | "video" | "pdf", got "embedding".it is unclear why this happens now, but the working theory is that while opencode never accepted
embeddingas a value here, it also didnt enforce it (but does now).trying to throw out nomic as a quick fix now, but i think it's included with lm-studio per default? the other fast pathway would be to not use this plugin and hardcode the models instead of doing discovery.
Summary
After updating opencode from
1.14.30to1.14.46, the plugin causes opencode to fail startup with an HTTP 400 onGET /configbecause it registers embedding-only models (e.g.text-embedding-nomic-embed-text-v1.5) withmodalities.output: ["embedding"], which is not an accepted value in opencode's config schema.This worked fine on
1.14.30. opencode1.14.47notes "HTTP API schema validation errors now return a readable 400 response body" — i.e. the schema was already strict, but is now actively enforced/surfaced. The plugin itself hasn't changed (npm shows 0.3.0 from ~5 months ago); the breakage is triggered by opencode tightening validation.Error
From
~/.local/share/opencode/log/:The TUI shows:
opencode does not start.
Reproduction
1.14.46(also reproduces on1.14.47)opencode-lmstudio0.3.0enabled as a plugin127.0.0.1:1234with an embedding model loaded (e.g.nomic-embed-text-v1.5) alongside chat modelsopencodein any project directoryMinimal config:
{ "$schema": "https://opencode.ai/config.json", "plugin": ["opencode-lmstudio"], "provider": { "lmstudio": { "npm": "@ai-sdk/openai-compatible", "name": "LM Studio (local)", "options": { "baseURL": "http://127.0.0.1:1234/v1" } } } }Expected behavior
opencode starts. Embedding models exposed by LM Studio should either be filtered out (they're not usable as a chat/coding agent target) or registered without a
modalitiesfield — opencode's schema currently only acceptstext | audio | image | video | pdfas output modalities.Suggested fix
In the model categorization / config-merge logic (the same area as #7), detect embedding models from LM Studio's
/v1/modelsresponse and either:provider.lmstudio.models, ormodalities(or with an empty/omittedmodalities.output) so the schema validator doesn't reject them.LM Studio tags embedding models clearly in
/v1/models(type: "embeddings"on the newer API, or model name prefixtext-embedding-*as a fallback), so the filter is straightforward.Workaround
Ejecting the embedding model in LM Studio, or downgrading opencode to
1.14.30, both make startup succeed. Neither is desirable long-term — embeddings in LM Studio are useful for other tools, and pinning opencode means missing fixes.Environment
1.14.46(also1.14.47)0.3.0127.0.0.1:1234Happy to test a patch.
shawonashraf commentedon May 18, 2026
Can't we just change it here?
opencode-lmstudio/src/types/index.ts
Line 14 in c0d3288
DanTulovsky commentedon Jun 11, 2026
Is there a fix for this? In my case the embedding model isn't even. loaded... but still shows in the list. Seemingly another bug: lmstudio-ai/lmstudio-bug-tracker#763
shawonashraf commentedon Jun 11, 2026
This projects seems kinda abandoned. No reply on issues or PRs from the maintainers. I wrote my own plugin instead. See if it works for you.
https://github.com/rashomon-gh/opencode-lmstudio-sync
AmeNatsu001 commentedon Jun 11, 2026
I ran into the exact same issue while using this plugin. Then I realized that OpenCode already has native support for LM Studio local models, so it looks like this plugin is no longer needed and can just be uninstalled.
trigger2k20 commentedon Jun 12, 2026
You sure ? I did not succeed...
I made a fork of this project to fix it and to work with an API key. This fork also supports "on the fly" modell list.
DanTulovsky commentedon Jun 12, 2026
trigger2k20 commentedon Jun 12, 2026
HI @DanTulovsky , the fork and pending upstream PR are available here:
Fork:
https://github.com/trigger2k20/opencode-lmstudio
Pull request:
#29
The PR dynamically queries LM Studio through /v1/models, filters embedding
models from the OpenCode chat-model list, supports authenticated LM Studio
servers, and removes stale built-in models through the generated whitelist.
It has not been merged or published yet, so installing "opencode-lmstudio"
normally will not include these changes.
shawonashraf commentedon Jun 13, 2026
In that case there's no use of this plugin at all! And why's this some agent generated reply? Is this project that abandoned? At least approve qualifying PRs!
shawonashraf commentedon Jun 13, 2026
@agustif I understand that you may be a busy person but you can also let give others priveleged access to review and approve pull requests. :)
trigger2k20 commentedon Jun 13, 2026
agustif commentedon Jun 13, 2026
approved #28
sorry hadn't seen this earlier
gonna go through all the PR's now
trigger2k20 commentedon Jun 14, 2026
@agustif Thank you for reviewing and merging PR #29.
One remaining documentation/release issue: the README already recommends
opencode-lmstudio@0.3.1, but npm currently still provides0.3.0aslatest. Therefore, users following the README cannot install version0.3.1yet and will receive the previous package without the merged changes.Therefore, please publish
opencode-lmstudio@0.3.1to npm, thanks.devAGMi commentedon Jun 15, 2026
You can fix the error by adding the following to opencode.json:
"models": {
"text-embedding-nomic-embed-text-v1_5": {
"modalities": {
"output": ["text"]
}
}
}
Pesterenan commentedon Jun 19, 2026
What worked for me was adding this config under the provider.lmstudio field, together with an 'input' field:
"provider": { "lmstudio": { "models": { "text-embedding-nomic-embed-text-v1_5": { "modalities": { "input": ["text"], "output": ["text"] } } } } },
But we should have patience and wait for the developer fix too. Thanks for the cool plugin!
agustif commentedon Jun 21, 2026
Published —
opencode-lmstudio@0.3.1is now live on npm, andlatestnow resolves to0.3.1.Thanks again for PR #29 and for flagging the missing npm release.
agustif commentedon Jun 21, 2026
opencode-lmstudio@1.0.0-rc.1is now available and contains the typed-discovery fix for the startup failure reported in this thread.The RC reads LM Studio's
GET /api/v0/modelsmetadata, registers only models reported asllmorvlm, and omitsembeddingsrecords from OpenCode's chat provider. It never emits"embedding"as an OpenCode output modality. The public npm package has passed real OpenCode startup and model-picker tests against a fixture containing LLM, VLM, and embedding records.Could affected users retest with the exact RC, including setups where the embedding model is downloaded but not loaded?
{ "$schema": "https://opencode.ai/config.json", "plugin": ["opencode-lmstudio@1.0.0-rc.1"] }Please report your OpenCode and LM Studio versions and whether startup, model selection, and chat now work without a manual embedding override. If the original validation error is gone, please confirm that this issue can be closed. If it persists, include the first current validation error and the sanitized embedding record returned by
/api/v0/models.The complete RC release matrix and reporting template are in #34.
agustif commentedon Jun 21, 2026
opencode-lmstudio@1.0.0-rc.2includes loaded and unloaded embedding records in its startup regression fixtures.Native
/api/v1/modelsrecords withtype: "llm"enter the chat provider;type: "embedding"records are excluded, so they cannot produce an invalid OpenCode chat modality. The public package passed clean-cache startup, model picker, and chat tests. This RC requires OpenCode 1.17.7 or newer; the originally reported 1.14.46 is below the supported minimum.Please upgrade OpenCode, pin
"plugin": ["opencode-lmstudio@1.0.0-rc.2"], restart, and test with your embedding model present in both downloaded/unloaded and loaded states if possible. If startup and chat now work without a manual override, please confirm this issue can be closed. If not, include the first current validation error and the sanitized embedding record. See #34 for the shared template.