langchain-oci
An integration package connecting OCI and LangChain
What it is and what it does
langchain-oci bridges LangChain with Oracle Cloud Infrastructure's generative AI and data science services. It exposes OCI's foundation models (both on-demand and custom models on Dedicated AI Clusters) as LangChain chat and completion interfaces, plus embeddings support including multimodal image embeddings. The package also integrates with OCI Data Science model deployments, allowing you to invoke deployed models through LangChain's standard interfaces.
The integration handles authentication via OCI credentials, regional endpoints, and model configuration. It supports multimodal content—images, PDFs, video, and audio—where the underlying OCI model supports it. You configure a model by providing its OCI model ID, compartment ID, service endpoint, and authentication profile, then invoke it like any other LangChain LLM or embedding provider.
Use it for:
- Build LangChain agents and chains that call OCI Generative AI foundation models instead of other third-party providers
- Embed text and images in a shared vector space using OCI's multimodal embeddings for cross-modal retrieval workflows
- Analyze images, PDFs, videos, or audio files with OCI's vision and multimodal models through LangChain's message interface
- Deploy custom models on OCI Dedicated AI Clusters and invoke them via LangChain without leaving the OCI ecosystem
- Use OCI Data Science model deployments as LangChain LLM backends for inference on custom-trained models
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates LangChain with Oracle Cloud Infrastructure (OCI) services, providing access to OCI Generative AI models (chat, completion, embeddings) and OCI Data Science model deployments.
Yes, if you are already committed to OCI and LangChain. The package is actively maintained, has low install friction, and provides a clean integration path. However, verify that UPL-1.0 aligns with your license requirements (treatment is unclear), and confirm you have OCI credentials and service setup in place before installation.
Install
langchain-oci on PyPI
pip
pip install langchain-ociuv
uv add langchain-ocipoetry
poetry add langchain-ociInstalling langchain-oci
Before you install
Low install friction with a pure Python wheel. Active maintenance—last commit 2026-08-14, released 2026-08-07. Supports Python 3.9 through 3.14. Depends on langchain, langchain-core, and oci SDK libraries.
License in practice
Licensed under UPL-1.0, but license treatment is marked unclear in the package metadata. Verify the actual license terms before use in proprietary or commercial contexts.
Quickstart
pip install langchain-oci
from langchain_oci import ChatOCIGenAI
llm = ChatOCIGenAI(
model_id="MY_MODEL_ID",
service_endpoint="https://inference.generativeai.us-chicago-1.oci.oraclecloud.com",
compartment_id="ocid1.compartment.oc1..xxxxx",
auth_profile="MY_AUTH_PROFILE"
)
response = llm.invoke("Sing a ballad of LangChain.")
OCI credentials must be configured and accessible via the specified auth_profile before the integration can connect to OCI services.
Verify before relying
- Whether UPL-1.0 is compatible with your project's license requirements (treatment is marked unclear)
- Whether OCI credentials and service setup are required before any integration can be used
- Support status and SLA for the repository (59 stars, active but relatively new)
Package facts
| License | UPL-1.0 (unclear) |
| Python support | supports the current Python release (<4.0,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 10 — aiohttp, langchain, langchain-core, langchain-openai, langgraph, numpy, oci, oci-openai, openai, pydantic |
| Maintenance | actively maintained — 7 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 134,380/month — #11,475 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: langchain_oci-0.3.2-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
langchain-nvidia-ai-endpointsIntegrates NVIDIA AI Foundation Models and chat…
permissive · top 5,000 on PyPI
langchain-togetherConnects LangChain applications to Together…
permissive · top 15,000 on PyPI
oci-openaiProvides OpenAI-compatible Python clients for…
unclear · top 15,000 on PyPI
langchain-google-genaiIntegrates Google's Gemini AI models (chat,…
permissive · top 5,000 on PyPI
langchain-google-vertexaiConnects LangChain applications to Google…
permissive · top 1,000 on PyPI
langchain-oracledbIntegrates Oracle Database with LangChain to…
unclear · top 15,000 on PyPI
langchain-cohereConnects LangChain applications to Cohere's…
permissive · top 5,000 on PyPI
langchain-ibmIntegrates IBM watsonx.ai models with…
permissive · top 15,000 on PyPI
coherePython SDK for accessing Cohere's language…
permissive · top 1,000 on PyPI
langchain-sambanovaConnects LangChain applications to SambaNova's…
permissive · top 15,000 on PyPI