Skip to content

fix(skills): decouple embedding provider from conversational provider (#2225)#2255

Merged
bug-ops merged 2 commits intomainfrom
fix/2225-embedding-provider
Mar 27, 2026
Merged

fix(skills): decouple embedding provider from conversational provider (#2225)#2255
bug-ops merged 2 commits intomainfrom
fix/2225-embedding-provider

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 27, 2026

Summary

  • Add dedicated embedding_provider: AnyProvider field to Agent<C>, resolved once at bootstrap from provider pool, never updated by /provider switch
  • Bootstrap selection: embed = true entry → first entry with embedding_model → primary provider clone
  • All 7 embedding call sites (skill matching, tool schema filter, MCP registry, semantic cache, plan cache) switched to self.embedding_provider
  • User-visible info message emitted after /provider switch when the active provider differs from the embedding provider
  • create_embedding_provider() exported from bootstrap module; wired in runner.rs, acp.rs, daemon.rs
  • 6 new tests in bootstrap/tests.rs and provider_cmd.rs

Test plan

  • cargo +nightly fmt --check — clean
  • cargo clippy --all-targets --all-features --workspace -- -D warnings — clean
  • cargo nextest run --workspace --all-features --exclude exarch-python --exclude exarch-node --lib --bins — 6229/6229 passed

Closes #2225

…#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
@github-actions github-actions bot added bug Something isn't working size/L Large PR (201-500 lines) documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate and removed size/L Large PR (201-500 lines) labels Mar 27, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 27, 2026 11:29
@github-actions github-actions bot added the size/L Large PR (201-500 lines) label Mar 27, 2026
@bug-ops bug-ops merged commit 3ab074c into main Mar 27, 2026
25 checks passed
@bug-ops bug-ops deleted the fix/2225-embedding-provider branch March 27, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core zeph-core crate documentation Improvements or additions to documentation rust Rust code changes size/L Large PR (201-500 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

provider switch silently degrades semantic tool/skill selection when new provider lacks embedding support

1 participant