Skip to content

feat(server): make Gemini the default embedder (zero fallback when keyless)#197

Merged
jrosskopf merged 1 commit into
mainfrom
backend/gemini-default
Jun 22, 2026
Merged

feat(server): make Gemini the default embedder (zero fallback when keyless)#197
jrosskopf merged 1 commit into
mainfrom
backend/gemini-default

Conversation

@jrosskopf

Copy link
Copy Markdown
Contributor

Summary

Makes Gemini the default embedder, with a safe keyless fallback so offline
dev/CI/air-gapped boots stay clean.

  • escurel-server ships the gemini feature by default (default = [kreuzberg, gemini]); the runtime provider default is now gemini.
  • With a key (ESCUREL_GEMINI_API_KEY) → Gemini (gemini-embedding-001,
    768d) automatically, no env needed.
  • Without a keyload_gemini falls back to a loaded ZeroEmbedder
    (warning logged) — keyless boots stay healthy (/readyz ok, lexical search
    works) rather than degrading.
  • Air-gapped/local: ESCUREL_EMBEDDING_PROVIDER=embeddinggemma (candle, local
    weights) or zero. The substrate jobspec's explicit provider choice is
    unaffected by the binary default.

Test plan

  • crates/escurel-server/tests/binary_boots.rs (real binary through config, no
    mocks): 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 moved to
    embeddinggemma (still feature-absent) to keep covering the degraded path.
  • Full gate green locally (fmt, clippy --workspace --all-targets, test
    --workspace --all-targets, release build). Docs synced: spec decisions table
    (4/4a), roadmap, config.rs env table.

Rebased onto main after the substrate-migration PR (#196); the two only
overlapped on disjoint regions of config.rs / spec docs.

🤖 Generated with Claude Code

…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>
@jrosskopf jrosskopf merged commit e4089f4 into main Jun 22, 2026
1 check passed
@jrosskopf jrosskopf deleted the backend/gemini-default branch June 22, 2026 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant