Skip to content

Commit 1cc365e

Browse files
gyzerokbenbrandt
authored andcommitted
language_models: Add support for tool use to LM Studio provider (zed-industries#30589)
Closes zed-industries#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>
1 parent 1ebcc6b commit 1cc365e

File tree

3 files changed

+317
-117
lines changed

3 files changed

+317
-117
lines changed

crates/assistant_settings/src/assistant_settings.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,9 @@ impl AssistantSettingsContent {
383383
_ => None,
384384
};
385385
settings.provider = Some(AssistantProviderContentV1::LmStudio {
386-
default_model: Some(lmstudio::Model::new(&model, None, None)),
386+
default_model: Some(lmstudio::Model::new(
387+
&model, None, None, false,
388+
)),
387389
api_url,
388390
});
389391
}

0 commit comments

Comments
 (0)