mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-05-07 03:34:20 +08:00
feat: rename UCloud provider to Compshare/优云智算 with i18n support
Add optional `nameKey` field to all preset interfaces for localized display names. The preset selector and form now resolve `nameKey` via i18next, falling back to `name` when unset. - zh: 优云智算 / en+ja: Compshare - Update model ID prefix ucloud/ → compshare/ in OpenClaw presets - Update partner promotion copy and README sponsor descriptions
This commit is contained in:
@@ -56,8 +56,8 @@ Claude Code / Codex / Gemini official channels at 38% / 2% / 9% of original pric
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="180"><a href="https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch"><img src="assets/partners/logos/ucloud.png" alt="Ucloud" width="150"></a></td>
|
||||
<td>Thanks to UCloud CompShare for sponsoring this project! CompShare is UCloud's AI cloud platform, providing stable and comprehensive domestic and international model APIs with just one key. Featuring cost-effective monthly and pay-as-you-go Coding Plan packages at 60-80% off official prices. Supports Claude Code, Codex, and API access. Enterprise-grade high concurrency, 24/7 technical support, and self-service invoicing. Users who register via <a href="https://www.compshare.cn/?ytag=GPU_YY_YX_git_cc-switch">this link</a> will receive a free 5 CNY platform trial credit!</td>
|
||||
<td width="180"><a href="https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch"><img src="assets/partners/logos/ucloud.png" alt="Compshare" width="150"></a></td>
|
||||
<td>Thanks to Compshare for sponsoring this project! Compshare is UCloud's AI cloud platform, providing stable and comprehensive domestic and international model APIs with just one key. Featuring cost-effective monthly and pay-as-you-go Coding Plan packages at 60-80% off official prices. Supports Claude Code, Codex, and API access. Enterprise-grade high concurrency, 24/7 technical support, and self-service invoicing. Users who register via <a href="https://www.compshare.cn/?ytag=GPU_YY_YX_git_cc-switch">this link</a> will receive a free 5 CNY platform trial credit!</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
+2
-2
@@ -56,8 +56,8 @@ Claude Code / Codex / Gemini 公式チャンネルが最安で元価格の 38% /
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="180"><a href="https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch"><img src="assets/partners/logos/ucloud.png" alt="Ucloud" width="150"></a></td>
|
||||
<td>UCloud CompShare のご支援に感謝します!CompShare は UCloud 傘下の AI クラウドプラットフォームで、国内外の安定した包括的なモデル API を 1 つのキーだけで利用可能。月額・従量課金のコストパフォーマンスに優れた Coding Plan パッケージを提供し、公式価格の 60〜80% オフで利用できます。Claude Code、Codex および API アクセスに対応。エンタープライズ級の高同時接続、24 時間年中無休のテクニカルサポート、セルフサービス請求書発行に対応。<a href="https://www.compshare.cn/?ytag=GPU_YY_YX_git_cc-switch">こちらのリンク</a>から登録すると、無料で 5 元分のプラットフォーム体験クレジットがもらえます!</td>
|
||||
<td width="180"><a href="https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch"><img src="assets/partners/logos/ucloud.png" alt="Compshare" width="150"></a></td>
|
||||
<td>Compshare のご支援に感謝します!Compshare は UCloud 傘下の AI クラウドプラットフォームで、国内外の安定した包括的なモデル API を 1 つのキーだけで利用可能。月額・従量課金のコストパフォーマンスに優れた Coding Plan パッケージを提供し、公式価格の 60〜80% オフで利用できます。Claude Code、Codex および API アクセスに対応。エンタープライズ級の高同時接続、24 時間年中無休のテクニカルサポート、セルフサービス請求書発行に対応。<a href="https://www.compshare.cn/?ytag=GPU_YY_YX_git_cc-switch">こちらのリンク</a>から登録すると、無料で 5 元分のプラットフォーム体験クレジットがもらえます!</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ Claude Code / Codex / Gemini 官方渠道低至 3.8 / 0.2 / 0.9 折,充值更
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="180"><a href="https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch"><img src="assets/partners/logos/ucloud.png" alt="Ucloud" width="150"></a></td>
|
||||
<td width="180"><a href="https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch"><img src="assets/partners/logos/ucloud.png" alt="优云智算" width="150"></a></td>
|
||||
<td>感谢优云智算赞助了本项目!优云智算是UCloud旗下AI云平台,提供稳定、全面的国内外模型API,仅一个key即可调用。主打包月、按量的高性价比 Coding Plan 套餐,基于官方2~5折优惠。支持接入 Claude Code、Codex 及 API 调用。支持企业高并发、7*24技术支持、自助开票。通过<a href="https://www.compshare.cn/?ytag=GPU_YY_YX_git_cc-switch">此链接</a>注册的用户,可得免费5元平台体验金!</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -1033,7 +1033,7 @@ export function ProviderForm({
|
||||
resetCodexConfig(auth, config);
|
||||
|
||||
form.reset({
|
||||
name: preset.name,
|
||||
name: preset.nameKey ? t(preset.nameKey) : preset.name,
|
||||
websiteUrl: preset.websiteUrl ?? "",
|
||||
settingsConfig: JSON.stringify({ auth, config }, null, 2),
|
||||
icon: preset.icon ?? "",
|
||||
@@ -1050,7 +1050,7 @@ export function ProviderForm({
|
||||
resetGeminiConfig(env, config);
|
||||
|
||||
form.reset({
|
||||
name: preset.name,
|
||||
name: preset.nameKey ? t(preset.nameKey) : preset.name,
|
||||
websiteUrl: preset.websiteUrl ?? "",
|
||||
settingsConfig: JSON.stringify(preset.settingsConfig, null, 2),
|
||||
icon: preset.icon ?? "",
|
||||
@@ -1078,7 +1078,7 @@ export function ProviderForm({
|
||||
opencodeForm.resetOpencodeState(config);
|
||||
|
||||
form.reset({
|
||||
name: preset.name,
|
||||
name: preset.nameKey ? t(preset.nameKey) : preset.name,
|
||||
websiteUrl: preset.websiteUrl ?? "",
|
||||
settingsConfig: JSON.stringify(config, null, 2),
|
||||
icon: preset.icon ?? "",
|
||||
@@ -1105,7 +1105,7 @@ export function ProviderForm({
|
||||
|
||||
// Update form fields
|
||||
form.reset({
|
||||
name: preset.name,
|
||||
name: preset.nameKey ? t(preset.nameKey) : preset.name,
|
||||
websiteUrl: preset.websiteUrl ?? "",
|
||||
settingsConfig: JSON.stringify(config, null, 2),
|
||||
icon: preset.icon ?? "",
|
||||
@@ -1129,7 +1129,7 @@ export function ProviderForm({
|
||||
setLocalApiKeyField(preset.apiKeyField ?? "ANTHROPIC_AUTH_TOKEN");
|
||||
|
||||
form.reset({
|
||||
name: preset.name,
|
||||
name: preset.nameKey ? t(preset.nameKey) : preset.name,
|
||||
websiteUrl: preset.websiteUrl ?? "",
|
||||
settingsConfig: JSON.stringify(config, null, 2),
|
||||
icon: preset.icon ?? "",
|
||||
|
||||
@@ -159,7 +159,9 @@ export function ProviderPresetSelector({
|
||||
}
|
||||
>
|
||||
{renderPresetIcon(entry.preset)}
|
||||
{entry.preset.name}
|
||||
{entry.preset.nameKey
|
||||
? t(entry.preset.nameKey)
|
||||
: entry.preset.name}
|
||||
{isPartner && (
|
||||
<span className="absolute -top-1 -right-1 flex items-center gap-0.5 rounded-full bg-gradient-to-r from-amber-500 to-yellow-500 px-1.5 py-0.5 text-[10px] font-bold text-white shadow-md">
|
||||
<Star className="h-2.5 w-2.5 fill-current" />
|
||||
|
||||
@@ -24,6 +24,7 @@ export interface PresetTheme {
|
||||
|
||||
export interface ProviderPreset {
|
||||
name: string;
|
||||
nameKey?: string; // i18n key for localized display name
|
||||
websiteUrl: string;
|
||||
// 新增:第三方/聚合等可单独配置获取 API Key 的链接
|
||||
apiKeyUrl?: string;
|
||||
@@ -573,7 +574,8 @@ export const providerPresets: ProviderPreset[] = [
|
||||
iconColor: "#000000",
|
||||
},
|
||||
{
|
||||
name: "Ucloud",
|
||||
name: "Compshare",
|
||||
nameKey: "providerForm.presets.ucloud",
|
||||
websiteUrl: "https://www.compshare.cn",
|
||||
apiKeyUrl:
|
||||
"https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch",
|
||||
|
||||
@@ -6,6 +6,7 @@ import type { PresetTheme } from "./claudeProviderPresets";
|
||||
|
||||
export interface CodexProviderPreset {
|
||||
name: string;
|
||||
nameKey?: string; // i18n key for localized display name
|
||||
websiteUrl: string;
|
||||
// 第三方供应商可提供单独的获取 API Key 链接
|
||||
apiKeyUrl?: string;
|
||||
@@ -281,13 +282,14 @@ requires_openai_auth = true`,
|
||||
iconColor: "#000000",
|
||||
},
|
||||
{
|
||||
name: "Ucloud",
|
||||
name: "Compshare",
|
||||
nameKey: "providerForm.presets.ucloud",
|
||||
websiteUrl: "https://www.compshare.cn",
|
||||
apiKeyUrl:
|
||||
"https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch",
|
||||
auth: generateThirdPartyAuth(""),
|
||||
config: generateThirdPartyConfig(
|
||||
"ucloud",
|
||||
"compshare",
|
||||
"https://api.modelverse.cn/v1",
|
||||
"gpt-5.4",
|
||||
),
|
||||
|
||||
@@ -14,6 +14,7 @@ export interface GeminiPresetTheme {
|
||||
|
||||
export interface GeminiProviderPreset {
|
||||
name: string;
|
||||
nameKey?: string; // i18n key for localized display name
|
||||
websiteUrl: string;
|
||||
apiKeyUrl?: string;
|
||||
settingsConfig: object;
|
||||
|
||||
@@ -19,6 +19,7 @@ export interface OpenClawSuggestedDefaults {
|
||||
|
||||
export interface OpenClawProviderPreset {
|
||||
name: string;
|
||||
nameKey?: string; // i18n key for localized display name
|
||||
websiteUrl: string;
|
||||
apiKeyUrl?: string;
|
||||
/** OpenClaw settings_config structure */
|
||||
@@ -1264,7 +1265,8 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Ucloud",
|
||||
name: "Compshare",
|
||||
nameKey: "providerForm.presets.ucloud",
|
||||
websiteUrl: "https://www.compshare.cn",
|
||||
apiKeyUrl:
|
||||
"https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch",
|
||||
@@ -1295,10 +1297,10 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
},
|
||||
suggestedDefaults: {
|
||||
model: {
|
||||
primary: "ucloud/claude-opus-4-6",
|
||||
primary: "compshare/claude-opus-4-6",
|
||||
},
|
||||
modelCatalog: {
|
||||
"ucloud/claude-opus-4-6": { alias: "Opus" },
|
||||
"compshare/claude-opus-4-6": { alias: "Opus" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { PresetTheme, TemplateValueConfig } from "./claudeProviderPresets";
|
||||
|
||||
export interface OpenCodeProviderPreset {
|
||||
name: string;
|
||||
nameKey?: string; // i18n key for localized display name
|
||||
websiteUrl: string;
|
||||
apiKeyUrl?: string;
|
||||
settingsConfig: OpenCodeProviderConfig;
|
||||
|
||||
@@ -706,10 +706,13 @@
|
||||
"crazyrouter": "CrazyRouter offers an exclusive bonus for CC Switch users — 30% extra credit on your first top-up!",
|
||||
"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!",
|
||||
"ucloud": "Compshare 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",
|
||||
"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)"
|
||||
},
|
||||
"presets": {
|
||||
"ucloud": "Compshare"
|
||||
},
|
||||
"parameterConfig": "Parameter Config - {{name}} *",
|
||||
"mainModel": "Main Model (optional)",
|
||||
"mainModelPlaceholder": "e.g., GLM-4.6",
|
||||
|
||||
@@ -706,10 +706,13 @@
|
||||
"crazyrouter": "CrazyRouter は CC Switch ユーザー向けに特別ボーナスを提供しています。初回チャージで 30% の追加クレジットがもらえます!",
|
||||
"sssaicode": "SSAI Code は CC Switch ユーザー向けに特別ボーナスを提供しています。チャージごとに $10 の追加クレジットがもらえます!",
|
||||
"siliconflow": "SiliconFlow は CC Switch の公式パートナーです",
|
||||
"ucloud": "UCloud は CC Switch ユーザー向けに特別ボーナスを提供しています。このリンクから登録すると、5元のプラットフォーム体験クレジットがもらえます!",
|
||||
"ucloud": "Compshare は CC Switch ユーザー向けに特別ボーナスを提供しています。このリンクから登録すると、5元のプラットフォーム体験クレジットがもらえます!",
|
||||
"micu": "Micu は CC Switch の公式パートナーです",
|
||||
"x-code": "XCodeAPI は CC Switch ユーザー向けに特別ボーナスを提供しています。このリンクから登録すると、初回注文で 10% の追加クレジットがもらえます(管理者に連絡して受け取り)"
|
||||
},
|
||||
"presets": {
|
||||
"ucloud": "Compshare"
|
||||
},
|
||||
"parameterConfig": "パラメーター設定 - {{name}} *",
|
||||
"mainModel": "メインモデル(任意)",
|
||||
"mainModelPlaceholder": "例: GLM-4.6",
|
||||
|
||||
@@ -710,6 +710,9 @@
|
||||
"micu": "Micu 是 CC Switch 的官方合作伙伴",
|
||||
"x-code": "XCodeAPI 为CC Switch 的用户提供特别福利,使用此链接注册后首单加赠10%的额度(联系站长领取)"
|
||||
},
|
||||
"presets": {
|
||||
"ucloud": "优云智算"
|
||||
},
|
||||
"parameterConfig": "参数配置 - {{name}} *",
|
||||
"mainModel": "主模型 (可选)",
|
||||
"mainModelPlaceholder": "例如: GLM-4.6",
|
||||
|
||||
Reference in New Issue
Block a user