Default to Qwen Coder

This commit is contained in:
Oliver Azevedo Barnes 2025-07-10 18:06:34 +01:00
parent 3e2f901092
commit fa5e7c4631
No known key found for this signature in database
2 changed files with 6 additions and 4 deletions

View file

@ -42,8 +42,8 @@ impl OllamaCompletionProvider {
}
/// Updates the model used by this provider
pub fn update_model(&mut self, new_model: String) {
self.model = new_model;
pub fn update_model(&mut self, model: String) {
self.model = model;
}
/// Updates the file extension used by this provider

View file

@ -335,12 +335,14 @@ fn assign_edit_prediction_provider(
let settings = &AllLanguageModelSettings::get_global(cx).ollama;
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
.available_models
.first()
.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)
let api_key = std::env::var("OLLAMA_API_KEY").ok();