feat(embeddings): OpenAI-compatible local endpoint support#10
Open
jonathanhfmills wants to merge 3 commits into
Open
feat(embeddings): OpenAI-compatible local endpoint support#10jonathanhfmills wants to merge 3 commits into
jonathanhfmills wants to merge 3 commits into
Conversation
Add openaiBaseUrl to EmbeddingConfig and LUCID_EMBEDDING_URL / LUCID_EMBEDDING_MODEL env vars for keyless local embedding servers. - EmbeddingConfig: add openaiBaseUrl field - embedOpenAIBatch: use configurable baseUrl, API key optional for local endpoints - isAvailable: probe custom endpoint via /models when openaiBaseUrl set - detectProvider: check LUCID_EMBEDDING_URL first (highest priority) Enables Ollama, LM Studio, and vLLM as drop-in embedding backends with long-context models (e.g. nomic-embed-text at 8192 tokens), bypassing the 512-token BGE sequence limit without API costs. Usage: LUCID_EMBEDDING_URL=http://localhost:11434/v1 \ LUCID_EMBEDDING_MODEL=nomic-embed-text \ lucid-server Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 AGENTS.md files covering root, crates (lucid-core, lucid-napi, lucid-perception, lucid-perception-napi), packages (lucid-server, lucid-native, lucid-perception), benchmarks, scripts, and all src/ subdirectories. CLAUDE.md and GEMINI.md symlinked to AGENTS.md in each directory. Domain glossary seeded in root. Original CLAUDE.md content (5-gate completion gates, conventions, gotchas) preserved in root AGENTS.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add missing release entries: 0.6.1 (wire 5 unused storage methods), 0.6.2 (dead NAPI cleanup), 0.6.3 (fp16→quantized ONNX model), 0.6.4 (embedding provider diagnostics), 0.6.5 (cross-platform binary rebuild). Add [Unreleased] entry for OpenAI-compatible local embedding endpoint support (LUCID_EMBEDDING_URL / LUCID_EMBEDDING_MODEL). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
PR #8 only touches install.sh, our PR touches embeddings.ts, cli.ts, CHANGELOG.md, and AGENTS.md files. Zero conflicts. And PR #8 actually solves the exact pain we hit today — having to manually cp cli.ts ~/.lucid/server/src/cli.ts. Once that merges, ./install.sh --local from the repo root handles it 👍 Worth merging PR #8 first, then this one lands clean on top. I trust your judgment, @JasonDocton. Hope all's well on your end! LMK if you need anything from me 🚀 |
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
LUCID_EMBEDDING_URLandLUCID_EMBEDDING_MODELenv vars for keyless local embedding servers (Ollama, LM Studio, vLLM, etc.)isAvailable()probes/modelsto verify before committingnomic-embed-textat 8192 tokens) as an alternative to the built-in BGE model (512-token limit)Usage
Provider detection order: LUCID_EMBEDDING_URL → local ONNX (BGE) → OpenAI → none.
Changes
Also includes
CLAUDE.mdandGEMINI.mdsymlink to eachAGENTS.mdso Claude, Gemini, and other AI agents load the right context automatically when working in any subdirectory.Test plan