The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
feat(dashboard,desktop): show which slot a plugin aux task inherits
Teknium4013fa57d593
diff --git a/apps/desktop/src/app/settings/model-settings.test.tsx b/apps/desktop/src/app/settings/model-settings.test.tsxindex 67480a07b90..da73f06c8de 100644--- a/apps/desktop/src/app/settings/model-settings.test.tsx+++ b/apps/desktop/src/app/settings/model-settings.test.tsx@@ -381,6 +381,51 @@ describe('ModelSettings', () => {expect(vision && grill && vision.compareDocumentPosition(grill) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy()})+ it('shows an unpinned inheriting plugin task as following its base, and offers Follow once pinned', async () => {+ getAuxiliaryModels.mockResolvedValueOnce({+ main: { provider: 'nous', model: 'hermes-4' },+ tasks: [+ { task: 'compression', provider: 'openrouter', model: 'vendor/fast', base_url: '' },+ {+ task: 'side_task',+ provider: 'auto',+ model: '',+ base_url: '',+ label: 'Side model',+ hint: 'side model for side',+ plugin: 'side',+ inherit_from: 'compression',+ effective: { provider: 'openrouter', model: 'vendor/fast', base_url: '' }+ },+ {+ task: 'pinned_task',+ provider: 'nous',+ model: 'hermes-4',+ base_url: '',+ label: 'Pinned side',+ hint: 'pinned',+ plugin: 'side',+ inherit_from: 'compression',+ effective: { provider: 'nous', model: 'hermes-4', base_url: '' }+ }+ ]+ })+ await renderModelSettings()++ expect(await screen.findByText('inherits Compression · openrouter · vendor/fast')).toBeTruthy()+ // Only the pinned inheriting row offers the way back to its base.+ const follow = screen.getAllByRole('button', { name: 'Follow Compression' })+ expect(follow).toHaveLength(1)+ expect(document.getElementById('aux-task-pinned_task')?.contains(follow[0])).toBe(true)++ fireEvent.click(follow[0])+ await waitFor(() =>+ expect(setModelAssignment).toHaveBeenCalledWith(+ { model: '', provider: 'auto', reasoning_effort: null, scope: 'auxiliary', task: 'pinned_task' }+ )+ )+ })+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.tsxindex 274082d8a3c..a62a16c0c09 100644--- a/apps/desktop/src/app/settings/model-settings.tsx+++ b/apps/desktop/src/app/settings/model-settings.tsx@@ -104,6 +104,8 @@ interface AuxTaskMeta {/** Server-declared copy for a plugin task; built-ins resolve through i18n instead. */label?: stringhint?: string+ /** Plugin task that follows this slot until it is pinned itself. */+ inheritFrom?: string}const AUX_TASKS: readonly AuxTaskMeta[] = [@@ -124,14 +126,19 @@ const AUX_TASKS: readonly AuxTaskMeta[] = [// 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.+// which arrive with the plugin's own label/hint and inherited base. 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[] | 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 || '' }))+ .map(entry => ({+ key: entry.task,+ label: entry.label || entry.task,+ hint: entry.hint || '',+ inheritFrom: entry.inherit_from || undefined+ }))return extra.length ? [...AUX_TASKS, ...extra] : [...AUX_TASKS]}@@ -853,6 +860,28 @@ export function ModelSettings({ onMainModelChanged, scopeProfile, subpage }: Mod[endpointForProvider, m.loadFailed, mainModel, refresh, scopeProfile, setCaughtError])+ // An inheriting plugin slot pinned by the user goes back to following its base: "auto" on such a+ // slot means "no preference here" (agent/auxiliary_client.py::_layer_over_inherited).+ const followAuxiliaryBase = useCallback(+ async (task: string) => {+ setApplying(true)+ setError('')++ try {+ await setModelAssignment(+ { model: '', provider: 'auto', reasoning_effort: null, scope: 'auxiliary', task },+ scopeProfile+ )+ await refresh()+ } catch (err) {+ setCaughtError(err, m.loadFailed)+ } finally {+ setApplying(false)+ }+ },+ [m.loadFailed, refresh, scopeProfile, setCaughtError]+ )+const applyAuxiliaryDraft = useCallback(async (task: string) => {if (!auxDraft.provider || !auxDraft.model) {@@ -1147,6 +1176,13 @@ export function ModelSettings({ onMainModelChanged, scopeProfile, subpage }: Modconst current = auxiliary?.tasks.find(entry => entry.task === meta.key)const isAuto = !current || !current.provider || current.provider === 'auto'const isEditing = editingAuxTask === meta.key+ const effective = current?.effective+ const followsBase = isAuto && !!meta.inheritFrom++ const effectiveRoute =+ effective?.provider && effective.provider !== 'auto'+ ? `${effective.provider} · ${effective.model || m.providerDefault}`+ : m.autoUseMainreturn (<div className="scroll-mt-6 rounded-lg" id={`aux-task-${meta.key}`} key={meta.key}>@@ -1154,6 +1190,16 @@ export function ModelSettings({ onMainModelChanged, scopeProfile, subpage }: Modaction={!isEditing && (<div className="flex shrink-0 items-center gap-1.5">+ {meta.inheritFrom && !isAuto && (+ <Button+ disabled={applying}+ onClick={() => void followAuxiliaryBase(meta.key)}+ size="sm"+ variant="text"+ >+ {m.followTask(auxiliaryTaskLabel(meta.inheritFrom))}+ </Button>+ )}<Buttondisabled={!mainModel || applying}onClick={() => void setAuxiliaryToMain(meta.key)}@@ -1244,7 +1290,11 @@ export function ModelSettings({ onMainModelChanged, scopeProfile, subpage }: Mod}description={<span className="font-mono text-[0.68rem]">- {isAuto ? m.autoUseMain : `${current.provider} · ${current.model || m.providerDefault}`}+ {followsBase+ ? `${m.inheritsFrom(auxiliaryTaskLabel(meta.inheritFrom ?? ''))} · ${effectiveRoute}`+ : isAuto+ ? m.autoUseMain+ : `${current.provider} · ${current.model || m.providerDefault}`}{!isAuto && current.base_url && (<span className="text-muted-foreground"> · {current.base_url}</span>)}diff --git a/apps/desktop/src/i18n/ar_settings.ts b/apps/desktop/src/i18n/ar_settings.tsindex 5f04e8cb229..abebc3dbc9d 100644--- a/apps/desktop/src/i18n/ar_settings.ts+++ b/apps/desktop/src/i18n/ar_settings.ts@@ -744,6 +744,8 @@ export const arSettings = {change: 'تغيير',autoUseMain: 'تلقائي · استخدام النموذج الرئيسي',inheritMainEffort: 'وراثة · جهد النموذج الرئيسي',+ inheritsFrom: task => `يرث من ${task}`,+ followTask: task => `اتباع ${task}`,providerDefault: '(افتراضي المزوّد)',tasks: {vision: {diff --git a/apps/desktop/src/i18n/de.ts b/apps/desktop/src/i18n/de.tsindex 0ca14847d76..bc24f23fa18 100644--- a/apps/desktop/src/i18n/de.ts+++ b/apps/desktop/src/i18n/de.ts@@ -2125,6 +2125,8 @@ export const deOverrides = {change: 'Ändern',autoUseMain: 'automatisch · Hauptmodell verwenden',inheritMainEffort: 'übernehmen · Aufwand des Hauptmodells',+ inheritsFrom: task => `erbt von ${task}`,+ followTask: task => `${task} folgen`,providerDefault: '(Anbietervorgabe)',fallbackAdd: 'Fallback hinzufügen',fallbackEmpty: 'Keine Fallback-Modelle — es wird das Standardmodell verwendet, außer es schlägt fehl.',diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.tsindex 64ed294e2a9..c42453c366e 100644--- a/apps/desktop/src/i18n/en.ts+++ b/apps/desktop/src/i18n/en.ts@@ -1798,6 +1798,8 @@ export const en: Translations = {change: 'Change',autoUseMain: 'auto · use main model',inheritMainEffort: 'inherit · main model effort',+ inheritsFrom: task => `inherits ${task}`,+ followTask: task => `Follow ${task}`,providerDefault: '(provider default)',fallbackAdd: 'Add fallback',fallbackEmpty: 'No fallback models — the default model is used unless it fails.',diff --git a/apps/desktop/src/i18n/es.ts b/apps/desktop/src/i18n/es.tsindex 815e5d2e553..e46d6ff643a 100644--- a/apps/desktop/src/i18n/es.ts+++ b/apps/desktop/src/i18n/es.ts@@ -2119,6 +2119,8 @@ export const esOverrides = {change: 'Cambiar',autoUseMain: 'auto · usar modelo principal',inheritMainEffort: 'heredar · esfuerzo del modelo principal',+ inheritsFrom: task => `hereda de ${task}`,+ followTask: task => `Seguir ${task}`,providerDefault: '(predeterminado del proveedor)',fallbackAdd: 'Añadir respaldo',fallbackEmpty: 'No hay modelos de respaldo; se usa el modelo predeterminado salvo que falle.',diff --git a/apps/desktop/src/i18n/fr.ts b/apps/desktop/src/i18n/fr.tsindex 99a298ac3d4..f22ed231cfc 100644--- a/apps/desktop/src/i18n/fr.ts+++ b/apps/desktop/src/i18n/fr.ts@@ -2131,6 +2131,8 @@ export const frOverrides = {change: 'Modifier',autoUseMain: 'auto · utiliser le modèle principal',inheritMainEffort: 'hériter · effort du modèle principal',+ inheritsFrom: task => `hérite de ${task}`,+ followTask: task => `Suivre ${task}`,providerDefault: '(par défaut du fournisseur)',fallbackAdd: 'Ajouter un secours',fallbackEmpty: "Aucun modèle de secours — le modèle par défaut est utilisé sauf en cas d'échec.",diff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.tsindex 4b695eabe94..9411e82d0ec 100644--- a/apps/desktop/src/i18n/ja.ts+++ b/apps/desktop/src/i18n/ja.ts@@ -1335,6 +1335,8 @@ export const ja = defineLocale({change: '変更',autoUseMain: '自動 · メインモデルを使用',inheritMainEffort: '継承 · メインモデルの推論強度',+ inheritsFrom: task => `${task} を継承`,+ followTask: task => `${task} に従う`,providerDefault: '(プロバイダーのデフォルト)',tasks: {vision: { label: 'ビジョン', hint: '画像分析' },diff --git a/apps/desktop/src/i18n/ru.ts b/apps/desktop/src/i18n/ru.tsindex 9b4fc3c793a..2edb0a337df 100644--- a/apps/desktop/src/i18n/ru.ts+++ b/apps/desktop/src/i18n/ru.ts@@ -1454,6 +1454,8 @@ export const ru = defineLocale({change: 'Изменить',autoUseMain: 'авто · использовать основную модель',inheritMainEffort: 'наследовать · усилие основной модели',+ inheritsFrom: task => `наследует ${task}`,+ followTask: task => `Как ${task}`,providerDefault: '(по умолчанию провайдера)',fallbackAdd: 'Добавить запасную',fallbackEmpty: 'Запасных моделей нет — используется модель по умолчанию, если она не падает.',diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.tsindex d2c84b1f204..f1f94ff2286 100644--- a/apps/desktop/src/i18n/types.ts+++ b/apps/desktop/src/i18n/types.ts@@ -1520,6 +1520,8 @@ export interface Translations {change: stringautoUseMain: stringinheritMainEffort: string+ inheritsFrom: (task: string) => string+ followTask: (task: string) => stringproviderDefault: stringfallbackAdd: stringfallbackEmpty: stringdiff --git a/apps/desktop/src/i18n/zh-hant_settings.ts b/apps/desktop/src/i18n/zh-hant_settings.tsindex 61ca0ffdf65..d05092dfa8c 100644--- a/apps/desktop/src/i18n/zh-hant_settings.ts+++ b/apps/desktop/src/i18n/zh-hant_settings.ts@@ -1050,6 +1050,8 @@ export const zhHantSettings = {change: '變更',autoUseMain: '自動 · 使用主要模型',inheritMainEffort: '繼承 · 主要模型推理強度',+ inheritsFrom: task => `繼承 ${task}`,+ followTask: task => `跟隨 ${task}`,providerDefault: '(提供方預設)',moaTitle: '混合代理(Mixture of Agents)',moaPreset: '預設',diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.tsindex 8ae23133cd8..6c453897617 100644--- a/apps/desktop/src/i18n/zh.ts+++ b/apps/desktop/src/i18n/zh.ts@@ -1725,6 +1725,8 @@ export const zh = defineLocale({change: '更改',autoUseMain: '自动 · 使用主模型',inheritMainEffort: '继承 · 主模型推理强度',+ inheritsFrom: task => `继承 ${task}`,+ followTask: task => `跟随 ${task}`,providerDefault: '(提供方默认)',fallbackAdd: '添加备用模型',fallbackEmpty: '未配置备用模型 — 默认模型失败时才会使用备用模型。',diff --git a/apps/desktop/src/types/hermes.ts b/apps/desktop/src/types/hermes.tsindex 7cc27e1d83b..171ddc23771 100644--- a/apps/desktop/src/types/hermes.ts+++ b/apps/desktop/src/types/hermes.ts@@ -1585,21 +1585,26 @@ export interface BackendUpdateCheckResponse {export interface AuxiliaryTaskAssignment {base_url: string+ /** Plugin tasks with `inherit_from` only: the route the task resolves to right now+ * (the base slot's while this slot is unpinned). Absent on older backends. */+ effective?: { base_url: string; model: string; provider: 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. */+ hint?: string+ /** Plugin tasks only: the slot this one follows until it is pinned itself. */+ inherit_from?: null | string+ label?: string/** Backend verdict (`agent/model_metadata.py::is_local_endpoint`) that `base_url`* is a loopback/LAN/mDNS endpoint. Absent on older backends. */local_endpoint?: booleanmodel: string+ plugin?: stringprovider: string/** Task-level effort override (`auxiliary.<task>.reasoning_effort`); null/absent* means the task inherits the main agent's effort. */reasoning_effort?: null | stringtask: 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.pyindex 136bc9ce66e..a23296334fa 100644--- a/hermes_cli/web_routers/models.py+++ b/hermes_cli/web_routers/models.py@@ -223,12 +223,20 @@ def get_auxiliary_models(profile: Optional[str] = None):/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)."""+ ``label``/``hint``/``plugin`` the plugin declared (built-ins are labelled client-side) and+ ``inherit_from`` (base slot key or null). An inheriting row also carries ``effective``: the+ route it resolves to right now, which is the base's while the row itself is unpinned.+ ``provider``/``model``/``base_url`` stay the slot's own stored values on every row."""+ from agent.auxiliary_client import _get_auxiliary_task_config+with http_failure("GET /api/model/auxiliary failed", 500, detail="Failed to read auxiliary config"):with _profile_scope(profile):cfg = load_config()- # Inside the scope on purpose: plugin discovery keys on the same context-local home.+ # Inside the scope on purpose: plugin discovery and the resolver key on the same+ # context-local home, so profile B's rows come from B's plugins and B's config.plugin_tasks = _plugin_aux_tasks()+ effective = {entry["key"]: _get_auxiliary_task_config(entry["key"])+ for entry in plugin_tasks if entry.get("inherit_from")}aux_cfg = cfg.get("auxiliary", {})if not isinstance(aux_cfg, dict):aux_cfg = {}@@ -250,6 +258,10 @@ def get_auxiliary_models(profile: Optional[str] = None):"label": str(entry.get("display_name") or entry["key"]),"hint": str(entry.get("description") or ""),"plugin": str(entry.get("plugin") or ""),+ "inherit_from": entry.get("inherit_from") or None,+ **({"effective": {field: str(effective[entry["key"]].get(field) or "")+ for field in ("provider", "model", "base_url")}}+ if entry["key"] in effective else {}),} for entry in plugin_tasks)model, provider = _main_model_fields(cfg.get("model", {}))diff --git a/locales/_keys.desktop.json b/locales/_keys.desktop.jsonindex a6b12c9d1b4..eacd3adb9ce 100644--- a/locales/_keys.desktop.json+++ b/locales/_keys.desktop.json@@ -3369,7 +3369,9 @@"settings.model.defaultsLabel","settings.model.fallbackAdd","settings.model.fallbackEmpty",+ "settings.model.followTask","settings.model.inheritMainEffort",+ "settings.model.inheritsFrom","settings.model.loadFailed","settings.model.loading","settings.model.mainAppliedMessage",diff --git a/tests/hermes_cli/test_plugin_aux_tasks_dashboard.py b/tests/hermes_cli/test_plugin_aux_tasks_dashboard.pyindex 17af896cc7a..9828c75c83d 100644--- a/tests/hermes_cli/test_plugin_aux_tasks_dashboard.py+++ b/tests/hermes_cli/test_plugin_aux_tasks_dashboard.py@@ -6,50 +6,62 @@ 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.+These tests load real plugins from temp homes through ``PluginManager`` discovery (no fake+registry) and cover the profile seam: one ``hermes serve`` process, two profiles with their own+plugins and their own config. Regression for #40880 / #129189."""from __future__ import annotations+import jsonfrom pathlib import Pathimport pytest-import yamlfrom fastapi import HTTPExceptionimport hermes_cli.plugins as plugins_mod+from agent.auxiliary_client import _get_auxiliary_task_configfrom hermes_cli.plugins import PluginManagerfrom hermes_cli.web_server_config import (- _AUX_TASK_SLOTS, _apply_aux_assignment_sync, _aux_task_slots, _stale_aux_pins,+ _AUX_TASK_SLOTS, _apply_aux_assignment_sync, _apply_model_assignment_sync, _aux_task_slots,+ _stale_aux_pins,)+from hermes_cli.web_server_profiles import _profile_scopefrom hermes_cli.web_routers.models import get_auxiliary_models-def _write_aux_plugin(home: Path, name: str, task_key: str, *, display: str) -> None:+def _write_plugin(home: Path, name: str, register_call: str) -> None:plugin_dir = home / "plugins" / nameplugin_dir.mkdir(parents=True)+ # JSON is valid YAML; keeps the test free of a yaml dependency.(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]}}))+ json.dumps({"name": name, "version": "0.1.0", "description": f"{name} probe"}))+ (plugin_dir / "__init__.py").write_text(f"def register(ctx):\n ctx.{register_call}\n")+++def _write_home(home: Path, plugins: dict, compression_model: str) -> None:+ for name, call in plugins.items():+ _write_plugin(home, name, call)+ (home / "config.yaml").write_text(json.dumps({+ "plugins": {"enabled": list(plugins)},+ "auxiliary": {"compression": {"provider": "openrouter", "model": compression_model}},+ }))+++_SIDE = ("register_auxiliary_task('side_task', display_name='Side model', "+ "description='side model for side', inherit_from='compression')")+_ALPHA = ("register_auxiliary_task('alpha_task', display_name='Alpha side model', "+ "description='side model for alpha_plugin', defaults={'timeout': 7})")@pytest.fixturedef 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")+ """Process home ``a`` (plugins side + alpha) and named profile ``b`` (plugin side only), each+ with its own ``auxiliary.compression`` model."""+ home_a = tmp_path / ".hermes"+ home_b = home_a / "profiles" / "b"+ _write_home(home_a, {"side": _SIDE, "alpha_plugin": _ALPHA}, "vendor/model-a")+ _write_home(home_b, {"side": _SIDE}, "vendor/model-b")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")@@ -59,31 +71,49 @@ def two_profile_homes(tmp_path, monkeypatch):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+def _rows(profile):+ return {row["task"]: row for row in get_auxiliary_models(profile=profile)["tasks"]}+++def _resolved_model(profile):+ with _profile_scope(profile):+ return _get_auxiliary_task_config("side_task").get("model")+++def test_listing_is_per_profile_and_carries_inheritance(two_profile_homes):+ listing = get_auxiliary_models(profile=None)["tasks"]+ # Built-ins first, in their fixed order and pre-existing shape; plugin rows appended.+ assert [row["task"] for row in listing][: len(_AUX_TASK_SLOTS)] == list(_AUX_TASK_SLOTS)+ assert "label" not in listing[0] and "plugin" not in listing[0]++ rows_a, rows_b = _rows(None), _rows("b")+ assert "alpha_task" in rows_a and "alpha_task" not in rows_b+ side_a, side_b = rows_a["side_task"], rows_b["side_task"]+ assert (side_a["label"], side_a["hint"], side_a["plugin"]) == ("Side model", "side model for side", "side")+ assert side_a["inherit_from"] == "compression" and rows_a["alpha_task"]["inherit_from"] is None+ # Unpinned: own provider stays "auto"; ``effective`` is the base slot of THAT profile.+ assert side_a["provider"] == "auto"+ assert side_a["effective"] == {"provider": "openrouter", "model": "vendor/model-a", "base_url": ""}+ assert side_b["effective"]["model"] == "vendor/model-b"+- 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_pin_persists_per_profile_and_is_honored_by_resolution(two_profile_homes):+ home_a, home_b = two_profile_homes+ with _profile_scope("b"):+ _apply_model_assignment_sync("auxiliary", "nous", "hermes-4", "side_task", "", "")+ assert _rows("b")["side_task"]["provider"] == "nous"+ assert "side_task" not in (home_a / "config.yaml").read_text()+ assert (_resolved_model("b"), _resolved_model(None)) == ("hermes-4", "vendor/model-a")+ # "auto" on an inheriting slot (Desktop's "Follow <base>") goes back to the base.+ with _profile_scope("b"):+ _apply_model_assignment_sync("auxiliary", "auto", "", "side_task", "", "")+ assert _resolved_model("b") == "vendor/model-b"-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+ # A base-slot change in B reaches B's plugin slot, never A's.+ with _profile_scope("b"):+ _apply_model_assignment_sync("auxiliary", "openrouter", "vendor/model-b2", "compression", "", "")+ assert (_resolved_model("b"), _resolved_model(None)) == ("vendor/model-b2", "vendor/model-a")def test_assignment_reset_and_stale_pins_cover_plugin_tasks(two_profile_homes, monkeypatch):@@ -107,8 +137,10 @@ def test_assignment_reset_and_stale_pins_cover_plugin_tasks(two_profile_homes, massert 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", "", "")+ with _profile_scope("b"):+ _apply_aux_assignment_sync({"auxiliary": {}}, "openrouter", "m", "side_task", "", "")+ with pytest.raises(HTTPException) as exc:+ _apply_aux_assignment_sync({"auxiliary": {}}, "openrouter", "m", "alpha_task", "", "")assert exc.value.status_code == 400 and "unknown auxiliary task" in exc.value.detaildiff --git a/web/src/lib/api.ts b/web/src/lib/api.tsindex 6719978b8ca..935ac8e7ae2 100644--- a/web/src/lib/api.ts+++ b/web/src/lib/api.ts@@ -2608,6 +2608,10 @@ export interface AuxiliaryTaskAssignment {label?: string;hint?: string;plugin?: string;+ /** Plugin tasks only: the slot this one follows until it is pinned itself. */+ inherit_from?: string | null;+ /** Inheriting plugin tasks only: the route the task resolves to right now. */+ effective?: { provider: string; model: string; base_url: string };}export interface AuxiliaryModelsResponse {diff --git a/web/src/lib/aux-tasks.test.ts b/web/src/lib/aux-tasks.test.tsindex 72cb9cf50e0..2c9f301650b 100644--- a/web/src/lib/aux-tasks.test.ts+++ b/web/src/lib/aux-tasks.test.ts@@ -39,4 +39,18 @@ describe("auxTaskRows", () => {expect(auxTaskLabel(rows.length ? [] : [], "vision")).toBe("Vision");expect(auxTaskLabel([{ task: "x_task", provider: "auto", model: "", base_url: "", label: "X" }], "x_task")).toBe("X");});++ it("carries a plugin task's inherited base slot", () => {+ const rows = auxTaskRows([+ {+ task: "side_task",+ provider: "auto",+ model: "",+ base_url: "",+ label: "Side",+ inherit_from: "compression",+ },+ ]);+ expect(rows.at(-1)).toEqual({ key: "side_task", label: "Side", hint: "", inheritFrom: "compression" });+ });});diff --git a/web/src/lib/aux-tasks.ts b/web/src/lib/aux-tasks.tsindex 43ccd9733b4..52a6fdc61b5 100644--- a/web/src/lib/aux-tasks.ts+++ b/web/src/lib/aux-tasks.ts@@ -4,6 +4,8 @@ export interface AuxTaskMeta {key: string;label: string;hint: string;+ /** Plugin task that follows this slot until it is pinned itself. */+ inheritFrom?: string;}// Built-in auxiliary tasks, in the order `_AUX_TASK_SLOTS`@@ -41,6 +43,7 @@ export function auxTaskRows(key: entry.task,label: entry.label || entry.task,hint: entry.hint || "",+ ...(entry.inherit_from ? { inheritFrom: entry.inherit_from } : {}),}));return extra.length ? [...BUILTIN_AUX_TASKS, ...extra] : [...BUILTIN_AUX_TASKS];}diff --git a/web/src/pages/ModelsPage.tsx b/web/src/pages/ModelsPage.tsxindex dcfaddb66c7..30afe5ee9e7 100644--- a/web/src/pages/ModelsPage.tsx+++ b/web/src/pages/ModelsPage.tsx@@ -623,6 +623,11 @@ function AuxiliaryTasksModal({const cur = aux?.tasks.find((a) => a.task === t.key);const isAuto =!cur || cur.provider === "auto" || !cur.provider;+ const eff = cur?.effective;+ const effRoute =+ eff?.provider && eff.provider !== "auto"+ ? `${eff.provider} · ${eff.model || "(provider default)"}`+ : "auto (use main model)";return (<divkey={t.key}@@ -636,11 +641,31 @@ function AuxiliaryTasksModal({</span></div><div className="text-xs font-mono text-text-secondary truncate">- {isAuto- ? "auto (use main model)"- : `${cur?.provider} · ${cur?.model || "(provider default)"}`}+ {isAuto && t.inheritFrom+ ? `inherits ${auxTaskLabel(aux?.tasks, t.inheritFrom)} · ${effRoute}`+ : isAuto+ ? "auto (use main model)"+ : `${cur?.provider} · ${cur?.model || "(provider default)"}`}</div></div>+ {t.inheritFrom && !isAuto && (+ <Button+ size="sm"+ outlined+ onClick={async () => {+ await api.setModelAssignment({+ scope: "auxiliary",+ task: t.key,+ provider: "auto",+ model: "",+ });+ onSaved();+ }}+ className="h-6 text-xs uppercase"+ >+ Follow {auxTaskLabel(aux?.tasks, t.inheritFrom)}+ </Button>+ )}<Buttonsize="sm"outlined