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