diff --git a/src/shared/models/index.ts b/src/shared/models/index.ts index 304c6909a5..564cffa006 100644 --- a/src/shared/models/index.ts +++ b/src/shared/models/index.ts @@ -27,7 +27,8 @@ export const aiProviderNameHash: Record = { [ModelProviderEnum.LMStudio]: 'LM Studio API', [ModelProviderEnum.Perplexity]: 'Perplexity API', [ModelProviderEnum.XAI]: 'xAI API', - [ModelProviderEnum.OpenRouter]: 'OpenRouter API', + [ModelProviderEnum.OpenRouter]: "OpenRouter API", + [ModelProviderEnum.Kevoryn]: "Kevoryn API", [ModelProviderEnum.Bedrock]: 'AWS Bedrock', [ModelProviderEnum.VercelAIGateway]: 'Vercel AI Gateway', [ModelProviderEnum.Custom]: 'Custom Provider', diff --git a/src/shared/providers/definitions/kevoryn.ts b/src/shared/providers/definitions/kevoryn.ts new file mode 100644 index 0000000000..fd6926d7c2 --- /dev/null +++ b/src/shared/providers/definitions/kevoryn.ts @@ -0,0 +1,141 @@ +import { ModelProviderEnum, ModelProviderType } from '../../types' +import { defineProvider } from '../registry' +import Kevoryn from './models/kevoryn' + +export const kevorynProvider = defineProvider({ + id: ModelProviderEnum.Kevoryn, + name: 'Kevoryn', + type: ModelProviderType.OpenAI, + description: 'AI API Gateway — 66+ frontier models (GPT, Claude, Gemini, DeepSeek, Kimi, Qwen) through a single endpoint.', + urls: { + website: 'https://kevoryn.com/', + docs: 'https://kevoryn.com/docs', + models: 'https://kevoryn.com/models', + }, + defaultSettings: { + apiHost: 'https://api.kevoryn.com/v1', + models: [ + { + modelId: 'claude-opus-4-8', + nickname: 'Claude Opus 4.8', + capabilities: ['tool_use', 'reasoning', 'vision'], + contextWindow: 200_000, + maxOutput: 128_000, + }, + { + modelId: 'claude-sonnet-4-6', + nickname: 'Claude Sonnet 4.6', + capabilities: ['tool_use', 'reasoning', 'vision'], + contextWindow: 200_000, + maxOutput: 64_000, + }, + { + modelId: 'claude-haiku-4-5', + nickname: 'Claude Haiku 4.5', + capabilities: ['tool_use', 'reasoning', 'vision'], + contextWindow: 200_000, + maxOutput: 8_192, + }, + { + modelId: 'gpt-5.5', + nickname: 'GPT-5.5', + capabilities: ['tool_use', 'reasoning', 'vision'], + contextWindow: 1_000_000, + maxOutput: 128_000, + }, + { + modelId: 'gpt-5.4', + nickname: 'GPT-5.4', + capabilities: ['tool_use', 'reasoning', 'vision'], + contextWindow: 1_050_000, + maxOutput: 128_000, + }, + { + modelId: 'gpt-5.4-mini', + nickname: 'GPT-5.4 Mini', + capabilities: ['tool_use', 'reasoning', 'vision'], + contextWindow: 400_000, + maxOutput: 128_000, + }, + { + modelId: 'gemini-3.1-pro-preview', + nickname: 'Gemini 3.1 Pro', + capabilities: ['tool_use', 'reasoning', 'vision'], + contextWindow: 1_048_576, + maxOutput: 65_536, + }, + { + modelId: 'deepseek-v4-pro', + nickname: 'DeepSeek V4 Pro', + capabilities: ['tool_use', 'reasoning'], + contextWindow: 163_840, + maxOutput: 163_840, + }, + { + modelId: 'deepseek-v4-flash', + nickname: 'DeepSeek V4 Flash', + capabilities: ['tool_use'], + contextWindow: 128_000, + maxOutput: 32_768, + }, + { + modelId: 'kimi-k2.6', + nickname: 'Kimi K2.6', + capabilities: ['tool_use'], + contextWindow: 131_072, + maxOutput: 32_768, + }, + { + modelId: 'qwen3.6-plus', + nickname: 'Qwen 3.6 Plus', + capabilities: ['tool_use', 'reasoning'], + contextWindow: 128_000, + maxOutput: 32_768, + }, + { + modelId: 'qwen3-coder-plus', + nickname: 'Qwen3 Coder Plus', + capabilities: ['tool_use', 'reasoning'], + contextWindow: 128_000, + maxOutput: 32_768, + }, + { + modelId: 'glm-5.1', + nickname: 'GLM 5.1', + capabilities: ['tool_use', 'reasoning'], + contextWindow: 128_000, + maxOutput: 32_768, + }, + { + modelId: 'MiniMax-M2.7', + nickname: 'MiniMax M2.7', + capabilities: ['tool_use'], + contextWindow: 1_048_576, + maxOutput: 65_536, + }, + { + modelId: 'grok-4.20', + nickname: 'Grok 4.20', + capabilities: ['tool_use', 'reasoning', 'vision'], + contextWindow: 256_000, + maxOutput: 64_000, + }, + ], + }, + createModel: (config) => { + return new Kevoryn( + { + apiKey: config.effectiveApiKey, + model: config.model, + temperature: config.settings.temperature, + topP: config.settings.topP, + maxOutputTokens: config.settings.maxTokens, + stream: config.settings.stream, + }, + config.dependencies + ) + }, + getDisplayName: (modelId, providerSettings) => { + return `Kevoryn API (${providerSettings?.models?.find((m) => m.modelId === modelId)?.nickname || modelId})` + }, +}) diff --git a/src/shared/providers/definitions/models/kevoryn.ts b/src/shared/providers/definitions/models/kevoryn.ts new file mode 100644 index 0000000000..76048eb111 --- /dev/null +++ b/src/shared/providers/definitions/models/kevoryn.ts @@ -0,0 +1,41 @@ +import OpenAICompatible, { type OpenAICompatibleSettings } from '../../../models/openai-compatible' +import type { ToolUseScope } from '../../../types' +import type { ModelDependencies } from '../../../types/adapters' + +interface Options extends OpenAICompatibleSettings {} + +export default class Kevoryn extends OpenAICompatible { + public name = 'Kevoryn' + public options: Options + constructor(options: Omit, dependencies: ModelDependencies) { + const apiHost = 'https://api.kevoryn.com/v1' + super( + { + apiKey: options.apiKey, + apiHost, + model: options.model, + temperature: options.temperature, + topP: options.topP, + maxOutputTokens: options.maxOutputTokens, + stream: options.stream, + }, + dependencies + ) + this.options = { + ...options, + apiHost, + } + } + + isSupportToolUse(_scope?: ToolUseScope) { + return true + } + + isSupportVision() { + return true + } + + isSupportReasoning() { + return true + } +} diff --git a/src/shared/providers/index.ts b/src/shared/providers/index.ts index 06742110e7..b9497bf278 100644 --- a/src/shared/providers/index.ts +++ b/src/shared/providers/index.ts @@ -16,6 +16,7 @@ import './definitions/qwen-portal' import './definitions/minimax' import './definitions/moonshot' import './definitions/siliconflow' +import './definitions/kevoryn' import './definitions/openrouter' import './definitions/ollama' import './definitions/lmstudio' diff --git a/src/shared/types/provider.ts b/src/shared/types/provider.ts index 8f12db4f03..ab01bb0538 100644 --- a/src/shared/types/provider.ts +++ b/src/shared/types/provider.ts @@ -24,7 +24,8 @@ export enum ModelProviderEnum { LMStudio = 'lm-studio', Perplexity = 'perplexity', XAI = 'xAI', - OpenRouter = 'openrouter', + OpenRouter = "openrouter", + Kevoryn = "kevoryn", Bedrock = 'bedrock', VercelAIGateway = 'vercel-ai-gateway', Custom = 'custom',