Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

feat: one-time migrate default Haiku users to Qwen3.5 Flash

Louis Beaumontf4982e629cb5
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/store.rs b/apps/screenpipe-app-tauri/src-tauri/src/store.rs
index 34606a13a..3b3d808e1 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/store.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/store.rs
@@ -555,6 +555,32 @@ impl SettingsStore {
}
}
}
+
+ // One-time migration: move default Haiku users to Qwen3.5 Flash.
+ // Only migrates presets on the "pi" (screenpipe cloud) provider that
+ // still have the old factory default model. Users who explicitly chose
+ // Haiku or any other model are unaffected.
+ if !obj.contains_key("haikuToQwenFlashMigrated") {
+ if let Some(presets) = obj.get_mut("aiPresets") {
+ if let Some(arr) = presets.as_array_mut() {
+ for preset in arr.iter_mut() {
+ let is_pi = preset.get("provider").and_then(|p| p.as_str()) == Some("pi");
+ let is_haiku = preset.get("model").and_then(|m| m.as_str()) == Some("claude-haiku-4-5");
+ if is_pi && is_haiku {
+ tracing::info!("migrating default Haiku preset to Qwen3.5 Flash");
+ preset.as_object_mut().unwrap().insert(
+ "model".to_string(),
+ Value::String("qwen/qwen3.5-flash-02-23".to_string()),
+ );
+ }
+ }
+ }
+ }
+ obj.insert(
+ "haikuToQwenFlashMigrated".to_string(),
+ Value::Bool(true),
+ );
+ }
}
val
}