Skip to content

Migrate from databricks-vectorsearch to databricks-ai-search#437

Merged
jennsun merged 3 commits into
mainfrom
jennsun/migrate-to-databricks-ai-search
Jun 9, 2026
Merged

Migrate from databricks-vectorsearch to databricks-ai-search#437
jennsun merged 3 commits into
mainfrom
jennsun/migrate-to-databricks-ai-search

Conversation

@jennsun

@jennsun jennsun commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

databricks-vectorsearch is deprecated and has been renamed to databricks-ai-search. Follow-up to #435.

When tests run, databricks-vectorsearch now emits:

DeprecationWarning: databricks-vectorsearch is deprecated and has been renamed to databricks-ai-search. Imports under 'databricks.vector_search.' will continue to work as a thin re-export of 'databricks.ai_search.', but new code should switch to 'pip install databricks-ai-search' and 'from databricks.ai_search.* import ...'.

This PR follows that recommendation literally.

Changes

  • pyproject.toml × 4 (root, integrations/openai, integrations/langchain, integrations/llamaindex): replace databricks-vectorsearch>=* with databricks-ai-search>=0.73.
  • 12 Python files under src/, integrations/*/src/, integrations/*/tests/, and tests/: every from databricks.vector_search.* import ...from databricks.ai_search.* import .... Includes mock.patch target strings and the ImportError fallback message in databricks_langchain/vectorstores.py.
  • Symbol names are unchanged. databricks-ai-search==0.73 exposes back-compat aliases for the names the bridge uses:
    • databricks/ai_search/client.py:1090: VectorSearchClient = AISearchClient
    • databricks/ai_search/index.py:682: VectorSearchIndex = AISearchIndex
    • databricks/ai_search/exceptions.py:47: VectorSearchException = AISearchException
    • Reranker, DatabricksReranker, CredentialStrategy exist under the same submodule paths.

Net diff: +54 / −54 across 16 files (pure rename).

Validation

  • Package landscape: in a fresh venv with the migrated branch installed editable, only databricks-ai-search==0.73 is present — databricks-vectorsearch is no longer pulled at all.
  • Smoke: from databricks_openai.vector_search_retriever_tool import VectorSearchRetrieverTool resolves VectorSearchIndex to databricks.ai_search.index even with the databricks.vector_search package completely absent.
  • Tests:
    • 53/53 openai unit tests pass.
    • 258/258 langchain unit tests pass (4 pre-existing skips).
    • ruff check + ruff format --check clean.

Companion notes

  • This complements Import VectorSearchIndex from its canonical module #435 (the VectorSearchIndex canonical-path fix). With both changes shipped, the bridge no longer touches the databricks.vector_search.* namespace at all and stops triggering the deprecation warning.
  • The langchain pyproject's databricks-openai = { path = "../openai", editable = true } source pin (added in Import VectorSearchIndex from its canonical module #435) is preserved — still needed until the next databricks-openai release containing the canonical-path fix ships to PyPI; can be removed in a follow-up cleanup after that release.
  • Out of scope: the cross-version matrix (openai_test (3.10, v0.x) / langchain_test (3.10, v0.x)) still tests historical tags whose frozen source imports databricks.vector_search.client.VectorSearchIndex. Those tags cannot be retroactively migrated — this PR doesn't try to. Tracked separately for Dhruv.

Test plan

  • CI green on this branch
  • After merge + release: any consumers of databricks_ai_bridge, databricks_langchain, databricks_openai, or databricks_llamaindex no longer see the upstream DeprecationWarning about databricks-vectorsearch

`databricks-vectorsearch` is deprecated and has been renamed to
`databricks-ai-search`. Per upstream's deprecation warning:

  databricks-vectorsearch is deprecated and has been renamed to
  databricks-ai-search. Imports under 'databricks.vector_search.*' will
  continue to work as a thin re-export of 'databricks.ai_search.*', but
  new code should switch to 'pip install databricks-ai-search' and
  'from databricks.ai_search.* import ...'.

Follow that recommendation literally:

* pyproject.toml: replace `databricks-vectorsearch>=*` with
  `databricks-ai-search>=0.73` (root, openai, langchain, llamaindex).
* All `from databricks.vector_search.* import ...` -> ai_search.
* Mock-patch targets and docstring references updated to match.

Symbol names are unchanged because `databricks-ai-search==0.73` exposes
back-compat aliases:
  - databricks/ai_search/client.py:1090   VectorSearchClient = AISearchClient
  - databricks/ai_search/index.py:682     VectorSearchIndex  = AISearchIndex
  - databricks/ai_search/exceptions.py:47 VectorSearchException = AISearchException
The reranker / utils symbols (`Reranker`, `DatabricksReranker`,
`CredentialStrategy`) were already used as-is and exist at the same
relative paths in ai_search.

Validated:
* Fresh venv: only databricks-ai-search==0.73 installed (no vectorsearch).
* 53/53 openai unit tests pass.
* 258/258 langchain unit tests pass (4 skipped as before).
* Smoke: `from databricks_openai.vector_search_retriever_tool import
  VectorSearchRetrieverTool` resolves `VectorSearchIndex` to
  `databricks.ai_search.index` even with the `databricks.vector_search`
  package completely absent.
@jennsun jennsun requested a review from bbqiu June 9, 2026 18:05
jennsun added 2 commits June 9, 2026 14:40
The previous commit's bulk sed also rewrote the Sphinx doc links in
six docstrings to point at `databricks.ai_search.html`. That page
currently 403s on api-docs.databricks.com — the docs site has not yet
republished under the `databricks-ai-search` name and there is no
redirect from the old URL. Until the docs team ships docs under the
new package name (and adds redirects from the old), point users at the
URL that actually resolves today.

The page that opens at `databricks.vector_search.html` documents the
same `VectorSearchIndex.similarity_search` API the bridge calls, so
the link target is still correct content-wise.

This reverts only the URL strings; the actual import paths
(`from databricks.ai_search.* import ...`) are unchanged.
…ot `.client`)

The original docstrings said `databricks.vector_search.client.
VectorSearchIndex.similarity_search` — the same wrong-path
incidental-re-export bug that PR #435 fixed in the actual code. The
earlier bulk sed in this PR carried the bug forward into the new
package name, producing `databricks.ai_search.client.VectorSearchIndex`
which does not even resolve (the new `databricks.ai_search.client`
imports `AISearchIndex`, not `VectorSearchIndex`; only the alias on
`.index` exists).

Fix the docstrings to point at the real home of the class:

  databricks.ai_search.client.VectorSearchIndex  →  databricks.ai_search.index.VectorSearchIndex
@jennsun jennsun merged commit d3a4f93 into main Jun 9, 2026
43 of 46 checks passed
@jennsun jennsun deleted the jennsun/migrate-to-databricks-ai-search branch June 9, 2026 22:30
jennsun added a commit that referenced this pull request Jun 10, 2026
Both jobs ran current CI against the frozen `integrations/openai` /
`integrations/langchain` source from historical tags (databricks-ai-
v0.2.0 through v0.5.0). They worked while PyPI dep evolution was
backward-compatible.

That contract broke with the databricks-vectorsearch → databricks-ai-
search rename. The frozen historical sources import VectorSearchIndex
from `databricks.vector_search.client` (the path that was removed in
the rename), and there's no PR to HEAD that can update that frozen
source. The matrix is permanently red regardless of what HEAD does.

Per Ann: "we can restart them from the version we are deploying."
Remove both jobs now; once we ship a release containing the ai-search
migration (#437), the cross-version matrix can be re-introduced with
that release as the new stable baseline.

The bridge's own unit tests + integration tests still cover regression
risk. This removes a non-Required CI signal that's now noise rather
than information.
kunyuchen added a commit that referenced this pull request Jun 10, 2026
## databricks-ai-bridge 0.20.0 databricks-langchain 0.20.0 databricks-openai 0.16.0 (2026-06-10)

### New Features
- databricks-ai-bridge: Durable, crash-resumable agent execution for MLflow ResponsesAgent handlers (#425)

### Improvements
- databricks-ai-bridge / databricks-langchain / databricks-openai: migrate databricks-vectorsearch to databricks-ai-search (#437)

### Bug Fixes
- databricks-openai: forward extra `kwargs` to maintain compatibility with newer versions of openai-agents (#426, #429)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants