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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ View the code for the node.

### LLM providers

OpenAI, Anthropic (Claude), Google Gemini, Groq, xAI (Grok), OpenRouter, Ollama (local)
OpenAI, Anthropic (Claude), Google Gemini, Groq, xAI (Grok), MiniMax, OpenRouter, Ollama (local)

- API keys encrypted and stored locally via Electron `safeStorage` — never sent anywhere except the provider's own API
- Test connection button per provider
Expand Down Expand Up @@ -252,6 +252,7 @@ API keys are encrypted and stored locally using Electron's `safeStorage`. They a
| Google Gemini | [aistudio.google.com/app/apikey](https://aistudio.google.com/app/apikey) |
| Groq | [console.groq.com/keys](https://console.groq.com/keys) |
| xAI (Grok) | [console.x.ai](https://console.x.ai) |
| MiniMax | [platform.minimaxi.com](https://platform.minimaxi.com) |
| OpenRouter | [openrouter.ai/keys](https://openrouter.ai/keys) |
| Ollama (local) | No key needed — install [Ollama](https://ollama.com) and pull a model |

Expand All @@ -274,7 +275,7 @@ ComfyNodeDesigner/
│ │ ├── index.ts # Window creation and IPC registration
│ │ ├── ipc/
│ │ │ ├── fileHandlers.ts # Save/load/export/import — uses Electron dialogs + fs
│ │ │ └── llmHandlers.ts # All 7 LLM provider adapters with abort support
│ │ │ └── llmHandlers.ts # All 8 LLM provider adapters with abort support
│ │ └── generators/
│ │ ├── codeGenerator.ts # Python code generation logic
│ │ └── nodeImporter.ts # Python node pack parser (folder + file import)
Expand Down
2 changes: 2 additions & 0 deletions src/main/ipc/llmHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ function getAdapter(req: LLMGenerateRequest, apiKey: string): LLMAdapter {
return getGroqAdapter(apiKey)
case 'xai':
return getOpenAICompatibleAdapter(apiKey, req.baseUrl ?? 'https://api.x.ai/v1')
case 'minimax':
return getOpenAICompatibleAdapter(apiKey, req.baseUrl ?? 'https://api.minimax.io/v1')
case 'openrouter':
return getOpenAICompatibleAdapter(apiKey, req.baseUrl ?? 'https://openrouter.ai/api/v1')
case 'ollama':
Expand Down
10 changes: 6 additions & 4 deletions src/renderer/src/components/modals/SettingsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface SettingsModalProps {
onClose: () => void
}

const PROVIDERS: LLMProvider[] = ['openai', 'anthropic', 'google', 'groq', 'xai', 'openrouter', 'ollama']
const PROVIDERS: LLMProvider[] = ['openai', 'anthropic', 'google', 'groq', 'xai', 'minimax', 'openrouter', 'ollama']

export function SettingsModal({ open, onClose }: SettingsModalProps): JSX.Element {
const { llm, setProviderModel, setProviderBaseUrl, ollamaModels, fetchOllamaModels } = useSettingsStore()
Expand Down Expand Up @@ -152,8 +152,8 @@ export function SettingsModal({ open, onClose }: SettingsModalProps): JSX.Elemen
</div>
)}

{/* Base URL (Ollama / OpenRouter / xAI) */}
{(provider === 'ollama' || provider === 'openrouter' || provider === 'xai') && (
{/* Base URL (Ollama / OpenRouter / xAI / MiniMax) */}
{(provider === 'ollama' || provider === 'openrouter' || provider === 'xai' || provider === 'minimax') && (
<div className="space-y-1.5">
<Label className="text-xs text-slate-400">Base URL</Label>
<div className="flex gap-2">
Expand All @@ -165,7 +165,9 @@ export function SettingsModal({ open, onClose }: SettingsModalProps): JSX.Elemen
? 'http://localhost:11434'
: provider === 'openrouter'
? 'https://openrouter.ai/api/v1'
: 'https://api.x.ai/v1'
: provider === 'minimax'
? 'https://api.minimax.io/v1'
: 'https://api.x.ai/v1'
}
className="font-mono text-sm"
/>
Expand Down
10 changes: 6 additions & 4 deletions src/renderer/src/components/tabs/SettingsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '.
import { CheckCircle2, XCircle, Loader2, Eye, EyeOff, RefreshCw, X, Plus, ChevronDown, ChevronRight, Star } from 'lucide-react'
import { cn } from '../../lib/utils'

const PROVIDERS: LLMProvider[] = ['openai', 'anthropic', 'google', 'groq', 'xai', 'openrouter', 'ollama']
const PROVIDERS: LLMProvider[] = ['openai', 'anthropic', 'google', 'groq', 'xai', 'minimax', 'openrouter', 'ollama']

type SettingsSubTab = 'general' | 'color' | 'ai' | 'prompts'

Expand Down Expand Up @@ -409,8 +409,8 @@ function AIAssistantSubTab(): JSX.Element {
</div>
)}

{/* Base URL (Ollama / OpenRouter / xAI) */}
{(provider === 'ollama' || provider === 'openrouter' || provider === 'xai') && (
{/* Base URL (Ollama / OpenRouter / xAI / MiniMax) */}
{(provider === 'ollama' || provider === 'openrouter' || provider === 'xai' || provider === 'minimax') && (
<div className="space-y-1.5">
<Label className="text-xs text-slate-400">Base URL</Label>
<div className="flex gap-2">
Expand All @@ -422,7 +422,9 @@ function AIAssistantSubTab(): JSX.Element {
? 'http://localhost:11434'
: provider === 'openrouter'
? 'https://openrouter.ai/api/v1'
: 'https://api.x.ai/v1'
: provider === 'minimax'
? 'https://api.minimax.io/v1'
: 'https://api.x.ai/v1'
}
className="font-mono text-sm"
/>
Expand Down
4 changes: 4 additions & 0 deletions src/renderer/src/types/llm.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export type LLMProvider =
| 'google'
| 'groq'
| 'xai'
| 'minimax'
| 'openrouter'
| 'ollama'

Expand Down Expand Up @@ -68,6 +69,7 @@ export const DEFAULT_MODELS: Record<LLMProvider, string[]> = {
'meta-llama/llama-4-scout-17b-16e-instruct'
],
xai: ['grok-3', 'grok-3-mini', 'grok-2'],
minimax: ['MiniMax-M2.5', 'MiniMax-M2.5-highspeed'],
openrouter: ['openai/gpt-5.4', 'anthropic/claude-sonnet-4-6', 'google/gemini-3.1-pro', 'meta-llama/llama-3.3-70b-instruct'],
ollama: [] // Populated dynamically from local Ollama instance
}
Expand All @@ -78,6 +80,7 @@ export const PROVIDER_LABELS: Record<LLMProvider, string> = {
google: 'Google (Gemini)',
groq: 'Groq',
xai: 'xAI (Grok)',
minimax: 'MiniMax',
openrouter: 'OpenRouter',
ollama: 'Ollama (Local)'
}
Expand All @@ -90,6 +93,7 @@ export const DEFAULT_LLM_SETTINGS: LLMSettings = {
google: { provider: 'google', model: 'gemini-3.1-pro' },
groq: { provider: 'groq', model: 'openai/gpt-oss-120b' },
xai: { provider: 'xai', model: 'grok-3', baseUrl: 'https://api.x.ai/v1' },
minimax: { provider: 'minimax', model: 'MiniMax-M2.5', baseUrl: 'https://api.minimax.io/v1' },
openrouter: {
provider: 'openrouter',
model: 'openai/gpt-5.4',
Expand Down