const anthropicSupportedModels = [
  "claude-sonnet-4-5",
  "claude-haiku-4-5",
  "claude-opus-4-5",
  "claude-opus-4-1"
];
function isSupportedAnthropicModel(model) {
  if (typeof model !== "string") return false;
  return anthropicSupportedModels.includes(model);
}
const openaiModelsSupported = [
  "gpt-5",
  "gpt-5.1",
  "gpt-5-mini",
  "gpt-5-nano",
  "gpt-5-codex"
];
function isSupportedOpenAIModel(model) {
  if (typeof model !== "string") return false;
  return openaiModelsSupported.includes(model);
}
const vecelSupportedModels = ["v0-1.5-md", "v0-1.5-lg"];
function isSupportedVercelModel(model) {
  if (typeof model !== "string") return false;
  return vecelSupportedModels.includes(model);
}
const groqModelsSupported = [
  "llama-3.1-8b-instant",
  "llama-3.3-70b-versatile",
  "meta-llama/llama-guard-4-12b",
  "openai/gpt-oss-120b",
  "openai/gpt-oss-20b",
  "groq/compound",
  "groq/compound-mini",
  "meta-llama/llama-4-maverick-17b-128e-instruct",
  "meta-llama/llama-4-scout-17b-16e-instruct",
  "moonshotai/kimi-k2-instruct-0905",
  "qwen/qwen3-32b"
];
function isSupportedGroqModel(model) {
  if (typeof model !== "string") return false;
  return groqModelsSupported.includes(model);
}
const googleModelsSupported = ["gemini-3-pro-preview"];
function isSupportedGoogleModel(model) {
  if (typeof model !== "string") return false;
  return googleModelsSupported.includes(model);
}
const modelByProvider = {
  anthropic: anthropicSupportedModels,
  google: googleModelsSupported,
  openai: openaiModelsSupported,
  groq: groqModelsSupported,
  vercel: vecelSupportedModels
};
const DEFAULT_MODEL = {
  anthropic: "claude-opus-4-5",
  openai: "gpt-5-mini",
  vercel: "v0-1.5-md",
  groq: "llama-3.1-8b-instant",
  google: "gemini-3-pro-preview"
};
function getProviderForModel(model) {
  for (const [provider, models] of Object.entries(modelByProvider)) {
    if (models.includes(model)) {
      return provider;
    }
  }
  throw new Error(`Unknown model: ${model}`);
}
function getDefaultProvider() {
  if (process.env.ANTHROPIC_API_KEY) return "anthropic";
  if (process.env.OPENAI_API_KEY) return "openai";
  if (process.env.GROQ_API_KEY) return "groq";
  if (process.env.GOOGLE_GENERATIVE_AI_API_KEY) return "google";
  if (process.env.VERCEL_API_KEY) return "vercel";
  return "anthropic";
}
export {
  DEFAULT_MODEL as D,
  getDefaultProvider as a,
  isSupportedOpenAIModel as b,
  isSupportedVercelModel as c,
  isSupportedGroqModel as d,
  isSupportedGoogleModel as e,
  getProviderForModel as g,
  isSupportedAnthropicModel as i,
  modelByProvider as m
};
