#6968: Add LM Studio onboarding option
commands
Cluster:
Model Authentication Enhancements
Adds LM Studio as an onboarding choice that prompts for host:port (or full URL) and model id, writes/merges the lmstudio provider config, and only sets the default model when requested while still setting agent overrides when applicable. Fixes the minimax preferred‑provider mapping, removes duplicate LM Studio entries in auth choice lists, preserves existing LM Studio provider settings and model lists, and normalizes base URLs (http for loopback/private LAN; avoids /v1 duplication). Allows single‑segment LM Studio model IDs and hardens input validation. Format and tsgo pass; lint fails due to pre‑existing extension type errors unrelated to this change.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds LM Studio as an onboarding/auth choice and wires it into the existing `applyAuthChoice` handler chain. It introduces a new LM Studio auth applicator that prompts for base URL + model id, normalizes the URL to include `/v1`, merges provider config under `models.providers.lmstudio`, and optionally sets the default model while still returning an agent model override. It also fixes the preferred-provider mapping for `minimax` and adds the new `lmstudio` auth choice to the shared onboarding/auth choice types and option groups.
<h3>Confidence Score: 3/5</h3>
- Mostly safe to merge, but URL normalization has edge cases that can produce broken base URLs.
- Changes are localized to onboarding/auth choice plumbing and a new LM Studio applicator. The main risk is incorrect base URL normalization when users supply a URL with a non-root path that already ends in `/v1`, which can lead to a duplicated `/v1` segment and failed requests. Other notes are UX defaults rather than correctness issues.
- src/commands/auth-choice.apply.lmstudio.ts
<!-- greptile_other_comments_section -->
**Context used:**
- Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
- Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13))
<!-- /greptile_comment -->
Most Similar PRs
#7568: feat(agents): add LM Studio auto-discovery and provider support
by sjseo298 · 2026-02-03
81.6%
#13079: feat: Add OpenAI-compatible API option to CLI for self-hosted models
by MikeWang0316tw · 2026-02-10
75.8%
#3591: CLI: add OpenAI-compatible endpoint auth choice
by surak · 2026-01-28
73.8%
#16388: Fix: Show model selector during onboarding for all auth choices
by saurav470 · 2026-02-14
71.9%
#9080: Fix: Use configured model for memory file slug generation
by vishaltandale00 · 2026-02-04
71.8%
#5945: fix: use configured model for slug generator (AI-assisted)
by HEDELKA · 2026-02-01
71.8%
#7113: feat(providers): add CommonStack provider support
by flhoildy · 2026-02-02
71.2%
#21182: feat(litellm): enhance LiteLLM provider with model discovery and pr...
by hiboute · 2026-02-19
71.0%
#19841: feat: add Amazon Bedrock as first-class onboarding provider
by elbeyf · 2026-02-18
70.0%
#3792: add ShengSuanYun (胜算云) as a model provider
by shengsuan · 2026-01-29
70.0%