← Back to PRs

#6968: Add LM Studio onboarding option

by i3T4AN open 2026-02-02 07:35 View on GitHub →
commands
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