GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(provider): native lm studio auto-discovery by Aarogaming · Pull Request #20524 · anomalyco/opencode feat(provider): native lm studio auto-discovery #20524New issueHave a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails. Already on GitHub? Sign in to your account
Closed
Uh oh!
There was an error while loading. Please reload this page.
Closed
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
cc49be0
feat: native LM Studio support with dynamic model discovery
Aarogaming fb7aa6a
fix: unescape template literals in provider.ts
Aarogaming d380394
fix(ci): disable E2E paid requirement for PR forks
Aarogaming 3e1f798
fix(ci): sync test.yml with dev to remove e2e paid requirement
Aarogaming File filterConversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page. Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page. Diff viewDiff view
Next
feat: native LM Studio support with dynamic model discovery
Uh oh!
There was an error while loading. Please reload this page.
commit cc49be0b1e9af48fe9c72f68faa8a339ef446522
There are no files selected for viewing
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
|
options: { baseURL, apiKey: "lm-studio" }, |
|
|
async discoverModels() { |
|
|
try { |
|
|
const res = await fetch(`${baseURL}/models`) |
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const res = await fetch(`${baseURL}/models`) | |
| const timeoutSignal = | |
| typeof AbortSignal !== "undefined" && "timeout" in AbortSignal | |
| ? AbortSignal.timeout(5000) | |
| : undefined | |
| const res = await fetch( | |
| `${baseURL}/models`, | |
| timeoutSignal ? { signal: timeoutSignal } : undefined | |
| ) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
discoverModels() is wired into CUSTOM_LOADERS, but provider state currently only invokes discoveryLoaders[...]() for GitLab. As-is, LM Studio models returned here will never be merged into providers["lmstudio"].models, so the advertised auto-discovery won’t actually surface any models. Consider generalizing the discovery step to run for any provider with a discoverModels loader (and merge results) before the empty-models filter, or add an explicit LM Studio discovery/merge like the GitLab block.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The discovered models map uses keys like lmstudio/${m.id} but sets providerID: "lmstudio". Provider model maps elsewhere use unprefixed model IDs as keys (the provider already scopes them), and parseModel() splits provider/model strings. With the current key format, model lookup/selection is likely to break (especially when m.id already contains /). Use m.id as the map key (scoped by provider) and keep the model id consistent with that key.
| models[`lmstudio/${m.id}`] = { | |
| models[m.id] = { |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.