Repository navigation
fix: start local embedding services on demand - #104306
Merged
Merged
Conversation
vincentkoc
marked this pull request as ready for review
July 11, 2026 08:13
Member
Author
|
Land-ready proof for
The implementation uses a narrow host-injected acquisition hook; plugins do not |
Member
Author
|
Merged via rebase.
|
This was referenced Jul 11, 2026
This was referenced Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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>.localServicefor 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
tbx_01kx80nr9azfm6qeqn3a7rsg9h(brisk-crab), exact tree57333be77e65008fc2137e9b4ac3309eef390df7.CI=1 OPENCLAW_TESTBOX=1 corepack pnpm check:changedpassed.CI=1 corepack pnpm buildpassed.