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: drop temperature for newer Anthropic models that deprecate it

Georg Linhard5bf71358a311
diff --git a/Fluid.xcodeproj/project.pbxproj b/Fluid.xcodeproj/project.pbxproj
index 0725e76d..3c98aacd 100644
--- a/Fluid.xcodeproj/project.pbxproj
+++ b/Fluid.xcodeproj/project.pbxproj
@@ -15,6 +15,7 @@
7CDB0A2D2F3C4D5600FB7CAD /* DictationE2ETests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CDB0A292F3C4D5600FB7CAD /* DictationE2ETests.swift */; };
7CDB0A2E2F3C4D5600FB7CAD /* AudioFixtureLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CDB0A2A2F3C4D5600FB7CAD /* AudioFixtureLoader.swift */; };
86CAA2D4EF18433096185602 /* LLMClientRequestBodyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 343B29013F4441D6A797D12D /* LLMClientRequestBodyTests.swift */; };
+ 272BFB5CB271489892CAE50C /* TemperatureSupportTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 980330F3CE464336ADCE3E23 /* TemperatureSupportTests.swift */; };
7CDB0A2F2F3C4D5600FB7CAD /* dictation_fixture.wav in Resources */ = {isa = PBXBuildFile; fileRef = 7CDB0A2B2F3C4D5600FB7CAD /* dictation_fixture.wav */; };
7CDB0A302F3C4D5600FB7CAD /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7CDB0A2C2F3C4D5600FB7CAD /* XCTest.framework */; };
7CE006BD2E80EBE600DDCCD6 /* AppUpdater in Frameworks */ = {isa = PBXBuildFile; productRef = 7CE006BC2E80EBE600DDCCD6 /* AppUpdater */; };
@@ -36,6 +37,7 @@
7C91B0022F42AA0100C0DEF0 /* HotkeyShortcutTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HotkeyShortcutTests.swift; sourceTree = "<group>"; };
7CDB0A292F3C4D5600FB7CAD /* DictationE2ETests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DictationE2ETests.swift; sourceTree = "<group>"; };
343B29013F4441D6A797D12D /* LLMClientRequestBodyTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LLMClientRequestBodyTests.swift; sourceTree = "<group>"; };
+ 980330F3CE464336ADCE3E23 /* TemperatureSupportTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemperatureSupportTests.swift; sourceTree = "<group>"; };
7CDB0A2A2F3C4D5600FB7CAD /* AudioFixtureLoader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioFixtureLoader.swift; sourceTree = "<group>"; };
7CDB0A2B2F3C4D5600FB7CAD /* dictation_fixture.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = dictation_fixture.wav; sourceTree = "<group>"; };
7CDB0A2C2F3C4D5600FB7CAD /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
@@ -107,6 +109,7 @@
7CDB0A292F3C4D5600FB7CAD /* DictationE2ETests.swift */,
7C91B0022F42AA0100C0DEF0 /* HotkeyShortcutTests.swift */,
343B29013F4441D6A797D12D /* LLMClientRequestBodyTests.swift */,
+ 980330F3CE464336ADCE3E23 /* TemperatureSupportTests.swift */,
);
path = FluidDictationIntegrationTests;
sourceTree = "<group>";
@@ -262,6 +265,7 @@
7CDB0A2D2F3C4D5600FB7CAD /* DictationE2ETests.swift in Sources */,
7C91B0012F42AA0100C0DEF0 /* HotkeyShortcutTests.swift in Sources */,
86CAA2D4EF18433096185602 /* LLMClientRequestBodyTests.swift in Sources */,
+ 272BFB5CB271489892CAE50C /* TemperatureSupportTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Sources/Fluid/Persistence/SettingsStore.swift b/Sources/Fluid/Persistence/SettingsStore.swift
index 7de8f89c..8423a9dc 100644
--- a/Sources/Fluid/Persistence/SettingsStore.swift
+++ b/Sources/Fluid/Persistence/SettingsStore.swift
@@ -2667,11 +2667,16 @@ final class SettingsStore: ObservableObject {
/// Whether the model rejects the `temperature` parameter.
/// Covers reasoning models plus Anthropic models that have deprecated temperature
- /// (Claude Opus 4.7+, which use extended thinking by default).
+ /// (adaptive-thinking models: Opus 4.7+, Sonnet 4.6+, Sonnet 5, Fable/Mythos 5).
func isTemperatureUnsupported(_ model: String) -> Bool {
if self.isReasoningModel(model) { return true }
let modelLower = model.lowercased()
return modelLower.contains("claude-opus-4-7")
+ || modelLower.contains("claude-opus-4-8")
+ || modelLower.contains("claude-sonnet-4-6")
+ || modelLower.contains("claude-sonnet-5")
+ || modelLower.contains("claude-fable")
+ || modelLower.contains("claude-mythos")
}
/// Whether to display thinking tokens in the UI (Command Mode, Rewrite Mode)
diff --git a/Tests/FluidDictationIntegrationTests/TemperatureSupportTests.swift b/Tests/FluidDictationIntegrationTests/TemperatureSupportTests.swift
new file mode 100644
index 00000000..527e5636
--- /dev/null
+++ b/Tests/FluidDictationIntegrationTests/TemperatureSupportTests.swift
@@ -0,0 +1,48 @@
+@testable import FluidVoice_Debug
+import XCTest
+
+// Regression tests for the Anthropic `temperature` deprecation handling.
+// Newer Anthropic models (Opus 4.7+, Sonnet 4.6+, Sonnet 5, Fable/Mythos 5) reject the
+// `temperature` parameter with HTTP 400 "`temperature` is deprecated for this model."
+// See https://github.com/altic-dev/FluidVoice/issues/285 (Opus 4.7) — the same failure
+// recurred for Sonnet 5 / Sonnet 4.6 because the check only matched claude-opus-4-7.
+
+@MainActor
+final class TemperatureSupportTests: XCTestCase {
+ func testTemperatureUnsupported_newerAnthropicModels() {
+ let unsupported = [
+ "claude-opus-4-7",
+ "claude-opus-4-8",
+ "claude-sonnet-4-6",
+ "claude-sonnet-5",
+ "claude-fable-5",
+ "claude-mythos-5",
+ // Provider-prefixed IDs (e.g. OpenRouter) must match too
+ "anthropic/claude-sonnet-5",
+ ]
+ for model in unsupported {
+ XCTAssertTrue(
+ SettingsStore.shared.isTemperatureUnsupported(model),
+ "\(model) rejects `temperature` — sending it fails with HTTP 400"
+ )
+ }
+ }
+
+ func testTemperatureUnsupported_openAIReasoningModels() {
+ for model in ["o1", "o3-mini", "gpt-5", "openai/gpt-oss-120b"] {
+ XCTAssertTrue(
+ SettingsStore.shared.isTemperatureUnsupported(model),
+ "\(model) is a reasoning model and must not receive `temperature`"
+ )
+ }
+ }
+
+ func testTemperatureSupported_olderAndNonAnthropicModels() {
+ for model in ["gpt-4.1", "claude-sonnet-4-20250514", "gemini-2.5-flash", "llama3"] {
+ XCTAssertFalse(
+ SettingsStore.shared.isTemperatureUnsupported(model),
+ "\(model) still supports `temperature` and should keep receiving it"
+ )
+ }
+ }
+}