Skip to content

feat: support modelTypes whitelist for discovered LM Studio models#26

Closed
scott1028 wants to merge 1 commit into
agustif:mainfrom
scott1028:main
Closed

feat: support modelTypes whitelist for discovered LM Studio models#26
scott1028 wants to merge 1 commit into
agustif:mainfrom
scott1028:main

Conversation

@scott1028

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for filtering auto-discovered LM Studio models via provider.lmstudio.options.modelTypes.

Previously, the plugin always added every discovered model that was not already configured. With this change, users can optionally whitelist discovered models by type.

Supported values:

  • chat
  • embedding
  • unknown

The legacy options.model_types key is also preserved for backward compatibility.

Changes

  • add modelTypes / model_types parsing in config enhancement
  • filter discovered models before adding them to provider.lmstudio.models
  • validate configured model type values
  • add a validation hint for the common typo embedded -> embedding
  • document the new modelTypes option in the README
  • add test coverage for:
    • baseline behavior when modelTypes is not configured
    • filtering by chat
    • filtering by unknown
    • invalid modelTypes values
    • typo suggestion for embedded
    • backward compatibility for legacy model_types

Behavior Notes

  • modelTypes is currently inferred from the LM Studio model id, not from a dedicated type field returned by the API.
  • unknown means the discovered model ID does not match the plugin's current chat or embedding categorization rules.

Testing

  • npm run test:run
  • all tests passed (22/22)

@HughesCuit HughesCuit left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@agustif

agustif commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Thank you @scott1028 for the model-type filtering and whitelist design work. The typed 1.0 rewrite in #31 now uses official LM Studio model types, filters unsupported domains, generates the discovered-model whitelist, and preserves explicit user whitelists. Closing as superseded by #31.

@agustif agustif closed this Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants