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): tell the user how to give Vibey a model (#2503)
Call Whitea614cc50c071
diff --git a/config/v2_config.py b/config/v2_config.pyindex 73376a98e..e40a85569 100644--- a/config/v2_config.py+++ b/config/v2_config.py@@ -1603,21 +1603,28 @@ def is_model_hub_enabled(environ: Optional[Mapping[str, str]] = None) -> bool:return source.get(MODEL_HUB_ENABLED_ENV, "1").strip().lower() in {"1", "true", "yes", "on"}-HubSupplyBlock = Literal["hub_disabled", "gateway_off"]+HubSupplyBlock = Literal["hub_disabled", "gateway_off", "no_source"]def hub_supply_block(backend: str, hub: Optional["ModelHubConfig"]) -> Optional[HubSupplyBlock]:"""Why the Model Hub leaves ``backend`` no model to run on now, or ``None``: the one owner of that answer.A backend without its own CLI gets every model through the Hub, so the operator's- Model Hub switch (``VIBE_MODEL_HUB_ENABLED``) leaves it none. Any backend the Hub- supplies has none while the user has turned the gateway off in Models.+ Model Hub switch (``VIBE_MODEL_HUB_ENABLED``) leaves it none, and so does a Hub with no+ source that may supply it. Any backend the Hub supplies has none while the user has+ turned the gateway off in Models. Without a Hub config only the switch can be read."""if not is_model_hub_enabled():return None if backend in NATIVE_CLI_BACKENDS else "hub_disabled"- if hub is not None and not hub.enabled and hub.agents[backend].mode == "hub":+ if hub is None:+ return None+ if not hub.enabled and hub.agents[backend].mode == "hub":return "gateway_off"+ if backend not in NATIVE_CLI_BACKENDS and not any(+ hub.source_eligible_for_backend(source, backend) for source in hub.sources+ ):+ return "no_source"return Nonediff --git a/core/agent_auth_service.py b/core/agent_auth_service.pyindex 11c803cd9..6d0fa87d1 100644--- a/core/agent_auth_service.py+++ b/core/agent_auth_service.py@@ -17,7 +17,7 @@ from collections.abc import Mappingfrom dataclasses import dataclass, fieldfrom datetime import datetime, timedelta, timezonefrom typing import TYPE_CHECKING, Any, Callable, Coroutine, Optional-from modules.agents.catalog import AGENT_BACKENDS, NATIVE_CLI_BACKENDS, is_builtin_backend+from modules.agents.catalog import AGENT_BACKENDS, NATIVE_CLI_BACKENDS, display_name_for_backend, is_builtin_backendfrom core.backend_failure import terminal_backend_failure_outputfrom core.backend_restart import NativeCredentialLease, NativeMigrationBlockedError, finish_native_operation@@ -915,6 +915,9 @@ class AgentAuthService:await self._send_message(context, f"❌ {self._t('command.setup.claudeMethodUsage')}")return+ if backend_hint and is_builtin_backend(backend_hint):+ await self._send_builtin_setup_guidance(context, backend_hint)+ returnif backend_hint and backend_hint not in NATIVE_CLI_BACKENDS:await self._send_message(context, f"❌ {self._t('command.setup.unsupportedBackend', backend=backend_hint)}")return@@ -935,6 +938,23 @@ class AgentAuthService:backend = Noneawait self.start_setup(context, backend=backend, force_reset=True, claude_login_method=claude_login_method)+ async def _send_builtin_setup_guidance(self, context: MessageContext, backend: str) -> None:+ """Answer `/setup` for the built-in backend: it signs in to nothing, its models come from Model Hub.++ When the Model Hub leaves it no model now (``hub_supply_block``: disabled, gateway off,+ no source), that cause is the answer, as it is for a Turn; otherwise the guidance is.+ """+ from modules.agents.model_hub import ModelSupplyRefusal, hub_supply_refusal, models_next_step++ refusal = await asyncio.to_thread(hub_supply_refusal, self.controller, backend, self._lang())+ if refusal is not None:+ answer, cause = f"❌ {refusal}", refusal+ else:+ answer = self._t("command.setup.builtinBackend", backend=display_name_for_backend(backend))+ cause = ModelSupplyRefusal(answer, fixed_in_models=True)+ next_step = models_next_step(self.controller, context, cause=cause)+ await self._send_message(context, "\n".join(line for line in (answer, next_step) if line))+async def start_setup(self,context: MessageContext,@@ -944,6 +964,9 @@ class AgentAuthService:) -> None:"""Start an auth flow for the resolved backend."""resolved_backend = backend or self.controller.resolve_agent_for_context(context)+ if is_builtin_backend(resolved_backend):+ await self._send_builtin_setup_guidance(context, resolved_backend)+ returnif resolved_backend not in NATIVE_CLI_BACKENDS:await self._send_message(context,diff --git a/core/agent_model_selection.py b/core/agent_model_selection.pyindex 9a96c32b0..3b1d7b340 100644--- a/core/agent_model_selection.py+++ b/core/agent_model_selection.py@@ -1,10 +1,11 @@"""Enforce Avibe's ownership of the model sent to a backend."""+from modules.agents.catalog import display_name_for_backendfrom vibe.i18n import tdef require_agent_model(model: str | None, backend: str, language: str = "en") -> str:selected = str(model or "").strip()if not selected or (backend == "claude" and selected.lower() == "default"):- raise ValueError(t("errors.agentModelRequired", language, backend=backend))+ raise ValueError(t("errors.agentModelRequired", language, backend=display_name_for_backend(backend)))return selecteddiff --git a/core/backend_failure.py b/core/backend_failure.pyindex 551ab98ab..02d636fd5 100644--- a/core/backend_failure.py+++ b/core/backend_failure.py@@ -136,7 +136,7 @@ def _controller_language(controller: Any) -> str:def _model_hub_failure(controller: Any, context: Any, request: Any, backend: str-) -> tuple[str | None, str | None] | None:+) -> tuple[str | None, str | None, Any] | None:"""Render exact live Hub evidence, never parse a native exception wrapper.The registry owns ambiguity, pending-request, and Stop guards. Without that@@ -165,6 +165,7 @@ def _model_hub_failure(return (render_turn_outcome_copy(projection, _controller_language(controller)),projection.local_error_detail,+ projection,)return None@@ -381,8 +382,9 @@ async def emit_backend_failure(auth recovery supplied that immediate notification.``cause`` is the exception the failure reports, when the adapter has one. A- Model Hub turn refusal names its own cause, so it never reaches the text- auth heuristic, which would misread a model id that says ``oauth``.+ Model Hub refusal names its own cause, so it never reaches the text auth+ heuristic, which would misread a model id that says ``oauth``; when its fix+ is in Models, the notice ends with where to make it.``delivery``, when supplied, is filled in with what the notify attempt actuallyproved. A durable Turn or legacy Harness Run supplies an evidence object@@ -390,11 +392,22 @@ async def emit_backend_failure(return alone is not enough to distinguish a delivered message from a lost one."""+ from modules.agents.model_hub import is_model_hub_refusal, models_next_step+backend_name = str(backend or "backend").strip() or "backend"error, visible = _failure_texts(backend_name, diagnostic, display_text)hub_failure = _model_hub_failure(controller, context, request, backend_name)if hub_failure is not None and hub_failure[0] is not None:visible = hub_failure[0]+ # A Model Hub refusal whose fix is in Models ends with where to make it.+ next_step = models_next_step(+ controller,+ context,+ cause=cause,+ outcome=hub_failure[2] if hub_failure is not None and hub_failure[0] is not None else None,+ )+ if next_step:+ visible = f"{visible}\n{next_step}"terminal = _terminal_output(request, output)if hub_failure is not None and hub_failure[1] and not getattr(controller, "shutdown_requested", False):terminal = replace(@@ -444,11 +457,9 @@ async def emit_backend_failure(# function at all; see ``emit_replayed_backend_failure``. A bypass argument here# was the previous shape, and it left the replay inside this lifecycle with its# live behaviours switched off one at a time.- from core.handlers.model_hub.service import turn_refusal-auth_service = getattr(controller, "agent_auth_service", None)maybe_recover = getattr(auth_service, "maybe_emit_auth_recovery_message", None)- if not harness_run_id and callable(maybe_recover) and turn_refusal(cause) is None:+ if not harness_run_id and callable(maybe_recover) and not is_model_hub_refusal(cause):try:handled_auth = await maybe_recover(context,diff --git a/core/handlers/message_handler.py b/core/handlers/message_handler.pyindex d9f7dd5f3..46d303a05 100644--- a/core/handlers/message_handler.py+++ b/core/handlers/message_handler.py@@ -905,6 +905,7 @@ class MessageHandler(BaseHandler):error_text,display_text=error_text,request=request,+ cause=error,)async def _admit_human_delivery(diff --git a/docs/COMMANDS.md b/docs/COMMANDS.mdindex 5ee6d0fc5..ff40a8d01 100644--- a/docs/COMMANDS.md+++ b/docs/COMMANDS.md@@ -360,6 +360,7 @@ Repair backend login or provider auth through the IM flow./setup claude/setup codex/setup opencode+/setup vibey/setup cc/setup cx/setup oc@@ -370,9 +371,9 @@ Repair backend login or provider auth through the IM flow.#### What it does- resolves the backend for the current scope, unless an explicit backend is given-- starts a backend-specific auth recovery flow-- sends browser links, device codes, or follow-up prompts into chat-- waits for completion and verifies login status+- for Claude Code, Codex and OpenCode: starts a backend-specific auth recovery flow, sends browser links, device+ codes, or follow-up prompts into chat, then waits for completion and verifies login status+- for Vibey: starts no flow, because Vibey signs in to nothing; it replies where Vibey's models come from (see below)#### Backend-specific behavior@@ -403,6 +404,15 @@ Repair backend login or provider auth through the IM flow./setup code <value>```+##### Vibey++- Vibey gets every model through Model Hub, so there is nothing to sign in to+- replies that model sources are added and managed in Models, ending with where to find Models: the public+ `/settings/models` URL when Avibe Cloud is paired, otherwise the Avibe Workbench+- when Model Hub leaves Vibey no model right now, replies with that cause instead: the gateway is off, or no model+ source exists yet (both end with the same pointer to Models), or Model Hub is disabled on the instance (no pointer,+ since Models is unavailable)+#### Permission- admin-onlydiff --git a/docs/COMMANDS_ZH.md b/docs/COMMANDS_ZH.mdindex ab199d471..d3d306116 100644--- a/docs/COMMANDS_ZH.md+++ b/docs/COMMANDS_ZH.md@@ -345,6 +345,7 @@ Avibe 当前有两套命令面:/setup claude/setup codex/setup opencode+/setup vibey/setup cc/setup cx/setup oc@@ -355,9 +356,9 @@ Avibe 当前有两套命令面:#### 作用- 如果没有显式 backend,就使用当前作用域绑定的 backend-- 启动对应后端的认证修复流程-- 把浏览器链接、device code、后续输入提示发回聊天-- 等待流程完成后做状态校验+- 对 Claude Code、Codex、OpenCode:启动对应后端的认证修复流程,把浏览器链接、device code、后续输入提示发回聊天,+ 等待流程完成后做状态校验+- 对 Vibey:不启动任何流程,因为 Vibey 不需要登录;只回复它的模型从哪里来(见下文)#### 分 backend 行为@@ -388,6 +389,14 @@ Avibe 当前有两套命令面:/setup code <value>```+##### Vibey++- Vibey 的模型全部来自模型网关,没有需要登录的东西+- 回复:模型来源在「模型」页添加和管理,并说明在哪里打开「模型」页:已连接 Avibe Cloud 时给出公网+ `/settings/models` 链接,否则指向 Avibe 工作台+- 模型网关此刻给不了 Vibey 模型时,改为回复原因:网关已关闭,或还没有模型来源(两者都同样指向「模型」页);或本实例停用了模型网关+ (不给指引,因为「模型」页不可用)+#### 权限- 仅管理员diff --git a/modules/agents/model_hub.py b/modules/agents/model_hub.pyindex 5a5155b59..13fb31cc8 100644--- a/modules/agents/model_hub.py+++ b/modules/agents/model_hub.py@@ -33,6 +33,7 @@ from core.handlers.model_hub.provenance import (TurnOutcomeProjectionInput,exact_hop_blockers,is_unlisted_model_outcome,+ project_turn_outcome_copy,render_turn_outcome_copy,supply_interruption_reason,)@@ -366,11 +367,30 @@ def launch_refusal_copy(controller: Any, error: BaseException) -> str | None:return render_turn_outcome_copy(outcome, _language(controller))-_HUB_SUPPLY_REFUSALS = {"hub_disabled": "errors.modelHubDisabled", "gateway_off": "errors.modelGatewayOff"}+_HUB_SUPPLY_REFUSALS = {+ "hub_disabled": "errors.modelHubDisabled",+ "gateway_off": "errors.modelGatewayOff",+ "no_source": "errors.modelSourceRequired",+}+# The turn-outcome copy that already sends its reader to Models.+_MODELS_ROUTE_REFUSALS = frozenset({"modelHub.launch.interrupted", "modelHub.launch.route_unconfigured"})+MODELS_PAGE_PATH = "/settings/models"++class ModelSupplyRefusal(ValueError):+ """A turn refused because the Model Hub leaves its backend no model to run on.++ It carries its copy, and whether Models is where the fix is: everywhere but an+ instance whose operator switched the Model Hub off, which takes Models away too.+ """-def hub_supply_refusal(controller: Any, backend: str, language: str) -> str | None:- """The copy a turn shows when ``hub_supply_block`` names why ``backend`` has no model, else ``None``."""+ def __init__(self, copy: str, *, fixed_in_models: bool) -> None:+ super().__init__(copy)+ self.fixed_in_models = fixed_in_models+++def hub_supply_refusal(controller: Any, backend: str, language: str) -> ModelSupplyRefusal | None:+ """The refusal a turn raises when ``hub_supply_block`` names why ``backend`` has no model, else ``None``."""from config.v2_config import hub_supply_block@@ -378,7 +398,74 @@ def hub_supply_refusal(controller: Any, backend: str, language: str) -> str | Noblock = hub_supply_block(backend, store.load() if store is not None else None)if block is None:return None- return t(_HUB_SUPPLY_REFUSALS[block], language, backend=display_name_for_backend(backend))+ return ModelSupplyRefusal(+ t(_HUB_SUPPLY_REFUSALS[block], language, backend=display_name_for_backend(backend)),+ fixed_in_models=block != "hub_disabled",+ )+++def is_model_hub_refusal(error: BaseException | None) -> bool:+ """Whether ``error`` is a Model Hub refusal, which states its own cause."""++ return isinstance(error, ModelSupplyRefusal) or turn_refusal(error) is not None+++def models_next_step(+ controller: Any,+ context: Any,+ *,+ cause: BaseException | None = None,+ outcome: TurnOutcomeProjectionInput | None = None,+) -> str | None:+ """The line that ends a refused turn whose fix is in Models, else ``None``.++ A supply refusal says whether Models fixes it; a turn outcome does when its own+ copy already sends the reader there. The Workbench knows its requester: one who+ manages the instance gets the link, anyone else is told to ask an admin. No IM+ identity maps to a Workbench principal, so an IM refusal makes no claim about its+ requester: it says who can fix it, offering Avibe Cloud's public URL when there is one.+ """++ if isinstance(cause, ModelSupplyRefusal):+ fixed_in_models = cause.fixed_in_models+ else:+ refused = outcome if outcome is not None else turn_refusal(cause)+ copy = project_turn_outcome_copy(refused) if refused is not None else None+ fixed_in_models = copy is not None and copy.key in _MODELS_ROUTE_REFUSALS+ if not fixed_in_models:+ return None+ language = _language(controller)+ if _context_platform(controller, context) == "avibe":+ if _workbench_caller_manages_instance(context):+ return t("errors.openModelsLink", language, url=MODELS_PAGE_PATH)+ return t("errors.askAdminForModels", language)+ from core.avibe_cloud import workbench_url++ url = workbench_url(MODELS_PAGE_PATH, getattr(controller, "config", None))+ return t("errors.modelsNextStepImUrl", language, url=url) if url else t("errors.modelsNextStepIm", language)+++def _context_platform(controller: Any, context: Any) -> str | None:+ return (+ getattr(context, "platform", None)+ or (getattr(context, "platform_specific", None) or {}).get("platform")+ or getattr(controller, "primary_platform", None)+ )+++def _workbench_caller_manages_instance(context: Any) -> bool:+ """Whether the Workbench caller passes the gate on Models (``can_manage_instance``)."""++ from core.caller_context import caller_context_from_platform_payload, caller_resource_user_context+ from storage.resource_access_service import current_resource_context++ caller = caller_context_from_platform_payload(getattr(context, "platform_specific", None), message=context)+ remote = caller.is_remote if caller is not None else str(getattr(context, "user_id", "")).startswith("remote:")+ if not remote:+ return True # The local Workbench is the instance owner's.+ # A remote caller is judged by its own authorization snapshot; a missing one fails closed.+ snapshot = caller_resource_user_context(caller) if caller is not None else None+ return current_resource_context(snapshot or {}, is_remote=True).can_manage_instancedef _hold_unrunnable_input(context: Any, error: ModelHubError) -> None:diff --git a/modules/agents/service.py b/modules/agents/service.pyindex abe91ba16..f7573b8c3 100644--- a/modules/agents/service.py+++ b/modules/agents/service.py@@ -476,20 +476,25 @@ class AgentService:# never break the turn.await self._begin_turn_status(request.context)from core.agent_model_selection import require_agent_model- from modules.agents.catalog import AGENT_BACKENDS+ from modules.agents.catalog import AGENT_BACKENDS, is_builtin_backend+ from modules.agents.model_hub import ModelSupplyRefusal, hub_supply_refusalif agent.name in AGENT_BACKENDS:has_subagent_model = request.subagent_model is not Nonerequested_model = request.subagent_model if has_subagent_model else request.vibe_agent_modellanguage = getattr(getattr(self.controller, "config", None), "language", "en")if not str(requested_model or "").strip():- from modules.agents.model_hub import hub_supply_refusal-# When the Model Hub is why there is no model to select, say so, not "select a model".refusal = await asyncio.to_thread(hub_supply_refusal, self.controller, agent.name, language)if refusal is not None:- raise ValueError(refusal)- selected_model = require_agent_model(requested_model, agent.name, language)+ raise refusal+ try:+ selected_model = require_agent_model(requested_model, agent.name, language)+ except ValueError as exc:+ if not is_builtin_backend(agent.name):+ raise+ # A built-in backend's models all come from its Model Hub list, so Models is the fix.+ raise ModelSupplyRefusal(str(exc), fixed_in_models=True) from Noneif has_subagent_model:request.subagent_model = selected_modelelse:diff --git a/modules/agents/vibey/agent.py b/modules/agents/vibey/agent.pyindex 5b3a3a67f..4a79ee899 100644--- a/modules/agents/vibey/agent.py+++ b/modules/agents/vibey/agent.py@@ -1238,11 +1238,11 @@ class VibeyAgent(BaseAgent):logger.warning("Vibey could not resolve its model route: %s", error)language = self._language()- # Every route runs through the Model Hub: when it is disabled or its gateway is off, that explains the failure.- refusal = (- await asyncio.to_thread(hub_supply_refusal, self.controller, BACKEND, language)- or launch_refusal_copy(self.controller, error)- or error_text(None, language)+ # Every route runs through the Model Hub: when it leaves Vibey no model (disabled, its gateway+ # off, no source), that explains the failure, and the supply refusal is the failure's cause.+ supply = await asyncio.to_thread(hub_supply_refusal, self.controller, BACKEND, language)+ refusal = str(supply) if supply is not None else (+ launch_refusal_copy(self.controller, error) or error_text(None, language))# Recorded on every start failure, as the other backends do: a no-op unless a launch is bound.await self.record_model_hub_native_failure(request.context, str(error))@@ -1254,7 +1254,7 @@ class VibeyAgent(BaseAgent):str(error),display_text=display,request=request,- cause=error,+ cause=supply or error,)# --- lookups ---------------------------------------------------------------diff --git a/tests/test_agent_auth_service.py b/tests/test_agent_auth_service.pyindex 9cd8270d1..f3c171fcd 100644--- a/tests/test_agent_auth_service.py+++ b/tests/test_agent_auth_service.py@@ -279,6 +279,40 @@ class AgentAuthServiceTests(_IsolatedClaudeConfigDirMixin, unittest.IsolatedAsynclaude_login_method=None,)+ async def test_setup_on_the_built_in_backend_points_to_model_hub(self):+ """`/setup vibey`, and a bare `/setup` on a Vibey default, explain where its models come from.++ When the Model Hub leaves Vibey no model now, that cause is the answer, as for a Turn.+ """+ from tests.scenario_harness.model_hub import config_with_sources, source+ from vibe.i18n import t++ im_step = t("errors.modelsNextStepImUrl", "en", url="https://team.avibe.bot/settings/models")+ cases = (+ ("1", True, True, t("command.setup.builtinBackend", "en", backend="Vibey") + "\n" + im_step),+ ("1", False, True, "❌ " + t("errors.modelGatewayOff", "en", backend="Vibey") + "\n" + im_step),+ ("1", True, False, "❌ " + t("errors.modelSourceRequired", "en", backend="Vibey") + "\n" + im_step),+ # Model Hub disabled on the instance takes Models away too: no step.+ ("0", True, True, "❌ " + t("errors.modelHubDisabled", "en", backend="Vibey")),+ )+ for hub_switch, gateway_enabled, has_source, expected in cases:+ for args, resolved in (("vibey", "codex"), ("", "vibey")):+ controller = _StubController()+ controller.resolve_agent_for_context = lambda _context, resolved=resolved: resolved+ controller.config.remote_access = SimpleNamespace(+ vibe_cloud=SimpleNamespace(enabled=True, public_url="https://team.avibe.bot")+ )+ hub = config_with_sources([source("src_supply01", ["claude-opus-5-5"])] if has_source else [])+ hub.enabled = gateway_enabled+ controller.model_hub_service = SimpleNamespace(store=SimpleNamespace(load=lambda hub=hub: hub))+ service = AgentAuthService(controller)+ context = MessageContext(user_id="U1", channel_id="C1", platform="slack")++ with patch.dict(os.environ, {"VIBE_MODEL_HUB_ENABLED": hub_switch}):+ await service.handle_setup_command(context, args)++ assert controller.im_client.sent_messages == [("C1", expected)], (hub_switch, gateway_enabled, has_source, args)+async def test_handle_setup_command_supports_claude_console_login_option(self):controller = _StubController()service = AgentAuthService(controller)diff --git a/tests/test_agent_backend_catalog.py b/tests/test_agent_backend_catalog.pyindex 996137642..5a9b1910f 100644--- a/tests/test_agent_backend_catalog.py+++ b/tests/test_agent_backend_catalog.py@@ -77,7 +77,10 @@ def test_copy_about_the_built_in_names_it_from_the_catalog(lang) -> None:for kind in ("aborted", "UnsupportedModelRoute", "ProviderProtocolViolation", None):text = error_text(kind, lang)assert name in text and "{backend}" not in text- for key in ("errors.modelHubDisabled", "errors.modelGatewayOff"):+ for key in (+ "errors.modelHubDisabled", "errors.modelGatewayOff", "errors.modelSourceRequired",+ "errors.agentModelRequired", "command.setup.builtinBackend",+ ):text = t(key, lang, backend=name)assert name in text and "{backend}" not in textalways_on = t("error.agentLifecycle.agent_always_enabled.message", lang, agent="vibey")diff --git a/tests/test_agent_service.py b/tests/test_agent_service.pyindex 0d979962a..09531ae81 100644--- a/tests/test_agent_service.py+++ b/tests/test_agent_service.py@@ -367,24 +367,30 @@ def test_model_selection_is_required_before_any_backend_dispatch(backend, model,@pytest.mark.parametrize(- ("backend", "hub_switch", "gateway_enabled", "refusal"),+ ("backend", "hub_switch", "gateway_enabled", "has_source", "refusal", "fixed_in_models"),[- ("vibey", "1", False, "The model gateway is off, so Vibey has no model to run on"),- ("vibey", "1", True, "Select a model"),- ("vibey", "0", True, "Model Hub is disabled on this instance, so Vibey has no model to run on"),+ ("vibey", "1", False, True, "The model gateway is off, so Vibey has no model to run on", True),+ ("vibey", "1", True, False, "Vibey has no model source yet", True),+ # A source but no model: the built-in backend's models all come from its Model Hub list.+ ("vibey", "1", True, True, "Select a model for the Vibey Agent", True),+ ("vibey", "0", True, True, "Model Hub is disabled on this instance, so Vibey has no model to run on", False),# A native backend runs direct without the Hub: choosing a model is still the fix.- ("codex", "0", True, "Select a model"),+ ("codex", "0", True, True, "Select a model for the Codex Agent", None),],)def test_a_missing_model_the_model_hub_explains_names_the_model_hub(- monkeypatch, backend, hub_switch, gateway_enabled, refusal+ monkeypatch, backend, hub_switch, gateway_enabled, has_source, refusal, fixed_in_models):"""The Avibe Agent's models come only through the Model Hub: while it cannot supply any, choosing a model is not the fix."""+ from modules.agents.model_hub import ModelSupplyRefusal+ from tests.scenario_harness.model_hub import config_with_sources, source+monkeypatch.setenv("VIBE_MODEL_HUB_ENABLED", hub_switch)async def run():controller = _Controller()- hub = SimpleNamespace(enabled=gateway_enabled, agents={backend: SimpleNamespace(mode="hub")})+ hub = config_with_sources([source("src_supply01", ["claude-opus-5-5"])] if has_source else [])+ hub.enabled = gateway_enabledcontroller.model_hub_service = SimpleNamespace(store=SimpleNamespace(load=lambda: hub))service = AgentService(controller=controller)controller.agent_service = service@@ -395,9 +401,15 @@ def test_a_missing_model_the_model_hub_explains_names_the_model_hub(request.vibe_agent_model = Nonerequest.failure_handler = AsyncMock(return_value=True)- with pytest.raises(ValueError, match=refusal):+ with pytest.raises(ValueError, match=refusal) as refused:await service.handle_message(backend, request)assert agent.started == []+ # Whether Models is where the fix is decides the notice's next step.+ if fixed_in_models is None:+ assert not isinstance(refused.value, ModelSupplyRefusal)+ else:+ assert isinstance(refused.value, ModelSupplyRefusal)+ assert refused.value.fixed_in_models is fixed_in_modelsasyncio.run(run())diff --git a/tests/test_model_hub_failure_presentation.py b/tests/test_model_hub_failure_presentation.pyindex 9e0365d66..be44b6522 100644--- a/tests/test_model_hub_failure_presentation.py+++ b/tests/test_model_hub_failure_presentation.py@@ -386,3 +386,104 @@ def test_terminal_copy_never_promises_automatic_recovery(language):assert "2026-09-09" not in textassert "自动恢复。" not in textassert "has recovered" not in text+++def _next_step_controller(language: str, *, public_url: str | None):+ cloud = SimpleNamespace(enabled=public_url is not None, public_url=public_url or "")+ return SimpleNamespace(+ config=SimpleNamespace(language=language, remote_access=SimpleNamespace(vibe_cloud=cloud)),+ emit_agent_message=AsyncMock(return_value="msg-failed"),+ )+++def _remote_workbench_context(role: str) -> MessageContext:+ snapshot = {"sub": "member-1", "vibe_instance_role": role, "vibe_instance_access_source": "email"}+ return MessageContext(+ user_id="remote:member-1", channel_id="proj-1", platform="avibe",+ platform_specific={"agent_session_id": "ses-1", "message_metadata": {"resource_user_context": snapshot}},+ )+++_LOCAL_WORKBENCH = MessageContext(user_id="local", channel_id="proj-1", platform="avibe", platform_specific={})+_IM = MessageContext(user_id="U1", channel_id="C1", platform="slack", platform_specific={})++[email protected]("language", ["en", "zh"])+ ("context", "public_url", "key", "url"),+ [+ # The Workbench knows its requester: it links to Models only for one who can open it.+ (_LOCAL_WORKBENCH, None, "errors.openModelsLink", "/settings/models"),+ (_remote_workbench_context("member"), None, "errors.openModelsLink", "/settings/models"),+ (_remote_workbench_context("editor"), None, "errors.askAdminForModels", None),+ # No IM identity maps to a Workbench principal: IM says who can fix it, with the public URL when there is one.+ (_IM, "https://team.avibe.bot", "errors.modelsNextStepImUrl", "https://team.avibe.bot/settings/models"),+ (_IM, None, "errors.modelsNextStepIm", None),+ ],+)+async def test_a_refusal_fixed_in_models_ends_with_where_to_fix_it(language, context, public_url, key, url):+ from modules.agents.model_hub import ModelSupplyRefusal++ controller = _next_step_controller(language, public_url=public_url)+ refusal = ModelSupplyRefusal("Vibey has no model source yet.", fixed_in_models=True)++ await emit_backend_failure(controller, context, "vibey", str(refusal), display_text=f"❌ {refusal}", cause=refusal)++ next_step = t(key, language, url=url) if url else t(key, language)+ assert controller.emit_agent_message.await_args_list[0].args[2] == f"❌ {refusal}\n{next_step}"+++ "cause",+ [+ # The operator switched the Model Hub off, which takes Models away too.+ "hub_disabled",+ # Not a Model Hub refusal at all.+ "native",+ ],+)+async def test_a_failure_models_cannot_fix_gets_no_next_step(cause):+ from modules.agents.model_hub import ModelSupplyRefusal++ controller = _next_step_controller("en", public_url="https://team.avibe.bot")+ error = (+ ModelSupplyRefusal("Model Hub is disabled on this instance.", fixed_in_models=False)+ if cause == "hub_disabled" else RuntimeError("process exited")+ )++ await emit_backend_failure(controller, _LOCAL_WORKBENCH, "vibey", str(error), display_text=f"❌ {error}", cause=error)++ assert controller.emit_agent_message.await_args_list[0].args[2] == f"❌ {error}"+++ ("discriminator", "supply_state", "linked"),+ [+ # Copy that already sends its reader to Models ends with the way there...+ ("route_unconfigured", "interrupted", True),+ ("blocked_supply_state", "interrupted", True),+ # ...and copy that does not, such as a source still cooling down, does not.+ ("blocked_supply_state", "waiting", False),+ ],+)+async def test_a_route_refusal_links_models_only_when_its_copy_sends_the_reader_there(+ discriminator, supply_state, linked,+):+ from core.handlers.model_hub.service import ModelHubError++ outcome = TurnOutcomeProjectionInput(+ outcome="no_candidate",+ discriminator=discriminator,+ supply_facts=TurnSupplyFacts(+ backend="claude", model="claude-opus-5-5", supply_state=supply_state,+ retry_at="2026-10-12T08:00:00+00:00",+ ),+ )+ refused = ModelHubError("no_candidate", turn_outcome=outcome)+ controller = _next_step_controller("en", public_url=None)+ copy = render_turn_outcome_copy(outcome, "en")++ await emit_backend_failure(controller, _LOCAL_WORKBENCH, "claude", str(refused), display_text=copy, cause=refused)++ link = t("errors.openModelsLink", "en", url="/settings/models")+ assert controller.emit_agent_message.await_args_list[0].args[2] == (f"{copy}\n{link}" if linked else copy)diff --git a/tests/test_ui_server_fastapi.py b/tests/test_ui_server_fastapi.pyindex 006e6c8c8..df99a1fbe 100644--- a/tests/test_ui_server_fastapi.py+++ b/tests/test_ui_server_fastapi.py@@ -2097,12 +2097,22 @@ def test_config_routes_redact_platform_and_gateway_secrets(monkeypatch, tmp_path@pytest.mark.parametrize(- ("hub_switch", "gateway_enabled", "blocks"),- [("1", True, {}), ("1", False, {"vibey": "gateway_off"}), ("0", True, {"vibey": "hub_disabled"})],+ ("hub_switch", "gateway_enabled", "source_channel", "blocks"),+ [+ ("1", True, "hub", {}),+ # A Claude subscription Claude Code holds natively supplies no other backend.+ ("1", True, "native_cli", {"vibey": "no_source"}),+ ("1", True, None, {"vibey": "no_source"}),+ ("1", False, "hub", {"vibey": "gateway_off"}),+ ("0", True, "hub", {"vibey": "hub_disabled"}),+ ],)-def test_config_api_carries_why_the_model_hub_leaves_a_backend_no_model(monkeypatch, tmp_path, hub_switch, gateway_enabled, blocks):+def test_config_api_carries_why_the_model_hub_leaves_a_backend_no_model(+ monkeypatch, tmp_path, hub_switch, gateway_enabled, source_channel, blocks+):"""The Backends page shows the server's answer; it keeps no rule of its own."""from modules.agents.catalog import NATIVE_CLI_BACKENDS+ from tests.scenario_harness.model_hub import sourcemonkeypatch.setenv("AVIBE_HOME", str(tmp_path))monkeypatch.setenv("VIBE_MODEL_HUB_ENABLED", hub_switch)@@ -2113,6 +2123,10 @@ def test_config_api_carries_why_the_model_hub_leaves_a_backend_no_model(monkeypafor backend in NATIVE_CLI_BACKENDS:config.model_hub.agents[backend].mode = "direct"config.model_hub.enabled = gateway_enabled+ if source_channel is not None:+ config.model_hub.sources.append(+ source("src_supply01", ["claude-opus-5-5"], kind="subscription", channel=source_channel)+ )config.save()assert app.test_client().get("/api/config").get_json()["agent_supply_blocks"] == blocksdiff --git a/tests/test_vibey_agent.py b/tests/test_vibey_agent.pyindex 36141c2f1..43d778fd8 100644--- a/tests/test_vibey_agent.py+++ b/tests/test_vibey_agent.py@@ -1433,18 +1433,26 @@ async def test_a_failure_while_settling_reaches_the_shared_owner(engine, sessionawait harness.agent.handle_message(harness.request("hello"))[email protected](("hub_switch", "gateway_enabled"), [("1", True), ("1", False), ("0", True)])+ ("hub_switch", "gateway_enabled", "has_source"), [("1", True, True), ("1", True, False), ("1", False, True), ("0", True, True)]+)async def test_a_refused_model_route_fails_before_the_input_is_written(- engine, session, tmp_path, published, monkeypatch, hub_switch, gateway_enabled+ engine, session, tmp_path, published, monkeypatch, hub_switch, gateway_enabled, has_source) -> None:+ from tests.scenario_harness.model_hub import config_with_sources, source+monkeypatch.setenv("VIBE_MODEL_HUB_ENABLED", hub_switch)harness = _Harness(engine, tmp_path, "telegram", [])+ harness.controller.config.remote_access = SimpleNamespace(+ vibe_cloud=SimpleNamespace(enabled=True, public_url="https://team.avibe.bot")+ )async def refuse(*_args, **_kwargs):raise RuntimeError("no source serves this model")harness.controller.model_hub_runtime = SimpleNamespace(resolve=refuse)- hub = SimpleNamespace(enabled=gateway_enabled, agents={"vibey": SimpleNamespace(mode="hub")})+ hub = config_with_sources([source("src_supply01", ["claude-opus-5-5"])] if has_source else [])+ hub.enabled = gateway_enabledharness.controller.model_hub_service = SimpleNamespace(store=SimpleNamespace(load=lambda: hub))request = harness.request("hello")await harness.agent.handle_message(request)@@ -1452,11 +1460,15 @@ async def test_a_refused_model_route_fails_before_the_input_is_written(assert harness.controller.started == []assert await harness.context_rows() == []assert harness.provider.requests == []- # Every route runs through the Model Hub: disabled, or its gateway off, the copy names that cause.+ # Every route runs through the Model Hub: disabled, its gateway off, or no source to supply it,+ # the copy names that cause, and ends with where to fix it unless the operator switched it off.+ next_step = "\n" + i18n_t("errors.modelsNextStepImUrl", "en", url="https://team.avibe.bot/settings/models")if hub_switch == "0":expected = i18n_t("errors.modelHubDisabled", "en", backend="Vibey")elif not gateway_enabled:- expected = i18n_t("errors.modelGatewayOff", "en", backend="Vibey")+ expected = i18n_t("errors.modelGatewayOff", "en", backend="Vibey") + next_step+ elif not has_source:+ expected = i18n_t("errors.modelSourceRequired", "en", backend="Vibey") + next_stepelse:expected = "Vibey's run failed."assert harness.controller.im_client.sent == [f"❌ {expected}"]diff --git a/ui/src/components/onboarding/BuiltinAssistant.test.tsx b/ui/src/components/onboarding/BuiltinAssistant.test.tsxindex 29d4a3c6f..daab15927 100644--- a/ui/src/components/onboarding/BuiltinAssistant.test.tsx+++ b/ui/src/components/onboarding/BuiltinAssistant.test.tsx@@ -263,6 +263,13 @@ describe('the built-in assistant card', () => {expect(enter().disabled).toBe(true);});+ it('says no model source supplies it yet', async () => {+ render(wrap(<AgentDetection data={data({ agent_supply_blocks: { vibey: 'no_source' } })} onNext={vi.fn()} onNavigate={vi.fn()} agentReads={reads} />));+ expect(await card().findByText(en.onboarding.setup.noteNoSource.replace('{{name}}', 'Vibey'))).toBeTruthy();+ await act(async () => undefined);+ expect(enter().disabled).toBe(true);+ });+it('says the Hub is disabled on this instance', async () => {render(wrap(<AgentDetection data={data({ capabilities: { model_hub: { enabled: false } }, agent_supply_blocks: { vibey: 'hub_disabled' } })}onNext={vi.fn()} onNavigate={vi.fn()} agentReads={reads} />));diff --git a/ui/src/components/onboarding/BuiltinAssistantRow.tsx b/ui/src/components/onboarding/BuiltinAssistantRow.tsxindex b65b3de24..36831ecd9 100644--- a/ui/src/components/onboarding/BuiltinAssistantRow.tsx+++ b/ui/src/components/onboarding/BuiltinAssistantRow.tsx@@ -57,9 +57,10 @@ export function BuiltinAssistantRow({ backend, route, block, offer, picking = nuconst routeUnknown = route?.kind === 'pending' || route?.kind === 'failed';const note = block === 'gateway_off' ? t('onboarding.setup.noteGatewayOff', { name: label }): block === 'hub_disabled' ? t('onboarding.setup.noteHubDisabled', { name: label })- : unset ? t('onboarding.setup.noteBuiltinUnset')- : route?.kind === 'route' && !routeModel ? t('onboarding.setup.noteNoModels')- : t('onboarding.setup.noteEnabled');+ : block === 'no_source' ? t('onboarding.setup.noteNoSource', { name: label })+ : unset ? t('onboarding.setup.noteBuiltinUnset')+ : route?.kind === 'route' && !routeModel ? t('onboarding.setup.noteNoModels')+ : t('onboarding.setup.noteEnabled');const busy = !!picking || !!connectionPending;const candidates = offer?.kind === 'ready' ? inlineCandidates(offer.read) : [];return (diff --git a/ui/src/components/settings/SettingsBackendPage.tsx b/ui/src/components/settings/SettingsBackendPage.tsxindex 5e769e0b8..6ac3c62dd 100644--- a/ui/src/components/settings/SettingsBackendPage.tsx+++ b/ui/src/components/settings/SettingsBackendPage.tsx@@ -60,9 +60,11 @@ export function SettingsBackendPage({ backend }: { backend: AgentBackendId }) {<p className="text-[12px] text-gold-ink">{supplyBlock === 'hub_disabled'? t('settings.backends.hubDisabledNotice', { name: meta.label })- : t('settings.backends.gatewayOff', { name: meta.label })}+ : supplyBlock === 'no_source'+ ? t('settings.backends.noModelSourceNotice', { name: meta.label })+ : t('settings.backends.gatewayOff', { name: meta.label })}</p>- {supplyBlock === 'gateway_off' && <Link+ {supplyBlock !== 'hub_disabled' && <Linkto="/settings/models"className="model-hub-action-mint inline-flex shrink-0 items-center gap-1 text-[13px] font-medium transition-colors">diff --git a/ui/src/components/settings/SettingsBackendsPage.test.tsx b/ui/src/components/settings/SettingsBackendsPage.test.tsxindex 6fa06f406..c8979204b 100644--- a/ui/src/components/settings/SettingsBackendsPage.test.tsx+++ b/ui/src/components/settings/SettingsBackendsPage.test.tsx@@ -143,6 +143,24 @@ describe('backend attention', () => {expect(screen.getByRole('link', { name: 'Open Models page' }).getAttribute('href')).toBe('/settings/models');});+ // No source may supply the always-on backend: its status names that, and its page leads to Models.+ it('says no model source supplies it, on the row and on the backend page', async () => {+ vi.spyOn(modelsApi, 'listAgents').mockResolvedValue(withoutModel);+ mocks.api.getConfig.mockResolvedValue({+ agents: {}, capabilities: { model_hub: { enabled: true } }, agent_supply_blocks: { vibey: 'no_source' },+ });+ renderBackends();++ const vibey = await rowOf('Vibey');+ expect(await within(vibey).findByText('No model source')).toBeTruthy();+ expect(within(vibey).queryByText('No model selected')).toBeNull();+ expect(within(await rowOf('Claude Code')).queryByText('No model source')).toBeNull();++ fireEvent.click(within(vibey).getByRole('link', { name: 'Configure' }));+ expect(await screen.findByText('Vibey gets its models from Model Hub. Add a source in Models.')).toBeTruthy();+ expect(screen.getByRole('link', { name: 'Open Models page' }).getAttribute('href')).toBe('/settings/models');+ });+// The operator's Model Hub switch leaves the always-on backend nothing to run on,// and there is no Models page to open.it('says Model Hub is disabled when the instance turns it off', async () => {diff --git a/ui/src/components/settings/SettingsBackendsPage.tsx b/ui/src/components/settings/SettingsBackendsPage.tsxindex ee33ed3df..581c6cbb2 100644--- a/ui/src/components/settings/SettingsBackendsPage.tsx+++ b/ui/src/components/settings/SettingsBackendsPage.tsx@@ -195,7 +195,9 @@ export const SettingsBackendsPage: React.FC = () => {<Badge variant="warning">{supplyBlocks.get(meta.id) === 'hub_disabled'? t('settings.backends.hubDisabled')- : t('settings.models.shell.stopped')}+ : supplyBlocks.get(meta.id) === 'no_source'+ ? t('settings.backends.noModelSource')+ : t('settings.models.shell.stopped')}</Badge>) : agent.enabled && withoutModel.has(meta.id) && (<Badge variant="warning">{t('settings.models.gateway.agentIssues.modelMissing')}</Badge>diff --git a/ui/src/components/settings/models/featureFlags.ts b/ui/src/components/settings/models/featureFlags.tsindex be0b7c678..d51ba98b5 100644--- a/ui/src/components/settings/models/featureFlags.ts+++ b/ui/src/components/settings/models/featureFlags.ts@@ -13,7 +13,7 @@ export const modelHubEnabledFromConfig = (config: unknown): boolean => {);};-export type HubSupplyBlock = 'hub_disabled' | 'gateway_off';+export type HubSupplyBlock = 'hub_disabled' | 'gateway_off' | 'no_source';// Backends left with no model to run on by the Model Hub's state, and why. The// server decides (``hub_supply_block``) and GET /api/config carries the answer.@@ -22,6 +22,6 @@ export const hubSupplyBlocks = (config: unknown): ReadonlyMap<string, HubSupplyBif (!blocks || typeof blocks !== 'object') return new Map();return new Map(Object.entries(blocks).filter((entry): entry is [string, HubSupplyBlock] =>- entry[1] === 'hub_disabled' || entry[1] === 'gateway_off'),+ entry[1] === 'hub_disabled' || entry[1] === 'gateway_off' || entry[1] === 'no_source'),);};diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.jsonindex a0d40ae7b..fc90e8933 100644--- a/ui/src/i18n/en.json+++ b/ui/src/i18n/en.json@@ -626,6 +626,8 @@"gatewayOff": "The model gateway is off, so {{name}} has no model to run on.","hubDisabled": "Model Hub disabled","hubDisabledNotice": "Model Hub is disabled on this instance, so {{name}} has no model to run on.",+ "noModelSource": "No model source",+ "noModelSourceNotice": "{{name}} gets its models from Model Hub. Add a source in Models.","builtinBadge": "Built-in","openProviderPage": "Configure provider","providerOauth": "OAuth (default)",@@ -5369,6 +5371,7 @@"noteBuiltinUnset": "No model yet. Pick one to start.","noteGatewayOff": "Model gateway is off. {{name}} needs it to run.","noteHubDisabled": "Model Hub is disabled on this instance. {{name}} needs it to run.",+ "noteNoSource": "No model source supplies {{name}} yet.","pickModelNamed": "Pick a model for {{name}}","allModels": "All models…","modelsUnreadable": "Could not read the models.",diff --git a/ui/src/i18n/zh.json b/ui/src/i18n/zh.jsonindex c871271b7..540fb053c 100644--- a/ui/src/i18n/zh.json+++ b/ui/src/i18n/zh.json@@ -626,6 +626,8 @@"gatewayOff": "模型网关已关闭,{{name}} 没有可用的模型。","hubDisabled": "模型网关已停用","hubDisabledNotice": "本实例已停用模型网关,{{name}} 没有可用的模型。",+ "noModelSource": "无模型来源",+ "noModelSourceNotice": "{{name}} 通过模型网关获取模型,请在「模型」页添加来源。","builtinBadge": "内置","openProviderPage": "配置 Provider","providerOauth": "OAuth(默认)",@@ -5369,6 +5371,7 @@"noteBuiltinUnset": "还没有模型,选一个即可开始","noteGatewayOff": "模型网关已关闭,{{name}} 需要它才能运行","noteHubDisabled": "本实例已停用模型网关,{{name}} 需要它才能运行",+ "noteNoSource": "还没有模型来源供给 {{name}}。","pickModelNamed": "为 {{name}} 选择模型","allModels": "全部模型…","modelsUnreadable": "未能读取模型",diff --git a/vibe/i18n/en.json b/vibe/i18n/en.jsonindex c1b70df05..75e20b850 100644--- a/vibe/i18n/en.json+++ b/vibe/i18n/en.json@@ -8,6 +8,11 @@"agentModelRequired": "Select a model for the {backend} Agent or Session in Avibe before running it.","modelHubDisabled": "Model Hub is disabled on this instance, so {backend} has no model to run on.","modelGatewayOff": "The model gateway is off, so {backend} has no model to run on. Turn it on in Models, then choose a model.",+ "modelSourceRequired": "{backend} has no model source yet. Add an API key or a subscription in Models.",+ "modelsNextStepImUrl": "Someone who manages this Avibe can fix it in Models: {url}",+ "modelsNextStepIm": "Someone who manages this Avibe can fix it in Models, in the Avibe Workbench.",+ "openModelsLink": "[Open Models]({url})",+ "askAdminForModels": "Ask an Avibe admin to fix this in Models.","opencodeModelProviderRequired": "Select an OpenCode model with a provider in Avibe, or configure its Model Hub route."},"status": {@@ -734,6 +739,7 @@"setup": {"starting": "Starting {backend} setup...","unsupportedBackend": "Backend `{backend}` does not support setup yet.",+ "builtinBackend": "{backend} gets its models from Model Hub and needs no sign-in. Add or manage model sources in Models.","codeUsage": "Usage: `/setup code <value>` or `/setup code <backend> <value>`","claudeMethodUsage": "Usage: `/setup claude <claudeai|console>`","noActiveFlow": "There is no active setup flow for this channel.",diff --git a/vibe/i18n/zh.json b/vibe/i18n/zh.jsonindex 7996040f9..2e185ddac 100644--- a/vibe/i18n/zh.json+++ b/vibe/i18n/zh.json@@ -8,6 +8,11 @@"agentModelRequired": "请先在 Avibe 中为 {backend} Agent 或会话选择模型。","modelHubDisabled": "本实例已停用模型网关,{backend} 没有可用的模型。","modelGatewayOff": "模型网关已关闭,{backend} 没有可用的模型。请在「模型」页开启网关并选择模型。",+ "modelSourceRequired": "{backend} 还没有模型来源。请在「模型」页添加 API Key 或订阅。",+ "modelsNextStepImUrl": "管理这个 Avibe 的人可以在「模型」页处理:{url}",+ "modelsNextStepIm": "管理这个 Avibe 的人可以在 Avibe 工作台的「模型」页处理。",+ "openModelsLink": "[打开「模型」页]({url})",+ "askAdminForModels": "请联系 Avibe 管理员在「模型」页处理。","opencodeModelProviderRequired": "请在 Avibe 中选择带供应商的 OpenCode 模型,或配置它的 Model Hub 路由。"},"status": {@@ -734,6 +739,7 @@"setup": {"starting": "正在启动 {backend} 的登录修复流程...","unsupportedBackend": "后端 `{backend}` 暂不支持 setup。",+ "builtinBackend": "{backend} 通过模型网关获取模型,无需单独登录。请在「模型」页添加或管理模型来源。","codeUsage": "用法:`/setup code <value>` 或 `/setup code <backend> <value>`","claudeMethodUsage": "用法:`/setup claude <claudeai|console>`","noActiveFlow": "当前频道没有正在进行的 setup 流程。",