fix(skills): decouple embedding provider from conversational provider (#2225)#2255
Merged
fix(skills): decouple embedding provider from conversational provider (#2225)#2255
Conversation
…#2225) Add a dedicated `embedding_provider: AnyProvider` field to `Agent<C>`, resolved once at bootstrap independently of the active provider. All 7 embedding call sites (skill matching, tool schema filter, MCP registry, semantic cache, plan cache goal embedding) now use `embedding_provider` and are unaffected by `/provider switch`. Bootstrap selection order: `embed = true` entry → first entry with `embedding_model` → primary provider clone. When the active provider differs from the embedding provider after a switch, emit a user-visible info message so the user knows embedding operations continue uninterrupted. Closes #2225
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.
Summary
embedding_provider: AnyProviderfield toAgent<C>, resolved once at bootstrap from provider pool, never updated by/provider switchembed = trueentry → first entry withembedding_model→ primary provider cloneself.embedding_provider/provider switchwhen the active provider differs from the embedding providercreate_embedding_provider()exported frombootstrapmodule; wired inrunner.rs,acp.rs,daemon.rsbootstrap/tests.rsandprovider_cmd.rsTest plan
cargo +nightly fmt --check— cleancargo clippy --all-targets --all-features --workspace -- -D warnings— cleancargo nextest run --workspace --all-features --exclude exarch-python --exclude exarch-node --lib --bins— 6229/6229 passedCloses #2225