Installation and Setup
Authentication
Four authentication methods are supported for OCI services. All methods follow the standard OCI SDK authentication.API Key (Default)
Uses credentials from~/.oci/config:
Security Token
For session-based authentication:Instance Principal
For applications running on OCI compute instances:Resource Principal
For OCI Functions and other resources:OCI Generative AI
Oracle Cloud Infrastructure (OCI) Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases, and which are available through a single API. Using the OCI Generative AI service you can access ready-to-use pretrained models, or create and host your own fine-tuned custom models based on your own data on dedicated AI clusters.
Chat Models
ChatOCIGenAI
Main chat model for OCI Generative AI service with full LangChain feature support. See usage example.- ✅ Tool calling (including parallel tools with Llama 4+)
- ✅ Structured output (Pydantic, JSON mode)
- ✅ Vision & multimodal (13+ models support images)
- ✅ Streaming (sync and async)
- ✅ Async operations (ainvoke, astream, abatch)
- ✅ PDF, video, audio processing (Gemini models)
ChatOCIOpenAI
OpenAI Responses API compatibility for OCI commercial OpenAI models.- OpenAI-compatible interface
- Conversation store support for persistent memory
- Access to GPT-4, GPT-5, o1, o3 models (where available)
Embedding Models
OCIGenAIEmbeddings
Text and image embedding models. See usage example.cohere.embed-english-v3.0(1024 dimensions)cohere.embed-multilingual-v3.0(1024 dimensions)cohere.embed-v4.0(text + image, 256-1536 dimensions)
Vision & Multimodal
13+ vision-capable models across Meta Llama, Google Gemini, xAI Grok, and Cohere:AI Agents
Create LangGraph-powered ReAct agents with OCI models:Provider Coverage
| Provider | Example Models | Key Features |
|---|---|---|
| Meta | Llama 3.2, 3.3, 4 (Scout, Maverick) | Vision, parallel tool calls |
| Gemini 2.0/2.5 Flash, Flash Lite, Pro | PDF, video, audio processing | |
| xAI | Grok 3, 4 (Fast, Mini) | Vision, reasoning modes |
| Cohere | Command R+, Command A | RAG optimization, V2 vision |
| OpenAI | GPT-4.1, GPT-5, o1, o3 | Reasoning (via ChatOCIOpenAI) |
Note: Model availability varies by region. See the OCI Generative AI documentation for the current model catalog.
OCI Data Science Model Deployments
OCI Data Science is a fully managed and serverless platform for data science teams. Deploy custom models as endpoints using the OCI Data Science Model Deployment Service.
ChatOCIModelDeployment
Chat model for OCI Data Science Model Deployments. See usage example.ChatOCIModelDeploymentVLLM
Optimized for vLLM-based deployments with streaming support:ChatOCIModelDeploymentTGI
For Text Generation Inference (TGI) deployments:Samples
For comprehensive guides covering all features, see the langchain-oci samples:| Sample | Level | Topics |
|---|---|---|
| 01: Getting Started | Beginner | Authentication, basic chat, providers |
| 02: Vision & Multimodal | Beginner | Image analysis, PDF, video, audio |
| 03: Building AI Agents | Intermediate | ReAct agents, tools, memory |
| 04: Tool Calling Mastery | Intermediate | Parallel tools, workflows |
| 05: Structured Output | Intermediate | Pydantic schemas, JSON modes |
| 07: Async for Production | Advanced | ainvoke, astream, FastAPI |
| 09: Provider Deep Dive | Specialized | Meta, Gemini, Cohere, xAI specifics |
| 10: Embeddings | Specialized | Text & image embeddings, RAG |
Additional Resources
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

