What
Expand `kbot doctor` so it tests connectivity to all providers the user has ever configured, not just the currently active one. Display a summary showing which providers are reachable and which are not.
Why
Users who switch between providers (e.g., Anthropic for heavy work, Groq for fast queries, Ollama for offline) currently only see the health of their active provider when running `kbot doctor`. If a secondary provider's key has expired or a local runtime has gone down, they won't find out until they switch to it mid-task. Testing all providers upfront saves debugging time.
Suggested approach
- In `doctor.ts`, the existing `checkProviderReachable()` function (line ~174) only tests the single active provider. Refactor it (or add a new `checkAllProviders()` function) that:
- Reads the config from `~/.kbot/config.json` to find all providers with stored keys.
- Also checks known local runtime endpoints (Ollama, LM Studio, Jan, kbot-local) — this part already exists in `checkLocalRuntimes()`.
- For each cloud provider with a stored key, does a lightweight reachability check (HEAD request to the API base URL).
- Display results as individual check lines:
✓ Anthropic (Claude) reachable
✓ Groq reachable
✗ OpenAI unreachable — check your network or API key
✓ Ollama running (3 models)
- Run all provider checks in parallel with `Promise.allSettled()` for speed.
- Keep the existing single-provider check as a fallback if the config only has one provider.
Files to look at
- `packages/kbot/src/doctor.ts` — `checkProviderReachable()` (~line 174) and `checkLocalRuntimes()` (~line 225)
- `packages/kbot/src/auth.ts` — `loadConfig()`, `PROVIDERS` record (all 20 provider definitions with API URLs)
- `packages/kbot/src/cli.ts` — Where `runDoctor()` is called (~line 896)
What
Expand `kbot doctor` so it tests connectivity to all providers the user has ever configured, not just the currently active one. Display a summary showing which providers are reachable and which are not.
Why
Users who switch between providers (e.g., Anthropic for heavy work, Groq for fast queries, Ollama for offline) currently only see the health of their active provider when running `kbot doctor`. If a secondary provider's key has expired or a local runtime has gone down, they won't find out until they switch to it mid-task. Testing all providers upfront saves debugging time.
Suggested approach
Files to look at