$npx skillfedfor your agent

oci-openai

OCI authentication and authorization utilities for OpenAI python SDK

With conditionsPyPI Python ModulesReleased Feb 2026125.9K downloads / moUPL-1.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — oci_openai-1.1.0-py3-none-any.whl
v1.1.0 · released 2026-02-03 · Python >=3.9 · 4 runtime deps: httpx, oci, openai, requests

Yes, if you are already using OCI infrastructure and need OpenAI-compatible access to OCI Generative AI or Data Science models. The package is actively maintained, has low install friction, and supports current Python versions. Verify that UPL-1.0 licensing is acceptable for your use case, and confirm you have OCI credentials and the correct endpoint URL before installing.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires OCI credentials configured (OCI CLI profile or environment).
  • Requires valid OCI Generative AI or Data Science Model Deployment endpoint URL and compartment ID.
  • Low install friction with a pure-Python wheel.

License · maintenance · safety

UPL-1.0 (unclear) — Licensed under UPL-1.0 (Oracle Public License), classified as unclear treatment. Verify compatibility with your project's license policy before use.

last release 2026-02-03 (192 days) · last repo commit 2026-06-30 · 32 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 125,879 downloads/mo, #11,795 on PyPI

Verify before relying

pip install oci-openai

from oci_openai import OciOpenAI, OciSessionAuth

client = OciOpenAI(
    base_url="https://inference.generativeai.us-chicago-1.oci.oraclecloud.com/20231130/actions/v1",
    auth=OciSessionAuth(profile_name=""),
    compartment_id="",
)

completion = client.chat.completions.create(
    model="",
    messages=[{"role": "user", "content": "Your prompt here"}],
)
print(completion.model_dump_json())
  • Whether UPL-1.0 is compatible with common commercial or copyleft licensing schemes in your organization.
  • Whether OCI API key authentication (alternative mentioned in docs) is preferable for your use case versus this package's principal-based auth.
  • Performance and rate-limit behavior under production load.
Same gist for agents: .md · .json

What it is and what it does

oci-openai bridges the OpenAI Python SDK with OCI's Generative AI and Data Science Model Deployment services using OCI-native authentication. It wraps httpx and the openai library to inject OCI credentials (session-based, user principal, or resource principal) into requests, allowing you to use familiar OpenAI API patterns (chat.completions.create, async clients) against OCI endpoints instead of OpenAI's.

The package supports both synchronous (OciOpenAI) and asynchronous (AsyncOciOpenAI) clients, and can patch the native openai SDK's http client for use with frameworks like langchain-openai. It targets OpenAI, xAI Grok, and Meta Llama models hosted on OCI, and works with both OCI Generative AI endpoints and custom model deployments via OCI Data Science.

Use it for

  • Migrate existing OpenAI SDK code to OCI Generative AI without rewriting API calls, using OCI IAM for authentication.
  • Build LLM applications on OCI with resource-level or workload-level authentication (e.g., OKE pods, compute instances).
  • Integrate OCI-hosted models into langchain or other frameworks that accept a custom http_client.
  • Deploy inference against custom models in OCI Data Science Model Deployment using OpenAI-compatible chat and completion APIs.
  • Avoid managing separate API keys by leveraging OCI principal authentication across your infrastructure.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you are already using OCI infrastructure and need OpenAI-compatible access to OCI Generative AI or Data Science models.

The package is actively maintained, has low install friction, and supports current Python versions. Verify that UPL-1.0 licensing is acceptable for your use case, and confirm you have OCI credentials and the correct endpoint URL before installing.

Install

oci-openai on PyPI

Before you install

Low install friction with a pure-Python wheel. Active maintenance with recent commits (last commit 2026-06-30). Supports current Python versions (3.9–3.12).

Requires OCI credentials configured (OCI CLI profile or environment). Requires valid OCI Generative AI or Data Science Model Deployment endpoint URL and compartment ID.

License in practice

Licensed under UPL-1.0 (Oracle Public License), classified as unclear treatment. Verify compatibility with your project's license policy before use.

Quickstart

pip install oci-openai

from oci_openai import OciOpenAI, OciSessionAuth

client = OciOpenAI(
    base_url="https://inference.generativeai.us-chicago-1.oci.oraclecloud.com/20231130/actions/v1",
    auth=OciSessionAuth(profile_name=""),
    compartment_id="",
)

completion = client.chat.completions.create(
    model="",
    messages=[{"role": "user", "content": "Your prompt here"}],
)
print(completion.model_dump_json())

Verify before relying

  • Whether UPL-1.0 is compatible with common commercial or copyleft licensing schemes in your organization.
  • Whether OCI API key authentication (alternative mentioned in docs) is preferable for your use case versus this package's principal-based auth.
  • Performance and rate-limit behavior under production load.

Package facts

LicenseUPL-1.0 unclear
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
4 packages
httpxociopenairequests
MaintenanceActively maintained 192 days since the last release
Last repo commit
First released
Downloads125,879 / month, #11,795 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: System :: BenchmarkTyping :: Typed

Evidence: oci_openai-1.1.0-py3-none-any.whl

Tags

Capabilities
OCI generative AI clientOpenAI compatible OCIOCI authentication OpenAIOracle Cloud generative AIOCI model deploymentOpenAI SDK OCI integrationOCI LLM access
Topics
oci-integrationllm-clientopenai-compatible
PyPI keywords
AIArtificial IntelligenceGenAIGenerative AIOCIOracleOracle Cloud Infrastructure

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 › “OCI generative AI client”

  • oci-openaiProvides OpenAI-compatible Python clients for accessing OCI…
  • langchain-ociIntegrates LangChain with Oracle Cloud Infrastructure (OCI) services,…
  • coherePython SDK for accessing Cohere's language models across multiple…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also langchain-oci · oci · oci-cli · openai · sap-ai-sdk-gen · generative-ai-hub-sdk · oras · ocifs · agent-framework-openai · litellm