From 30409878bdbdf1c7091c559d6afc367a052da39c Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 29 Jul 2026 17:09:29 +0800 Subject: [PATCH] chore(presets): add PackyCode backup endpoints Add three fallback endpoints alongside the primary www.packyapi.ai across the five preset files that support endpointCandidates: https://cf.api.fan https://slb-v1.api.fan https://www.packyapi.com The /v1 suffix follows each file's existing convention rather than the literal values supplied: bare domains for the Anthropic-native presets (Claude Code, Claude Desktop, Gemini), /v1 for Codex and Grok Build. Candidates are consumed as complete base URLs by the endpoint picker and the speed test, so they must sit at the same path level as the primary. www.packyapi.com is the pre-b0482320 domain, kept here deliberately as a fallback -- not a leftover of that migration. OpenCode, OpenClaw and Hermes have no endpointCandidates field in their interfaces and are untouched. --- src/config/claudeDesktopProviderPresets.ts | 7 ++++++- src/config/claudeProviderPresets.ts | 7 ++++++- src/config/codexProviderPresets.ts | 7 ++++++- src/config/geminiProviderPresets.ts | 7 ++++++- src/config/grokBuildProviderPresets.ts | 7 ++++++- 5 files changed, 30 insertions(+), 5 deletions(-) diff --git a/src/config/claudeDesktopProviderPresets.ts b/src/config/claudeDesktopProviderPresets.ts index 3f12620c5..7806e321f 100644 --- a/src/config/claudeDesktopProviderPresets.ts +++ b/src/config/claudeDesktopProviderPresets.ts @@ -191,7 +191,12 @@ export const claudeDesktopProviderPresets: ClaudeDesktopProviderPreset[] = [ mode: "direct", apiFormat: "anthropic", modelRoutes: passthroughRoutes(), - endpointCandidates: ["https://www.packyapi.ai"], + endpointCandidates: [ + "https://www.packyapi.ai", + "https://cf.api.fan", + "https://slb-v1.api.fan", + "https://www.packyapi.com", + ], isPartner: true, partnerPromotionKey: "packycode", icon: "packycode", diff --git a/src/config/claudeProviderPresets.ts b/src/config/claudeProviderPresets.ts index 9636e4b2a..0df88a76b 100644 --- a/src/config/claudeProviderPresets.ts +++ b/src/config/claudeProviderPresets.ts @@ -144,7 +144,12 @@ export const providerPresets: ProviderPreset[] = [ }, }, // 请求地址候选(用于地址管理/测速) - endpointCandidates: ["https://www.packyapi.ai"], + endpointCandidates: [ + "https://www.packyapi.ai", + "https://cf.api.fan", + "https://slb-v1.api.fan", + "https://www.packyapi.com", + ], category: "third_party", isPartner: true, // 合作伙伴 partnerPromotionKey: "packycode", // 促销信息 i18n key diff --git a/src/config/codexProviderPresets.ts b/src/config/codexProviderPresets.ts index bc2050a40..9cba6211f 100644 --- a/src/config/codexProviderPresets.ts +++ b/src/config/codexProviderPresets.ts @@ -205,7 +205,12 @@ export const codexProviderPresets: CodexProviderPreset[] = [ "https://www.packyapi.ai/v1", "gpt-5.6-sol", ), - endpointCandidates: ["https://www.packyapi.ai/v1"], + endpointCandidates: [ + "https://www.packyapi.ai/v1", + "https://cf.api.fan/v1", + "https://slb-v1.api.fan/v1", + "https://www.packyapi.com/v1", + ], isPartner: true, // 合作伙伴 partnerPromotionKey: "packycode", // 促销信息 i18n key icon: "packycode", diff --git a/src/config/geminiProviderPresets.ts b/src/config/geminiProviderPresets.ts index a90f43179..0a61724b5 100644 --- a/src/config/geminiProviderPresets.ts +++ b/src/config/geminiProviderPresets.ts @@ -68,7 +68,12 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [ category: "third_party", isPartner: true, partnerPromotionKey: "packycode", - endpointCandidates: ["https://www.packyapi.ai"], + endpointCandidates: [ + "https://www.packyapi.ai", + "https://cf.api.fan", + "https://slb-v1.api.fan", + "https://www.packyapi.com", + ], icon: "packycode", }, { diff --git a/src/config/grokBuildProviderPresets.ts b/src/config/grokBuildProviderPresets.ts index 019edfa03..801c4b800 100644 --- a/src/config/grokBuildProviderPresets.ts +++ b/src/config/grokBuildProviderPresets.ts @@ -84,7 +84,12 @@ export const grokBuildProviderPresets: GrokBuildProviderPreset[] = [ apiKeyUrl: "https://www.packyapi.ai/register?aff=cc-switch", auth: grokAuth(), config: grokPresetConfig("PackyCode", "https://www.packyapi.ai/v1"), - endpointCandidates: ["https://www.packyapi.ai/v1"], + endpointCandidates: [ + "https://www.packyapi.ai/v1", + "https://cf.api.fan/v1", + "https://slb-v1.api.fan/v1", + "https://www.packyapi.com/v1", + ], category: "third_party", isPartner: true, partnerPromotionKey: "packycode",