mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-04 11:43:57 +08:00
feat: add CherryIN preset provider for Claude Code and Codex (#3643)
* feat: add CherryIN preset provider for Claude Code and Codex CherryIN (open.cherryin.net) is an API aggregator gateway. Add it as a quick-config preset for both Claude Code (Anthropic format) and Codex (OpenAI-compatible), placed next to AiHubMix, with the official brand icon. Endpoints and model IDs verified against CherryIN's live pricing API. * feat: add CherryIN preset to Gemini, Claude Desktop, OpenCode, OpenClaw, Hermes Extend CherryIN coverage to all remaining apps, each placed next to AiHubMix. Anthropic-native (open.cherryin.net) for Claude Desktop/OpenClaw/Hermes, @ai-sdk/anthropic (/v1) for OpenCode, Gemini-compatible endpoint for Gemini CLI. Model IDs verified against CherryIN's live pricing API.
This commit is contained in:
@@ -529,6 +529,22 @@ export const claudeDesktopProviderPresets: ClaudeDesktopProviderPreset[] = [
|
|||||||
icon: "aihubmix",
|
icon: "aihubmix",
|
||||||
iconColor: "#006FFB",
|
iconColor: "#006FFB",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "CherryIN",
|
||||||
|
websiteUrl: "https://open.cherryin.ai",
|
||||||
|
apiKeyUrl: "https://open.cherryin.ai/console/token",
|
||||||
|
category: "aggregator",
|
||||||
|
baseUrl: "https://open.cherryin.net",
|
||||||
|
mode: "direct",
|
||||||
|
apiFormat: "anthropic",
|
||||||
|
modelRoutes: mappedRoutes(
|
||||||
|
"anthropic/claude-sonnet-4.6",
|
||||||
|
"anthropic/claude-opus-4.8",
|
||||||
|
"anthropic/claude-haiku-4.5",
|
||||||
|
),
|
||||||
|
endpointCandidates: ["https://open.cherryin.net"],
|
||||||
|
icon: "cherryin",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "SiliconFlow",
|
name: "SiliconFlow",
|
||||||
websiteUrl: "https://siliconflow.cn",
|
websiteUrl: "https://siliconflow.cn",
|
||||||
|
|||||||
@@ -551,6 +551,24 @@ export const providerPresets: ProviderPreset[] = [
|
|||||||
icon: "aihubmix",
|
icon: "aihubmix",
|
||||||
iconColor: "#006FFB",
|
iconColor: "#006FFB",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "CherryIN",
|
||||||
|
websiteUrl: "https://open.cherryin.ai",
|
||||||
|
apiKeyUrl: "https://open.cherryin.ai/console/token",
|
||||||
|
settingsConfig: {
|
||||||
|
env: {
|
||||||
|
ANTHROPIC_BASE_URL: "https://open.cherryin.net",
|
||||||
|
ANTHROPIC_AUTH_TOKEN: "",
|
||||||
|
ANTHROPIC_MODEL: "anthropic/claude-sonnet-4.6",
|
||||||
|
ANTHROPIC_DEFAULT_HAIKU_MODEL: "anthropic/claude-haiku-4.5",
|
||||||
|
ANTHROPIC_DEFAULT_SONNET_MODEL: "anthropic/claude-sonnet-4.6",
|
||||||
|
ANTHROPIC_DEFAULT_OPUS_MODEL: "anthropic/claude-opus-4.8",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
category: "aggregator",
|
||||||
|
endpointCandidates: ["https://open.cherryin.net"],
|
||||||
|
icon: "cherryin",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "SiliconFlow",
|
name: "SiliconFlow",
|
||||||
websiteUrl: "https://siliconflow.cn",
|
websiteUrl: "https://siliconflow.cn",
|
||||||
|
|||||||
@@ -799,6 +799,20 @@ requires_openai_auth = true`,
|
|||||||
"https://api.aihubmix.com/v1",
|
"https://api.aihubmix.com/v1",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "CherryIN",
|
||||||
|
websiteUrl: "https://open.cherryin.ai",
|
||||||
|
apiKeyUrl: "https://open.cherryin.ai/console/token",
|
||||||
|
auth: generateThirdPartyAuth(""),
|
||||||
|
config: generateThirdPartyConfig(
|
||||||
|
"cherryin",
|
||||||
|
"https://open.cherryin.net/v1",
|
||||||
|
"openai/gpt-5.5",
|
||||||
|
),
|
||||||
|
endpointCandidates: ["https://open.cherryin.net/v1"],
|
||||||
|
category: "aggregator",
|
||||||
|
icon: "cherryin",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "DMXAPI",
|
name: "DMXAPI",
|
||||||
websiteUrl: "https://www.dmxapi.cn",
|
websiteUrl: "https://www.dmxapi.cn",
|
||||||
|
|||||||
@@ -337,6 +337,24 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
|||||||
endpointCandidates: ["https://api.lemondata.cc"],
|
endpointCandidates: ["https://api.lemondata.cc"],
|
||||||
icon: "lemondata",
|
icon: "lemondata",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "CherryIN",
|
||||||
|
websiteUrl: "https://open.cherryin.ai",
|
||||||
|
apiKeyUrl: "https://open.cherryin.ai/console/token",
|
||||||
|
settingsConfig: {
|
||||||
|
env: {
|
||||||
|
GOOGLE_GEMINI_BASE_URL: "https://open.cherryin.net",
|
||||||
|
GEMINI_API_KEY: "",
|
||||||
|
GEMINI_MODEL: "google/gemini-3.5-flash",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
baseURL: "https://open.cherryin.net",
|
||||||
|
model: "google/gemini-3.5-flash",
|
||||||
|
description: "CherryIN",
|
||||||
|
category: "aggregator",
|
||||||
|
endpointCandidates: ["https://open.cherryin.net"],
|
||||||
|
icon: "cherryin",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "OpenRouter",
|
name: "OpenRouter",
|
||||||
websiteUrl: "https://openrouter.ai",
|
websiteUrl: "https://openrouter.ai",
|
||||||
|
|||||||
@@ -654,6 +654,26 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
|||||||
model: { default: "gpt-5.5", provider: "aihubmix" },
|
model: { default: "gpt-5.5", provider: "aihubmix" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "CherryIN",
|
||||||
|
websiteUrl: "https://open.cherryin.ai",
|
||||||
|
apiKeyUrl: "https://open.cherryin.ai/console/token",
|
||||||
|
settingsConfig: {
|
||||||
|
name: "cherryin",
|
||||||
|
base_url: "https://open.cherryin.net",
|
||||||
|
api_key: "",
|
||||||
|
api_mode: "anthropic_messages",
|
||||||
|
models: [
|
||||||
|
{ id: "anthropic/claude-opus-4.8", name: "Claude Opus 4.8" },
|
||||||
|
{ id: "anthropic/claude-sonnet-4.6", name: "Claude Sonnet 4.6" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
category: "aggregator",
|
||||||
|
icon: "cherryin",
|
||||||
|
suggestedDefaults: {
|
||||||
|
model: { default: "anthropic/claude-opus-4.8", provider: "cherryin" },
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "SiliconFlow",
|
name: "SiliconFlow",
|
||||||
websiteUrl: "https://siliconflow.cn",
|
websiteUrl: "https://siliconflow.cn",
|
||||||
|
|||||||
@@ -900,6 +900,47 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "CherryIN",
|
||||||
|
websiteUrl: "https://open.cherryin.ai",
|
||||||
|
apiKeyUrl: "https://open.cherryin.ai/console/token",
|
||||||
|
settingsConfig: {
|
||||||
|
baseUrl: "https://open.cherryin.net",
|
||||||
|
apiKey: "",
|
||||||
|
api: "anthropic-messages",
|
||||||
|
models: [
|
||||||
|
{
|
||||||
|
id: "anthropic/claude-opus-4.8",
|
||||||
|
name: "Claude Opus 4.8",
|
||||||
|
contextWindow: 1000000,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "anthropic/claude-sonnet-4.6",
|
||||||
|
name: "Claude Sonnet 4.6",
|
||||||
|
contextWindow: 1000000,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
category: "aggregator",
|
||||||
|
icon: "cherryin",
|
||||||
|
templateValues: {
|
||||||
|
apiKey: {
|
||||||
|
label: "API Key",
|
||||||
|
placeholder: "",
|
||||||
|
editorValue: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
suggestedDefaults: {
|
||||||
|
model: {
|
||||||
|
primary: "cherryin/anthropic/claude-opus-4.8",
|
||||||
|
fallbacks: ["cherryin/anthropic/claude-sonnet-4.6"],
|
||||||
|
},
|
||||||
|
modelCatalog: {
|
||||||
|
"cherryin/anthropic/claude-opus-4.8": { alias: "Opus" },
|
||||||
|
"cherryin/anthropic/claude-sonnet-4.6": { alias: "Sonnet" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "DMXAPI",
|
name: "DMXAPI",
|
||||||
websiteUrl: "https://www.dmxapi.cn",
|
websiteUrl: "https://www.dmxapi.cn",
|
||||||
|
|||||||
@@ -989,6 +989,33 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "CherryIN",
|
||||||
|
websiteUrl: "https://open.cherryin.ai",
|
||||||
|
apiKeyUrl: "https://open.cherryin.ai/console/token",
|
||||||
|
settingsConfig: {
|
||||||
|
npm: "@ai-sdk/anthropic",
|
||||||
|
name: "CherryIN",
|
||||||
|
options: {
|
||||||
|
baseURL: "https://open.cherryin.net/v1",
|
||||||
|
apiKey: "",
|
||||||
|
setCacheKey: true,
|
||||||
|
},
|
||||||
|
models: {
|
||||||
|
"anthropic/claude-sonnet-4.6": { name: "Claude Sonnet 4.6" },
|
||||||
|
"anthropic/claude-opus-4.8": { name: "Claude Opus 4.8" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
category: "aggregator",
|
||||||
|
icon: "cherryin",
|
||||||
|
templateValues: {
|
||||||
|
apiKey: {
|
||||||
|
label: "API Key",
|
||||||
|
placeholder: "",
|
||||||
|
editorValue: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "DMXAPI",
|
name: "DMXAPI",
|
||||||
websiteUrl: "https://www.dmxapi.cn",
|
websiteUrl: "https://www.dmxapi.cn",
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -7,6 +7,7 @@ import _atlascloud from "./atlascloud_icon.png";
|
|||||||
import _claudeapi from "./ClaudeApi.png";
|
import _claudeapi from "./ClaudeApi.png";
|
||||||
import _byteplus from "./byteplus.png";
|
import _byteplus from "./byteplus.png";
|
||||||
import _claudecn from "./claudecn.png";
|
import _claudecn from "./claudecn.png";
|
||||||
|
import _cherryin from "./cherryin.png";
|
||||||
import _eflowcode from "./eflowcode.png";
|
import _eflowcode from "./eflowcode.png";
|
||||||
import _hermes from "./hermes.png";
|
import _hermes from "./hermes.png";
|
||||||
import _huoshan from "./huoshan.png";
|
import _huoshan from "./huoshan.png";
|
||||||
@@ -98,6 +99,7 @@ export const iconUrls: Record<string, string> = {
|
|||||||
byteplus: _byteplus,
|
byteplus: _byteplus,
|
||||||
claudeapi: _claudeapi,
|
claudeapi: _claudeapi,
|
||||||
claudecn: _claudecn,
|
claudecn: _claudecn,
|
||||||
|
cherryin: _cherryin,
|
||||||
eflowcode: _eflowcode,
|
eflowcode: _eflowcode,
|
||||||
hermes: _hermes,
|
hermes: _hermes,
|
||||||
huoshan: _huoshan,
|
huoshan: _huoshan,
|
||||||
|
|||||||
@@ -147,6 +147,21 @@ export const iconMetadata: Record<string, IconMetadata> = {
|
|||||||
keywords: ["anthropic"],
|
keywords: ["anthropic"],
|
||||||
defaultColor: "#D4915D",
|
defaultColor: "#D4915D",
|
||||||
},
|
},
|
||||||
|
cherryin: {
|
||||||
|
name: "cherryin",
|
||||||
|
displayName: "CherryIN",
|
||||||
|
category: "ai-provider",
|
||||||
|
keywords: [
|
||||||
|
"cherryin",
|
||||||
|
"cherry",
|
||||||
|
"gateway",
|
||||||
|
"relay",
|
||||||
|
"newapi",
|
||||||
|
"claude",
|
||||||
|
"codex",
|
||||||
|
],
|
||||||
|
defaultColor: "#FB6354",
|
||||||
|
},
|
||||||
claudeapi: {
|
claudeapi: {
|
||||||
name: "claudeapi",
|
name: "claudeapi",
|
||||||
displayName: "ClaudeAPI",
|
displayName: "ClaudeAPI",
|
||||||
|
|||||||
Reference in New Issue
Block a user