Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix(tinfoil): delist the retired deepseek-v4-flash — canary probe, startup remap, fixtures (#2250)

Joshua6d56d75e7e13
diff --git a/scripts/llm-canary.mjs b/scripts/llm-canary.mjs
index d3bd14245..e43ff260a 100644
--- a/scripts/llm-canary.mjs
+++ b/scripts/llm-canary.mjs
@@ -58,7 +58,9 @@ const PROVIDERS = [
// glm-5-3 is the registry default, so it is the model most Tinfoil users
// are on — and the Tinfoil transport has no param-stripping ladder, so a
// reasoning-param rejection there hard-errors (#1611).
- models: ["glm-5-3", "gpt-oss-120b", "deepseek-v4-flash", "llama3-3-70b"],
+ // deepseek-v4-flash was replaced by deepseek-v4-1-flash in Tinfoil's live
+ // catalog (canary run 35322067138, 2026-09-18: HTTP 404 "model does not exist").
+ models: ["glm-5-3", "gpt-oss-120b", "deepseek-v4-1-flash", "llama3-3-70b"],
},
{
id: "gemini",
diff --git a/src/config/retiredCloudModels.ts b/src/config/retiredCloudModels.ts
index 6e66533db..7e9388b2e 100644
--- a/src/config/retiredCloudModels.ts
+++ b/src/config/retiredCloudModels.ts
@@ -34,14 +34,18 @@ export const RETIRED_CLOUD_MODELS: Record<string, RetiredProviderModels> = {
"llama-3.1-8b-instant": "openai/gpt-oss-20b",
},
},
- // All three shipped as seed entries — deepseek-v4-pro and kimi-k2-6 through
- // v1.7.6, glm-5-2 until this release — so anyone who simply took a default
- // can be on one. This key has not shipped yet, so the set could still grow.
+ // All three shipped as seed entries — deepseek-v4-pro in v1.7.4, kimi-k2-6
+ // through v1.8.3, glm-5-2 through v1.9.2 — so anyone who simply took a
+ // default can be on one. deepseek-v4-flash was never seeded but was served
+ // live, and was deepseek-v4-pro's replacement here, until Tinfoil retired it
+ // for deepseek-v4-1-flash (seen 2026-09-18). The first key shipped in
+ // v1.10.0, so adding it rotated the key.
tinfoil: {
- migratedKey: "_retiredTinfoilModelsMigrated",
+ migratedKey: "_retiredTinfoilModelsMigrated2",
models: {
"glm-5-2": "glm-5-3",
- "deepseek-v4-pro": "deepseek-v4-flash",
+ "deepseek-v4-pro": "deepseek-v4-1-flash",
+ "deepseek-v4-flash": "deepseek-v4-1-flash",
"kimi-k2-6": "kimi-k3",
},
},
diff --git a/test/helpers/retiredCloudModels.test.js b/test/helpers/retiredCloudModels.test.js
index 85fb4791c..acba8baac 100644
--- a/test/helpers/retiredCloudModels.test.js
+++ b/test/helpers/retiredCloudModels.test.js
@@ -5,6 +5,7 @@ const load = () => import("../../src/config/retiredCloudModels.ts");
const CLEANUP = { provider: "cleanupProvider", model: "cleanupModel" };
const CHAT = { provider: "chatAgentProvider", model: "chatAgentModel" };
+const NOTES = { provider: "noteFormattingProvider", model: "noteFormattingModel" };
const makeStorage = (initial = {}) => {
const map = new Map(Object.entries(initial));
@@ -31,19 +32,23 @@ test("remaps a scope pinned to a model Tinfoil retired", async () => {
test("remaps every other Tinfoil model the app has offered and Tinfoil has since retired", async () => {
const { sweepRetiredCloudModelSelections } = await load();
- // Both shipped as seed defaults and are both gone from the live catalog now,
- // so they 404 exactly like glm-5-2 did.
+ // deepseek-v4-pro and kimi-k2-6 shipped as seed defaults; deepseek-v4-flash
+ // was served live (and was deepseek-v4-pro's replacement here) until Tinfoil
+ // retired it too. All three 404 exactly like glm-5-2 did.
const storage = makeStorage({
cleanupProvider: "tinfoil",
cleanupModel: "deepseek-v4-pro",
chatAgentProvider: "tinfoil",
chatAgentModel: "kimi-k2-6",
+ noteFormattingProvider: "tinfoil",
+ noteFormattingModel: "deepseek-v4-flash",
});
- sweepRetiredCloudModelSelections(storage, [CLEANUP, CHAT]);
+ sweepRetiredCloudModelSelections(storage, [CLEANUP, CHAT, NOTES]);
- assert.equal(storage.map.get("cleanupModel"), "deepseek-v4-flash");
+ assert.equal(storage.map.get("cleanupModel"), "deepseek-v4-1-flash");
assert.equal(storage.map.get("chatAgentModel"), "kimi-k3");
+ assert.equal(storage.map.get("noteFormattingModel"), "deepseek-v4-1-flash");
});
test("still remaps the models Groq retired", async () => {
@@ -116,6 +121,26 @@ test("a provider whose sentinel is already set is skipped", async () => {
assert.equal(storage.map.get("cleanupModel"), "llama-3.3-70b-versatile");
});
+test("a sentinel a shipped build already wrote does not stop the rotated sweep", async () => {
+ const { sweepRetiredCloudModelSelections } = await load();
+ // v1.10.x ran the first Tinfoil sweep; deepseek-v4-flash retired after it.
+ const storage = makeStorage({
+ _retiredTinfoilModelsMigrated: "1",
+ cleanupProvider: "tinfoil",
+ cleanupModel: "deepseek-v4-flash",
+ });
+
+ assert.deepEqual(sweepRetiredCloudModelSelections(storage, [CLEANUP]), [
+ {
+ storeKey: "cleanupModel",
+ provider: "tinfoil",
+ from: "deepseek-v4-flash",
+ to: "deepseek-v4-1-flash",
+ },
+ ]);
+ assert.equal(storage.map.get("_retiredTinfoilModelsMigrated2"), "1");
+});
+
test("no replacement is itself retired, and every provider has its own sentinel", async () => {
const { RETIRED_CLOUD_MODELS } = await load();
const sentinels = new Set();
@@ -153,8 +178,8 @@ test("each provider's sentinel is pinned to the exact set of ids it covers", asy
retired: ["llama-3.1-8b-instant", "llama-3.3-70b-versatile", "qwen/qwen3-32b"],
},
tinfoil: {
- migratedKey: "_retiredTinfoilModelsMigrated",
- retired: ["deepseek-v4-pro", "glm-5-2", "kimi-k2-6"],
+ migratedKey: "_retiredTinfoilModelsMigrated2",
+ retired: ["deepseek-v4-flash", "deepseek-v4-pro", "glm-5-2", "kimi-k2-6"],
},
});
});
@@ -167,7 +192,7 @@ test("a storage that cannot be written leaves the sentinel unset, so the next la
};
assert.deepEqual(sweepRetiredCloudModelSelections(storage, [CLEANUP]), []);
- assert.equal(storage.map.get("_retiredTinfoilModelsMigrated"), undefined);
+ assert.equal(storage.map.get("_retiredTinfoilModelsMigrated2"), undefined);
// Groq shares the storage but not the failure's blast radius.
assert.equal(storage.map.get("_retiredGroqModelsMigrated"), undefined);
});
diff --git a/test/helpers/tinfoilDefaultModel.test.js b/test/helpers/tinfoilDefaultModel.test.js
index 3695e501f..0f091b160 100644
--- a/test/helpers/tinfoilDefaultModel.test.js
+++ b/test/helpers/tinfoilDefaultModel.test.js
@@ -9,7 +9,12 @@ const english = require("../../src/locales/en/translation.json");
// /v1/models list already omits it. The default lookup must follow, otherwise
// every reconciled selection lands on whatever Tinfoil happens to list first.
const LIVE_CATALOG = [
- { id: "deepseek-v4-flash", name: "DeepSeek V4 Flash", description: "", supportsThinking: true },
+ {
+ id: "deepseek-v4-1-flash",
+ name: "DeepSeek V4.1 Flash",
+ description: "",
+ supportsThinking: true,
+ },
{ id: "glm-5-3", name: "GLM-5.3", description: "", supportsThinking: true },
{ id: "gpt-oss-120b", name: "GPT-OSS 120B", description: "", supportsThinking: true },
];
@@ -26,7 +31,7 @@ test("tinfoil default model follows the glm-5-3 replacement", async (t) => {
});
await t.test("still falls back to the first served model when the default is gone", () => {
- assert.equal(pickDefaultTinfoilModel(LIVE_CATALOG.slice(0, 1))?.id, "deepseek-v4-flash");
+ assert.equal(pickDefaultTinfoilModel(LIVE_CATALOG.slice(0, 1))?.id, "deepseek-v4-1-flash");
});
await t.test("registry names the default and no longer ships glm-5-2", () => {
@@ -51,7 +56,7 @@ test("tinfoil default model follows the glm-5-3 replacement", async (t) => {
// Tinfoil's catalog is fetched live and cached, so its order is Tinfoil's, not
// ours. Anything that resolves a default from list position lands on whatever
-// the enclave happens to serve first — deepseek-v4-flash today.
+// the enclave happens to serve first — deepseek-v4-1-flash today.
test("a cached catalog does not displace the named Tinfoil default", async (t) => {
installBrowserGlobals(t, {
initialStorage: {
@@ -116,6 +121,27 @@ test("a persisted glm-5-2 selection is repointed before any request", async (t)
assert.equal(useSettingsStore.getState().cleanupModel, "glm-5-3");
});
+// The sweep is one-shot per sentinel, and v1.10.x already wrote the first one.
+// A model retired after that release must be caught under a rotated key or the
+// upgraded install keeps 404ing.
+test("a deepseek-v4-flash selection is repointed where the first sweep already ran", async (t) => {
+ installBrowserGlobals(t, {
+ initialStorage: {
+ _llmScopeKeysMigrated: "1",
+ _retiredTinfoilModelsMigrated: "1",
+ cleanupMode: "providers",
+ cleanupProvider: "tinfoil",
+ cleanupModel: "deepseek-v4-flash",
+ },
+ });
+ const vite = await createRendererServer(t, {
+ cachePrefix: "openwhispr-tinfoil-rotated-sweep-test-",
+ });
+ const { useSettingsStore } = await vite.ssrLoadModule("/stores/settingsStore.ts");
+
+ assert.equal(useSettingsStore.getState().cleanupModel, "deepseek-v4-1-flash");
+});
+
// The app tells a user when Tinfoil retires the model they picked. The startup
// sweep now moves them before the live-catalog reconcile can, so the notice has
// to come from the sweep or it is lost.
diff --git a/test/services/llmRequestShapeMatrix.test.js b/test/services/llmRequestShapeMatrix.test.js
index fd19122d8..11ed93fa8 100644
--- a/test/services/llmRequestShapeMatrix.test.js
+++ b/test/services/llmRequestShapeMatrix.test.js
@@ -34,7 +34,7 @@ const MATRIX = [
{ max_tokens: MAX_TOKENS, temperature: 0, reasoning_effort: "low", chat_template_kwargs: { enable_thinking: false } }],
["tinfoil selection edits on gpt-oss also pin low effort", "tinfoil", "gpt-oss-120b", null, SELECTION_EDIT,
{ max_tokens: MAX_TOKENS, temperature: 0.3, reasoning_effort: "low" }],
- ["tinfoil model outside the registry keeps the legacy shape", "tinfoil", "deepseek-v4-flash", null, CLEANUP,
+ ["tinfoil model outside the registry keeps the legacy shape", "tinfoil", "deepseek-v4-1-flash", null, CLEANUP,
{ max_tokens: MAX_TOKENS, temperature: 0 }],
// --- OpenAI / custom / OpenRouter (registry-driven shape) ---