• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 24655237604

20 Apr 2026 07:59AM UTC coverage: 66.337% (+0.09%) from 66.25%
24655237604

push

github

web-flow
Add EmbeddingServiceManager for TEI container lifecycle (#4912)

Implements pkg/vmcp/cli/embedding_manager.go — the component that
manages the lifecycle of a HuggingFace Text Embeddings Inference (TEI)
container for the Tier 2 semantic optimizer in thv vmcp serve.

Key behaviours:
- Deterministic container naming: thv-embedding-<sha256(model)[:8]>
- Idempotent Start: reuses an already-running container (reads port
  from toolhive-port label) or deploys a new one with LabelAuxiliary
- Model cache persisted at ~/.toolhive/embedding-models → /data bind mount
- Health polling with exponential backoff (2 s → 30 s, factor 2),
  draining response bodies to allow connection reuse
- Stop is a no-op when this instance did not start the container
- ContainerFactory narrow interface enables full unit testing without
  a live container daemon

Closes #4884

Co-authored-by: taskbot <taskbot@users.noreply.github.com>

163 of 202 new or added lines in 2 files covered. (80.69%)

3 existing lines in 1 file now uncovered.

57979 of 87401 relevant lines covered (66.34%)

60.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

79.38
/pkg/transport/proxy/httpsse/http_proxy.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc