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

fix: match dotted OpenRouter model IDs in temperature check

Georg Linhardf03a3ba4c68c
diff --git a/Sources/Fluid/Persistence/SettingsStore.swift b/Sources/Fluid/Persistence/SettingsStore.swift
index 62ce2058..715b2525 100644
--- a/Sources/Fluid/Persistence/SettingsStore.swift
+++ b/Sources/Fluid/Persistence/SettingsStore.swift
@@ -2670,7 +2670,9 @@ final class SettingsStore: ObservableObject {
/// (Opus 4.7+, Sonnet 5, Fable/Mythos 5 — Sonnet 4.6 and older still accept it).
func isTemperatureUnsupported(_ model: String) -> Bool {
if self.isReasoningModel(model) { return true }
- let modelLower = model.lowercased()
+ // Normalize version separators so dotted IDs (e.g. OpenRouter's
+ // anthropic/claude-opus-4.8) match the hyphenated forms below.
+ let modelLower = model.lowercased().replacingOccurrences(of: ".", with: "-")
return modelLower.contains("claude-opus-4-7")
|| modelLower.contains("claude-opus-4-8")
|| modelLower.contains("claude-sonnet-5")
diff --git a/Tests/FluidDictationIntegrationTests/TemperatureSupportTests.swift b/Tests/FluidDictationIntegrationTests/TemperatureSupportTests.swift
index c0220f1b..7e95801c 100644
--- a/Tests/FluidDictationIntegrationTests/TemperatureSupportTests.swift
+++ b/Tests/FluidDictationIntegrationTests/TemperatureSupportTests.swift
@@ -18,8 +18,11 @@ final class TemperatureSupportTests: XCTestCase {
"claude-sonnet-5",
"claude-fable-5",
"claude-mythos-5",
- // Provider-prefixed IDs (e.g. OpenRouter) must match too
+ // Provider-prefixed and dotted IDs (e.g. OpenRouter) must match too
"anthropic/claude-sonnet-5",
+ "anthropic/claude-opus-4.7",
+ "anthropic/claude-opus-4.8",
+ "anthropic/claude-opus-4.8-fast",
]
for model in unsupported {
XCTAssertTrue(
@@ -39,7 +42,18 @@ final class TemperatureSupportTests: XCTestCase {
}
func testTemperatureSupported_olderAndNonAnthropicModels() {
- for model in ["gpt-4.1", "claude-sonnet-4-6", "claude-sonnet-4-20250514", "gemini-2.5-flash", "llama3"] {
+ let supported = [
+ "gpt-4.1",
+ "claude-sonnet-4-6",
+ "claude-sonnet-4-20250514",
+ "gemini-2.5-flash",
+ "llama3",
+ // Dotted OpenRouter IDs for models that still accept temperature
+ "anthropic/claude-sonnet-4.6",
+ "anthropic/claude-sonnet-4.5",
+ "anthropic/claude-opus-4.5",
+ ]
+ for model in supported {
XCTAssertFalse(
SettingsStore.shared.isTemperatureUnsupported(model),
"\(model) still supports `temperature` and should keep receiving it"