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
fix(model-hub): retire runtime toggle and tidy mobile navigation (#2685)
Call White97ac7ec966dd
diff --git a/docs/plans/avibe-agent-always-on.md b/docs/plans/avibe-agent-always-on.mdindex 8eb123bdd..6914a476e 100644--- a/docs/plans/avibe-agent-always-on.md+++ b/docs/plans/avibe-agent-always-on.md@@ -48,8 +48,9 @@ backend list, it is always enabled, and it cannot be turned off.the 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` carriesit as `agent_supply_blocks`, which the Backends pages show. The backend stays listed and enabled in every case.- - Gateway off (Models → Start/Stop): its row says "Gateway off", its page links to Models, and a Turn refuses with- `errors.modelGatewayOff`.+ - A legacy disabled gateway or runtime recovery state: its row says "Gateway unavailable", its page links to+ Models for recovery, and a Turn refuses with `errors.modelGatewayOff`. Model Hub is enabled by default and the+ experimental Models Start/Stop switch is retired; the backend lifecycle API and safety gates remain intact.- Model Hub disabled on the instance (`VIBE_MODEL_HUB_ENABLED=0`): a backend without its own CLI gets every modelthrough the Hub, so its row says "Model Hub disabled", its page says so without a Models link, and a Turn refuseswith `errors.modelHubDisabled`.diff --git a/docs/plans/model-hub-e2e-test-plan.md b/docs/plans/model-hub-e2e-test-plan.mdindex a160e1f4b..b4c291fee 100644--- a/docs/plans/model-hub-e2e-test-plan.md+++ b/docs/plans/model-hub-e2e-test-plan.md@@ -35,9 +35,9 @@ Out of scope (documented, not dropped silently):| ID | Steps | Expect | Status ||---|---|---|---|| A1 | flag off | `/api/models/*` → 404 `feature_disabled`; UI redirects to `/settings/backends` | assert |-| A2 | install → start → stop happy path; status polling transitions | `installing/starting/active/stopped`; engine config regenerated with hardened values (`request-retry: 0`, `disable-cooling: true`, `usage-statistics-enabled: false` …) — conservation check on CPA upgrade | assert |-| A3 | agent in hub mode → stop runtime | 409 `runtime_in_use` with `data.backends`; **and** UI surfaces the blocking backends (B4 fix-first; baseline: generic toast) | fix-first |-| A4 | agents read fails while runtime on | toggle must not silently disable (B5) | fix-first |+| A2 | lifecycle API install → start → stop; UI recovery action | install/start recovery stays available without a user-facing on/off switch; API hardening and lifecycle checks remain unchanged | assert |+| A3 | agent in hub mode → lifecycle API stop | API retains 409 `runtime_in_use` with `data.backends`; the Models page exposes no stop action | assert |+| A4 | agents read fails while runtime on | keep runtime status readable without introducing an on/off control | assert || A5 | controller restart mid OAuth poll | poll reports `engine_down` copy, never a fake materialization failure (B10) | assert |### B. API-key sources (C16–C29)@@ -339,7 +339,7 @@ lane-to-lane.### Playwright scope (this round)Core flows against a live instance: capability gate redirect, runtime-install/start/stop toggle incl. blocked-stop copy, add-API-key dialog full+recovery entry point and the absence of a runtime off switch, add-API-key dialog fullbranches (auto-detect / manual protocol / pull models / empty-inventoryadd-anyway / replace key) against the mock upstream, guard refusal → confirm→ committed toast (incl. B7 echo probe as fixme), source detaildiff --git a/docs/plans/model-hub-ui-spec.md b/docs/plans/model-hub-ui-spec.mdindex b616dbfc2..7820d0fcb 100644--- a/docs/plans/model-hub-ui-spec.md+++ b/docs/plans/model-hub-ui-spec.md@@ -1366,37 +1366,33 @@ Required behaviour:outage off the failure of one read is the same mistake in the other direction asreading health off a stale value: both state a fact the payload did not carry.-**The runtime control is a total rendering of `health`, and the states above are how it-gets there** `[contract]`. The pill names the state; the adjacent switch owns activation.-Every value `runtime-dependency.schema.json` admits is rendered, and no state is inferred-from an empty relationship array. One value splits on a second field — the same shape-frame 06's bar has when it splits `active` on adoption:+**Runtime status and recovery** `[contract]`. Model Hub is enabled by default. The+experimental on/off switch is retired: the pill reports health, and **Retry** uses+the existing install/start path when a supported runtime is unavailable. No page+control calls the lifecycle stop API. Per-backend Direct/Gateway choices remain+independent of this runtime status.-| `RuntimeDependency.status.health` `[contract]` | State | Pill | Treatment | Activation |-| --- | --- | --- | --- | --- |-| `ok` | Ready | `shell.running` | idle | on switch; stop only when every Agent backend is Direct (`POST /api/models/runtime/stop` `[contract]`) |-| `degraded` | Impaired | `shell.degraded` | error | on switch; same guarded stop rule |-| `down` | Closed | `shell.stopped` | error | off switch; start (`POST /api/models/runtime/start` `[contract]`) |-| `not_started` | Closed | `shell.notStarted` | idle | off switch; start |-| `installing` | Installing | `install.progress` | idle / busy | none; status reads own progress |-| `not_installed`, `error_key` non-null `[contract]` | Install failed | `install.fail.title` / `settings.models.install.fail.detail` | error | retry `POST /api/models/runtime/install` |-| `not_installed`, `error_key: null`, exact asset for `host_platform` `[contract]` | Not installed | `shell.notInstalled` | idle | the non-switching install confirm — **never** the start route |-| `not_installed`, `error_key: null`, no exact asset for `host_platform` `[contract]` | Unsupported host | `shell.unsupported` | idle | none — 直连 (§1.8) is the escape hatch |--The runtime is a page-level gate. Only `ok` and `degraded` expose the tabs, Sources,-Agent gateway-model rows, route controls, supply graph and internal dialogs. Every other-authoritative health renders a closed/setup surface instead. Turning the gateway off is-not a bulk routing mutation: while any backend remains in Hub mode, the switch is disabled-and names those backends; the server independently rejects the same race with-`runtime_in_use`. Configuration is preserved while hidden and reappears unchanged after a-successful start.--Starting is the one pill with no `health` behind it: it is the client's own optimistic-state between accepting the press and the next payload. A transport failure — the status-request not returning at all — renders Status unread and disables the switch because the-page has no authoritative action basis. And `degraded` here is the *engine* speaking about-itself, unrelated to `supply_status: degraded` above, which is a backend speaking about-its arbitration; the two hold independently and D-24's rule applies to both words.+| `RuntimeDependency.status.health` `[contract]` | Pill | Recovery |+| --- | --- | --- |+| `ok` | `shell.running` (or the all-direct summary) | none |+| `degraded` | `shell.degraded` | none; the engine is still running |+| `down` | `shell.unavailable` when enabled, otherwise `shell.stopped` | Retry starts the engine |+| `not_started` | `shell.unavailable` when enabled, otherwise `shell.notStarted` | Retry starts the engine |+| `installing` | `shell.starting` | status reads own progress; no duplicate install |+| `not_installed`, supported manifest | `shell.unavailable` when enabled, otherwise `shell.notInstalled` | Retry installs and starts inline |+| `not_installed`, unsupported manifest | unavailable/unsupported status | no install/start action |++A running runtime, or retained enabled intent outside installation, keeps the+configuration surface reachable. Legacy disabled intent has a closed recovery+surface with Retry, so removing the switch does not strand an old installation.+Unknown runtime reads keep their existing read-recovery behavior and do not+pretend the engine is off. Starting is client-owned pending state until the next+authoritative payload. The backend lifecycle API, in-use stop guard, deployment+capability gate, and corrupt-config/custody recovery protections are unchanged.++On mobile, title/status and actions use separate rows. All five tabs retain their+icons and full labels on one line; the tab strip scrolls horizontally rather than+shrinking its content or widening the whole page.**Shared copy** — namespace `models.hub.shell.*` / `.upstream.*` / `.gateway.*` /`.legend.*`. Both `ui/src/i18n/zh.json` and `en.json` must carry every key. The@@ -1481,33 +1477,27 @@ unable to outlive its surface, which is the cheaper answer wherever it is availa| --- | --- | --- || `shell.title` | 模型 | Models || `shell.running` | 网关运行中 | Gateway running |-| `shell.stopped` `[derived]` | 网关已关闭 | Gateway off |+| `shell.stopped` `[derived]` | 模型网关暂不可用 | Gateway unavailable |+| `shell.unavailable` `[derived]` | 模型网关暂不可用 | Gateway currently unavailable || `shell.degraded` `[derived]` | 网关降级运行 | Gateway running degraded |-| `shell.notStarted` `[derived]` | 网关已关闭 | Gateway off |+| `shell.notStarted` `[derived]` | 模型网关尚未就绪 | Gateway not ready || `shell.notInstalled` `[derived]` | 网关组件未安装 | Gateway component not installed || `shell.allDirect_one` `[frame]` | {{count}} 个后端都在直连 | The only backend is direct || `shell.allDirect_other` `[frame]` | {{count}} 个后端都在直连 | All {{count}} backends are direct || `shell.starting` `[derived]` | 正在启动… | Starting… |-| `shell.stopping` `[derived]` | 正在关闭… | Stopping… || `shell.unsupported` `[derived]` | 这个平台还没有网关组件 | No gateway component for this platform yet |-| `shell.toggle.turnOn` `[derived]` | 开启模型网关 | Turn model gateway on |-| `shell.toggle.turnOff` `[derived]` | 关闭模型网关 | Turn model gateway off |-| `shell.toggle.stopBlocked` `[derived]` | 请先将 {{names}} 切换为直连,再关闭模型网关 | Switch {{names}} to Direct before turning the model gateway off |-| `shell.toggle.stopUnavailable` `[derived]` | 暂时无法读取 Agent 路由状态,当前不能关闭模型网关 | Agent routing status is unavailable; the model gateway cannot be turned off yet |-| `shell.closed.off.title` `[frame]` | 模型网关已关闭 | Model gateway is off |-| `shell.closed.off.body` `[frame]` | 开启后才会显示和编辑来源、路由与网关模型。 | Turn it on to view and edit sources, routes, and gateway models. |-| `shell.closed.down.title` `[derived]` | 模型网关已关闭 | Model gateway is off |-| `shell.closed.down.body` `[derived]` | 上一次启动没有就绪。开启网关即可重试。 | The previous start did not become ready. Turn it on to try again. |+| `shell.closed.off.title` `[frame]` | 模型网关尚未就绪 | Model gateway is not ready |+| `shell.closed.off.body` `[frame]` | 点击重试,恢复供应商、路由和模型配置。 | Retry to restore access to sources, routes, and gateway models. |+| `shell.closed.down.title` `[derived]` | 模型网关暂不可用 | Model gateway is unavailable |+| `shell.closed.down.body` `[derived]` | 上一次启动没有就绪,点击重试可重新启动模型网关。 | The previous start did not become ready. Retry to start the gateway again. || `shell.closed.notInstalled.title` `[derived]` | 模型网关尚未安装 | Model gateway is not installed |-| `shell.closed.notInstalled.body` `[derived]` | 开启后会安装由 Avibe 管理的网关组件。 | Turn it on to install the managed gateway component. |+| `shell.closed.notInstalled.body` `[derived]` | 点击重试可安装并启动由 Avibe 管理的模型网关组件。 | Retry to install and start the managed gateway component. || `shell.closed.unsupported.title` `[derived]` | 模型网关不可用 | Model gateway is unavailable || `shell.closed.unsupported.body` `[derived]` | 当前平台没有兼容的托管网关组件。 | This platform does not have a compatible managed gateway component. || `shell.closed.installing.title` `[derived]` | 正在安装模型网关 | Installing model gateway || `shell.closed.installing.body` `[derived]` | 安装并启动完成后才会显示来源与路由。 | Sources and routing will appear after installation and startup complete. || `shell.closed.starting.title` `[derived]` | 正在启动模型网关 | Starting model gateway || `shell.closed.starting.body` `[derived]` | 网关就绪后才会显示来源与路由。 | Sources and routing will appear when the gateway is ready. |-| `shell.closed.stopping.title` `[derived]` | 正在关闭模型网关 | Turning model gateway off |-| `shell.closed.stopping.body` `[derived]` | 运行时停止期间会隐藏网关配置。 | Gateway configuration is hidden while the runtime stops. || `shell.closed.unread.title` `[derived]` | 暂时无法读取网关状态 | Model gateway status unavailable || `shell.closed.unread.body` `[derived]` | 确认运行状态前不会显示网关配置。 | Configuration stays hidden until the runtime state can be confirmed. || `shell.modelsInfo.label` `[derived]` | 什么是模型 | What a model is |diff --git a/tests/scenarios/model_hub/catalog.yaml b/tests/scenarios/model_hub/catalog.yamlindex 457d6e7ab..f2f2edd48 100644--- a/tests/scenarios/model_hub/catalog.yaml+++ b/tests/scenarios/model_hub/catalog.yaml@@ -2149,22 +2149,22 @@ scenarios:layer: e2e-autotest: tests/e2e/test_model_hub_runtime.py::test_a2_offline_engine_install_start_stop_and_hardened_config- id: A3- name: Runtime stop reports blocking Hub backends in API and UI copy+ name: Lifecycle API stop reports blocking Hub backends while the UI exposes no stop controlstatus: skipkind: guardlayer: ui-e2e- reason: UI copy is not executable from the pytest API layer+ reason: the absence of a UI stop control is checked by Playwright; the lifecycle API guard is covered belowowning_layer: Playwright lane (ui/e2e)evidence: docs/plans/model-hub-e2e-test-plan.md#a-gating-and-runtime-lifecycle-c1c2c5c9c15partial_evidence:test: tests/e2e/test_model_hub_runtime.py::test_a3_runtime_stop_reports_every_blocking_backendcovers: structured 409 guard, runtime_in_use code, and exact blocking backend list- id: A4- name: Runtime toggle fails closed when the agents read fails+ name: Runtime status stays readable without an on-off control when the agents read failsstatus: skipkind: guardlayer: ui-e2e- reason: runtime-toggle interaction is not executable from the pytest API layer+ reason: the page render test covers failed supply reads; the pytest API layer cannot assert UI controlsowning_layer: Playwright lane (ui/e2e)evidence: docs/plans/model-hub-e2e-test-plan.md#a-gating-and-runtime-lifecycle-c1c2c5c9c15- id: A5diff --git a/tests/test_agent_backend_catalog.py b/tests/test_agent_backend_catalog.pyindex 5a9b1910f..e6ee95511 100644--- a/tests/test_agent_backend_catalog.py+++ b/tests/test_agent_backend_catalog.py@@ -83,5 +83,13 @@ def test_copy_about_the_built_in_names_it_from_the_catalog(lang) -> None:):text = t(key, lang, backend=name)assert name in text and "{backend}" not in text+ # Legacy disabled state must name the one-way recovery action that still+ # exists in Models, not the retired on/off switch.+ gateway_off = t("errors.modelGatewayOff", lang, backend=name)+ recovery_step = {+ "en": "Open Models and click Retry, then choose a model.",+ "zh": "请前往「模型」页点击「重试」,然后选择模型。",+ }[lang]+ assert recovery_step in gateway_offalways_on = t("error.agentLifecycle.agent_always_enabled.message", lang, agent="vibey")assert "`vibey`" in always_ondiff --git a/ui/e2e/a-gating-runtime.spec.ts b/ui/e2e/a-gating-runtime.spec.tsindex 219379043..17e799e13 100644--- a/ui/e2e/a-gating-runtime.spec.ts+++ b/ui/e2e/a-gating-runtime.spec.ts@@ -1,29 +1,15 @@-// Suite A — the capability gate and the gateway runtime switch.-//+// Suite A — the capability gate and the always-on gateway surface.// Scenario IDs are from docs/plans/model-hub-e2e-test-plan.md §3.import {MODEL_HUB_DISABLED_REDIRECT,MODEL_HUB_SETTINGS_PATH,} from '../src/components/settings/models/modelHubRoutes';-import type { Agent } from './support/api';import { surfaceKind } from './support/api';import { hub as copy } from './support/copy';-import {- expect,- requireModelHub,- requireRuntimeRunning,- runtimeIsRunning,- test,-} from './support/fixtures';-import { restoreNativeSources, withRuntimeRestored } from './support/restore';+import { expect, requireModelHub, requireRuntimeRunning, test } from './support/fixtures';-test.describe('A · capability gate and runtime lifecycle', () => {+test.describe('A · capability gate and runtime recovery', () => {test('A1 · the capability gate, not the browser, decides the route', async ({ page, hub, api }) => {- // One test covers both halves on purpose. Which half runs is a property of- // the instance, and the assertion that matters is that the browser obeys- // whatever the backend declared — splitting it into an "enabled" spec and a- // "disabled" spec would leave one of them permanently skipped and hide the- // fact that nobody ever checked the other direction.const enabled = await api.modelHubEnabled();await hub.goto();@@ -31,188 +17,46 @@ test.describe('A · capability gate and runtime lifecycle', () => {await expect(page).toHaveURL(new RegExp(`${MODEL_HUB_SETTINGS_PATH}$`));await expect(hub.shell).toBeVisible();await expect(page.getByRole('heading', { name: copy('shell.title'), level: 1 })).toBeVisible();+ await expect(hub.header.getByRole('switch')).toHaveCount(0);return;}await expect(page).toHaveURL(new RegExp(`${MODEL_HUB_DISABLED_REDIRECT}$`));await expect(hub.shell).toHaveCount(0);});- test('A2 · the switch offers to install when the gateway is not installed', async ({ hub, api }) => {- await requireModelHub(api);- const runtime = await api.runtime();- test.skip(- runtime?.status?.health !== 'not_installed',- 'The install entry point exists only in the not-installed state — an installed runtime (whatever '- + 'its health) and an in-progress installation both render different closed states with the '- + 'switch disabled or busy, so this spec covers neither. '- + 'Point VIBE_E2E_BASE_URL at a fresh hermetic instance to cover it (see ui/e2e/README.md).',- );- // `not_installed` with an `unsupported` manifest is a different closed- // state the product renders on purpose, with the switch disabled: there is- // no install to offer on that host, and asserting the install path there- // would report the unsupported state as a product failure. The product's- // own gate (`runtimeCanAttemptInstall`) decides which of the two it is.- test.skip(- runtime?.manifest.resolution === 'unsupported',- 'The runtime manifest resolves to unsupported on this host, so the product offers no install — '- + 'that is the closed state it renders, not a defect in the install path.',- );-- await hub.goto();- // The closed state has to say the gateway is missing before the switch is- // touched: a user who cannot install has to learn that from the page.- await expect(hub.closedState).toContainText(copy('shell.closed.notInstalled.title'));- await expect(hub.runtimeToggle).toHaveAttribute('aria-label', copy('shell.toggle.turnOn'));-- await hub.runtimeToggle.click();- await expect(hub.installDialog).toBeVisible();- await expect(hub.installDialog).toContainText(copy('install.section.effects'));- // Cancel rather than install: downloading and unpacking a release is the- // operator's setup step, not something a UI test should do to a machine.- await hub.installDialog.getByRole('button', { name: copy('install.cancel'), exact: true }).first().click();- await expect(hub.installDialog).toHaveCount(0);- });-- test('A2 · turning the gateway off and back on round-trips', async ({ hub, api }) => {- // The lifecycle alone can lawfully take 150s on a slow host (60s stop +- // 90s verified restart), and per-expect timeouts do not extend the test- // timeout — the config's 90s cap used to be able to cancel the spec while- // its finally was still proving the runtime back up, failing the run AND- // closing the page over an unconfirmed shared runtime.- test.setTimeout(240_000);+ test('A2 · a missing supported gateway offers recovery, not a runtime switch', async ({ hub, api }) => {await requireModelHub(api);const runtime = await api.runtime();- test.skip(- !runtimeIsRunning(runtime?.status?.health),- 'The gateway is not running on this instance, so there is no running state to stop.',- );- const hubBackends = (await api.agents()).filter((agent) => agent.mode === 'hub');- test.skip(- hubBackends.length > 0,- `Stopping is blocked while ${hubBackends.map((a) => a.backend).join(', ')} is in Gateway mode — that is scenario A3.`,- );+ test.skip(runtime?.status?.health !== 'not_installed', 'Requires a fresh hermetic instance with no engine installed.');+ test.skip(runtime?.manifest.resolution === 'unsupported', 'This platform has no compatible managed engine.');await hub.goto();- await expect(hub.runtimeToggle).toHaveAttribute('aria-label', copy('shell.toggle.turnOff'));- await expect(hub.runtimeToggle).toHaveAttribute('aria-checked', 'true');-- // The stopping click is INSIDE the boundary, not above it. The debt is owed- // from the moment the stop is ASKED FOR — the request is already gone when- // the click's own promise settles, so a page or browser that disconnects- // mid-flight rejects it with the server still completing the stop, and a- // boundary opened below this line is skipped on exactly that path.- // `support/restore.ts` owns both halves: where the boundary starts, and that- // "up" is a postcondition read from BOTH runtime facts rather than a second- // guess at which click is owed.- await withRuntimeRestored(api, async () => {- await hub.runtimeToggle.click();- await expect(hub.runtimeToggle).toHaveAttribute('aria-checked', 'false', { timeout: 60_000 });- // The page must explain the stopped gateway, not just flip a switch.- await expect(hub.closedState).toBeVisible();- expect((await api.runtime())?.enabled).toBe(false);-- // The return half of the round trip is the SCENARIO, so it happens here,- // in the body, through the switch the user would use. It used to live in- // the teardown, which made the spec's own subject a side effect of its- // cleanup — and left the assertions below reporting a restart nobody had- // asserted as a step.- await hub.runtimeToggle.click();- await expect(hub.runtimeToggle).toHaveAttribute('aria-checked', 'true', { timeout: 90_000 });- await expect(hub.closedState).toHaveCount(0);- });+ await expect(hub.header.getByRole('switch')).toHaveCount(0);+ await expect(hub.runtimeRetry).toBeVisible();+ // Do not download into a shared instance. Install/start and failed-start+ // recovery are exercised through the same action in the isolated page tests.});- test('A3 · the blocked stop names the backends that block it', async ({ hub, api }) => {+ test('A3 · a running gateway has no user-facing off switch', async ({ hub, api }) => {await requireModelHub(api);- // RUNNING, not merely enabled: the UI computes `stopBlocked` from- // `runtimeEnabled` plus a Gateway-mode backend without consulting health- // (`SettingsModelsPage.tsx`), so an enabled-but-`down` instance would pass- // every assertion below while never exercising the guard on a gateway that- // could actually be stopped.await requireRuntimeRunning(api);-- const restore: string[] = [];- // Same snapshot discipline as the gateway fixture: the Direct→Gateway- // switch is not mode-only on a machine whose CLI holds a native login — it- // imports a `native_cli` subscription source as part of the transition, and- // that source carries no suite prefix the sweep could find.- let sourcesBeforeSwitch: Set<string> | null = null;- const hubBackends = (await api.agents()).filter((agent) => agent.mode === 'hub').map((a) => a.backend);- try {- if (hubBackends.length === 0) {- const candidate = (await api.agents()).find((agent: Agent) => agent.cli_present);- test.skip(!candidate, 'No agent backend is present on this instance to put into Gateway mode.');- sourcesBeforeSwitch = new Set((await api.sources()).map((source) => source.id));- // Recorded BEFORE the PATCH is awaited: the server commits the mode- // before its response leaves, so a lost or timed-out response rejects- // the await with the instance already switched — a marker assigned- // after the await skips the Direct restore on exactly that path.- // (`sourcesBeforeSwitch` above is snapshotted first for the same- // reason.) Every exit from here passes through the finally, so the- // backend cannot stay in Gateway mode on any path out of this spec.- restore.push(candidate!.backend);- await api.setAgentMode(candidate!.backend, 'hub');- // An accepted switch that a later read does not show is a persistence- // or projection regression, not a precondition: the server's- // `set_agent_mode` commits the requested mode without requiring an- // eligible source, so `hub` here is the contract. A skip would turn- // that regression into a green hole.- const now = (await api.agents()).filter((agent) => agent.mode === 'hub').map((a) => a.backend);- expect(- now,- `Backend ${candidate!.backend} accepted the Gateway-mode switch but the next /agents read does not show it.`,- ).toContain(candidate!.backend);- }-- const names = (await api.agents()).filter((a) => a.mode === 'hub').map((a) => a.backend).join(', ');- await hub.goto();- // The product refuses the stop AND says who is holding it. A generic- // "cannot stop" would satisfy the disabled state and fail the user.- await expect(hub.runtimeToggle).toBeDisabled();- await expect(hub.runtimeToggle).toHaveAttribute(- 'aria-label',- copy('shell.toggle.stopBlocked', { names }),- );- } finally {- // Mode first (the switch imported the source into a Gateway context),- // then the transition-created source — before any sweep, because it does- // not carry the prefix. Which source that is belongs to- // `restoreNativeSources`, shared with the gateway fixture, so the two- // sites cannot drift into two different answers. Two nested blocks keep- // the two restorations independent.- try {- for (const backend of restore) await api.setAgentMode(backend, 'direct');- } finally {- if (sourcesBeforeSwitch) await restoreNativeSources(api, sourcesBeforeSwitch);- await api.removeSuiteSources();- }- }+ await hub.goto();+ await expect(hub.runtimePill).toBeVisible();+ await expect(hub.header.getByRole('switch')).toHaveCount(0);+ await expect(hub.closedState).toHaveCount(0);+ await expect(hub.tab('hub')).toBeVisible();});test('C6-direct-home · a machine with no sources lands on the direct home', async ({ hub, api }) => {await requireModelHub(api);- // The tab body only renders once the runtime is configurable; below that the- // page owes a closed state, which is scenario A2's subject, not this one's.await requireRuntimeRunning(api);- // Which surface this instance renders, asked once rather than re-derived- // here: the direct home has TWO forms, and the one this scenario is about is- // the one an installed backend puts a card in.const surface = surfaceKind(await api.agents(), await api.sources());- test.skip(- surface === 'gateway',- 'This instance already has sources or a Gateway backend, so the direct home is not its surface.',- );- test.skip(- surface === 'direct-no-backend',- 'No agent backend CLI is installed, so the direct home renders its install prompt — there is no '- + 'backend card and no way out of Direct mode to assert. Install a backend CLI (see ui/e2e/README.md).',- );+ test.skip(surface === 'gateway', 'This instance already has sources or a Gateway backend.');+ test.skip(surface === 'direct-no-backend', 'No native CLI is installed, so the direct home shows its install prompt.');await hub.goto();await expect(hub.directHome).toBeVisible();await expect(hub.directHome).toContainText(copy('direct.card.current'));- // The point of this surface is the way out of it, so the way out is what- // gets asserted — not merely that the card rendered.await expect(hub.directHome.getByRole('button', { name: copy('direct.action.switchToGateway') }).first(),).toBeVisible();diff --git a/ui/e2e/model-catalog/README.md b/ui/e2e/model-catalog/README.mdindex 423f48c11..7fb3806b7 100644--- a/ui/e2e/model-catalog/README.md+++ b/ui/e2e/model-catalog/README.md@@ -32,6 +32,13 @@ live discovery excludes the fixture, while isolated discovery finds every fixturspec on desktop and mobile.Collection starts no browser, web server or fixture.+`shell-layout.spec.ts` renders the complete Models page with synthetic API data.+It checks the always-on surface (no runtime switch), single-line title/status/tab+labels with all icons retained, horizontally scrollable mobile tabs, reachable+last-tab navigation, and no page-level horizontal overflow in+EN/ZH at 320–402px mobile widths and desktop/tablet widths. This is browser layout+coverage, not evidence of a live provider connection.+`gateway-status.spec.ts` consumes `MH-GATEWAY-STATUS-001`. It renders the realAgent card with isolated catalog and Agent supply data. The route summary andcollapsible Agent footer remain separate, and long identifiers wrap inside thediff --git a/ui/e2e/model-catalog/fixture.tsx b/ui/e2e/model-catalog/fixture.tsxindex 22a2aa6e7..06f7ba728 100644--- a/ui/e2e/model-catalog/fixture.tsx+++ b/ui/e2e/model-catalog/fixture.tsx@@ -15,6 +15,7 @@ import { QuotaFixture } from './quotaFixture';import { RouteFixture } from './routeFixture';import { TokenScopeFixture } from './tokenScopeFixture';import { UsageFixture } from './usageFixture';+import { ShellFixture } from './shellFixture';const params = new URLSearchParams(location.search);const backend = params.get('backend') as AgentBackend;@@ -66,7 +67,13 @@ export function Fixture() {</I18nextProvider>;}-createRoot(document.getElementById('root')!).render(params.get('view') === 'gateway'+if (params.get('view') === 'shell') {+ document.documentElement.dataset.theme = params.get('theme') ?? 'dark';+}++createRoot(document.getElementById('root')!).render(params.get('view') === 'shell'+ ? <I18nextProvider i18n={language}><ShellFixture /></I18nextProvider>+ : params.get('view') === 'gateway'? <I18nextProvider i18n={language}><GatewayFixture /></I18nextProvider>: params.get('view') === 'route'? <I18nextProvider i18n={language}><RouteFixture /></I18nextProvider>diff --git a/ui/e2e/model-catalog/shell-layout.spec.ts b/ui/e2e/model-catalog/shell-layout.spec.tsnew file mode 100644index 000000000..007132256--- /dev/null+++ b/ui/e2e/model-catalog/shell-layout.spec.ts@@ -0,0 +1,59 @@+import { expect, test, type Locator } from '@playwright/test';+import { hub } from '../support/copy';++// JSDOM cannot detect flex shrink splitting Chinese into separate lines. Check+// actual text rectangles and page overflow in the real browser instead.+const expectSingleLine = async (locator: Locator) => {+ const lines = await locator.evaluate((element) => {+ const walker = document.createTreeWalker(element, NodeFilter.SHOW_TEXT);+ const tops: number[] = [];+ while (walker.nextNode()) {+ if (!walker.currentNode.textContent?.trim()) continue;+ const range = document.createRange();+ range.selectNodeContents(walker.currentNode);+ for (const rect of range.getClientRects()) {+ if (rect.width && rect.height && !tops.some((top) => Math.abs(top - rect.top) <= 1)) tops.push(rect.top);+ }+ }+ return tops.length;+ });+ expect(lines).toBe(1);+};++for (const lang of ['zh', 'en'] as const) {+ test(`Models header and tabs stay readable without the runtime switch (${lang})`, async ({ page }, testInfo) => {+ await page.goto(`/e2e/model-catalog/fixture.html?view=shell&lang=${lang}`);+ await expect(page.getByText('Anthropic API', { exact: true })).toBeVisible();+ const header = page.locator('.model-hub-shell-head');+ const title = header.getByRole('heading', { level: 1 });+ const status = header.locator('.model-hub-runtime-pill');+ const migration = header.getByRole('button', { name: hub('migration.open', {}, lang), exact: true });+ const refresh = header.getByRole('button', { name: hub('direct.action.refreshAgents', {}, lang), exact: true });+ const tabs = page.getByRole('tab');+ await expect(tabs).toHaveCount(5);+ await expect(header.getByRole('switch')).toHaveCount(0);+ const widths = testInfo.project.name === 'mobile' ? [402, 390, 320] : [1280, 768];+ for (const width of widths) {+ await page.setViewportSize({ width, height: 900 });+ for (const label of [title, status, migration, ...await tabs.all()]) await expectSingleLine(label);+ for (const tab of await tabs.all()) await expect(tab.locator('svg')).toBeVisible();+ if (testInfo.project.name === 'mobile') {+ expect(await page.getByRole('tablist').evaluate((element) => element.scrollWidth > element.clientWidth)).toBe(true);+ }+ await expect(refresh).toBeVisible();+ expect(await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth)).toBe(true);+ const titleBox = (await title.boundingBox())!;+ const statusBox = (await status.boundingBox())!;+ expect(titleBox.x + titleBox.width <= statusBox.x || statusBox.y >= titleBox.y + titleBox.height).toBe(true);+ // The last tab remains reachable by native horizontal scrolling; changing+ // tabs still renders its real panel rather than clipping navigation away.+ await tabs.last().click();+ await expect(tabs.last()).toHaveAttribute('aria-selected', 'true');+ await expect(tabs.last()).toBeInViewport();+ await tabs.first().click();+ await expect(tabs.first()).toHaveAttribute('aria-selected', 'true');+ await expect(tabs.first()).toBeInViewport();+ if (width === widths[0]) await page.screenshot({ path: testInfo.outputPath('models-shell.png'), scale: 'css', animations: 'disabled' });+ }+ });+}diff --git a/ui/e2e/model-catalog/shellFixture.tsx b/ui/e2e/model-catalog/shellFixture.tsxnew file mode 100644index 000000000..50e9011b5--- /dev/null+++ b/ui/e2e/model-catalog/shellFixture.tsx@@ -0,0 +1,48 @@+import { MemoryRouter } from 'react-router-dom';+import { SettingsModelsPage } from '../../src/components/settings/models/SettingsModelsPage';+import { modelsApi } from '../../src/components/settings/models/modelsApi';+import { CONTRACT_VERSION, type AgentSupply, type Source } from '../../src/components/settings/models/types';+import { ToastProvider } from '../../src/context/ToastProvider';++// Only reads at the API boundary are replaced. Layout and interactions render+// the complete shipped Models page, with no account or credential data.+function installShellFixture() {+ const backends = ['claude', 'codex', 'opencode', 'vibey'] as const;+ const sources: Source[] = ['Anthropic API', 'OpenAI API', 'Grok API', 'OpenAI'].map((name, index) => ({+ id: `src_shell${index}`, display_name: name, vendor: index === 0 ? 'anthropic' : 'openai',+ kind: index === 3 ? 'subscription' : 'api_key',+ protocol: index === 0 ? 'anthropic' : 'openai_responses', supply_channel: 'hub',+ billing: index === 3 ? 'monthly' : 'metered', last_discovered_at: null,+ base_url: index === 3 ? null : 'https://api.example.com/v1',+ account_label: index === 3 ? '[email protected]' : null,+ state: { status: 'active', retry_at: null, detail_key: null }, models: [],+ adopted_by: backends.map((backend) => ({ backend, menu_model: 'example-model' })),+ }));+ const agents: AgentSupply[] = backends.map((backend) => ({+ backend, cli_present: backend !== 'vibey', mode: 'hub', menu_kind: 'open', catalog_models: [],+ sources: { order: sources.map((source) => source.id), eligibility: sources.map((source) => ({ source_id: source.id, eligible: true })) },+ }));+ modelsApi.listSources = async () => sources;+ modelsApi.listAgents = async () => agents;+ modelsApi.refreshAgentPresence = async () => agents;+ modelsApi.getAgentProvenance = async () => null;+ modelsApi.getAgentChains = async () => [];+ modelsApi.listEvents = async () => [];+ modelsApi.getRuntimeStatus = async () => ({+ contract_version: CONTRACT_VERSION, enabled: true,+ manifest: { name: 'cliproxyapi', resolution: 'resolved', version: '1.0.0', source_sha: 'fixture', assets: [] },+ status: { installed_version: '1.0.0', verified: true, health: 'ok' },+ });+ modelsApi.scanMigration = async () => ({+ contract_version: CONTRACT_VERSION,+ items: [{ id: 'mig_shell', backend: 'claude', kind: 'oauth_native', masked_detail: 'Demo account', proposed_action: 'import', selected: true, notes_key: null }],+ });+}++if (new URLSearchParams(location.search).get('view') === 'shell') installShellFixture();++export function ShellFixture() {+ return <MemoryRouter><ToastProvider>+ <main className="mx-auto min-w-0 max-w-[1100px] p-4"><SettingsModelsPage /></main>+ </ToastProvider></MemoryRouter>;+}diff --git a/ui/e2e/support/hub.ts b/ui/e2e/support/hub.tsindex c9a654457..47b09ac41 100644--- a/ui/e2e/support/hub.ts+++ b/ui/e2e/support/hub.ts@@ -67,14 +67,9 @@ export class ModelHubPage {return this.page.locator('.model-hub-shell-head');}- /** The gateway on/off switch. Its accessible name IS the product's- * explanation of why it is disabled, so specs read the name, not a tooltip. */- get runtimeToggle(): Locator {- return this.header.getByRole('switch');- }-- async runtimeToggleLabel(): Promise<string> {- return (await this.runtimeToggle.getAttribute('aria-label')) ?? '';+ /** Recovery remains reachable after an old disabled intent or failed start. */+ get runtimeRetry(): Locator {+ return this.shell.getByRole('button', { name: hub('gateway.retry'), exact: true });}get runtimePill(): Locator {diff --git a/ui/src/components/settings/SettingsBackendsPage.test.tsx b/ui/src/components/settings/SettingsBackendsPage.test.tsxindex c8979204b..0c98078db 100644--- a/ui/src/components/settings/SettingsBackendsPage.test.tsx+++ b/ui/src/components/settings/SettingsBackendsPage.test.tsx@@ -122,21 +122,21 @@ describe('backend attention', () => {const vibey = await rowOf('Vibey');expect(await within(vibey).findByText('No model selected')).toBeTruthy();- expect(within(vibey).queryByText('Gateway off')).toBeNull();+ expect(within(vibey).queryByText('Gateway unavailable')).toBeNull();expect(within(await rowOf('Claude Code')).queryByText('No model selected')).toBeNull();});- // Turning the gateway off leaves the backend enabled with nothing to run on;- // its status names the cause and its page leads to Models.- it('says the gateway is off instead, on the row and on the backend page', async () => {+ // A legacy disabled runtime leaves the backend enabled with nothing to run on;+ // its status names the cause and its page leads to Models for recovery.+ it('reports an unavailable gateway on the row and leads to recovery on the backend page', async () => {vi.spyOn(modelsApi, 'listAgents').mockResolvedValue(withoutModel);mocks.api.getConfig.mockResolvedValue(modelHubConfig(false));renderBackends();const vibey = await rowOf('Vibey');- expect(await within(vibey).findByText('Gateway off')).toBeTruthy();+ expect(await within(vibey).findByText('Gateway unavailable')).toBeTruthy();expect(within(vibey).queryByText('No model selected')).toBeNull();- expect(within(await rowOf('Claude Code')).queryByText('Gateway off')).toBeNull();+ expect(within(await rowOf('Claude Code')).queryByText('Gateway unavailable')).toBeNull();fireEvent.click(within(vibey).getByRole('link', { name: 'Configure' }));expect(await screen.findByText('The model gateway is off, so Vibey has no model to run on.')).toBeTruthy();@@ -161,7 +161,7 @@ describe('backend attention', () => {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,+ // The deployment capability gate leaves the built-in 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 () => {vi.spyOn(modelsApi, 'listAgents').mockResolvedValue(withoutModel);diff --git a/ui/src/components/settings/models/SettingsModelsPage.render.test.tsx b/ui/src/components/settings/models/SettingsModelsPage.render.test.tsxindex 75deba8c3..bd188a5e1 100644--- a/ui/src/components/settings/models/SettingsModelsPage.render.test.tsx+++ b/ui/src/components/settings/models/SettingsModelsPage.render.test.tsx@@ -477,7 +477,7 @@ describe('SettingsModelsPage surface branches', () => {const start = vi.spyOn(modelsApi, 'startRuntime').mockResolvedValue(runtime);renderPage([], [directAgent('claude')], notInstalled);- await userEvent.click(await screen.findByRole('switch', { name: /Turn model gateway on|开启模型网关/i }));+ await userEvent.click(await screen.findByRole('button', { name: /^Retry$|^重试$/i }));await waitFor(() => expect(install).toHaveBeenCalledOnce());await waitFor(() => expect(start).toHaveBeenCalledOnce());expect(screen.queryByRole('dialog')).toBeNull();@@ -820,8 +820,8 @@ describe('SettingsModelsPage surface branches', () => {expect(screen.queryByText(/^All 3 backends are direct$|^3 个后端均为直连$/i)).toBeNull();});- it('gates all internal configuration behind the stopped runtime switch', async () => {- const stopped = { ...runtime, status: { ...runtime.status, health: 'down' as const } };+ it('recovers a previously disabled runtime without exposing an on/off switch', async () => {+ const stopped = { ...runtime, enabled: false, status: { ...runtime.status, health: 'down' as const } };vi.spyOn(modelsApi, 'listSources').mockResolvedValue([]);vi.spyOn(modelsApi, 'listAgents').mockResolvedValue([directAgent('claude'),@@ -840,13 +840,12 @@ describe('SettingsModelsPage surface branches', () => {</ToastProvider>,);- const toggle = await screen.findByRole('switch', { name: /Turn model gateway on|开启模型网关/i });- expect(toggle.getAttribute('aria-checked')).toBe('false');- expect(await screen.findByText(/^Model gateway is off$|^模型网关已关闭$/i)).toBeTruthy();+ expect(await screen.findByRole('heading', { name: /^Model gateway is unavailable$|^模型网关暂不可用$/i })).toBeTruthy();+ expect(screen.queryByRole('switch')).toBeNull();expect(screen.queryAllByRole('tab')).toHaveLength(0);expect(screen.queryByText(/^All 3 backends are direct$|^3 个后端均为直连$/i)).toBeNull();- await userEvent.click(toggle);+ await userEvent.click(screen.getByRole('button', { name: /^Retry$|^重试$/i }));await waitFor(() => expect(start).toHaveBeenCalledOnce());expect(await screen.findAllByRole('tab')).toHaveLength(5);@@ -871,15 +870,14 @@ describe('SettingsModelsPage surface branches', () => {</ToastProvider>,);- const toggle = await screen.findByRole('switch', { name: /Switch codex to Direct|请先将 codex 切换为直连/i });- expect(toggle.getAttribute('aria-checked')).toBe('true');- expect((toggle as HTMLButtonElement).disabled).toBe(true);expect(await screen.findByText('Retained source')).toBeTruthy();+ expect(screen.queryByRole('switch')).toBeNull();+ expect(screen.getByRole('button', { name: /^Retry$|^重试$/i })).toBeTruthy();expect(screen.getByRole('button', { name: /Runtime mode:|运行模式[::]/i })).toBeTruthy();expect(screen.queryAllByRole('tab')).toHaveLength(5);});- it('still allows persisted enablement to be turned off on an unsupported host', async () => {+ it('does not offer runtime actions on an unsupported host', async () => {const unsupported = {...runtime,enabled: true,@@ -894,8 +892,6 @@ describe('SettingsModelsPage surface branches', () => {]);vi.spyOn(modelsApi, 'getRuntimeStatus').mockResolvedValue(unsupported);vi.spyOn(modelsApi, 'listEvents').mockResolvedValue([]);- const stopped = { ...unsupported, enabled: false };- const stop = vi.spyOn(modelsApi, 'stopRuntime').mockResolvedValue(stopped);render(<ToastProvider>@@ -905,51 +901,22 @@ describe('SettingsModelsPage surface branches', () => {</ToastProvider>,);- const toggle = await screen.findByRole('switch', { name: /Turn model gateway off|关闭模型网关/i });- expect((toggle as HTMLButtonElement).disabled).toBe(false);- await userEvent.click(toggle);- await waitFor(() => expect(stop).toHaveBeenCalledOnce());- });-- it('stops an unused running gateway and hides its retained configuration', async () => {- renderPage([retainedSource]);- const stopped = { ...runtime, status: { ...runtime.status, health: 'not_started' as const } };- const stop = vi.spyOn(modelsApi, 'stopRuntime').mockResolvedValue(stopped);-- await screen.findByText('Retained source');- await userEvent.click(screen.getByRole('switch', { name: /Turn model gateway off|关闭模型网关/i }));-- await waitFor(() => expect(stop).toHaveBeenCalledOnce());- expect(await screen.findByText(/^Model gateway is off$|^模型网关已关闭$/i)).toBeTruthy();- expect(screen.queryByText('Retained source')).toBeNull();- expect(screen.queryAllByRole('tab')).toHaveLength(0);+ expect(await screen.findAllByRole('tab')).toHaveLength(5);+ expect(screen.queryByRole('switch')).toBeNull();+ expect(within(document.querySelector('.model-hub-shell-head') as HTMLElement).queryByRole('button', { name: /^Retry$|^重试$/i })).toBeNull();});- it('does not turn the runtime off while a backend still uses the gateway', async () => {- vi.spyOn(modelsApi, 'listSources').mockResolvedValue([retainedSource]);- vi.spyOn(modelsApi, 'listAgents').mockResolvedValue([takeoverAgent]);- vi.spyOn(modelsApi, 'getRuntimeStatus').mockResolvedValue(runtime);- vi.spyOn(modelsApi, 'listEvents').mockResolvedValue([]);- const stop = vi.spyOn(modelsApi, 'stopRuntime').mockResolvedValue(runtime);-- render(- <ToastProvider>- <I18nextProvider i18n={i18n}>- <SettingsModelsPage />- </I18nextProvider>- </ToastProvider>,- );+ it.each([false, true])('keeps the running gateway available without an off switch (in use: %s)', async (inUse) => {+ renderPage([retainedSource], inUse ? [takeoverAgent] : [directAgent('codex')]);- const toggle = await screen.findByRole('switch', { name: /Switch codex to Direct|请先将 codex 切换为直连/i });- expect((toggle as HTMLButtonElement).disabled).toBe(true);- await userEvent.click(toggle);- expect(stop).not.toHaveBeenCalled();expect(await screen.findByText('Retained source')).toBeTruthy();+ expect(screen.queryByRole('switch')).toBeNull();+ expect(screen.getAllByRole('tab')).toHaveLength(5);+ expect(within(document.querySelector('.model-hub-shell-head') as HTMLElement).queryByRole('button', { name: /^Retry$|^重试$/i })).toBeNull();});- // The in-process catalog is configurable even when empty and without a CLI.- // Runtime Stop still depends on whether that catalog actually owns models.- it.each([false, true])('MH-VIBEY-003 derives runtime use from Avibe catalog presence: %s', async (configured) => {+ // The in-process catalog remains configurable with or without models.+ it.each([false, true])('MH-VIBEY-003 keeps Avibe catalog management available: %s', async (configured) => {const catalogModel: BackendModel = {id: 'menu-alias', display_name: null, origin: 'manual', models_dev_id: null,context_window: null, max_output_tokens: null, input_modalities: [], output_modalities: [],@@ -959,26 +926,16 @@ describe('SettingsModelsPage surface branches', () => {directAgent('claude'), directAgent('codex'), directAgent('opencode'),{ ...emptyVibeyAgent, catalog_models: configured ? [catalogModel] : [] },]);- const stop = vi.spyOn(modelsApi, 'stopRuntime').mockResolvedValue({ ...runtime, enabled: false });- const toggle = await screen.findByRole('switch', {- name: configured ? /Vibey's models use|Vibey 的模型通过/i : /Turn model gateway off|关闭模型网关/i,- });- expect((toggle as HTMLButtonElement).disabled).toBe(configured);const vibeyCard = (await screen.findByText('Vibey')).closest('[data-agent-backend]') as HTMLElement;expect(within(vibeyCard).getAllByRole('button', { name: /^Manage models$|^管理模型$/i }).length).toBeGreaterThan(0);await userEvent.click(within(vibeyCard).getByRole('button', { name: /Runtime mode:|运行模式[::]/i }));const modeGroup = await screen.findByRole('group', { name: /Runtime mode|运行模式/i });expect(within(modeGroup).queryByRole('button', { name: /Switch to direct|切到直连/i })).toBeNull();await userEvent.click(within(modeGroup).getByRole('button', { pressed: true }));- if (configured) {- expect(screen.queryByText(/^All 3 backends are direct$|^3 个后端均为直连$/i)).toBeNull();- await userEvent.click(toggle);- expect(stop).not.toHaveBeenCalled();- } else {- expect(screen.queryByText(/^All 3 backends are direct$|^3 个后端均为直连$/i)).toBeNull();+ expect(screen.queryByRole('switch')).toBeNull();+ expect(screen.queryByText(/^All 3 backends are direct$|^3 个后端均为直连$/i)).toBeNull();+ if (!configured) {expect(screen.getAllByRole('button', { name: /^Switch to Gateway$|^切换到模型网关$/i })).toHaveLength(3);- await userEvent.click(toggle);- await waitFor(() => expect(stop).toHaveBeenCalledOnce());}});@@ -2436,7 +2393,7 @@ describe('SettingsModelsPage surface branches', () => {expect(recovery).not.toMatch(/void refresh\(\)/);});- it('keeps retained supply rows but clears derived chain claims when a later supply read fails', async () => {+ it('A4 keeps retained supply rows but clears derived chain claims when a later supply read fails', async () => {const head = { ...retainedSource, id: 'src_head', display_name: 'Paused source', state: { status: 'cooldown' as const, retry_at: '2099-01-01T00:00:00Z', detail_key: null } };const relay = { ...retainedSource, id: 'src_relay', display_name: 'Replacement source', state: { status: 'active' as const, retry_at: null, detail_key: null } };vi.spyOn(modelsApi, 'listSources').mockResolvedValue([head, relay]);@@ -2463,6 +2420,9 @@ describe('SettingsModelsPage surface branches', () => {await waitFor(() => expect(agentRead).toHaveBeenCalledTimes(2));await closeSourceDetails();expect(await screen.findByText(/Could not read this backend's supply|没有读到后端列表/i)).toBeTruthy();+ const header = within(document.querySelector('.model-hub-shell-head') as HTMLElement);+ expect(header.queryByRole('switch')).toBeNull();+ expect(header.getByText(/^Gateway running$|^模型网关运行中$/i)).toBeTruthy();expect(screen.queryByTitle(takeoverMappingTitle)).toBeNull();expect(screen.getAllByText('—').length).toBeGreaterThan(0);});diff --git a/ui/src/components/settings/models/SettingsModelsPage.tsx b/ui/src/components/settings/models/SettingsModelsPage.tsxindex 543db085a..47722a7bd 100644--- a/ui/src/components/settings/models/SettingsModelsPage.tsx+++ b/ui/src/components/settings/models/SettingsModelsPage.tsx@@ -1,5 +1,5 @@import * as React from 'react';-import { ArrowDownToLine, Activity, Gauge, LoaderCircle, Power, RefreshCw, Route, ScrollText, Wrench } from 'lucide-react';+import { ArrowDownToLine, Activity, Gauge, LoaderCircle, RefreshCw, Route, ScrollText, Wrench } from 'lucide-react';import { useTranslation } from 'react-i18next';import { useLocation, useNavigate, useSearchParams } from 'react-router-dom';@@ -11,7 +11,6 @@ import { Popover, PopoverAnchor, PopoverContent } from '@/components/ui/popover'import { useInstanceAuthorization } from '@/context/InstanceAuthorizationContext';import { useToast } from '@/context/ToastContext';import { cn } from '@/lib/utils';-import { ToggleSwitch } from '../SettingsPrimitives';import { AddApiKeyDialog } from './AddApiKeyDialog';import { BackendModelCatalogDialog, type CatalogFocus } from './BackendModelCatalogDialog';import { OAuthConnectDialog } from './OAuthConnectDialog';@@ -189,9 +188,8 @@ type AuthorizedSurfaceLanding = {export const RuntimePill: React.FC<{read: RegionRead<RuntimeDependency>;starting: boolean;- stopping?: boolean;directCount?: number;-}> = ({ read, starting, stopping = false, directCount }) => {+}> = ({ read, starting, directCount }) => {const { t } = useModelsTranslation();const projection = foldRegionRead<RuntimeDependency, { runtime: RuntimeDependency; authoritative: boolean } | null>(read, {loading: () => null,@@ -207,11 +205,9 @@ export const RuntimePill: React.FC<{const health = runtime.status.health;const unread = read.kind === 'degraded' && read.cause === 'read_failed';const canInstall = health === 'not_installed' && runtimeCanAttemptInstall(runtime);- const allDirect = authoritative && !starting && !stopping && health === 'ok' && directCount !== undefined && directCount > 0;+ const allDirect = authoritative && !starting && health === 'ok' && directCount !== undefined && directCount > 0;const key = unread? 'unread'- : stopping- ? 'stopping': starting? 'starting': health === 'installing'@@ -234,20 +230,18 @@ export const RuntimePill: React.FC<{(health === 'down' || health === 'degraded' || unread) && 'model-hub-runtime-pill--error',allDirect && 'model-hub-runtime-pill--direct',);- return <span className={className}><span className="model-hub-runtime-dot" />{(starting || stopping || health === 'installing') && <LoaderCircle className="animate-spin" />}{t(`settings.models.shell.${key}`, allDirect ? { count: directCount } : undefined)}</span>;+ return <span className={className}><span className="model-hub-runtime-dot" />{(starting || health === 'installing') && <LoaderCircle className="animate-spin" />}{t(`settings.models.shell.${key}`, allDirect ? { count: directCount } : undefined)}</span>;};const RuntimeClosedState: React.FC<{read: RegionRead<RuntimeDependency>;runtime: RuntimeDependency | null;starting: boolean;- stopping: boolean;-}> = ({ read, runtime, starting, stopping }) => {+ onRetry?: () => void;+}> = ({ read, runtime, starting, onRetry }) => {const { t } = useModelsTranslation();const health = runtime?.status.health ?? null;- const key = stopping- ? 'stopping'- : starting+ const key = starting? 'starting': read.kind === 'unread'? 'unread'@@ -262,31 +256,35 @@ const RuntimeClosedState: React.FC<{: health === 'down'? 'down': 'off';- const busy = starting || stopping || health === 'installing';+ const busy = starting || health === 'installing';return (<section className="model-hub-runtime-closed" aria-live="polite"><span className="model-hub-runtime-closed-icon" aria-hidden="true">- {busy ? <LoaderCircle className="animate-spin" /> : <Power />}+ {busy ? <LoaderCircle className="animate-spin" /> : <RefreshCw />}</span><h2>{t(`settings.models.shell.closed.${key}.title`)}</h2><p>{t(`settings.models.shell.closed.${key}.body`)}</p>+ {onRetry && <Button variant="secondary" size="sm" className="mt-4" disabled={busy} onClick={onRetry}>{t('settings.models.gateway.retry')}</Button>}</section>);};-const ModelHubShell: React.FC<{ actions?: React.ReactNode; children: React.ReactNode; rootRef?: React.Ref<HTMLDivElement> }> = ({ actions, children, rootRef }) => {+const ModelHubShell: React.FC<{ status?: React.ReactNode; actions?: React.ReactNode; children: React.ReactNode; rootRef?: React.Ref<HTMLDivElement> }> = ({ status, actions, children, rootRef }) => {const { t } = useModelsTranslation();return (<div ref={rootRef} className="model-hub-shell"><header className="model-hub-shell-head">- <span className="flex items-center gap-[9px]">- <h1>{t('settings.models.shell.title')}</h1>- <ModelHubInfoHint- label={t('settings.models.shell.modelsInfo.label')}- content={t('settings.models.shell.modelsInfo.body')}- className="model-hub-shell-info"- />- </span>+ <div className="model-hub-shell-identity">+ <span className="model-hub-shell-title">+ <h1>{t('settings.models.shell.title')}</h1>+ <ModelHubInfoHint+ label={t('settings.models.shell.modelsInfo.label')}+ content={t('settings.models.shell.modelsInfo.body')}+ className="model-hub-shell-info"+ />+ </span>+ {status}+ </div>{actions}</header>{children}@@ -336,9 +334,9 @@ type HubTab = 'sources' | 'tools' | 'quota' | 'usage' | 'logs';const HubTabs: React.FC<{ tab: HubTab; onChange: (tab: HubTab) => void }> = ({ tab, onChange }) => {const { t } = useModelsTranslation();return (- <div role="tablist" className="flex h-[39px] items-end gap-1 border-b border-border">+ <div role="tablist" className="model-hub-tabs flex min-w-0 items-end gap-1 overflow-x-auto border-b border-border">{(['sources', 'tools', 'quota', 'usage', 'logs'] as const).map((id) => (- <button key={id} type="button" role="tab" aria-selected={tab === id} onClick={() => onChange(id)} className={cn('flex h-[41px] items-center gap-[7px] border-b-2 px-3.5 text-[13px] transition-colors', tab === id ? 'border-mint font-semibold text-foreground' : 'border-transparent font-normal text-muted hover:text-foreground')}>+ <button key={id} type="button" role="tab" aria-selected={tab === id} onClick={() => onChange(id)} className={cn('flex h-[41px] shrink-0 items-center gap-[7px] whitespace-nowrap border-b-2 px-3.5 text-[13px] transition-colors', tab === id ? 'border-mint font-semibold text-foreground' : 'border-transparent font-normal text-muted hover:text-foreground')}>{id === 'sources' ? <Route className="size-3.5" /> : id === 'tools' ? <Wrench className="size-3.5" /> : id === 'quota' ? <Gauge className="size-3.5" /> : id === 'usage' ? <Activity className="size-3.5" /> : <ScrollText className="size-3.5" />}{t(`settings.models.shell.tab.${id === 'sources' ? 'hub' : id}`)}</button>@@ -429,7 +427,6 @@ export const SettingsModelsPage: React.FC = () => {const [quotaRead, setQuotaRead] = React.useState<RegionRead<QuotaSummary>>(loadingRegion);const [refreshingQuota, setRefreshingQuota] = React.useState(false);const [startingRuntime, setStartingRuntime] = React.useState(false);- const [stoppingRuntime, setStoppingRuntime] = React.useState(false);const [runtimeRecoveryPending, setRuntimeRecoveryPending] = React.useState(false);const [migrationOpen, setMigrationOpen] = React.useState(false);const [migrationBackend, setMigrationBackend] = React.useState<AgentBackend | null>(null);@@ -598,9 +595,7 @@ export const SettingsModelsPage: React.FC = () => {const runtimeEnabled = retainedRuntime !== null&& (retainedRuntime.enabled ?? runtimeIsRunning(retainedRuntime))&& runtimeRead.kind !== 'unread';- const runtimeConfigurationVisible = (- runtimeRunning || (runtimeEnabled && runtimeHealth !== 'installing')- ) && !stoppingRuntime;+ const runtimeConfigurationVisible = runtimeRunning || (runtimeEnabled && runtimeHealth !== 'installing');React.useEffect(() => {// Re-asked whenever the dialog closes, since applying it is what empties// the scan.@@ -1102,7 +1097,7 @@ export const SettingsModelsPage: React.FC = () => {}}, [feed, showToast, t]);const startRuntime = async () => {- if (startingRuntime || stoppingRuntime) return;+ if (startingRuntime) return;setStartingRuntime(true);try {if (!retainedRuntime) {@@ -1127,23 +1122,6 @@ export const SettingsModelsPage: React.FC = () => {setStartingRuntime(false);}};- const stopRuntime = async () => {- if (startingRuntime || stoppingRuntime) return;- setStoppingRuntime(true);- try {- const stopped = await modelsApi.stopRuntime();- setRuntimeRead(readyRegion(stopped));- setRuntimeRecoveryPending(false);- setSelectedSourceId(null);- setTab('sources');- } catch {- const observed = await modelsApi.getRuntimeStatus().catch(() => null);- setRuntimeRead((previous) => observed ? readyRegion(observed) : failRegionRead(previous));- showToast(t('settings.models.errors.stopFailed') as string, 'error');- } finally {- setStoppingRuntime(false);- }- };const landingLoading = sourcesRead.kind === 'loading'&& supplyRead.kind === 'loading'&& runtimeRead.kind === 'loading';@@ -1165,34 +1143,10 @@ export const SettingsModelsPage: React.FC = () => {);const hubBackends = agents.filter(agentUsesHubRuntime).map((agent) => agent.backend);const activeBackends = supplyRead.kind === 'ready' ? new Set(hubBackends) : undefined;- const stopBlocked = runtimeEnabled && (supplyRead.kind !== 'ready' || hubBackends.length > 0);- const runtimeSwitchUnsupported = !runtimeEnabled- && runtimeHealth === 'not_installed'- && retainedRuntime?.manifest.resolution === 'unsupported';- const runtimeSwitchDisabled = startingRuntime- || stoppingRuntime- || runtimeRead.kind !== 'ready'- || runtimeHealth === 'installing'- || runtimeSwitchUnsupported- || stopBlocked;- const builtinHubBackend = hubBackends.find((backend) => !getBackendUiMeta(backend).capabilities.supports_cli);- const runtimeSwitchLabel = stopBlocked- ? supplyRead.kind === 'ready'- ? builtinHubBackend- ? t('settings.models.shell.toggle.stopVibeyBlocked', { name: getBackendUiMeta(builtinHubBackend).label })- : t('settings.models.shell.toggle.stopBlocked', { names: hubBackends.join(', ') })- : t('settings.models.shell.toggle.stopUnavailable')- : runtimeEnabled- ? t('settings.models.shell.toggle.turnOff')- : t('settings.models.shell.toggle.turnOn');- const toggleRuntime = () => {- if (runtimeSwitchDisabled) return;- if (runtimeEnabled) {- void stopRuntime();- } else {- void startRuntime();- }- };+ const canRetryRuntime = runtimeRead.kind === 'ready'+ && !runtimeRunning+ && runtimeHealth !== 'installing'+ && retainedRuntime?.manifest.resolution !== 'unsupported';const installedSupplyRead = foldRegionRead<AgentSupply[], RegionRead<AgentSupply[]>>(supplyDisplayRead, {loading: () => loadingRegion(),ready: () => readyRegion(installedAgents),@@ -1570,14 +1524,9 @@ export const SettingsModelsPage: React.FC = () => {return (<ModelHubShellrootRef={pageRef}- actions={!landingLoading- ? <span className="flex items-center gap-2">- <RuntimePill- read={runtimeRead}- starting={startingRuntime}- stopping={stoppingRuntime}- directCount={directEmpty ? installedNativeAgents.length : undefined}- />+ status={!landingLoading && <RuntimePill read={runtimeRead} starting={startingRuntime} directCount={directEmpty ? installedNativeAgents.length : undefined} />}+ actions={!landingLoading && runtimeConfigurationVisible+ ? <div className="model-hub-shell-actions">{runtimeConfigurationVisible && migrationAvailable === true && (<Buttontype="button"@@ -1601,20 +1550,13 @@ export const SettingsModelsPage: React.FC = () => {title={t('settings.models.direct.action.refreshAgents')}onClick={() => { setMigrationScanEpoch((epoch) => epoch + 1); void retrySupply(); }}><RefreshCw aria-hidden className={cn('size-3.5', presenceRefreshing && 'animate-spin')} /></Button>}- <span title={runtimeSwitchLabel}>- <ToggleSwitch- enabled={runtimeEnabled}- disabled={runtimeSwitchDisabled}- label={runtimeSwitchLabel}- onClick={toggleRuntime}- />- </span>- </span>+ {canRetryRuntime && <Button variant="secondary" size="sm" disabled={startingRuntime} onClick={() => void startRuntime()}>{t('settings.models.gateway.retry')}</Button>}+ </div>: undefined}>{landingLoading ? <div className="text-[13px] text-muted">{t('common.loading')}</div>: !runtimeConfigurationVisible- ? <RuntimeClosedState read={runtimeRead} runtime={retainedRuntime} starting={startingRuntime} stopping={stoppingRuntime} />+ ? <RuntimeClosedState read={runtimeRead} runtime={retainedRuntime} starting={startingRuntime} onRetry={canRetryRuntime ? () => void startRuntime() : undefined} />: <div className="space-y-[22px]">{/* The tab strip belongs to the Hub, not to the sourceinventory. Usage and switch history both outlive the Sourcesdiff --git a/ui/src/components/settings/models/modelHubSurface.css b/ui/src/components/settings/models/modelHubSurface.cssindex 5a6398b4a..3d4e794dd 100644--- a/ui/src/components/settings/models/modelHubSurface.css+++ b/ui/src/components/settings/models/modelHubSurface.css@@ -313,6 +313,7 @@display: flex;flex-direction: column;gap: 22px;+ min-width: 0;width: 100%;}@@ -321,6 +322,41 @@min-height: 38px;align-items: center;justify-content: space-between;+ flex-wrap: wrap;+ gap: 12px;+}++.model-hub-shell-identity {+ display: flex;+ min-width: 0;+ flex: 1;+ flex-wrap: wrap;+ align-items: center;+ justify-content: space-between;+ gap: 8px 12px;+}++.model-hub-shell-title {+ display: flex;+ flex-shrink: 0;+ align-items: center;+ gap: 9px;+}++.model-hub-shell-actions {+ display: flex;+ flex-wrap: wrap;+ align-items: center;+ justify-content: flex-end;+ gap: 8px;+}++.model-hub-tabs { scrollbar-width: thin; }+.model-hub-tabs svg { flex-shrink: 0; }++@media (max-width: 639px) {+ .model-hub-shell-identity { flex-basis: 100%; }+ .model-hub-shell-actions { width: 100%; }}.model-hub-shell-head h1 {@@ -329,6 +365,7 @@font-weight: 700;letter-spacing: 0;line-height: normal;+ white-space: nowrap;}/* The glyph is the control: the frame draws a bare 13px hint icon beside the@@ -362,6 +399,8 @@.model-hub-runtime-pill {display: inline-flex;width: fit-content;+ flex-shrink: 0;+ white-space: nowrap;align-items: center;gap: 5px;border: 1px solid var(--model-hub-mint-4d);diff --git a/ui/src/components/settings/models/modelsApi.ts b/ui/src/components/settings/models/modelsApi.tsindex c3d818c8c..a39012d0c 100644--- a/ui/src/components/settings/models/modelsApi.ts+++ b/ui/src/components/settings/models/modelsApi.ts@@ -184,7 +184,6 @@ export type ModelsApi = {/** Start the contract-owned client installation transaction. */installRuntime(): Promise<RuntimeDependency>;startRuntime(): Promise<RuntimeDependency>;- stopRuntime(): Promise<RuntimeDependency>;startOAuth(vendor: string, channel: SupplyChannel, clientNonce?: string): Promise<OAuthFlow>;getOAuthStatus(flowId: string): Promise<OAuthResult>;submitOAuth(flowId: string, value: string): Promise<OAuthResult>;@@ -701,7 +700,6 @@ export const modelsApi: ModelsApi = {getRuntimeStatus: () => call<{ runtime?: RuntimeDependency } & RuntimeDependency>('/api/models/runtime/status').then((r) => (r.runtime ?? r) as RuntimeDependency),installRuntime: () => call<{ runtime?: RuntimeDependency } & RuntimeDependency>('/api/models/runtime/install', jsonInit('POST')).then((r) => (r.runtime ?? r) as RuntimeDependency),startRuntime: () => call<{ runtime?: RuntimeDependency } & RuntimeDependency>('/api/models/runtime/start', jsonInit('POST')).then((r) => (r.runtime ?? r) as RuntimeDependency),- stopRuntime: () => call<{ runtime?: RuntimeDependency } & RuntimeDependency>('/api/models/runtime/stop', jsonInit('POST')).then((r) => (r.runtime ?? r) as RuntimeDependency),startOAuth: (vendor, channel, clientNonce) =>call<{ flow?: OAuthFlow } & OAuthFlow>('/api/models/oauth/start',diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.jsonindex 091f7bea6..7dcdfb516 100644--- a/ui/src/i18n/en.json+++ b/ui/src/i18n/en.json@@ -913,40 +913,32 @@"shell": {"title": "Models","running": "Gateway running",- "stopped": "Gateway off",- "unavailable": "Gateway enabled, currently unavailable",+ "stopped": "Gateway unavailable",+ "unavailable": "Gateway currently unavailable","degraded": "Gateway running degraded","unread": "Gateway status unavailable",- "notStarted": "Gateway off",+ "notStarted": "Gateway not ready","notInstalled": "Gateway component not installed","allDirect_one": "The only backend is direct","allDirect_other": "All {{count}} backends are direct","starting": "Starting…",- "stopping": "Stopping…","unsupported": "No gateway component for this platform yet",- "toggle": {- "turnOn": "Turn model gateway on",- "turnOff": "Turn model gateway off",- "stopBlocked": "Switch {{names}} to Direct before turning the model gateway off",- "stopVibeyBlocked": "{{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": {"off": {- "title": "Model gateway is off",- "body": "Turn it on to view and edit sources, routes, and gateway models."+ "title": "Model gateway is not ready",+ "body": "Retry to restore access to sources, routes, and gateway models."},"down": {- "title": "Model gateway is off",- "body": "The previous start did not become ready. Turn it on to try again."+ "title": "Model gateway is unavailable",+ "body": "The previous start did not become ready. Retry to start the gateway again."},"enabledDown": {- "title": "Model gateway is enabled but unavailable",- "body": "The enabled setting is saved. Turn it off and back on to retry now."+ "title": "Model gateway is unavailable",+ "body": "Your configuration is saved. Retry to restore the gateway."},"notInstalled": {"title": "Model gateway is not installed",- "body": "Turn it on to install the managed gateway component."+ "body": "Retry to install and start the managed gateway component."},"unsupported": {"title": "Model gateway is unavailable",@@ -960,10 +952,6 @@"title": "Starting model gateway","body": "Sources and routing will appear when the gateway is ready."},- "stopping": {- "title": "Turning model gateway off",- "body": "Gateway configuration is hidden while the runtime stops."- },"unread": {"title": "Model gateway status unavailable","body": "Configuration stays hidden until the runtime state can be confirmed."@@ -1760,8 +1748,7 @@},"errors": {"engineDown": "Model engine is not ready yet; try again shortly",- "startFailed": "Model engine could not be started",- "stopFailed": "Model gateway could not be turned off"+ "startFailed": "Model engine could not be started"},"runtime": {"notStarted": "Not started · starts automatically on first use",diff --git a/ui/src/i18n/zh.json b/ui/src/i18n/zh.jsonindex 4cc2ba613..64e3dca4e 100644--- a/ui/src/i18n/zh.json+++ b/ui/src/i18n/zh.json@@ -913,40 +913,32 @@"shell": {"title": "模型网关","running": "模型网关运行中",- "stopped": "模型网关已关闭",- "unavailable": "模型网关已开启,当前不可用",+ "stopped": "模型网关暂不可用",+ "unavailable": "模型网关暂不可用","degraded": "模型网关降级运行","unread": "模型网关状态不可用",- "notStarted": "模型网关已关闭",+ "notStarted": "模型网关尚未就绪","notInstalled": "模型网关组件未安装","allDirect_one": "{{count}} 个后端都在直连","allDirect_other": "{{count}} 个后端都在直连","starting": "正在启动…",- "stopping": "正在关闭…","unsupported": "当前平台不支持模型网关",- "toggle": {- "turnOn": "开启模型网关",- "turnOff": "关闭模型网关",- "stopBlocked": "请先将 {{names}} 切换为直连,再关闭模型网关",- "stopVibeyBlocked": "{{name}} 的模型通过模型网关运行,请先移除这些模型再关闭网关。",- "stopUnavailable": "暂时无法读取 Agent 路由状态,当前不能关闭模型网关"- },"closed": {"off": {- "title": "模型网关已关闭",- "body": "开启后才会显示和编辑模型供应商与路由。"+ "title": "模型网关尚未就绪",+ "body": "点击重试,恢复供应商、路由和模型配置。"},"down": {- "title": "模型网关已关闭",- "body": "上一次启动没有就绪。开启模型网关即可重试。"+ "title": "模型网关暂不可用",+ "body": "上一次启动没有就绪,点击重试可重新启动模型网关。"},"enabledDown": {- "title": "模型网关已开启,但当前不可用",- "body": "开启状态已经保存。关闭后重新开启即可立即重试。"+ "title": "模型网关暂不可用",+ "body": "配置已经保存,点击重试可恢复模型网关。"},"notInstalled": {"title": "模型网关尚未安装",- "body": "开启后会安装由 Avibe 管理的模型网关组件。"+ "body": "点击重试可安装并启动由 Avibe 管理的模型网关组件。"},"unsupported": {"title": "模型网关不可用",@@ -960,10 +952,6 @@"title": "正在启动模型网关","body": "模型网关就绪后才会显示供应商与路由。"},- "stopping": {- "title": "正在关闭模型网关",- "body": "停止期间会隐藏模型网关配置。"- },"unread": {"title": "暂时无法读取模型网关状态","body": "确认运行状态前不会显示模型网关配置。"@@ -1760,8 +1748,7 @@},"errors": {"engineDown": "模型网关未就绪,请稍后重试",- "startFailed": "模型网关启动失败",- "stopFailed": "模型网关关闭失败"+ "startFailed": "模型网关启动失败"},"runtime": {"notStarted": "未启动 · 首次使用时自动启动",diff --git a/vibe/i18n/en.json b/vibe/i18n/en.jsonindex 7c512b120..53c0f1922 100644--- a/vibe/i18n/en.json+++ b/vibe/i18n/en.json@@ -7,7 +7,7 @@"errors": {"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.",+ "modelGatewayOff": "The model gateway is off, so {backend} has no model to run on. Open Models and click Retry, 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.",diff --git a/vibe/i18n/zh.json b/vibe/i18n/zh.jsonindex 19287c6ad..42e3676bd 100644--- a/vibe/i18n/zh.json+++ b/vibe/i18n/zh.json@@ -7,7 +7,7 @@"errors": {"agentModelRequired": "请先在 Avibe 中为 {backend} Agent 或会话选择模型。","modelHubDisabled": "本实例已停用模型网关,{backend} 没有可用的模型。",- "modelGatewayOff": "模型网关已关闭,{backend} 没有可用的模型。请在「模型」页开启网关并选择模型。",+ "modelGatewayOff": "模型网关已关闭,{backend} 没有可用的模型。请前往「模型」页点击「重试」,然后选择模型。","modelSourceRequired": "{backend} 还没有模型来源。请在「模型」页添加 API Key 或订阅。","modelsNextStepImUrl": "管理这个 Avibe 的人可以在「模型」页处理:{url}","modelsNextStepIm": "管理这个 Avibe 的人可以在 Avibe 工作台的「模型」页处理。",