feat(M3-007,M3-009): provider health check scheduler and Ollama embedding default #308

Merged
jason.woltje merged 1 commits from feat/m3-health-embedding into main 2026-03-21 21:30:16 +00:00
Owner

Summary

  • M3-007: Add periodic health check scheduler to — runs on all registered adapters at a configurable interval ( env, default 60s), caches results per provider, and exposes returning .
  • M3-009: Refactor to be provider-agnostic: defaults to Ollama native with model (768 dims); falls back to OpenAI-compatible API when or is set; respects , , env vars; logs a dimension mismatch warning when switching from 1536-dim OpenAI vectors.

Test plan

  • typecheck: pass
  • lint: pass
  • format:check: pass
  • Verify GET /api/providers/health returns provider list with status fields
  • Verify EmbeddingService uses Ollama when OLLAMA_BASE_URL is set
  • Verify EmbeddingService falls back to OpenAI when OPENAI_API_KEY is set and no Ollama URL
  • Verify dimension mismatch warning logged when dimensions differ from pgvector schema
## Summary - **M3-007**: Add periodic health check scheduler to — runs on all registered adapters at a configurable interval ( env, default 60s), caches results per provider, and exposes returning . - **M3-009**: Refactor to be provider-agnostic: defaults to Ollama native with model (768 dims); falls back to OpenAI-compatible API when or is set; respects , , env vars; logs a dimension mismatch warning when switching from 1536-dim OpenAI vectors. ## Test plan - [x] typecheck: pass - [x] lint: pass - [x] format:check: pass - [ ] Verify GET /api/providers/health returns provider list with status fields - [ ] Verify EmbeddingService uses Ollama when OLLAMA_BASE_URL is set - [ ] Verify EmbeddingService falls back to OpenAI when OPENAI_API_KEY is set and no Ollama URL - [ ] Verify dimension mismatch warning logged when dimensions differ from pgvector schema
jason.woltje added 1 commit 2026-03-21 21:29:58 +00:00
feat(M3-007,M3-009): add provider health check scheduler and refactor embedding service
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/pr/ci Pipeline failed
a33d11306e
M3-007: Add periodic health check scheduler to ProviderService (configurable
via PROVIDER_HEALTH_INTERVAL env, default 60s) with cached status per adapter,
and expose GET /api/providers/health endpoint returning { providers: [...] }.

M3-009: Refactor EmbeddingService to default to Ollama (nomic-embed-text, 768
dims) with OpenAI-compatible fallback when EMBEDDING_PROVIDER=openai or
OPENAI_API_KEY is set; add dimension mismatch warning for pgvector schema.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jason.woltje merged commit 6c6bcbdb7f into main 2026-03-21 21:30:16 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#308