feat: add configurable embedding providers#450
Conversation
c09cb59 to
8306aa6
Compare
8306aa6 to
263e850
Compare
|
i was going to try it and you guys already .. haha |
|
Hi, The new provider config allows non-1536 embedding dimensions, but the DB schema defines Severity: action required | Category: correctness How to fix: Align schema with dimensions Agent prompt to fix - you can give this to your LLM of choice:
Found by Qodo code review |
|
Addressed the embedding-dimension storage issue from the review. Changes:
Verified:
|
…ings-pr450 # Conflicts: # src/core/pglite-engine.ts # src/core/postgres-engine.ts
|
Follow-up: rebased/merged the PR branch onto current Current status:
Verified after the merge update:
I also tried full |
|
Closing this PR because the embedding architecture has changed substantially since this branch was opened. This branch was based on the old v0.22-era embedding path. Current I’m opening a fresh, smaller PR against latest |
Adds native Copilot embedding provider for GitHub Copilot/Blackbird Metis embeddings. Calls GitHub /embeddings endpoint directly with the Copilot request/response shape; not OpenAI-compatible. - New recipe: src/core/ai/recipes/copilot.ts with metis-1024-I16-Binary - New implementation kind: 'native-copilot' in types.ts - gateway.ts: native-copilot branches in instantiateEmbedding/Expansion/Chat (embedding does real fetch; chat+expansion throw clear errors since this provider is embedding-only) - embedSubBatch short-circuits when model is a Copilot model, bypassing Vercel AI SDK and threading abortSignal into native fetch Replaces garrytan#450. Built on current master (v0.36) instead of v0.22 legacy path. Auth: GBRAIN_COPILOT_TOKEN, COPILOT_GITHUB_TOKEN, GH_TOKEN, GITHUB_TOKEN, or ~/.copilot/config.json (Copilot CLI login). Config: export GBRAIN_EMBEDDING_MODEL=copilot:metis-1024-I16-Binary export GBRAIN_EMBEDDING_DIMENSIONS=1024
Summary
openai,openai-compatible, andcopilotprovidersGBRAIN_EMBEDDING_BASE_URL,GBRAIN_EMBEDDING_API_KEY,GBRAIN_EMBEDDING_MODEL, andGBRAIN_EMBEDDING_DIMENSIONSExample
Test Plan
bun run typecheckbun test test/aa-copilot-embedding.test.ts test/embed.test.ts test/import-file.test.ts test/sync-cost-preview.test.ts