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: keep sending temperature to claude-sonnet-4-6

Georg Linhard679d3c57042e
diff --git a/Sources/Fluid/Persistence/SettingsStore.swift b/Sources/Fluid/Persistence/SettingsStore.swift
index 8423a9dc..62ce2058 100644
--- a/Sources/Fluid/Persistence/SettingsStore.swift
+++ b/Sources/Fluid/Persistence/SettingsStore.swift
@@ -2667,13 +2667,12 @@ final class SettingsStore: ObservableObject {
/// Whether the model rejects the `temperature` parameter.
/// Covers reasoning models plus Anthropic models that have deprecated temperature
- /// (adaptive-thinking models: Opus 4.7+, Sonnet 4.6+, Sonnet 5, Fable/Mythos 5).
+ /// (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()
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")
diff --git a/Tests/FluidDictationIntegrationTests/TemperatureSupportTests.swift b/Tests/FluidDictationIntegrationTests/TemperatureSupportTests.swift
index 527e5636..c0220f1b 100644
--- a/Tests/FluidDictationIntegrationTests/TemperatureSupportTests.swift
+++ b/Tests/FluidDictationIntegrationTests/TemperatureSupportTests.swift
@@ -2,10 +2,12 @@
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."
+// Newer Anthropic models (Opus 4.7+, 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.
+// recurred for Sonnet 5 because the check only matched claude-opus-4-7.
+// Sonnet 4.6 and older still accept `temperature` (verified against the live API)
+// and must keep receiving the app's tuned values.
@MainActor
final class TemperatureSupportTests: XCTestCase {
@@ -13,7 +15,6 @@ final class TemperatureSupportTests: XCTestCase {
let unsupported = [
"claude-opus-4-7",
"claude-opus-4-8",
- "claude-sonnet-4-6",
"claude-sonnet-5",
"claude-fable-5",
"claude-mythos-5",
@@ -38,7 +39,7 @@ final class TemperatureSupportTests: XCTestCase {
}
func testTemperatureSupported_olderAndNonAnthropicModels() {
- for model in ["gpt-4.1", "claude-sonnet-4-20250514", "gemini-2.5-flash", "llama3"] {
+ for model in ["gpt-4.1", "claude-sonnet-4-6", "claude-sonnet-4-20250514", "gemini-2.5-flash", "llama3"] {
XCTAssertFalse(
SettingsStore.shared.isTemperatureUnsupported(model),
"\(model) still supports `temperature` and should keep receiving it"