mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-05-06 22:01:44 +08:00
feat(compshare): add Coding Plan preset across claude/codex/hermes/openclaw
Introduce a dedicated "Compshare Coding Plan" variant pointing to https://cp.compshare.cn (with /v1 for OpenAI-compatible apps). Reuses the existing ucloud icon and promotion copy, while adding a new providerForm.presets.ucloudCoding key in zh/en/ja.
This commit is contained in:
@@ -669,6 +669,25 @@ export const providerPresets: ProviderPreset[] = [
|
||||
icon: "ucloud",
|
||||
iconColor: "#000000",
|
||||
},
|
||||
{
|
||||
name: "Compshare Coding Plan",
|
||||
nameKey: "providerForm.presets.ucloudCoding",
|
||||
websiteUrl: "https://www.compshare.cn",
|
||||
apiKeyUrl:
|
||||
"https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch",
|
||||
settingsConfig: {
|
||||
env: {
|
||||
ANTHROPIC_BASE_URL: "https://cp.compshare.cn",
|
||||
ANTHROPIC_AUTH_TOKEN: "",
|
||||
},
|
||||
},
|
||||
endpointCandidates: ["https://cp.compshare.cn"],
|
||||
category: "aggregator",
|
||||
isPartner: true, // 合作伙伴
|
||||
partnerPromotionKey: "ucloud", // 促销信息 i18n key(复用)
|
||||
icon: "ucloud",
|
||||
iconColor: "#000000",
|
||||
},
|
||||
{
|
||||
name: "Micu",
|
||||
websiteUrl: "https://www.openclaudecode.cn",
|
||||
|
||||
@@ -316,6 +316,25 @@ requires_openai_auth = true`,
|
||||
icon: "ucloud",
|
||||
iconColor: "#000000",
|
||||
},
|
||||
{
|
||||
name: "Compshare Coding Plan",
|
||||
nameKey: "providerForm.presets.ucloudCoding",
|
||||
websiteUrl: "https://www.compshare.cn",
|
||||
apiKeyUrl:
|
||||
"https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch",
|
||||
auth: generateThirdPartyAuth(""),
|
||||
config: generateThirdPartyConfig(
|
||||
"compshare_coding",
|
||||
"https://cp.compshare.cn/v1",
|
||||
"gpt-5.4",
|
||||
),
|
||||
endpointCandidates: ["https://cp.compshare.cn/v1"],
|
||||
category: "aggregator",
|
||||
isPartner: true, // 合作伙伴
|
||||
partnerPromotionKey: "ucloud", // 促销信息 i18n key(复用)
|
||||
icon: "ucloud",
|
||||
iconColor: "#000000",
|
||||
},
|
||||
{
|
||||
name: "Micu",
|
||||
websiteUrl: "https://www.openclaudecode.cn",
|
||||
|
||||
@@ -872,6 +872,28 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
model: { default: "gpt-5.4", provider: "compshare" },
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Compshare Coding Plan",
|
||||
nameKey: "providerForm.presets.ucloudCoding",
|
||||
websiteUrl: "https://www.compshare.cn",
|
||||
apiKeyUrl:
|
||||
"https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch",
|
||||
settingsConfig: {
|
||||
name: "compshare_coding",
|
||||
base_url: "https://cp.compshare.cn/v1",
|
||||
api_key: "",
|
||||
api_mode: "chat_completions",
|
||||
models: [{ id: "gpt-5.4", name: "GPT-5.4" }],
|
||||
},
|
||||
category: "aggregator",
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "ucloud",
|
||||
icon: "ucloud",
|
||||
iconColor: "#000000",
|
||||
suggestedDefaults: {
|
||||
model: { default: "gpt-5.4", provider: "compshare_coding" },
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Micu",
|
||||
websiteUrl: "https://www.openclaudecode.cn",
|
||||
|
||||
@@ -1519,6 +1519,46 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Compshare Coding Plan",
|
||||
nameKey: "providerForm.presets.ucloudCoding",
|
||||
websiteUrl: "https://www.compshare.cn",
|
||||
apiKeyUrl:
|
||||
"https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch",
|
||||
settingsConfig: {
|
||||
baseUrl: "https://cp.compshare.cn/v1",
|
||||
apiKey: "",
|
||||
api: "anthropic-messages",
|
||||
models: [
|
||||
{
|
||||
id: "claude-opus-4-7",
|
||||
name: "Claude Opus 4.7",
|
||||
contextWindow: 1000000,
|
||||
cost: { input: 5, output: 25 },
|
||||
},
|
||||
],
|
||||
},
|
||||
category: "aggregator",
|
||||
isPartner: true, // 合作伙伴
|
||||
partnerPromotionKey: "ucloud", // 促销信息 i18n key(复用)
|
||||
icon: "ucloud",
|
||||
iconColor: "#000000",
|
||||
templateValues: {
|
||||
apiKey: {
|
||||
label: "API Key",
|
||||
placeholder: "",
|
||||
editorValue: "",
|
||||
},
|
||||
},
|
||||
suggestedDefaults: {
|
||||
model: {
|
||||
primary: "compshare-coding/claude-opus-4-7",
|
||||
},
|
||||
modelCatalog: {
|
||||
"compshare-coding/claude-opus-4-7": { alias: "Opus" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Micu",
|
||||
websiteUrl: "https://www.openclaudecode.cn",
|
||||
|
||||
@@ -802,6 +802,7 @@
|
||||
},
|
||||
"presets": {
|
||||
"ucloud": "Compshare",
|
||||
"ucloudCoding": "Compshare Coding Plan",
|
||||
"shengsuanyun": "Shengsuanyun",
|
||||
"openrouter": "OpenRouter",
|
||||
"deepseek": "DeepSeek",
|
||||
|
||||
@@ -802,6 +802,7 @@
|
||||
},
|
||||
"presets": {
|
||||
"ucloud": "Compshare",
|
||||
"ucloudCoding": "Compshare Coding Plan",
|
||||
"shengsuanyun": "Shengsuanyun",
|
||||
"openrouter": "OpenRouter",
|
||||
"deepseek": "DeepSeek",
|
||||
|
||||
@@ -802,6 +802,7 @@
|
||||
},
|
||||
"presets": {
|
||||
"ucloud": "优云智算",
|
||||
"ucloudCoding": "优云智算Coding Plan",
|
||||
"shengsuanyun": "胜算云",
|
||||
"openrouter": "OpenRouter",
|
||||
"deepseek": "DeepSeek",
|
||||
|
||||
Reference in New Issue
Block a user