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:
Jason
2026-07-29 17:09:29 +08:00
parent bfb767ae17
commit 30409878bd
5 changed files with 30 additions and 5 deletions
+6 -1
View File
@@ -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",