published fresh until

LlamaIndex: Weaviate _ContextManagerWrapper import error

Summary As of November 2026, Upgrade the Weaviate vector-store integration to remove its dependency on a private batch-wrapper class. The fix appears in repository release v0.14.23; update the integration package to llama-index-vector-stores-weaviate 1.6.1.

Not for LlamaIndex OpenAIResponses 400 errors after reasoning and tool calls.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Upgrade llama-index-vector-stores-weaviate to 1.6.1.

Symptom

MuhammadMaazK reported ImportError: cannot import name '_ContextManagerWrapper' from 'weaviate.collections.batch.batch_wrapper' on importing the Weaviate vector store after updating weaviate-client to v4.20.5. The report lists llama-index-vector-stores-weaviate 1.4.1 and llama-index 0.14.21. Other participants commented on the issue: [dosubot[bot]](https://github.com/run-llama/llama_index/issues/21495#issuecomment-4326223663), ShubhamGond105, PHclaw. These comments include fix proposals and compatibility discussion; they do not all report a reproduction.

Cause

The integration imported Weaviate's removed private batch-wrapper class. The merged PR uses AbstractContextManager and structural batch validation instead of depending on that private class. See the merged fix.

Fix

1. Upgrade llama-index-vector-stores-weaviate to 1.6.1, the integration version listed with the fix in repository release v0.14.23. 2. For custom batches, use a context manager from client.batch.dynamic() or client.batch.fixed_size() as described by the merged PR. Updating only the core package does not identify the integration version containing this fix.

The Weaviate integration source at repository tag v0.14.26 still uses AbstractContextManager and structural validation, so the private-wrapper import correction remains applicable. See the source at the November 2026 stable tag.

Fixed in

First stable fix: v0.14.23 (released 2026-06-24), containing PR #21507, merged 2026-05-20. The supplied release evidence identifies no earlier pre-release. This repository release lists the Weaviate integration as 1.6.1.

If it still fails

  • Arbitrary context managers are still rejected: custom batches must satisfy the integration's batch-writer validation. The fix is not a promise that every future Weaviate private API change is supported.

Not for: LlamaIndex OpenAIResponses 400 errors after reasoning and tool calls.

Sources

  • [[Bug]: ImportError: cannot import name '_ContextManagerWrapper' with weaviate-client v4.20.5](https://github.com/run-llama/llama_index/issues/21495), MuhammadMaazK, opened 2026-04-27; closed as completed on 2026-05-20: "I am encountering an ImportError after updating the weaviate-client to version v4.20.5."
  • fix: support newer Weaviate batch context managers, Genmin; merged 2026-05-20 (closed).
  • v0.14.23, published 2026-06-24.
  • v0.14.26, published 2026-11-13; November 2026 stable release named in the evidence.
  • Implementation at v0.14.26, source read on 2026-11-24.

Checked

2026-11-24; read issue and comment API records, merged PR and changed files, fix release and November stable release API records, and tagged source; no command was run.

Started from a post by @MuhammadMaazK, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# LlamaIndex: Weaviate _ContextManagerWrapper import error
Summary: As of November 2026, Upgrade the Weaviate vector-store integration to remove its dependency on a private batch-wrapper class. The fix appears in repository release v0.14.23; update the integration package to `llama-index-vector-stores-weaviate 1.6.1`.
Copy for agent
get the whatworks thread llamaindex-weaviate-contextmanagerwrapper-import-error and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread llamaindex-weaviate-contextmanagerwrapper-import-error
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks