feat(llm): add OCI Generative AI provider - #5186
Open
Xiaowen-Yang wants to merge 1 commit into
Open
Xiaowen-Yang wants to merge 1 commit into
Xiaowen-Yang wants to merge 1 commit into
Conversation
Co-authored-by: openhands <openhands@all-hands.dev>
This was referenced Sep 19, 2026
Xiaowen-Yang
marked this pull request as ready for review
September 19, 2026 11:27
Collaborator
|
🚦 CI is currently failing on this PR's latest commit. Please fix the failing checks before OpenHands reviews it - this is re-checked automatically once you push a new commit. (A maintainer can also request This is an automated check - no AI was used to generate this comment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HUMAN:
I reviewed the OCI Generative AI provider implementation and the automated test results. I did not run a live OCI request because I do not have the required OCI credentials.
AGENT:
Why
OCI Generative AI provides an OpenAI-compatible Responses API, but OpenHands
currently has no first-class configuration path for its regional endpoint,
Generative AI project OCID, or API-key authentication.
Users must manually construct the endpoint, add the
openai-projectheader,and configure Responses API capabilities. This is error-prone and makes OCI
deployments difficult to configure reliably.
This PR adds the SDK and Agent Server support needed for a guided OCI Generative
AI profile. The dependent Agent Canvas UI is implemented in
OpenHands/OpenHands#17543, and the user-facing setup documentation is provided
in OpenHands/docs#813.
Summary
oci_genai/<model-id>as a first-class LLM provider route with validatedOCI region and Generative AI project OCID fields.
/openai/v1endpoint, select the Responses API, and addthe required
openai-projectheader automatically.validation, serialization, and encrypted-secret tests.
Issue Number
Fixes: #5188
Related to OpenHands/OpenHands#17512.
How to Test
Automated Verification Performed
Set up the development environment:
Result: completed successfully.
Run the targeted OCI and provider-discovery tests:
Result:
Run the broader LLM profile and Agent Server regression tests:
Result:
Run the repository checks on all changed files:
Result:
Validate the generated Agent Server OpenAPI schema:
Result:
Live OCI Verification
A credentialed live request was not run because no OCI Generative AI API key,
project OCID, and region-enabled model were available in the development
environment.
The automated tests exercise both normal Responses API output and function-tool
output through mocked provider responses, but they do not make a billable OCI
request. Credentialed validation by a maintainer with OCI access would be
appreciated. The live verification procedure is:
model="oci_genai/<exact-model-id>"oci_region="<region>"oci_project_id="<project-ocid>"result.
OpenHands/docs#813 includes the same credential-gated live test plan for users.
Video/Screenshots
Not applicable to this SDK and Agent Server PR because it does not change a GUI.
OpenHands/OpenHands#17543 contains the user-facing provider selector, OCI
configuration fields, and a screenshot of the rendered form. CLI test results
and reproduction steps are included above.
Design Doc
Not included. The implementation is limited to provider-specific configuration
normalization and transport routing:
Type
Notes
oci_genai/is intentionally separate from LiteLLM's nativeoci/provider.The native route targets OCI IAM-style authentication, while this initial
integration uses OCI Generative AI API keys and the OpenAI-compatible
Responses API.
principals is outside the scope of this PR and can be added in a follow-up.
openai-projectheader takes precedence over conflictingcaller-supplied headers.
Jev-Fast-Audit
⚡ Jev fast audit · estimates · 0.52s · commit 1f8bab5
Strongest signal: No primary concern selected.
Evidence: No primary concern to locate.
Coverage: complete supplied coverage; 14/14 hunks, 5/5 files.
All estimates and evidence