mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-25 13:45:03 +08:00
feat(presets): add ClaudeCN provider presets
Add ClaudeCN as a new partner provider with support for: - Claude Code preset (Anthropic native protocol) - Codex preset (gpt-5.5 model) - Claude Desktop preset (direct mode with passthrough routes) - OpenCode preset (@ai-sdk/anthropic) - OpenClaw preset (anthropic-messages protocol) - Hermes preset (anthropic_messages mode) - Icon configuration (claudecn.png) - i18n support (zh/en/ja) with enterprise service promotion ClaudeCN is an enterprise-grade AI gateway operated by a registered company, supporting enterprise procurement processes with corporate payments, contracts, and compliance guarantees.
This commit is contained in:
@@ -529,6 +529,19 @@ export const claudeDesktopProviderPresets: ClaudeDesktopProviderPreset[] = [
|
||||
partnerPromotionKey: "claudeapi",
|
||||
icon: "claudeapi",
|
||||
},
|
||||
{
|
||||
name: "ClaudeCN",
|
||||
websiteUrl: "https://claudecn.top",
|
||||
apiKeyUrl: "https://claudecn.top/register?aff=ccswitch",
|
||||
category: "third_party",
|
||||
baseUrl: "https://claudecn.top",
|
||||
mode: "direct",
|
||||
apiFormat: "anthropic",
|
||||
modelRoutes: passthroughRoutes(),
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "claudecn",
|
||||
icon: "claudecn",
|
||||
},
|
||||
{
|
||||
name: "Cubence",
|
||||
websiteUrl: "https://cubence.com",
|
||||
|
||||
@@ -570,6 +570,21 @@ export const providerPresets: ProviderPreset[] = [
|
||||
partnerPromotionKey: "claudeapi",
|
||||
icon: "claudeapi",
|
||||
},
|
||||
{
|
||||
name: "ClaudeCN",
|
||||
websiteUrl: "https://claudecn.top",
|
||||
apiKeyUrl: "https://claudecn.top/register?aff=ccswitch",
|
||||
settingsConfig: {
|
||||
env: {
|
||||
ANTHROPIC_BASE_URL: "https://claudecn.top",
|
||||
ANTHROPIC_AUTH_TOKEN: "",
|
||||
},
|
||||
},
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "claudecn",
|
||||
icon: "claudecn",
|
||||
},
|
||||
{
|
||||
name: "Cubence",
|
||||
websiteUrl: "https://cubence.com",
|
||||
|
||||
@@ -186,6 +186,21 @@ requires_openai_auth = true`,
|
||||
partnerPromotionKey: "patewayai",
|
||||
icon: "pateway",
|
||||
},
|
||||
{
|
||||
name: "ClaudeCN",
|
||||
websiteUrl: "https://claudecn.top",
|
||||
apiKeyUrl: "https://claudecn.top/register?aff=ccswitch",
|
||||
category: "third_party",
|
||||
auth: generateThirdPartyAuth(""),
|
||||
config: generateThirdPartyConfig(
|
||||
"claudecn",
|
||||
"https://claudecn.top/v1",
|
||||
"gpt-5.5",
|
||||
),
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "claudecn",
|
||||
icon: "claudecn",
|
||||
},
|
||||
{
|
||||
name: "Cubence",
|
||||
websiteUrl: "https://cubence.com",
|
||||
|
||||
@@ -706,6 +706,36 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
model: { default: "claude-opus-4-7", provider: "cubence" },
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "ClaudeCN",
|
||||
websiteUrl: "https://claudecn.top",
|
||||
apiKeyUrl: "https://claudecn.top/register?aff=ccswitch",
|
||||
settingsConfig: {
|
||||
name: "claudecn",
|
||||
base_url: "https://claudecn.top",
|
||||
api_key: "",
|
||||
api_mode: "anthropic_messages",
|
||||
models: [
|
||||
{ id: "claude-opus-4-7", name: "Claude Opus 4.7" },
|
||||
{ id: "claude-sonnet-4-6", name: "Claude Sonnet 4.6" },
|
||||
{ id: "claude-haiku-4-5", name: "Claude Haiku 4.5" },
|
||||
],
|
||||
},
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "claudecn",
|
||||
icon: "claudecn",
|
||||
templateValues: {
|
||||
apiKey: {
|
||||
label: "API Key",
|
||||
placeholder: "",
|
||||
editorValue: "",
|
||||
},
|
||||
},
|
||||
suggestedDefaults: {
|
||||
model: { default: "claude-sonnet-4-6", provider: "claudecn" },
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "AIGoCode",
|
||||
websiteUrl: "https://aigocode.com",
|
||||
|
||||
@@ -774,6 +774,54 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "ClaudeCN",
|
||||
websiteUrl: "https://claudecn.top",
|
||||
apiKeyUrl: "https://claudecn.top/register?aff=ccswitch",
|
||||
settingsConfig: {
|
||||
baseUrl: "https://claudecn.top",
|
||||
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: "claudecn",
|
||||
icon: "claudecn",
|
||||
templateValues: {
|
||||
apiKey: {
|
||||
label: "API Key",
|
||||
placeholder: "",
|
||||
editorValue: "",
|
||||
},
|
||||
},
|
||||
suggestedDefaults: {
|
||||
model: {
|
||||
primary: "claudecn/claude-sonnet-4-6",
|
||||
},
|
||||
modelCatalog: {
|
||||
"claudecn/claude-opus-4-7": { alias: "Opus" },
|
||||
"claudecn/claude-sonnet-4-6": { alias: "Sonnet" },
|
||||
"claudecn/claude-haiku-4-5": { alias: "Haiku" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "OpenRouter",
|
||||
websiteUrl: "https://openrouter.ai",
|
||||
|
||||
@@ -1210,6 +1210,36 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "ClaudeCN",
|
||||
websiteUrl: "https://claudecn.top",
|
||||
apiKeyUrl: "https://claudecn.top/register?aff=ccswitch",
|
||||
settingsConfig: {
|
||||
npm: "@ai-sdk/anthropic",
|
||||
name: "ClaudeCN",
|
||||
options: {
|
||||
baseURL: "https://claudecn.top",
|
||||
apiKey: "",
|
||||
setCacheKey: true,
|
||||
},
|
||||
models: {
|
||||
"claude-sonnet-4-6": { name: "Claude Sonnet 4.6" },
|
||||
"claude-opus-4-7": { name: "Claude Opus 4.7" },
|
||||
"claude-haiku-4-5": { name: "Claude Haiku 4.5" },
|
||||
},
|
||||
},
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "claudecn",
|
||||
icon: "claudecn",
|
||||
templateValues: {
|
||||
apiKey: {
|
||||
label: "API Key",
|
||||
placeholder: "",
|
||||
editorValue: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "AICoding",
|
||||
websiteUrl: "https://aicoding.sh",
|
||||
|
||||
Reference in New Issue
Block a user