mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-04 19:45:34 +08:00
feat(presets): sync Claude provider presets to Hermes
Import 38 Claude presets into Hermes by mapping env-style ANTHROPIC_BASE_URL/AUTH_TOKEN to flat base_url/api_key, deriving api_mode from apiFormat (anthropic_messages or chat_completions), deduping ANTHROPIC_*_MODEL into models[], and pointing suggestedDefaults at ANTHROPIC_MODEL. Skip OAuth-only presets (Codex, Copilot), Bedrock SigV4, Gemini Native, and the three already shipped on the Hermes side (OpenRouter, Anthropic, DeepSeek). Place Shengsuanyun at the head of the Hermes array so the partner shows first in the preset panel. In the Claude preset list, restore Shengsuanyun back ahead of Gemini Native. The Gemini Native preset (#1918) was inserted between Claude Official and Shengsuanyun, which made the third_party category register first in the reduce-based grouping and pushed the aggregator block (and Shengsuanyun) behind it. Backfill the missing providerForm.presets translations across zh, en, and ja (openrouter, anthropic, openai, googleai, deepseek, together; plus shengsuanyun for en and ja) so existing Hermes preset names no longer render literal i18n keys.
This commit is contained in:
@@ -85,6 +85,22 @@ export const providerPresets: ProviderPreset[] = [
|
||||
icon: "anthropic",
|
||||
iconColor: "#D4915D",
|
||||
},
|
||||
{
|
||||
name: "Shengsuanyun",
|
||||
nameKey: "providerForm.presets.shengsuanyun",
|
||||
websiteUrl: "https://www.shengsuanyun.com",
|
||||
apiKeyUrl: "https://www.shengsuanyun.com/?from=CH_4HHXMRYF",
|
||||
settingsConfig: {
|
||||
env: {
|
||||
ANTHROPIC_BASE_URL: "https://router.shengsuanyun.com/api",
|
||||
ANTHROPIC_AUTH_TOKEN: "",
|
||||
},
|
||||
},
|
||||
category: "aggregator",
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "shengsuanyun",
|
||||
icon: "shengsuanyun",
|
||||
},
|
||||
{
|
||||
name: "Gemini Native",
|
||||
websiteUrl: "https://ai.google.dev/gemini-api",
|
||||
@@ -106,22 +122,6 @@ export const providerPresets: ProviderPreset[] = [
|
||||
icon: "gemini",
|
||||
iconColor: "#4285F4",
|
||||
},
|
||||
{
|
||||
name: "Shengsuanyun",
|
||||
nameKey: "providerForm.presets.shengsuanyun",
|
||||
websiteUrl: "https://www.shengsuanyun.com",
|
||||
apiKeyUrl: "https://www.shengsuanyun.com/?from=CH_4HHXMRYF",
|
||||
settingsConfig: {
|
||||
env: {
|
||||
ANTHROPIC_BASE_URL: "https://router.shengsuanyun.com/api",
|
||||
ANTHROPIC_AUTH_TOKEN: "",
|
||||
},
|
||||
},
|
||||
category: "aggregator",
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "shengsuanyun",
|
||||
icon: "shengsuanyun",
|
||||
},
|
||||
{
|
||||
name: "DeepSeek",
|
||||
websiteUrl: "https://platform.deepseek.com",
|
||||
|
||||
Reference in New Issue
Block a user