Let one gate decide every AI surface, so switching AI off actually removes all of it
The Tools card adopted the AI scripts on the host check alone, and api/ai.php only tested AI_ENABLED in front of ask, so a disabled subsystem still had rows to run and an endpoint that answered.
This commit is contained in:
@@ -83,8 +83,7 @@ $validTabs = ['monitor', 'scheduler', 'docker', 'watchdog', 'partnership', 'fall
|
||||
// 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.
|
||||
$_vv_ai = vv_is_ai_host()
|
||||
&& strtolower(trim(vv_conf_vars()['AI_ENABLED'] ?? 'false')) === 'true';
|
||||
$_vv_ai = vv_ai_ui_on();
|
||||
if ($_vv_ai) $validTabs[] = 'ai';
|
||||
|
||||
if (!in_array($tab, $validTabs)) $tab = 'monitor';
|
||||
|
||||
Reference in New Issue
Block a user