mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-02 02:05:57 +08:00
feat(presets): add Code0.ai partner preset for 7 apps
Partner aggregator (New API gateway) across Claude Code, Claude Desktop, Codex, Gemini, OpenCode, OpenClaw, and Hermes. Claude Code, Claude Desktop, and Gemini use the bare host (gemini-3.1-pro-preview for Gemini); Codex, OpenCode, OpenClaw, and Hermes use /v1 with gpt-5.5. Marks isPartner with ?source=ccswitch attribution on apiKeyUrl only (website URL stays clean). Adds the partnerPromotion blurb in all four locales and a sponsor row in all four READMEs. Positioned after ClaudeAPI in the Claude Code and Claude Desktop lists (the two apps that carry a ClaudeAPI preset). Registers the favicon-derived code0.png icon via URL import; the README banner is normalized to the standard 1920x798 aspect ratio.
This commit is contained in:
@@ -791,6 +791,19 @@ export const claudeDesktopProviderPresets: ClaudeDesktopProviderPreset[] = [
|
||||
partnerPromotionKey: "claudeapi",
|
||||
icon: "claudeapi",
|
||||
},
|
||||
{
|
||||
name: "Code0",
|
||||
websiteUrl: "https://code0.ai",
|
||||
apiKeyUrl: "https://code0.ai?source=ccswitch",
|
||||
category: "aggregator",
|
||||
baseUrl: "https://code0.ai",
|
||||
mode: "direct",
|
||||
apiFormat: "anthropic",
|
||||
modelRoutes: passthroughRoutes(),
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "code0",
|
||||
icon: "code0",
|
||||
},
|
||||
{
|
||||
name: "ClaudeCN",
|
||||
websiteUrl: "https://claudecn.top",
|
||||
|
||||
@@ -861,6 +861,21 @@ export const providerPresets: ProviderPreset[] = [
|
||||
partnerPromotionKey: "claudeapi",
|
||||
icon: "claudeapi",
|
||||
},
|
||||
{
|
||||
name: "Code0",
|
||||
websiteUrl: "https://code0.ai",
|
||||
apiKeyUrl: "https://code0.ai?source=ccswitch",
|
||||
settingsConfig: {
|
||||
env: {
|
||||
ANTHROPIC_BASE_URL: "https://code0.ai",
|
||||
ANTHROPIC_AUTH_TOKEN: "",
|
||||
},
|
||||
},
|
||||
category: "aggregator",
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "code0",
|
||||
icon: "code0",
|
||||
},
|
||||
{
|
||||
name: "ClaudeCN",
|
||||
websiteUrl: "https://claudecn.top",
|
||||
|
||||
@@ -364,6 +364,18 @@ export const codexProviderPresets: CodexProviderPreset[] = [
|
||||
endpointCandidates: ["https://api.amux.ai/v1"],
|
||||
icon: "amux",
|
||||
},
|
||||
{
|
||||
name: "Code0",
|
||||
websiteUrl: "https://code0.ai",
|
||||
apiKeyUrl: "https://code0.ai?source=ccswitch",
|
||||
category: "aggregator",
|
||||
auth: generateThirdPartyAuth(""),
|
||||
config: generateThirdPartyConfig("code0", "https://code0.ai/v1", "gpt-5.5"),
|
||||
endpointCandidates: ["https://code0.ai/v1"],
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "code0",
|
||||
icon: "code0",
|
||||
},
|
||||
{
|
||||
name: "Azure OpenAI",
|
||||
websiteUrl:
|
||||
|
||||
@@ -130,6 +130,24 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
],
|
||||
icon: "qiniu",
|
||||
},
|
||||
{
|
||||
name: "Code0",
|
||||
websiteUrl: "https://code0.ai",
|
||||
apiKeyUrl: "https://code0.ai?source=ccswitch",
|
||||
settingsConfig: {
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://code0.ai",
|
||||
GEMINI_MODEL: "gemini-3.1-pro-preview",
|
||||
},
|
||||
},
|
||||
baseURL: "https://code0.ai",
|
||||
model: "gemini-3.1-pro-preview",
|
||||
description: "Code0",
|
||||
category: "aggregator",
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "code0",
|
||||
icon: "code0",
|
||||
},
|
||||
{
|
||||
name: "PackyCode",
|
||||
websiteUrl: "https://www.packyapi.com",
|
||||
|
||||
@@ -245,6 +245,25 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
model: { default: "gpt-5.5", provider: "amux" },
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Code0",
|
||||
websiteUrl: "https://code0.ai",
|
||||
apiKeyUrl: "https://code0.ai?source=ccswitch",
|
||||
settingsConfig: {
|
||||
name: "code0",
|
||||
base_url: "https://code0.ai/v1",
|
||||
api_key: "",
|
||||
api_mode: "chat_completions",
|
||||
models: [{ id: "gpt-5.5", name: "GPT-5.5" }],
|
||||
},
|
||||
category: "aggregator",
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "code0",
|
||||
icon: "code0",
|
||||
suggestedDefaults: {
|
||||
model: { default: "gpt-5.5", provider: "code0" },
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "火山Agentplan",
|
||||
websiteUrl: "https://www.volcengine.com/product/ark",
|
||||
|
||||
@@ -508,6 +508,42 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Code0",
|
||||
websiteUrl: "https://code0.ai",
|
||||
apiKeyUrl: "https://code0.ai?source=ccswitch",
|
||||
settingsConfig: {
|
||||
baseUrl: "https://code0.ai/v1",
|
||||
apiKey: "",
|
||||
api: "openai-completions",
|
||||
models: [
|
||||
{
|
||||
id: "gpt-5.5",
|
||||
name: "GPT-5.5",
|
||||
contextWindow: 400000,
|
||||
},
|
||||
],
|
||||
},
|
||||
category: "aggregator",
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "code0",
|
||||
icon: "code0",
|
||||
templateValues: {
|
||||
apiKey: {
|
||||
label: "API Key",
|
||||
placeholder: "",
|
||||
editorValue: "",
|
||||
},
|
||||
},
|
||||
suggestedDefaults: {
|
||||
model: {
|
||||
primary: "code0/gpt-5.5",
|
||||
},
|
||||
modelCatalog: {
|
||||
"code0/gpt-5.5": { alias: "GPT-5.5" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Unity2.ai",
|
||||
websiteUrl: "https://unity2.ai",
|
||||
|
||||
@@ -450,6 +450,34 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Code0",
|
||||
websiteUrl: "https://code0.ai",
|
||||
apiKeyUrl: "https://code0.ai?source=ccswitch",
|
||||
settingsConfig: {
|
||||
npm: "@ai-sdk/openai-compatible",
|
||||
name: "Code0",
|
||||
options: {
|
||||
baseURL: "https://code0.ai/v1",
|
||||
apiKey: "",
|
||||
setCacheKey: true,
|
||||
},
|
||||
models: {
|
||||
"gpt-5.5": { name: "GPT-5.5" },
|
||||
},
|
||||
},
|
||||
category: "aggregator",
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "code0",
|
||||
icon: "code0",
|
||||
templateValues: {
|
||||
apiKey: {
|
||||
label: "API Key",
|
||||
placeholder: "",
|
||||
editorValue: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "火山Agentplan",
|
||||
websiteUrl: "https://www.volcengine.com/product/ark",
|
||||
|
||||
Reference in New Issue
Block a user