Skip to content

feat: Add AlloyDB Public Preview features, Model Manager, In-Database Embeddings, ScaNN fixes, engine_args and PGVector migrator - #235

Open
madamsetty-pavan wants to merge 6 commits into
googleapis:mainfrom
madamsetty-pavan:feat/alloydb-preview-parity
Open

madamsetty-pavan wants to merge 6 commits into
googleapis:mainfrom
madamsetty-pavan:feat/alloydb-preview-parity

Conversation

@madamsetty-pavan

Copy link
Copy Markdown

Description

This PR brings llama-index-alloydb-pg-python to full feature parity with Google Cloud AlloyDB's latest Public Preview capabilities and langchain-google-alloydb-pg-python.

Key Changes:

  1. Model Endpoint Management (model_manager.py): Added AlloyDBModel and AlloyDBModelManager to manage Vertex AI and custom ML model endpoints in AlloyDB via the google_ml_integration PostgreSQL extension (v1.5.3+).
  2. In-Database Embeddings (embeddings.py): Added AlloyDBEmbedding implementing LlamaIndex's BaseEmbedding interface to generate embeddings natively inside SQL queries (SELECT embedding('model_id', 'text')::vector).
  3. ScaNN Distance Strategy & Extension Fixes (indexes.py):
    • Fixed DistanceStrategy.INNER_PRODUCT to map to dot_prod (resolving syntax errors with dot_product).
    • Added extension_name = "alloydb_scann" and get_index_function().
    • Added support for 4-level ScaNN preview query options (enable_preview_features, max_allowed_num_levels).
  4. Engine Customization (engine.py): Added engine_args: Mapping = {} support across engine creation methods.
  5. PGVector Migration Tooling (utils/pgvector_migrator.py): Added utility functions to migrate collections from open-source pgvector / LangChain / LlamaIndex tables to AlloyDB.

Architecture & Design Document:

… Embeddings, ScaNN fixes, engine_args and PGVector migrator
@madamsetty-pavan
madamsetty-pavan requested review from a team as code owners July 22, 2026 03:52
@product-auto-label product-auto-label Bot added the api: alloydb Issues related to the googleapis/llama-index-alloydb-pg-python API. label Jul 22, 2026
@anubhav756 anubhav756 added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Aug 4, 2026
@twishabansal

Copy link
Copy Markdown
Contributor

/gcbrun

@twishabansal

Copy link
Copy Markdown
Contributor

Hi @madamsetty-pavan , could we have separate PRs for the features? Makes the review cycle a bit easier and shorter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: alloydb Issues related to the googleapis/llama-index-alloydb-pg-python API. priority: p2 Moderately-important priority. Fix may not be included in next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants