skillfed

langchain-oci

An integration package connecting OCI and LangChain

langchain-oci v0.3.2 134.4K downloads/30d#11,475 on PyPI59
License unclear UPL-1.0 Active released

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-oci

uv

uv add langchain-oci

poetry

poetry add langchain-oci

Installing 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

Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

Tags

langchain oracle cloud integrationoci generative ai modelsoracle cloud llm integrationoci embeddings langchainoracle ai model deployment
oracle-cloudmultimodal-aimodel-deployment

More Artificial Intelligence packages

Further reading