Skip to content

Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more

Merge from main

grohith327b6f15e596a09
diff --cc Sources/Fluid/Persistence/SettingsStore.swift
index 99d39bd1,86a49ef3..9b0fe952
--- a/Sources/Fluid/Persistence/SettingsStore.swift
+++ b/Sources/Fluid/Persistence/SettingsStore.swift
@@@ -55,7 -54,9 +55,10 @@@ final class SettingsStore: ObservableOb
static let rewriteModeSelectedModel = "RewriteModeSelectedModel"
static let rewriteModeSelectedProviderID = "RewriteModeSelectedProviderID"
static let rewriteModeLinkedToGlobal = "RewriteModeLinkedToGlobal"
+
+ // Model Reasoning Config Keys
+ static let modelReasoningConfigs = "ModelReasoningConfigs"
+ static let rewriteModeShortcutEnabled = "RewriteModeShortcutEnabled"
// Stats Keys
static let userTypingWPM = "UserTypingWPM"
@@@ -473,18 -498,83 +512,95 @@@
}
}
+ // MARK: - Model Reasoning Configuration
+
+ /// Per-model reasoning configuration storage
+ /// Key format: "provider:model" (e.g., "openai:gpt-5.1", "groq:gpt-oss-120b")
+ var modelReasoningConfigs: [String: ModelReasoningConfig]
+ {
+ get {
+ guard let data = defaults.data(forKey: Keys.modelReasoningConfigs),
+ let decoded = try? JSONDecoder().decode([String: ModelReasoningConfig].self, from: data) else {
+ return [:]
+ }
+ return decoded
+ }
+ set {
+ objectWillChange.send()
+ if let encoded = try? JSONEncoder().encode(newValue) {
+ defaults.set(encoded, forKey: Keys.modelReasoningConfigs)
+ }
+ }
+ }
+
+ /// Get reasoning config for a specific model, with smart defaults for known models
+ func getReasoningConfig(forModel model: String, provider: String) -> ModelReasoningConfig? {
+ let key = "\(provider):\(model)"
+
+ // First check if user has a custom config
+ if let customConfig = modelReasoningConfigs[key] {
+ return customConfig.isEnabled ? customConfig : nil
+ }
+
+ // Apply smart defaults for known model patterns
+ let modelLower = model.lowercased()
+
+ // OpenAI gpt-5.x models
+ if modelLower.hasPrefix("gpt-5") || modelLower.contains("gpt-5.") {
+ return .openAIGPT5
+ }
+
+ // OpenAI o1/o3 reasoning models
+ if modelLower.hasPrefix("o1") || modelLower.hasPrefix("o3") {
+ return .openAIO1
+ }
+
+ // Groq gpt-oss models
+ if modelLower.contains("gpt-oss") || modelLower.hasPrefix("openai/") {
+ return .groqGPTOSS
+ }
+
+ // DeepSeek reasoner models
+ if modelLower.contains("deepseek") && modelLower.contains("reasoner") {
+ return .deepSeekReasoner
+ }
+
+ // No reasoning config needed for standard models (gpt-4.x, claude, llama, etc.)
+ return nil
+ }
+
+ /// Set reasoning config for a specific model
+ func setReasoningConfig(_ config: ModelReasoningConfig?, forModel model: String, provider: String) {
+ let key = "\(provider):\(model)"
+ var configs = modelReasoningConfigs
+
+ if let config = config {
+ configs[key] = config
+ } else {
+ configs.removeValue(forKey: key)
+ }
+
+ modelReasoningConfigs = configs
+ }
+
+ /// Check if a model has a custom (user-defined) reasoning config
+ func hasCustomReasoningConfig(forModel model: String, provider: String) -> Bool {
+ let key = "\(provider):\(model)"
+ return modelReasoningConfigs[key] != nil
+ }
+
+ var rewriteModeShortcutEnabled: Bool
+ {
+ get {
+ let value = defaults.object(forKey: Keys.rewriteModeShortcutEnabled)
+ return value as? Bool ?? true
+ }
+ set {
+ objectWillChange.send()
+ defaults.set(newValue, forKey: Keys.rewriteModeShortcutEnabled)
+ }
+ }
+
// MARK: - Stats Settings
/// User's typing speed in words per minute (for time saved calculation)