agent: Add ability to set a default_model per profile (#39220)
Split off from https://github.com/zed-industries/zed/pull/39175 Requires https://github.com/zed-industries/zed/pull/39219 to be merged first Adds support for `default_model` for profiles: ``` "my-profile": { "name": "Coding Agent", "tools": {}, "enable_all_context_servers": false, "context_servers": {}, "default_model": { "provider": "copilot_chat", "model": "grok-code-fast-1" } } ``` Which will then switch to the default model whenever the profile is activated  Release Notes: - Added `default_model` configuration to agent profile --------- Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
This commit is contained in:
@@ -322,7 +322,7 @@ impl ExampleInstance {
|
||||
thread.add_default_tools(Rc::new(EvalThreadEnvironment {
|
||||
project: project.clone(),
|
||||
}), cx);
|
||||
thread.set_profile(meta.profile_id.clone());
|
||||
thread.set_profile(meta.profile_id.clone(), cx);
|
||||
thread.set_model(
|
||||
LanguageModelInterceptor::new(
|
||||
LanguageModelRegistry::read_global(cx).default_model().expect("Missing model").model.clone(),
|
||||
|
||||
Reference in New Issue
Block a user