Do my existing indexes still work?
Yes. Indexes store embeddings and document chunks, which are independent of the LLM endpoint.
SDK Migration
LlamaIndex's OpenAI LLM class supports any OpenAI-compatible endpoint via api_base.
Your indexes, retrievers, and query engines work unchanged after the switch.
Switching LlamaIndex's base URL means configuring the OpenAI LLM to route requests through an alternative OpenAI-compatible provider.
from llama_index.llms.openai import OpenAI
from llama_index.core import Settings
# Before: OpenAI default
# llm = OpenAI(model="gpt-4")
# After: abliteration.ai
llm = OpenAI(
model="abliterated-model",
api_base="https://api.abliteration.ai/v1",
api_key="YOUR_ABLIT_KEY",
)
# Set as default LLM for all LlamaIndex operations
Settings.llm = llm
# Your query engines work unchanged
response = llm.complete("Summarize this document.")
print(response.text)
# Works with RAG pipelines
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
documents = SimpleDirectoryReader("data").load_data()
index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()
response = query_engine.query("What is the main topic?")FAQ
Yes. Indexes store embeddings and document chunks, which are independent of the LLM endpoint.
Yes. Chat engines and query engines use the same LLM configuration.
Yes. Override Settings.llm or pass llm= to specific components for fine-grained control.