Default to Qwen Coder
This commit is contained in:
parent
3e2f901092
commit
fa5e7c4631
2 changed files with 6 additions and 4 deletions
|
@ -42,8 +42,8 @@ impl OllamaCompletionProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Updates the model used by this provider
|
/// Updates the model used by this provider
|
||||||
pub fn update_model(&mut self, new_model: String) {
|
pub fn update_model(&mut self, model: String) {
|
||||||
self.model = new_model;
|
self.model = model;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Updates the file extension used by this provider
|
/// Updates the file extension used by this provider
|
||||||
|
|
|
@ -335,12 +335,14 @@ fn assign_edit_prediction_provider(
|
||||||
let settings = &AllLanguageModelSettings::get_global(cx).ollama;
|
let settings = &AllLanguageModelSettings::get_global(cx).ollama;
|
||||||
let api_url = settings.api_url.clone();
|
let api_url = settings.api_url.clone();
|
||||||
|
|
||||||
// Use first available model or default
|
// Use first available model or default to a FIM-capable model
|
||||||
|
// NOTE: codellama:7b and deepseek-coder:latest do NOT support FIM
|
||||||
|
// Use qwen2.5-coder:3b or starcoder2:latest instead
|
||||||
let model = settings
|
let model = settings
|
||||||
.available_models
|
.available_models
|
||||||
.first()
|
.first()
|
||||||
.map(|m| m.name.clone())
|
.map(|m| m.name.clone())
|
||||||
.unwrap_or_else(|| "codellama:7b".to_string());
|
.unwrap_or_else(|| "qwen2.5-coder:3b".to_string());
|
||||||
|
|
||||||
// Get API key from environment variable only (credentials would require async handling)
|
// Get API key from environment variable only (credentials would require async handling)
|
||||||
let api_key = std::env::var("OLLAMA_API_KEY").ok();
|
let api_key = std::env::var("OLLAMA_API_KEY").ok();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue