Connect LlamaIndex
Use the OpenAILike adapter for text chat while keeping embedding and retrieval settings separate.
https://aelder.dev/v1LOCAL CONFIGURATION
Let my agent set this up
Copy this task to an agent already running on your computer. Enter your API key locally when asked.
Help me connect LlamaIndex to AELDER using this guide: https://aelder.dev/docs/llamaindex/
Service Base URL: https://aelder.dev/v1
First inspect my installed version, active profile and configuration. Explain any mismatch with the guide before changing anything.
Use the documented local configuration or CLI method. Do not automate the GUI, install software or change permissions without asking.
Preserve existing accounts, providers, models, defaults, permissions and unrelated settings. Propose the smallest change, show a redacted diff, and back up any files before editing.
Have me enter my API key locally using the tool's secret storage or an environment variable. Never ask me to paste a key into chat, print it, or include it in a command, diff, log or commit.
Use the exact model ID I choose from my account's model list. Do not invent model IDs or assume every model supports every API format or tool feature.
Validate syntax and configuration loading before making any generation request. If there is no dry-run, say so.
Explain any proposed paid test, the model and what it sends, and ask for approval before running it. Do not send project files or private conversation history as a test.
Finish with the settings changed, checks performed and steps to restore the backup.Use LlamaIndex’s OpenAILike adapter for a custom Chat Completions endpoint. This guide changes the text model only.
1. Prepare the adapter
In your Python project environment:
python -m pip install llama-index-llms-openai-likeSet SERVICE_BASE_URL to the Base URL above with /v1, SERVICE_MODEL_ID to an exact model ID, and provide SERVICE_API_KEY privately. Get the selected model’s actual context limit and set SERVICE_CONTEXT_WINDOW to that integer; do not copy a different model’s limit.
2. Configure text chat
import os
from llama_index.core.llms import ChatMessage
from llama_index.llms.openai_like import OpenAILike
llm = OpenAILike(
model=os.environ["SERVICE_MODEL_ID"],
api_base=os.environ["SERVICE_BASE_URL"],
api_key=os.environ["SERVICE_API_KEY"],
context_window=int(os.environ["SERVICE_CONTEXT_WINDOW"]),
is_chat_model=True,
is_function_calling_model=False,
max_retries=0,
)
response = llm.chat([
ChatMessage(role="user", content="Reply with OK."),
])
print(response.message.content)is_chat_model=True is required for this route; it avoids the legacy text Completions endpoint. The example leaves function calling disabled. Enable it separately only for a compatible model and workflow.
3. Use it in your application
Construct the adapter first to check imports and local configuration. Running llm.chat then makes a billable request. Confirm its model and usage in your dashboard. Pass llm to the component that needs it; do not replace every application-wide setting merely to test this connection.
For retrieval projects, keep the existing embedding model and vector store configured separately. Installing the full LlamaIndex stack or building an index may otherwise trigger its default embedding client; this text service configuration does not provide an embeddings route. Adapter defaults and token estimates do not establish the service’s context limits or billing.
Sources: LlamaIndex’s OpenAILike implementation and usage and core project.
Need the key? Open your AELDER dashboard. For direct API calls, see the API reference.

