# Support local LLM's

**URL:** <https://forum.cursor.com/t/support-local-llms/1099>\
**Category:** Feature Requests\
**Created:** [October 16, 2023, 7:17pm UTC](https://forum.cursor.com/t/support-local-llms/1099 "2023-10-16T19:17:15Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![HappyQuokka](https://avatars.discourse-cdn.com/v4/letter/h/dc4da7/32.png) [@HappyQuokka](https://forum.cursor.com/u/HappyQuokka)\
**Post date:** [March 8, 2024, 8:13pm UTC](https://forum.cursor.com/t/support-local-llms/1099/21 "2024-03-08T20:13:02Z")

</div>

for some reason the gpt3.5 plus debugger, is a winner in this benchmark across all gpt4 variations [HumanEval Benchmark (Code Generation) | Papers With Code](https://paperswithcode.com/sota/code-generation-on-humaneval) what are all the gpt4 variations in that list and where is Claude at all? I don’t understand. so gpt3.5 “reasoning and intellect” capability is absolutely “good enough” for any coding tasks in reality, the only thing it needs is either a larger context window or a ‘feedback loop’ (which I guess is what they did to score 1st place in benchmark?).

it’s pretty sick to see a gpt3.5 topping any benchmark chart. gonna read more about it. but looks like we’re wasting our time hunting for ‘best and better’ models like Claude, it’s not where the secret is.

look where Claude is on the benchmark 🤷‍♂️ , the opensource ‘starcoder’ (octocoder, specially tuned starcoder in that table) beats it (5th place, vs Claude on 9th place), so why Claude is all the hype 🤔 . I’ll try to find that OctoCoder on openrouter, maybe can connect to Cursor, seems like best option.

Which model was best for you guys so far?

---

<div class="post-metadata">

**Author:** ![ssmits](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@ssmits](https://forum.cursor.com/u/ssmits)\
**Post date:** [March 9, 2024, 7:51pm UTC](https://forum.cursor.com/t/support-local-llms/1099/22 "2024-03-09T19:51:11Z")

</div>

Tried the same for Claude 3, both with api key starting with ‘sk-or-v1’ or only the hash that comes after that, both didn’t work.

---

<div class="post-metadata">

**Author:** ![ssmits](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@ssmits](https://forum.cursor.com/u/ssmits)\
**Post date:** [March 9, 2024, 7:51pm UTC](https://forum.cursor.com/t/support-local-llms/1099/23 "2024-03-09T19:51:26Z")

</div>

Currently does not work for me unfortunately, would be a great addition!

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [March 9, 2024, 9:39pm UTC](https://forum.cursor.com/t/support-local-llms/1099/24 "2024-03-09T21:39:27Z")

</div>

Hi, have you added a model in this format: anthropic/claude-3-opus?  
I didn’t succeed the first time, let me check it tomorrow and I’ll give you the answer

---

<div class="post-metadata">

**Author:** ![HappyQuokka](https://avatars.discourse-cdn.com/v4/letter/h/dc4da7/32.png) [@HappyQuokka](https://forum.cursor.com/u/HappyQuokka)\
**Post date:** [March 9, 2024, 10:30pm UTC](https://forum.cursor.com/t/support-local-llms/1099/25 "2024-03-09T22:30:12Z")

</div>

I’m currently experimenting with a local DeepSeek-coder model (which also can run as the backend for Cursor, because in LM Studio there’s webserver option to make it listen on localhost) and it’s surprisingly random, sometimes it nails the answers based on a chunk of docs which I paste to its context (about 3k tokens of docs) and sometimes it misses and starts giving me things I didn’t ask for o\_O … playing with top\_p, temp, parameters and hoping that a fine-tuned version of this model will be better for me than generic gpt4 or 3.5 (because I deal with unknown new language “Verse” for unreal engine, and those models still don’t know anything about it, not included in their data sets). Although it’s definitely possible to work in Cursor with it and gpt3.5, but I want a 100% precision to any question asked in the chat, vs a 50/50 precision that I get now 😄 , it should be possible with a local model 🤞 wish me luck.

---

<div class="post-metadata">

**Author:** ![ssmits](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@ssmits](https://forum.cursor.com/u/ssmits)\
**Post date:** [March 9, 2024, 10:44pm UTC](https://forum.cursor.com/t/support-local-llms/1099/26 "2024-03-09T22:44:07Z")

</div>

> [@deanrie](#):
>
> anthropic/claude-3-opus

Yes, I’ve also tried to add chat/completions to the URL.  
 ![Screenshot 2024-03-09 at 23.42.52](https://us1.discourse-cdn.com/cursor1/original/2X/4/4977309fb6558a0350fef2c0109ae1d4e96bf2e6.png)

 ![Screenshot 2024-03-09 at 23.42.28](https://us1.discourse-cdn.com/cursor1/original/2X/a/a6f28e5461f7e710ef2da80602175b926310044a.png)

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [March 10, 2024, 7:37am UTC](https://forum.cursor.com/t/support-local-llms/1099/27 "2024-03-10T07:37:42Z")

</div>

You must remove the last slash from the url

 ![image](https://us1.discourse-cdn.com/cursor1/original/2X/6/6b7156b0cf23bb2da178e4c8c23bdbc9974be793.png)

---

<div class="post-metadata">

**Author:** ![kaandok](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/kaandok/32/1231_2.png) [@kaandok](https://forum.cursor.com/u/kaandok)\
**Post date:** [March 14, 2024, 9:28am UTC](https://forum.cursor.com/t/support-local-llms/1099/28 "2024-03-14T09:28:51Z")

</div>

I have the exact setup in your screenshot but it isn’t working for me.  
Is there anything else you’re doing to get it working?

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [March 14, 2024, 10:40am UTC](https://forum.cursor.com/t/support-local-llms/1099/29 "2024-03-14T10:40:24Z")

</div>

Try restarting the Cursor, for some reason for many people it starts working the next day for unknown reasons 😂

---

<div class="post-metadata">

**Author:** ![Vincent](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@Vincent](https://forum.cursor.com/u/Vincent)\
**Post date:** [March 14, 2024, 3:04pm UTC](https://forum.cursor.com/t/support-local-llms/1099/30 "2024-03-14T15:04:05Z")

</div>

Configuring Cursor with Openrouter.ai isn’t entirely straightforward. I’ve prepared a step-by-step guide:

> **[Adding Claude 3 Opus (or any other model) to Cursor](https://www.vincentschmalbach.com/adding-models-to-cursor/)**
>
> Cursor is a VSCode fork with built-in support for large language models (LLMs). It allows users to select code, hit , write an LLM prompt, and see how the LLM writes or changes code for them.

---

<div class="post-metadata">

**Author:** ![raw.works](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/raw.works/32/500_2.png) [@raw.works](https://forum.cursor.com/u/raw.works)\
**Post date:** [March 14, 2024, 6:49pm UTC](https://forum.cursor.com/t/support-local-llms/1099/31 "2024-03-14T18:49:17Z")

</div>

thanks boss!

---

<div class="post-metadata">

**Author:** ![Vincent](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@Vincent](https://forum.cursor.com/u/Vincent)\
**Post date:** [March 18, 2024, 2:39pm UTC](https://forum.cursor.com/t/support-local-llms/1099/32 "2024-03-18T14:39:29Z")

</div>

With the [recent update](https://changelog.cursor.sh/#claude-support), you no longer need to use OpenRouter.ai or override the OpenAI Base URL.

Just add “claude-3-opus” as a custom model in the Settings page, and you’re ready to go:

1. Open Cursor.
2. Hit `Ctrl+Shift+J` to enter Cursor settings.
3. Scroll to “OpenAI API”.
4. Click on “Configure models” **below** the API key field.
5. Click on “+ Add model” (below the model names).
6. Enter “claude-3-opus” as the model name.
7. Click on the “+” next to the field to add the model.
8. Close the settings page.
9. Use Cursor as before with the new Claude 3 Opus model.

Note: You have to add _“just give me the code, nothing else, no explanation, just the code”_ to every prompt to make it work.

---

<div class="post-metadata">

**Author:** ![madlad](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/madlad/32/35884_2.png) [@madlad](https://forum.cursor.com/u/madlad)\
**Post date:** [April 8, 2024, 2:27am UTC](https://forum.cursor.com/t/support-local-llms/1099/33 "2024-04-08T02:27:31Z")

</div>

Hi, can you show how to use a local model from lm studio?

---

<div class="post-metadata">

**Author:** ![leoing](https://avatars.discourse-cdn.com/v4/letter/l/dec6dc/32.png) [@leoing](https://forum.cursor.com/u/leoing)\
**Post date:** [April 24, 2024, 7:39pm UTC](https://forum.cursor.com/t/support-local-llms/1099/34 "2024-04-24T19:39:33Z")

</div>

Shouldn’t it work like shown above with local URL like

127.0.0.1/  
localhost/

and maybe port number, some more path?

---

<div class="post-metadata">

**Author:** ![sualeh](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@sualeh](https://forum.cursor.com/u/sualeh)\
**Post date:** [April 24, 2024, 8:45pm UTC](https://forum.cursor.com/t/support-local-llms/1099/35 "2024-04-24T20:45:58Z")

</div>

no, we make requests from the server. we cant call your local computer.

---

<div class="post-metadata">

**Author:** ![jeffscott17](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jeffscott17/32/2336_2.png) [@jeffscott17](https://forum.cursor.com/u/jeffscott17)\
**Post date:** [June 21, 2024, 3:11pm UTC](https://forum.cursor.com/t/support-local-llms/1099/36 "2024-06-21T15:11:21Z")

</div>

Given that DeepSeek Coder V2 is now beating GPT4o can we reopen this issue and get LLM’s in here now? Seeing as the cited excuse was that no other OSS models were comparable yet?

---

<div class="post-metadata">

**Author:** ![amanrs](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/amanrs/32/105_2.png) [@amanrs](https://forum.cursor.com/u/amanrs)\
**Post date:** [June 21, 2024, 7:31pm UTC](https://forum.cursor.com/t/support-local-llms/1099/37 "2024-06-21T19:31:28Z")

</div>

Deepseek v2 is possible with openrouter as a base url: [Reddit - Dive into anything](https://www.reddit.com/r/ChatGPTCoding/comments/1bz53zp/protip_you_can_use_any_local_llm_in_cursor_with/).

We also plan to support it after confirming performance on internal evals and getting the model setup with our own inference provider.

But running it locally is infeasible given it is a 236B param MOE.

---

<div class="post-metadata">

**Author:** ![jeffscott17](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jeffscott17/32/2336_2.png) [@jeffscott17](https://forum.cursor.com/u/jeffscott17)\
**Post date:** [June 21, 2024, 9:44pm UTC](https://forum.cursor.com/t/support-local-llms/1099/38 "2024-06-21T21:44:25Z")

</div>

I’m running it locally in my terminal or some version of it with ollama? Idk just doing ollama run deepseek-coder-v2 and it runs (quite fast) on my M1 Mac. Good idea with openrouter! Thanks

---

<div class="post-metadata">

**Author:** ![arpagon](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@arpagon](https://forum.cursor.com/u/arpagon)\
**Post date:** [June 22, 2024, 7:12pm UTC](https://forum.cursor.com/t/support-local-llms/1099/40 "2024-06-22T19:12:38Z")

</div>

It is easy to use ollama by changing the `override OpenAI Base URL`, but ideally, we should have a fourth provider called custom OpenAI compatible to be able to combine the local models with those of OpenAI, which is the closest to my workflow.

---

<div class="post-metadata">

**Author:** ![smcleod](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/smcleod/32/2384_2.png) [@smcleod](https://forum.cursor.com/u/smcleod)\
**Post date:** [June 25, 2024, 9:52pm UTC](https://forum.cursor.com/t/support-local-llms/1099/41 "2024-06-25T21:52:27Z")

</div>

New (potential) Cursor user here 👋 ,

After installing Cursor and importing some of my most used VSCode plugins - the very first thing I went to change was to set Cursor to use either my Ollama or TabbyAPI LLM server.

I was quite surprised to see there weren’t native options for Ollama and the only OpenAI compatible option was to override the base URL which feels a bit all-or-nothing and doesn’t auto-populate the model list with you available models.

There’s really big advantages in being able to easily use local LLMs especially if you’re already running them for multiple other tasks:

- They can be _very_ fast
- Have excellent domain specific knowledge
- Be fine tuned and customised
- Tooling augmented
- A LOT cheaper to use if you’re a heavy user
- You don’t get rate limited (which always happens at the worst time)
- They work offline and with poor internet connections
- Are privacy respecting (which with many clients I work with is a requirement)

For example, DeepSeek-Coder-V2 and Codestral are two models that are really fantastic, between those two I get better quality multi-shot code generation than I get from GPT4o more than 50% of the time.

In VSCode continue.dev and Tabby have pretty decent integration with both Ollama and OpenAI compatible API endpoints as first party citizens, but their extension features are not as nicely integrated into the IDE as Cursor.

By comparison when I added either my local Ollama OpenAI compatible API endpoint to Cursor and manually added the models I mostly use it seems Cursor just errors with:

 ![image](https://us1.discourse-cdn.com/cursor1/original/2X/7/70b27a59a706a76ce9a2eb1ff63752a6969bc760.png)

[Previous page](https://forum.cursor.com/t/support-local-llms/1099.md?page=1)

[Next page](https://forum.cursor.com/t/support-local-llms/1099.md?page=3)
