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
This commit is contained in:
Juan José Mata
2026-08-24 22:41:08 +02:00
committed by GitHub
parent c26b16d36f
commit fd6f4ff078
24 changed files with 1773 additions and 120 deletions
+15 -1
View File
@@ -4,7 +4,9 @@ class VectorStore::EmbeddableTest < ActiveSupport::TestCase
class EmbeddableHost
include VectorStore::Embeddable
# Expose private methods for testing
public :extract_text, :chunk_text, :embed, :embed_batch
public :extract_text, :chunk_text, :embed, :embed_batch,
:embedding_model, :embedding_dimensions, :embedding_uri_base,
:embedding_access_token
end
setup do
@@ -138,6 +140,18 @@ class VectorStore::EmbeddableTest < ActiveSupport::TestCase
assert_raises(VectorStore::Error) { @host.embed("test text") }
end
test "embedding configuration delegates to the shared runtime configuration" do
VectorStore.expects(:embedding_model).returns("model")
VectorStore.expects(:embedding_dimensions).returns(3)
VectorStore.expects(:embedding_uri_base).returns("https://embeddings.example.test/v1")
VectorStore.expects(:embedding_access_token).returns("token")
assert_equal "model", @host.embedding_model
assert_equal 3, @host.embedding_dimensions
assert_equal "https://embeddings.example.test/v1", @host.embedding_uri_base
assert_equal "token", @host.embedding_access_token
end
# --- embed_batch ---
test "embed_batch processes texts and returns ordered vectors" do