import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
import {
  LmStudioBackend,
  OllamaBackend
} from "./chunk-MWW62YZP.js";
import {
  PROVIDER_DETECT_TIMEOUT_MS
} from "./chunk-WBLTISAK.js";
import "./chunk-PZUWP5VK.js";

// src/cli/detect-providers.ts
async function detectProvider(backend) {
  const available = await backend.isAvailable();
  if (!available) return { available: false, models: [] };
  const models = await backend.listModels(PROVIDER_DETECT_TIMEOUT_MS);
  return { available: true, models };
}
async function run(_args) {
  const ollama = new OllamaBackend();
  const lmStudio = new LmStudioBackend();
  const [ollamaResult, lmStudioResult] = await Promise.all([
    detectProvider(ollama),
    detectProvider(lmStudio)
  ]);
  const result = {
    ollama: ollamaResult,
    "lm-studio": lmStudioResult,
    anthropic: { available: !!process.env.ANTHROPIC_API_KEY, models: [] }
  };
  console.log(JSON.stringify(result, null, 2));
}
export {
  run
};
//# sourceMappingURL=detect-providers-I2QQFDJW.js.map