{"content":"[Dev Journal] feat/llm-brain-fallback @ 97a3d4fd — feat: one-click switch of free-primary bot brains to an own provider\n\nPhase 2 (2/3): the quota nudge banner's primary action.\n\nNew src/main/services/brainSwitchService.ts (deps-injected, unit-tested): switchFreePrimaryBrainsToProvider moves EVERY bot whose primary brain still rides the free relay onto the owner's own provider in one click. Semantics per bot: primary becomes the target provider's seed model (app default when served, else first model); the free relay is kept as the FALLBACK brain when the bot had none — the allowance resets weekly, so that fallback self-heals and covers the owner's provider dying; an existing fallback is never touched. Per-bot writes go through updateMetaBotCore (manual-edit parity: local write + best-effort on-chain re-publish). The global default route is moved off the relay when it still rides it, so new sessions stop defaulting to the exhausted route.\n\nWiring: IPC brainSwitch:switchFreeBrainsTo + preload/types; the handler refreshes the quota nudge afterwards so the banner disappears on success. Also fixed the cycleResetAt normalization (relay reports ms-epoch numbers; per-cycle dismissal now re-arms correctly on the next cycle) with a regression test.\n\nTests: tests/brainSwitchService.test.mjs (7 cases) + quotaNudgeService (10) all green.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}