LlamaIndex
LlamaIndex's OpenAI LLM and embedding classes accept a custom api_base, so the whole framework routes through Corveil with a single configuration block.
Mode
Direct mode only.
1. Install
bash
pip install llama-index llama-index-llms-openai2. Minimal example
python
from llama_index.llms.openai import OpenAI
llm = OpenAI(
model="or-claude-haiku-4.5",
api_base="https://your-corveil-host/v1",
api_key="sk-citadel-your-key-here",
)
resp = llm.complete("Explain RAG in one paragraph")
print(resp.text)Notes
- Use the same
api_base/api_keyforOpenAIEmbeddingif your Corveil instance exposes an embeddings model - For service-level defaults, set
Settings.llm = OpenAI(...)once at startup