langchain-openai
An integration package connecting OpenAI and LangChain
Decision gist · record as of 2026-08-14
Yes. This is a production-stable, actively maintained integration package with low install friction, no security vulnerabilities, and permissive licensing. Install it if you're building a LangChain application and want to use OpenAI as your model provider—it's the standard way to do so.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires an OpenAI API key set in the OPENAI_API_KEY environment variable or passed at initialization.
- Low install friction with a pure-wheel distribution.
- Actively maintained with a release 1 day old and a commit from 2026-08-14.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions, making this suitable for most projects without licensing concerns.
last release 2026-08-13 (1 days) · last repo commit 2026-08-14 · 144,195 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 69,458,995 downloads/mo, #472 on PyPI
Alternatives
Verify before relying
pip install langchain-openai
from langchain_openai import ChatOpenAI
model = ChatOpenAI(model="gpt-4o-mini")
response = model.invoke("Hello")- Specific OpenAI models supported by this version beyond what the package name implies.
- Whether all OpenAI service types (chat, embeddings, etc.) are equally well-supported or if some are experimental.
What it is and what it does
This package bridges OpenAI's API and LangChain, the popular framework for building applications with language models. It wraps OpenAI's official SDK to expose chat models, embeddings, and other services as LangChain-compatible components that can be chained with other tools, memory systems, and retrieval logic. The package depends on langchain-core (the base framework), openai (the official SDK), and tiktoken (for token counting).
It's designed for developers building LangChain applications who want to use OpenAI as their model provider without writing custom integration code. The package is actively maintained, supports Python 3.10 through 3.14, and carries no known security vulnerabilities. Installation is straightforward and requires only standard dependencies.
Use it for
- Build a chatbot or conversational agent using OpenAI models within a LangChain application.
- Create a retrieval-augmented generation (RAG) pipeline that uses OpenAI embeddings and chat models.
- Chain OpenAI models with other LangChain tools, memory, and agents for complex workflows.
- Integrate OpenAI's API into a larger LangChain system without writing custom wrapper code.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is a production-stable, actively maintained integration package with low install friction, no security vulnerabilities, and permissive licensing. Install it if you're building a LangChain application and want to use OpenAI as your model provider—it's the standard way to do so.
Install
langchain-openai on PyPI
Before you install
Low install friction with a pure-wheel distribution. Actively maintained with a release 1 day old and a commit from 2026-08-14. Depends on langchain-core, openai, tiktoken, and certifi—all standard, well-maintained packages.
Requires an OpenAI API key set in the OPENAI_API_KEY environment variable or passed at initialization.
License in practice
MIT license permits commercial and private use with minimal restrictions, making this suitable for most projects without licensing concerns.
Quickstart
pip install langchain-openai
from langchain_openai import ChatOpenAI
model = ChatOpenAI(model="gpt-4o-mini")
response = model.invoke("Hello")
Verify before relying
- Specific OpenAI models supported by this version beyond what the package name implies.
- Whether all OpenAI service types (chat, embeddings, etc.) are equally well-supported or if some are experimental.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0.0,>=3.10.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagescertifilangchain-coreopenaitiktoken |
| Maintenance | Actively maintained 1 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 69,458,995 / month, #472 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Artificial Intelligence |
Evidence: langchain_openai-1.5.0-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 › “langchain openai integration”
- langchain-openaiProvides LangChain integrations for OpenAI's API, enabling language…
- uipath-langchain-clientProvides LangChain-compatible chat models and embeddings that route…
- langchain-azure-aiIntegrates Microsoft Foundry (Azure AI) capabilities into LangChain…
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 langchain-anthropic · langchain-community · langchain-fireworks · langchain-mistralai · langchain-openrouter · langchain-tests · langchain-xai · langchain-aws · langchain-ollama · langchain-deepseek