☁️ OCI Configuration

Details
This page shows version v0.0.0 (dev). The current version can be found here.

Oracle Cloud Infrastructure (OCI) can optionally be configured to enable additional AI Optimizer functionality including:

Configuration

OCI can either be configured through the AI Optimizer interface, a CLI Configuration File, or by using environment variables.

You will need to generate an API Key to obtain the required configuration values.


Interface

To configure OCI access from the AI Optimizer, navigate to Configuration menu and OCI tab:

OCI Config OCI Config

Provide the values obtained by generating an API Key.

OCI GenAI Services can also be configured on this page, once OCI access has been confirmed. See Loading OCI GenAI Models.


Config File

Depending on the runtime environment, either Bare Metal or Containerized, your local CLI Configuration File can be used to configure AI Optimizer for OCI access.

In addition to the standard configuration file entries, two additional entries can be added to enable OCI GenAI Services:

  • genai_region: the Region for the OCI GenAI Service
  • genai_compartment_id: the Compartment OCID of the OCI GenAI Service

Bare Metal

During startup, the AI Optimizer will automatically look for and consume a CLI Configuration File for configuring OCI access.

Container

When starting the container, volume mount the configuration file to /app/.oci for it to be used.

For example:

podman run -v ~/.oci:/app/.oci -p 8501:8501 -it --rm ai-optimizer-aio

Environment Variables

OCI can also be configured using environment variables. See OCI CLI Overrides and OCI GenAI under Environment Variables.


Authentication Types

The following authentication types are supported via the AIO_OCI_CLI_AUTH variable or the authentication field in the config file:

ValueDescriptionUse Case
api_keyAPI key with user, fingerprint, tenancy, and private keyDefault; local development and service accounts
instance_principalInstance Principals security tokenOCI compute instances with dynamic group policies
resource_principalResource Principals signerOCI Functions and other resource-principal-enabled services
oke_workload_identityOKE workload identity resource principalPods running on Oracle Kubernetes Engine
security_tokenSecurity token from file with private keyOCI Cloud Shell and token-based authentication

Loading OCI GenAI Models

The OCI Generative AI service provides Private Cloud Large Language and Embedding models. Unlike other providers, these models are not added one at a time—the AI Optimizer loads them for you.

There are two ways the models get loaded:

  • From the interface: On the OCI tab—once OCI access is usable—enter the GenAI Compartment OCID, click Check for OCI GenAI Models, choose a Region, then click Enable Region Models. The AI Optimizer queries the OCI GenAI service for that region, then registers and enables every chat and embedding model it offers.
  • At startup: When a usable OCI profile already has a GenAI Compartment OCID and Region persisted—from a previous configuration, a config file, or environment variables—the AI Optimizer loads that region’s models automatically.

Either way, the models appear on the Models tab. Changing the configured Region clears the previously loaded OCI models; the new region’s models are loaded the next time you run Enable Region Models or at the next startup.