# language_models: Add support for tool use to LM Studio provider \(\#30589\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/998542b04820aadd4b2978f931818f36805bba45)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 998542b04820aadd4b2978f931818f36805bba45

Requested commit: 998542b04820aadd4b2978f931818f36805bba45

Commit: 998542b04820aadd4b2978f931818f36805bba45

Tree: fde25a16d7556dc74b2f75ef3b2a70b89bfcd745

Author: Fedor Nezhivoi

Committer: GitHub

## Message

```
language_models: Add support for tool use to LM Studio provider (#30589)

Closes #30004

**Quick demo:**


https://github.com/user-attachments/assets/0ac93851-81d7-4128-a34b-1f3ae4bcff6d

**Additional notes:**

I've tried to stick to existing code in OpenAI provider as much as
possible without changing much to keep the diff small.

This PR is done in collaboration with @yagil from LM Studio. We agreed
upon the format in which LM Studio will return information about tool
use support for the model in the upcoming version. As of current stable
version nothing is going to change for the users, but once they update
to a newer LM Studio tool use gets automatically enabled for them. I
think this is much better UX then defaulting to true right now.


Release Notes:

- Added support for tool calls to LM Studio provider

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
```

## Parents

- [6363fdab8871ff87a5143fadf26915a2c1e17145](https://git.cafe/gitcafe/zed/commit/6363fdab8871ff87a5143fadf26915a2c1e17145?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/998542b04820aadd4b2978f931818f36805bba45?format=markdown)
