Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions openhands/usage/agent-canvas/model-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,51 @@ Use the `Basic` tab when you have an API key from Anthropic, OpenAI, Google, Ope

For model recommendations and provider references, see [LLM Configuration](/openhands/usage/llms/llms). For the OpenHands provider, see [OpenHands LLM Provider](/openhands/usage/llms/openhands-llms).

## OCI Generative AI

Use the first-class `OCI Generative AI` provider when you have an OCI Generative AI API key and project. OpenHands uses OCI's OpenAI-compatible Responses API for this provider.

### Before You Begin

1. Choose an [OCI region that supports Generative AI](https://docs.oracle.com/en-us/iaas/Content/generative-ai/regions.htm).
2. Create or select a [Generative AI project](https://docs.oracle.com/en-us/iaas/Content/generative-ai/projects.htm), then copy its project OCID.
3. Make sure your OCI identity has the required [project permissions](https://docs.oracle.com/en-us/iaas/Content/generative-ai/project-permissions.htm).
4. Create a [Generative AI API key](https://docs.oracle.com/en-us/iaas/Content/generative-ai/api-keys.htm).
5. Choose an exact model ID from the [pretrained models catalog](https://docs.oracle.com/en-us/iaas/Content/generative-ai/pretrained-models.htm). Confirm that the model is available in your selected region by checking [models by region](https://docs.oracle.com/en-us/iaas/Content/generative-ai/model-endpoint-regions.htm).

<Note>
The initial integration supports OCI Generative AI API keys. OCI IAM or SigV4 authentication is not supported by this provider path.
</Note>

### Create the Profile

1. Open `Settings > LLM` and select the `Basic` tab.
2. Select `OCI Generative AI` as the provider.
3. Enter the exact model ID from OCI. Do not add an `oci_genai/` prefix in the model field; Agent Canvas adds the provider prefix when it saves the profile.
4. Enter the OCI region identifier, such as `us-chicago-1`.
5. Enter the Generative AI project OCID. It starts with `ocid1.generativeaiproject.`.
6. Enter the Generative AI API key.
7. Save the profile, start a new conversation, and send a short message that requires a tool call.

OpenHands derives this endpoint from the region:

```text
https://inference.generativeai.<region>.oci.oraclecloud.com/openai/v1
```

It also selects the Responses API and sends the project OCID with each provider request. You do not need to enter a base URL, custom headers, or capability overrides.

The API key uses the same secret handling as other LLM credentials and is not returned in plaintext by profile APIs. Configure `OH_SECRET_KEY` on the Agent Server to encrypt profile credentials at rest. The region, project OCID, and model ID are non-secret profile settings.

### Credential-Gated Live Test Plan

The automated unit tests cover endpoint derivation, project-header injection, normal Responses API output, and tool-call parsing without making a billable provider request. Before release, maintainers can perform a live check with a temporary OCI API key:

1. Create a profile by following the steps above.
2. Start a new conversation and ask: `Use the terminal to print the current working directory.`
3. Confirm that the assistant calls the terminal tool and continues after the tool result.
4. Remove or rotate the temporary API key after the test.

## Local OpenAI-Compatible Server

Use the `Advanced` tab for LM Studio, Ollama, vLLM, SGLang, or another server that exposes an OpenAI-compatible API.
Expand Down