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
6 changes: 6 additions & 0 deletions constant/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ export const MODEL_PROVIDERS = [
'microsoft/phi-3-mini-128k-instruct:free'
]
},
{
id: 'requesty',
name: 'Requesty',
defaultEndpoint: 'https://router.requesty.ai/v1',
defaultModels: ['openai/gpt-4o-mini', 'openai/gpt-4o', 'anthropic/claude-sonnet-4-5', 'google/gemini-2.5-flash']
},
{
id: 'alibailian',
name: '阿里云百炼',
Expand Down
5 changes: 5 additions & 0 deletions lib/db/llm-providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ export async function getLlmProviders() {
name: 'OpenRouter',
apiUrl: 'https://openrouter.ai/api/v1/'
},
{
id: 'requesty',
name: 'Requesty',
apiUrl: 'https://router.requesty.ai/v1'
},
{
id: 'alibailian',
name: '阿里云百炼',
Expand Down
2 changes: 2 additions & 0 deletions lib/llm/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const OllamaClient = require('./providers/ollama'); // 导入 OllamaClient
const OpenAIClient = require('./providers/openai'); // 导入 OpenAIClient
const ZhiPuClient = require('./providers/zhipu'); // 导入 ZhiPuClient
const OpenRouterClient = require('./providers/openrouter');
const RequestyClient = require('./providers/requesty');
const AlibailianClient = require('./providers/alibailian'); // 导入 AlibailianClient
const MiniMaxClient = require('./providers/minimax'); // 导入 MiniMaxClient

Expand Down Expand Up @@ -123,6 +124,7 @@ class LLMClient {
deepseek: OpenAIClient,
zhipu: ZhiPuClient,
openrouter: OpenRouterClient,
requesty: RequestyClient,
alibailian: AlibailianClient,
minimax: MiniMaxClient
};
Expand Down
28 changes: 28 additions & 0 deletions lib/llm/core/providers/requesty.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { createOpenAICompatible } from '@ai-sdk/openai-compatible';

import BaseClient from './base.js';

// Requesty is an OpenAI-compatible LLM router (https://requesty.ai).
// Base URL: https://router.requesty.ai/v1 (EU: https://router.eu.requesty.ai/v1)
// Auth: Authorization: Bearer <REQUESTY_API_KEY>. Models use the provider/model
// naming convention (e.g. openai/gpt-4o-mini), same as OpenRouter.
class RequestyClient extends BaseClient {
constructor(config) {
super(config);
this.requesty = createOpenAICompatible({
name: 'requesty',
baseURL: this.endpoint,
apiKey: this.apiKey,
headers: {
'HTTP-Referer': 'https://github.com/ConardLi/easy-dataset',
'X-Title': 'Easy Dataset'
}
});
}

_getModel() {
return this.requesty(this.model);
}
}

module.exports = RequestyClient;
2 changes: 2 additions & 0 deletions lib/util/providerLogo.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const PROVIDER_LOGO_MAP = {
openrouter: '/imgs/providers/openrouter.ico',
requesty: '/imgs/providers/requesty.ico',
ollama: '/imgs/providers/ollama.png',
openai: '/imgs/providers/openai.png',
siliconcloud: '/imgs/providers/siliconflow.ico',
Expand All @@ -23,6 +24,7 @@ export function normalizeProviderId(providerId = '', providerName = '') {
const normalized = raw.replace(/[\s_-]/g, '');

if (normalized === 'openrouter' || normalized === 'openrouterai') return 'openrouter';
if (normalized === 'requesty' || normalized === 'requestyai') return 'requesty';
if (normalized === 'openai') return 'openai';
if (normalized === 'siliconflow' || normalized === 'siliconcloud') return 'siliconcloud';
if (normalized === 'zhipuai' || normalized === 'zhipu') return 'zhipu';
Expand Down
Binary file added public/imgs/providers/requesty.ico
Binary file not shown.