feat(server): make Gemini the default embedder (zero fallback when keyless)#197
Merged
Conversation
…yless) The default embedding provider was `zero` (a stub) and Gemini was an opt-in, feature-gated provider. Flip Gemini to the default: - escurel-server ships the `gemini` feature by default (default = [kreuzberg, gemini]); the runtime provider default is now `gemini`. - With no ESCUREL_GEMINI_API_KEY, load_gemini falls back to a (loaded) ZeroEmbedder and logs a warning — so keyless dev/CI/air-gapped boots stay clean (healthy /readyz, lexical search), rather than degrading. With a key, Gemini (gemini-embedding-001, 768d) is used automatically, no env needed. Air-gapped/local deployments set ESCUREL_EMBEDDING_PROVIDER=embeddinggemma (candle, local weights) or `zero`. The substrate Nomad jobspec already pins `embeddinggemma` explicitly, so production-on-substrate is unaffected by this default change. Tests (real binary through config, no mocks): - binary_boots: default provider is now Gemini; new gemini_default_without_key_falls_back_to_zero asserts a keyless boot is ready with a loaded embedder; the degraded-start test now uses `embeddinggemma` (still feature-absent) to exercise the degraded path. Docs: spec/README decisions table (4/4a), roadmap "in" list, and config.rs env table updated to reflect Gemini-default + the air-gap caveat. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Makes Gemini the default embedder, with a safe keyless fallback so offline
dev/CI/air-gapped boots stay clean.
escurel-serverships thegeminifeature by default (default = [kreuzberg, gemini]); the runtime provider default is nowgemini.ESCUREL_GEMINI_API_KEY) → Gemini (gemini-embedding-001,768d) automatically, no env needed.
load_geminifalls back to a loadedZeroEmbedder(warning logged) — keyless boots stay healthy (
/readyzok, lexical searchworks) rather than degrading.
ESCUREL_EMBEDDING_PROVIDER=embeddinggemma(candle, localweights) or
zero. The substrate jobspec's explicit provider choice isunaffected by the binary default.
Test plan
crates/escurel-server/tests/binary_boots.rs(real binary through config, nomocks): default provider is now
Gemini; newgemini_default_without_key_falls_back_to_zeroasserts a keyless boot isready with a loaded embedder; the degraded-start test moved to
embeddinggemma(still feature-absent) to keep covering the degraded path.--workspace --all-targets, test--workspace --all-targets, release build). Docs synced: spec decisions table(4/4a), roadmap,
config.rsenv table.Rebased onto
mainafter the substrate-migration PR (#196); the two onlyoverlapped on disjoint regions of
config.rs/ spec docs.🤖 Generated with Claude Code