add LM Studio support (#259)
* feat: Add LM Studio as a supported model provider with OpenAI-compatible API fetching and discovery. Add LM Studio as a supported AI provider with optional API key, environment variables, and discovery. * feat: Add rustup as a dev dependency. * fix: Refine LM Studio API key handling to conditionally send authorization headers during model discovery based on whether the key is a default local token or a custom key, and add new tests. * feat: Enhance OAuth token and account ID resolution for model providers in the model registry. * rebase for packages/ai/CHANGELOG.md * feat: improve implicit model discovery to independently auto-detect Ollama and LM Studio, and refine LM Studio base URL handling. --------- Co-authored-by: Can Bölük <can1357@users.noreply.github.com>
This commit is contained in:
+12
-1
@@ -129,7 +129,7 @@ ModelRegistry pipeline (on refresh):
|
||||
5. Merge custom `models`:
|
||||
- same `provider + id` replaces existing
|
||||
- otherwise append
|
||||
6. Apply runtime-discovered models (currently Ollama), then re-apply model overrides.
|
||||
6. Apply runtime-discovered models (currently Ollama and LM Studio), then re-apply model overrides.
|
||||
|
||||
Provider defaults vs per-model overrides:
|
||||
|
||||
@@ -151,6 +151,17 @@ If `ollama` is not explicitly configured, registry adds an implicit discoverable
|
||||
|
||||
Runtime discovery calls `GET /api/tags` on Ollama and synthesizes model entries with local defaults.
|
||||
|
||||
### Implicit LM Studio discovery
|
||||
|
||||
If `lm-studio` is not explicitly configured, registry adds an implicit discoverable provider:
|
||||
|
||||
- provider: `lm-studio`
|
||||
- api: `openai-completions`
|
||||
- base URL: `LM_STUDIO_BASE_URL` or `http://127.0.0.1:1234/v1`
|
||||
- auth mode: keyless (`auth: none` behavior)
|
||||
|
||||
Runtime discovery fetches models (`GET /models`) and synthesizes model entries with local defaults.
|
||||
|
||||
### Explicit provider discovery
|
||||
|
||||
You can configure discovery yourself:
|
||||
|
||||
Reference in New Issue
Block a user