fix: keep AI tools env readable by Jeannie
Homelab Main / validate (push) Waiting to run Details
Homelab Main / running-update (push) Blocked by required conditions Details
Homelab Main / debian-ops (push) Blocked by required conditions Details

This commit is contained in:
juvenal.diaz 2026-10-08 11:54:53 -06:00
parent 3409e2a5ae
commit d9ff4bb3d0
2 changed files with 9 additions and 2 deletions

View File

@ -1371,13 +1371,16 @@ backstage_brain_note() {
if ! command -v python3 >/dev/null 2>&1; then
return 0
fi
if [[ -s "${tools_env_file}" ]]; then
if [[ -r "${tools_env_file}" && -s "${tools_env_file}" ]]; then
# shellcheck disable=SC1090
. "${tools_env_file}"
provider="${LAB_AI_GATEWAY_PROVIDER:-omniroute}"
endpoint="${OPENAI_BASE_URL:-${LAB_AI_GATEWAY_URL:-http://127.0.0.1:20128/v1}}"
model="${LAB_AI_GATEWAY_MODEL:-${AI_STACK_AGENT_FAST_MODEL:-agent-fast-free}}"
api_key="${OPENAI_API_KEY:-${LAB_AI_GATEWAY_API_KEY:-${api_key}}}"
elif [[ -e "${tools_env_file}" ]]; then
echo "AI tools env exists but is not readable: ${tools_env_file}" >&2
return 0
fi
if [[ -s "${routes_file}" ]]; then
# shellcheck disable=SC1090
@ -2561,13 +2564,16 @@ ai_check() {
fi
done
if [[ -s "${tools_env_file}" ]]; then
if [[ -r "${tools_env_file}" && -s "${tools_env_file}" ]]; then
printf '%-28s ok - %s\n' "ai tools env" "${tools_env_file}"
# shellcheck disable=SC1090
. "${tools_env_file}"
provider="${LAB_AI_GATEWAY_PROVIDER:-omniroute}"
endpoint="${OPENAI_BASE_URL:-${LAB_AI_GATEWAY_URL:-http://127.0.0.1:20128/v1}}"
model="${LAB_AI_GATEWAY_MODEL:-${AI_STACK_AGENT_FAST_MODEL:-agent-fast-free}}"
elif [[ -e "${tools_env_file}" ]]; then
printf '%-28s unreadable - rerun ./jeannie deploy-ai-tools\n' "ai tools env"
failures=$((failures + 1))
else
printf '%-28s missing - run ./jeannie deploy-ai-tools\n' "ai tools env"
fi

View File

@ -5481,6 +5481,7 @@ HERMES_OMNIROUTE_API_KEY=${api_key}
GOOSE_PROVIDER=openai
GOOSE_MODEL=${smart_model}
ENV_EOT
sudo chown "$(id -u):$(id -g)" "${tools_env_file}"
sudo chmod 600 "${tools_env_file}"
for tool in goose holmes hermes; do