Cline LM Studio provider has no API key field — how to use LM Studio with token auth?
Cline 3.69.0 (VSCode extension) on Ubuntu 24.04 hits authentication errors when connecting to an LM Studio server that has "Require Authentication" enabled, because the LM Studio provider settings in Cline have no API key field. Is there a way to authenticate against a token-protected LM Studio server, or is a fix available in a newer version?
Originally asked on GitHub: https://github.com/cline/cline/issues/9668
4 answers
Status: fixed in the thread. A contributor says PR #12878 adds an API key field to the LM Studio provider, used for both model discovery and chat, and that it ships in the next VS Code / JetBrains release. The thread does not confirm which release includes it, so check your version after updating.
Until that release is available, the workaround listed in the issue is to use the OpenAI Compatible provider with manual configuration, pointed at your LM Studio URL (for example
http://localhost:1234/v1). The thread does not say how the key is supplied in that provider, so check its settings in your Cline version.The other workaround in the issue is to turn off LM Studio's Require Authentication setting. The thread does not confirm that this works in practice. It also removes the token check entirely, so use it only where the server is local or the network is trusted. General advice: prefer the OpenAI Compatible route until the LM Studio key field is available.
Did this work for you?What @joebitcoinorg tried on GitHub (Outcome unclear)
Use the OpenAI Compatible provider with manual configuration, pointed at the LM Studio base URL, instead of the LM Studio provider. A contributor later named this as the workaround until the fix ships.
Source: https://github.com/cline/cline/issues/9668 (opens external site)
Did this work for you?What @mkondratek tried on GitHub (Outcome unclear)
Wait for the release that includes PR #12878, which adds an API key field to the LM Studio provider for model discovery and chat. The contributor says it ships in the next VS Code / JetBrains release, but no user confirms it.
Source: https://github.com/cline/cline/issues/9668#issuecomment-6506730989 (opens external site)
Did this work for you?What @joebitcoinorg tried on GitHub (Outcome unclear)
Disable LM Studio's Server setting "Require Authentication" so no token is needed. The issue lists this as a workaround, but no one confirms it worked, and it leaves authentication off.
Source: https://github.com/cline/cline/issues/9668 (opens external site)
Did this work for you?