feat(index): add embedding_provider config field and fix double provider construction#4894
Merged
Merged
Conversation
…der construction Add `embedding_provider: String` (record-keeping) to `IndexerConfig` and `RetrievalConfig` in zeph-index, satisfying the multi-model design principle. Extract `resolve_index_embed_provider` helper in `src/bootstrap/provider.rs` and wire it through all three call sites (runner.rs, acp.rs, apply_code_indexer). This eliminates the double `build_provider_from_entry` invocation at startup — previously both runner.rs and apply_code_indexer independently constructed the embedding provider, wasting resources and diverging log output. Closes #4885
bug-ops
force-pushed
the
4885-embed-provider-index-config
branch
from
June 6, 2026 00:06
c392f5d to
2b57428
Compare
bug-ops
enabled auto-merge (squash)
June 6, 2026 00:06
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: String(record-keeping) toIndexerConfigandRetrievalConfiginzeph-index, satisfying the multi-model design principle from CLAUDE.mdresolve_index_embed_providerhelper insrc/bootstrap/provider.rs, eliminating the doublebuild_provider_from_entryinvocation at startuprunner.rs,acp.rs, andapply_code_indexerinagent_setup.rs"embed provider"→"embedding provider"uniformly across all call sitesDetails
Previously, when
[index] embedding_provider = "fast"was set,build_provider_from_entryran twice per startup — once inrunner.rs(for retriever/search-executor) and once insideapply_code_indexer(which re-resolved independently). The resolved provider fromrunner.rswas never passed to the indexer, so the indexer always used the main provider regardless of config. This PR fixes that by resolving once and passing the result to all consumers.The
embedding_provider: Stringfield onIndexerConfigandRetrievalConfigis record-keeping only —zeph-indexhas no access to the provider registry, so resolution continues to happen at the binary level. The field is documented accordingly.Test plan
cargo +nightly fmt --check— cleancargo clippy --workspace -- -D warnings— cleancargo nextest run --workspace --lib --bins— 10513 passedRUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler --locked— cleancargo doc --no-deps -p zeph-index— clean, no broken intra-doc linkscargo test --doc -p zeph-index— 27 passedresolve_index_embed_provider: empty-name fallback, unknown-name fallback, known-name resolutionCloses #4885