mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-29 18:05:37 +08:00
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.
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user