Problem
The README documents Gemini as a supported embedding provider, but config.ts hardcodes provider: 'openai' in the parsed output and uses the openai SDK exclusively. The assertAllowedKeys on embedding config doesn't include provider as a valid key, so passing provider: 'gemini' would throw.
Current behavior
config.ts type: provider: 'openai' (literal)
assertAllowedKeys allows only ['apiKey', 'model'] — no provider key
Embeddings class instantiates new OpenAI() unconditionally
vectorDimsForModel only has OpenAI model dimensions
Proposal
- Add
'provider' to allowed embedding keys
- Expand the
MemoryConfig type to provider: 'openai' | 'gemini'
- Add a
GeminiEmbeddings class (using @google/generative-ai or REST API)
- Add Gemini model dimensions to
EMBEDDING_DIMENSIONS (text-embedding-004: 768, embedding-001: 768)
- Factory pattern in
register() to pick the right embeddings client
Impact
Unblocks users who want free-tier Gemini embeddings as documented in the README.
Problem
The README documents Gemini as a supported embedding provider, but
config.tshardcodesprovider: 'openai'in the parsed output and uses theopenaiSDK exclusively. TheassertAllowedKeyson embedding config doesn't includeprovideras a valid key, so passingprovider: 'gemini'would throw.Current behavior
config.tstype:provider: 'openai'(literal)assertAllowedKeysallows only['apiKey', 'model']— noproviderkeyEmbeddingsclass instantiatesnew OpenAI()unconditionallyvectorDimsForModelonly has OpenAI model dimensionsProposal
'provider'to allowed embedding keysMemoryConfigtype toprovider: 'openai' | 'gemini'GeminiEmbeddingsclass (using@google/generative-aior REST API)EMBEDDING_DIMENSIONS(text-embedding-004: 768,embedding-001: 768)register()to pick the right embeddings clientImpact
Unblocks users who want free-tier Gemini embeddings as documented in the README.