Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
fix: provider params, thinking compat, model defaults, global model label
trohitg0d85829bcc8f
diff --git a/client/src/components/ui/TopToolbar.tsx b/client/src/components/ui/TopToolbar.tsxindex acdc0e92..2b7eea0a 100644--- a/client/src/components/ui/TopToolbar.tsx+++ b/client/src/components/ui/TopToolbar.tsx@@ -428,6 +428,12 @@ const TopToolbar: React.FC<TopToolbarProps> = ({{/* Global Model Selector */}{globalModelState.providers.length > 0 && (<div style={{ display: 'flex', alignItems: 'center', gap: theme.spacing.sm }}>+ <span style={{+ fontSize: theme.fontSize.sm,+ color: theme.dracula.cyan,+ fontWeight: theme.fontWeight.semibold,+ whiteSpace: 'nowrap',+ }}>Set Global Model</span><Selectvalue={globalSelectValue}onChange={handleSelectGlobalModel}diff --git a/client/src/nodeDefinitions/aiAgentNodes.ts b/client/src/nodeDefinitions/aiAgentNodes.tsindex 418223e1..b1f4b891 100644--- a/client/src/nodeDefinitions/aiAgentNodes.ts+++ b/client/src/nodeDefinitions/aiAgentNodes.ts@@ -3,6 +3,7 @@ import {INodeTypeDescription,NodeConnectionType} from '../types/INodeProperties';+import { AI_PROVIDER_OPTIONS } from './aiModelNodes';// ============================================================================// AI AGENT AND CHAT NODES@@ -62,24 +63,7 @@ export const aiAgentNodes: Record<string, INodeTypeDescription> = {displayName: 'AI Provider',name: 'provider',type: 'options',- options: [- {- name: 'OpenAI',- value: 'openai'- },- {- name: 'Anthropic (Claude)',- value: 'anthropic'- },- {- name: 'Google (Gemini)',- value: 'gemini'- },- {- name: 'OpenRouter',- value: 'openrouter'- }- ],+ options: AI_PROVIDER_OPTIONS,default: 'openai',description: 'The AI provider to use (configure API keys in Credentials)'},@@ -228,24 +212,7 @@ export const aiAgentNodes: Record<string, INodeTypeDescription> = {displayName: 'AI Provider',name: 'provider',type: 'options',- options: [- {- name: 'OpenAI',- value: 'openai'- },- {- name: 'Anthropic (Claude)',- value: 'anthropic'- },- {- name: 'Google (Gemini)',- value: 'gemini'- },- {- name: 'OpenRouter',- value: 'openrouter'- }- ],+ options: AI_PROVIDER_OPTIONS,default: 'openai',description: 'The AI provider to use (configure API keys in Credentials)'},diff --git a/client/src/nodeDefinitions/aiModelNodes.ts b/client/src/nodeDefinitions/aiModelNodes.tsindex f31fcf94..1228fcbe 100644--- a/client/src/nodeDefinitions/aiModelNodes.ts+++ b/client/src/nodeDefinitions/aiModelNodes.ts@@ -187,7 +187,7 @@ const deepseekConfig: ChatModelConfig = {displayName: 'DeepSeek',icon: DEEPSEEK_ICON,color: dracula.cyan,- description: 'DeepSeek V3 models with Chain-of-Thought reasoning (deepseek-chat, deepseek-reasoner)',+ description: 'DeepSeek V3 models (deepseek-chat, deepseek-reasoner with always-on CoT)',models: [],parameters: [{@@ -200,7 +200,6 @@ const deepseekConfig: ChatModelConfig = {STANDARD_PARAMETERS.presencePenalty,STANDARD_PARAMETERS.timeout,STANDARD_PARAMETERS.maxRetries,- STANDARD_PARAMETERS.thinkingEnabled,]};@@ -210,7 +209,7 @@ const kimiConfig: ChatModelConfig = {displayName: 'Kimi',icon: KIMI_ICON,color: dracula.purple,- description: 'Kimi K2 models by Moonshot AI with 256K context and reasoning support',+ description: 'Kimi K2 models by Moonshot AI with 256K context (thinking on by default)',models: [],parameters: [{@@ -222,7 +221,6 @@ const kimiConfig: ChatModelConfig = {STANDARD_PARAMETERS.topP,STANDARD_PARAMETERS.timeout,STANDARD_PARAMETERS.maxRetries,- STANDARD_PARAMETERS.thinkingEnabled,]};@@ -272,5 +270,12 @@ export const AI_MODEL_PROVIDER_MAP: Record<string, string> = Object.fromEntries(ALL_CONFIGS.map(c => [`${c.providerId}ChatModel`, c.providerId]));+// AI provider options for agent node dropdowns -- derived from AI_PROVIDER_META (single source of truth)+import { AI_PROVIDER_META } from '../components/icons/AIProviderIcons';+export const AI_PROVIDER_OPTIONS = Object.entries(AI_PROVIDER_META).map(([id, meta]) => ({+ name: meta.label,+ value: id,+}));+// Export configurations and factory for external useexport { openaiConfig, claudeConfig, geminiConfig, openrouterConfig, groqConfig, cerebrasConfig, deepseekConfig, kimiConfig, mistralConfig, createBaseChatModel };diff --git a/client/src/nodeDefinitions/specializedAgentNodes.ts b/client/src/nodeDefinitions/specializedAgentNodes.tsindex 77777d9f..20583944 100644--- a/client/src/nodeDefinitions/specializedAgentNodes.ts+++ b/client/src/nodeDefinitions/specializedAgentNodes.ts@@ -5,6 +5,7 @@ import {INodeProperties} from '../types/INodeProperties';import { dracula } from '../styles/theme';+import { AI_PROVIDER_OPTIONS } from './aiModelNodes';// ============================================================================// SHARED AI AGENT INPUTS - Used by Specialized Agent Nodes@@ -64,12 +65,7 @@ export const AI_AGENT_PROPERTIES: INodeProperties[] = [displayName: 'AI Provider',name: 'provider',type: 'options',- options: [- { name: 'OpenAI', value: 'openai' },- { name: 'Anthropic (Claude)', value: 'anthropic' },- { name: 'Google (Gemini)', value: 'gemini' },- { name: 'OpenRouter', value: 'openrouter' }- ],+ options: AI_PROVIDER_OPTIONS,default: 'openai',description: 'The AI provider to use (configure API keys in Credentials)'},diff --git a/server/config/llm_defaults.json b/server/config/llm_defaults.jsonindex e8aac9e5..ebc41516 100644--- a/server/config/llm_defaults.json+++ b/server/config/llm_defaults.json@@ -173,6 +173,7 @@"models_endpoint": "https://api.deepseek.com/models","api_key_param": "api_key","max_tokens_param": "max_tokens",+ "supported_params": ["temperature", "max_tokens", "top_p", "frequency_penalty", "presence_penalty", "stop", "seed", "tools", "tool_choice", "response_format"],"max_output_tokens": {"deepseek-chat": 8192,"deepseek-reasoner": 65536,@@ -183,8 +184,7 @@"deepseek-reasoner": 131072,"_default": 131072},- "thinking_models": ["deepseek-reasoner", "deepseek-chat"],- "thinking_type": "enabled",+ "reasoning_models": ["deepseek-reasoner"],"temperature_range": [0.0, 2.0]},"kimi": {@@ -194,24 +194,19 @@"models_endpoint": "https://api.moonshot.ai/v1/models","api_key_param": "api_key","max_tokens_param": "max_tokens",+ "supported_params": ["temperature", "max_tokens", "top_p", "frequency_penalty", "presence_penalty", "stop", "seed", "tools", "tool_choice", "response_format"],+ "thinking_default_on": ["kimi-k2.5", "kimi-k2-thinking", "kimi-k2-0905-preview"],+ "fixed_temperature": {"kimi-k2.5": 0.6, "kimi-k2-thinking": 1.0, "kimi-k2-0905-preview": 0.6},"max_output_tokens": {"kimi-k2.5": 98304,"kimi-k2-thinking": 98304,- "moonshot-v1-8k": 8192,- "moonshot-v1-32k": 32768,- "moonshot-v1-128k": 131072,"_default": 8192},"context_length": {"kimi-k2.5": 262144,"kimi-k2-thinking": 262144,- "moonshot-v1-8k": 8192,- "moonshot-v1-32k": 32768,- "moonshot-v1-128k": 131072,"_default": 262144},- "thinking_models": ["kimi-k2.5", "kimi-k2-thinking"],- "thinking_type": "enabled","temperature_range": [0.0, 1.0]},"mistral": {@@ -221,21 +216,20 @@"models_endpoint": "https://api.mistral.ai/v1/models","api_key_param": "api_key","max_tokens_param": "max_tokens",+ "supported_params": ["temperature", "max_tokens", "top_p", "frequency_penalty", "presence_penalty", "stop", "seed", "tools", "tool_choice", "response_format"],"max_output_tokens": {"mistral-large-latest": 131072,"mistral-small-latest": 32768,- "codestral-latest": 32768,- "open-mistral-nemo": 131072,+ "codestral-latest": 131072,"_default": 8192},"context_length": {"mistral-large-latest": 262144,"mistral-small-latest": 32768,- "codestral-latest": 262144,- "open-mistral-nemo": 131072,+ "codestral-latest": 256000,"_default": 131072},- "temperature_range": [0.0, 1.0]+ "temperature_range": [0.0, 1.5]}}}diff --git a/server/config/model_registry.json b/server/config/model_registry.jsonindex a70ba74f..ccb1456a 100644--- a/server/config/model_registry.json+++ b/server/config/model_registry.json@@ -1,8 +1,71 @@{- "_generated": "2026-04-02T10:34:48.408712+00:00",+ "_generated": "2026-04-03T10:36:19.816708+00:00","_source": "openrouter",- "_model_count": 350,+ "_model_count": 349,"models": {+ "gemini/gemma-4-31b-it": {+ "id": "google/gemma-4-31b-it",+ "name": "Google: Gemma 4 31B",+ "provider": "gemini",+ "local_id": "gemma-4-31b-it",+ "context_length": 262144,+ "max_output_tokens": 131072,+ "input_price_per_mtok": 0.14,+ "output_price_per_mtok": 0.4,+ "supports_thinking": false,+ "thinking_type": "none",+ "temperature_range": [+ 0.0,+ 2.0+ ],+ "is_reasoning_model": false,+ "supported_parameters": [+ "frequency_penalty",+ "include_reasoning",+ "logit_bias",+ "max_tokens",+ "presence_penalty",+ "reasoning",+ "repetition_penalty",+ "response_format",+ "seed",+ "stop",+ "structured_outputs",+ "temperature",+ "top_k",+ "top_p"+ ]+ },+ "qwen/qwen3.6-plus:free": {+ "id": "qwen/qwen3.6-plus:free",+ "name": "Qwen: Qwen3.6 Plus (free)",+ "provider": "qwen",+ "local_id": "qwen3.6-plus:free",+ "context_length": 1000000,+ "max_output_tokens": 65536,+ "input_price_per_mtok": 0.0,+ "output_price_per_mtok": 0.0,+ "supports_thinking": false,+ "thinking_type": "none",+ "temperature_range": [+ 0.0,+ 2.0+ ],+ "is_reasoning_model": false,+ "supported_parameters": [+ "include_reasoning",+ "max_tokens",+ "presence_penalty",+ "reasoning",+ "response_format",+ "seed",+ "structured_outputs",+ "temperature",+ "tool_choice",+ "tools",+ "top_p"+ ]+ },"z-ai/glm-5v-turbo": {"id": "z-ai/glm-5v-turbo","name": "Z.ai: GLM 5V Turbo",@@ -36,9 +99,9 @@"provider": "arcee-ai","local_id": "trinity-large-thinking","context_length": 262144,- "max_output_tokens": 80000,- "input_price_per_mtok": 0.25,- "output_price_per_mtok": 0.9,+ "max_output_tokens": 262144,+ "input_price_per_mtok": 0.22,+ "output_price_per_mtok": 0.85,"supports_thinking": false,"thinking_type": "none","temperature_range": [@@ -47,9 +110,17 @@],"is_reasoning_model": false,"supported_parameters": [+ "frequency_penalty","include_reasoning",+ "logit_bias","max_tokens",+ "presence_penalty","reasoning",+ "repetition_penalty",+ "response_format",+ "seed",+ "stop",+ "structured_outputs","temperature","tool_choice","tools",@@ -165,36 +236,6 @@"top_p"]},- "qwen/qwen3.6-plus-preview:free": {- "id": "qwen/qwen3.6-plus-preview:free",- "name": "Qwen: Qwen3.6 Plus Preview (free)",- "provider": "qwen",- "local_id": "qwen3.6-plus-preview:free",- "context_length": 1000000,- "max_output_tokens": 32000,- "input_price_per_mtok": 0.0,- "output_price_per_mtok": 0.0,- "supports_thinking": false,- "thinking_type": "none",- "temperature_range": [- 0.0,- 2.0- ],- "is_reasoning_model": false,- "supported_parameters": [- "include_reasoning",- "max_tokens",- "presence_penalty",- "reasoning",- "response_format",- "seed",- "structured_outputs",- "temperature",- "tool_choice",- "tools",- "top_p"- ]- },"kwaipilot/kat-coder-pro-v2": {"id": "kwaipilot/kat-coder-pro-v2","name": "Kwaipilot: KAT-Coder-Pro V2",@@ -1205,10 +1246,10 @@"name": "MiniMax: MiniMax M2.5","provider": "minimax","local_id": "minimax-m2.5",- "context_length": 196600,- "max_output_tokens": 196600,+ "context_length": 196608,+ "max_output_tokens": 65536,"input_price_per_mtok": 0.118,- "output_price_per_mtok": 1.25,+ "output_price_per_mtok": 0.99,"supports_thinking": false,"thinking_type": "none","temperature_range": [@@ -1503,7 +1544,7 @@"context_length": 262144,"max_output_tokens": 262144,"input_price_per_mtok": 0.3827,- "output_price_per_mtok": 1.9092,+ "output_price_per_mtok": 1.72,"supports_thinking": false,"thinking_type": "none","temperature_range": [@@ -3269,64 +3310,6 @@"top_p"]},- "liquid/lfm2-8b-a1b": {- "id": "liquid/lfm2-8b-a1b",- "name": "LiquidAI: LFM2-8B-A1B",- "provider": "liquid",- "local_id": "lfm2-8b-a1b",- "context_length": 32768,- "max_output_tokens": 0,- "input_price_per_mtok": 0.01,- "output_price_per_mtok": 0.02,- "supports_thinking": false,- "thinking_type": "none",- "temperature_range": [- 0.0,- 2.0- ],- "is_reasoning_model": false,- "supported_parameters": [- "frequency_penalty",- "max_tokens",- "min_p",- "presence_penalty",- "repetition_penalty",- "seed",- "stop",- "temperature",- "top_k",- "top_p"- ]- },- "liquid/lfm-2.2-6b": {- "id": "liquid/lfm-2.2-6b",- "name": "LiquidAI: LFM2-2.6B",- "provider": "liquid",- "local_id": "lfm-2.2-6b",- "context_length": 32768,- "max_output_tokens": 0,- "input_price_per_mtok": 0.01,- "output_price_per_mtok": 0.02,- "supports_thinking": false,- "thinking_type": "none",- "temperature_range": [- 0.0,- 2.0- ],- "is_reasoning_model": false,- "supported_parameters": [- "frequency_penalty",- "max_tokens",- "min_p",- "presence_penalty",- "repetition_penalty",- "seed",- "stop",- "temperature",- "top_k",- "top_p"- ]- },"ibm-granite/granite-4.0-h-micro": {"id": "ibm-granite/granite-4.0-h-micro","name": "IBM: Granite 4.0 Micro",@@ -4662,8 +4645,8 @@"max_output_tokens": 7168,"input_price_per_mtok": 0.15,"output_price_per_mtok": 0.75,- "supports_thinking": false,- "thinking_type": "none",+ "supports_thinking": true,+ "thinking_type": "enabled","temperature_range": [0.0,2.0@@ -5027,6 +5010,7 @@"frequency_penalty","include_reasoning","logit_bias",+ "logprobs","max_tokens","min_p","presence_penalty",@@ -5041,6 +5025,7 @@"tool_choice","tools","top_k",+ "top_logprobs","top_p"]},@@ -7188,8 +7173,8 @@"max_output_tokens": 0,"input_price_per_mtok": 0.2,"output_price_per_mtok": 0.77,- "supports_thinking": false,- "thinking_type": "none",+ "supports_thinking": true,+ "thinking_type": "enabled","temperature_range": [0.0,2.0@@ -8401,8 +8386,8 @@"max_output_tokens": 163840,"input_price_per_mtok": 0.32,"output_price_per_mtok": 0.89,- "supports_thinking": false,- "thinking_type": "none",+ "supports_thinking": true,+ "thinking_type": "enabled","temperature_range": [0.0,2.0diff --git a/server/services/ai.py b/server/services/ai.pyindex 38943f0d..fcc23144 100644--- a/server/services/ai.py+++ b/server/services/ai.py@@ -173,6 +173,7 @@ class ProviderConfig:models_header_fn: Callable[[str], dict] # Function to create headersbase_url: str = '' # Custom base URL for OpenAI-compatible providersextra_headers: Optional[Dict[str, str]] = None # Default headers for API calls+ supported_params: Optional[List[str]] = None # API-supported params (from llm_defaults.json)@dataclass@@ -342,6 +343,7 @@ def _build_provider_configs() -> Dict[str, ProviderConfig]:models_header_fn=header_fn,base_url=prov.get('base_url', ''),extra_headers=prov.get('extra_headers'),+ supported_params=prov.get('supported_params'),)return configs@@ -1192,11 +1194,39 @@ class AIService:kwargs['base_url'] = proxy_urlkwargs[config.api_key_param] = "ollama" # Ollama-style tokenlogger.info(f"[AI] Using proxy for {provider}: {proxy_url}")- # OpenAI-compatible providers: apply base_url from config+ # OpenAI-compatible providers: apply base_url + pass only supported paramselif config.base_url and config.model_class == ChatOpenAI and provider != 'openai':kwargs['base_url'] = config.base_urlif config.extra_headers:kwargs['default_headers'] = config.extra_headers+ # LangChain ChatOpenAI converts max_tokens -> max_completion_tokens (OpenAI-specific).+ # Non-OpenAI providers reject this, so pass supported params via extra_body.+ del kwargs[config.max_tokens_param]+ extra_body: Dict[str, Any] = {'max_tokens': max_tokens}+ if config.supported_params:+ if 'temperature' not in config.supported_params:+ kwargs.pop('temperature', None)+ if 'frequency_penalty' not in config.supported_params:+ kwargs.pop('frequency_penalty', None)+ if 'presence_penalty' not in config.supported_params:+ kwargs.pop('presence_penalty', None)+ # Handle provider-specific constraints from llm_defaults.json+ prov_json = _LLM_DEFAULTS.get("providers", {}).get(provider, {})++ # Disable thinking for models that have it ON by default (e.g. kimi-k2.5)+ default_on = prov_json.get("thinking_default_on", [])+ if default_on and any(model.startswith(m) for m in default_on):+ if not (thinking and thinking.enabled):+ extra_body["thinking"] = {"type": "disabled"}++ # Apply fixed temperature per model (e.g. kimi-k2.5 requires exactly 0.6)+ fixed_temps = prov_json.get("fixed_temperature", {})+ for prefix, fixed_temp in fixed_temps.items():+ if model.startswith(prefix):+ kwargs["temperature"] = fixed_temp+ break++ kwargs['extra_body'] = extra_body# Apply thinking/reasoning configuration using model registry# The registry determines thinking_type based on model metadata@@ -1238,10 +1268,6 @@ class AIService:# Groq Qwen/QwQ: reasoning_format parameterformat_val = thinking.format if thinking.format in ('parsed', 'hidden') else 'parsed'kwargs['reasoning_format'] = format_val- elif thinking_type == 'enabled':- # DeepSeek/Kimi: toggle thinking via model_kwargs extra_body- kwargs.setdefault('model_kwargs', {})['extra_body'] = {"thinking": {"type": "enabled"}}- logger.info(f"[AI] {provider} thinking: enabled via extra_body")elif thinking_type == 'none':logger.warning(f"[AI] Model '{model}' ({provider}) may not support thinking mode")diff --git a/server/services/llm/config.py b/server/services/llm/config.pyindex 92044102..0cf020f6 100644--- a/server/services/llm/config.py+++ b/server/services/llm/config.py@@ -170,6 +170,13 @@ def resolve_temperature(params: dict, model: str, provider: str, thinking_enableif thinking_enabled and provider == "anthropic":return 1.0+ # Fixed temperature per model from llm_defaults.json (e.g. kimi-k2.5 = 0.6)+ prov_json = LLM_DEFAULTS.get("providers", {}).get(provider, {})+ fixed_temps = prov_json.get("fixed_temperature", {})+ for prefix, fixed_temp in fixed_temps.items():+ if model.startswith(prefix):+ return float(fixed_temp)+lo, hi = registry.get_temperature_range(model, provider)return max(lo, min(hi, user_temp))diff --git a/server/services/model_registry.py b/server/services/model_registry.pyindex 2b52cefb..38304c71 100644--- a/server/services/model_registry.py+++ b/server/services/model_registry.py@@ -48,8 +48,6 @@ THINKING_PATTERNS: List[Tuple[str, str, str]] = [("gemini", r"gemini-(2\.5|3)", "budget"),("groq", r"qwen3", "format"),("cerebras", r"qwen", "budget"),- ("deepseek", r"deepseek-(reasoner|chat)", "enabled"),- ("kimi", r"kimi-k2", "enabled"),]# Default temperature ranges per provider