llama-index-llms-openai-like
llama-index llms openai like integration
Decision gist · record as of 2026-08-14
Yes, if you're using LlamaIndex and want to use an OpenAI-compatible LLM that isn't OpenAI itself. Low friction, permissive license, no known vulnerabilities, and active maintenance make it a straightforward choice. Install it when you need local inference, multi-provider flexibility, or cost control in your LlamaIndex application.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; you must have a running OpenAI-compatible API endpoint (local or remote) to connect to.
- Low install friction with just two runtime dependencies (llama-index-core and llama-index-llms-openai).
- Actively maintained as of the latest release.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both commercial and open-source projects.
last release 2026-04-23 (113 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 436,417 downloads/mo, #6,675 on PyPI
Alternatives
Verify before relying
pip install llama-index-llms-openai-like
from llama_index.llms.openai_like import OpenAILike
llm = OpenAILike(
model="model-name",
api_base="http://localhost:1234/v1",
api_key="fake",
context_window=128000,
is_chat_model=True,
is_function_calling_model=False,
)- Whether the wrapper handles all OpenAI API features or only a subset (streaming, vision, embeddings, etc.)
- Performance overhead or latency impact compared to direct OpenAI client usage
- Specific OpenAI-compatible providers tested or officially supported
What it is and what it does
This package bridges LlamaIndex and any API that speaks the OpenAI protocol—whether that's OpenAI itself, a local model server like Ollama or LM Studio, or a third-party provider. It's a thin adapter layer that lets you configure context window, chat vs. completion mode, and function-calling support, then use that model within LlamaIndex's indexing and retrieval workflows.
You install it alongside llama-index-core and llama-index-llms-openai, instantiate an OpenAILike object with your endpoint and model name, and pass it to LlamaIndex components that accept an LLM. It's most useful when you want to run inference locally or switch between providers without rewriting your LlamaIndex code.
Use it for
- Run a local open-source model (via Ollama or similar) within LlamaIndex without vendor lock-in to OpenAI.
- Prototype or test LlamaIndex applications against a self-hosted LLM before deploying to a cloud provider.
- Switch between multiple OpenAI-compatible endpoints (staging, production, different providers) by changing configuration.
- Integrate a custom or fine-tuned model that exposes an OpenAI-compatible API into a LlamaIndex RAG pipeline.
- Evaluate cost or latency tradeoffs by routing LlamaIndex queries to different LLM providers at runtime.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you're using LlamaIndex and want to use an OpenAI-compatible LLM that isn't OpenAI itself.
Low friction, permissive license, no known vulnerabilities, and active maintenance make it a straightforward choice. Install it when you need local inference, multi-provider flexibility, or cost control in your LlamaIndex application.
Install
llama-index-llms-openai-like on PyPI
Before you install
Low install friction with just two runtime dependencies (llama-index-core and llama-index-llms-openai). Actively maintained as of the latest release.
Requires Python 3.10 or later; you must have a running OpenAI-compatible API endpoint (local or remote) to connect to.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both commercial and open-source projects.
Quickstart
pip install llama-index-llms-openai-like
from llama_index.llms.openai_like import OpenAILike
llm = OpenAILike(
model="model-name",
api_base="http://localhost:1234/v1",
api_key="fake",
context_window=128000,
is_chat_model=True,
is_function_calling_model=False,
)
Verify before relying
- Whether the wrapper handles all OpenAI API features or only a subset (streaming, vision, embeddings, etc.)
- Performance overhead or latency impact compared to direct OpenAI client usage
- Specific OpenAI-compatible providers tested or officially supported
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesllama-index-corellama-index-llms-openai |
| Maintenance | Actively maintained 113 days since the last release |
| First released | |
| Downloads | 436,417 / month, #6,675 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: llama_index_llms_openai_like-0.7.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “openai compatible llm wrapper”
- llama-index-llms-openai-likeProvides a thin wrapper to use OpenAI-compatible APIs (including…
- livekit-plugins-openaiIntegrates OpenAI's Realtime, Responses, LLM, TTS, and STT APIs into…
- opentelemetry-instrumentation-openai-v2Automatically traces and logs OpenAI API calls (and compatible…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also llama-cpp-python · llama-index-llms-litellm · llama-index-multi-modal-llms-openai · llama-index-llms-langchain · llama-index-llms-openai · llama-index-agent-openai · models-dev · llama-index-llms-azure-openai · llama-index-llms-vertex · llama-index-legacy