Repository navigation
fix(core): accept decision-type models from LM Studio - #56214
Open
tomzhu1024 wants to merge 2 commits into
Open
tomzhu1024 wants to merge 2 commits into
tomzhu1024 wants to merge 2 commits into
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
Contributor
There was a problem hiding this comment.
The fix works. I ran the updated LM Studio plugin test against the base code: the discovery test times out because the whole /api/v1/models decode fails on the decision entry. With this change all 6 tests in provider-lmstudio.test.ts pass, and packages/core typechecks.
Public API: unchanged. The schema is private to the plugin.
One suggestion, inline: type still only accepts a fixed list of values, so the next new model type LM Studio reports would break discovery for everyone again in the same way. The added test fixture is small and clear.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #56213
Type of change
What does this PR do?
LM Studio's
/api/v1/modelsreports decision models with"type": "decision", which isn't in the plugin'sSchema.Literals(["llm", "embedding"])-- one such model fails the whole response decode, so model discovery fails and no models are listed. This PR adds"decision"to the literal set; the existingtype === "llm"filter is untouched and still excludes decision models from the model list.The plugin's test now covers this with a
decisionmodel fixture.LM Studio API doc: https://lmstudio.ai/docs/developer/rest/list
How did you verify your code works?
bun dev models-- the LM Studio models show up with the fixbun dev-- the LM Studio models show up in the TUI model picker with the fixScreenshots / recordings
This is not a UI change.
Checklist