diff --git a/src/config/claudeProviderPresets.ts b/src/config/claudeProviderPresets.ts index f3f9a872c..62182ee18 100644 --- a/src/config/claudeProviderPresets.ts +++ b/src/config/claudeProviderPresets.ts @@ -589,6 +589,22 @@ export const providerPresets: ProviderPreset[] = [ icon: "micu", iconColor: "#000000", }, + { + name: "X-Code", + websiteUrl: "https://www.x-code.cn", + apiKeyUrl: "https://www.x-code.cn", + settingsConfig: { + env: { + ANTHROPIC_BASE_URL: "https://www.x-code.cn", + ANTHROPIC_AUTH_TOKEN: "", + }, + }, + category: "third_party", + isPartner: true, // 合作伙伴 + partnerPromotionKey: "x-code", // 促销信息 i18n key + icon: "x-code", + iconColor: "#000000", + }, { name: "OpenRouter", websiteUrl: "https://openrouter.ai", diff --git a/src/config/codexProviderPresets.ts b/src/config/codexProviderPresets.ts index 1ee9c3a69..21ca8d0c5 100644 --- a/src/config/codexProviderPresets.ts +++ b/src/config/codexProviderPresets.ts @@ -314,6 +314,23 @@ requires_openai_auth = true`, icon: "micu", iconColor: "#000000", }, + { + name: "X-Code", + websiteUrl: "https://www.x-code.cn", + apiKeyUrl: "https://www.x-code.cn", + auth: generateThirdPartyAuth(""), + config: generateThirdPartyConfig( + "x-code", + "https://www.x-code.cn/v1", + "gpt-5.4", + ), + endpointCandidates: ["https://www.x-code.cn/v1"], + category: "third_party", + isPartner: true, // 合作伙伴 + partnerPromotionKey: "x-code", // 促销信息 i18n key + icon: "x-code", + iconColor: "#000000", + }, { name: "OpenRouter", websiteUrl: "https://openrouter.ai", diff --git a/src/config/opencodeProviderPresets.ts b/src/config/opencodeProviderPresets.ts index 5563aaddd..034118642 100644 --- a/src/config/opencodeProviderPresets.ts +++ b/src/config/opencodeProviderPresets.ts @@ -1275,6 +1275,35 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [ }, }, }, + { + name: "X-Code", + websiteUrl: "https://www.x-code.cn", + apiKeyUrl: "https://www.x-code.cn", + settingsConfig: { + npm: "@ai-sdk/anthropic", + name: "X-Code", + options: { + baseURL: "https://www.x-code.cn/v1", + apiKey: "", + }, + models: { + "claude-opus-4-6": { name: "Claude Opus 4.6" }, + "claude-sonnet-4-6": { name: "Claude Sonnet 4.6" }, + }, + }, + category: "third_party", + isPartner: true, + partnerPromotionKey: "x-code", + icon: "x-code", + iconColor: "#000000", + templateValues: { + apiKey: { + label: "API Key", + placeholder: "", + editorValue: "", + }, + }, + }, { name: "AWS Bedrock", websiteUrl: "https://aws.amazon.com/bedrock/", diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 0012e4aea..f05e6c152 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -707,7 +707,8 @@ "sssaicode": "SSAI Code offers an exclusive bonus for CC Switch users — $10 extra credit on every top-up!", "siliconflow": "SiliconFlow is an official partner of CC Switch", "ucloud": "UCloud offers an exclusive bonus for CC Switch users — register via this link to get ¥5 platform trial credit!", - "micu": "Micu is an official partner of CC Switch" + "micu": "Micu is an official partner of CC Switch", + "x-code": "XCodeAPI offers a special bonus for CC Switch users — register via this link and get 10% extra credit on your first order (contact admin to claim)" }, "parameterConfig": "Parameter Config - {{name}} *", "mainModel": "Main Model (optional)", diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json index 22aaca333..02c2d2b03 100644 --- a/src/i18n/locales/ja.json +++ b/src/i18n/locales/ja.json @@ -707,7 +707,8 @@ "sssaicode": "SSAI Code は CC Switch ユーザー向けに特別ボーナスを提供しています。チャージごとに $10 の追加クレジットがもらえます!", "siliconflow": "SiliconFlow は CC Switch の公式パートナーです", "ucloud": "UCloud は CC Switch ユーザー向けに特別ボーナスを提供しています。このリンクから登録すると、5元のプラットフォーム体験クレジットがもらえます!", - "micu": "Micu は CC Switch の公式パートナーです" + "micu": "Micu は CC Switch の公式パートナーです", + "x-code": "XCodeAPI は CC Switch ユーザー向けに特別ボーナスを提供しています。このリンクから登録すると、初回注文で 10% の追加クレジットがもらえます(管理者に連絡して受け取り)" }, "parameterConfig": "パラメーター設定 - {{name}} *", "mainModel": "メインモデル(任意)", diff --git a/src/i18n/locales/zh.json b/src/i18n/locales/zh.json index de672095c..3ff812d65 100644 --- a/src/i18n/locales/zh.json +++ b/src/i18n/locales/zh.json @@ -707,7 +707,8 @@ "sssaicode": "SSAI Code 为 CC Switch 的用户提供了特殊优惠,每次充值赠予额外 $10 额度!", "siliconflow": "硅基流动是 CC Switch 的官方合作伙伴", "ucloud": "优云智算为CC Switch 的用户提供了特殊优惠,通过此链接注册,可以获得五元平台体验金!", - "micu": "Micu 是 CC Switch 的官方合作伙伴" + "micu": "Micu 是 CC Switch 的官方合作伙伴", + "x-code": "XCodeAPI 为CC Switch 的用户提供特别福利,使用此链接注册后首单加赠10%的额度(联系站长领取)" }, "parameterConfig": "参数配置 - {{name}} *", "mainModel": "主模型 (可选)", diff --git a/src/icons/extracted/index.ts b/src/icons/extracted/index.ts index ea682272b..9584c5f50 100644 --- a/src/icons/extracted/index.ts +++ b/src/icons/extracted/index.ts @@ -60,6 +60,7 @@ export const icons: Record = { aihubmix: `AiHubMix`, opencode: `OpenCode`, siliconflow: `SiliconCloud`, + "x-code": `X-Code`, micu: `Micu`, ucloud: `UCloud`, sssaicode: `SSAI Code1001 11010110 101110 110SSSSAiCode`, diff --git a/src/icons/extracted/x-code.svg b/src/icons/extracted/x-code.svg new file mode 100644 index 000000000..a7cc1f340 --- /dev/null +++ b/src/icons/extracted/x-code.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + +