Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ enum ProviderCode: string
case Gemini = 'Gemini';
case DashScope = 'DashScope';
case OpenRouter = 'OpenRouter';
case Requesty = 'Requesty';
case SuChuang = 'SuChuang';
case Anthropic = 'Anthropic';

Expand Down
3 changes: 3 additions & 0 deletions frontend/magic-web/packages/magic-admin/src/const/aiModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export namespace AiModel {
QwenGlobal = "QwenGlobal",
/** OpenRouter */
OpenRouter = "OpenRouter",
/** Requesty */
Requesty = "Requesty",
/** 百度 */
Baidu = "Baidu",
/** 国家超算平台 */
Expand Down Expand Up @@ -93,6 +95,7 @@ export namespace AiModel {
[ServiceProvider.Gemini]: "https://api.gemini.com",
[ServiceProvider.GoogleImage]: "https://api.googleimage.com",
[ServiceProvider.OpenRouter]: "https://openrouter.ai/api/v1/chat/completions",
[ServiceProvider.Requesty]: "https://router.requesty.ai/v1/chat/completions",
[ServiceProvider.Google]: "https://generativelanguage.googleapis.com/v1beta",
[ServiceProvider.Anthropic]: "https://api.anthropic.com",
[ServiceProvider.Keling]: "https://api.klingai.com",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const serviceIconMap: Partial<Record<string, string>> = {
[AiModel.ServiceProvider.Google]: googleIcon,
[AiModel.ServiceProvider.Gemini]: googleIcon,
[AiModel.ServiceProvider.OpenRouter]: openrouterIcon,
[AiModel.ServiceProvider.Requesty]: defaultIcon,
[AiModel.ServiceProvider.MiracleVision]: miraclevisionIcon,
[AiModel.ServiceProvider.Tencent]: tencentCloudIcon,
[AiModel.ServiceProvider.TTAPI]: ttapiIcon,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"OfficialOpenAI": "Official OpenAI",
"OpenAI": "OpenAI Compatible",
"OpenRouter": "OpenRouter",
"Requesty": "Requesty",
"Volcengine": "Volcengine"
},
"subtitle": "Select and configure your AI model service provider",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"OfficialOpenAI": "OpenAI 官方",
"OpenAI": "OpenAI 兼容",
"OpenRouter": "OpenRouter",
"Requesty": "Requesty",
"Volcengine": "火山引擎"
},
"subtitle": "选择并配置您的 AI 模型服务提供商",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ const PROVIDER_CONFIGS: Record<string, ProviderConfig> = {
showApiUrl: true,
showApiKey: true,
},
Requesty: {
defaultUrl: "https://router.requesty.ai/v1",
showApiUrl: true,
showApiKey: true,
},
DashScope: {
defaultUrl: "https://dashscope.aliyuncs.com/compatible-mode/v1",
showApiUrl: true,
Expand All @@ -114,6 +119,7 @@ const PROVIDERS: Provider[] = [
{ value: "Gemini", icon: <Sparkles className="h-5 w-5" /> },
{ value: "AWSBedrock", icon: <Boxes className="h-5 w-5" /> },
{ value: "OpenRouter", icon: <Route className="h-5 w-5" /> },
{ value: "Requesty", icon: <Route className="h-5 w-5" /> },
{ value: "DashScope", icon: <CloudCog className="h-5 w-5" /> },
{ value: "Volcengine", icon: <Flame className="h-5 w-5" /> },
{ value: "DeepSeek", icon: <Search className="h-5 w-5" /> },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const PROVIDER_CODE_TO_SERVICE_PROVIDER_MAP: Partial<Record<string, AiModel.Serv
microsoftazure: AiModel.ServiceProvider.MicrosoftAzure,
azure: AiModel.ServiceProvider.MicrosoftAzure,
openrouter: AiModel.ServiceProvider.OpenRouter,
requesty: AiModel.ServiceProvider.Requesty,
deepseek: AiModel.ServiceProvider.DeepSeek,
alibabacloud: AiModel.ServiceProvider.DashScope,
dashscope: AiModel.ServiceProvider.DashScope,
Expand Down Expand Up @@ -48,6 +49,7 @@ const PROVIDER_CODE_TO_SERVICE_PROVIDER_MAP: Partial<Record<string, AiModel.Serv

const PROVIDER_URL_PLACEHOLDER_OVERRIDE_MAP: Record<string, string> = {
openrouter: "https://openrouter.ai/api/v1",
requesty: "https://router.requesty.ai/v1",
ttapi: "https://api.ttapi.io",
gemini: "https://generativelanguage.googleapis.com",
google: "https://generativelanguage.googleapis.com",
Expand All @@ -61,6 +63,7 @@ const PROVIDER_API_KEY_PLACEHOLDER_MAP: Record<string, string> = {
google: "Google API Key",
gemini: "Google API Key",
openrouter: "OpenRouter API Key",
requesty: "Requesty API Key",
alibabacloud: "Aliyun (Bailian) API Key",
dashscope: "Aliyun (Bailian) API Key",
qwen: "Aliyun (Bailian) API Key",
Expand Down