const PROVIDER_PRESETS = [
  // === Official Anthropic ===
  {
    id: "anthropic",
    name: "Anthropic (Official)",
    nameZh: "Anthropic (\u5B98\u65B9)",
    description: "Official Anthropic API - Best quality and reliability",
    descriptionZh: "\u5B98\u65B9 Anthropic API - \u6700\u4F73\u8D28\u91CF\u548C\u7A33\u5B9A\u6027",
    category: "official",
    website: "https://console.anthropic.com",
    requiresApiKey: true,
    baseUrl: "https://api.anthropic.com",
    models: [
      "claude-sonnet-4-20250514",
      "claude-opus-4-20250514",
      "claude-opus-4-6",
      "claude-sonnet-4-6",
      "claude-3-5-sonnet-20241022",
      "claude-haiku-4-5-20251001"
    ],
    defaultModel: "claude-sonnet-4-20250514",
    features: ["chat", "vision", "tools", "streaming", "thinking", "code"],
    instructions: {
      en: "Get your API key from https://console.anthropic.com/settings/keys",
      zh: "\u4ECE https://console.anthropic.com/settings/keys \u83B7\u53D6 API \u5BC6\u94A5"
    }
  },
  // === OpenAI-Compatible Providers ===
  {
    id: "302ai",
    name: "302.AI",
    nameZh: "302.AI",
    description: "Multi-model API platform with Claude support",
    descriptionZh: "\u591A\u6A21\u578B API \u5E73\u53F0\uFF0C\u652F\u6301 Claude",
    category: "openai-compatible",
    website: "https://302.ai",
    requiresApiKey: true,
    baseUrl: "https://api.302.ai/v1",
    models: [
      "claude-sonnet-4-20250514",
      "claude-3-5-sonnet-20241022",
      "gpt-4o",
      "gpt-4-turbo"
    ],
    defaultModel: "claude-sonnet-4-20250514",
    features: ["chat", "vision", "tools", "streaming", "code"],
    instructions: {
      en: "Register at 302.ai and get your API key from dashboard",
      zh: "\u5728 302.ai \u6CE8\u518C\u5E76\u4ECE\u63A7\u5236\u53F0\u83B7\u53D6 API \u5BC6\u94A5"
    }
  },
  {
    id: "openrouter",
    name: "OpenRouter",
    nameZh: "OpenRouter",
    description: "Unified API for multiple AI models",
    descriptionZh: "\u7EDF\u4E00\u591A\u6A21\u578B API \u63A5\u53E3",
    category: "openai-compatible",
    website: "https://openrouter.ai",
    requiresApiKey: true,
    baseUrl: "https://openrouter.ai/api/v1",
    models: [
      "anthropic/claude-sonnet-4",
      "anthropic/claude-3.5-sonnet",
      "anthropic/claude-3.7-sonnet:thinking",
      "google/gemini-2.5-pro-preview"
    ],
    defaultModel: "anthropic/claude-sonnet-4",
    features: ["chat", "vision", "tools", "streaming", "thinking", "code"],
    transformer: {
      use: ["openrouter"]
    },
    instructions: {
      en: "Get your API key from https://openrouter.ai/keys",
      zh: "\u4ECE https://openrouter.ai/keys \u83B7\u53D6 API \u5BC6\u94A5"
    }
  },
  // === Chinese Providers ===
  {
    id: "deepseek",
    name: "DeepSeek",
    nameZh: "DeepSeek \u6DF1\u5EA6\u6C42\u7D22",
    description: "High-performance Chinese AI with reasoning capabilities",
    descriptionZh: "\u9AD8\u6027\u80FD\u56FD\u4EA7 AI\uFF0C\u652F\u6301\u6DF1\u5EA6\u63A8\u7406",
    category: "chinese",
    website: "https://platform.deepseek.com",
    requiresApiKey: true,
    baseUrl: "https://api.deepseek.com",
    models: ["deepseek-chat", "deepseek-reasoner"],
    defaultModel: "deepseek-chat",
    features: ["chat", "tools", "streaming", "thinking", "code"],
    transformer: {
      "use": ["deepseek"],
      "deepseek-chat": { use: ["tooluse"] }
    },
    instructions: {
      en: "Get your API key from https://platform.deepseek.com/api_keys",
      zh: "\u4ECE https://platform.deepseek.com/api_keys \u83B7\u53D6 API \u5BC6\u94A5"
    }
  },
  {
    id: "qwen",
    name: "Qwen (Alibaba)",
    nameZh: "\u901A\u4E49\u5343\u95EE (\u963F\u91CC\u5DF4\u5DF4)",
    description: "Alibaba Cloud Qwen models via DashScope",
    descriptionZh: "\u963F\u91CC\u4E91\u901A\u4E49\u5343\u95EE\u5927\u6A21\u578B",
    category: "chinese",
    website: "https://dashscope.console.aliyun.com",
    requiresApiKey: true,
    baseUrl: "https://dashscope.aliyuncs.com/compatible-mode/v1",
    models: ["qwen3-coder-plus", "qwen-max", "qwen-turbo"],
    defaultModel: "qwen3-coder-plus",
    features: ["chat", "vision", "tools", "streaming", "code"],
    transformer: {
      "use": [["maxtoken", { max_tokens: 65536 }]],
      "qwen3-coder-plus": { use: ["enhancetool"] }
    },
    instructions: {
      en: "Get your API key from Alibaba Cloud DashScope console",
      zh: "\u4ECE\u963F\u91CC\u4E91 DashScope \u63A7\u5236\u53F0\u83B7\u53D6 API \u5BC6\u94A5"
    }
  },
  {
    id: "siliconflow",
    name: "SiliconFlow",
    nameZh: "SiliconFlow \u7845\u57FA\u6D41\u52A8",
    description: "High-speed inference for multiple models",
    descriptionZh: "\u9AD8\u901F\u591A\u6A21\u578B\u63A8\u7406\u5E73\u53F0",
    category: "chinese",
    website: "https://siliconflow.cn",
    requiresApiKey: true,
    baseUrl: "https://api.siliconflow.cn/v1",
    models: ["moonshotai/Kimi-K2-Instruct", "deepseek-ai/DeepSeek-V3"],
    defaultModel: "moonshotai/Kimi-K2-Instruct",
    features: ["chat", "tools", "streaming", "code"],
    transformer: {
      use: [["maxtoken", { max_tokens: 16384 }]]
    },
    instructions: {
      en: "Get your API key from https://cloud.siliconflow.cn",
      zh: "\u4ECE https://cloud.siliconflow.cn \u83B7\u53D6 API \u5BC6\u94A5"
    }
  },
  {
    id: "modelscope",
    name: "ModelScope",
    nameZh: "ModelScope \u9B54\u642D",
    description: "Alibaba ModelScope inference platform",
    descriptionZh: "\u963F\u91CC\u5DF4\u5DF4\u9B54\u642D\u63A8\u7406\u5E73\u53F0",
    category: "chinese",
    website: "https://modelscope.cn",
    requiresApiKey: true,
    baseUrl: "https://api-inference.modelscope.cn/v1",
    models: [
      "Qwen/Qwen3-Coder-480B-A35B-Instruct",
      "Qwen/Qwen3-235B-A22B-Thinking-2507",
      "ZhipuAI/GLM-4.5"
    ],
    defaultModel: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
    features: ["chat", "tools", "streaming", "thinking", "code"],
    transformer: {
      "use": [["maxtoken", { max_tokens: 65536 }]],
      "Qwen/Qwen3-Coder-480B-A35B-Instruct": { use: ["enhancetool"] },
      "Qwen/Qwen3-235B-A22B-Thinking-2507": { use: ["reasoning"] }
    },
    instructions: {
      en: "Get your API key from ModelScope console",
      zh: "\u4ECE\u9B54\u642D\u63A7\u5236\u53F0\u83B7\u53D6 API \u5BC6\u94A5"
    }
  },
  {
    id: "volcengine",
    name: "Volcengine (ByteDance)",
    nameZh: "\u706B\u5C71\u5F15\u64CE (\u5B57\u8282\u8DF3\u52A8)",
    description: "ByteDance AI platform with DeepSeek models",
    descriptionZh: "\u5B57\u8282\u8DF3\u52A8 AI \u5E73\u53F0\uFF0C\u652F\u6301 DeepSeek",
    category: "chinese",
    website: "https://console.volcengine.com",
    requiresApiKey: true,
    baseUrl: "https://ark.cn-beijing.volces.com/api/v3",
    models: ["deepseek-v3-250324", "deepseek-r1-250528"],
    defaultModel: "deepseek-v3-250324",
    features: ["chat", "tools", "streaming", "thinking", "code"],
    transformer: {
      use: ["deepseek"]
    },
    instructions: {
      en: "Get your API key from Volcengine console",
      zh: "\u4ECE\u706B\u5C71\u5F15\u64CE\u63A7\u5236\u53F0\u83B7\u53D6 API \u5BC6\u94A5"
    }
  },
  {
    id: "kimi",
    name: "Kimi (Moonshot)",
    nameZh: "Kimi (\u6708\u4E4B\u6697\u9762)",
    description: "Moonshot AI with long context support",
    descriptionZh: "\u6708\u4E4B\u6697\u9762 AI\uFF0C\u652F\u6301\u8D85\u957F\u4E0A\u4E0B\u6587",
    category: "chinese",
    website: "https://platform.moonshot.cn",
    requiresApiKey: true,
    baseUrl: "https://api.moonshot.cn/v1",
    models: ["moonshot-v1-128k", "moonshot-v1-32k", "moonshot-v1-8k"],
    defaultModel: "moonshot-v1-128k",
    features: ["chat", "tools", "streaming", "code"],
    instructions: {
      en: "Get your API key from https://platform.moonshot.cn/console/api-keys",
      zh: "\u4ECE https://platform.moonshot.cn/console/api-keys \u83B7\u53D6 API \u5BC6\u94A5"
    }
  },
  {
    id: "glm",
    name: "GLM (Zhipu AI)",
    nameZh: "GLM (\u667A\u8C31 AI)",
    description: "Zhipu AI ChatGLM models",
    descriptionZh: "\u667A\u8C31 AI ChatGLM \u5927\u6A21\u578B",
    category: "chinese",
    website: "https://open.bigmodel.cn",
    requiresApiKey: true,
    baseUrl: "https://open.bigmodel.cn/api/paas/v4",
    models: ["glm-4-plus", "glm-4", "glm-4-flash"],
    defaultModel: "glm-4-plus",
    features: ["chat", "vision", "tools", "streaming", "code"],
    instructions: {
      en: "Get your API key from https://open.bigmodel.cn/usercenter/apikeys",
      zh: "\u4ECE https://open.bigmodel.cn/usercenter/apikeys \u83B7\u53D6 API \u5BC6\u94A5"
    }
  },
  // === Google Gemini ===
  {
    id: "gemini",
    name: "Google Gemini",
    nameZh: "Google Gemini",
    description: "Google AI models with multimodal capabilities",
    descriptionZh: "Google AI \u591A\u6A21\u6001\u6A21\u578B",
    category: "openai-compatible",
    website: "https://aistudio.google.com",
    requiresApiKey: true,
    baseUrl: "https://generativelanguage.googleapis.com/v1beta/models/",
    models: ["gemini-2.5-flash", "gemini-2.5-pro", "gemini-pro"],
    defaultModel: "gemini-2.5-flash",
    features: ["chat", "vision", "tools", "streaming", "thinking", "code"],
    transformer: {
      use: ["gemini"]
    },
    instructions: {
      en: "Get your API key from https://aistudio.google.com/app/apikey",
      zh: "\u4ECE https://aistudio.google.com/app/apikey \u83B7\u53D6 API \u5BC6\u94A5"
    }
  },
  // === Free Tier Providers ===
  {
    id: "groq",
    name: "Groq",
    nameZh: "Groq",
    description: "Ultra-fast inference with free tier",
    descriptionZh: "\u8D85\u5FEB\u63A8\u7406\uFF0C\u6709\u514D\u8D39\u989D\u5EA6",
    category: "free",
    website: "https://console.groq.com",
    requiresApiKey: true,
    baseUrl: "https://api.groq.com/openai/v1",
    models: ["llama-3.3-70b-versatile", "mixtral-8x7b-32768"],
    defaultModel: "llama-3.3-70b-versatile",
    features: ["chat", "tools", "streaming", "code"],
    instructions: {
      en: "Get your free API key from https://console.groq.com/keys",
      zh: "\u4ECE https://console.groq.com/keys \u83B7\u53D6\u514D\u8D39 API \u5BC6\u94A5"
    }
  },
  // === Local Providers ===
  {
    id: "ollama",
    name: "Ollama (Local)",
    nameZh: "Ollama (\u672C\u5730)",
    description: "Run AI models locally with Ollama",
    descriptionZh: "\u4F7F\u7528 Ollama \u672C\u5730\u8FD0\u884C AI \u6A21\u578B",
    category: "local",
    website: "https://ollama.ai",
    requiresApiKey: false,
    baseUrl: "http://localhost:11434/v1",
    models: ["llama3.2", "codellama", "qwen2.5-coder"],
    defaultModel: "llama3.2",
    features: ["chat", "streaming", "code"],
    instructions: {
      en: "Install Ollama from https://ollama.ai and run: ollama pull llama3.2",
      zh: "\u4ECE https://ollama.ai \u5B89\u88C5 Ollama \u5E76\u8FD0\u884C: ollama pull llama3.2"
    }
  }
];
function getAllPresets() {
  return PROVIDER_PRESETS;
}
function getPresetById(id) {
  return PROVIDER_PRESETS.find((p) => p.id === id);
}
function getRecommendedPresets() {
  const recommendedIds = ["anthropic", "302ai", "deepseek", "openrouter", "qwen"];
  return recommendedIds.map((id) => getPresetById(id)).filter((p) => p !== void 0);
}
function getChinesePresets() {
  return PROVIDER_PRESETS.filter(
    (p) => p.category === "chinese" || p.id === "302ai"
  );
}

export { PROVIDER_PRESETS as P, getChinesePresets as a, getPresetById as b, getRecommendedPresets as c, getAllPresets as g };
