Skip to content

The agent that grows with you

fix(dashboard,desktop): surface plugin-registered auxiliary tasks in Models settings

thanhan-a1756afae600ee8
diff --git a/apps/desktop/src/app/settings/model-settings.test.tsx b/apps/desktop/src/app/settings/model-settings.test.tsx
index ce5f7546f33..67480a07b90 100644
--- a/apps/desktop/src/app/settings/model-settings.test.tsx
+++ b/apps/desktop/src/app/settings/model-settings.test.tsx
@@ -352,6 +352,35 @@ describe('ModelSettings', () => {
expect(screen.queryByRole('switch')).toBeNull()
})
+ it('renders plugin-registered auxiliary tasks after the built-ins with the server label (#40880)', async () => {
+ getAuxiliaryModels.mockResolvedValueOnce({
+ main: { provider: 'nous', model: 'hermes-4' },
+ tasks: [
+ { task: 'vision', provider: 'auto', model: '', base_url: '' },
+ {
+ task: 'grill_tab',
+ provider: 'openrouter',
+ model: 'openai/gpt-5-mini',
+ base_url: '',
+ label: 'Grill Tab',
+ hint: 'Tab-to-grill questions and brief synthesis',
+ plugin: 'grill-tab'
+ }
+ ]
+ })
+ await renderModelSettings()
+
+ const pluginRow = await screen.findByText('Grill Tab')
+ expect(pluginRow).toBeTruthy()
+ expect(screen.getByText('Tab-to-grill questions and brief synthesis')).toBeTruthy()
+ // Server-declared label is used for the plugin row only; built-ins keep i18n labels.
+ expect(screen.getByText('Vision')).toBeTruthy()
+ // Built-ins render first; the plugin row is appended.
+ const vision = document.getElementById('aux-task-vision')
+ const grill = document.getElementById('aux-task-grill_tab')
+ expect(vision && grill && vision.compareDocumentPosition(grill) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy()
+ })
+
it('edits auxiliary reasoning effort and applies it with the assignment', async () => {
getAuxiliaryModels.mockResolvedValueOnce({
main: { provider: 'nous', model: 'hermes-4' },
diff --git a/apps/desktop/src/app/settings/model-settings.tsx b/apps/desktop/src/app/settings/model-settings.tsx
index c0ae7bf5138..274082d8a3c 100644
--- a/apps/desktop/src/app/settings/model-settings.tsx
+++ b/apps/desktop/src/app/settings/model-settings.tsx
@@ -95,11 +95,15 @@ function isProviderReady(p?: ModelOptionProvider): boolean {
return !!p && (p.authenticated !== false || (p.models?.length ?? 0) > 0)
}
-// Mirrors `_AUX_TASK_SLOTS` in hermes_cli/web_server.py. Friendly labels and
-// hints make the assignments readable; raw task keys (vision, mcp, …) are
-// opaque to most users.
+// Built-in auxiliary tasks, in the order `_AUX_TASK_SLOTS` (hermes_cli/web_server_config.py)
+// serves them. Friendly labels and hints come from i18n `m.tasks`; raw task keys (vision,
+// mcp, …) are opaque to most users. Plugin-registered tasks are not listed here: the backend
+// appends them to `/api/model/auxiliary` with their own `label`/`hint` (see `auxTaskRows`).
interface AuxTaskMeta {
key: string
+ /** Server-declared copy for a plugin task; built-ins resolve through i18n instead. */
+ label?: string
+ hint?: string
}
const AUX_TASKS: readonly AuxTaskMeta[] = [
@@ -118,6 +122,20 @@ const AUX_TASKS: readonly AuxTaskMeta[] = [
{ key: 'curator' }
]
+// Rows to render: the built-ins above, then every task the backend reported that is not a
+// built-in — i.e. plugin-registered auxiliary tasks (PluginContext.register_auxiliary_task),
+// which arrive with the plugin's own label/hint. Older backends never send extra rows, so
+// this is a no-op against them. Built-ins stay first so the layout is stable across profiles.
+export function auxTaskRows(tasks: readonly AuxiliaryTaskAssignment[] | undefined): AuxTaskMeta[] {
+ const builtin = new Set(AUX_TASKS.map(meta => meta.key))
+
+ const extra = (tasks ?? [])
+ .filter(entry => !builtin.has(entry.task))
+ .map(entry => ({ key: entry.task, label: entry.label || entry.task, hint: entry.hint || '' }))
+
+ return extra.length ? [...AUX_TASKS, ...extra] : [...AUX_TASKS]
+}
+
const NO_PROVIDERS: readonly ModelOptionProvider[] = [{ name: '—', slug: '', models: [] }]
// A slot is complete when both halves are chosen. Changing a slot's provider
@@ -277,7 +295,7 @@ export function ModelSettings({ onMainModelChanged, scopeProfile, subpage }: Mod
useDeepLinkHighlight({
elementId: task => `aux-task-${task}`,
param: 'aux',
- ready: task => showAuxiliary && !loading && AUX_TASKS.some(meta => meta.key === task)
+ ready: task => showAuxiliary && !loading && auxTaskRows(auxiliary?.tasks).some(meta => meta.key === task)
})
// Every profile-scoped async here captures this and bails before writing back,
@@ -585,7 +603,12 @@ export function ModelSettings({ onMainModelChanged, scopeProfile, subpage }: Mod
[m.loadFailed, scopeProfile, setCaughtError]
)
- const auxiliaryTaskLabel = useCallback((key: string) => m.tasks[key]?.label ?? key, [m.tasks])
+ const auxRows = useMemo(() => auxTaskRows(auxiliary?.tasks), [auxiliary])
+
+ const auxiliaryTaskLabel = useCallback(
+ (key: string) => m.tasks[key]?.label ?? auxRows.find(meta => meta.key === key)?.label ?? key,
+ [m.tasks, auxRows]
+ )
const persistentStaleAux = useMemo<StaleAuxAssignment[]>(
() => staleAuxAssignments(auxiliary?.tasks ?? [], mainModel?.provider ?? ''),
@@ -1119,8 +1142,8 @@ export function ModelSettings({ onMainModelChanged, scopeProfile, subpage }: Mod
</div>
)}
<div className="grid gap-1">
- {AUX_TASKS.map(meta => {
- const copy = m.tasks[meta.key] ?? { label: meta.key, hint: meta.key }
+ {auxRows.map(meta => {
+ const copy = m.tasks[meta.key] ?? { label: meta.label ?? meta.key, hint: meta.hint ?? meta.key }
const current = auxiliary?.tasks.find(entry => entry.task === meta.key)
const isAuto = !current || !current.provider || current.provider === 'auto'
const isEditing = editingAuxTask === meta.key
diff --git a/apps/desktop/src/types/hermes.ts b/apps/desktop/src/types/hermes.ts
index 53149bcb5c2..7cc27e1d83b 100644
--- a/apps/desktop/src/types/hermes.ts
+++ b/apps/desktop/src/types/hermes.ts
@@ -1594,6 +1594,12 @@ export interface AuxiliaryTaskAssignment {
* means the task inherits the main agent's effort. */
reasoning_effort?: null | string
task: string
+ /** Set only on plugin-registered tasks (PluginContext.register_auxiliary_task):
+ * the plugin's display name / description / owning plugin id. Built-in tasks
+ * are labelled client-side via i18n. Absent on older backends. */
+ label?: string
+ hint?: string
+ plugin?: string
}
export interface AuxiliaryModelsResponse {
diff --git a/hermes_cli/web_routers/models.py b/hermes_cli/web_routers/models.py
index 52360666750..136bc9ce66e 100644
--- a/hermes_cli/web_routers/models.py
+++ b/hermes_cli/web_routers/models.py
@@ -14,7 +14,7 @@ from fastapi import APIRouter, HTTPException
from hermes_cli.web_deps import LateState, late
from hermes_cli.web_server_config import (
_AUX_TASK_SLOTS, _UNSET, _apply_model_assignment_sync, _dashboard_code_skew_guard,
- _prepare_main_assignment,
+ _plugin_aux_tasks, _prepare_main_assignment,
)
from agent.model_metadata import is_local_endpoint
from starlette.concurrency import run_in_threadpool
@@ -220,24 +220,37 @@ def get_auxiliary_models(profile: Optional[str] = None):
"""Current auxiliary task assignments: ``{"tasks": [{task, provider, model,
base_url}, ...], "main": {provider, model}}``. ``profile`` scopes the read —
without it the Models page would show the dashboard profile's pins while
- /api/model/set wrote the selected profile's."""
+ /api/model/set wrote the selected profile's.
+
+ Built-in slots come first; plugin-registered tasks follow, each carrying the
+ ``label``/``hint``/``plugin`` the plugin declared (built-ins are labelled client-side)."""
with http_failure("GET /api/model/auxiliary failed", 500, detail="Failed to read auxiliary config"):
- cfg = _load_config_scoped(profile)
+ with _profile_scope(profile):
+ cfg = load_config()
+ # Inside the scope on purpose: plugin discovery keys on the same context-local home.
+ plugin_tasks = _plugin_aux_tasks()
aux_cfg = cfg.get("auxiliary", {})
if not isinstance(aux_cfg, dict):
aux_cfg = {}
- tasks = []
- for slot in _AUX_TASK_SLOTS:
+ def _row(slot: str) -> dict:
slot_cfg = aux_cfg.get(slot, {}) if isinstance(aux_cfg.get(slot), dict) else {}
base_url = str(slot_cfg.get("base_url", "") or "")
- tasks.append({
+ return {
"task": slot, "provider": str(slot_cfg.get("provider", "auto") or "auto"),
"model": str(slot_cfg.get("model", "") or ""), "base_url": base_url,
"reasoning_effort": str(slot_cfg.get("reasoning_effort") or "") or None,
# Lets the UI tell a free local/LAN pin from a forgotten paid-provider pin.
"local_endpoint": is_local_endpoint(base_url),
- })
+ }
+
+ tasks = [_row(slot) for slot in _AUX_TASK_SLOTS]
+ tasks.extend({
+ **_row(entry["key"]),
+ "label": str(entry.get("display_name") or entry["key"]),
+ "hint": str(entry.get("description") or ""),
+ "plugin": str(entry.get("plugin") or ""),
+ } for entry in plugin_tasks)
model, provider = _main_model_fields(cfg.get("model", {}))
return {"tasks": tasks, "main": {"provider": str(provider or ""), "model": str(model or "")}}
diff --git a/hermes_cli/web_server_config.py b/hermes_cli/web_server_config.py
index cea617a79a0..c6cdfc7f689 100644
--- a/hermes_cli/web_server_config.py
+++ b/hermes_cli/web_server_config.py
@@ -554,6 +554,31 @@ _AUX_TASK_SLOTS: Tuple[str, ...] = (
)
+def _plugin_aux_tasks() -> List[Dict[str, Any]]:
+ """Auxiliary tasks registered by plugins (``PluginContext.register_auxiliary_task``) for the
+ Hermes home active in this context.
+
+ Callers run inside ``_profile_scope`` / ``_config_profile_scope``, and ``get_plugin_manager()``
+ keys its manager on the same context-local home, so a request for profile B enumerates
+ B's plugins even though this process was started for profile A. Discovery failure is
+ fail-soft: the built-in slots must keep working without plugins.
+ """
+ try:
+ from hermes_cli.plugins import get_plugin_auxiliary_tasks
+ return [dict(entry) for entry in get_plugin_auxiliary_tasks()
+ if entry.get("key") and entry["key"] not in _AUX_TASK_SLOTS]
+ except Exception:
+ _log.debug("plugin auxiliary task lookup failed", exc_info=True)
+ return []
+
+
+def _aux_task_slots() -> Tuple[str, ...]:
+ """Every auxiliary slot the dashboard may read or assign: built-ins first (UI order), then
+ plugin-registered keys. The picker in ``hermes model`` (``main_provider_setup._all_aux_tasks``)
+ folds plugin tasks in the same way; the dashboard must not disagree with it."""
+ return _AUX_TASK_SLOTS + tuple(entry["key"] for entry in _plugin_aux_tasks())
+
+
def _dashboard_code_skew_guard() -> Optional[str]:
"""Return a "restart required" message when this process runs stale code, else None.
@@ -660,7 +685,7 @@ def _stale_aux_pins(cfg: dict, new_provider: str) -> list:
aux_cfg = cfg.get("auxiliary", {})
if not isinstance(aux_cfg, dict):
return stale_aux
- for slot in _AUX_TASK_SLOTS:
+ for slot in _aux_task_slots():
slot_cfg = aux_cfg.get(slot)
if not isinstance(slot_cfg, dict):
continue
@@ -756,10 +781,11 @@ def _apply_aux_assignment_sync(cfg: dict, provider: str, model: str, task: str,
return slot_cfg if isinstance(slot_cfg, dict) else {}
effort = _normalize_aux_reasoning_effort(reasoning_effort) if reasoning_effort is not _UNSET else _UNSET
+ slots = _aux_task_slots()
if task == "__reset__":
# Reset every slot to provider="auto", model="", no effort override — keeps other fields intact.
- for slot in _AUX_TASK_SLOTS:
+ for slot in slots:
slot_cfg = _slot(slot)
slot_cfg["provider"] = "auto"
slot_cfg["model"] = ""
@@ -774,10 +800,10 @@ def _apply_aux_assignment_sync(cfg: dict, provider: str, model: str, task: str,
if not provider:
raise HTTPException(status_code=400, detail="provider required for auxiliary")
- targets = [task] if task else list(_AUX_TASK_SLOTS)
+ targets = [task] if task else list(slots)
new_provider = provider.strip().lower()
for slot in targets:
- if slot not in _AUX_TASK_SLOTS:
+ if slot not in slots:
raise HTTPException(status_code=400, detail=f"unknown auxiliary task: {slot}")
slot_cfg = _slot(slot)
prev_provider = str(slot_cfg.get("provider") or "").strip().lower()
diff --git a/tests/hermes_cli/test_plugin_aux_tasks_dashboard.py b/tests/hermes_cli/test_plugin_aux_tasks_dashboard.py
new file mode 100644
index 00000000000..17af896cc7a
--- /dev/null
+++ b/tests/hermes_cli/test_plugin_aux_tasks_dashboard.py
@@ -0,0 +1,123 @@
+"""Plugin-registered auxiliary tasks reach the dashboard/Desktop Models settings.
+
+``PluginContext.register_auxiliary_task`` already puts a plugin task in the ``hermes model``
+picker (``main_provider_setup._all_aux_tasks``), but the REST surface behind the Desktop
+Settings → Models page enumerated only the built-in ``_AUX_TASK_SLOTS``: ``GET
+/api/model/auxiliary`` never listed the task, ``POST /api/model/set`` rejected it with
+``unknown auxiliary task``, ``__reset__`` skipped it and the stale-pin nudge ignored it.
+
+These tests load a real plugin from a temp ``HERMES_HOME`` through ``PluginManager`` discovery
+(no fake registry) and cover the profile seam the reviewer of #40922 flagged: two profiles with
+different plugins must each see their own tasks from one ``hermes serve`` process.
+Regression for #40880.
+"""
+
+from __future__ import annotations
+
+from pathlib import Path
+
+import pytest
+import yaml
+from fastapi import HTTPException
+
+import hermes_cli.plugins as plugins_mod
+from hermes_cli.plugins import PluginManager
+from hermes_cli.web_server_config import (
+ _AUX_TASK_SLOTS, _apply_aux_assignment_sync, _aux_task_slots, _stale_aux_pins,
+)
+from hermes_cli.web_routers.models import get_auxiliary_models
+
+
+def _write_aux_plugin(home: Path, name: str, task_key: str, *, display: str) -> None:
+ plugin_dir = home / "plugins" / name
+ plugin_dir.mkdir(parents=True)
+ (plugin_dir / "plugin.yaml").write_text(
+ yaml.safe_dump({"name": name, "version": "0.1.0", "description": f"{name} probe"})
+ )
+ (plugin_dir / "__init__.py").write_text(
+ "def register(ctx):\n"
+ f" ctx.register_auxiliary_task({task_key!r}, display_name={display!r},\n"
+ f" description='side model for {name}', defaults={{'timeout': 7}})\n"
+ )
+ (home / "config.yaml").write_text(yaml.safe_dump({"plugins": {"enabled": [name]}}))
+
+
+def two_profile_homes(tmp_path, monkeypatch):
+ """Process home ``a`` with plugin task ``alpha_task``; named profile ``b`` with ``beta_task``."""
+ root = tmp_path / ".hermes"
+ home_a = root
+ home_b = root / "profiles" / "b"
+ _write_aux_plugin(home_a, "alpha_plugin", "alpha_task", display="Alpha side model")
+ _write_aux_plugin(home_b, "beta_plugin", "beta_task", display="Beta side model")
+ monkeypatch.setattr(Path, "home", lambda: tmp_path)
+ monkeypatch.setenv("HERMES_HOME", str(home_a))
+ monkeypatch.setattr(plugins_mod, "get_bundled_plugins_dir", lambda: tmp_path / "empty-bundled")
+ monkeypatch.setattr(PluginManager, "_scan_entry_points", lambda self: [])
+ plugins_mod._reset_plugin_managers_for_tests()
+ yield home_a, home_b
+ plugins_mod._reset_plugin_managers_for_tests()
+
+
+def test_slots_and_listing_include_the_active_profiles_plugin_task(two_profile_homes):
+ slots = _aux_task_slots()
+ assert slots[: len(_AUX_TASK_SLOTS)] == _AUX_TASK_SLOTS
+ assert "alpha_task" in slots and "beta_task" not in slots
+
+ listing = get_auxiliary_models(profile=None)
+ by_task = {row["task"]: row for row in listing["tasks"]}
+ assert set(_AUX_TASK_SLOTS) <= set(by_task)
+ alpha = by_task["alpha_task"]
+ assert alpha["label"] == "Alpha side model"
+ assert alpha["hint"] == "side model for alpha_plugin"
+ assert alpha["plugin"] == "alpha_plugin"
+ assert alpha["provider"] == "auto" and alpha["model"] == ""
+ # Built-in rows keep their pre-existing shape: no plugin fields.
+ assert "label" not in by_task["vision"] and "plugin" not in by_task["vision"]
+ # Plugin rows come after every built-in so the UI order stays stable.
+ assert [row["task"] for row in listing["tasks"]][: len(_AUX_TASK_SLOTS)] == list(_AUX_TASK_SLOTS)
+
+
+def test_listing_scopes_plugin_tasks_to_the_requested_profile(two_profile_homes):
+ """One serve process, two profiles: each request enumerates ITS profile's plugins."""
+ tasks_a = {row["task"] for row in get_auxiliary_models(profile=None)["tasks"]}
+ tasks_b = {row["task"] for row in get_auxiliary_models(profile="b")["tasks"]}
+ assert "alpha_task" in tasks_a and "beta_task" not in tasks_a
+ assert "beta_task" in tasks_b and "alpha_task" not in tasks_b
+
+
+def test_assignment_reset_and_stale_pins_cover_plugin_tasks(two_profile_homes, monkeypatch):
+ saved: dict = {}
+ monkeypatch.setattr("hermes_cli.config.save_config", lambda cfg: saved.update(cfg))
+ cfg: dict = {"auxiliary": {}}
+
+ out = _apply_aux_assignment_sync(cfg, "openrouter", "fast-model", "alpha_task", "", "")
+ assert out["tasks"] == ["alpha_task"]
+ assert cfg["auxiliary"]["alpha_task"] == {"provider": "openrouter", "model": "fast-model"}
+ assert saved["auxiliary"]["alpha_task"]["model"] == "fast-model"
+
+ # A pin on a plugin task is a stale pin like any other when main moves elsewhere.
+ assert {"task": "alpha_task", "provider": "openrouter", "model": "fast-model"} in _stale_aux_pins(cfg, "nous")
+
+ # Empty task = broadcast; it must reach the plugin slot too.
+ _apply_aux_assignment_sync(cfg, "nous", "hermes-4", "", "", "")
+ assert cfg["auxiliary"]["alpha_task"]["provider"] == "nous"
+
+ _apply_aux_assignment_sync(cfg, "", "", "__reset__", "", "")
+ assert cfg["auxiliary"]["alpha_task"] == {"provider": "auto", "model": ""}
+
+ # Another profile's task is still unknown here — the validation is per-profile, not global.
+ with pytest.raises(HTTPException) as exc:
+ _apply_aux_assignment_sync(cfg, "openrouter", "m", "beta_task", "", "")
+ assert exc.value.status_code == 400 and "unknown auxiliary task" in exc.value.detail
+
+
+def test_plugin_discovery_failure_leaves_builtins_working(two_profile_homes, monkeypatch):
+ def _boom():
+ raise RuntimeError("plugin scan exploded")
+
+ # Patch where production reads: the resolver imports the name from hermes_cli.plugins at call time.
+ monkeypatch.setattr(plugins_mod, "get_plugin_auxiliary_tasks", _boom)
+ assert _aux_task_slots() == _AUX_TASK_SLOTS
+ tasks = [row["task"] for row in get_auxiliary_models(profile=None)["tasks"]]
+ assert tasks == list(_AUX_TASK_SLOTS)
diff --git a/web/src/lib/api.ts b/web/src/lib/api.ts
index a64a743c5b8..6719978b8ca 100644
--- a/web/src/lib/api.ts
+++ b/web/src/lib/api.ts
@@ -2602,6 +2602,12 @@ export interface AuxiliaryTaskAssignment {
provider: string;
model: string;
base_url: string;
+ /** Set only on plugin-registered tasks (PluginContext.register_auxiliary_task):
+ * the plugin's display name / description / owning plugin id. Built-in tasks
+ * are labelled client-side. Absent on older backends. */
+ label?: string;
+ hint?: string;
+ plugin?: string;
}
export interface AuxiliaryModelsResponse {
diff --git a/web/src/lib/aux-tasks.test.ts b/web/src/lib/aux-tasks.test.ts
new file mode 100644
index 00000000000..72cb9cf50e0
--- /dev/null
+++ b/web/src/lib/aux-tasks.test.ts
@@ -0,0 +1,42 @@
+import { describe, expect, it } from "vitest";
+
+import { auxTaskLabel, auxTaskRows, BUILTIN_AUX_TASKS } from "./aux-tasks";
+
+const builtinKeys = BUILTIN_AUX_TASKS.map((t) => t.key);
+
+describe("auxTaskRows", () => {
+ it("renders only the built-ins when the backend sends none or only built-ins (older backend)", () => {
+ expect(auxTaskRows(undefined).map((t) => t.key)).toEqual(builtinKeys);
+ expect(auxTaskRows(null).map((t) => t.key)).toEqual(builtinKeys);
+ const onlyBuiltins = [{ task: "vision", provider: "auto", model: "", base_url: "" }];
+ expect(auxTaskRows(onlyBuiltins).map((t) => t.key)).toEqual(builtinKeys);
+ });
+
+ it("appends plugin-registered tasks after the built-ins with the server label and hint (#40880)", () => {
+ const rows = auxTaskRows([
+ { task: "vision", provider: "auto", model: "", base_url: "" },
+ {
+ task: "grill_tab",
+ provider: "openrouter",
+ model: "openai/gpt-5-mini",
+ base_url: "",
+ label: "Grill Tab",
+ hint: "Tab-to-grill questions",
+ plugin: "grill-tab",
+ },
+ ]);
+ expect(rows.slice(0, builtinKeys.length).map((t) => t.key)).toEqual(builtinKeys);
+ expect(rows.at(-1)).toEqual({ key: "grill_tab", label: "Grill Tab", hint: "Tab-to-grill questions" });
+ });
+
+ it("falls back to the key when a plugin task arrives without a label, and never duplicates a built-in", () => {
+ const rows = auxTaskRows([
+ { task: "curator", provider: "auto", model: "", base_url: "" },
+ { task: "custom_rag", provider: "auto", model: "", base_url: "" },
+ ]);
+ expect(rows.filter((t) => t.key === "curator")).toHaveLength(1);
+ expect(rows.at(-1)).toEqual({ key: "custom_rag", label: "custom_rag", hint: "" });
+ expect(auxTaskLabel(rows.length ? [] : [], "vision")).toBe("Vision");
+ expect(auxTaskLabel([{ task: "x_task", provider: "auto", model: "", base_url: "", label: "X" }], "x_task")).toBe("X");
+ });
+});
diff --git a/web/src/lib/aux-tasks.ts b/web/src/lib/aux-tasks.ts
new file mode 100644
index 00000000000..43ccd9733b4
--- /dev/null
+++ b/web/src/lib/aux-tasks.ts
@@ -0,0 +1,53 @@
+import type { AuxiliaryTaskAssignment } from "./api";
+
+export interface AuxTaskMeta {
+ key: string;
+ label: string;
+ hint: string;
+}
+
+// Built-in auxiliary tasks, in the order `_AUX_TASK_SLOTS`
+// (hermes_cli/web_server_config.py) serves them. Plugin-registered tasks are
+// not listed here: the backend appends them to `/api/model/auxiliary` with the
+// plugin's own `label`/`hint` and `auxTaskRows` folds them in after these.
+export const BUILTIN_AUX_TASKS: readonly AuxTaskMeta[] = [
+ { key: "vision", label: "Vision", hint: "Image analysis" },
+ { key: "compression", label: "Compression", hint: "Context compaction" },
+ { key: "skills_hub", label: "Skills Hub", hint: "Skill search" },
+ { key: "approval", label: "Approval", hint: "Smart auto-approve" },
+ { key: "mcp", label: "MCP", hint: "MCP tool routing" },
+ { key: "title_generation", label: "Title Gen", hint: "Session titles" },
+ { key: "review", label: "Review", hint: "/review subagent" },
+ { key: "triage_specifier", label: "Triage Specifier", hint: "Kanban spec fleshing" },
+ { key: "kanban_decomposer", label: "Kanban Decomposer", hint: "Task decomposition" },
+ { key: "profile_describer", label: "Profile Describer", hint: "Auto profile descriptions" },
+ { key: "curator", label: "Curator", hint: "Skill-usage review" },
+] as const;
+
+/**
+ * Rows the Models page renders: the built-ins, then every task the backend
+ * reported that is not a built-in — plugin-registered auxiliary tasks
+ * (`PluginContext.register_auxiliary_task`), labelled by the plugin. Older
+ * backends never send extra rows, so this is a no-op against them; built-ins
+ * stay first so the layout is stable.
+ */
+export function auxTaskRows(
+ tasks: readonly AuxiliaryTaskAssignment[] | null | undefined,
+): AuxTaskMeta[] {
+ const builtin = new Set(BUILTIN_AUX_TASKS.map((t) => t.key));
+ const extra = (tasks ?? [])
+ .filter((entry) => !builtin.has(entry.task))
+ .map((entry) => ({
+ key: entry.task,
+ label: entry.label || entry.task,
+ hint: entry.hint || "",
+ }));
+ return extra.length ? [...BUILTIN_AUX_TASKS, ...extra] : [...BUILTIN_AUX_TASKS];
+}
+
+export function auxTaskLabel(
+ tasks: readonly AuxiliaryTaskAssignment[] | null | undefined,
+ key: string,
+): string {
+ return auxTaskRows(tasks).find((t) => t.key === key)?.label ?? key;
+}
diff --git a/web/src/pages/ModelsPage.tsx b/web/src/pages/ModelsPage.tsx
index c4dd0a0c780..dcfaddb66c7 100644
--- a/web/src/pages/ModelsPage.tsx
+++ b/web/src/pages/ModelsPage.tsx
@@ -14,6 +14,7 @@ import {
Zap,
} from "lucide-react";
import { api } from "@/lib/api";
+import { auxTaskLabel, auxTaskRows } from "@/lib/aux-tasks";
import type {
AuxiliaryModelsResponse,
AuxiliaryTaskAssignment,
@@ -51,21 +52,6 @@ const PERIODS = [
{ label: "90d", days: 90 },
] as const;
-// Must match _AUX_TASK_SLOTS in hermes_cli/web_server.py.
-const AUX_TASKS: readonly { key: string; label: string; hint: string }[] = [
- { key: "vision", label: "Vision", hint: "Image analysis" },
- { key: "compression", label: "Compression", hint: "Context compaction" },
- { key: "skills_hub", label: "Skills Hub", hint: "Skill search" },
- { key: "approval", label: "Approval", hint: "Smart auto-approve" },
- { key: "mcp", label: "MCP", hint: "MCP tool routing" },
- { key: "title_generation", label: "Title Gen", hint: "Session titles" },
- { key: "review", label: "Review", hint: "/review subagent" },
- { key: "triage_specifier", label: "Triage Specifier", hint: "Kanban spec fleshing" },
- { key: "kanban_decomposer", label: "Kanban Decomposer", hint: "Task decomposition" },
- { key: "profile_describer", label: "Profile Describer", hint: "Auto profile descriptions" },
- { key: "curator", label: "Curator", hint: "Skill-usage review" },
-] as const;
-
function formatTokens(n: number): string {
if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(1)}M`;
if (n >= 1_000) return `${(n / 1_000).toFixed(1)}K`;
@@ -208,6 +194,7 @@ function UseAsMenu({
model,
isMain,
mainAuxTask,
+ auxTasks,
onAssigned,
}: {
provider: string;
@@ -216,6 +203,8 @@ function UseAsMenu({
isMain: boolean;
/** If this model is assigned to a specific aux task, that task's key. */
mainAuxTask: string | null;
+ /** Auxiliary rows as served (built-ins + plugin tasks); see auxTaskRows. */
+ auxTasks: AuxiliaryTaskAssignment[];
onAssigned(): void;
}) {
const [open, setOpen] = useState(false);
@@ -320,7 +309,7 @@ function UseAsMenu({
<span>All auxiliary tasks</span>
</button>
- {AUX_TASKS.map((t) => (
+ {auxTaskRows(auxTasks).map((t) => (
<button
key={t.key}
type="button"
@@ -469,6 +458,7 @@ function ModelCard({
model={entry.model}
isMain={isMain}
mainAuxTask={mainAuxTask}
+ auxTasks={aux}
onAssigned={onAssigned}
/>
</div>
@@ -629,7 +619,7 @@ function AuxiliaryTasksModal({
</header>
<div className="flex-1 overflow-y-auto p-5 space-y-1">
- {AUX_TASKS.map((t) => {
+ {auxTaskRows(aux?.tasks).map((t) => {
const cur = aux?.tasks.find((a) => a.task === t.key);
const isAuto =
!cur || cur.provider === "auto" || !cur.provider;
@@ -672,10 +662,7 @@ function AuxiliaryTasksModal({
currentAssignment={assignmentToPickerCurrent(
aux?.tasks.find((a) => a.task === picker.task),
)}
- title={`Set Auxiliary: ${
- AUX_TASKS.find((t) => t.key === picker.task)?.label ??
- picker.task
- }`}
+ title={`Set Auxiliary: ${auxTaskLabel(aux?.tasks, picker.task)}`}
onApply={async ({ provider, model, confirmExpensiveModel }) => {
const result = await api.setModelAssignment({
confirm_expensive_model: confirmExpensiveModel,
@@ -989,6 +976,7 @@ function ModelSettingsPanel({
const auxOverrideCount = aux?.tasks.filter(
(a) => a.provider && a.provider !== "auto",
).length ?? 0;
+ const auxTaskCount = auxTaskRows(aux?.tasks).length;
return (
<Card className="min-w-0 max-w-full overflow-hidden">
@@ -1038,8 +1026,8 @@ function ModelSettingsPanel({
</div>
<div className="text-xs font-mono text-text-secondary truncate">
{auxOverrideCount > 0
- ? `${auxOverrideCount} override${auxOverrideCount > 1 ? "s" : ""} · ${AUX_TASKS.length - auxOverrideCount} auto`
- : `${AUX_TASKS.length} tasks · all auto`}
+ ? `${auxOverrideCount} override${auxOverrideCount > 1 ? "s" : ""} · ${auxTaskCount - auxOverrideCount} auto`
+ : `${auxTaskCount} tasks · all auto`}
</div>
</div>
<Button
diff --git a/website/docs/developer-guide/plugin-llm-access.md b/website/docs/developer-guide/plugin-llm-access.md
index 4cd458eb701..deef6736b03 100644
--- a/website/docs/developer-guide/plugin-llm-access.md
+++ b/website/docs/developer-guide/plugin-llm-access.md
@@ -318,7 +318,12 @@ auxiliary:
Plugins may supply provider/model registration defaults for their own
tasks. Operator configuration in `auxiliary.<task>` overrides those
-defaults and controls the deployment choice. A plugin can only use a task
+defaults and controls the deployment choice. A registered task is a
+first-class slot on every model-assignment surface: the `hermes model` →
+*Configure auxiliary models* picker, the dashboard Models page, and Desktop
+Settings → Models → Auxiliary all list it (after the built-in tasks, under
+the plugin's `display_name`) and can pin, reset, or flag it as a stale
+provider pin like any built-in. A plugin can only use a task
it registered itself; unknown or foreign task names fail before provider
invocation. `allow_task_override: true` is an explicit operator grant for
using Hermes built-in auxiliary tasks; it does not permit another plugin's