mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-29 09:37:37 +08:00
feat(presets): add OpenCode Go referral link and promo copy without partner badge
Decouple the in-app promotion banner from isPartner so a preset can show a promo phrase plus referral link without earning the paid-partner star. - ApiKeySection: gate the banner on partnerPromotionKey alone; the star is still driven solely by isPartner. This also un-suppresses the existing MiniMax cn/en promos, which already carried copy without isPartner. - OpenCode Go (claude/codex/opencode): point apiKeyUrl at the referral link and add partnerPromotionKey "opencode_go" (no isPartner set). - i18n: add the opencode_go promo string across zh/en/ja/zh-TW.
This commit is contained in:
@@ -282,7 +282,8 @@ export const providerPresets: ProviderPreset[] = [
|
||||
{
|
||||
name: "OpenCode Go",
|
||||
websiteUrl: "https://opencode.ai/go",
|
||||
apiKeyUrl: "https://opencode.ai/auth",
|
||||
apiKeyUrl: "https://opencode.ai/go?ref=2YTRG2NGTX",
|
||||
partnerPromotionKey: "opencode_go",
|
||||
settingsConfig: {
|
||||
env: {
|
||||
ANTHROPIC_BASE_URL: "https://opencode.ai/zen/go",
|
||||
|
||||
@@ -802,7 +802,8 @@ requires_openai_auth = true`,
|
||||
{
|
||||
name: "OpenCode Go",
|
||||
websiteUrl: "https://opencode.ai/go",
|
||||
apiKeyUrl: "https://opencode.ai/auth",
|
||||
apiKeyUrl: "https://opencode.ai/go?ref=2YTRG2NGTX",
|
||||
partnerPromotionKey: "opencode_go",
|
||||
auth: generateThirdPartyAuth(""),
|
||||
config: generateThirdPartyConfig(
|
||||
"opencode_go",
|
||||
|
||||
@@ -1049,7 +1049,8 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
||||
{
|
||||
name: "OpenCode Go",
|
||||
websiteUrl: "https://opencode.ai/go",
|
||||
apiKeyUrl: "https://opencode.ai/auth",
|
||||
apiKeyUrl: "https://opencode.ai/go?ref=2YTRG2NGTX",
|
||||
partnerPromotionKey: "opencode_go",
|
||||
settingsConfig: {
|
||||
npm: "@ai-sdk/openai-compatible",
|
||||
name: "OpenCode Go",
|
||||
|
||||
Reference in New Issue
Block a user