Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
log which primary was benched (and why) on a proactive fallback swap
[._.]/ Adam Eivye7f5d68227fa
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex c42654de99..af7cb4c553 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -12,6 +12,8 @@## Changed+- **A proactive fallback swap now logs which primary was benched and why.** When `createRun` finds the requested provider marked unavailable (benched) and routes to a fallback, the log said only `⚡ Using fallback provider: Codex CLI (source: system)` — leaving "why isn't my *enabled* provider being used?" unanswered (a provider's `enabled` toggle is independent of its runtime availability state, which the bench sets). It now names the skipped primary, its unavailability reason, and the recovery ETA: `⚡ Primary Claude Code CLI unavailable (model-not-found, recovers in 28m) — using fallback Codex CLI (source: system)`. (`server/lib/aiToolkit/runner.js`)+- **AI provider failures now log the actual reason inline.** The `🤖 AI provider error detected` line in pm2 logs previously printed only the provider name and run id, so diagnosing a failed run meant opening `data/runs/<id>/metadata.json` to find the captured error. It now includes the model, error category, exit code, and the (single-line, capped) error text — e.g. `… Claude Code CLI (claude-opus-4-8) [model-not-found] exit=1 - run f95b8af2-95fd-…: API Error (claude-opus-4-8): 400 The provided model identifier is invalid.` — so the "why" is visible at a glance. The full untruncated text still lives in the run record. (`server/services/autoFixer.js`)- **Deploying a LoRA checkpoint with no preview now auto-renders one.** A training run only writes preview thumbnails at the `sampleEvery` cadence, so a checkpoint whose step doesn't land on it — most often the final step (e.g. step 1188 with sampleEvery 300) — showed "no preview" in the picker, including on the deployed card. Promoting such a checkpoint now renders a thumbnail in the background from the just-deployed LoRA (the run's neutral trigger prompt + seed, on the LoRA's own 9B/4B base) and joins it to the checkpoint by step, so the deployed option gets a real image instead of a blank. The render is fire-and-forget — promote stays responsive and a render failure (OOM, restart) never fails the deploy, since the LoRA is already registered. The picker backstop-polls after promoting a preview-less checkpoint to surface the thumbnail once it's ready (~minutes on 9B), unmount-guarded. (`server/services/loraTraining/index.js` `ensureCheckpointPreview`, `client/src/components/loraTraining/CheckpointPicker.jsx`)diff --git a/server/lib/aiToolkit/runner.js b/server/lib/aiToolkit/runner.jsindex 95b056363d..207219f26f 100644--- a/server/lib/aiToolkit/runner.js+++ b/server/lib/aiToolkit/runner.js@@ -123,7 +123,14 @@ export function createRunnerService(config = {}) {effectiveProviderId = fallback.provider.id;usedFallback = true;fallbackModelHint = fallback.model || null;- console.log(`⚡ Using fallback provider: ${fallback.provider.name} (source: ${fallback.source})`);+ // Name the benched PRIMARY and why it was skipped, not just the+ // fallback — otherwise the log reads as an unexplained provider switch+ // ("why is my enabled provider not being used?"). `enabled` is the user+ // toggle; this swap is driven by the separate runtime availability state.+ const benched = providerStatusService.getStatus(providerId) || {};+ const recovery = providerStatusService.getTimeUntilRecovery(providerId);+ const primaryName = providersMap[providerId]?.name || providerId;+ console.log(`⚡ Primary ${primaryName} unavailable (${benched.reason || 'unknown'}${recovery ? `, recovers in ${recovery}` : ''}) — using fallback ${fallback.provider.name} (source: ${fallback.source})`);} else {const timeUntilRecovery = providerStatusService.getTimeUntilRecovery(providerId);throw new Error(