#17874: feat(memory-lancedb): Custom OpenAI BaseURL & Dimensions Support
extensions: memory-lancedb
stale
size: XS
Cluster:
Memory Database Enhancements
## Summary
This PR enables to support custom OpenAI-compatible endpoints (e.g. Ollama, vLLM) by allowing a configurable and custom vector dimensions.
## Changes
- Updated to include optional and .
- Modified to skip dimension lookup if dimensions are explicitly provided.
- Updated class to accept and use .
- Relaxed model validation to allow custom models when dimensions are specified.
## Motivation
Previously, the plugin hardcoded the OpenAI client initialization and model dimension lookup, preventing usage with local LLMs or other providers. This change makes the plugin provider-agnostic while maintaining default behavior for official OpenAI models.
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Extended memory-lancedb plugin to support OpenAI-compatible embedding providers (Ollama, vLLM, etc.) by adding optional `baseUrl` and `dimensions` configuration. The changes maintain backward compatibility with default OpenAI behavior while enabling custom endpoints.
Key changes:
- Added `baseUrl` config field to override OpenAI API endpoint
- Added `dimensions` config to support non-standard embedding models
- Modified dimension resolution to skip lookup when explicitly provided
- Tightened model type from optional to required for type safety
- Updated config validation to allow new fields
<h3>Confidence Score: 5/5</h3>
- Safe to merge with no concerns
- The changes are well-isolated to configuration handling, maintain backward compatibility, and follow the existing code patterns. Type safety was improved (model field made required), and the implementation correctly handles optional custom configurations while preserving default behavior.
- No files require special attention
<sub>Last reviewed commit: 8fe1373</sub>
<!-- greptile_other_comments_section -->
<sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#20771: feat(memory-lancedb): support custom OpenAI-compatible embedding pr...
by marcodelpin · 2026-02-19
89.9%
#19006: feat(memory-lancedb): OpenAI-compatible baseUrl + Ollama provider +...
by martinsen-assistant · 2026-02-17
86.9%
#17566: memory-lancedb: support local OpenAI-compatible embeddings
by lumenradley · 2026-02-15
85.6%
#17030: feat(memory-lancedb): support Ollama and OpenAI-compatible embeddin...
by nightfullstar · 2026-02-15
82.8%
#10550: feat(memory-lancedb): local embeddings via node-llama-cpp
by namick · 2026-02-06
78.9%
#17701: fix(memory-lancedb): add gemini-embedding-001 and baseUrl support
by Phineas1500 · 2026-02-16
75.1%
#21816: Add configurable `dimensions` for embedding models (Matryoshka supp...
by matthewspear · 2026-02-20
74.9%
#23608: feat(memory-lancedb): support custom embedding baseUrl + prefixed m...
by githubbzxs · 2026-02-22
70.0%
#13079: feat: Add OpenAI-compatible API option to CLI for self-hosted models
by MikeWang0316tw · 2026-02-10
69.8%
#4793: hooks: use configured model for slug generator
by yoyooyooo · 2026-01-30
69.8%