Share one AI across the mesh instead of confining it to the owner
Curated state copied to every node is state that can disagree, so the index, the model and the shared memory stay on the owner and each node reaches them over the SSH trust onboarding already builds. Chats stay on the node that had them; memory and bug reports stay the owner's to write.
This commit is contained in:
+12
-11
@@ -430,18 +430,19 @@ unset($_master, $_h1m, $_host1_blank, $_my_hostid, $_conf_missing);
|
||||
$tab = $_GET['tab'] ?? 'monitor';
|
||||
$validTabs = ['monitor', 'scheduler', 'watchdog', 'partnership', 'fallback', 'arrs', 'rsync', 'auth', 'settings'];
|
||||
|
||||
// The AI tab exists only on HOST1, and only while AI_ENABLED is true. Appended to $validTabs
|
||||
// rather than filtered out of it, so the check below rejects ?tab=ai server-side as well —
|
||||
// omitting the link is presentation, not access control, and api/ai.php refuses every action
|
||||
// on the same two conditions independently.
|
||||
// The AI tab exists only on the AI owner, and only while AI_ENABLED is true. Appended to
|
||||
// $validTabs rather than filtered out of it, so the check below rejects ?tab=ai server-side as
|
||||
// well — omitting the link is presentation, not access control, and api/ai.php refuses the
|
||||
// owner-only actions independently.
|
||||
//
|
||||
// The host half is not a preference: HOST1 owns the GPU, the Ollama process and the index, and
|
||||
// include/ai.php only ever reads the *local* {HOST}_OLLAMA_URL — there is no Tailscale resolver
|
||||
// in the PHP layer the way there is in the shell. On any other host the tab could only render
|
||||
// and then fail its own health check.
|
||||
// The tab is the owner-only surface — it carries the bug reports, the index and the model
|
||||
// configuration. Assistant docks elsewhere use vv_ai_ui_on(), which every node with a reachable
|
||||
// model passes.
|
||||
// The host half is a deliberate split, not a technical limit. The mesh shares one AI: every node
|
||||
// reaches the owner's model through include/ai_rpc.php, so an assistant works everywhere. What
|
||||
// does not travel is this tab — it carries the bug reports, the index and the model configuration,
|
||||
// the surface where a wrong answer is expensive and the vocabulary assumes you built the thing.
|
||||
// Someone running two containers on a node they were handed gets the assistant, not the machinery
|
||||
// behind it.
|
||||
//
|
||||
// Assistant docks elsewhere use vv_ai_ui_on(), which every node in the mesh passes.
|
||||
$_vv_ai = vv_ai_owner_ui_on();
|
||||
if ($_vv_ai) $validTabs[] = 'ai';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user