Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
chore: misc backend tweaks
trohitgc13a1a1f3720
diff --git a/server/config/model_registry.json b/server/config/model_registry.jsonindex aa524fbe..44d998c0 100644--- a/server/config/model_registry.json+++ b/server/config/model_registry.json@@ -1,8 +1,36 @@{- "_generated": "2026-04-15T01:33:08.748282+00:00",+ "_generated": "2026-04-16T16:16:09.948810+00:00","_source": "openrouter",- "_model_count": 344,+ "_model_count": 346,"models": {+ "anthropic/claude-opus-4.7": {+ "id": "anthropic/claude-opus-4.7",+ "name": "Anthropic: Claude Opus 4.7",+ "provider": "anthropic",+ "local_id": "claude-opus-4.7",+ "context_length": 1000000,+ "max_output_tokens": 128000,+ "input_price_per_mtok": 5.0,+ "output_price_per_mtok": 25.0,+ "supports_thinking": true,+ "thinking_type": "budget",+ "temperature_range": [+ 0.0,+ 1.0+ ],+ "is_reasoning_model": false,+ "supported_parameters": [+ "include_reasoning",+ "max_tokens",+ "reasoning",+ "response_format",+ "stop",+ "structured_outputs",+ "tool_choice",+ "tools",+ "verbosity"+ ]+ },"openrouter/elephant-alpha": {"id": "openrouter/elephant-alpha","name": "Elephant",@@ -133,9 +161,9 @@"provider": "gemini","local_id": "gemma-4-26b-a4b-it","context_length": 262144,- "max_output_tokens": 0,- "input_price_per_mtok": 0.08,- "output_price_per_mtok": 0.35,+ "max_output_tokens": 262144,+ "input_price_per_mtok": 0.07,+ "output_price_per_mtok": 0.4,"supports_thinking": false,"thinking_type": "none","temperature_range": [@@ -2136,7 +2164,6 @@"frequency_penalty","include_reasoning","logit_bias",- "logprobs","max_tokens","min_p","presence_penalty",@@ -2150,7 +2177,6 @@"tool_choice","tools","top_k",- "top_logprobs","top_p"]},@@ -4592,8 +4618,6 @@"is_reasoning_model": false,"supported_parameters": ["frequency_penalty",- "logit_bias",- "logprobs","max_tokens","presence_penalty","repetition_penalty",@@ -4605,7 +4629,6 @@"tool_choice","tools","top_k",- "top_logprobs","top_p"]},@@ -5665,7 +5688,7 @@"provider": "moonshotai","local_id": "kimi-k2","context_length": 131072,- "max_output_tokens": 131072,+ "max_output_tokens": 32768,"input_price_per_mtok": 0.57,"output_price_per_mtok": 2.3,"supports_thinking": false,@@ -6367,8 +6390,8 @@"local_id": "gemma-3n-e4b-it","context_length": 32768,"max_output_tokens": 0,- "input_price_per_mtok": 0.02,- "output_price_per_mtok": 0.04,+ "input_price_per_mtok": 0.06,+ "output_price_per_mtok": 0.12,"supports_thinking": false,"thinking_type": "none","temperature_range": [@@ -6567,6 +6590,29 @@"top_p"]},+ "meta/llama-guard-4-12b:free": {+ "id": "meta-llama/llama-guard-4-12b:free",+ "name": "Meta: Llama Guard 4 12B (free)",+ "provider": "meta",+ "local_id": "llama-guard-4-12b:free",+ "context_length": 163840,+ "max_output_tokens": 65000,+ "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": [+ "max_tokens",+ "seed",+ "temperature",+ "top_p"+ ]+ },"meta/llama-guard-4-12b": {"id": "meta-llama/llama-guard-4-12b","name": "Meta: Llama Guard 4 12B",@@ -8905,11 +8951,11 @@"top_p"]},- "inflection/inflection-3-pi": {- "id": "inflection/inflection-3-pi",- "name": "Inflection: Inflection 3 Pi",+ "inflection/inflection-3-productivity": {+ "id": "inflection/inflection-3-productivity",+ "name": "Inflection: Inflection 3 Productivity","provider": "inflection",- "local_id": "inflection-3-pi",+ "local_id": "inflection-3-productivity","context_length": 8000,"max_output_tokens": 1024,"input_price_per_mtok": 2.5,@@ -8928,11 +8974,11 @@"top_p"]},- "inflection/inflection-3-productivity": {- "id": "inflection/inflection-3-productivity",- "name": "Inflection: Inflection 3 Productivity",+ "inflection/inflection-3-pi": {+ "id": "inflection/inflection-3-pi",+ "name": "Inflection: Inflection 3 Pi","provider": "inflection",- "local_id": "inflection-3-productivity",+ "local_id": "inflection-3-pi","context_length": 8000,"max_output_tokens": 1024,"input_price_per_mtok": 2.5,@@ -8987,15 +9033,15 @@"top_p"]},- "meta/llama-3.2-1b-instruct": {- "id": "meta-llama/llama-3.2-1b-instruct",- "name": "Meta: Llama 3.2 1B Instruct",+ "meta/llama-3.2-3b-instruct:free": {+ "id": "meta-llama/llama-3.2-3b-instruct:free",+ "name": "Meta: Llama 3.2 3B Instruct (free)","provider": "meta",- "local_id": "llama-3.2-1b-instruct",- "context_length": 60000,+ "local_id": "llama-3.2-3b-instruct:free",+ "context_length": 131072,"max_output_tokens": 0,- "input_price_per_mtok": 0.027,- "output_price_per_mtok": 0.2,+ "input_price_per_mtok": 0.0,+ "output_price_per_mtok": 0.0,"supports_thinking": false,"thinking_type": "none","temperature_range": [@@ -9007,22 +9053,21 @@"frequency_penalty","max_tokens","presence_penalty",- "repetition_penalty",- "seed",+ "stop","temperature","top_k","top_p"]},- "meta/llama-3.2-11b-vision-instruct": {- "id": "meta-llama/llama-3.2-11b-vision-instruct",- "name": "Meta: Llama 3.2 11B Vision Instruct",+ "meta/llama-3.2-3b-instruct": {+ "id": "meta-llama/llama-3.2-3b-instruct",+ "name": "Meta: Llama 3.2 3B Instruct","provider": "meta",- "local_id": "llama-3.2-11b-vision-instruct",- "context_length": 131072,- "max_output_tokens": 16384,- "input_price_per_mtok": 0.245,- "output_price_per_mtok": 0.245,+ "local_id": "llama-3.2-3b-instruct",+ "context_length": 80000,+ "max_output_tokens": 0,+ "input_price_per_mtok": 0.051,+ "output_price_per_mtok": 0.34,"supports_thinking": false,"thinking_type": "none","temperature_range": [@@ -9033,26 +9078,23 @@"supported_parameters": ["frequency_penalty","max_tokens",- "min_p","presence_penalty","repetition_penalty",- "response_format","seed",- "stop","temperature","top_k","top_p"]},- "meta/llama-3.2-3b-instruct:free": {- "id": "meta-llama/llama-3.2-3b-instruct:free",- "name": "Meta: Llama 3.2 3B Instruct (free)",+ "meta/llama-3.2-1b-instruct": {+ "id": "meta-llama/llama-3.2-1b-instruct",+ "name": "Meta: Llama 3.2 1B Instruct","provider": "meta",- "local_id": "llama-3.2-3b-instruct:free",- "context_length": 131072,+ "local_id": "llama-3.2-1b-instruct",+ "context_length": 60000,"max_output_tokens": 0,- "input_price_per_mtok": 0.0,- "output_price_per_mtok": 0.0,+ "input_price_per_mtok": 0.027,+ "output_price_per_mtok": 0.2,"supports_thinking": false,"thinking_type": "none","temperature_range": [@@ -9064,21 +9106,22 @@"frequency_penalty","max_tokens","presence_penalty",- "stop",+ "repetition_penalty",+ "seed","temperature","top_k","top_p"]},- "meta/llama-3.2-3b-instruct": {- "id": "meta-llama/llama-3.2-3b-instruct",- "name": "Meta: Llama 3.2 3B Instruct",+ "meta/llama-3.2-11b-vision-instruct": {+ "id": "meta-llama/llama-3.2-11b-vision-instruct",+ "name": "Meta: Llama 3.2 11B Vision Instruct","provider": "meta",- "local_id": "llama-3.2-3b-instruct",- "context_length": 80000,- "max_output_tokens": 0,- "input_price_per_mtok": 0.051,- "output_price_per_mtok": 0.34,+ "local_id": "llama-3.2-11b-vision-instruct",+ "context_length": 131072,+ "max_output_tokens": 16384,+ "input_price_per_mtok": 0.245,+ "output_price_per_mtok": 0.245,"supports_thinking": false,"thinking_type": "none","temperature_range": [@@ -9089,9 +9132,12 @@"supported_parameters": ["frequency_penalty","max_tokens",+ "min_p","presence_penalty","repetition_penalty",+ "response_format","seed",+ "stop","temperature","top_k","top_p"@@ -9475,11 +9521,11 @@"top_p"]},- "openai/gpt-4o-mini": {- "id": "openai/gpt-4o-mini",- "name": "OpenAI: GPT-4o-mini",+ "openai/gpt-4o-mini-2024-07-18": {+ "id": "openai/gpt-4o-mini-2024-07-18",+ "name": "OpenAI: GPT-4o-mini (2024-07-18)","provider": "openai",- "local_id": "gpt-4o-mini",+ "local_id": "gpt-4o-mini-2024-07-18","context_length": 128000,"max_output_tokens": 16384,"input_price_per_mtok": 0.15,@@ -9495,7 +9541,6 @@"frequency_penalty","logit_bias","logprobs",- "max_completion_tokens","max_tokens","presence_penalty","response_format",@@ -9510,11 +9555,11 @@"web_search_options"]},- "openai/gpt-4o-mini-2024-07-18": {- "id": "openai/gpt-4o-mini-2024-07-18",- "name": "OpenAI: GPT-4o-mini (2024-07-18)",+ "openai/gpt-4o-mini": {+ "id": "openai/gpt-4o-mini",+ "name": "OpenAI: GPT-4o-mini","provider": "openai",- "local_id": "gpt-4o-mini-2024-07-18",+ "local_id": "gpt-4o-mini","context_length": 128000,"max_output_tokens": 16384,"input_price_per_mtok": 0.15,@@ -9530,6 +9575,7 @@"frequency_penalty","logit_bias","logprobs",+ "max_completion_tokens","max_tokens","presence_penalty","response_format",@@ -9631,15 +9677,15 @@"top_p"]},- "openai/gpt-4o": {- "id": "openai/gpt-4o",- "name": "OpenAI: GPT-4o",+ "openai/gpt-4o-2024-05-13": {+ "id": "openai/gpt-4o-2024-05-13",+ "name": "OpenAI: GPT-4o (2024-05-13)","provider": "openai",- "local_id": "gpt-4o",+ "local_id": "gpt-4o-2024-05-13","context_length": 128000,- "max_output_tokens": 16384,- "input_price_per_mtok": 2.5,- "output_price_per_mtok": 10.0,+ "max_output_tokens": 4096,+ "input_price_per_mtok": 5.0,+ "output_price_per_mtok": 15.0,"supports_thinking": false,"thinking_type": "none","temperature_range": [@@ -9666,15 +9712,15 @@"web_search_options"]},- "openai/gpt-4o:extended": {- "id": "openai/gpt-4o:extended",- "name": "OpenAI: GPT-4o (extended)",+ "openai/gpt-4o": {+ "id": "openai/gpt-4o",+ "name": "OpenAI: GPT-4o","provider": "openai",- "local_id": "gpt-4o:extended",+ "local_id": "gpt-4o","context_length": 128000,- "max_output_tokens": 64000,- "input_price_per_mtok": 6.0,- "output_price_per_mtok": 18.0,+ "max_output_tokens": 16384,+ "input_price_per_mtok": 2.5,+ "output_price_per_mtok": 10.0,"supports_thinking": false,"thinking_type": "none","temperature_range": [@@ -9686,6 +9732,7 @@"frequency_penalty","logit_bias","logprobs",+ "max_completion_tokens","max_tokens","presence_penalty","response_format",@@ -9700,15 +9747,15 @@"web_search_options"]},- "openai/gpt-4o-2024-05-13": {- "id": "openai/gpt-4o-2024-05-13",- "name": "OpenAI: GPT-4o (2024-05-13)",+ "openai/gpt-4o:extended": {+ "id": "openai/gpt-4o:extended",+ "name": "OpenAI: GPT-4o (extended)","provider": "openai",- "local_id": "gpt-4o-2024-05-13",+ "local_id": "gpt-4o:extended","context_length": 128000,- "max_output_tokens": 4096,- "input_price_per_mtok": 5.0,- "output_price_per_mtok": 15.0,+ "max_output_tokens": 64000,+ "input_price_per_mtok": 6.0,+ "output_price_per_mtok": 18.0,"supports_thinking": false,"thinking_type": "none","temperature_range": [@@ -9720,7 +9767,6 @@"frequency_penalty","logit_bias","logprobs",- "max_completion_tokens","max_tokens","presence_penalty","response_format",@@ -9943,15 +9989,15 @@"top_p"]},- "openai/gpt-3.5-turbo-0613": {- "id": "openai/gpt-3.5-turbo-0613",- "name": "OpenAI: GPT-3.5 Turbo (older v0613)",+ "openai/gpt-4-turbo-preview": {+ "id": "openai/gpt-4-turbo-preview",+ "name": "OpenAI: GPT-4 Turbo Preview","provider": "openai",- "local_id": "gpt-3.5-turbo-0613",- "context_length": 4095,+ "local_id": "gpt-4-turbo-preview",+ "context_length": 128000,"max_output_tokens": 4096,- "input_price_per_mtok": 1.0,- "output_price_per_mtok": 2.0,+ "input_price_per_mtok": 10.0,+ "output_price_per_mtok": 30.0,"supports_thinking": false,"thinking_type": "none","temperature_range": [@@ -9963,7 +10009,7 @@"frequency_penalty","logit_bias","logprobs",- "max_completion_tokens",+ "max_tokens","presence_penalty","response_format","seed",@@ -9976,15 +10022,15 @@"top_p"]},- "openai/gpt-4-turbo-preview": {- "id": "openai/gpt-4-turbo-preview",- "name": "OpenAI: GPT-4 Turbo Preview",+ "openai/gpt-3.5-turbo-0613": {+ "id": "openai/gpt-3.5-turbo-0613",+ "name": "OpenAI: GPT-3.5 Turbo (older v0613)","provider": "openai",- "local_id": "gpt-4-turbo-preview",- "context_length": 128000,+ "local_id": "gpt-3.5-turbo-0613",+ "context_length": 4095,"max_output_tokens": 4096,- "input_price_per_mtok": 10.0,- "output_price_per_mtok": 30.0,+ "input_price_per_mtok": 1.0,+ "output_price_per_mtok": 2.0,"supports_thinking": false,"thinking_type": "none","temperature_range": [@@ -9996,7 +10042,7 @@"frequency_penalty","logit_bias","logprobs",- "max_tokens",+ "max_completion_tokens","presence_penalty","response_format","seed",@@ -10345,11 +10391,11 @@"top_p"]},- "openai/gpt-4": {- "id": "openai/gpt-4",- "name": "OpenAI: GPT-4",+ "openai/gpt-4-0314": {+ "id": "openai/gpt-4-0314",+ "name": "OpenAI: GPT-4 (older v0314)","provider": "openai",- "local_id": "gpt-4",+ "local_id": "gpt-4-0314","context_length": 8191,"max_output_tokens": 4096,"input_price_per_mtok": 30.0,@@ -10365,7 +10411,6 @@"frequency_penalty","logit_bias","logprobs",- "max_completion_tokens","max_tokens","presence_penalty","response_format",@@ -10379,11 +10424,11 @@"top_p"]},- "openai/gpt-4-0314": {- "id": "openai/gpt-4-0314",- "name": "OpenAI: GPT-4 (older v0314)",+ "openai/gpt-4": {+ "id": "openai/gpt-4",+ "name": "OpenAI: GPT-4","provider": "openai",- "local_id": "gpt-4-0314",+ "local_id": "gpt-4","context_length": 8191,"max_output_tokens": 4096,"input_price_per_mtok": 30.0,@@ -10399,6 +10444,7 @@"frequency_penalty","logit_bias","logprobs",+ "max_completion_tokens","max_tokens","presence_penalty","response_format",diff --git a/server/nodes/browser/browser.py b/server/nodes/browser/browser.pyindex dfd4b6bd..b278c407 100644--- a/server/nodes/browser/browser.py+++ b/server/nodes/browser/browser.py@@ -143,15 +143,54 @@ def _build_args(op: str, p: Dict[str, Any]) -> List[str]:class BrowserParams(BaseModel):+ """Browser automation parameters.++ Mirrors the operation-facing surface of the agent-browser CLI. Fields+ are scoped to what the LLM needs to drive each operation; stealth and+ runtime config (headed, browser, chromeProfile, proxy, timeout, ...)+ flow through as node_params via the plugin's {**node_params, **tool_args}+ merge and are consumed by dispatch() with sensible defaults, without+ being exposed to the LLM tool schema.+ """+operation: Literal["navigate", "click", "type", "fill", "screenshot", "snapshot",- "get_text", "get_html", "eval", "wait", "scroll", "select", "batch",- ] = "navigate"- url: str = Field(default="")- selector: str = Field(default="")- text: str = Field(default="")- session: str = Field(default="")+ "get_text", "get_html", "eval", "wait", "scroll", "select",+ "console", "errors", "batch",+ ] = Field(+ default="navigate",+ description=(+ "Operation: navigate, click, type, fill, screenshot, snapshot, "+ "get_text, get_html, eval, wait, scroll, select, console, errors, batch. "+ "Typical flow: navigate -> snapshot -> interact using @eN refs -> snapshot."+ ),+ )++ url: Optional[str] = Field(default=None, description="[navigate] URL to open")+ selector: Optional[str] = Field(+ default=None,+ description="[click/type/fill/get_text/get_html/wait/select] CSS selector or @eN ref from snapshot",+ )+ text: Optional[str] = Field(default=None, description="[type] Text to type")+ value: Optional[str] = Field(+ default=None,+ description="[fill/select] Value to fill or option to select",+ )+ expression: Optional[str] = Field(default=None, description="[eval] JavaScript to execute")+ direction: Optional[str] = Field(default="down", description="[scroll] up, down, left, right")+ amount: Optional[int] = Field(default=500, description="[scroll] Pixels to scroll")+ fullPage: Optional[bool] = Field(default=False, description="[screenshot] Capture full scrollable page")++ session: Optional[str] = Field(+ default=None,+ description="Browser session name for state sharing across chained nodes (auto-derived when empty)",+ )+ # extra="allow" lets stealth and runtime config (headed, browser,+ # chromeProfile, proxy, timeout, newWindow, userAgent, autoConnect,+ # executablePath, actionDelay, annotate, screenshotFormat,+ # screenshotQuality, commands) flow through from node_params without+ # surfacing in the LLM tool schema. dispatch() reads them with defaults.model_config = ConfigDict(extra="allow")diff --git a/server/nodes/code/python_executor.py b/server/nodes/code/python_executor.pyindex 2c5f9c2f..5a832ea9 100644--- a/server/nodes/code/python_executor.py+++ b/server/nodes/code/python_executor.py@@ -25,9 +25,13 @@ class PythonExecutorNode(CodeExecutorBase):results are reachable; ``workspace_dir`` is the per-workflowscratch directory."""+ import collections+ import datetime as datetime_moduleimport ioimport json as json_moduleimport math+ import random+ import reif not params.code.strip():raise RuntimeError("No code provided")@@ -39,21 +43,25 @@ class PythonExecutorNode(CodeExecutorBase):kwargs["file"] = stdout_captureprint(*args, **kwargs)- safe_builtins = {- "abs": abs, "all": all, "any": any, "bool": bool,- "dict": dict, "enumerate": enumerate, "filter": filter,- "float": float, "int": int, "len": len, "list": list,- "map": map, "max": max, "min": min, "print": captured_print,- "range": range, "round": round, "set": set, "sorted": sorted,- "str": str, "sum": sum, "tuple": tuple, "type": type, "zip": zip,- "True": True, "False": False, "None": None,- "math": math, "json": json_module,- }+ import builtins as _builtins_module++ builtins_dict = dict(_builtins_module.__dict__)+ builtins_dict["print"] = captured_print+namespace = {- "__builtins__": safe_builtins,+ "__builtins__": builtins_dict,"input_data": input_data,"workspace_dir": ctx.workspace_dir or "","output": None,+ "math": math,+ "json": json_module,+ "datetime": datetime_module.datetime,+ "timedelta": datetime_module.timedelta,+ "collections": collections,+ "Counter": collections.Counter,+ "defaultdict": collections.defaultdict,+ "re": re,+ "random": random,}exec(params.code, namespace) # noqa: S102 — sandboxed namespacereturn {diff --git a/server/services/agents/adapters.py b/server/services/agents/adapters.pyindex 957a557c..3473cc2c 100644--- a/server/services/agents/adapters.py+++ b/server/services/agents/adapters.py@@ -91,8 +91,12 @@ class ToolAdapter:try:result = await execute_tool(tool_name, kwargs, cfg)elapsed = time.time() - t0+ if isinstance(result, dict):+ success = result.get('success', 'error' not in result)+ else:+ success = Truelogger.info("[DeepAgent] Tool done: %s (%.2fs) success=%s",- tool_name, elapsed, result.get('success', True) if isinstance(result, dict) else True)+ tool_name, elapsed, success)if tool_node_id and broadcaster:await broadcaster.update_node_status(tool_node_id, "success",