mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-10-26 01:27:03 +08:00
feat(presets): add SoruxGPT presets
Add SoruxGPT (ai.soruxgpt.com, a New API gateway) as a regular aggregator preset for Claude Code, Codex, Gemini CLI, OpenCode, OpenClaw, Claude Desktop, Hermes and Pi. Claude Code and Gemini CLI use the native Anthropic and Gemini endpoints at the site root; Codex uses /v1 with gpt-5.6-sol. The accumulative apps and Claude Desktop speak Anthropic Messages with Claude Opus 5.5, Sonnet 5.5 and claude-haiku-4-5-20251001 (the undated Haiku id is only enabled in the default group). The four soruxgpt.com mirror nodes are listed as endpoint candidates where the preset type supports them.
This commit is contained in:
1 parent
9055dd37bc
commit
5b708ebd5e
9 files changed
+230
-2
No files matched your search
@@ -1722,4 +1722,25 @@ export const claudeDesktopProviderPresets: ClaudeDesktopProviderPreset[] = [
|
||||
icon: "aicodewith",
|
||||
iconColor: "#3A3B40",
|
||||
},
|
||||
{
|
||||
name: "SoruxGPT",
|
||||
websiteUrl: "https://ai.soruxgpt.com",
|
||||
apiKeyUrl: "https://ai.soruxgpt.com/console/token",
|
||||
category: "aggregator",
|
||||
baseUrl: "https://ai.soruxgpt.com",
|
||||
mode: "direct",
|
||||
apiFormat: "anthropic",
|
||||
modelRoutes: mappedRoutes(
|
||||
"claude-sonnet-5-5",
|
||||
"claude-opus-5-5",
|
||||
"claude-haiku-4-5-20251001",
|
||||
),
|
||||
endpointCandidates: [
|
||||
"https://ai.soruxgpt.com",
|
||||
"https://api-cf.soruxgpt.com",
|
||||
"https://api-host.soruxgpt.com",
|
||||
"https://api-node6.soruxgpt.com",
|
||||
"https://api-node3.soruxgpt.com",
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -1888,6 +1888,9 @@ export const providerPresets: ProviderPreset[] = [
|
||||
ANTHROPIC_DEFAULT_HAIKU_MODEL: "grok-4.5",
|
||||
ANTHROPIC_DEFAULT_SONNET_MODEL: "grok-4.5",
|
||||
ANTHROPIC_DEFAULT_OPUS_MODEL: "grok-4.5",
|
||||
// Claude Code falls back to 200K for non-Claude model ids; grok-4.5
|
||||
// has a 500K window (same as grok_config::DEFAULT_CONTEXT_WINDOW).
|
||||
CLAUDE_CODE_MAX_CONTEXT_TOKENS: "500000",
|
||||
},
|
||||
},
|
||||
category: "third_party",
|
||||
@@ -2121,4 +2124,23 @@ export const providerPresets: ProviderPreset[] = [
|
||||
endpointCandidates: ["https://moark.com/anthropic"],
|
||||
icon: "moark",
|
||||
},
|
||||
{
|
||||
name: "SoruxGPT",
|
||||
websiteUrl: "https://ai.soruxgpt.com",
|
||||
apiKeyUrl: "https://ai.soruxgpt.com/console/token",
|
||||
settingsConfig: {
|
||||
env: {
|
||||
ANTHROPIC_BASE_URL: "https://ai.soruxgpt.com",
|
||||
ANTHROPIC_AUTH_TOKEN: "",
|
||||
},
|
||||
},
|
||||
endpointCandidates: [
|
||||
"https://ai.soruxgpt.com",
|
||||
"https://api-cf.soruxgpt.com",
|
||||
"https://api-host.soruxgpt.com",
|
||||
"https://api-node6.soruxgpt.com",
|
||||
"https://api-node3.soruxgpt.com",
|
||||
],
|
||||
category: "aggregator",
|
||||
},
|
||||
];
|
||||
@@ -3693,4 +3693,23 @@ base_url = "https://cc-api.pipellm.ai/v1"`,
|
||||
category: "aggregator",
|
||||
icon: "moark",
|
||||
},
|
||||
{
|
||||
name: "SoruxGPT",
|
||||
websiteUrl: "https://ai.soruxgpt.com",
|
||||
apiKeyUrl: "https://ai.soruxgpt.com/console/token",
|
||||
category: "aggregator",
|
||||
auth: generateThirdPartyAuth(""),
|
||||
config: generateThirdPartyConfig(
|
||||
"soruxgpt",
|
||||
"https://ai.soruxgpt.com/v1",
|
||||
"gpt-5.6-sol",
|
||||
),
|
||||
endpointCandidates: [
|
||||
"https://ai.soruxgpt.com/v1",
|
||||
"https://api-cf.soruxgpt.com/v1",
|
||||
"https://api-host.soruxgpt.com/v1",
|
||||
"https://api-node6.soruxgpt.com/v1",
|
||||
"https://api-node3.soruxgpt.com/v1",
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -580,6 +580,28 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
icon: "aicodewith",
|
||||
iconColor: "#3A3B40",
|
||||
},
|
||||
{
|
||||
name: "SoruxGPT",
|
||||
websiteUrl: "https://ai.soruxgpt.com",
|
||||
apiKeyUrl: "https://ai.soruxgpt.com/console/token",
|
||||
settingsConfig: {
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://ai.soruxgpt.com",
|
||||
GEMINI_MODEL: "gemini-3.1-pro-preview",
|
||||
},
|
||||
},
|
||||
baseURL: "https://ai.soruxgpt.com",
|
||||
model: "gemini-3.1-pro-preview",
|
||||
description: "SoruxGPT",
|
||||
category: "aggregator",
|
||||
endpointCandidates: [
|
||||
"https://ai.soruxgpt.com",
|
||||
"https://api-cf.soruxgpt.com",
|
||||
"https://api-host.soruxgpt.com",
|
||||
"https://api-node6.soruxgpt.com",
|
||||
"https://api-node3.soruxgpt.com",
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export function getGeminiPresetByName(
|
||||
|
||||
@@ -2494,4 +2494,36 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
model: { default: "gpt-5.6-sol", provider: "aicodewith" },
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "SoruxGPT",
|
||||
websiteUrl: "https://ai.soruxgpt.com",
|
||||
apiKeyUrl: "https://ai.soruxgpt.com/console/token",
|
||||
settingsConfig: {
|
||||
name: "soruxgpt",
|
||||
base_url: "https://ai.soruxgpt.com",
|
||||
api_key: "",
|
||||
api_mode: "anthropic_messages",
|
||||
models: [
|
||||
{
|
||||
id: "claude-opus-5-5",
|
||||
name: "Claude Opus 5.5",
|
||||
context_length: 1000000,
|
||||
},
|
||||
{
|
||||
id: "claude-sonnet-5-5",
|
||||
name: "Claude Sonnet 5.5",
|
||||
context_length: 1000000,
|
||||
},
|
||||
{
|
||||
id: "claude-haiku-4-5-20251001",
|
||||
name: "Claude Haiku 4.5",
|
||||
context_length: 200000,
|
||||
},
|
||||
],
|
||||
},
|
||||
category: "aggregator",
|
||||
suggestedDefaults: {
|
||||
model: { default: "claude-opus-5-5", provider: "soruxgpt" },
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -4773,4 +4773,56 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "SoruxGPT",
|
||||
websiteUrl: "https://ai.soruxgpt.com",
|
||||
apiKeyUrl: "https://ai.soruxgpt.com/console/token",
|
||||
settingsConfig: {
|
||||
baseUrl: "https://ai.soruxgpt.com",
|
||||
apiKey: "",
|
||||
api: "anthropic-messages",
|
||||
models: [
|
||||
{
|
||||
id: "claude-opus-5-5",
|
||||
name: "Claude Opus 5.5",
|
||||
reasoning: true,
|
||||
input: ["text", "image"],
|
||||
contextWindow: 1000000,
|
||||
maxTokens: 128000,
|
||||
},
|
||||
{
|
||||
id: "claude-sonnet-5-5",
|
||||
name: "Claude Sonnet 5.5",
|
||||
reasoning: true,
|
||||
input: ["text", "image"],
|
||||
contextWindow: 1000000,
|
||||
maxTokens: 128000,
|
||||
},
|
||||
{
|
||||
id: "claude-haiku-4-5-20251001",
|
||||
name: "Claude Haiku 4.5",
|
||||
contextWindow: 200000,
|
||||
},
|
||||
],
|
||||
},
|
||||
category: "aggregator",
|
||||
templateValues: {
|
||||
apiKey: {
|
||||
label: "API Key",
|
||||
placeholder: "",
|
||||
editorValue: "",
|
||||
},
|
||||
},
|
||||
suggestedDefaults: {
|
||||
model: {
|
||||
primary: "soruxgpt/claude-opus-5-5",
|
||||
fallbacks: ["soruxgpt/claude-sonnet-5-5"],
|
||||
},
|
||||
modelCatalog: {
|
||||
"soruxgpt/claude-opus-5-5": { alias: "Opus" },
|
||||
"soruxgpt/claude-sonnet-5-5": { alias: "Sonnet" },
|
||||
"soruxgpt/claude-haiku-4-5-20251001": { alias: "Haiku" },
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -3545,4 +3545,44 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "SoruxGPT",
|
||||
websiteUrl: "https://ai.soruxgpt.com",
|
||||
apiKeyUrl: "https://ai.soruxgpt.com/console/token",
|
||||
settingsConfig: {
|
||||
npm: "@ai-sdk/anthropic",
|
||||
name: "SoruxGPT",
|
||||
options: {
|
||||
baseURL: "https://ai.soruxgpt.com/v1",
|
||||
apiKey: "",
|
||||
setCacheKey: true,
|
||||
},
|
||||
models: {
|
||||
"claude-opus-5-5": {
|
||||
name: "Claude Opus 5.5",
|
||||
reasoning: true,
|
||||
limit: { context: 1000000, output: 128000 },
|
||||
modalities: { input: ["text", "image"], output: ["text"] },
|
||||
},
|
||||
"claude-sonnet-5-5": {
|
||||
name: "Claude Sonnet 5.5",
|
||||
reasoning: true,
|
||||
limit: { context: 1000000, output: 128000 },
|
||||
modalities: { input: ["text", "image"], output: ["text"] },
|
||||
},
|
||||
"claude-haiku-4-5-20251001": {
|
||||
name: "Claude Haiku 4.5",
|
||||
reasoning: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
category: "aggregator",
|
||||
templateValues: {
|
||||
apiKey: {
|
||||
label: "API Key",
|
||||
placeholder: "",
|
||||
editorValue: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -2525,6 +2525,26 @@ const piProviderPresetDefinitions: PiProviderPreset[] = [
|
||||
category: "aggregator",
|
||||
icon: "moark",
|
||||
},
|
||||
{
|
||||
name: "SoruxGPT",
|
||||
providerKey: "cc-switch-sorux-gpt",
|
||||
websiteUrl: "https://ai.soruxgpt.com",
|
||||
apiKeyUrl: "https://ai.soruxgpt.com/console/token",
|
||||
settingsConfig: {
|
||||
name: "SoruxGPT",
|
||||
baseUrl: "https://ai.soruxgpt.com",
|
||||
api: "anthropic-messages",
|
||||
apiKey: "",
|
||||
models: [
|
||||
piModel("anthropic/claude-opus-5.5", { id: "claude-opus-5-5" }),
|
||||
piModel("anthropic/claude-sonnet-5.5", { id: "claude-sonnet-5-5" }),
|
||||
piModel("anthropic/claude-haiku-4.5", {
|
||||
id: "claude-haiku-4-5-20251001",
|
||||
}),
|
||||
],
|
||||
},
|
||||
category: "aggregator",
|
||||
},
|
||||
];
|
||||
|
||||
function materializeVerifiedThinkingProfiles(
|
||||
|
||||
@@ -226,11 +226,11 @@ describe("preset families", () => {
|
||||
expect(hits("moonshot")).toEqual([["family:kimi", []]]);
|
||||
});
|
||||
|
||||
it("merges Claude's visible presets into 74 rows", () => {
|
||||
it("merges Claude's visible presets into 75 rows", () => {
|
||||
const claudeEntries = providerPresets
|
||||
.filter((item) => !item.hidden)
|
||||
.map((item, index) => ({ id: `claude-${index}`, preset: item }));
|
||||
expect(groupPresetRows(claudeEntries)).toHaveLength(74);
|
||||
expect(groupPresetRows(claudeEntries)).toHaveLength(75);
|
||||
});
|
||||
|
||||
it("orders plans and regions as the design does where a family says so", () => {
|
||||
|
||||
Reference in new issue
Block a user