Declare the AI owner, and let every node borrow its model over the mesh
vv_is_ai_host() was `=== 'host1'`, which made a physical fact — that is where the GPU is — look like a rule. AI_OWNER_HOST declares it, so the card can move to a rebuilt host3 or a friend's spare. The gate was also doing two jobs. Assistant docks and findings strips now ask whether a model is reachable, so a node without a GPU gets them by borrowing; the AI tab asks whether this is the owner, because that page carries the bug reports, the index and the model configuration — the surface where the vocabulary assumes you built the mesh. Resolution is local, then owner, then anyone else declaring a model, pinned once it answers. Pinned rather than re-derived per call: a mesh that re-decides every request eventually decides differently mid-conversation, and a chat whose second turn lands on another machine has no history there. Cleared only on a transport failure, and only when there is somewhere else to go — a single-node mesh whose model is down should say so, not report AI as unconfigured.
This commit is contained in:
@@ -136,7 +136,7 @@ if ($action !== 'poll') {
|
||||
// on any host but HOST1, but a hidden link is not access control and this endpoint is reachable
|
||||
// directly. Every action is refused rather than just the expensive ones — there is no such thing
|
||||
// as a read this host is entitled to, since the index and the model are not here.
|
||||
if (!vv_is_ai_host()) {
|
||||
if (!vv_ai_is_owner()) {
|
||||
http_response_code(404);
|
||||
echo json_encode(['ok' => false, 'error' => 'AI is not available on this host']);
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user