Skip to content

refactor: rename to NeMo Relay#141

Merged
rapids-bot[bot] merged 5 commits into
NVIDIA:mainfrom
willkill07:wkk_rename
May 21, 2026
Merged

refactor: rename to NeMo Relay#141
rapids-bot[bot] merged 5 commits into
NVIDIA:mainfrom
willkill07:wkk_rename

Conversation

@willkill07
Copy link
Copy Markdown
Member

@willkill07 willkill07 commented May 21, 2026

Overview

Rename to NeMo Relay

  • I confirm this contribution is my own work, or I have the right to submit it under this project's license.
  • I searched existing issues and open pull requests, and this does not duplicate existing work.

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • Closes NMF-143
  • Closes NMF-144

Summary by CodeRabbit

  • Documentation

    • Updated all documentation and README files to reflect NeMo Relay branding.
    • Updated skill guidance and agent support documentation to target Relay instead of Flow.
  • Refactor

    • Renamed all core packages and crates from nemo-flow / nemo_flow to nemo-relay / nemo_relay.
    • Updated FFI C header and generated symbols to use nemo_relay prefix.
    • Changed configuration file paths and environment variables to use Relay naming.
  • Chores

    • Updated CI/CD workflows to use Relay-specific artifacts and registry publishing.
    • Updated configuration and style guide assets to reference Relay.
    • Updated all test files and test fixtures to use Relay APIs.

Review Change Stack

Signed-off-by: Will Killian <wkillian@nvidia.com>
Signed-off-by: Will Killian <wkillian@nvidia.com>
@willkill07 willkill07 added this to the 0.3 milestone May 21, 2026
@willkill07 willkill07 self-assigned this May 21, 2026
@willkill07 willkill07 requested review from a team as code owners May 21, 2026 21:51
@willkill07 willkill07 added breaking PR introduces a breaking change Improvement improvement to existing functionality labels May 21, 2026
@github-actions github-actions Bot added size:XXL PR is very large lang:go PR changes/introduces Go code lang:js PR changes/introduces Javascript/Typescript code lang:python PR changes/introduces Python code lang:rust PR changes/introduces Rust code labels May 21, 2026
Signed-off-by: Will Killian <wkillian@nvidia.com>
Salonijain27
Salonijain27 previously approved these changes May 21, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

Walkthrough

This PR renames NeMo Flow references to NeMo Relay across repository docs, agent guidance, CI and release configuration, Rust crate/package names, runtime context types, CLI headers and environment variables, observability labels, C FFI exports, and matching tests.

Changes

Repository-wide NeMo Relay rename

Layer / File(s) Summary
Docs, guidance, and repository metadata
.agents/skills/*, AGENTS.md, CONTRIBUTING.md, README.md, RELEASING.md, crates/*/README.md
Documentation and maintainer guidance switch product, package, path, header, and example references from NeMo Flow to NeMo Relay.
CI, release, and repo configuration
.github/workflows/*, .github/actions/*, .github/ISSUE_TEMPLATE/*, .gitlab-ci.yml, .coderabbit.yaml, .pre-commit-config.yaml, .gitignore, codecov.yml, .github/ci-*
CI variables, cache keys, workspaces, publish targets, path filters, issue templates, review routing, and hook/config paths are renamed to Relay equivalents.
Core, adaptive, and CLI Rust surfaces
Cargo.toml, crates/core/..., crates/adaptive/..., crates/cli/...
Workspace and crate names move to nemo-relay*; runtime context types become NemoRelayContextState; CLI config/env/header names and observability namespaces are updated to Relay naming.
FFI ABI and test alignment
crates/ffi/..., crates/*/tests/...
The C FFI package, generated header, status enum, exported symbols, callback typedefs, and accessor/free APIs are renamed to nemo_relay*, with tests updated to the new crate names, headers, env vars, and namespaces.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

  • NVIDIA/NeMo-Flow#89: This rename updates the observability plugin defaults and naming added in that observability work.
  • NVIDIA/NeMo-Flow#129: Both PRs modify adaptive plugin editor schema wiring and related config-editor surfaces.
  • NVIDIA/NeMo-Flow#130: Both PRs touch CLI alignment code, including session, subagent, and request header handling.

Suggested labels

DO NOT MERGE

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

This reverts commit 7b8d9c3.

Signed-off-by: Will Killian <wkillian@nvidia.com>
@coderabbitai coderabbitai Bot added the DO NOT MERGE PR should not be merged; see PR for details label May 21, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (6)
README.md (1)

27-31: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Incomplete rename: "NeMo Flow" reference remains on line 30.

The paragraph references "NeMo Flow sits underneath those choices" but should read "NeMo Relay sits underneath those choices" to match the rest of the rename.

🔧 Proposed fix
 Agent applications rarely live inside one clean abstraction. A production stack
 might combine NeMo Agent Toolkit, LangChain, LangGraph, provider SDKs, custom
-harness code, NeMo Guardrails, tracing systems, and evaluation pipelines. NeMo
-Flow sits underneath those choices as the shared runtime contract for scopes,
+harness code, NeMo Guardrails, tracing systems, and evaluation pipelines. NeMo
+Relay sits underneath those choices as the shared runtime contract for scopes,
 middleware, plugins, lifecycle events, adaptive behavior, and observability.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 27 - 31, Replace the remaining incorrect product name
"NeMo Flow" with the correct "NeMo Relay" in the README paragraph that currently
reads "NeMo Flow sits underneath those choices" so the sentence matches the
project-wide rename; locate the exact phrase "NeMo Flow" in that paragraph and
update it to "NeMo Relay".
crates/adaptive/tests/integration/tool_parallelism_plan_tests.rs (1)

22-34: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Remove duplicate struct fields in test fixtures to restore compilation.

The struct literals assign the same fields multiple times, which Rust rejects at compile time.

Suggested fix
 fn make_hot_cache() -> Arc<RwLock<HotCache>> {
     Arc::new(RwLock::new(HotCache {
         plan: None,
         trie: None,
         agent_hints_default: None,
         acg_profiles: std::collections::HashMap::new(),
         acg_profile_observation_counts: std::collections::HashMap::new(),
         acg_stability: None,
         acg_observation_count: 0,
-        acg_profiles: std::collections::HashMap::new(),
-        acg_profile_observation_counts: std::collections::HashMap::new(),
-        acg_stability: None,
-        acg_observation_count: 0,
     }))
 }
@@
     CallRecord {
         kind: CallKind::Tool,
         name: name.to_string(),
         started_at: base + Duration::milliseconds(start_offset_ms),
         ended_at: Some(base + Duration::milliseconds(end_offset_ms)),
         metadata_snapshot: None,
         output_tokens: None,
         prompt_tokens: None,
         total_tokens: None,
         model_name: None,
         tool_call_count: None,
-    annotated_request: None,
-    annotated_response: None,
         annotated_request: None,
         annotated_response: None,
-        annotated_request: None,
-        annotated_response: None,
     }
 }

Also applies to: 54-59

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/adaptive/tests/integration/tool_parallelism_plan_tests.rs` around
lines 22 - 34, The HotCache test fixture initializes duplicate fields
(acg_profiles, acg_profile_observation_counts, acg_stability,
acg_observation_count) which causes a compile error; edit the
Arc::new(RwLock::new(HotCache { ... })) literals (both occurrences around the
shown block and the other instance at lines ~54-59) to remove the repeated
entries so each struct field (plan, trie, agent_hints_default, acg_profiles,
acg_profile_observation_counts, acg_stability, acg_observation_count) appears
exactly once.
crates/ffi/src/api/llm_registry.rs (1)

17-18: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Correct the sanitize guardrail behavior in these docs.

These comments currently say sanitize guardrails modify the real request/response path. In this runtime they only sanitize the emitted observability payload; request and execution intercepts are the hooks that mutate actual provider I/O. Please reword both descriptions to avoid sending FFI consumers to the wrong API.

Based on learnings: Guardrails either block execution or sanitize emitted observability payloads. Sanitize guardrails do not rewrite the real callback arguments or return value.

Also applies to: 68-69

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/ffi/src/api/llm_registry.rs` around lines 17 - 18, Update the doc
comments for the sanitize guardrail registrations to state that sanitize
guardrails only modify the emitted observability payload and do not mutate the
actual provider I/O or callback arguments/return values; explicitly mention that
request and execution intercepts are the hooks that can modify the real LLM
request/response. Edit the comment blocks around the LLM sanitization
registration functions in llm_registry.rs (the lines describing "Register an LLM
request sanitization guardrail" and the related block at lines ~68-69) to
replace any wording that implies the guardrail rewrites real requests/responses
with language that it only alters telemetry/observability data or blocks
execution.
crates/ffi/src/api/llm.rs (1)

590-593: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Set the last error on the null-pointer path.

This branch returns -1 after clear_last_error(), so callers get no detail from nemo_relay_last_error() even though the API docs tell them to read it on error.

🐛 Suggested fix
     clear_last_error();
     if stream.is_null() || out_chunk.is_null() {
+        set_last_error("stream or out_chunk pointer is null");
         return -1;
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/ffi/src/api/llm.rs` around lines 590 - 593, The null-pointer branch
currently clears the last error and returns -1, leaving callers with no
diagnostic via nemo_relay_last_error(); change the branch that checks
stream.is_null() || out_chunk.is_null() to set a descriptive last error (e.g.,
via set_last_error or the crate's equivalent) before returning -1 instead of
only calling clear_last_error(); ensure you reference and use the existing
clear_last_error and nemo_relay_last_error APIs consistently (clear_last_error
remains for success paths), and update the branch around the stream/out_chunk
null check so it stores something like "null pointer: stream or out_chunk" for
callers to read.
crates/ffi/src/types/mod.rs (2)

516-537: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Don't silently coerce malformed request JSON.

The doc says invalid input returns null, but this implementation normalizes bad headers_json to {} and bad content_json to null. That makes malformed input indistinguishable from an intentional empty request and pushes the failure much later in the pipeline. Either fail fast here or relax the documented contract.

Proposed fix
 pub unsafe extern "C" fn nemo_relay_llm_request_new(
     headers_json: *const c_char,
     content_json: *const c_char,
 ) -> *mut FfiLLMRequest {
-    let headers = match crate::convert::c_str_to_json(headers_json) {
-        Some(Json::Object(m)) => m,
-        _ => serde_json::Map::new(),
-    };
-    let content = crate::convert::c_str_to_json(content_json).unwrap_or(Json::Null);
+    let headers = if headers_json.is_null() {
+        serde_json::Map::new()
+    } else {
+        match crate::convert::c_str_to_json(headers_json) {
+            Some(Json::Object(m)) => m,
+            Some(_) => {
+                set_last_error("headers_json must be a JSON object");
+                return std::ptr::null_mut();
+            }
+            None => return std::ptr::null_mut(),
+        }
+    };
+    let content = match crate::convert::c_str_to_json(content_json) {
+        Some(v) => v,
+        None => return std::ptr::null_mut(),
+    };
 
     Box::into_raw(Box::new(FfiLLMRequest(LlmRequest { headers, content })))
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/ffi/src/types/mod.rs` around lines 516 - 537, The function
nemo_relay_llm_request_new currently coerces malformed headers/content into
defaults; change it to fail-fast and return null on invalid JSON to match the
documented contract: call crate::convert::c_str_to_json for headers_json and
require Some(Json::Object(_)) (otherwise return std::ptr::null_mut()), and call
c_str_to_json for content_json and require Some(valid Json) (otherwise return
std::ptr::null_mut()); only when both parse checks succeed construct and return
Box::into_raw(Box::new(FfiLLMRequest(LlmRequest { headers, content }))). Ensure
you still treat null pointers as invalid input per the safety contract.

723-733: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Restore nemo_relay_event_attributes semantics (it must not always return 0).

crates/ffi/src/types/mod.rs currently returns 0 for every non-null FfiEvent, even when the event has attributes; this breaks numeric consumers like the Go wrapper (go/nemo_relay/types.goeventBase.Attributes()), which would otherwise lose parallel/relocatable/remote/stateful/streaming signal. Implement the numeric mapping from the underlying core attribute strings (and keep 0 for mark events where core returns no attributes), and add non-empty assertions in the FFI unit tests plus a Go test covering eventBase.Attributes() for at least ScopeAttrParallel, ScopeAttrRelocatable, ToolAttrRemote, LLMAttrStateful, and LLMAttrStreaming.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/ffi/src/types/mod.rs` around lines 723 - 733,
nemo_relay_event_attributes currently returns 0 for every non-null FfiEvent;
update it to read the underlying core event's attribute strings and map them to
the numeric bitfield flags instead of always returning 0. Locate
nemo_relay_event_attributes and the FfiEvent accessor(s), iterate the core
attribute list (handling the "no attributes" case by returning 0 for mark
events), and set bits for ScopeAttrParallel, ScopeAttrRelocatable,
ToolAttrRemote, LLMAttrStateful, LLMAttrStreaming (and any other defined flags)
according to the core strings; then add FFI unit tests asserting non-zero for
events with those attributes and add a Go test exercising eventBase.Attributes()
to verify each of those flags is observed. Ensure the mapping uses the exact
attribute string constants from the core and that null/empty attribute cases
still return 0.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agents/skills/prepare-code-freeze/SKILL.md:
- Line 21: Replace the incorrect GitHub repo reference "NVIDIA/NeMo-Relay" with
the canonical "NVIDIA/NeMo-Flow" in the SKILL.md text (look for the string
"NVIDIA/NeMo-Relay" in .agents/skills/prepare-code-freeze/SKILL.md and update
it), ensuring the surrounding sentence about the `origin` remote remains
unchanged.

In @.gitlab-ci.yml:
- Around line 24-25: The CI env var NEMO_RELAY_CI_GITHUB_REPOSITORY is pointing
to the wrong repository ("NVIDIA/NeMo-Relay") which causes GitHub CLI calls (gh
api, gh run list/watch/download) to target the incorrect repo; update the value
of NEMO_RELAY_CI_GITHUB_REPOSITORY to the correct repo name for this PR (e.g.,
"NVIDIA/NeMo-Flow") and verify NEMO_RELAY_CI_GITHUB_WORKFLOW_FILE still points
to the correct workflow file; adjust any downstream references that consume
NEMO_RELAY_CI_GITHUB_REPOSITORY to ensure artifact collection commands use the
corrected variable.

In `@Cargo.toml`:
- Line 22: The repository URL in Cargo.toml's repository field must match the
actual hosted GitHub repo; verify and update the repository =
"https://github.com/NVIDIA/NeMo-Relay" entry to the correct canonical URL (e.g.,
"https://github.com/NVIDIA/NeMo-Flow" if that is the actual repo) so published
crate metadata and docs links are accurate; search for the repository key in
Cargo.toml and replace the URL wherever the old name persists to keep manifests
and public-facing references consistent.

In `@CONTRIBUTING.md`:
- Line 45: Update the hardcoded repository directory in the setup command:
replace the literal "cd NeMo-Relay" with a neutral placeholder such as "cd
<repo-dir>" (or the actual repository directory name) so the
clone-and-change-directory step works regardless of the cloned folder name;
locate the occurrence of the exact string "cd NeMo-Relay" in the CONTRIBUTING.md
and update it accordingly.

In `@crates/adaptive/src/intercepts.rs`:
- Line 25: Update all references to the old header name to the new constant
AGENT_HINTS_HEADER_KEY which now equals "x-nemo-relay-adaptive-agent-hints":
search for usages of the previous header string or the constant (old name
`x-nemo-flow-adaptive-agent-hints`) and replace them to use
AGENT_HINTS_HEADER_KEY so both producers and consumers (parsers, tests, client
calls) send and expect the new header; ensure unit/integration tests and any
external docs or mocks are updated to the new header name as well.

In `@crates/adaptive/src/runtime/backend.rs`:
- Line 29: The Redis key prefix default was unintentionally changed where the
backend reads key_prefix (the .unwrap_or(...) call in backend.rs) from
"nemo_flow:" to "nemo_relay:", which will orphan existing data; fix by reverting
the default in that unwrap_or back to "nemo_flow:" (or make the default respect
an explicit config value if provided), and add migration support: document the
change in the config/docs and add a small migration helper function (e.g.,
rename_redis_keys(old_prefix, new_prefix)) alongside backend code to scan and
rename keys in Redis so operators can move data from "nemo_flow:" to
"nemo_relay:" if they opt in. Ensure references to the config field key_prefix
remain unchanged and log a deprecation/migration note when the old/new default
is detected.

In `@crates/cli/README.md`:
- Line 135: Replace the bare URL on the README line that currently reads "NeMo
Relay Documentation: https://nvidia.github.io/NeMo-Relay/" with a descriptive
Markdown link using anchor text (e.g. change to something like "NeMo Relay
Documentation" as the link text) so the line becomes a descriptive hyperlink;
locate the string "NeMo Relay Documentation:" in the README.md and substitute
the raw URL with the Markdown link format [NeMo Relay
Documentation](https://nvidia.github.io/NeMo-Relay/).

In `@crates/cli/src/config.rs`:
- Around line 314-318: The header reads for session metadata, plugin config,
profile, and gateway_mode (using header_json/header_string and fields metadata,
plugin_config, profile, gateway_mode) currently only check x-nemo-relay-*
headers; update each call to fall back to the legacy x-nemo-flow-* alias when
the relay header is missing (e.g., header_json(headers,
"x-nemo-relay-session-metadata").or_else(|| header_json(headers,
"x-nemo-flow-session-metadata").or_else(|| self.metadata.clone())) and similarly
for "plugin-config", "config-profile"/"profile", and "gateway-mode") so existing
clients sending x-nemo-flow-* keep working during migration.

In `@crates/core/README.md`:
- Line 116: Replace the raw URL text "NeMo Relay Documentation:
https://nvidia.github.io/NeMo-Relay" in the README.md content with a descriptive
Markdown link label (e.g., "NeMo Relay documentation") that points to the same
URL; update the line in the README where this string appears so it uses the
[label](URL) Markdown form to provide descriptive link text instead of the raw
URL.
- Around line 6-18: Move the top-level heading "# NeMo Relay" above the badge
block to satisfy markdownlint MD041; edit the README so the line containing "#
NeMo Relay" appears before the series of badge image links (the badge lines
shown in the diff) and keep the badges immediately after that heading.

In `@crates/core/src/shared_runtime.rs`:
- Around line 24-27: The runtime now only defines OWNER_TOKEN_ENV
("NEMO_RELAY_RUNTIME_OWNER") which breaks mixed old/new env setups; update the
runtime to preserve legacy aliases by reading both the new OWNER_TOKEN_ENV and
the old env var (the previous name) and treating them as equivalent when
enforcing the single-runtime guard. Locate code that reads OWNER_TOKEN_ENV
(reference OWNER_TOKEN_ENV and BINDING_KIND_ENV) and implement a fallback/merge
so the owner token is obtained from the new var first, then the legacy var if
unset, and use that canonical token for all comparisons/enforcement to prevent
bypassing the guard.

In `@crates/ffi/src/api/mod.rs`:
- Around line 118-135: Both nemo_relay_tool_request_intercepts and
nemo_relay_llm_request_intercepts currently dereference the out pointer without
validating it, which can cause UB; add a null-check for out near the start of
each function (before any writes) and return NemoRelayStatus::NullPointer if
out.is_null(), mirroring the pattern used elsewhere in this file
(clear_last_error, validate input c-strings/JSON, then check out). Ensure you
perform the check before calling json_to_c_string or writing to *out so the
function never dereferences a null pointer.

In `@crates/ffi/src/callable.rs`:
- Around line 51-54: The callbacks NemoRelayToolSanitizeCb, NemoRelayToolExecCb,
NemoRelayJsonCb and NemoRelayFinalizerCb currently document that returned *mut
c_char is malloc-allocated but the wrappers free results using
nemo_relay_string_free_internal (which uses CString::from_raw) — this is UB;
pick one consistent ownership model and implement it across the boundary: either
change the callback contract/docs to require Rust-allocated strings (use
CString::into_raw on the caller side) and keep nemo_relay_string_free_internal
(and update wrappers that call it) or keep the malloc contract and change the
free path to call the C free (or use a provided free callback) instead of
CString::from_raw; update all places that free callback returns (the wrappers
around NemoRelayToolSanitizeCb, NemoRelayToolExecCb, NemoRelayJsonCb,
NemoRelayFinalizerCb and any calls to nemo_relay_string_free_internal) and the
documentation to match the chosen model so that allocation and deallocation are
symmetric and UB is eliminated.

In `@crates/ffi/src/lib.rs`:
- Around line 24-26: The crate-level doc comment overgeneralizes the FFI
contract; change the sentence that currently asserts "Every `extern \"C\"`
function returns an [`error::NemoRelayStatus`]" to explicitly state that only
the FFI entrypoints which return `error::NemoRelayStatus` follow that convention
(and that other `extern \"C\"` functions may return pointers or void and do not
set thread-local error). Mention the specific symbols `error::NemoRelayStatus`
and `error::nemo_relay_last_error` and keep the guidance scoped to
status-returning entrypoints so consumers won't assume all `extern \"C\"`
exports use the same error-handling contract.

---

Outside diff comments:
In `@crates/adaptive/tests/integration/tool_parallelism_plan_tests.rs`:
- Around line 22-34: The HotCache test fixture initializes duplicate fields
(acg_profiles, acg_profile_observation_counts, acg_stability,
acg_observation_count) which causes a compile error; edit the
Arc::new(RwLock::new(HotCache { ... })) literals (both occurrences around the
shown block and the other instance at lines ~54-59) to remove the repeated
entries so each struct field (plan, trie, agent_hints_default, acg_profiles,
acg_profile_observation_counts, acg_stability, acg_observation_count) appears
exactly once.

In `@crates/ffi/src/api/llm_registry.rs`:
- Around line 17-18: Update the doc comments for the sanitize guardrail
registrations to state that sanitize guardrails only modify the emitted
observability payload and do not mutate the actual provider I/O or callback
arguments/return values; explicitly mention that request and execution
intercepts are the hooks that can modify the real LLM request/response. Edit the
comment blocks around the LLM sanitization registration functions in
llm_registry.rs (the lines describing "Register an LLM request sanitization
guardrail" and the related block at lines ~68-69) to replace any wording that
implies the guardrail rewrites real requests/responses with language that it
only alters telemetry/observability data or blocks execution.

In `@crates/ffi/src/api/llm.rs`:
- Around line 590-593: The null-pointer branch currently clears the last error
and returns -1, leaving callers with no diagnostic via nemo_relay_last_error();
change the branch that checks stream.is_null() || out_chunk.is_null() to set a
descriptive last error (e.g., via set_last_error or the crate's equivalent)
before returning -1 instead of only calling clear_last_error(); ensure you
reference and use the existing clear_last_error and nemo_relay_last_error APIs
consistently (clear_last_error remains for success paths), and update the branch
around the stream/out_chunk null check so it stores something like "null
pointer: stream or out_chunk" for callers to read.

In `@crates/ffi/src/types/mod.rs`:
- Around line 516-537: The function nemo_relay_llm_request_new currently coerces
malformed headers/content into defaults; change it to fail-fast and return null
on invalid JSON to match the documented contract: call
crate::convert::c_str_to_json for headers_json and require Some(Json::Object(_))
(otherwise return std::ptr::null_mut()), and call c_str_to_json for content_json
and require Some(valid Json) (otherwise return std::ptr::null_mut()); only when
both parse checks succeed construct and return
Box::into_raw(Box::new(FfiLLMRequest(LlmRequest { headers, content }))). Ensure
you still treat null pointers as invalid input per the safety contract.
- Around line 723-733: nemo_relay_event_attributes currently returns 0 for every
non-null FfiEvent; update it to read the underlying core event's attribute
strings and map them to the numeric bitfield flags instead of always returning
0. Locate nemo_relay_event_attributes and the FfiEvent accessor(s), iterate the
core attribute list (handling the "no attributes" case by returning 0 for mark
events), and set bits for ScopeAttrParallel, ScopeAttrRelocatable,
ToolAttrRemote, LLMAttrStateful, LLMAttrStreaming (and any other defined flags)
according to the core strings; then add FFI unit tests asserting non-zero for
events with those attributes and add a Go test exercising eventBase.Attributes()
to verify each of those flags is observed. Ensure the mapping uses the exact
attribute string constants from the core and that null/empty attribute cases
still return 0.

In `@README.md`:
- Around line 27-31: Replace the remaining incorrect product name "NeMo Flow"
with the correct "NeMo Relay" in the README paragraph that currently reads "NeMo
Flow sits underneath those choices" so the sentence matches the project-wide
rename; locate the exact phrase "NeMo Flow" in that paragraph and update it to
"NeMo Relay".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: f0f5afc3-e78d-4b4c-947a-8b93bde68f27

📥 Commits

Reviewing files that changed from the base of the PR and between 7b8d9c3 and e2ca6e5.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (299)
  • .agents/skills/README.md
  • .agents/skills/add-binding-feature/SKILL.md
  • .agents/skills/add-integration/SKILL.md
  • .agents/skills/add-middleware/SKILL.md
  • .agents/skills/contribute-api/SKILL.md
  • .agents/skills/contribute-docs/SKILL.md
  • .agents/skills/contribute-integration/SKILL.md
  • .agents/skills/maintain-ci/SKILL.md
  • .agents/skills/maintain-integration-patches/SKILL.md
  • .agents/skills/maintain-observability/SKILL.md
  • .agents/skills/maintain-optimizer/SKILL.md
  • .agents/skills/maintain-packaging/SKILL.md
  • .agents/skills/prepare-code-freeze/SKILL.md
  • .agents/skills/prepare-pr/SKILL.md
  • .agents/skills/rename-surfaces/SKILL.md
  • .agents/skills/review-doc-style/SKILL.md
  • .agents/skills/review-doc-style/assets/nvidia-style-guide.md
  • .agents/skills/review-doc-style/assets/nvidia-style-technical-docs.md
  • .agents/skills/small-fix/SKILL.md
  • .agents/skills/test-ffi-surface/SKILL.md
  • .agents/skills/test-go-binding/SKILL.md
  • .agents/skills/test-node-binding/SKILL.md
  • .agents/skills/test-python-binding/SKILL.md
  • .agents/skills/test-rust-core/SKILL.md
  • .agents/skills/test-wasm-binding/SKILL.md
  • .agents/skills/update-project-version/SKILL.md
  • .agents/skills/validate-change/SKILL.md
  • .coderabbit.yaml
  • .github/ISSUE_TEMPLATE/01-bug.yml
  • .github/ISSUE_TEMPLATE/02-enhancement.yml
  • .github/actions/load-ci-tool-versions/action.yml
  • .github/ci-path-filters.yml
  • .github/ci-tool-versions.env
  • .github/workflows/ci.yaml
  • .github/workflows/ci_check.yml
  • .github/workflows/ci_docs.yml
  • .github/workflows/ci_go.yml
  • .github/workflows/ci_node.yml
  • .github/workflows/ci_python.yml
  • .github/workflows/ci_rust.yml
  • .github/workflows/ci_wasm.yml
  • .github/workflows/nightly-alpha-tag.yaml
  • .gitignore
  • .gitlab-ci.yml
  • .pre-commit-config.yaml
  • AGENTS.md
  • CONTRIBUTING.md
  • Cargo.toml
  • README.md
  • RELEASING.md
  • codecov.yml
  • crates/adaptive/Cargo.toml
  • crates/adaptive/README.md
  • crates/adaptive/src/acg/anthropic_plugin.rs
  • crates/adaptive/src/acg/debug.rs
  • crates/adaptive/src/acg/ir_builder.rs
  • crates/adaptive/src/acg/openai_plugin.rs
  • crates/adaptive/src/acg/plugin.rs
  • crates/adaptive/src/acg/request_surfaces/anthropic_messages.rs
  • crates/adaptive/src/acg/request_surfaces/mod.rs
  • crates/adaptive/src/acg/request_surfaces/openai_chat.rs
  • crates/adaptive/src/acg/request_surfaces/openai_responses.rs
  • crates/adaptive/src/acg/telemetry.rs
  • crates/adaptive/src/acg/types.rs
  • crates/adaptive/src/acg_component.rs
  • crates/adaptive/src/acg_profile.rs
  • crates/adaptive/src/adaptive_hints_intercept.rs
  • crates/adaptive/src/cache_diagnostics.rs
  • crates/adaptive/src/config.rs
  • crates/adaptive/src/context_helpers.rs
  • crates/adaptive/src/drain.rs
  • crates/adaptive/src/error.rs
  • crates/adaptive/src/intercepts.rs
  • crates/adaptive/src/lib.rs
  • crates/adaptive/src/plugin_component.rs
  • crates/adaptive/src/redis.rs
  • crates/adaptive/src/runtime/backend.rs
  • crates/adaptive/src/runtime/features.rs
  • crates/adaptive/src/runtime/validation.rs
  • crates/adaptive/src/subscriber.rs
  • crates/adaptive/src/types/records.rs
  • crates/adaptive/tests/coverage/error_tests.rs
  • crates/adaptive/tests/coverage/subscriber_tests.rs
  • crates/adaptive/tests/integration/acg_module_surface_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/adaptive/tests/integration/runtime_integration_tests.rs
  • crates/adaptive/tests/integration/tool_parallelism_plan_tests.rs
  • crates/adaptive/tests/unit/acg/anthropic_messages_surface_tests.rs
  • crates/adaptive/tests/unit/acg/anthropic_plugin_tests.rs
  • crates/adaptive/tests/unit/acg/canonicalize_tests.rs
  • crates/adaptive/tests/unit/acg/capability_tests.rs
  • crates/adaptive/tests/unit/acg/debug_tests.rs
  • crates/adaptive/tests/unit/acg/economics_internal_tests.rs
  • crates/adaptive/tests/unit/acg/economics_policy_tests.rs
  • crates/adaptive/tests/unit/acg/error_tests.rs
  • crates/adaptive/tests/unit/acg/ir_builder_tests.rs
  • crates/adaptive/tests/unit/acg/mod.rs
  • crates/adaptive/tests/unit/acg/multi_breakpoint_tests.rs
  • crates/adaptive/tests/unit/acg/openai_plugin_tests.rs
  • crates/adaptive/tests/unit/acg/openai_responses_surface_tests.rs
  • crates/adaptive/tests/unit/acg/passthrough_tests.rs
  • crates/adaptive/tests/unit/acg/plugin_registry_tests.rs
  • crates/adaptive/tests/unit/acg/plugin_tests.rs
  • crates/adaptive/tests/unit/acg/profile_tests.rs
  • crates/adaptive/tests/unit/acg/prompt_ir_tests.rs
  • crates/adaptive/tests/unit/acg/request_surface_tests.rs
  • crates/adaptive/tests/unit/acg/retention_tests.rs
  • crates/adaptive/tests/unit/acg/stability_internal_tests.rs
  • crates/adaptive/tests/unit/acg/telemetry_tests.rs
  • crates/adaptive/tests/unit/acg/translation_tests.rs
  • crates/adaptive/tests/unit/acg/types_tests.rs
  • crates/adaptive/tests/unit/acg/variable_extractor_tests.rs
  • crates/adaptive/tests/unit/acg_component_tests.rs
  • crates/adaptive/tests/unit/acg_learner_tests.rs
  • crates/adaptive/tests/unit/acg_profile_tests.rs
  • crates/adaptive/tests/unit/adaptive_hints_intercept_tests.rs
  • crates/adaptive/tests/unit/cache_diagnostics_tests.rs
  • crates/adaptive/tests/unit/config_tests.rs
  • crates/adaptive/tests/unit/context_helpers_tests.rs
  • crates/adaptive/tests/unit/drain_tests.rs
  • crates/adaptive/tests/unit/intercepts_tests.rs
  • crates/adaptive/tests/unit/learner_tests.rs
  • crates/adaptive/tests/unit/plugin_component_tests.rs
  • crates/adaptive/tests/unit/redis_tests.rs
  • crates/adaptive/tests/unit/runtime_features_tests.rs
  • crates/adaptive/tests/unit/runtime_tests.rs
  • crates/adaptive/tests/unit/storage_memory_internal_tests.rs
  • crates/adaptive/tests/unit/storage_tests.rs
  • crates/adaptive/tests/unit/tool_parallelism_learner_tests.rs
  • crates/adaptive/tests/unit/trie/accumulator_tests.rs
  • crates/adaptive/tests/unit/trie/builder_tests.rs
  • crates/adaptive/tests/unit/trie/data_models_tests.rs
  • crates/adaptive/tests/unit/trie/lookup_tests.rs
  • crates/adaptive/tests/unit/trie/serialization_tests.rs
  • crates/adaptive/tests/unit/types_tests.rs
  • crates/cli/Cargo.toml
  • crates/cli/README.md
  • crates/cli/src/adapters/hermes.rs
  • crates/cli/src/adapters/mod.rs
  • crates/cli/src/alignment/claude_code.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/src/banner.rs
  • crates/cli/src/completions_install.rs
  • crates/cli/src/config.rs
  • crates/cli/src/doctor.rs
  • crates/cli/src/error.rs
  • crates/cli/src/gateway.rs
  • crates/cli/src/installer.rs
  • crates/cli/src/launcher.rs
  • crates/cli/src/main.rs
  • crates/cli/src/plugins.rs
  • crates/cli/src/plugins/config_io.rs
  • crates/cli/src/plugins/editor_model.rs
  • crates/cli/src/server.rs
  • crates/cli/src/session.rs
  • crates/cli/src/setup.rs
  • crates/cli/src/setup/model.rs
  • crates/cli/tests/cli_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/cli/tests/coverage/alignment_tests.rs
  • crates/cli/tests/coverage/completions_install_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/tests/coverage/gateway_tests.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/plugins_tests.rs
  • crates/cli/tests/coverage/server_tests.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/cli/tests/coverage/setup_tests.rs
  • crates/core/Cargo.toml
  • crates/core/README.md
  • crates/core/src/api/llm.rs
  • crates/core/src/api/mod.rs
  • crates/core/src/api/runtime.rs
  • crates/core/src/api/runtime/global.rs
  • crates/core/src/api/runtime/state.rs
  • crates/core/src/api/scope.rs
  • crates/core/src/api/tool.rs
  • crates/core/src/codec/traits.rs
  • crates/core/src/error.rs
  • crates/core/src/json.rs
  • crates/core/src/lib.rs
  • crates/core/src/observability/atif.rs
  • crates/core/src/observability/atof.rs
  • crates/core/src/observability/mod.rs
  • crates/core/src/observability/openinference.rs
  • crates/core/src/observability/otel.rs
  • crates/core/src/observability/plugin_component.rs
  • crates/core/src/plugin.rs
  • crates/core/src/plugins/mod.rs
  • crates/core/src/plugins/nemo_guardrails/mod.rs
  • crates/core/src/plugins/nemo_guardrails/plugin_component.rs
  • crates/core/src/registry.rs
  • crates/core/src/shared_runtime.rs
  • crates/core/src/stream.rs
  • crates/core/tests/coverage/error_tests.rs
  • crates/core/tests/coverage/shared_runtime_tests.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/tests/integration/codec_tests.rs
  • crates/core/tests/integration/context_isolation_tests.rs
  • crates/core/tests/integration/middleware_tests.rs
  • crates/core/tests/integration/pipeline_tests.rs
  • crates/core/tests/integration/scope_local_tests.rs
  • crates/core/tests/integration/stream_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/core/tests/unit/codec/anthropic_tests.rs
  • crates/core/tests/unit/codec/openai_chat_tests.rs
  • crates/core/tests/unit/codec/openai_responses_tests.rs
  • crates/core/tests/unit/codec/request_tests.rs
  • crates/core/tests/unit/codec/response_tests.rs
  • crates/core/tests/unit/codec/streaming_tests.rs
  • crates/core/tests/unit/context_tests.rs
  • crates/core/tests/unit/json_tests.rs
  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/core/tests/unit/observability/openinference_tests.rs
  • crates/core/tests/unit/observability/otel_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/core/tests/unit/plugin_tests.rs
  • crates/core/tests/unit/plugins/nemo_guardrails/plugin_component_tests.rs
  • crates/core/tests/unit/registry_tests.rs
  • crates/core/tests/unit/shared_tests.rs
  • crates/core/tests/unit/stream_tests.rs
  • crates/core/tests/unit/types_tests.rs
  • crates/ffi/Cargo.toml
  • crates/ffi/README.md
  • crates/ffi/build.rs
  • crates/ffi/cbindgen.toml
  • crates/ffi/nemo_relay.h
  • crates/ffi/src/api/llm.rs
  • crates/ffi/src/api/llm_registry.rs
  • crates/ffi/src/api/mod.rs
  • crates/ffi/src/api/observability.rs
  • crates/ffi/src/api/plugin.rs
  • crates/ffi/src/api/scope.rs
  • crates/ffi/src/api/scope_registry.rs
  • crates/ffi/src/api/scope_stack.rs
  • crates/ffi/src/api/tool_lifecycle.rs
  • crates/ffi/src/api/tool_registry.rs
  • crates/ffi/src/callable.rs
  • crates/ffi/src/convert.rs
  • crates/ffi/src/error.rs
  • crates/ffi/src/lib.rs
  • crates/ffi/src/types/mod.rs
  • crates/ffi/tests/coverage/convert_tests.rs
  • crates/ffi/tests/coverage/error_tests.rs
  • crates/ffi/tests/integration/api/coverage_sweeps_tests.rs
  • crates/ffi/tests/integration/api_tests.rs
  • crates/ffi/tests/integration/callable_extra_tests.rs
  • crates/ffi/tests/integration/main.rs
  • crates/ffi/tests/unit/api/core_tests.rs
  • crates/ffi/tests/unit/api/coverage_sweeps_tests.rs
  • crates/ffi/tests/unit/api/execution_tests.rs
  • crates/ffi/tests/unit/api/plugin_tests.rs
  • crates/ffi/tests/unit/api/registry_tests.rs
  • crates/ffi/tests/unit/api_tests.rs
  • crates/ffi/tests/unit/callable_private_tests.rs
  • crates/ffi/tests/unit/callable_tests.rs
  • crates/ffi/tests/unit/types_tests.rs
  • crates/node/Cargo.toml
  • crates/node/README.md
  • crates/node/adaptive.d.ts
  • crates/node/adaptive.js
  • crates/node/observability.js
  • crates/node/package.json
  • crates/node/src/api/mod.rs
  • crates/node/src/callable.rs
  • crates/node/src/convert.rs
  • crates/node/src/lib.rs
  • crates/node/src/promise_call.rs
  • crates/node/src/stream.rs
  • crates/node/src/types/mod.rs
  • crates/node/tests/adaptive_tests.mjs
  • crates/node/tests/atof_tests.mjs
  • crates/node/tests/index_loader_tests.mjs
  • crates/node/tests/llm_tests.mjs
  • crates/node/tests/observability_plugin_tests.mjs
  • crates/node/tests/scope_local_tests.mjs
  • crates/node/tests/typed_tests.mjs
  • crates/node/typed.d.ts
  • crates/node/typed.js
  • crates/python/Cargo.toml
  • crates/python/README.md
  • crates/python/src/lib.rs
  • crates/python/src/py_adaptive.rs
  • crates/python/src/py_api/mod.rs
  • crates/python/src/py_callable.rs
  • crates/python/src/py_plugin.rs
  • crates/python/src/py_storage.rs
  • crates/python/src/py_types/codecs.rs
  • crates/python/src/py_types/events.rs
  • crates/python/src/py_types/mod.rs
  • crates/python/src/py_types/observability.rs
  • crates/python/src/test_support.rs
  • crates/python/tests/coverage/coverage_tests.rs
  • crates/python/tests/coverage/py_adaptive_coverage_tests.rs
  • crates/python/tests/coverage/py_api_coverage_tests.rs
  • crates/python/tests/coverage/py_callable_coverage_tests.rs
  • crates/python/tests/coverage/py_plugin_coverage_tests.rs

Comment thread .agents/skills/prepare-code-freeze/SKILL.md
Comment thread .gitlab-ci.yml
Comment thread Cargo.toml
Comment thread CONTRIBUTING.md
Comment thread crates/adaptive/src/intercepts.rs
Comment thread crates/core/README.md
Comment thread crates/core/src/shared_runtime.rs
Comment thread crates/ffi/src/api/mod.rs
Comment thread crates/ffi/src/callable.rs
Comment thread crates/ffi/src/lib.rs
@willkill07 willkill07 mentioned this pull request May 21, 2026
2 tasks
@willkill07 willkill07 removed the DO NOT MERGE PR should not be merged; see PR for details label May 21, 2026
@willkill07
Copy link
Copy Markdown
Member Author

/merge

@rapids-bot rapids-bot Bot merged commit 8f096e7 into NVIDIA:main May 21, 2026
166 of 170 checks passed
@mnajafian-nv mnajafian-nv mentioned this pull request May 21, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking PR introduces a breaking change Improvement improvement to existing functionality lang:go PR changes/introduces Go code lang:js PR changes/introduces Javascript/Typescript code lang:python PR changes/introduces Python code lang:rust PR changes/introduces Rust code size:XXL PR is very large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants