Files
sure/app/controllers/admin/system_health_controller.rb
T
Juan José Mata fd6f4ff078 Add live AI checks to system health (#3155)
* Add live AI checks to system health

Give super admins a dedicated AI status view with bounded liveness probes for LLMs, vector stores, pgvector, and embedding endpoints. Record sanitized failures in both the system debug log and Rails logger, and document the recommended local configuration.\n\nCloses #3145

* Fix AI health CI checks

* Address AI health review feedback

* Correct Ollama model preload guidance

* Distinguish OpenAI-compatible providers

* Make Ollama startup readiness explicit

* Recognize Cloudflare AI endpoints
2026-08-24 22:41:08 +02:00

21 lines
723 B
Ruby

# frozen_string_literal: true
module Admin
class SystemHealthController < Admin::BaseController
# Bypass the per-request memo / cross-request cache that the layout
# banner uses. An operator landing on this page (often right after
# restarting the worker) wants to confirm the current state, not a
# snapshot up to `SidekiqHealth::CACHE_TTL` old. Also makes the page
# work in managed mode, where `current_sidekiq_health` is nil.
def show
SidekiqHealth.expire_cache!
@health = SidekiqHealth.new
ai_tab = params[:tab] == "ai"
@ai_health = AiHealth.new(
run_probes: ai_tab,
force_probes: ai_tab && params[:refresh_ai_health] == "1"
)
end
end
end