Skip to content

fix: start local embedding services on demand - #104306

Merged
vincentkoc merged 38 commits into
mainfrom
feat/accel-embedding-local-service
Jul 11, 2026
Merged

vincentkoc merged 38 commits into
mainfrom
feat/accel-embedding-local-service

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Closes #104214

What Problem This Solves

Fixes an issue where embedding requests could reach an unavailable local OpenAI-compatible, Ollama, or LM Studio endpoint without starting the provider's configured local service, even though chat/model requests already managed that service lifecycle.

Why This Change Was Made

Embedding providers now receive a narrow host-injected local-service acquisition hook. The host remains the sole owner of process configuration, endpoint validation, startup serialization, readiness, leases, aborts, diagnostics, and idle shutdown; provider aliases and configured endpoint forms remain distinct.

User Impact

Operators can use models.providers.<id>.localService for embedding workloads as well as chat workloads. Concurrent chat and embedding requests share startup safely while holding independent leases, remote overrides stay remote, aliases keep separate GPU host identities, and startup failures include bounded diagnostics with environment, header, and argument secrets redacted.

Evidence

  • Blacksmith Testbox tbx_01kx80nr9azfm6qeqn3a7rsg9h (brisk-crab), exact tree 57333be77e65008fc2137e9b4ac3309eef390df7.
  • Focused exact-tree matrix: 288 tests passed across lifecycle, gateway, plugin runtime, memory-core, memory-wiki, OpenAI-compatible, Ollama, and LM Studio paths.
  • CI=1 OPENCLAW_TESTBOX=1 corepack pnpm check:changed passed.
  • CI=1 corepack pnpm build passed.
  • Fresh structured autoreview completed with no accepted/actionable findings.

@vincentkoc vincentkoc self-assigned this Jul 11, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime extensions: memory-core Extension: memory-core agents Agent runtime and tooling extensions: lmstudio plugin: file-transfer extensions: ollama size: XL maintainer Maintainer-authored PR labels Jul 11, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review July 11, 2026 08:13
@vincentkoc

Copy link
Copy Markdown
Member Author

Land-ready proof for b57dea9ced06ede5f3c16ba521088aeefd7c0e68:

  • Blacksmith Testbox tbx_01kx80nr9azfm6qeqn3a7rsg9h, exact tree 57333be77e65008fc2137e9b4ac3309eef390df7
  • focused provider/local-service matrix: 288 tests passed across 15 files
  • CI=1 OPENCLAW_TESTBOX=1 corepack pnpm check:changed: passed
  • CI=1 corepack pnpm build: passed
  • fresh autoreview after the final diagnostics fix: clean, zero findings
  • repo-native review artifacts: validated, READY FOR /prepare-pr

The implementation uses a narrow host-injected acquisition hook; plugins do not
import the core lifecycle owner. Provider aliases, configured base URLs,
independent leases, abort ownership, readiness, in-flight counts, and idle stop
are covered. I will use a rebase merge so the 38-commit series is preserved; no
squash.

@vincentkoc
vincentkoc merged commit f71255e into main Jul 11, 2026
209 of 212 checks passed
@vincentkoc
vincentkoc deleted the feat/accel-embedding-local-service branch July 11, 2026 08:22
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: lmstudio extensions: memory-core Extension: memory-core extensions: ollama gateway Gateway runtime maintainer Maintainer-authored PR plugin: file-transfer size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Start configured local services for embedding requests

1 participant