← Back to PRs

#17874: feat(memory-lancedb): Custom OpenAI BaseURL & Dimensions Support

by rish2jain open 2026-02-16 08:02 View on GitHub →
extensions: memory-lancedb stale size: XS
## 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