Skip to content

Add OCI LLM, embeddings, and Oracle integrations#4885

Open
fede-kamel wants to merge 9 commits intocrewAIInc:mainfrom
fede-kamel:feat/oci-oracle-integrations
Open

Add OCI LLM, embeddings, and Oracle integrations#4885
fede-kamel wants to merge 9 commits intocrewAIInc:mainfrom
fede-kamel:feat/oci-oracle-integrations

Conversation

@fede-kamel
Copy link

@fede-kamel fede-kamel commented Mar 15, 2026

Summary

This PR adds first-class OCI support across CrewAI’s native LLM and embedding paths, plus OCI and Oracle DB tool integrations in crewai-tools.

What’s included

crewai

  • Add native OCI LLM provider support for:
    • chat completions
    • async calls
    • batch calls
    • streaming
    • structured output
    • tool calling
    • multimodal input handling
  • Add OCI embedding support for:
    • text embeddings
    • image embeddings
  • Add live and SDK-surface coverage for OCI provider and embedding paths
  • Add a small OCI agent profiling entrypoint for repeatable local profiling

crewai-tools

  • Add OCI tools for:
    • Generative AI agent invocation
    • Knowledge Base retrieval
    • Object Storage read/write
  • Add Oracle DB tools for:
    • text retrieval
    • vector retrieval
    • hybrid retrieval
  • Add live integration coverage for OCI tools and Oracle DB retrieval paths

Key fixes

  • Preserve input ordering in OCICompletion.abatch()
  • Guard shared OCI client access
  • Fix OCI live test parametrization so unsupported/unconfigured live cases skip cleanly
  • Fix Oracle hybrid retrieval JSON bind handling
  • Fix Oracle hybrid retrieval LOB JSON parsing
  • Correct the OCI image embedding live fixture to use a valid image payload
  • Tighten OCI/Oracle type annotations to satisfy strict mypy

Validation

This PR was validated with targeted unit and live integration coverage against real OCI profiles and a real Oracle Autonomous Database.

Validated live paths include:

  • OCI chat/basic/async/batch/stream/structured flows
  • OCI tool calling, including repeated sequential asks with the same agent
  • OCI multimodal image, PDF, audio, and video flows
  • OCI text embeddings
  • OCI image embeddings
  • OCI Knowledge Base tool
  • Oracle Text search
  • Oracle vector search using OCI-produced embeddings
  • Oracle hybrid search using an installed DB-local ONNX model

Final targeted checks:

  • Ruff on touched OCI/Oracle source: clean
  • Mypy on touched crewai OCI source: clean
  • Mypy on touched crewai-tools OCI/Oracle source: clean

Targeted test results:

  • crewai OCI slice: 5 passed, 5 skipped
  • crewai-tools OCI/Oracle slice: 9 passed, 4 skipped

The remaining skips in those targeted reruns are expected live-env/model-selection skips from the integration harness, not product failures.

Notes

  • Oracle hybrid vector index creation is distinct from OCI embedding model usage. The Oracle DB test fixture documents the DB-local vectorizer requirement and the prior ORA-40284 behavior.
  • OCI agent profiling support is included via lib/crewai/tests/llms/oci/profile_oci_agent.py.

Commit split

  1. 7cfb5f7 Add OCI LLM and embedding support to crewai
  2. d6ae839 Add OCI and Oracle DB tools integrations

Note

High Risk
Adds a new native LLM provider (including streaming/tool-calling/structured output) and a new embeddings provider, plus new OCI/Object Storage/Oracle DB tools, touching core model routing and RAG factory code paths. Risk is mainly in provider selection/streaming/tool execution and optional-dependency handling affecting existing LLM/RAG behavior.

Overview
Adds first-class Oracle Cloud Infrastructure (OCI) support to CrewAI, including a new native oci LLM provider with streaming, async/batch helpers, tool calling, structured outputs, and multimodal message normalization, plus response metadata capture.

Extends RAG to support OCI embeddings (text + image) via a new oci embeddings provider and updates optional import handling for RAG factories.

Introduces new crewai-tools integrations for OCI agent invocation, OCI Object Storage read/write, and an OCI-backed knowledge base retriever, along with new Oracle Database retrieval tools (text, vector, and hybrid search) and associated unit/live integration tests and documentation updates (OCI setup + new tool pages).

Written by Cursor Bugbot for commit 9be59b9. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant