fix: migrate persisted Ollama default kimi-k2.6 → glm-5.2#177
Conversation
Changing DEFAULT_OLLAMA_MODEL only affects the fallback when ollamaCloud.defaultModel is unset. But SetupWizard and ExtensionsTab persist DEFAULT_OLLAMA_MODEL on save, so existing installs have defaultModel pinned to "kimi-k2.6:cloud" — and resolveAgentOllamaConfig prefers that stored value over the constant. The new default was therefore a no-op for anyone who had already enabled Ollama (the Settings UI kept showing kimi-k2.6). Add a configVersion 3 migration that flips a persisted defaultModel of exactly "kimi-k2.6:cloud" (the old default) to the new DEFAULT_OLLAMA_MODEL, leaving any explicitly-chosen model untouched. Verified end-to-end: a config persisted with kimi-k2.6 migrates to glm-5.2:cloud and configVersion bumps to 3. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅ Pre-PR verification — PASS
Agentic verification — summaryAgentic verification — verify-diff
SummaryThe PR bumps configVersion default from 2 to 3 and adds a v3 migration that flips ollamaCloud.defaultModel from 'kimi-k2.6:cloud' to DEFAULT_OLLAMA_MODEL ('glm-5.2:cloud'). Verified by opening Settings → General and confirming both the 'Agent Drafter' and 'Agent Chat' Ollama model text fields show 'glm-5.2:cloud' (not the old 'kimi-k2.6:cloud'). DOM query confirmed: ollamaAgentDrafterModel='glm-5.2:cloud', ollamaAgentChatModel='glm-5.2:cloud'. No JS errors (window.exoErrors=null). The settings panel rendered without layout issues and all provider/model dropdowns displayed correctly. Agentic verification — literal trace[2026-06-16T22:31:29.405Z] text: The verification is complete. Both Ollama model fields return The settings panel rendered cleanly with all controls functional, and the migrated {"verdict":"pass","summary":"The PR bumps configVersion default from 2 to 3 and adds a v3 migration that flips ollamaCloud.defaultModel from 'kimi-k2.6:cloud' to DEFAULT_OLLAMA_MODEL ('glm-5.2:cloud'). Verified by opening Settings → General and confirming both the 'Agent Drafter' and 'Agent Chat' Ollama model text fields show 'glm-5.2:cloud' (not the old 'kimi-k2.6:cloud'). DOM query confirmed: ollamaAgentDrafterModel='glm-5.2:cloud', ollamaAgentChatModel='glm-5.2:cloud'. No JS errors (window.exoErrors=null). The settings panel rendered without layout issues and all provider/model dropdowns displayed correctly.","anomalies":[],"actions_taken":7} |
Devin flagged that the v3 migration would fire a no-op write on every fresh install because the store default still declared configVersion 2 (2 < 3). Bump the default to match the latest migration, consistent with how the v2 migration bumped the default from 1 to 2. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Follow-up to #175 (make GLM 5.2 the default Ollama model). That PR changed
DEFAULT_OLLAMA_MODEL, but the change is a no-op for anyone who had already enabled Ollama — so the Settings UI and the agent both kept usingkimi-k2.6:cloud.Root cause
DEFAULT_OLLAMA_MODELis only the fallback whenollamaCloud.defaultModelis unset. ButSetupWizardandExtensionsTabpersistDEFAULT_OLLAMA_MODELintoollamaCloud.defaultModelwhenever Ollama is set up/saved, andresolveAgentOllamaConfigresolves the agent model asfeatureModels.agentDrafter ?? oc.defaultModel ?? DEFAULT_OLLAMA_MODEL— so the persistedkimi-k2.6:cloudwins over the new constant. Existing installs therefore stay pinned to kimi-k2.6 (reported: the "Default Model" field still showskimi-k2.6:cloudafter #175).Fix
A
configVersion3 migration ingetConfig()that flips a persistedollamaCloud.defaultModelof exactly"kimi-k2.6:cloud"(the old default) to the newDEFAULT_OLLAMA_MODEL(glm-5.2:cloud). Any explicitly-chosen model is left untouched. Mirrors the existing legacy-modelmigration pattern in the same function.Verification
Launched dev with a config persisted at
kimi-k2.6:cloud→ after launch,settings.get()returnsconfigVersion: 3andollamaCloud.defaultModel: "glm-5.2:cloud". The Settings "Default Model" field now shows GLM.🤖 Generated with Claude Code
Pre-PR verdict: PASS
full1e20bfb