-
Notifications
You must be signed in to change notification settings - Fork 629
Add OCI LangChain support for hosted Nemotron workflows #1804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rapids-bot
merged 15 commits into
NVIDIA:develop
from
fede-kamel:fk/oci-langchain-nemotron
Apr 30, 2026
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
cd134f3
Add first-class OCI Generative AI LLM provider
fede-kamel 9d9e91d
Add OCI LangChain wrapper, docs, and dependency integration
fede-kamel 9168f5e
Address PR review feedback on OCI LangChain integration
fede-kamel 54ec288
Add OCI Generative AI integration tests for LangChain
fede-kamel 5679519
Declare oci<>agno and oci<>most conflicts; fix mock_builder in OCI tests
fede-kamel 4e6132a
Fix Vale spelling error in OCI docs troubleshooting section
fede-kamel bd56695
Fix ruff/yapf formatting and update uv.lock files
fede-kamel fd6836e
Fix Sphinx docs build: docstring indentation causing RST parse error
fede-kamel a993dc7
Add docs.docker.com to markdown link check ignore list
fede-kamel e975dcd
Remove openai conflict workarounds superseded by #1849
fede-kamel 7ee3ebd
Make OCI integration test auth_profile configurable via env var
fede-kamel 87236a6
Make langchain-oci a required dependency instead of optional
fede-kamel 42161e6
Update docs/source/conf.py
willkill07 a08eebe
Merge branch 'develop' into fk/oci-langchain-nemotron
willkill07 c16e892
Regenerate uv.lock files
willkill07 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,9 @@ | |
| }, | ||
| { | ||
| "pattern": "^https://docs\\.cursor\\.com" | ||
| }, | ||
| { | ||
| "pattern": "^https://docs\\.docker\\.com" | ||
| } | ||
| ] | ||
| } | ||
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
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
99 changes: 99 additions & 0 deletions
99
docs/source/components/integrations/integrating-oci-generative-ai-models.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| <!-- | ||
| SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| --> | ||
|
|
||
| # NVIDIA NeMo Agent Toolkit OCI Integration | ||
|
|
||
| The NeMo Agent Toolkit supports integration with multiple [LLM](../../build-workflows/llms/index.md) providers, including OCI Generative AI. The `oci` provider uses OCI SDK authentication and is designed for OCI Generative AI model and endpoint access. For workflow parity with the AWS Bedrock path, the toolkit also includes a LangChain wrapper built on `langchain-oci`. | ||
|
|
||
| To view the full list of supported LLM providers, run `nat info components -t llm_provider`. | ||
|
|
||
| ## Configuration | ||
|
|
||
| ### Prerequisites | ||
| Before integrating OCI, ensure you have: | ||
|
|
||
| - access to OCI Generative AI in the target region | ||
| - a valid OCI auth method such as `API_KEY`, `SECURITY_TOKEN`, `INSTANCE_PRINCIPAL`, or `RESOURCE_PRINCIPAL` | ||
| - the target compartment OCID | ||
| - the target OCI region (defaults to `us-chicago-1`) or a custom endpoint URL | ||
|
|
||
| Common deployment patterns include: | ||
|
|
||
| - OCI Generative AI regional endpoints | ||
| - custom OCI Generative AI endpoints | ||
| - OCI-hosted inference for NVIDIA Nemotron used as a live integration target | ||
|
|
||
| ### Example Configuration | ||
| Add the OCI LLM configuration to your workflow config file: | ||
|
|
||
| ```yaml | ||
| llms: | ||
| oci_llm: | ||
| _type: oci | ||
| model_name: nvidia/Llama-3.1-Nemotron-Nano-8B-v1 | ||
| region: us-chicago-1 | ||
| compartment_id: ocid1.compartment.oc1..example | ||
| auth_type: API_KEY | ||
| auth_profile: DEFAULT | ||
| temperature: 0.0 | ||
| max_tokens: 1024 | ||
| top_p: 1.0 | ||
| request_timeout: 60 | ||
| ``` | ||
|
|
||
| ### Configurable Options | ||
| * `model_name`: The name of the OCI-hosted model to use (required) | ||
| * `region`: OCI region for the Generative AI service (defaults to `us-chicago-1`). The service endpoint is derived automatically. | ||
| * `endpoint`: Optional explicit service endpoint URL. Overrides the region-derived endpoint when set. | ||
| * `compartment_id`: OCI compartment OCID | ||
| * `auth_type`: OCI SDK auth type | ||
| * `auth_profile`: OCI profile name for file-backed auth | ||
| * `auth_file_location`: Path to the OCI config file | ||
| * `provider`: Optional OCI provider override such as `meta`, `google`, `cohere`, or `openai` | ||
| * `temperature`: Controls randomness in the output (0.0 to 1.0) | ||
| * `max_tokens`: Maximum number of tokens to generate | ||
| * `top_p`: Top-p sampling parameter (0.0 to 1.0) | ||
| * `seed`: Optional random seed | ||
| * `max_retries`: Maximum number of retries for the request | ||
| * `request_timeout`: HTTP request timeout in seconds | ||
|
|
||
| ### Limitations | ||
| * This provider targets OCI Generative AI through the OCI SDK-backed `langchain-oci` path. | ||
| * The Responses API is not enabled for this provider in the current release. | ||
|
|
||
| ## Nemotron On OCI | ||
|
|
||
| One strong OCI deployment pattern is NVIDIA Nemotron hosted on OCI and exposed through an OpenAI-compatible route. In that setup, the toolkit can validate live integration behavior against the OCI-hosted Nemotron endpoint while the official provider and LangChain wrapper cover the OCI Generative AI path. | ||
|
|
||
| ## Usage | ||
| Reference the OCI LLM in your configuration: | ||
|
|
||
| ```yaml | ||
| llms: | ||
| oci_llm: | ||
| _type: oci | ||
| model_name: nvidia/Llama-3.1-Nemotron-Nano-8B-v1 | ||
| region: us-chicago-1 | ||
| compartment_id: ocid1.compartment.oc1..example | ||
| auth_profile: DEFAULT | ||
| ``` | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| ## Troubleshooting | ||
| * `401 Unauthorized`: verify the OCI profile, signer, and IAM permissions for Generative AI. | ||
| * `404 Not Found`: confirm the regional endpoint or custom endpoint URL is correct. | ||
| * `Connection errors`: verify OCI networking and that the regional endpoint is reachable. | ||
| * `Tool calling issues`: verify the served model supports tool calling and that the serving stack is configured for it. | ||
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.