Add APIKEY.FUN partner provider presets

This commit is contained in:
Jason
2026-05-28 23:43:48 +08:00
parent 4bb4e994af
commit 8302f1e36c
19 changed files with 232 additions and 0 deletions
@@ -595,6 +595,20 @@ export const claudeDesktopProviderPresets: ClaudeDesktopProviderPreset[] = [
partnerPromotionKey: "packycode",
icon: "packycode",
},
{
name: "APIKEY.FUN",
websiteUrl: "https://apikey.fun",
apiKeyUrl: "https://apikey.fun/register?aff=CCSwitch",
category: "third_party",
baseUrl: "https://api.apikey.fun",
mode: "direct",
apiFormat: "anthropic",
modelRoutes: passthroughRoutes(),
endpointCandidates: ["https://api.apikey.fun", "https://slb.apikey.fun"],
isPartner: true,
partnerPromotionKey: "apikeyfun",
icon: "apikeyfun",
},
{
name: "ClaudeAPI",
websiteUrl: "https://claudeapi.com",
+17
View File
@@ -627,6 +627,23 @@ export const providerPresets: ProviderPreset[] = [
partnerPromotionKey: "packycode", // 促销信息 i18n key
icon: "packycode",
},
{
name: "APIKEY.FUN",
websiteUrl: "https://apikey.fun",
apiKeyUrl: "https://apikey.fun/register?aff=CCSwitch",
settingsConfig: {
env: {
ANTHROPIC_BASE_URL: "https://api.apikey.fun",
ANTHROPIC_AUTH_TOKEN: "",
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1",
},
},
endpointCandidates: ["https://api.apikey.fun", "https://slb.apikey.fun"],
category: "third_party",
isPartner: true,
partnerPromotionKey: "apikeyfun",
icon: "apikeyfun",
},
{
name: "ClaudeAPI",
websiteUrl: "https://claudeapi.com",
+26
View File
@@ -828,6 +828,32 @@ requires_openai_auth = true`,
partnerPromotionKey: "packycode", // 促销信息 i18n key
icon: "packycode",
},
{
name: "APIKEY.FUN",
websiteUrl: "https://apikey.fun",
apiKeyUrl: "https://apikey.fun/register?aff=CCSwitch",
category: "third_party",
auth: generateThirdPartyAuth(""),
config: `model_provider = "custom"
model = "gpt-5.5"
review_model = "gpt-5.5"
model_reasoning_effort = "high"
disable_response_storage = true
[model_providers.custom]
name = "APIKEY.FUN"
base_url = "https://api.apikey.fun/v1"
wire_api = "responses"
requires_openai_auth = true`,
endpointCandidates: [
"https://api.apikey.fun/v1",
"https://slb.apikey.fun/v1",
],
apiFormat: "openai_responses",
isPartner: true,
partnerPromotionKey: "apikeyfun",
icon: "apikeyfun",
},
{
name: "ClaudeCN",
websiteUrl: "https://claudecn.top",
+20
View File
@@ -91,6 +91,26 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
],
icon: "packycode",
},
{
name: "APIKEY.FUN",
websiteUrl: "https://apikey.fun",
apiKeyUrl: "https://apikey.fun/register?aff=CCSwitch",
settingsConfig: {
env: {
GOOGLE_GEMINI_BASE_URL: "https://api.apikey.fun",
GEMINI_API_KEY: "",
GEMINI_MODEL: "gemini-3-pro-preview",
},
},
baseURL: "https://api.apikey.fun",
model: "gemini-3-pro-preview",
description: "APIKEY.FUN",
category: "third_party",
isPartner: true,
partnerPromotionKey: "apikeyfun",
endpointCandidates: ["https://api.apikey.fun", "https://slb.apikey.fun"],
icon: "apikeyfun",
},
{
name: "Cubence",
websiteUrl: "https://cubence.com",
+35
View File
@@ -746,6 +746,41 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
model: { default: "claude-opus-4-7", provider: "packycode" },
},
},
{
name: "APIKEY.FUN",
websiteUrl: "https://apikey.fun",
apiKeyUrl: "https://apikey.fun/register?aff=CCSwitch",
settingsConfig: {
name: "apikeyfun",
base_url: "https://api.apikey.fun",
api_key: "",
api_mode: "anthropic_messages",
models: [
{
id: "claude-opus-4-7",
name: "Claude Opus 4.7",
context_length: 1000000,
},
{
id: "claude-sonnet-4-6",
name: "Claude Sonnet 4.6",
context_length: 1000000,
},
{
id: "claude-haiku-4-5",
name: "Claude Haiku 4.5",
context_length: 200000,
},
],
},
category: "third_party",
isPartner: true,
partnerPromotionKey: "apikeyfun",
icon: "apikeyfun",
suggestedDefaults: {
model: { default: "claude-opus-4-7", provider: "apikeyfun" },
},
},
{
name: "Cubence",
websiteUrl: "https://cubence.com",
+49
View File
@@ -1423,6 +1423,55 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
},
},
},
{
name: "APIKEY.FUN",
websiteUrl: "https://apikey.fun",
apiKeyUrl: "https://apikey.fun/register?aff=CCSwitch",
settingsConfig: {
baseUrl: "https://api.apikey.fun",
apiKey: "",
api: "anthropic-messages",
models: [
{
id: "claude-opus-4-7",
name: "Claude Opus 4.7",
contextWindow: 1000000,
},
{
id: "claude-sonnet-4-6",
name: "Claude Sonnet 4.6",
contextWindow: 1000000,
},
{
id: "claude-haiku-4-5",
name: "Claude Haiku 4.5",
contextWindow: 200000,
},
],
},
category: "third_party",
isPartner: true,
partnerPromotionKey: "apikeyfun",
icon: "apikeyfun",
templateValues: {
apiKey: {
label: "API Key",
placeholder: "",
editorValue: "",
},
},
suggestedDefaults: {
model: {
primary: "apikeyfun/claude-opus-4-7",
fallbacks: ["apikeyfun/claude-sonnet-4-6"],
},
modelCatalog: {
"apikeyfun/claude-opus-4-7": { alias: "Opus" },
"apikeyfun/claude-sonnet-4-6": { alias: "Sonnet" },
"apikeyfun/claude-haiku-4-5": { alias: "Haiku" },
},
},
},
{
name: "Cubence",
websiteUrl: "https://cubence.com",
+30
View File
@@ -1206,6 +1206,36 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
},
},
},
{
name: "APIKEY.FUN",
websiteUrl: "https://apikey.fun",
apiKeyUrl: "https://apikey.fun/register?aff=CCSwitch",
settingsConfig: {
npm: "@ai-sdk/anthropic",
name: "APIKEY.FUN",
options: {
baseURL: "https://api.apikey.fun/v1",
apiKey: "",
setCacheKey: true,
},
models: {
"claude-opus-4-7": { name: "Claude Opus 4.7" },
"claude-sonnet-4-6": { name: "Claude Sonnet 4.6" },
"claude-haiku-4-5": { name: "Claude Haiku 4.5" },
},
},
category: "third_party",
isPartner: true,
partnerPromotionKey: "apikeyfun",
icon: "apikeyfun",
templateValues: {
apiKey: {
label: "API Key",
placeholder: "",
editorValue: "",
},
},
},
{
name: "Cubence",
websiteUrl: "https://cubence.com",