Skip to content

feat(index): add embedding_provider config field and fix double provider construction#4894

Merged
bug-ops merged 1 commit into
mainfrom
4885-embed-provider-index-config
Jun 6, 2026
Merged

feat(index): add embedding_provider config field and fix double provider construction#4894
bug-ops merged 1 commit into
mainfrom
4885-embed-provider-index-config

Conversation

@bug-ops

@bug-ops bug-ops commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add embedding_provider: String (record-keeping) to IndexerConfig and RetrievalConfig in zeph-index, satisfying the multi-model design principle from CLAUDE.md
  • Extract resolve_index_embed_provider helper in src/bootstrap/provider.rs, eliminating the double build_provider_from_entry invocation at startup
  • Wire the helper through all three call sites: runner.rs, acp.rs, and apply_code_indexer in agent_setup.rs
  • Fix log-string drift: "embed provider""embedding provider" uniformly across all call sites

Details

Previously, when [index] embedding_provider = "fast" was set, build_provider_from_entry ran twice per startup — once in runner.rs (for retriever/search-executor) and once inside apply_code_indexer (which re-resolved independently). The resolved provider from runner.rs was 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: String field on IndexerConfig and RetrievalConfig is record-keeping only — zeph-index has 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 — clean
  • cargo clippy --workspace -- -D warnings — clean
  • cargo nextest run --workspace --lib --bins — 10513 passed
  • RUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler --locked — clean
  • cargo doc --no-deps -p zeph-index — clean, no broken intra-doc links
  • cargo test --doc -p zeph-index — 27 passed
  • New unit tests for resolve_index_embed_provider: empty-name fallback, unknown-name fallback, known-name resolution

Closes #4885

@github-actions github-actions Bot added enhancement New feature or request documentation Improvements or additions to documentation rust Rust code changes size/L Large PR (201-500 lines) and removed enhancement New feature or request labels Jun 6, 2026
…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
bug-ops force-pushed the 4885-embed-provider-index-config branch from c392f5d to 2b57428 Compare June 6, 2026 00:06
@github-actions github-actions Bot added the enhancement New feature or request label Jun 6, 2026
@bug-ops
bug-ops enabled auto-merge (squash) June 6, 2026 00:06
@bug-ops
bug-ops merged commit 5de8009 into main Jun 6, 2026
32 checks passed
@bug-ops
bug-ops deleted the 4885-embed-provider-index-config branch June 6, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/L Large PR (201-500 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(index): add embed_provider config field to IndexerConfig and RetrievalConfig

1 participant