mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-29 01:25:33 +08:00
feat(providers): add AICodeMirror partner preset for all apps
Register AICodeMirror icon, add i18n partner promotion texts (zh/en/ja), and fix trailing whitespace in codexProviderPresets.
This commit is contained in:
@@ -466,6 +466,26 @@ export const providerPresets: ProviderPreset[] = [
|
||||
icon: "rc",
|
||||
iconColor: "#E96B2C",
|
||||
},
|
||||
{
|
||||
name: "AICodeMirror",
|
||||
websiteUrl: "https://www.aicodemirror.com",
|
||||
apiKeyUrl: "https://www.aicodemirror.com/register?invitecode=9915W3",
|
||||
settingsConfig: {
|
||||
env: {
|
||||
ANTHROPIC_BASE_URL: "https://api.aicodemirror.com/api/claudecode",
|
||||
ANTHROPIC_AUTH_TOKEN: "",
|
||||
},
|
||||
},
|
||||
endpointCandidates: [
|
||||
"https://api.aicodemirror.com/api/claudecode",
|
||||
"https://api.claudecode.net.cn/api/claudecode",
|
||||
],
|
||||
category: "third_party",
|
||||
isPartner: true, // 合作伙伴
|
||||
partnerPromotionKey: "aicodemirror", // 促销信息 i18n key
|
||||
icon: "aicodemirror",
|
||||
iconColor: "#000000",
|
||||
},
|
||||
{
|
||||
name: "OpenRouter",
|
||||
websiteUrl: "https://openrouter.ai",
|
||||
|
||||
@@ -208,6 +208,25 @@ requires_openai_auth = true`,
|
||||
icon: "rc",
|
||||
iconColor: "#E96B2C",
|
||||
},
|
||||
{
|
||||
name: "AICodeMirror",
|
||||
websiteUrl: "https://www.aicodemirror.com",
|
||||
apiKeyUrl: "https://www.aicodemirror.com/register?invitecode=9915W3",
|
||||
auth: generateThirdPartyAuth(""),
|
||||
config: generateThirdPartyConfig(
|
||||
"aicodemirror",
|
||||
"https://api.aicodemirror.com/api/codex/backend-api/codex",
|
||||
"gpt-5.2",
|
||||
),
|
||||
endpointCandidates: [
|
||||
"https://api.aicodemirror.com/api/codex/backend-api/codex",
|
||||
"https://api.claudecode.net.cn/api/codex/backend-api/codex",
|
||||
],
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "aicodemirror",
|
||||
icon: "aicodemirror",
|
||||
iconColor: "#000000",
|
||||
},
|
||||
{
|
||||
name: "OpenRouter",
|
||||
websiteUrl: "https://openrouter.ai",
|
||||
|
||||
@@ -116,6 +116,29 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
icon: "aigocode",
|
||||
iconColor: "#5B7FFF",
|
||||
},
|
||||
{
|
||||
name: "AICodeMirror",
|
||||
websiteUrl: "https://www.aicodemirror.com",
|
||||
apiKeyUrl: "https://www.aicodemirror.com/register?invitecode=9915W3",
|
||||
settingsConfig: {
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://api.aicodemirror.com/api/gemini",
|
||||
GEMINI_MODEL: "gemini-3-pro",
|
||||
},
|
||||
},
|
||||
baseURL: "https://api.aicodemirror.com/api/gemini",
|
||||
model: "gemini-3-pro",
|
||||
description: "AICodeMirror",
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "aicodemirror",
|
||||
endpointCandidates: [
|
||||
"https://api.aicodemirror.com/api/gemini",
|
||||
"https://api.claudecode.net.cn/api/gemini",
|
||||
],
|
||||
icon: "aicodemirror",
|
||||
iconColor: "#000000",
|
||||
},
|
||||
{
|
||||
name: "OpenRouter",
|
||||
websiteUrl: "https://openrouter.ai",
|
||||
|
||||
@@ -701,6 +701,35 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "AICodeMirror",
|
||||
websiteUrl: "https://www.aicodemirror.com",
|
||||
apiKeyUrl: "https://www.aicodemirror.com/register?invitecode=9915W3",
|
||||
settingsConfig: {
|
||||
npm: "@ai-sdk/anthropic",
|
||||
name: "AICodeMirror",
|
||||
options: {
|
||||
baseURL: "https://api.aicodemirror.com/api/claudecode",
|
||||
apiKey: "",
|
||||
},
|
||||
models: {
|
||||
"claude-sonnet-4.5": { name: "Claude Sonnet 4.5" },
|
||||
"claude-opus-4.5": { name: "Claude Opus 4.5" },
|
||||
},
|
||||
},
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "aicodemirror",
|
||||
icon: "aicodemirror",
|
||||
iconColor: "#000000",
|
||||
templateValues: {
|
||||
apiKey: {
|
||||
label: "API Key",
|
||||
placeholder: "",
|
||||
editorValue: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// ========== 自定义模板 ==========
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user