Answers for LLM inference engineers

ImportError: cannot import name 'VectorStoreIndex' (or ServiceContext, OpenAI, any name) from 'llama_index...': which LlamaIndex releases have it

LlamaIndex 0.10.0 (2024-02-10) moved the whole old top level into llama_index.core and split every integration into its own package; 0.9.48 is the last release with the old layout. from llama_index import VectorStoreIndex becomes from llama_index.core import VectorStoreIndex. from llama_index.llms import OpenAI becomes pip install llama-index-llms-openai and from llama_index.llms.openai import OpenAI; embeddings, vector stores and readers work the same way. ServiceContext still imports but fails from 0.11.0: use Settings. llama-index-core 0.13.0 removed the old agents (AgentRunner) and QueryPipeline, and 0.14.21 removed download_loader. For any other name, paste the error below; the lookup gives the new import and the package for 580 old names.

Published 2026-11-25 · Data as of 2026-11-25 · every release of llama-index 0.7.0 to 0.9.48 and llama-index-core 0.10.0 to 0.14.26 (319 releases) · read from the PyPI wheels, nothing was installed or run (how, limits)

Examples:

Runs in your browser on llama_index.json (610 KB) and 105 KB of hints in this page; nothing you paste is sent anywhere. Covers 24,694 module-and-name pairs in 1,362 modules.

What replaces the old imports, and which package do I install?

The new import for each old name comes from LlamaIndex's own upgrade map (llama_index/core/command_line/mappings.json, 1,089 names, 708 of them in integration packages); the package name follows the rule its llamaindex-cli upgrade uses. Common ones:

Before 0.10.0From 0.10.0Package
from llama_index import VectorStoreIndexfrom llama_index.core import VectorStoreIndexllama-index-core
from llama_index import SimpleDirectoryReaderfrom llama_index.core import SimpleDirectoryReaderllama-index-core
from llama_index import StorageContextfrom llama_index.core import StorageContextllama-index-core
from llama_index import load_index_from_storagefrom llama_index.core import load_index_from_storagellama-index-core
from llama_index import Documentfrom llama_index.core import Documentllama-index-core
from llama_index import PromptTemplatefrom llama_index.core import PromptTemplatellama-index-core
from llama_index.llms import OpenAIfrom llama_index.llms.openai import OpenAIllama-index-llms-openai
from llama_index.embeddings import OpenAIEmbeddingfrom llama_index.embeddings.openai import OpenAIEmbeddingllama-index-embeddings-openai
from llama_index.embeddings import HuggingFaceEmbeddingfrom llama_index.embeddings.huggingface import HuggingFaceEmbeddingllama-index-embeddings-huggingface
from llama_index.vector_stores import ChromaVectorStorefrom llama_index.vector_stores.chroma import ChromaVectorStorellama-index-vector-stores-chroma
from llama_index.llms import Ollamafrom llama_index.llms.ollama import Ollamallama-index-llms-ollama
from llama_index.node_parser import SentenceSplitterfrom llama_index.core.node_parser import SentenceSplitterllama-index-core
from llama_index.agent import ReActAgentfrom llama_index.core.agent import ReActAgentllama-index-core

llamaindex-cli upgrade <folder> (installed with llama-index-core) rewrites the imports of a project with the same map. (unknown location) in the error means llama_index is now a namespace package with nothing at its top level.

What changed after 0.10?

How do I read the error?

How was this read, and how was it checked?

From the Python files of every release's wheel on PyPI (llama-index 0.7.0 to 0.9.48, llama-index-core 0.10.0 to 0.14.26), read by HTTP range requests and parsed with Python's ast module. The git tags were not used for the data: the v0.10.0 tag exports Settings, the published 0.10.0 wheel does not. A module's names are everything it binds at module level and what from .x import * brings in; names that appear only in __all__ without a binding (0.9.0 lists BeautifulSoupWebReader) are not importable and are not counted. Integration packages are not read; their imports come from the upgrade map.

Checks: (1) the top-level names of each part are found as plain text in its __init__.py in every release of their range (37,235 name-and-release pairs) and are not bound on either side (64 edges). (2) A regular expression finds 31,574 definitions in 7,397 file versions; all are among the names read. (3) 14 release checks against the wheels by plain-text search agree:

NameReleaseWheel and data
llama_index.VectorStoreIndex0.9.48has it
llama_index.VectorStoreIndex0.10.0does not
llama_index.core.VectorStoreIndex0.10.0has it
llama_index.core.VectorStoreIndex0.9.48does not
llama_index.ServiceContext0.9.48has it
llama_index.ServiceContext0.10.0does not
llama_index.core.Settings0.10.1has it
llama_index.core.Settings0.10.0does not
llama_index.core.agent.workflow.ReActAgent0.13.0has it
llama_index.core.agent.workflow.ReActAgent0.12.0does not
llama_index.core.query_pipeline.QueryPipeline0.12.0has it
llama_index.core.query_pipeline.QueryPipeline0.13.0does not
llama_index.core.download_loader0.11.0has it
llama_index.core.download_loader0.14.26does not

Limits

Questions

How do I fix "cannot import name 'VectorStoreIndex' from 'llama_index'"?

LlamaIndex 0.10.0 (2024-02-10) moved it: from llama_index.core import VectorStoreIndex. The same holds for SimpleDirectoryReader, StorageContext, Document, load_index_from_storage and the rest of the old top level; 0.9.48 is the last release with the old layout. To keep old code unchanged, pin pip install "llama-index<0.10.0".

How do I fix "cannot import name 'OpenAI' from 'llama_index.llms'"?

From 0.10.0 each integration is its own package: pip install llama-index-llms-openai, then from llama_index.llms.openai import OpenAI. Embeddings and vector stores work the same way, for example llama-index-embeddings-openai and llama-index-vector-stores-chroma. The table on this page and the lookup give the package for 708 names.

ServiceContext imports but fails. What replaces it?

From 0.11.0 (2024-08-22) creating a ServiceContext raises "ServiceContext is deprecated. Use llama_index.settings.Settings instead". Set Settings.llm, Settings.embed_model, Settings.chunk_size and so on, or pass the objects to the functions that use them. Settings is in llama_index.core from 0.10.1.

Where did AgentRunner, FunctionCallingAgentWorker and QueryPipeline go?

llama-index-core 0.13.0 (2025-07-30) removed the old agent classes and query pipelines. Agents are workflow-based: llama_index.core.agent.workflow has FunctionAgent, ReActAgent and AgentWorkflow; pipelines are written as workflows (llama_index.core.workflow, from 0.11.0).

Why does "from llama_index.core import download_loader" fail now?

llama-index-core 0.14.21 (2026-04-21) removed download_loader together with llama_index.core.download, llama_dataset and llama_pack. Install the reader package instead, for example pip install llama-index-readers-file.

Sources

The same data as JSON: llama_index.json, licensed CC BY 4.0.

Related: "cannot import name ... from 'langchain'" · "... from 'openai'" · "... from 'transformers'".