Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
feat(agents): name the built-in agent Vibey, with the mascot as its avatar (#2372)
Call Whitefab529fa7edf
diff --git a/core/handlers/settings_handler.py b/core/handlers/settings_handler.pyindex 49b2df94f..60501ad31 100644--- a/core/handlers/settings_handler.py+++ b/core/handlers/settings_handler.py@@ -5,7 +5,13 @@ import loggingfrom typing import Optionalfrom modules.agents import get_agent_display_name-from modules.agents.catalog import AGENT_BACKENDS, implicit_default_rank, is_builtin_backend+from modules.agents.catalog import (+ AGENT_BACKENDS,+ builtin_agent_name_for_backend,+ display_name_for_backend,+ implicit_default_rank,+ is_builtin_backend,+)from modules.im import MessageContext, InlineKeyboard, InlineButtonfrom core.modals import RoutingModalData, RoutingModalSelectionfrom vibe import backend_model_catalog@@ -538,6 +544,11 @@ class SettingsHandler(BaseHandler):return Falsereturn bool(getattr(backend_config, "enabled", True))+ def _routing_agent_name(self, backend: str) -> str:+ """A backend choice routes to that backend's built-in Agent, under whatever name the row holds."""+ store = getattr(self.controller, "vibe_agent_store", None)+ return store.routing_name_for_backend(backend) if store is not None else builtin_agent_name_for_backend(backend)+def _resolve_route_backend(self, agent_name: Optional[str]) -> Optional[str]:if not agent_name:return None@@ -879,7 +890,7 @@ class SettingsHandler(BaseHandler):resolved_codex_agent = codex_agentrouting = RoutingSettings(- agent_name=backend,+ agent_name=self._routing_agent_name(backend),model=(opencode_modelif backend == "opencode"@@ -912,7 +923,7 @@ class SettingsHandler(BaseHandler):settings_manager.set_channel_routing(settings_key, routing)needs_new_session_hint = self._routing_update_needs_new_session_hint(context, routing)- parts = [f"{self._t('routing.label.backend')}: **{backend}**"]+ parts = [f"{self._t('routing.label.backend')}: **{display_name_for_backend(backend)}**"]if backend == "opencode":if opencode_agent:parts.append(f"{self._t('routing.label.agent')}: **{opencode_agent}**")diff --git a/core/vibe_agents.py b/core/vibe_agents.pyindex 4c9dbf12d..6b88802b5 100644--- a/core/vibe_agents.py+++ b/core/vibe_agents.py@@ -17,7 +17,14 @@ from sqlalchemy.engine import Connectionfrom sqlalchemy.exc import IntegrityErrorfrom config import paths-from modules.agents.catalog import AGENT_BACKENDS, BUILTIN_AGENT_BACKENDS, implicit_default_rank, is_builtin_backend+from modules.agents.catalog import (+ AGENT_BACKENDS,+ BUILTIN_AGENT_BACKENDS,+ builtin_agent_name_for_backend,+ display_name_for_backend,+ implicit_default_rank,+ is_builtin_backend,+)from storage.agent_session_rows import reserve_write_lockfrom storage.db import SqliteInvalidationProbe, create_sqlite_enginefrom storage.importer import ensure_sqlite_state, resolve_primary_platform_from_config@@ -894,9 +901,23 @@ class VibeAgentStore:return agentdef require_reference(self, name: str) -> VibeAgent:- """Resolve a durable Agent reference, including a disabled archive."""+ """Resolve a durable Agent reference, including a disabled archive.++ Routing saved while built-in Agents were named after their backend holds that+ backend id: when no Agent has the name, it means the backend's built-in Agent.+ """++ agent = self.get(name)+ backend = str(name or "").strip()+ if agent is None and backend in AGENT_BACKENDS:+ agent = self.get_builtin_default_agent_for_backend(backend, enabled_only=False)+ return self._require_reference_agent(agent if agent is not None else self.require(name))++ def routing_name_for_backend(self, backend: str) -> str:+ """The Agent name a backend choice routes to: its built-in Agent's, whatever the row is called."""- return self._require_reference_agent(self.require(name))+ agent = self.get_builtin_default_agent_for_backend(backend, enabled_only=False)+ return agent.name if agent is not None else builtin_agent_name_for_backend(backend)def require_reference_by_id(self, agent_id: str) -> VibeAgent:"""Resolve a durable Agent identity across rename/archive operations."""@@ -1675,8 +1696,9 @@ class VibeAgentStore:if current is not None:return self._write_builtin_state(current, metadata={**current.metadata, **metadata})# An always-enabled backend needs its own row: when another Agent holds the- # backend's name, the built-in takes the next free one.- name = self._free_agent_name(backend) if is_builtin_backend(backend) else backend+ # catalog's name for it, the built-in takes the next free one.+ base = builtin_agent_name_for_backend(backend)+ name = self._free_agent_name(base) if is_builtin_backend(backend) else baseagent_name = str(name).strip()existing = self.get(agent_name)if existing:@@ -1692,7 +1714,7 @@ class VibeAgentStore:return self.create(name=agent_name,backend=backend,- description=f"Default Agent for the {backend} backend.",+ description=f"Default Agent for the {display_name_for_backend(backend)} backend.",source="builtin",metadata=metadata,enabled=True,diff --git a/docs/plans/avibe-agent-always-on.md b/docs/plans/avibe-agent-always-on.mdindex 7ce63a23c..c9af41425 100644--- a/docs/plans/avibe-agent-always-on.md+++ b/docs/plans/avibe-agent-always-on.md@@ -32,13 +32,18 @@ backend list, it is always enabled, and it cannot be turned off.drop them from caller metadata and keep the row's own. `ensure_builtin_default_agents` always includes the built-inbackend, restores the markers of whatever row the lookup names and re-enables it, so the row exists and is enabledwhen controller startup's sync returns (Model Hub seeds the Avibe supply onto it next). Without such a row it is- created at `avibe`, or at the next free name (`avibe-2`) when a user's Agent holds `avibe`. `VibeAgentStore.update`- refuses to disable it (`agent_always_enabled`); its model, effort, prompt and description stay editable.+ created at the catalog's `builtin_agent_name` (`vibey`), or at the next free name (`vibey-2`) when a user's Agent+ holds `vibey`; a row an earlier build created as `avibe` stays the built-in. `VibeAgentStore.update` refuses to+ disable it (`agent_always_enabled`); its model, effort, prompt and description stay editable.+- **Backend choices route to the built-in.** A routing picker that chooses a backend saves that backend's built-in+ Agent's name (`VibeAgentStore.routing_name_for_backend`), never the backend id; a saved backend id that names no+ Agent resolves to the backend's built-in Agent.- **Refusals.** `POST /api/config` with `agents.avibe` returns 400 (`errors.builtinBackendConfig`, in the configured- language); `PATCH /api/agents/avibe` with `enabled: false` returns 400 `agent_always_enabled`; the CLI reports the- same code.+ language); `PATCH /api/agents/<built-in name>` (`vibey` on a fresh install) with `enabled: false` returns 400+ `agent_always_enabled`; the CLI reports the same code.- **UI.** The built-in backend shows a "Built-in" badge where other backends have their enable switch, in the list and- on its page. The built-in Avibe Agent's enable switch is locked on.+ on its page. The built-in Agent's enable switch is locked on. Users meet the backend as Vibey (the catalog's+ `display_name`), drawn with the mascot mark (`BACKEND_BRAND_MARKS.avibe`).- **Model Hub cannot supply.** `hub_supply_block(backend, hub_config)` (`config/v2_config.py`) is the one owner of whythe Model Hub leaves a backend no model to run on now. The shared model gate and the adapter's preflight render itscopy (`hub_supply_refusal`), `get_backend_connection` reports such a backend unready, and `GET /api/config` carriesdiff --git a/docs/plans/avibe-agent-core.md b/docs/plans/avibe-agent-core.mdindex 777eaccd3..825a7358a 100644--- a/docs/plans/avibe-agent-core.md+++ b/docs/plans/avibe-agent-core.md@@ -9,7 +9,8 @@ Status: **Approved direction, contracts in draft** · 2026-10-02## 0. Decision summaryAvibe builds its own first-party Agent in Python, inside this repository, as a fourth backend next to Claude Code,-Codex, and OpenCode. Its backend id is `avibe` and its display name is "Avibe Agent". It reaches models through+Codex, and OpenCode. Its backend id is `avibe`; users meet it as "Vibey", its built-in Agent is `vibey`, and the+catalog owns both names. "Avibe Agent" remains the engine's name in these plans. It reaches models throughModel Hub in each vendor's native protocol, and Avibe can steer, fork, resume, and manage its context directly.Sourcing, by layer:diff --git a/modules/agents/avibe/agent.py b/modules/agents/avibe/agent.pyindex 946ac1530..a5aa5867f 100644--- a/modules/agents/avibe/agent.py+++ b/modules/agents/avibe/agent.py@@ -88,6 +88,7 @@ from modules.agents.avibe.prompt import EnvironmentValue, current_environment, sfrom modules.agents.avibe.store import AdapterTranscriptStorefrom modules.agents.avibe.tools import ToolSuite, local_tool_suitefrom modules.agents.base import AGENT_RUNTIME_TURN_KEY, AgentRequest, BaseAgent+from modules.agents.catalog import display_name_for_backendfrom modules.im.base import FileAttachmentfrom storage import message_deliveries as delivery_storefrom storage.agent_transcript import (@@ -232,7 +233,7 @@ class AvibeAgent(BaseAgent):turn_id = str(payload.get("turn_token") or "").strip()input_id = str(payload.get("delivery_id") or "").strip()if not session_id or not turn_id or not input_id:- await self._fail(request, "generic", "Avibe Agent turn has no Session, Turn, or input identity.")+ await self._fail(request, "generic", f"{display_name_for_backend(BACKEND)} turn has no Session, Turn, or input identity.")returnturn = _Run(request, session_id, turn_id, self._instance)async with self._held(session_id, run=turn) as runtime:@@ -519,7 +520,7 @@ class AvibeAgent(BaseAgent):model = request.subagent_model or request.vibe_agent_modelif not model:- raise ValueError("The Avibe Agent has no model selected.")+ raise ValueError(f"{display_name_for_backend(BACKEND)} has no model selected.")context = request.contextasync def resolve() -> ModelSelection:diff --git a/modules/agents/avibe/errors.py b/modules/agents/avibe/errors.pyindex 13f631b23..c02ddde8b 100644--- a/modules/agents/avibe/errors.py+++ b/modules/agents/avibe/errors.py@@ -1,4 +1,4 @@-"""User-facing copy for Avibe Agent failures.+"""User-facing copy for the built-in agent's failures, named by the catalog.``AgentError.kind`` is the engine's stable discriminator (loop-control.md section 6);``AgentError.message`` is diagnostic detail and is never shown as display copy.@@ -9,6 +9,7 @@ from __future__ import annotationsfrom typing import Optional+from modules.agents.catalog import display_name_for_backendfrom vibe.i18n import t as i18n_t# Engine and provider kinds (C-2 error classification, C-3 run outcomes) with their own copy.@@ -50,4 +51,4 @@ def error_key(kind: Optional[str], *, reason: Optional[str] = None) -> str:def error_text(kind: Optional[str], lang: str, *, reason: Optional[str] = None) -> str:- return i18n_t(error_key(kind, reason=reason), lang)+ return i18n_t(error_key(kind, reason=reason), lang, backend=display_name_for_backend("avibe"))diff --git a/modules/agents/catalog.py b/modules/agents/catalog.pyindex b8d021733..a93310993 100644--- a/modules/agents/catalog.py+++ b/modules/agents/catalog.py@@ -23,6 +23,8 @@ class AgentBackendDescriptor:id: strdisplay_name: strconfig_key: str+ # The name the store creates the backend's built-in Agent under (``@name``, ``--agent name``).+ builtin_agent_name: strdefault_cli: str | Nonedefault_enabled: boollatest_probe: tuple[str, str] | None@@ -45,12 +47,13 @@ class AgentBackendDescriptor:return payload-# Registry order is the order every backend list shows: the built-in Avibe Agent first.+# Registry order is the order every backend list shows: the built-in backend first.AGENT_BACKEND_REGISTRY: Final[dict[str, AgentBackendDescriptor]] = {"avibe": AgentBackendDescriptor(id="avibe",- display_name="Avibe Agent",+ display_name="Vibey",config_key="avibe",+ builtin_agent_name="vibey",default_cli=None,default_enabled=True,latest_probe=None,@@ -67,6 +70,7 @@ AGENT_BACKEND_REGISTRY: Final[dict[str, AgentBackendDescriptor]] = {id="opencode",display_name="OpenCode",config_key="opencode",+ builtin_agent_name="opencode",default_cli="opencode",default_enabled=True,latest_probe=("github", "sst/opencode"),@@ -76,6 +80,7 @@ AGENT_BACKEND_REGISTRY: Final[dict[str, AgentBackendDescriptor]] = {id="claude",display_name="Claude Code",config_key="claude",+ builtin_agent_name="claude",default_cli="claude",default_enabled=True,latest_probe=("npm", "@anthropic-ai/claude-code"),@@ -85,6 +90,7 @@ AGENT_BACKEND_REGISTRY: Final[dict[str, AgentBackendDescriptor]] = {id="codex",display_name="Codex",config_key="codex",+ builtin_agent_name="codex",default_cli="codex",default_enabled=False,latest_probe=("npm", "@openai/codex"),@@ -159,12 +165,17 @@ def is_builtin_backend(name: str) -> bool:def implicit_default_rank(name: str) -> int:"""The one rule for a default nobody chose, among backends or their Agents: a built-in backend comes last.- Making the Avibe Agent the default for new chats is its own decision, so no fallback+ Making the built-in backend the default for new chats is its own decision, so no fallbackpicks it while another candidate exists."""return 1 if is_builtin_backend(name) else 0+def builtin_agent_name_for_backend(name: str) -> str:+ """Return the name of *name*'s built-in Agent."""+ return get_agent_backend_descriptor(name).builtin_agent_name++def display_name_for_backend(name: str) -> str:"""Return the user-facing display name for *name*."""if name in AGENT_BACKEND_REGISTRY:diff --git a/tests/test_agent_backend_catalog.py b/tests/test_agent_backend_catalog.pyindex d13fdef8c..ef93320f5 100644--- a/tests/test_agent_backend_catalog.py+++ b/tests/test_agent_backend_catalog.py@@ -1,10 +1,13 @@from __future__ import annotations+import pytest+from modules.agents.catalog import (AGENT_BACKENDS,NATIVE_CLI_BACKENDS,DEFAULT_AGENT_BACKEND,agent_backend_catalog_payload,+ builtin_agent_name_for_backend,default_cli_for_backend,default_enabled_for_backend,display_name_for_backend,@@ -19,7 +22,7 @@ from vibe import apidef test_agent_catalog_is_backend_management_source_of_truth() -> None:- # The built-in Avibe Agent leads every backend list; the default backend is unchanged.+ # The built-in backend leads every backend list; the default backend is unchanged.assert AGENT_BACKENDS == ("avibe", "opencode", "claude", "codex")assert DEFAULT_AGENT_BACKEND == "opencode"@@ -31,12 +34,16 @@ def test_agent_catalog_is_backend_management_source_of_truth() -> None:assert default_cli_for_backend(backend)assert latest_probe_for_backend(backend) is not Noneassert not is_builtin_backend(backend)+ # A native backend's built-in Agent keeps the backend's own name.+ assert builtin_agent_name_for_backend(backend) == backendassert display_name_for_backend("opencode") == "OpenCode"assert display_name_for_backend("claude") == "Claude Code"assert default_enabled_for_backend("codex") is Falseassert is_agent_backend("avibe")- assert display_name_for_backend("avibe") == "Avibe Agent"+ # Users meet the built-in backend as Vibey; its id stays ``avibe``.+ assert display_name_for_backend("avibe") == "Vibey"+ assert builtin_agent_name_for_backend("avibe") == "vibey"assert is_builtin_backend("avibe")assert default_enabled_for_backend("avibe")assert default_cli_for_backend("avibe") is None@@ -55,6 +62,7 @@ def test_agent_backend_catalog_payload_exposes_public_metadata() -> None:assert [item["id"] for item in payload] == list(AGENT_BACKENDS)assert [item["builtin"] for item in payload] == [True, False, False, False]+ assert [item["builtin_agent_name"] for item in payload] == ["vibey", "opencode", "claude", "codex"]assert payload[1]["settings_route"] == "/settings/backends/opencode"assert payload[1]["capabilities"]["supports_runtime_refresh"] is True@@ -63,3 +71,20 @@ def test_api_exposes_agent_backend_catalog() -> None:payload = api.get_agent_backend_catalog()assert [item["id"] for item in payload["backends"]] == list(AGENT_BACKENDS)++[email protected]("lang", ["en", "zh"])+def test_copy_about_the_built_in_names_it_from_the_catalog(lang) -> None:+ """Renaming the built-in is one catalog value: every message that names it takes that value."""+ from modules.agents.avibe.errors import error_text+ from vibe.i18n import t++ name = display_name_for_backend("avibe")+ for kind in ("aborted", "UnsupportedModelRoute", "ProviderProtocolViolation", None):+ text = error_text(kind, lang)+ assert name in text and "{backend}" not in text and "Avibe Agent" not in text+ for key in ("errors.modelHubDisabled", "errors.modelGatewayOff", "errors.builtinBackendConfig"):+ text = t(key, lang, backend=name, section="agents.avibe")+ assert name in text and "{backend}" not in text+ always_on = t("error.agentLifecycle.agent_always_enabled.message", lang, agent="vibey")+ assert "Avibe Agent" not in always_on and "`vibey`" in always_ondiff --git a/tests/test_agent_service.py b/tests/test_agent_service.pyindex 848de781d..6fd4858a1 100644--- a/tests/test_agent_service.py+++ b/tests/test_agent_service.py@@ -369,9 +369,9 @@ def test_model_selection_is_required_before_any_backend_dispatch(backend, model,@pytest.mark.parametrize(("backend", "hub_switch", "gateway_enabled", "refusal"),[- ("avibe", "1", False, "The model gateway is off, so Avibe Agent has no model to run on"),+ ("avibe", "1", False, "The model gateway is off, so Vibey has no model to run on"),("avibe", "1", True, "Select a model"),- ("avibe", "0", True, "Model Hub is disabled on this instance, so Avibe Agent has no model to run on"),+ ("avibe", "0", True, "Model Hub is disabled on this instance, so Vibey has no model to run on"),# A native backend runs direct without the Hub: choosing a model is still the fix.("codex", "0", True, "Select a model"),],diff --git a/tests/test_avibe_agent.py b/tests/test_avibe_agent.pyindex 834712224..5951d6b64 100644--- a/tests/test_avibe_agent.py+++ b/tests/test_avibe_agent.py@@ -1339,11 +1339,11 @@ async def test_a_refused_model_route_fails_before_the_input_is_written(assert harness.provider.requests == []# Every route runs through the Model Hub: disabled, or its gateway off, the copy names that cause.if hub_switch == "0":- expected = i18n_t("errors.modelHubDisabled", "en", backend="Avibe Agent")+ expected = i18n_t("errors.modelHubDisabled", "en", backend="Vibey")elif not gateway_enabled:- expected = i18n_t("errors.modelGatewayOff", "en", backend="Avibe Agent")+ expected = i18n_t("errors.modelGatewayOff", "en", backend="Vibey")else:- expected = i18n_t("avibeAgent.error.generic", "en")+ expected = "Vibey's run failed."assert harness.controller.im_client.sent == [f"❌ {expected}"]assert [terminal["is_error"] for terminal in harness.controller.terminals] == [True]diff --git a/tests/test_avibe_backend_registration.py b/tests/test_avibe_backend_registration.pyindex 7194d641a..251964f52 100644--- a/tests/test_avibe_backend_registration.py+++ b/tests/test_avibe_backend_registration.py@@ -84,8 +84,9 @@ _EARLIER_ROWS = {# Before the markers were the catalog's, a metadata update could strip them, and the row could then be renamed."markers-stripped": ("avibe", "avibe", "builtin", {}, False),"markers-stripped-and-renamed": ("assistant", "avibe", "builtin", {}, False),- "user-agent-same-backend": ("avibe", "avibe", "user", {}, False),- "user-agent-other-backend": ("avibe", "claude", "user", {}, True),+ # A user's own Agent already holds the catalog's name for the built-in.+ "user-agent-same-backend": ("vibey", "avibe", "user", {}, False),+ "user-agent-other-backend": ("vibey", "claude", "user", {}, True),}@@ -96,8 +97,8 @@ def test_the_startup_sync_leaves_the_built_in_avibe_agent_enabled(tmp_path, sqliWhatever backends the caller read from config, and whatever an earlier build left, exactly onebuilt-in Avibe Agent exists and is enabled once the sync returns, and the identity lookup names- it. A row the store created stays the built-in under any name; a user's own Agent keeps its name- and state.+ it. A new one is named by the catalog. A row the store created stays the built-in under any name,+ including the ``avibe`` an earlier build gave it; a user's own Agent keeps its name and state."""store = VibeAgentStore(sqlite_db_factory(tmp_path / "agents.sqlite"))try:@@ -111,12 +112,14 @@ def test_the_startup_sync_leaves_the_built_in_avibe_agent_enabled(tmp_path, sqlibuilt_in = [agent for agent in store.list_agents() if agent.backend == "avibe" and is_always_enabled_agent(agent)]assert len(built_in) == 1 and built_in[0].enabledassert store.get_builtin_default_agent_for_backend("avibe") == built_in[0]+ if earlier is None:+ assert built_in[0].name == "vibey"if earlier is not None and earlier.source == "builtin":- assert built_in[0].id == earlier.id+ assert (built_in[0].id, built_in[0].name) == (earlier.id, earlier.name)if earlier is not None and earlier.source == "user":kept = store.get_by_id(earlier.id)- assert (kept.name, kept.backend, kept.enabled, kept.source) == ("avibe", row[1], row[4], "user")- assert built_in[0].name == "avibe-2"+ assert (kept.name, kept.backend, kept.enabled, kept.source) == ("vibey", row[1], row[4], "user")+ assert built_in[0].name == "vibey-2"finally:store.close()@@ -188,9 +191,9 @@ def test_native_auth_refresh_preserves_enabled_avibe_builtin(tmp_path, sqlite_dbstore.ensure_builtin_default_agents(["avibe"])service = AgentAuthService(SimpleNamespace(vibe_agent_store=store))service._sync_builtin_default_agents()- avibe = store.get("avibe")- assert avibe is not None and avibe.enabled- assert avibe.backend == "avibe"+ vibey = store.get("vibey")+ assert vibey is not None and vibey.enabled+ assert vibey.backend == "avibe"finally:store.close()@@ -230,19 +233,19 @@ def test_avibe_agent_runs_its_catalogs_first_model_until_it_has_one(tmp_path, sqThe built-in native Agents' models feed the seed in backend-name order. AnAvibe Agent without a model cannot run a turn, so it takes its catalog'sfirst model, seeded or listed by the user, and only while it has none: a- model the user chose stands. When a user Agent already holds the name, no- built-in exists and that Agent is left alone.+ model the user chose stands. When a user Agent already holds the catalog's+ name for it, the built-in takes the next free name and that Agent is left alone."""store = VibeAgentStore(sqlite_db_factory(tmp_path / "agents.sqlite"))try:if avibe == "name taken":- store.create(name="avibe", backend="claude", model="claude-haiku-4-5")+ store.create(name="vibey", backend="claude", model="claude-haiku-4-5")store.ensure_builtin_default_agents(["opencode", "claude", "codex", "avibe"])store.create(name="reviewer", backend="claude", model="claude-sonnet-5-5")for name, model in (("claude", "claude-opus-5-5"), ("codex", "gpt-5.5"), ("opencode", "openai/gpt-6-sol")):store.update(name, model=model)if avibe == "chosen":- store.update("avibe", model="chosen-model")+ store.update("vibey", model="chosen-model")controller = Controller.__new__(Controller)controller.vibe_agent_store = storecontroller.model_hub_service = {@@ -254,7 +257,7 @@ def test_avibe_agent_runs_its_catalogs_first_model_until_it_has_one(tmp_path, sq("claude", "claude-opus-5-5"), ("codex", "gpt-5.5"), ("opencode", "openai/gpt-6-sol"),]controller._reconcile_avibe_agent_model()- assert (store.get("avibe").backend, store.get("avibe").model) == {+ assert (store.get("vibey").backend, store.get("vibey").model) == {"seeded": ("avibe", "gpt-5.5"),"user-built list": ("avibe", "my-relay-model"),"chosen": ("avibe", "chosen-model"),@@ -282,11 +285,11 @@ def test_a_lost_avibe_model_hand_off_heals_on_the_next_start(tmp_path, sqlite_db# The seed's catalog announcement: its reconciliation fails, the supply stays.monkeypatch.setattr(store, "update", locked_database)asyncio.run(controller._model_hub_catalog_changed("avibe"))- assert store.get("avibe").model is None+ assert store.get("vibey").model is Nonemonkeypatch.setattr(store, "update", real_update)asyncio.run(controller._seed_avibe_model_supply())- assert store.get("avibe").model == "gpt-5.5"+ assert store.get("vibey").model == "gpt-5.5"finally:store.close()@@ -312,10 +315,10 @@ async def test_the_first_model_a_user_adds_makes_the_avibe_agent_runnable(tmp_paservice.backend_catalog_changed = controller._model_hub_catalog_changedassert await service.seed_avibe_supply() == []- assert store.get("avibe").model is None+ assert store.get("vibey").model is Nonecandidate, = service.agent_model_candidates("avibe")["providers"]await service.set_agent_models("avibe", [], [{key: value for key, value in candidate.items() if key != "suppliers"}])- assert store.get("avibe").model == "relay-model"+ assert store.get("vibey").model == "relay-model"finally:store.close()@@ -351,6 +354,86 @@ async def test_a_starting_model_needs_a_source_that_lists_it(tmp_path, sqlite_dbavibe = service.store.load().agents["avibe"]assert (avibe.sources.order, avibe.models) == ([anthropic.id], [])- assert store.get("avibe").model is None+ assert store.get("vibey").model is None+ finally:+ store.close()++[email protected]("name_taken", [False, True])+def test_choosing_the_built_in_backend_in_an_im_picker_routes_to_its_agent(tmp_path, sqlite_db_factory, name_taken):+ """An IM picker chooses a backend; the routing it saves names that backend's built-in Agent.++ The built-in is no longer named after its backend id, so saving the id would leave a+ reference no Agent answers to, and every message on that channel would fail to resolve.+ """+ from core.handlers.settings_handler import SettingsHandler++ store = VibeAgentStore(sqlite_db_factory(tmp_path / "agents.sqlite"))+ try:+ if name_taken:+ store.create(name="vibey", backend="claude")+ store.ensure_builtin_default_agents(["claude"])+ built_in = store.get_builtin_default_agent_for_backend("avibe")+ assert built_in.name == ("vibey-2" if name_taken else "vibey")++ saved: dict[str, RoutingSettings] = {}+ settings_manager = SimpleNamespace(+ get_channel_routing=lambda key: saved.get(key),+ set_channel_routing=lambda key, routing: saved.__setitem__(key, routing),+ )+ config = V2Config.from_payload(_full_config_payload())+ controller = Controller.__new__(Controller)+ controller.primary_platform = "slack"+ controller.sqlite_engine = store.engine+ controller.config = to_app_config(config, resolve_agent_paths=False)+ controller.agent_service = SimpleNamespace(agents={"avibe": object(), "claude": object()})+ controller.vibe_agent_store = store+ controller.settings_manager = settings_manager+ controller._get_settings_key = lambda context: context.channel_id+ controller.get_settings_manager_for_context = lambda _context: settings_manager+ controller.im_client = SimpleNamespace(send_message=AsyncMock())+ controller._get_lang = lambda: "en"+ handler = SettingsHandler(controller)+ handler._get_settings_key = lambda context: context.channel_id+ handler._get_settings_manager = lambda context: settings_manager++ for backend, expected in (("avibe", built_in.name), ("claude", "claude")):+ asyncio.run(handler.handle_routing_update(+ user_id="U1", channel_id="C-test", backend=backend,+ opencode_agent=None, opencode_model=None, claude_agent=None, claude_model=None,+ notify_user=False, platform="slack",+ ))+ assert saved["C-test"].agent_name == expected+ context = MessageContext(user_id="U1", channel_id="C-test", platform="slack")+ assert controller.resolve_vibe_agent_for_context(context).name == expected+ assert controller.resolve_agent_for_context(context) == backend+ finally:+ store.close()++[email protected]("user_holds_avibe", [False, True])+def test_routing_saved_as_the_backend_id_still_resolves(tmp_path, sqlite_db_factory, user_holds_avibe):+ """Routing saved while the built-in was named ``avibe`` holds that id: it means the built-in.++ An Agent that really has the name keeps it, as any name lookup does.+ """+ store = VibeAgentStore(sqlite_db_factory(tmp_path / "agents.sqlite"))+ try:+ if user_holds_avibe:+ store.create(name="avibe", backend="claude")+ store.ensure_builtin_default_agents([])+ built_in = store.get_builtin_default_agent_for_backend("avibe")+ assert built_in.name == "vibey"+ controller = Controller.__new__(Controller)+ controller.primary_platform = "slack"+ controller.vibe_agent_store = store+ controller._get_settings_key = lambda context: context.channel_id+ controller.get_settings_manager_for_context = lambda _context: SimpleNamespace(+ get_channel_routing=lambda _key: RoutingSettings(agent_name="avibe"),+ )+ resolved = controller.resolve_vibe_agent_for_context(MessageContext(user_id="U1", channel_id="C1", platform="slack"))+ assert (resolved.name, resolved.backend) == (("avibe", "claude") if user_holds_avibe else ("vibey", "avibe"))+ with pytest.raises(Exception, match="not found"):+ store.require_reference("opencode") # A backend with no built-in row names nothing.finally:store.close()diff --git a/tests/test_im_backend_registration.py b/tests/test_im_backend_registration.pyindex a76c119e1..e4673e4fd 100644--- a/tests/test_im_backend_registration.py+++ b/tests/test_im_backend_registration.py@@ -58,7 +58,7 @@ async def test_agent_picker_includes_avibe_but_native_resume_excludes_it(platforawait bot.open_routing_modal(trigger_id=None, **routing)options = list(_options(bot._send_card_to_channel.await_args.args[1]))avibe = next(option for option in options if option["value"] == "avibe")- assert "Avibe Agent" in json.dumps(avibe)+ assert "Vibey" in json.dumps(avibe)bot._controller = SimpleNamespace(agent_service=SimpleNamespace(agents={"codex": object(), "avibe": object()}))await bot.open_resume_session_modal(diff --git a/tests/test_telegram_bot.py b/tests/test_telegram_bot.pyindex 9ec1f5cef..1586b1843 100644--- a/tests/test_telegram_bot.py+++ b/tests/test_telegram_bot.py@@ -28,7 +28,7 @@ from modules.im import telegram_apifrom config.v2_config import TelegramConfig-# The settings handler lists routing backends in catalog order, the built-in Avibe Agent first.+# The settings handler lists routing backends in catalog order, the built-in backend first.ROUTING_BACKENDS = list(AGENT_BACKENDS)@@ -1479,7 +1479,7 @@ def test_routing_state_keeps_backend_picker_entry_for_extra_backends(extra_backetext, keyboard = bot._render_routing_state(state)if extra_backend == "avibe":- assert "Avibe Agent" in text+ assert "Vibey" in textassert [button.callback_data for button in keyboard.buttons[0]] == ["tg_route:backend:avibe",diff --git a/tests/test_ui_api.py b/tests/test_ui_api.pyindex 7b498e0ba..4a9c2d47e 100644--- a/tests/test_ui_api.py+++ b/tests/test_ui_api.py@@ -3917,7 +3917,7 @@ def test_builtin_default_agent_enabled_state_follows_backend_config(tmp_path, moassert store.require("opencode").enabled is Trueassert store.require("claude").enabled is False# The built-in backend has no config entry and is always enabled.- assert store.require("avibe").enabled is True+ assert store.require("vibey").enabled is Trueassert "claude" not in [agent.name for agent in store.list_agents(include_disabled=False)]assert "claude" in [agent.name for agent in store.list_agents(include_disabled=True)]finally:@@ -3999,7 +3999,7 @@ def test_vibe_agent_api_rejects_non_boolean_enabled(tmp_path, monkeypatch):@pytest.mark.parametrize(("backends", "expected"),- [(list(AGENT_BACKENDS), "opencode"), (["claude", "avibe"], "claude"), ([], "avibe")],+ [(list(AGENT_BACKENDS), "opencode"), (["claude", "avibe"], "claude"), ([], "vibey")],)def test_builtin_default_agent_uses_first_enabled_backend_when_no_default_exists(tmp_path, monkeypatch, backends, expected@@ -4027,7 +4027,7 @@ def test_a_default_nobody_chose_is_not_the_built_in_avibe_agent(tmp_path, monkeyassert resolve_effective_default_agent(conn).name == "claude"store.set_enabled("claude", False)with store.engine.connect() as conn:- assert resolve_effective_default_agent(conn).name == "avibe"+ assert resolve_effective_default_agent(conn).name == "vibey"finally:store.close()@@ -4064,15 +4064,15 @@ def test_the_built_in_avibe_agent_cannot_be_disabled_and_stays_editable(tmp_pathstore = VibeAgentStore()try:store.ensure_builtin_default_agents([])- refused = api.update_vibe_agent("avibe", {"enabled": False})+ refused = api.update_vibe_agent("vibey", {"enabled": False})assert refused["ok"] is False and refused["code"] == "agent_always_enabled"# Dropping the built-in markers first is no way around it.- assert api.update_vibe_agent("avibe", {"metadata": {}})["ok"] is True+ assert api.update_vibe_agent("vibey", {"metadata": {}})["ok"] is Truewith pytest.raises(AgentAlwaysEnabledError):- store.set_enabled("avibe", False)- updated = api.update_vibe_agent("avibe", {"model": "team-model", "system_prompt": "Be brief."})+ store.set_enabled("vibey", False)+ updated = api.update_vibe_agent("vibey", {"model": "team-model", "system_prompt": "Be brief."})assert updated["agent"]["model"] == "team-model"- assert store.require("avibe").enabled is True+ assert store.require("vibey").enabled is True# Any other Avibe Agent is an ordinary Agent.store.create(name="helper", backend="avibe")assert api.update_vibe_agent("helper", {"enabled": False})["agent"]["enabled"] is Falsediff --git a/tests/test_ui_server_fastapi.py b/tests/test_ui_server_fastapi.pyindex d3e7d92bb..8eab2c6f2 100644--- a/tests/test_ui_server_fastapi.py+++ b/tests/test_ui_server_fastapi.py@@ -2122,7 +2122,7 @@ def test_config_api_carries_why_the_model_hub_leaves_a_backend_no_model(monkeypa("method", "path", "body", "code"),[("post", "/api/config", {"agents": {"avibe": {"enabled": False}}}, None),- ("patch", "/api/agents/avibe", {"enabled": False}, "agent_always_enabled"),+ ("patch", "/api/agents/vibey", {"enabled": False}, "agent_always_enabled"),],)def test_requests_to_turn_off_the_built_in_avibe_agent_fail_with_a_client_error(@@ -2153,7 +2153,7 @@ def test_requests_to_turn_off_the_built_in_avibe_agent_fail_with_a_client_error(assert "avibe" not in api.config_to_payload(api.load_config())["agents"]store = VibeAgentStore()try:- assert store.require("avibe").enabled is True+ assert store.require("vibey").enabled is Truefinally:store.close()diff --git a/ui/src/components/onboarding/setupTargets.ts b/ui/src/components/onboarding/setupTargets.tsindex d2d7c2624..2a283654e 100644--- a/ui/src/components/onboarding/setupTargets.ts+++ b/ui/src/components/onboarding/setupTargets.ts@@ -1,4 +1,5 @@import type { VibeAgentBrief, VibeAgentFull } from '../../context/ApiContext';+import { getBackendUiMeta } from '@/lib/agentBackends';import { ASSISTANT_ORDER, type AssistantId } from './collaborationTimeline';/**@@ -37,7 +38,7 @@ export function setupTargetFor<T extends SetupTargetAgent>(): T | null {const pool = agents.filter((agent) =>agent.backend === backend && agent.enabled && !agent.archived && isBuiltinAgent(agent));- return pool.find((agent) => agent.name === backend)+ return pool.find((agent) => agent.name === getBackendUiMeta(backend).builtinAgentName)?? pool.find((agent) => agent.name === DEFAULT_AGENT_NAME)?? [...pool].sort(byName)[0]?? null;diff --git a/ui/src/components/settings/SettingsBackendsPage.test.tsx b/ui/src/components/settings/SettingsBackendsPage.test.tsxindex d13c73502..62d262c36 100644--- a/ui/src/components/settings/SettingsBackendsPage.test.tsx+++ b/ui/src/components/settings/SettingsBackendsPage.test.tsx@@ -60,15 +60,15 @@ const renderBackends = () => render(const rowOf = async (name: string) => (await screen.findByText(name)).closest('.rounded-xl') as HTMLElement;describe('built-in backend settings', () => {- // The built-in Avibe Agent is part of the platform: listed first, always on,+ // The built-in Vibey is part of the platform: listed first, always on,// and marked Built-in where every other backend has its enable switch.it('lists Avibe first as Built-in with no switch, and its page has no switch or native actions', async () => {renderBackends();- const avibe = await rowOf('Avibe Agent');+ const avibe = await rowOf('Vibey');const rows = [...document.querySelectorAll('.rounded-xl')];expect(rows.map((row) => row.querySelector('span.font-semibold')?.textContent)).toEqual([- 'Avibe Agent', 'OpenCode', 'Claude Code', 'Codex',+ 'Vibey', 'OpenCode', 'Claude Code', 'Codex',]);expect(within(avibe).getByText('Built-in')).toBeTruthy();expect(within(avibe).queryByRole('switch')).toBeNull();@@ -84,7 +84,7 @@ describe('built-in backend settings', () => {expect(configure.getAttribute('href')).toBe('/settings/backends/avibe');fireEvent.click(configure);- await screen.findByRole('heading', { level: 1, name: 'Avibe Agent' });+ await screen.findByRole('heading', { level: 1, name: 'Vibey' });expect(await screen.findByText('Built-in')).toBeTruthy();expect(screen.queryByRole('switch')).toBeNull();expect(screen.queryByRole('textbox')).toBeNull();@@ -121,7 +121,7 @@ describe('backend attention', () => {mocks.api.getConfig.mockResolvedValue(modelHubConfig(true));renderBackends();- const avibe = await rowOf('Avibe Agent');+ const avibe = await rowOf('Vibey');expect(await within(avibe).findByText('No model selected')).toBeTruthy();expect(within(avibe).queryByText('Gateway off')).toBeNull();expect(within(await rowOf('Claude Code')).queryByText('No model selected')).toBeNull();@@ -134,13 +134,13 @@ describe('backend attention', () => {mocks.api.getConfig.mockResolvedValue(modelHubConfig(false));renderBackends();- const avibe = await rowOf('Avibe Agent');+ const avibe = await rowOf('Vibey');expect(await within(avibe).findByText('Gateway off')).toBeTruthy();expect(within(avibe).queryByText('No model selected')).toBeNull();expect(within(await rowOf('Claude Code')).queryByText('Gateway off')).toBeNull();fireEvent.click(within(avibe).getByRole('link', { name: 'Configure' }));- expect(await screen.findByText('The model gateway is off, so Avibe Agent has no model to run on.')).toBeTruthy();+ expect(await screen.findByText('The model gateway is off, so Vibey has no model to run on.')).toBeTruthy();expect(screen.getByRole('link', { name: 'Open Models page' }).getAttribute('href')).toBe('/settings/models');});@@ -153,12 +153,12 @@ describe('backend attention', () => {});renderBackends();- const avibe = await rowOf('Avibe Agent');+ const avibe = await rowOf('Vibey');expect(await within(avibe).findByText('Model Hub disabled')).toBeTruthy();expect(within(await rowOf('Claude Code')).queryByText('Model Hub disabled')).toBeNull();fireEvent.click(within(avibe).getByRole('link', { name: 'Configure' }));- expect(await screen.findByText('Model Hub is disabled on this instance, so Avibe Agent has no model to run on.')).toBeTruthy();+ expect(await screen.findByText('Model Hub is disabled on this instance, so Vibey has no model to run on.')).toBeTruthy();expect(screen.queryByRole('link', { name: 'Open Models page' })).toBeNull();});});diff --git a/ui/src/components/settings/SettingsBackendsPage.tsx b/ui/src/components/settings/SettingsBackendsPage.tsxindex b333b1212..ffd2ff618 100644--- a/ui/src/components/settings/SettingsBackendsPage.tsx+++ b/ui/src/components/settings/SettingsBackendsPage.tsx@@ -18,7 +18,7 @@ import { configChanges } from '@/lib/configMutations';import { errorMessage } from '@/lib/errorMessage';// Mirrors design.pen qVHh4 (VR/CM/Backends): one horizontal card per backend,-// in catalog order with the built-in Avibe Agent first. Each card+// in catalog order with the built-in backend first. Each card// surfaces icon + name/description + status chip + enable toggle (a// "Built-in" badge instead for the always-enabled backend) + a// "Configure" link that drills into the level-2 provider page. CLI path,diff --git a/ui/src/components/settings/models/AgentCard.test.tsx b/ui/src/components/settings/models/AgentCard.test.tsxindex 9e2d63d65..3da08b7d2 100644--- a/ui/src/components/settings/models/AgentCard.test.tsx+++ b/ui/src/components/settings/models/AgentCard.test.tsx@@ -79,7 +79,7 @@ describe('backend brand ownership', () => {{ backend: 'claude', label: 'Claude Code' },{ backend: 'codex', label: 'Codex' },{ backend: 'opencode', label: 'OpenCode' },- { backend: 'avibe', label: 'Avibe Agent' },+ { backend: 'avibe', label: 'Vibey' },] as const;for (const { backend } of rows) {locale.addResource(language, 'translation', `settings.models.backends.${backend}`, 'Obsolete localized brand');diff --git a/ui/src/components/settings/models/SettingsModelsPage.render.test.tsx b/ui/src/components/settings/models/SettingsModelsPage.render.test.tsxindex 8630f38c3..1cd061d51 100644--- a/ui/src/components/settings/models/SettingsModelsPage.render.test.tsx+++ b/ui/src/components/settings/models/SettingsModelsPage.render.test.tsx@@ -930,10 +930,10 @@ describe('SettingsModelsPage surface branches', () => {]);const stop = vi.spyOn(modelsApi, 'stopRuntime').mockResolvedValue({ ...runtime, enabled: false });const toggle = await screen.findByRole('switch', {- name: configured ? /Avibe models use|Avibe 的模型通过/i : /Turn model gateway off|关闭模型网关/i,+ name: configured ? /Vibey's models use|Vibey 的模型通过/i : /Turn model gateway off|关闭模型网关/i,});expect((toggle as HTMLButtonElement).disabled).toBe(configured);- const avibeCard = (await screen.findByText('Avibe Agent')).closest('[data-agent-backend]') as HTMLElement;+ const avibeCard = (await screen.findByText('Vibey')).closest('[data-agent-backend]') as HTMLElement;expect(within(avibeCard).getAllByRole('button', { name: /^Manage models$|^管理模型$/i }).length).toBeGreaterThan(0);await userEvent.click(within(avibeCard).getByRole('button', { name: /Runtime mode:|运行模式[::]/i }));const modeGroup = await screen.findByRole('group', { name: /Runtime mode|运行模式/i });diff --git a/ui/src/components/settings/models/SettingsModelsPage.tsx b/ui/src/components/settings/models/SettingsModelsPage.tsxindex ad4853bfa..46a6d2341 100644--- a/ui/src/components/settings/models/SettingsModelsPage.tsx+++ b/ui/src/components/settings/models/SettingsModelsPage.tsx@@ -1174,10 +1174,11 @@ export const SettingsModelsPage: React.FC = () => {|| runtimeHealth === 'installing'|| runtimeSwitchUnsupported|| stopBlocked;+ const builtinHubBackend = hubBackends.find((backend) => !getBackendUiMeta(backend).capabilities.supports_cli);const runtimeSwitchLabel = stopBlocked? supplyRead.kind === 'ready'- ? hubBackends.some((backend) => !getBackendUiMeta(backend).capabilities.supports_cli)- ? t('settings.models.shell.toggle.stopAvibeBlocked')+ ? builtinHubBackend+ ? t('settings.models.shell.toggle.stopAvibeBlocked', { name: getBackendUiMeta(builtinHubBackend).label }): t('settings.models.shell.toggle.stopBlocked', { names: hubBackends.join(', ') }): t('settings.models.shell.toggle.stopUnavailable'): runtimeEnableddiff --git a/ui/src/components/settings/models/vendorMeta.ts b/ui/src/components/settings/models/vendorMeta.tsindex 92f08e931..cc5b0e29c 100644--- a/ui/src/components/settings/models/vendorMeta.ts+++ b/ui/src/components/settings/models/vendorMeta.ts@@ -1,8 +1,9 @@// Model Hub identity colors are semantic, not vendor branding: channel/kind// owns source color, while backend identity owns Agent color.import type React from 'react';-import { Bot, KeyRound, Sparkles, Terminal } from 'lucide-react';+import { KeyRound, Sparkles } from 'lucide-react';+import { getBackendUiMeta } from '@/lib/agentBackends';import type { AgentBackend, Source } from './types';export type Accent = 'mint' | 'gold' | 'cyan' | 'violet' | 'muted';@@ -76,22 +77,9 @@ export const BACKEND_IDENTITY_ACCENT = {avibe: 'muted',} as const satisfies Record<AgentBackend, Accent>;-const BACKEND_ICON: Record<AgentBackend, IconType> = {- claude: Sparkles,- codex: Bot,- opencode: Terminal,- avibe: Bot,-};--const BACKEND_VISUAL: Record<AgentBackend, BackendVisual> = {- claude: { Icon: BACKEND_ICON.claude, accent: BACKEND_IDENTITY_ACCENT.claude },- codex: { Icon: BACKEND_ICON.codex, accent: BACKEND_IDENTITY_ACCENT.codex },- opencode: { Icon: BACKEND_ICON.opencode, accent: BACKEND_IDENTITY_ACCENT.opencode },- avibe: { Icon: BACKEND_ICON.avibe, accent: BACKEND_IDENTITY_ACCENT.avibe },-};-+// The icon is the backend's own, from the one backend visuals table.export function backendVisual(backend: AgentBackend): BackendVisual {- return BACKEND_VISUAL[backend] ?? { Icon: Bot, accent: 'muted' };+ return { Icon: getBackendUiMeta(backend).Icon, accent: BACKEND_IDENTITY_ACCENT[backend] ?? 'muted' };}// Official endpoints classify existing Sources and provide their display identity.diff --git a/ui/src/components/shared/RoutingConfigPanel.legacy.test.tsx b/ui/src/components/shared/RoutingConfigPanel.legacy.test.tsxnew file mode 100644index 000000000..115e7d803--- /dev/null+++ b/ui/src/components/shared/RoutingConfigPanel.legacy.test.tsx@@ -0,0 +1,46 @@+// @vitest-environment jsdom+import { cleanup, render } from '@testing-library/react';+import { afterEach, describe, expect, it, vi } from 'vitest';+import type { VibeAgentBrief } from '../../context/ApiContext';++const pickerValues: unknown[] = [];+vi.mock('../workbench/AgentRoutePicker', () => ({+ AgentRoutePicker: ({ value }: { value: unknown }) => {+ pickerValues.push(value);+ return null;+ },+}));+vi.mock('react-i18next', () => ({ useTranslation: () => ({ t: (key: string) => key }) }));+vi.mock('../../context/InstanceAuthorizationContext', () => ({+ useInstanceAuthorization: () => ({ capabilities: { can_manage_access_members: false } }),+}));++import { RoutingConfigPanel } from './RoutingConfigPanel';++const agent = (name: string, backend: string, source: string): VibeAgentBrief => ({+ id: `id-${name}`, name, display_name: name, description: null, backend, model: `${name}-model`,+ reasoning_effort: null, enabled: true, archived: false, archived_at: null, source, updated_at: '',+});++describe('RoutingConfigPanel', () => {+ afterEach(() => { cleanup(); pickerValues.length = 0; });++ // Routing saved while the built-in was named after its backend holds the id "avibe".+ it('shows a legacy backend-id route as that backend’s built-in Agent', () => {+ render(<RoutingConfigPanel+ value={{ custom_cwd: '', routing: { agent_name: 'avibe' }, show_message_types: [] }}+ onChange={() => {}} onBrowseDirectory={() => {}} globalConfig={{}}+ vibeAgents={[agent('vibey', 'avibe', 'builtin'), agent('claude', 'claude', 'builtin')]}+ />);+ expect(pickerValues.at(-1)).toMatchObject({ agent_backend: 'avibe', agent_name: 'vibey', model: 'vibey-model' });+ });++ it('prefers an Agent that really has the name', () => {+ render(<RoutingConfigPanel+ value={{ custom_cwd: '', routing: { agent_name: 'avibe' }, show_message_types: [] }}+ onChange={() => {}} onBrowseDirectory={() => {}} globalConfig={{}}+ vibeAgents={[agent('vibey', 'avibe', 'builtin'), agent('avibe', 'claude', 'custom')]}+ />);+ expect(pickerValues.at(-1)).toMatchObject({ agent_backend: 'claude', agent_name: 'avibe' });+ });+});diff --git a/ui/src/components/shared/RoutingConfigPanel.tsx b/ui/src/components/shared/RoutingConfigPanel.tsxindex 393fab041..665576d82 100644--- a/ui/src/components/shared/RoutingConfigPanel.tsx+++ b/ui/src/components/shared/RoutingConfigPanel.tsx@@ -92,7 +92,12 @@ export const RoutingConfigPanel: React.FC<RoutingConfigPanelProps> = ({const canManageAccessMembers = capabilities.can_manage_access_members;const { t } = useTranslation();- const selectedVibeAgent = vibeAgents.find((agent) => agent.name === value.routing.agent_name) || null;+ const routedName = value.routing.agent_name;+ // Routing saved while built-in Agents were named after their backend holds that+ // backend id; with no Agent of that name it means the backend's built-in Agent.+ const selectedVibeAgent = vibeAgents.find((agent) => agent.name === routedName)+ ?? vibeAgents.find((agent) => !agent.archived && agent.source === 'builtin' && agent.backend === routedName)+ ?? null;const defaultVibeAgent = vibeAgents.find((agent) => agent.name === defaultAgentName) || null;// Picking an agent re-seeds model/effort, so always clear the deprecated@@ -198,7 +203,7 @@ export const RoutingConfigPanel: React.FC<RoutingConfigPanelProps> = ({// agent_backend also falls back to the default agent so the columns// resolve while inheriting the global default.agent_backend: selectedVibeAgent?.backend ?? defaultVibeAgent?.backend ?? null,- agent_name: value.routing.agent_name ?? null,+ agent_name: selectedVibeAgent?.name ?? value.routing.agent_name ?? null,model: value.routing.model ?? selectedVibeAgent?.model ?? null,reasoning_effort: value.routing.reasoning_effort ?? selectedVibeAgent?.reasoning_effort ?? null,}}diff --git a/ui/src/components/steps/AgentDetection.tsx b/ui/src/components/steps/AgentDetection.tsxindex 0928bbd68..2bd91c9fc 100644--- a/ui/src/components/steps/AgentDetection.tsx+++ b/ui/src/components/steps/AgentDetection.tsx@@ -186,7 +186,7 @@ export const AgentDetection: React.FC<AgentDetectionProps> = ({ data, onNext, ontry {const candidates = vibeAgents.agents.filter((row) => !row.archived && row.backend === backend).sort((left, right) => {- const rank = (name: string) => name === backend ? 0 : name === 'default' ? 1 : 2;+ const rank = (name: string) => name === getBackendUiMeta(backend).builtinAgentName ? 0 : name === 'default' ? 1 : 2;return rank(left.name) - rank(right.name)|| (left.name < right.name ? -1 : left.name > right.name ? 1 : 0);});diff --git a/ui/src/components/visual/BackendIcon.test.tsx b/ui/src/components/visual/BackendIcon.test.tsxnew file mode 100644index 000000000..6ed7a7b55--- /dev/null+++ b/ui/src/components/visual/BackendIcon.test.tsx@@ -0,0 +1,41 @@+// @vitest-environment jsdom+import { cleanup, render } from '@testing-library/react';+import { afterEach, describe, expect, it } from 'vitest';+import { getBackendUiMeta } from '@/lib/agentBackends';+import { backendVisual } from '../settings/models/vendorMeta';+import { BACKEND_BRAND_MARKS } from './backendBrandMarks';+import { BackendAvatar, BackendIcon } from './BackendIcon';++const markPath = (container: HTMLElement) => container.querySelector('path')?.getAttribute('d');++// Vibey's face is one entry in the backend visuals table: every surface that+// draws a backend icon or an Agent avatar takes it from there.+describe('Vibey mark', () => {+ afterEach(cleanup);++ it('is the built-in backend icon, avatar and brand mark', () => {+ const vibey = BACKEND_BRAND_MARKS.avibe.path;+ const { Icon, Avatar } = getBackendUiMeta('avibe');+ expect(markPath(render(<Icon size={16} />).container)).toBe(vibey);+ expect(markPath(render(<Avatar size={16} />).container)).toBe(vibey);+ expect(markPath(render(<BackendAvatar backend="avibe" />).container)).toBe(vibey);+ expect(markPath(render(<BackendIcon backend="avibe" variant="brand" size={28} />).container)).toBe(vibey);+ // The Models route card reads the same table.+ expect(backendVisual('avibe').Icon).toBe(Icon);+ });++ it('follows the text color so it reads on dark and light themes', () => {+ const { container } = render(<BackendAvatar backend="avibe" className="size-3.5" />);+ const svg = container.querySelector('svg')!;+ expect(svg.getAttribute('class')).toBe('size-3.5');+ expect(container.querySelector('path')!.getAttribute('fill')).toBe('currentColor');+ });++ it('leaves native Agents on the generic Agent glyph', () => {+ for (const backend of ['claude', 'codex', 'opencode']) {+ const { container, unmount } = render(<BackendAvatar backend={backend} />);+ expect(container.querySelector('svg')!.getAttribute('class')).toContain('lucide-bot');+ unmount();+ }+ });+});diff --git a/ui/src/components/visual/BackendIcon.tsx b/ui/src/components/visual/BackendIcon.tsxindex 833491059..5f0d6cfea 100644--- a/ui/src/components/visual/BackendIcon.tsx+++ b/ui/src/components/visual/BackendIcon.tsx@@ -73,3 +73,13 @@ export const BackendIcon: React.FC<BackendIconProps> = ({</span>);};++/** The glyph that stands for one of the backend's Agents, drawn like a lucide icon. */+export const BackendAvatar: React.FC<{ backend: BackendId; size?: number; className?: string }> = ({+ backend,+ size,+ className,+}) => {+ const Avatar = getBackendUiMeta(backend).Avatar;+ return <Avatar size={size} className={className} />;+};diff --git a/ui/src/components/visual/BrandMarkIcon.tsx b/ui/src/components/visual/BrandMarkIcon.tsxnew file mode 100644index 000000000..99940ebcb--- /dev/null+++ b/ui/src/components/visual/BrandMarkIcon.tsx@@ -0,0 +1,14 @@+import { BACKEND_BRAND_MARKS } from './backendBrandMarks';++type BrandMark = (typeof BACKEND_BRAND_MARKS)[keyof typeof BACKEND_BRAND_MARKS];++/** A brand mark drawn the way a lucide icon is, so a table of icons can hold either. */+export function brandMarkIcon(mark: BrandMark, displayName: string) {+ const Icon = ({ size = 24, className }: { size?: number; className?: string }) => (+ <svg width={size} height={size} viewBox="0 0 24 24" className={className} aria-hidden="true" focusable="false">+ <path d={mark.path} fill={mark.fill} fillRule={mark.fillRule} />+ </svg>+ );+ Icon.displayName = displayName;+ return Icon;+}diff --git a/ui/src/components/visual/backendBrandMarks.ts b/ui/src/components/visual/backendBrandMarks.tsindex 966b17455..ea6ca7695 100644--- a/ui/src/components/visual/backendBrandMarks.ts+++ b/ui/src/components/visual/backendBrandMarks.ts@@ -1,7 +1,14 @@// Exact authored vectors from avibe-docs/design_desktop.pen.// Source SHA256: 115c69604b50e32823bcead4bd6c9269c8178b58d66a73b2e00db4a06d2caeb3.// Welcome: dAO38 / o2x2l0 / Rxw0c; inset OpenCode: VE60T (also dialog v9S8Li).+// avibe (Vibey): traced from assets/mascot/cloud-tuanzi-logo-mono.png, with the outline+// thickened inward and the eyes enlarged so the mascot still reads at 14–28px.export const BACKEND_BRAND_MARKS = {+ avibe: {+ path: "M15.24 10.14C15.07 10.16 14.88 10.23 14.74 10.33C14.59 10.42 14.45 10.6 14.36 10.73C14.27 10.87 14.23 10.97 14.21 11.14C14.18 11.31 14.18 11.59 14.21 11.77C14.23 11.94 14.28 12.04 14.36 12.17C14.45 12.3 14.58 12.45 14.71 12.55C14.83 12.64 14.97 12.7 15.11 12.74C15.25 12.77 15.39 12.79 15.55 12.77C15.71 12.74 15.94 12.66 16.08 12.58C16.22 12.5 16.3 12.44 16.4 12.3C16.49 12.16 16.61 11.92 16.65 11.73C16.69 11.55 16.68 11.34 16.65 11.17C16.62 11 16.54 10.84 16.46 10.7C16.38 10.57 16.26 10.45 16.15 10.36C16.03 10.27 15.92 10.21 15.77 10.17C15.62 10.13 15.41 10.11 15.24 10.14ZM8.35 10.14C8.17 10.17 7.97 10.25 7.82 10.36C7.67 10.47 7.53 10.66 7.45 10.8C7.36 10.93 7.34 10.98 7.32 11.14C7.3 11.3 7.3 11.6 7.32 11.77C7.34 11.93 7.36 11.98 7.45 12.11C7.53 12.24 7.71 12.45 7.82 12.55C7.94 12.65 7.99 12.67 8.14 12.7C8.28 12.74 8.51 12.79 8.7 12.77C8.89 12.74 9.12 12.63 9.26 12.55C9.4 12.46 9.45 12.41 9.54 12.27C9.63 12.13 9.75 11.88 9.79 11.7C9.84 11.53 9.83 11.36 9.79 11.2C9.76 11.04 9.68 10.87 9.61 10.73C9.53 10.6 9.44 10.48 9.32 10.39C9.21 10.29 9.08 10.21 8.92 10.17C8.76 10.13 8.54 10.11 8.35 10.14ZM11.48 2.35C11.1 2.4 10.68 2.56 10.36 2.72C10.04 2.88 9.93 3.24 9.57 3.32C9.22 3.39 8.66 3.15 8.23 3.19C7.8 3.23 7.38 3.34 7.01 3.53C6.63 3.73 6.25 4.06 5.98 4.35C5.7 4.64 5.66 5.04 5.38 5.26C5.1 5.48 4.64 5.46 4.32 5.66C4 5.86 3.7 6.15 3.47 6.45C3.25 6.74 3.08 7.08 2.97 7.42C2.87 7.75 3.03 8.12 2.85 8.45C2.66 8.77 2.1 9.09 1.88 9.36C1.65 9.62 1.59 9.8 1.5 10.01C1.41 10.22 1.35 10.33 1.31 10.61C1.27 10.88 1.21 11.3 1.25 11.67C1.29 12.04 1.56 12.55 1.56 12.83C1.56 13.11 1.34 13.15 1.25 13.36C1.16 13.58 1.07 13.84 1.03 14.11C0.99 14.39 0.98 14.74 1 15.02C1.02 15.3 1.02 15.48 1.16 15.8C1.3 16.13 1.65 16.69 1.84 16.96C2.04 17.23 2.12 17.25 2.35 17.4C2.57 17.55 3.01 17.65 3.19 17.87C3.37 18.09 3.28 18.43 3.41 18.71C3.54 19 3.73 19.32 3.97 19.59C4.21 19.85 4.58 20.14 4.85 20.31C5.12 20.48 5.24 20.55 5.6 20.62C5.96 20.69 6.65 20.75 7.01 20.75C7.36 20.74 7.47 20.5 7.73 20.59C7.99 20.68 8.22 21.1 8.57 21.28C8.93 21.46 9.47 21.62 9.86 21.69C10.25 21.75 10.58 21.72 10.92 21.65C11.26 21.59 11.57 21.28 11.92 21.28C12.28 21.28 12.69 21.59 13.05 21.65C13.4 21.72 13.72 21.72 14.05 21.69C14.38 21.65 14.78 21.53 15.05 21.44C15.32 21.34 15.47 21.23 15.68 21.09C15.88 20.95 16.05 20.65 16.27 20.59C16.5 20.53 16.78 20.72 17.02 20.75C17.27 20.77 17.47 20.78 17.74 20.75C18.01 20.71 18.37 20.63 18.65 20.53C18.93 20.42 19.16 20.29 19.4 20.12C19.64 19.95 19.89 19.75 20.09 19.5C20.29 19.24 20.5 18.9 20.62 18.62C20.75 18.34 20.63 18.04 20.84 17.81C21.05 17.57 21.61 17.41 21.87 17.21C22.14 17.01 22.28 16.81 22.44 16.58C22.59 16.36 22.72 16.12 22.81 15.83C22.91 15.55 22.97 15.13 23 14.86C23.03 14.59 23.01 14.44 22.97 14.21C22.93 13.98 22.87 13.72 22.78 13.49C22.69 13.25 22.41 13.11 22.41 12.8C22.4 12.49 22.7 11.94 22.75 11.61C22.8 11.28 22.75 11.04 22.72 10.8C22.69 10.56 22.69 10.44 22.56 10.17C22.44 9.9 22.2 9.45 21.97 9.17C21.73 8.89 21.31 8.76 21.15 8.48C21 8.2 21.14 7.83 21.03 7.48C20.91 7.13 20.69 6.69 20.47 6.38C20.24 6.08 19.97 5.86 19.65 5.66C19.33 5.47 18.83 5.45 18.56 5.22C18.28 5 18.19 4.56 17.99 4.32C17.8 4.08 17.61 3.94 17.4 3.79C17.18 3.63 16.93 3.5 16.71 3.41C16.49 3.32 16.31 3.26 16.05 3.22C15.8 3.19 15.44 3.17 15.18 3.19C14.91 3.21 14.69 3.38 14.46 3.32C14.23 3.25 14.1 2.97 13.8 2.82C13.5 2.66 13.06 2.46 12.67 2.38C12.29 2.3 11.87 2.29 11.48 2.35ZM4.88 7.32C5.04 7.15 5.2 7.03 5.48 6.91C5.75 6.79 6.28 6.72 6.51 6.6C6.74 6.49 6.73 6.42 6.85 6.23C6.97 6.03 7.06 5.63 7.23 5.41C7.4 5.2 7.65 5.04 7.88 4.94C8.12 4.84 8.39 4.8 8.64 4.82C8.89 4.83 9.16 5 9.39 5.04C9.62 5.07 9.85 5.06 10.01 5.04C10.17 5.01 10.17 5.02 10.36 4.88C10.54 4.74 10.9 4.34 11.11 4.19C11.31 4.05 11.39 4.04 11.58 4C11.76 3.97 12.03 3.96 12.2 3.97C12.38 3.98 12.44 3.99 12.61 4.07C12.78 4.14 13.03 4.28 13.2 4.41C13.38 4.55 13.51 4.78 13.64 4.88C13.77 4.98 13.83 5.01 13.99 5.04C14.15 5.06 14.39 5.07 14.61 5.04C14.83 5 15.07 4.84 15.3 4.82C15.54 4.8 15.77 4.8 16.02 4.91C16.28 5.03 16.65 5.29 16.83 5.51C17.02 5.73 17.04 6.04 17.15 6.23C17.26 6.41 17.27 6.49 17.49 6.6C17.71 6.71 18.18 6.75 18.46 6.88C18.74 7.02 19.02 7.25 19.18 7.42C19.34 7.58 19.39 7.62 19.43 7.88C19.48 8.15 19.44 8.74 19.46 8.98C19.49 9.22 19.51 9.2 19.59 9.32C19.67 9.45 19.8 9.61 19.96 9.73C20.13 9.86 20.39 9.91 20.56 10.08C20.73 10.24 20.91 10.46 21 10.7C21.09 10.94 21.14 11.22 21.09 11.51C21.04 11.81 20.76 12.24 20.68 12.49C20.61 12.73 20.55 12.68 20.65 12.99C20.76 13.29 21.2 13.98 21.31 14.3C21.42 14.62 21.36 14.74 21.34 14.93C21.33 15.11 21.3 15.23 21.22 15.4C21.13 15.56 20.98 15.79 20.84 15.93C20.71 16.06 20.56 16.14 20.4 16.21C20.24 16.28 20.03 16.28 19.87 16.37C19.71 16.45 19.56 16.59 19.46 16.71C19.36 16.83 19.35 16.85 19.28 17.09C19.2 17.33 19.19 17.85 19.03 18.15C18.86 18.45 18.55 18.71 18.31 18.87C18.07 19.03 17.81 19.08 17.59 19.12C17.37 19.16 17.18 19.13 16.99 19.09C16.8 19.05 16.63 18.91 16.43 18.87C16.23 18.83 15.97 18.84 15.8 18.87C15.63 18.9 15.58 18.91 15.4 19.06C15.21 19.21 14.91 19.61 14.68 19.78C14.45 19.94 14.27 20 14.02 20.03C13.76 20.06 13.4 20.03 13.14 19.96C12.89 19.9 12.67 19.69 12.49 19.62C12.3 19.55 12.21 19.53 12.05 19.53C11.88 19.53 11.7 19.54 11.48 19.62C11.26 19.7 10.99 19.93 10.73 20C10.48 20.06 10.17 20.05 9.95 20.03C9.73 20 9.62 20.01 9.39 19.84C9.15 19.67 8.74 19.19 8.54 19.03C8.34 18.86 8.36 18.9 8.2 18.87C8.04 18.84 7.8 18.83 7.57 18.87C7.34 18.91 7.02 19.08 6.82 19.12C6.62 19.16 6.53 19.15 6.35 19.12C6.17 19.09 5.98 19.08 5.76 18.93C5.53 18.78 5.21 18.58 5.01 18.21C4.8 17.84 4.68 17.02 4.54 16.71C4.39 16.4 4.34 16.48 4.13 16.37C3.92 16.25 3.46 16.15 3.25 16.02C3.04 15.9 2.98 15.81 2.88 15.61C2.77 15.42 2.65 15.12 2.63 14.86C2.61 14.6 2.64 14.35 2.75 14.05C2.87 13.75 3.23 13.32 3.32 13.05C3.4 12.78 3.35 12.67 3.28 12.42C3.22 12.18 2.97 11.83 2.91 11.58C2.85 11.32 2.87 11.12 2.94 10.89C3.01 10.66 3.13 10.39 3.32 10.2C3.5 10.01 3.86 9.87 4.04 9.73C4.21 9.59 4.3 9.48 4.38 9.36C4.46 9.24 4.48 9.25 4.5 9.01C4.53 8.78 4.47 8.23 4.54 7.95C4.6 7.67 4.72 7.49 4.88 7.32Z",+ fill: "currentColor",+ fillRule: "evenodd",+ },claude: {path: "M4.709 15.955l4.72-2.647 0.08-0.23-0.08-0.128h-0.229l-0.79-0.048-2.698-0.073-2.339-0.097-2.266-0.122-0.571-0.121-0.536-0.705 0.055-0.352 0.48-0.321 0.686 0.06 1.52 0.103 2.278 0.158 1.652 0.097 2.449 0.255h0.389l0.055-0.157-0.134-0.098-0.103-0.097-2.358-1.596-2.552-1.688-1.336-0.972-0.724-0.491-0.364-0.462-0.158-1.008 0.656-0.722 0.881 0.06 0.225 0.061 0.893 0.686 1.908 1.476 2.491 1.833 0.365 0.304 0.145-0.103 0.019-0.073-0.164-0.274-1.355-2.446-1.446-2.49-0.644-1.032-0.17-0.619a2.97 2.97 0 0 1-0.104-0.729l0.748-1.013 0.413-0.134 0.996 0.134 0.42 0.364 0.62 1.414 1.002 2.229 1.555 3.03 0.456 0.898 0.243 0.832 0.091 0.255h0.158v-0.146l0.128-1.706 0.237-2.095 0.23-2.695 0.08-0.76 0.376-0.91 0.747-0.492 0.584 0.28 0.48 0.685-0.067 0.444-0.286 1.851-0.559 2.903-0.364 1.942h0.212l0.243-0.242 0.985-1.306 1.652-2.064 0.73-0.82 0.85-0.904 0.547-0.431h1.033l0.76 1.129-0.34 1.166-1.064 1.347-0.881 1.142-1.264 1.7-0.79 1.36 0.073 0.11 0.188-0.02 2.856-0.606 1.543-0.28 1.841-0.315 0.833 0.388 0.091 0.395-0.328 0.807-1.969 0.486-2.309 0.462-3.439 0.813-0.042 0.03 0.049 0.061 1.549 0.146 0.662 0.036h1.622l3.02 0.225 0.79 0.522 0.474 0.638-0.079 0.485-1.215 0.62-1.64-0.389-3.829-0.91-1.312-0.329h-0.182v0.11l1.093 1.068 2.006 1.81 2.509 2.33 0.127 0.578-0.322 0.455-0.34-0.049-2.205-1.657-0.851-0.747-1.926-1.62h-0.128v0.17l0.444 0.649 2.345 3.521 0.122 1.08-0.17 0.353-0.608 0.213-0.668-0.122-1.374-1.925-1.415-2.167-1.143-1.943-0.14 0.08-0.674 7.254-0.316 0.37-0.729 0.28-0.607-0.461-0.322-0.747 0.322-1.476 0.389-1.924 0.315-1.53 0.286-1.9 0.17-0.632-0.012-0.042-0.14 0.018-1.434 1.967-2.18 2.945-1.726 1.845-0.414 0.164-0.717-0.37 0.067-0.662 0.401-0.589 2.388-3.036 1.44-1.882 0.93-1.086-0.006-0.158h-0.055l-6.343 4.116-1.13 0.146-0.487-0.456 0.061-0.746 0.231-0.243 1.908-1.312-0.006 0.006z",fill: "#D97757",diff --git a/ui/src/components/visual/index.ts b/ui/src/components/visual/index.tsindex f4f5a564a..2fc6731d2 100644--- a/ui/src/components/visual/index.ts+++ b/ui/src/components/visual/index.ts@@ -3,7 +3,7 @@ export { EyebrowBadge } from './EyebrowBadge';export { StatusPill } from './StatusPill';export { PlatformIcon } from './PlatformIcon';export type { PlatformId } from './PlatformIcon';-export { BackendIcon } from './BackendIcon';+export { BackendAvatar, BackendIcon } from './BackendIcon';export type { BackendId } from './BackendIcon';export { ProgressBar } from './ProgressBar';export { WizardCard } from './WizardCard';diff --git a/ui/src/components/workbench/AgentRoutePicker.test.tsx b/ui/src/components/workbench/AgentRoutePicker.test.tsxindex c946acac6..6da7fcce8 100644--- a/ui/src/components/workbench/AgentRoutePicker.test.tsx+++ b/ui/src/components/workbench/AgentRoutePicker.test.tsx@@ -134,7 +134,7 @@ const highlighted = (label: string) => {};const openMenu = async (user: ReturnType<typeof userEvent.setup>) => {- await user.click(screen.getByRole('button', { name: /claude/ }));+ await user.click(screen.getByRole('button', { name: /claude/i }));await screen.findByText('chat.picker.model');};diff --git a/ui/src/components/workbench/AgentRoutePicker.tsx b/ui/src/components/workbench/AgentRoutePicker.tsxindex 7c3054d4d..b2798ab24 100644--- a/ui/src/components/workbench/AgentRoutePicker.tsx+++ b/ui/src/components/workbench/AgentRoutePicker.tsx@@ -1,7 +1,7 @@import { useCallback, useEffect, useMemo, useRef, useState } from 'react';import { useTranslation } from 'react-i18next';import { useNavigate } from 'react-router-dom';-import { Bot, ChevronDown, Loader2, Plus, Search, Sparkles } from 'lucide-react';+import { ChevronDown, Loader2, Plus, Search, Sparkles } from 'lucide-react';import clsx from 'clsx';import { useApi } from '../../context/ApiContext';@@ -12,6 +12,8 @@ import { useRouteSurfaceActive } from '../../lib/routeSurfaceActivity';import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover';import { Button } from '../ui/button';import { Input } from '../ui/input';+import { BackendAvatar } from '../visual';+import { getBackendUiMeta } from '@/lib/agentBackends';// The route fields the picker reads. A subset of WorkbenchSession (chat) and of// WorkbenchSessionCreate (the create flow), so both can pass their object directly.@@ -292,8 +294,8 @@ export const AgentRoutePicker: React.FC<AgentRoutePickerProps> = ({compactMobile ? 'hidden md:inline-flex' : 'inline-flex',)}>- <Bot className="size-3" />- {backend}+ <BackendAvatar backend={backend} className="size-3" />+ {getBackendUiMeta(backend).label}</span>)}{compactMobile ? (diff --git a/ui/src/components/workbench/AgentsPage.test.tsx b/ui/src/components/workbench/AgentsPage.test.tsxindex 371e532c8..ad295f1d4 100644--- a/ui/src/components/workbench/AgentsPage.test.tsx+++ b/ui/src/components/workbench/AgentsPage.test.tsx@@ -258,7 +258,7 @@ describe('AgentsPage contextual selection', () => {expect(within(row('codex')).queryByText('settings.models.gateway.agentIssues.modelMissing')).toBeNull();});- it('lists, selects and edits an Avibe Agent without a native import option or CLI detail', async () => {+ it('lists, selects and edits a Vibey Agent without a native import option or CLI detail', async () => {const agent = { ...brief('local-helper', 'before'), backend: 'avibe' };const changed = { ...agent, description: 'updated in place' };const updateVibeAgent = vi.fn().mockResolvedValue(fullAgent(changed, 'prompt'));@@ -268,7 +268,7 @@ describe('AgentsPage contextual selection', () => {undefined, undefined, updateVibeAgent,);renderPage(api, { canManageAgents: true, entry: '/agents?agent=local-helper' });- expect(await screen.findByText('Avibe Agent')).toBeTruthy();+ expect(await screen.findByText('Vibey')).toBeTruthy();const row = screen.getAllByText('local-helper').find((node) => node.closest('button'))?.closest('button');expect(row).toBeTruthy();fireEvent.click(row!);@@ -276,10 +276,10 @@ describe('AgentsPage contextual selection', () => {fireEvent.change(description, { target: { value: 'updated in place' } });fireEvent.blur(description);await waitFor(() => expect(updateVibeAgent).toHaveBeenCalledWith('local-helper', { description: 'updated in place' }));- expect(screen.queryByText(/Avibe Agent CLI/)).toBeNull();- expect(screen.getByText('agents.detail.backendName:{"backend":"Avibe Agent"}')).toBeTruthy();+ expect(screen.queryByText(/Vibey CLI/)).toBeNull();+ expect(screen.getByText('agents.detail.backendName:{"backend":"Vibey"}')).toBeTruthy();fireEvent.click(screen.getByRole('button', { name: 'agents.import' }));- expect(screen.queryByText('agents.importFrom:{"backend":"Avibe Agent"}')).toBeNull();+ expect(screen.queryByText('agents.importFrom:{"backend":"Vibey"}')).toBeNull();// Display names are not translation-key suffixes: a catalog brand change// must keep the native import actions translated and correctly scoped.for (const label of ['Claude Code', 'OpenCode', 'Codex']) {@@ -287,12 +287,12 @@ describe('AgentsPage contextual selection', () => {}});- // The built-in Avibe Agent is part of the platform: model, effort and prompt- // stay editable, but nothing turns it off. Another Avibe Agent is ordinary.+ // The built-in Vibey is part of the platform: model, effort and prompt+ // stay editable, but nothing turns it off. Another Agent on its backend is ordinary.it.each([- ['avibe', 'builtin', { builtin: true, builtin_default: true, lock_delete: true }, true],+ ['vibey', 'builtin', { builtin: true, builtin_default: true, lock_delete: true }, true],['local-helper', 'custom', {}, false],- ])('locks the enable switch of %s only when it is the built-in Avibe Agent', async (name, source, metadata, locked) => {+ ])('locks the enable switch of %s only when it is the built-in Vibey', async (name, source, metadata, locked) => {const agent = { ...brief(name, 'avibe agent'), backend: 'avibe', source };const full = fullAgent(agent, 'prompt');const api = makeApi(@@ -303,7 +303,8 @@ describe('AgentsPage contextual selection', () => {const toggle = await screen.findByRole('switch', { name: 'agents.detail.enabled' });expect(toggle.hasAttribute('disabled')).toBe(locked);- expect(Boolean(screen.queryByText('agents.detail.alwaysEnabledHint'))).toBe(locked);+ // The hint names the built-in by the catalog's display name.+ expect(Boolean(screen.queryByText('agents.detail.alwaysEnabledHint:{"name":"Vibey"}'))).toBe(locked);});it('opens the Agent named by ?agent= instead of the default one', async () => {diff --git a/ui/src/components/workbench/AgentsPage.tsx b/ui/src/components/workbench/AgentsPage.tsxindex ea94d4b71..056523523 100644--- a/ui/src/components/workbench/AgentsPage.tsx+++ b/ui/src/components/workbench/AgentsPage.tsx@@ -64,6 +64,7 @@ import {type Backend,} from '../../lib/backendAccent';import { getBackendUiMeta, type NativeCliBackend } from '@/lib/agentBackends';+import { BackendAvatar } from '../visual';import { isBuiltinAgent } from '../onboarding/setupTargets';import { modelsApi } from '../settings/models/modelsApi';import { agentsWithoutModel } from '../settings/models/supply';@@ -1608,7 +1609,7 @@ export const AgentsPage: React.FC = () => {return (<div key={backend} className="flex flex-col gap-2"><div className="flex items-center gap-2 px-1">- <Bot className={clsx('size-3.5', BACKEND_ICON_CLASS[backend])} />+ <BackendAvatar backend={backend} className={clsx('size-3.5', BACKEND_ICON_CLASS[backend])} /><span className={clsx('text-[13px] font-bold', BACKEND_ICON_CLASS[backend])}>{BACKEND_LABEL[backend]}</span>@@ -1784,7 +1785,7 @@ const OrganizationAgentOnboarding: React.FC<OrganizationAgentOnboardingProps> =<div className="min-w-0"><div className="truncate text-[12px] font-semibold text-foreground">{agent.name}</div><div className="truncate font-mono text-[10px] text-muted">- {agent.backend} · {system ? t('agents.onboarding.system') : t('agents.onboarding.custom')}+ {getBackendUiMeta(agent.backend).label} · {system ? t('agents.onboarding.system') : t('agents.onboarding.custom')}</div></div><Badge variant={statusVariant} className="max-w-[45vw]">@@ -1891,7 +1892,7 @@ const BackendFilter: React.FC<BackendFilterProps> = ({ value, onChange }) => {value === key ? 'bg-cyan-soft text-cyan-ink' : 'text-foreground hover:bg-foreground/[0.04]',)}>- {key !== 'all' && <Bot className={clsx('size-3.5', BACKEND_ICON_CLASS[key])} />}+ {key !== 'all' && <BackendAvatar backend={key} className={clsx('size-3.5', BACKEND_ICON_CLASS[key])} />}<span>{key === 'all' ? t('agents.backendAll') : BACKEND_LABEL[key]}</span></button>))}@@ -1932,7 +1933,7 @@ const ImportMenu: React.FC<ImportMenuProps> = ({ onImport, importing }) => {}}className="flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-[12px] text-foreground transition hover:bg-foreground/[0.04] disabled:opacity-50">- <Bot className={clsx('size-3.5', BACKEND_ICON_CLASS[backend])} />+ <BackendAvatar backend={backend} className={clsx('size-3.5', BACKEND_ICON_CLASS[backend])} /><span>{t('agents.importFrom', { backend: BACKEND_LABEL[backend] })}</span></button>))}@@ -2271,7 +2272,7 @@ const AgentDetailPanel: React.FC<DetailProps> = ({ agent, isDefault, canEdit, ca<div className="flex min-w-0 flex-1 flex-col"><div className="truncate text-[16px] font-bold text-foreground">{agent.name}</div><div className="truncate text-[10px] text-muted">- Vibe Agent · {agent.backend} backend+ Vibe Agent · {getBackendUiMeta(agent.backend).label} backend</div></div><Button@@ -2296,7 +2297,9 @@ const AgentDetailPanel: React.FC<DetailProps> = ({ agent, isDefault, canEdit, ca<div className="flex min-w-0 flex-col gap-0.5"><span className="text-[13px] font-bold text-foreground">{t('agents.detail.enabled')}</span><span className="text-[11px] text-muted">- {t(alwaysEnabled ? 'agents.detail.alwaysEnabledHint' : 'agents.detail.enabledHint')}+ {alwaysEnabled+ ? t('agents.detail.alwaysEnabledHint', { name: getBackendUiMeta(agent.backend).label })+ : t('agents.detail.enabledHint')}</span></div><Switch@@ -2401,7 +2404,7 @@ const AgentDetailPanel: React.FC<DetailProps> = ({ agent, isDefault, canEdit, cadon't mistake it for a note about the field above (the name). */}<Field label={t('agents.detail.backend')}><div className="flex items-center gap-2 rounded-lg border border-border bg-surface-3 px-3 py-2">- <Bot className={clsx('size-3 shrink-0', BACKEND_ICON_CLASS[agent.backend as Backend] || 'text-muted')} />+ <BackendAvatar backend={agent.backend} className={clsx('size-3 shrink-0', BACKEND_ICON_CLASS[agent.backend as Backend] || 'text-muted')} /><span className={clsx('font-mono text-[12px] font-bold', BACKEND_ICON_CLASS[agent.backend as Backend] || 'text-foreground')}>{agent.backend}</span>diff --git a/ui/src/components/workbench/ChatArchivedReadOnly.test.tsx b/ui/src/components/workbench/ChatArchivedReadOnly.test.tsxindex 193d2b8c3..317f0ce29 100644--- a/ui/src/components/workbench/ChatArchivedReadOnly.test.tsx+++ b/ui/src/components/workbench/ChatArchivedReadOnly.test.tsx@@ -13,7 +13,8 @@ import type { VaultRequest, VibeAgentBrief, WorkbenchMessage, WorkbenchSession }import { ToastProvider } from '../../context/ToastProvider';import { isVoiceControlDisabled } from '../../lib/voiceRecording';import { ChatHeaderBar, MessageRow, ThinkingBubble } from './ChatPage';-import { sessionAgentDisplayName } from './sessionAgentName';+import { sessionAgentBackend, sessionAgentDisplayName } from './sessionAgentName';+import { BACKEND_BRAND_MARKS } from '../visual/backendBrandMarks';import { Composer } from './Composer';import { QuickReplies } from './QuickReplies';import {@@ -257,6 +258,30 @@ describe('archived Agent display names', () => {});});+describe('chat avatars', () => {+ const vibey = { ...archivedPm, id: 'agt-vibey', name: 'vibey', display_name: 'vibey', backend: 'avibe' };+ const claude = { ...archivedPm, id: 'agt-claude', name: 'claude', display_name: 'claude', backend: 'claude' };++ it('resolves the backend a reply comes from, through an inherited default', () => {+ const inherits = session({ agent_id: null, agent_name: null, agent_backend: null });+ expect(sessionAgentBackend(inherits, [claude, vibey], 'vibey')).toBe('avibe');+ // A runtime-owned row passes no default, so it borrows no avatar.+ expect(sessionAgentBackend(inherits, [claude, vibey], null)).toBeNull();+ expect(sessionAgentBackend(session({ agent_id: vibey.id, agent_name: 'vibey', agent_backend: null }), [claude, vibey], 'claude')).toBe('avibe');+ expect(sessionAgentBackend(session({ agent_backend: 'claude' }), [claude, vibey], 'vibey')).toBe('claude');+ });++ it('draws Vibey in the thinking and transcript bubbles of a session that inherits it', () => {+ const inherits = session({ agent_id: null, agent_name: null, agent_backend: null });+ const thinking = render(<ThinkingBubble session={inherits} agentDisplayName={null} agentBackend="avibe" />);+ const message = render(+ <MessageRow message={agentWithQuickReplies()} session={inherits} agentBackend="avibe" messageFontSize={13} />,+ );+ expect(thinking).toContain(BACKEND_BRAND_MARKS.avibe.path);+ expect(message).toContain(BACKEND_BRAND_MARKS.avibe.path);+ });+});+describe('nonterminal Agent output', () => {it('keeps Agent identity but uses the muted boundary presentation', () => {for (const message of [diff --git a/ui/src/components/workbench/ChatPage.tsx b/ui/src/components/workbench/ChatPage.tsxindex ca1cd9efa..35c368c23 100644--- a/ui/src/components/workbench/ChatPage.tsx+++ b/ui/src/components/workbench/ChatPage.tsx@@ -131,7 +131,7 @@ import { Markdown } from '../ui/markdown';import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover';import { VaultApprovalFloat, VaultChatRequests } from '../ui/vault-chat-requests';import { VaultProvisionDialogProvider, VaultRequestCard } from '../ui/vault-request-card';-import { StatusPill } from '../visual';+import { BackendAvatar, StatusPill } from '../visual';import { usePendingVaultRequests } from '../../lib/usePendingVaultRequests';import { useCoalescedWrite } from '../../lib/useCoalescedWrite';import { hasInAppBackEntry } from '../../lib/navigationHistory';@@ -158,8 +158,9 @@ import {} from '../../lib/agentActivity';import { errorMessage } from '@/lib/errorMessage';import { pendingInitialMessageHandoff } from '@/lib/chatInitialMessage';-import { sessionAgentDisplayName } from './sessionAgentName';+import { sessionAgentBackend, sessionAgentDisplayName } from './sessionAgentName';import { useModelHubRecovery } from '../../lib/modelHubRecovery';+import { getBackendUiMeta } from '@/lib/agentBackends';// While a turn is in flight, reconcile the working/Stop state against the// controller on this cadence (the backend ``GET /turn-state`` is authoritative).@@ -2857,6 +2858,8 @@ export const ChatPage: React.FC = () => {}const agentDisplayName = sessionAgentDisplayName(session, agents);+ // A runtime-owned row never inherits the default Agent, so it borrows no avatar from it.+ const agentBackend = sessionAgentBackend(session, agents, readOnlyReason === 'system' ? null : defaultAgentName);return (// Fill the viewport so the transcript is the only scrolling region and@@ -2975,6 +2978,7 @@ export const ChatPage: React.FC = () => {messages={messages}session={session}agentDisplayName={agentDisplayName}+ agentBackend={agentBackend}working={working}modelRecovery={runtimeState.model_recovery}hasOlder={!!olderCursor}@@ -3301,7 +3305,7 @@ const ActivityRow: React.FC<{// cannot read as in-progress (its kind label already says "Queued message").const queued = isQueuedRun(item);const subtitle =- kind === 'backend_activity' && item.backend ? `${item.backend} · ${relative}` : relative;+ kind === 'backend_activity' && item.backend ? `${getBackendUiMeta(item.backend).label} · ${relative}` : relative;const body = (<><span@@ -3930,6 +3934,8 @@ interface TranscriptProps {messages: WorkbenchMessage[];session: WorkbenchSession;agentDisplayName: string | null;+ /** The backend the replies come from, resolved through an inherited default. */+ agentBackend?: string | null;working: boolean;modelRecovery?: SessionRuntimeState['model_recovery'];hasOlder: boolean;@@ -3994,6 +4000,7 @@ export const Transcript: React.FC<TranscriptProps> = ({messages,session,agentDisplayName,+ agentBackend = null,working,modelRecovery,hasOlder,@@ -4539,6 +4546,7 @@ export const Transcript: React.FC<TranscriptProps> = ({message={message}session={session}agentDisplayName={agentDisplayName}+ agentBackend={agentBackend}messageFontSize={messageFontSize}onQuickReply={onQuickReply}onFailureRetry={onFailureRetry}@@ -4570,6 +4578,7 @@ export const Transcript: React.FC<TranscriptProps> = ({<ThinkingBubblesession={session}agentDisplayName={agentDisplayName}+ agentBackend={agentBackend}onShowActivity={!activity?.enabled ? activity?.onEnable : undefined}statusLabel={recovery.label}/>@@ -4628,9 +4637,10 @@ const ForkSourceBanner: React.FC<{ sourceSessionId: string; sourceTitle: stringexport const ThinkingBubble: React.FC<{session: WorkbenchSession;agentDisplayName: string | null;+ agentBackend?: string | null;onShowActivity?: () => void;statusLabel?: string | null;-}> = ({ session, agentDisplayName, onShowActivity, statusLabel }) => {+}> = ({ session, agentDisplayName, agentBackend = null, onShowActivity, statusLabel }) => {const { t } = useTranslation();const dots = (<div className="flex items-center gap-1 py-0.5">@@ -4643,7 +4653,7 @@ export const ThinkingBubble: React.FC<{<div className="flex w-full justify-start"><div className="group/message flex max-w-[min(92%,860px)] flex-col items-start gap-1"><div className="flex items-center gap-2 px-0.5">- <RoleAvatar tone="mint"><Bot /></RoleAvatar>+ <RoleAvatar tone="mint"><BackendAvatar backend={agentBackend ?? session.agent_backend ?? ''} /></RoleAvatar><span className="text-[11px] font-medium text-muted">{statusLabel || agentDisplayName || session.agent_name || t('chat.thinking')}</span>@@ -4672,6 +4682,8 @@ type MessageRowProps = {message: WorkbenchMessage;session: WorkbenchSession;agentDisplayName?: string | null;+ /** The backend the replies come from, resolved through an inherited default. */+ agentBackend?: string | null;messageFontSize: number;onQuickReply?: (messageId: string, choice: string) => boolean | void | Promise<boolean | void>;onFailureRetry?: (messageId: string) => Promise<boolean>;@@ -4704,6 +4716,7 @@ export const MessageRow = memo(function MessageRow({message,session,agentDisplayName,+ agentBackend = null,messageFontSize,onQuickReply,onFailureRetry,@@ -5037,7 +5050,7 @@ export const MessageRow = memo(function MessageRow({<div data-message-id={message.id} className={rowClass('justify-start')}><div className="group/message flex max-w-[min(92%,860px)] flex-col items-start gap-1"><div className="flex items-center gap-2 px-0.5">- <RoleAvatar tone={isAgent ? 'mint' : 'muted'}>{agentIdentity ? <Bot /> : <Info />}</RoleAvatar>+ <RoleAvatar tone={isAgent ? 'mint' : 'muted'}>{agentIdentity ? <BackendAvatar backend={agentBackend ?? session.agent_backend ?? ''} /> : <Info />}</RoleAvatar>{name && <span className="text-[11px] font-medium text-muted">{name}</span>}</div>{bodyNode || attachmentsNode ? (diff --git a/ui/src/components/workbench/GlobalPromptsDialog.test.tsx b/ui/src/components/workbench/GlobalPromptsDialog.test.tsxindex 29f8fb737..5ed8f2913 100644--- a/ui/src/components/workbench/GlobalPromptsDialog.test.tsx+++ b/ui/src/components/workbench/GlobalPromptsDialog.test.tsx@@ -32,7 +32,7 @@ describe('native global prompts', () => {render(<GlobalPromptsDialog open onClose={vi.fn()} />);await screen.findByRole('tab', { name: 'Claude Code' });expect(screen.getAllByRole('tab').map((tab) => tab.textContent)).toEqual(['OpenCode', 'Claude Code', 'Codex']);- expect(screen.queryByRole('tab', { name: 'Avibe Agent' })).toBeNull();+ expect(screen.queryByRole('tab', { name: 'Vibey' })).toBeNull();fireEvent.click(screen.getByRole('button', { name: 'globalPrompts.sync' }));await waitFor(() => expect(mocks.saveGlobalPrompts).toHaveBeenCalledWith({content: 'Instructions', backends: ['opencode', 'claude', 'codex'],diff --git a/ui/src/components/workbench/HarnessPage.tsx b/ui/src/components/workbench/HarnessPage.tsxindex 79f1d1060..52b0c8268 100644--- a/ui/src/components/workbench/HarnessPage.tsx+++ b/ui/src/components/workbench/HarnessPage.tsx@@ -98,6 +98,7 @@ import { Badge } from '../ui/badge';import { Button } from '../ui/button';import { Switch } from '../ui/switch';import { errorMessage } from '@/lib/errorMessage';+import { getBackendUiMeta } from '@/lib/agentBackends';// Detail-panel schedule, in words. The literal it was derived from is printed// beside it by the caller — humanizing must never be the only copy of a value@@ -1864,7 +1865,7 @@ export const RunDetail: React.FC<RunDetailProps> = ({ run, agent }) => {</DetailField><DetailField label={t('harness.detail.agent')}><span className="text-[12px] text-foreground">{agentDisplayName(run.agent_name, agent)}</span>- {run.agent_backend && <span className="ml-2 font-mono text-[10px] text-muted">{run.agent_backend}</span>}+ {run.agent_backend && <span className="ml-2 font-mono text-[10px] text-muted">{getBackendUiMeta(run.agent_backend).label}</span>}{run.model && <span className="ml-2 font-mono text-[10px] text-muted">{run.model}</span>}</DetailField>{(run.definition_name || run.definition_id) && (diff --git a/ui/src/components/workbench/NewAgentDialog.test.tsx b/ui/src/components/workbench/NewAgentDialog.test.tsxindex d6526c079..db036e3dd 100644--- a/ui/src/components/workbench/NewAgentDialog.test.tsx+++ b/ui/src/components/workbench/NewAgentDialog.test.tsx@@ -99,10 +99,10 @@ afterEach(() => {describe('NewAgentDialog', () => {// The picker used a second label table, so its Claude label disagreed with// Settings and Model Hub. All backend choices share the catalog brands, and- // they follow catalog order, the built-in Avibe Agent first.+ // they follow catalog order, the built-in Vibey first.it('uses the catalog brand names and order for every backend choice', () => {renderDialog();- const labels = ['Avibe Agent', 'OpenCode', 'Claude Code', 'Codex'];+ const labels = ['Vibey', 'OpenCode', 'Claude Code', 'Codex'];for (const label of labels) {expect(screen.getByRole('button', { name: new RegExp(label) }).textContent).toContain(label);}@@ -113,10 +113,10 @@ describe('NewAgentDialog', () => {expect(screen.queryByText('Claude', { exact: true })).toBeNull();});- it('creates an Avibe Agent through the existing backend and model pickers', async () => {+ it('creates a Vibey Agent through the existing backend and model pickers', async () => {modelCatalog = { models: ['avibe-model'], reasoningOptions: { 'avibe-model': [] } };const { createVibeAgent } = renderDialog();- fireEvent.click(screen.getByRole('button', { name: /Avibe Agent/ }));+ fireEvent.click(screen.getByRole('button', { name: /Vibey/ }));fireEvent.change(screen.getByPlaceholderText('agents.create.namePlaceholder'), { target: { value: 'local-helper' } });fireEvent.click(screen.getByRole('combobox'));fireEvent.click(screen.getByRole('option', { name: 'avibe-model' }));diff --git a/ui/src/components/workbench/NewAgentDialog.tsx b/ui/src/components/workbench/NewAgentDialog.tsxindex de624bd1e..84f1f1abe 100644--- a/ui/src/components/workbench/NewAgentDialog.tsx+++ b/ui/src/components/workbench/NewAgentDialog.tsx@@ -1,6 +1,6 @@import { useEffect, useMemo, useState } from 'react';import { useTranslation } from 'react-i18next';-import { ArrowRight, Bot, Maximize2, X } from 'lucide-react';+import { ArrowRight, Maximize2, X } from 'lucide-react';import clsx from 'clsx';import { useApi } from '../../context/ApiContext';@@ -18,6 +18,7 @@ import { Button } from '../ui/button';import { errorMessage } from '@/lib/errorMessage';import { useRouteSurfaceWindowEvent } from '@/lib/routeSurfaceActivity';import { getBackendUiMeta, type AgentBackendId } from '@/lib/agentBackends';+import { BackendAvatar } from '../visual';import { BACKEND_ORDER, BACKEND_LABEL } from '@/lib/backendAccent';const BACKEND_OPTIONS = BACKEND_ORDER.map((id) => ({@@ -218,7 +219,7 @@ export const NewAgentDialog: React.FC<NewAgentDialogProps> = ({ open, onClose, o)}><div className={clsx('flex size-8 items-center justify-center rounded-lg border', active ? cc.border + ' ' + cc.bg : 'border-border-strong')}>- <Bot className={clsx('size-4', active ? cc.text : 'text-muted')} />+ <BackendAvatar backend={opt.key} className={clsx('size-4', active ? cc.text : 'text-muted')} /></div><span className={clsx('text-[12px] font-bold', active ? cc.text : 'text-foreground')}>{opt.label}diff --git a/ui/src/components/workbench/sessionAgentName.ts b/ui/src/components/workbench/sessionAgentName.tsindex a7f65ed4d..cb200211d 100644--- a/ui/src/components/workbench/sessionAgentName.ts+++ b/ui/src/components/workbench/sessionAgentName.ts@@ -16,3 +16,21 @@ export function sessionAgentDisplayName(agents.find((candidate) => candidate.name === agentName);return agent?.display_name?.trim() || agentName;}++// Which backend a chat session's replies come from, for their avatar: the session's+// own backend, else its Agent's, else (while it inherits the global default) the+// default Agent's. A caller passes no default for a row that never inherits one.+export function sessionAgentBackend(+ session: Pick<WorkbenchSession, 'agent_id' | 'agent_name' | 'agent_backend'>,+ agents: VibeAgentBrief[],+ defaultAgentName: string | null,+): string | null {+ const backend = session.agent_backend?.trim();+ if (backend) return backend;+ const agentName = session.agent_name?.trim() || null;+ const agent = agentName+ ? (session.agent_id ? agents.find((candidate) => candidate.id === session.agent_id) : undefined)+ ?? agents.find((candidate) => candidate.name === agentName)+ : defaultAgentName ? agents.find((candidate) => candidate.name === defaultAgentName) : undefined;+ return agent?.backend ?? null;+}diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.jsonindex debe92aa1..e68b2a3af 100644--- a/ui/src/i18n/en.json+++ b/ui/src/i18n/en.json@@ -887,7 +887,7 @@"turnOn": "Turn model gateway on","turnOff": "Turn model gateway off","stopBlocked": "Switch {{names}} to Direct before turning the model gateway off",- "stopAvibeBlocked": "Avibe models use the model gateway; remove them before turning it off.",+ "stopAvibeBlocked": "{{name}}'s models use the model gateway; remove them before turning it off.","stopUnavailable": "Agent routing status is unavailable; the model gateway cannot be turned off yet"},"closed": {@@ -4025,7 +4025,7 @@"detail": {"enabled": "Enabled","enabledHint": "Disabling keeps the agent in the registry but excludes it from new sessions; running sessions are unaffected.",- "alwaysEnabledHint": "The built-in Avibe Agent is always enabled. You can still adjust its model, effort, and system prompt.",+ "alwaysEnabledHint": "{{name}} is built in and always enabled. You can still adjust its model, effort, and system prompt.","defaultTitle": "Default agent","defaultHint": "New chats and IM messages without an explicit agent route to this one.","defaultActive": "Default",diff --git a/ui/src/i18n/zh.json b/ui/src/i18n/zh.jsonindex 0ee6e21a6..7f425d061 100644--- a/ui/src/i18n/zh.json+++ b/ui/src/i18n/zh.json@@ -887,7 +887,7 @@"turnOn": "开启模型网关","turnOff": "关闭模型网关","stopBlocked": "请先将 {{names}} 切换为直连,再关闭模型网关",- "stopAvibeBlocked": "Avibe 的模型通过模型网关运行,请先移除这些模型再关闭网关。",+ "stopAvibeBlocked": "{{name}} 的模型通过模型网关运行,请先移除这些模型再关闭网关。","stopUnavailable": "暂时无法读取 Agent 路由状态,当前不能关闭模型网关"},"closed": {@@ -4025,7 +4025,7 @@"detail": {"enabled": "已启用","enabledHint": "关掉后此 Agent 不会被新会话选用,已运行的会话不受影响",- "alwaysEnabledHint": "内置的 Avibe Agent 始终启用,仍可调整模型、Effort 与系统提示词。",+ "alwaysEnabledHint": "{{name}} 是内置 Agent,始终启用,仍可调整模型、Effort 与系统提示词。","defaultTitle": "默认 Agent","defaultHint": "未指定 Agent 的新会话和 IM 消息都会路由到这个 Agent。","defaultActive": "默认",diff --git a/ui/src/lib/agentBackendCatalog.generated.ts b/ui/src/lib/agentBackendCatalog.generated.tsindex a41706f01..dfe3d359c 100644--- a/ui/src/lib/agentBackendCatalog.generated.ts+++ b/ui/src/lib/agentBackendCatalog.generated.ts@@ -3,8 +3,9 @@export const BACKEND_CATALOG = [{"id": "avibe",- "display_name": "Avibe Agent",+ "display_name": "Vibey","config_key": "avibe",+ "builtin_agent_name": "vibey","default_cli": null,"default_enabled": true,"latest_probe": null,@@ -23,6 +24,7 @@ export const BACKEND_CATALOG = ["id": "opencode","display_name": "OpenCode","config_key": "opencode",+ "builtin_agent_name": "opencode","default_cli": "opencode","default_enabled": true,"latest_probe": [@@ -44,6 +46,7 @@ export const BACKEND_CATALOG = ["id": "claude","display_name": "Claude Code","config_key": "claude",+ "builtin_agent_name": "claude","default_cli": "claude","default_enabled": true,"latest_probe": [@@ -65,6 +68,7 @@ export const BACKEND_CATALOG = ["id": "codex","display_name": "Codex","config_key": "codex",+ "builtin_agent_name": "codex","default_cli": "codex","default_enabled": false,"latest_probe": [diff --git a/ui/src/lib/agentBackends.ts b/ui/src/lib/agentBackends.tsindex c8bbf2587..f8ed124ac 100644--- a/ui/src/lib/agentBackends.ts+++ b/ui/src/lib/agentBackends.ts@@ -1,6 +1,8 @@import type React from 'react';import { Bot, Sparkles, Terminal } from 'lucide-react';import { BACKEND_CATALOG } from './agentBackendCatalog.generated';+import { BACKEND_BRAND_MARKS } from '@/components/visual/backendBrandMarks';+import { brandMarkIcon } from '@/components/visual/BrandMarkIcon';type BackendDescriptor = (typeof BACKEND_CATALOG)[number];export type AgentBackendId = BackendDescriptor['id'];@@ -12,6 +14,8 @@ type BackendCapabilities = { [K in keyof BackendDescriptor['capabilities']]: booexport type BackendUiMeta = {id: BackendId;label: string;+ /** The name the store gives this backend's built-in Agent. */+ builtinAgentName: string;defaultCli: string | null;defaultEnabled: boolean;/** Part of the platform: always enabled, with no switch. */@@ -23,6 +27,9 @@ export type BackendUiMeta = {publisher: string;accent: 'mint' | 'cyan' | 'violet';Icon: React.ComponentType<{ size?: number; className?: string }>;+ /** What stands for one of this backend's Agents (Agent lists, chat heads): its persona+ * where it has one, otherwise the generic Agent glyph. */+ Avatar: React.ComponentType<{ size?: number; className?: string }>;initials: string;blockCls: string;glyphCls: string;@@ -30,6 +37,8 @@ export type BackendUiMeta = {iconCls: string;};+const VibeyMark = brandMarkIcon(BACKEND_BRAND_MARKS.avibe, 'VibeyMark');+// Presentation only. Membership, defaults and capabilities come from Python.const BACKEND_VISUALS = {opencode: {@@ -37,6 +46,7 @@ const BACKEND_VISUALS = {publisher: 'opencode.ai',accent: 'cyan',Icon: Terminal,+ Avatar: Bot,initials: 'OP',blockCls: 'border-mint/40 bg-mint/[0.10] text-mint-ink',glyphCls: 'text-mint-ink',@@ -48,6 +58,7 @@ const BACKEND_VISUALS = {publisher: 'Anthropic',accent: 'mint',Icon: Sparkles,+ Avatar: Bot,initials: 'CL',blockCls: 'border-[rgba(217,119,87,0.4)] bg-[rgba(217,119,87,0.10)] text-[#e8a87c]',glyphCls: 'text-cyan-ink',@@ -59,6 +70,7 @@ const BACKEND_VISUALS = {publisher: 'OpenAI',accent: 'violet',Icon: Bot,+ Avatar: Bot,initials: 'CO',blockCls: 'border-violet/40 bg-violet/[0.10] text-violet-ink',glyphCls: 'text-violet-ink',@@ -69,20 +81,22 @@ const BACKEND_VISUALS = {nativeOrder: 3,publisher: 'Avibe',accent: 'mint',- Icon: Bot,- initials: 'AV',+ Icon: VibeyMark,+ Avatar: VibeyMark,+ initials: 'VB',blockCls: 'border-mint/40 bg-mint/[0.10] text-mint-ink',glyphCls: 'text-mint-ink',tileCls: 'bg-mint-soft',iconCls: 'text-mint-ink',},} as const satisfies Record<AgentBackendId, Pick<BackendUiMeta,- 'nativeOrder' | 'publisher' | 'accent' | 'Icon' | 'initials' | 'blockCls' | 'glyphCls' | 'tileCls' | 'iconCls'>>;+ 'nativeOrder' | 'publisher' | 'accent' | 'Icon' | 'Avatar' | 'initials' | 'blockCls' | 'glyphCls' | 'tileCls' | 'iconCls'>>;export const AGENT_BACKENDS = BACKEND_CATALOG.map((backend) => ({...BACKEND_VISUALS[backend.id],id: backend.id,label: backend.display_name,+ builtinAgentName: backend.builtin_agent_name,defaultCli: backend.default_cli,defaultEnabled: backend.default_enabled,builtin: backend.builtin,@@ -131,6 +145,7 @@ export function getBackendUiMeta(id: string): BackendUiMeta {AGENT_BACKEND_BY_ID[id] || {id,label: id.replace(/_/g, ' ').replace(/\b\w/g, (char) => char.toUpperCase()),+ builtinAgentName: id,defaultCli: null,defaultEnabled: false,builtin: false,@@ -147,6 +162,7 @@ export function getBackendUiMeta(id: string): BackendUiMeta {publisher: '',accent: 'mint',Icon: Bot,+ Avatar: Bot,initials: id.slice(0, 2).toUpperCase(),blockCls: 'border-border bg-surface-2 text-foreground',glyphCls: 'text-muted',diff --git a/ui/src/lib/backendAccent.ts b/ui/src/lib/backendAccent.tsindex aa1efbf35..8cf0a44f3 100644--- a/ui/src/lib/backendAccent.ts+++ b/ui/src/lib/backendAccent.ts@@ -6,7 +6,7 @@import { AGENT_BACKENDS, isNativeCliBackend, type AgentBackendId, type NativeCliBackend } from './agentBackends';-// Catalog order, the built-in Avibe Agent first: the one order every backend list shows.+// Catalog order, the built-in backend first: the one order every backend list shows.export const BACKEND_ORDER = AGENT_BACKENDS.map((backend) => backend.id);export const NATIVE_BACKEND_ORDER = BACKEND_ORDER.filter(isNativeCliBackend);export type Backend = AgentBackendId;diff --git a/vibe/i18n/en.json b/vibe/i18n/en.jsonindex c1a9b156d..1808a282d 100644--- a/vibe/i18n/en.json+++ b/vibe/i18n/en.json@@ -394,7 +394,7 @@},"agentLifecycle": {"agent_always_enabled": {- "message": "Agent `{agent}` is the built-in Avibe Agent and is always enabled.",+ "message": "Agent `{agent}` is built in and always enabled.","hint": "You can still change its model, effort, and system prompt."},"agent_archived_read_only": {@@ -1543,7 +1543,7 @@"refusal": "The model declined to answer this request.","safety": "The model stopped this reply for safety reasons.","emptyResponse": "The model returned an empty reply. Try again or rephrase the request.",- "interrupted": "The Avibe Agent run was interrupted before it finished.",+ "interrupted": "{backend}'s run was interrupted before it finished.","contextExhausted": "This conversation has grown too long to continue reliably. Start a new session with /new.","toolOutputTooLarge": "The latest tool output does not fit this model's context, even shortened. Ask for a smaller part (a narrower command, or a file range with offset and limit), or switch to a model with a larger context.","inputTooLarge": "This message does not fit this model's context. Send a shorter message, or switch to a model with a larger context.",@@ -1555,9 +1555,9 @@"auth": "The model provider rejected the credentials of this route. Check the Model Hub source.","invalidRequest": "The model provider rejected the request.","modelError": "The model stopped with an error.",- "toolsUnsupported": "The selected model does not support tools, which the Avibe Agent needs. Choose another model.",- "providerProtocol": "The model provider sent a reply the Avibe Agent cannot use.",- "generic": "The Avibe Agent run failed."+ "toolsUnsupported": "The selected model does not support tools, which {backend} needs. Choose another model.",+ "providerProtocol": "The model provider sent a reply {backend} cannot use.",+ "generic": "{backend}'s run failed."}}}diff --git a/vibe/i18n/zh.json b/vibe/i18n/zh.jsonindex d48f2c03e..d9f220d2d 100644--- a/vibe/i18n/zh.json+++ b/vibe/i18n/zh.json@@ -394,7 +394,7 @@},"agentLifecycle": {"agent_always_enabled": {- "message": "Agent `{agent}` 是内置的 Avibe Agent,始终启用。",+ "message": "Agent `{agent}` 是内置 Agent,始终启用。","hint": "仍可调整它的模型、Effort 与系统提示词。"},"agent_archived_read_only": {@@ -1543,7 +1543,7 @@"refusal": "模型拒绝回答这个请求。","safety": "模型出于安全原因停止了这次回复。","emptyResponse": "模型返回了空回复。请重试,或换一种说法。",- "interrupted": "Avibe Agent 的运行在完成前被中断。",+ "interrupted": "{backend} 的运行在完成前被中断。","contextExhausted": "本次对话已经太长,无法可靠地继续。请发送 /new 开始一个新会话。","toolOutputTooLarge": "最新的工具输出即使截短也放不进当前模型的上下文。请只取其中一部分(用更窄的命令,或用 offset/limit 读取文件的一段),或换用上下文更大的模型。","inputTooLarge": "这条消息放不进当前模型的上下文。请发送更短的消息,或换用上下文更大的模型。",@@ -1555,9 +1555,9 @@"auth": "模型服务商拒绝了此路由的凭据。请检查 Model Hub 来源。","invalidRequest": "模型服务商拒绝了这个请求。","modelError": "模型因错误而停止。",- "toolsUnsupported": "所选模型不支持工具,而 Avibe Agent 需要工具。请换一个模型。",- "providerProtocol": "模型服务商返回的回复 Avibe Agent 无法使用。",- "generic": "Avibe Agent 运行失败。"+ "toolsUnsupported": "所选模型不支持工具,而 {backend} 需要工具。请换一个模型。",+ "providerProtocol": "模型服务商返回的回复 {backend} 无法使用。",+ "generic": "{backend} 运行失败。"}}}diff --git a/vibe/ui_server.py b/vibe/ui_server.pyindex 5c7a7e2a0..82a00bc47 100644--- a/vibe/ui_server.py+++ b/vibe/ui_server.py@@ -4509,6 +4509,17 @@ def _config_payload_for_context(config: Any, authorization_context: Any) -> dictreturn api.non_owner_config_payload(config)+def _routing_name_for_backend(backend: str) -> str:+ """A modal's backend choice saved as routing names that backend's built-in Agent."""+ from core.vibe_agents import VibeAgentStore++ store = VibeAgentStore()+ try:+ return store.routing_name_for_backend(backend)+ finally:+ store.close()++def _config_api_payload_for_context(config: Any, authorization_context: Any) -> dict[str, Any]:"""Return the complete payload exposed by the config API."""@@ -13155,7 +13166,7 @@ if os.environ.get("E2E_TEST_MODE", "").lower() in ("true", "1", "yes"):from config.v2_settings import RoutingSettingsch.routing = RoutingSettings(- agent_name=modal_values.get("backend", "opencode"),+ agent_name=_routing_name_for_backend(modal_values.get("backend", "opencode")),model=(modal_values.get("opencode_model")or modal_values.get("claude_model")@@ -13203,7 +13214,7 @@ if os.environ.get("E2E_TEST_MODE", "").lower() in ("true", "1", "yes"):from config.v2_settings import RoutingSettingsch.routing = RoutingSettings(- agent_name=modal_values.get("backend", "opencode"),+ agent_name=_routing_name_for_backend(modal_values.get("backend", "opencode")),model=(modal_values.get("opencode_model")or modal_values.get("claude_model")