# Vscode.lm API in vscode extensions

**URL:** <https://forum.cursor.com/t/vscode-lm-api-in-vscode-extensions/26563>\
**Category:** Feature Requests\
**Created:** [November 6, 2024, 11:33pm UTC](https://forum.cursor.com/t/vscode-lm-api-in-vscode-extensions/26563 "2024-11-06T23:33:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![darknoon](https://avatars.discourse-cdn.com/v4/letter/d/e19b73/32.png) [@darknoon](https://forum.cursor.com/u/darknoon)\
**Post date:** [November 6, 2024, 11:33pm UTC](https://forum.cursor.com/t/vscode-lm-api-in-vscode-extensions/26563/1 "2024-11-06T23:33:47Z")

</div>

I’m building a Cursor/VSCode extension that has a custom interface and I’m trying to hook into LLM support within cursor.

I’m using code like this in the extension host, and expecting to see some of the models from cursor. It works in VSCode, but I can’t seem to see any models available in Cursor (tried calling with no parameters as well.

```ts
async function checkForLM() {
  const models = await vscode.lm.selectChatModels({ family: "gpt-4o" });
  console.log("Found models", models);
  if (models.length > 0) {
    const [first] = models;
    const response = await first.sendRequest([
      { role: vscode.LanguageModelChatMessageRole.User, name: "user", content: [{ value: "Hello, how are you?" }] },
    ]);
    // ...
  } else {
    // NO chat models available
  }
}

```

---

<div class="post-metadata">

**Author:** ![a-laughlin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/a-laughlin/32/22094_2.png) [@a-laughlin](https://forum.cursor.com/u/a-laughlin)\
**Post date:** [January 25, 2025, 5:48pm UTC](https://forum.cursor.com/t/vscode-lm-api-in-vscode-extensions/26563/2 "2025-01-25T17:48:12Z")

</div>

FYI, I posted a [bug report](https://forum.cursor.com/t/vscode-language-model-api-support/44585) on this too. Hopefully that will get traction.

Have you found a solution yet?

---

<div class="post-metadata">

**Author:** ![danperks](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/danperks/32/19087_2.png) [@danperks](https://forum.cursor.com/u/danperks)\
**Post date:** [January 27, 2025, 7:23pm UTC](https://forum.cursor.com/t/vscode-lm-api-in-vscode-extensions/26563/3 "2025-01-27T19:23:12Z")

</div>

Hey, we don’t currently expose any models out via that API yet, but I’ve logged this as something for the team to look into!

---

<div class="post-metadata">

**Author:** ![alexx-ftw](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/alexx-ftw/32/22821_2.png) [@alexx-ftw](https://forum.cursor.com/u/alexx-ftw)\
**Post date:** [May 25, 2025, 11:29pm UTC](https://forum.cursor.com/t/vscode-lm-api-in-vscode-extensions/26563/4 "2025-05-25T23:29:48Z")

</div>

“currently”

When is that “exposure” supposed to get implemented?

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [June 18, 2026, 10:43am UTC](https://forum.cursor.com/t/vscode-lm-api-in-vscode-extensions/26563/5 "2026-06-18T10:43:54Z")

</div>


