Skip to content

refactor: define shared agent-payload and provider-schema extraction strategies#318

Open
yczhang-nv wants to merge 12 commits into
NVIDIA:mainfrom
yczhang-nv:refactor/shared-extraction-strategies
Open

refactor: define shared agent-payload and provider-schema extraction strategies#318
yczhang-nv wants to merge 12 commits into
NVIDIA:mainfrom
yczhang-nv:refactor/shared-extraction-strategies

Conversation

@yczhang-nv

@yczhang-nv yczhang-nv commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Overview

Refactors provider extraction logic so codec surfaces and CLI payload/request extraction are represented as shared strategies instead of provider-specific branching scattered through callers.

  • 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.

Details

  • Adds provider surface descriptors for OpenAI Chat, OpenAI Responses, and
    Anthropic codecs, and routes codec detection/normalization through the shared
    BUILTIN_PROVIDER_SURFACES registry.
  • Separates agent-payload extraction (BuiltinAgentPayloadExtractor) from
    provider-request extraction (BuiltinProviderRequestExtractor); fallbacks
    (synthetic session/tool IDs, unknown_tool) stay at the adapter boundary.
  • Documents the extraction strategy boundaries (provider schema / agent payload
    / exporter projection) in the codec concepts docs.

Behavior changes (intentional, not pure refactor):

  • Adds normalize_request_with_hint and wires the event name as a provider hint
    so system-less Anthropic ({"messages": ...}) requests normalize via the
    Anthropic codec on the fallback path. Hinting is restricted to the exact
    anthropic / anthropic.messages route names.

  • Stops promoting cwd, transcript_path, project_dir, and user_email into
    shared event metadata (high-cardinality/PII); they remain on the raw payload.

  • Adds regression coverage for registry ordering, hinted decode, the adapter
    fallback boundary, agent-field extraction, metadata-vs-payload relocation, and
    event-level hint normalization.

Validation run:

  • cargo fmt --all
  • cargo test -p nemo-relay codec::resolve::tests
  • cargo test -p nemo-relay-cli adapters::tests
  • cargo test -p nemo-relay-cli alignment::tests
  • just test-rust
  • just docs

Where should the reviewer start?

Start with crates/core/src/codec/resolve.rs for the provider surface registry, then review crates/cli/src/adapters/mod.rs for the shared agent payload extractor.

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

  • Relates to: none

Summary by CodeRabbit

  • New Features

    • Descriptor-driven provider request/response recognition with priority-based matching and improved shape-based decoding.
    • Event-level LLM request normalization now uses the event name as a provider hint.
    • Centralized extraction for session/event info, LLM hints, and tool-call details across heterogeneous payload formats.
  • Bug Fixes

    • More robust tool-call handling with safe defaults when IDs/names/arguments/results are missing.
    • Refined what gets emitted in event metadata vs. event payload.
  • Documentation

    • Added guidance on extraction strategy boundaries across provider normalization, agent payload extraction, and exporter projection.
  • Tests

    • Updated and added coverage for the new normalization and extraction behaviors.

@yczhang-nv yczhang-nv self-assigned this Jun 26, 2026
@yczhang-nv yczhang-nv requested review from a team and lvojtku as code owners June 26, 2026 22:23
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The PR centralizes provider codec dispatch behind descriptors, passes event names as normalization hints, adds shared extractor traits for agent payloads and request alignment, and expands docs and tests around the new extraction boundaries.

Changes

Descriptor-driven extraction and normalization

Layer / File(s) Summary
Provider surface registry and dispatch
crates/core/src/codec/*, crates/core/src/codec/resolve.rs, crates/core/tests/unit/codec/resolve_tests.rs
resolve.rs now selects request/response codecs from descriptor predicates, per-codec modules export PROVIDER_SURFACE, and tests cover descriptor priority and Anthropic hint-based decoding.
Event-name hint normalization
crates/core/src/api/event.rs, crates/core/src/api/llm.rs, crates/core/src/api/runtime/state.rs, crates/core/tests/unit/types_tests.rs
normalized_llm_request now passes the event name as a provider hint, and the API docs and unit test reflect gateway-managed route names and Anthropic-specific request decoding from that hint.
Shared agent payload extraction
crates/cli/src/adapters/mod.rs, crates/cli/tests/coverage/adapters_tests.rs
AgentPayloadExtractor, ExtractedLlmHint, and ExtractedToolCall centralize session, event, metadata, subagent, hint, and tool-call extraction, with coverage for default and populated payloads plus metadata placement changes.
Provider request extraction
crates/cli/src/alignment/mod.rs
ProviderRequestExtractor centralizes affinity-key normalization and Claude-only gateway turn input construction, and the public helpers delegate to it.
Extraction boundary docs
docs/about-nemo-relay/concepts/codecs.mdx
The concepts page adds sections for provider schema extraction, agent payload extraction, and exporter projection.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • NVIDIA/NeMo-Relay#291: Closely related descriptor-driven provider surface dispatch and normalization changes in crates/core/src/codec/resolve.rs and crates/core/src/api/event.rs.
  • NVIDIA/NeMo-Relay#301: Introduces the same provider-surface registry pattern used by the Anthropic and OpenAI codec modules here.
  • NVIDIA/NeMo-Relay#305: Related to the event-normalization path that now reuses the emitted event name as a provider hint.

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Title check ❌ Error The title follows Conventional Commits, but it exceeds the 72-character limit. Shorten it to 72 characters or fewer, e.g. refactor: share agent and provider extraction strategies.
Docstring Coverage ⚠️ Warning Docstring coverage is 64.58% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description matches the required sections and clearly summarizes scope, validation, review start point, and issue linkage.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added size:L PR is large Improvement improvement to existing functionality lang:rust PR changes/introduces Rust code labels Jun 26, 2026
Signed-off-by: Yuchen Zhang <yuchenz@nvidia.com>
@github-actions

Copy link
Copy Markdown

@yczhang-nv yczhang-nv force-pushed the refactor/shared-extraction-strategies branch from f62642e to 655f4c2 Compare June 26, 2026 22:31

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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 `@crates/cli/src/adapters/mod.rs`:
- Around line 120-132: The normalized metadata builder in the adapter should
stop propagating user_email, since it is currently inserted alongside other
fields and later exported in traces. Update the metadata normalization logic in
the function that iterates over the payload keys to omit user_email entirely, or
only include it behind an explicit redaction/opt-in gate. Keep the existing
handling for cwd, transcript_path, project_dir, model, agent_id, and agent_type
unchanged.

In `@crates/core/src/codec/anthropic.rs`:
- Around line 43-50: The Anthropic request detector in PROVIDER_SURFACE is too
narrow because detect_request only checks for a top-level system field, so raw
Anthropic Messages requests without system get misrouted to OpenAIChat. Update
the AnthropicMessages surface detection to recognize another Anthropic-specific
discriminator or use provider context in
resolve_request_surface/normalize_request, and ensure AnthropicMessagesCodec is
selected for no-system requests. Add a regression test around the Anthropic
detector and surface resolution for the no-system case.
🪄 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: 7cad5b0d-f873-4f2c-89ba-d70d00f2a393

📥 Commits

Reviewing files that changed from the base of the PR and between 4b9a530 and f62642e.

📒 Files selected for processing (8)
  • crates/cli/src/adapters/mod.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
  • docs/about-nemo-relay/concepts/codecs.mdx
📜 Review details
🧰 Additional context used
📓 Path-based instructions (25)
**/*.rs

📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)

Use snake_case naming convention for Rust identifiers (e.g., nemo_relay_tool_call)

**/*.rs: Any Rust change must run just test-rust
Any Rust change must run cargo fmt --all
Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for all FFI work since it is Rust work
Run just test-rust to validate FFI changes
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting on FFI work

When Rust files changed as part of Go work, also run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all when Rust files are changed as part of Node work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files are changed as part of Node work
Run just test-rust when Rust files are changed as part of Node work

**/*.rs: Run cargo fmt --all to format all Rust code
Run cargo clippy --workspace --all-targets -- -D warnings to enforce all clippy lints as errors

**/*.rs: Run cargo fmt --all when Rust files changed as part of WebAssembly work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files changed as part of WebAssembly work

**/*.rs: If any Rust code changed, always run just test-rust
If any Rust code changed, also run cargo fmt --all
If any Rust code changed, also run cargo clippy --workspace --all-targets -- -D warnings
Run Rust formatting with cargo fmt --all
Run Rust linting with cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Use cargo fmt for Rust code formatting
Run cargo clippy -- -D warnings to lint Rust code and treat all warnings as errors
Use Rust snake_case naming convention for Rust identifiers
Include SPDX license header in all Rust source files using double-slash comment syntax
Validate Rust code with uv run pre-commit run --all-files to enforce cargo fmt formatting check, cargo clippy lints, and cargo deny aud...

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/resolve.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/src/adapters/mod.rs
{crates/adaptive/**/*.rs,**/*test*.{rs,py,go,ts,js},**/*adaptive*test*.{rs,py,go,ts,js},docs/plugins/adaptive/**}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Maintain documented and tested validation and report behavior for adaptive surfaces

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
**/{Cargo.toml,**/*.rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Maintain consistency between Rust package names in Cargo.toml and their actual usage across the codebase

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/resolve.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/src/adapters/mod.rs
**/*.{h,hpp,c,cpp,rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Ensure FFI header and library naming follows consistent conventions across platform-specific builds

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/resolve.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/src/adapters/mod.rs
{crates/core,crates/adaptive}/**/*

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changes to crates/core or crates/adaptive must run the full language matrix

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/resolve.rs
**/*.{rs,toml}

📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)

Update Rust crate names and module prefixes during coordinated rename operations

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/resolve.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/src/adapters/mod.rs
crates/core/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)

If the change touched crates/core or shared runtime semantics, also use validate-change for broader validation

crates/core/**/*.rs: Use Json = serde_json::Value in Rust-facing runtime APIs where the existing code expects JSON payloads.
Use Result<T> with FlowError in core runtime paths. Keep errors explicit and binding-appropriate at the wrapper layer.

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/resolve.rs
crates/{core,adaptive}/**

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If crates/core or crates/adaptive changed, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/resolve.rs
**/*.{rs,py,js,ts,tsx,jsx,go,sh,toml,yaml,yml,md}

📄 CodeRabbit inference engine (AGENTS.md)

Keep SPDX headers on source, docs, scripts, and configuration files. The project is Apache-2.0.

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/resolve.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/src/adapters/mod.rs
**/*.{rs,py,go,js,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Follow binding naming conventions: Rust and Python use snake_case, C FFI exports prefixed nemo_relay_, Go uses PascalCase for public APIs, Node.js uses camelCase.

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/resolve.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/src/adapters/mod.rs
crates/**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

crates/**/*.rs: Keep async behavior on the existing tokio-based model. Bindings should preserve callback and future lifetimes rather than blocking or hiding async work unexpectedly.
Use Json = serde_json::Value in Rust-facing runtime APIs for JSON payload handling.

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/resolve.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/src/adapters/mod.rs
**

⚙️ CodeRabbit configuration file

**:

AGENTS.md

This file provides guidance to agents, including Claude Code and OpenAI Codex, when working in this repository.

Project Overview

NeMo Relay is a multi-language agent runtime framework for execution scopes, lifecycle events, middleware, plugins, and observability around tool and LLM calls. The core runtime is Rust. Primary supported bindings are Rust, Python, and Node.js. Go, WebAssembly, and the raw C FFI are experimental and source-first.

The shared runtime model is:

  1. Scope stacks decide where work belongs and which scope-local behavior is visible.
  2. Middleware registries decide what guardrails and intercepts run around managed calls.
  3. Plugins install reusable runtime behavior from configuration.
  4. Events record runtime behavior in ATOF form.
  5. Subscribers and exporters consume events in-process or export them to ATIF, OpenTelemetry, OpenInference, or other backends.

Repository Structure

The repository layout separates the Rust runtime, language bindings, documentation,
integration patches, and agent-facing skills.

crates/
  core/       # Rust core runtime crate, published as nemo-relay
  adaptive/   # Adaptive runtime primitives and plugin components
  python/     # PyO3 native extension for the Python package
  ffi/        # Raw C ABI layer used by downstream bindings such as Go
  node/       # NAPI Node.js binding and JavaScript/TypeScript entry points
  wasm/       # wasm-bindgen WebAssembly binding and JS wrappers
python/
  nemo_relay/  # Python wrapper package: scopes, tools, LLM, middleware, typed helpers, plugins, adaptive helpers
  tests/      # Python tests
go/
  nemo_relay/  # Experimental Go CGo binding and tests
fern/         # Fern documentation site
scripts/      # Stable wrappers and helper scripts; build/test/docs entry points live in justfile
third_party/  # P...

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/openai_responses.rs
  • docs/about-nemo-relay/concepts/codecs.mdx
  • crates/core/src/codec/resolve.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/src/adapters/mod.rs
crates/{core,adaptive}/**/*.rs

⚙️ CodeRabbit configuration file

crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/resolve.rs
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
{docs/**,README.md,CONTRIBUTING.md}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

{docs/**,README.md,CONTRIBUTING.md}: For docs-only changes, run targeted checks only if commands, package names, or examples changed. Use just docs for docs-site builds and just docs-linkcheck when links changed
Run docs site build with just docs

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
{docs/**,README.md,CONTRIBUTING.md,**/*.md}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

Run docs link validation with just docs-linkcheck when links change

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
{docs/**,README.md}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

Verify README and docs entry points still match current package names and paths for large or public-facing changes

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
{docs/**,examples/**,README.md}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

Verify examples still run with documented commands for large or public-facing changes

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
{docs/**,README.md,**/Cargo.toml,**/package.json,**/*.md}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

Ensure renamed public surfaces are reflected consistently in manifests and docs for large or public-facing changes

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
**/*.{md,mdx,py,sh,yaml,yml,toml,json}

📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)

Keep package names, repo references, and build commands current

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
**/*.mdx

📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)

In MDX files, top-of-file comments must use JSX comment delimiters: {/* to open and */} to close. Do not use HTML comments for MDX SPDX headers.

MDX top-of-file SPDX comments must use {/* ... */} delimiters instead of HTML comment delimiters (Must-Fix)

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
**/*.{html,md,mdx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Include SPDX license header in HTML and Markdown files using HTML comment syntax

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
docs/**/*.{md,mdx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Update embedded documentation snippets, patch docs, and binding-support notes if examples or supported bindings changed

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
docs/**

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Run just docs or ./scripts/build-docs.sh html to regenerate ignored Fern API reference pages before validation for documentation site changes

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
{docs/**,README.md,CONTRIBUTING.md,RELEASING.md,SECURITY.md}

⚙️ CodeRabbit configuration file

{docs/**,README.md,CONTRIBUTING.md,RELEASING.md,SECURITY.md}: Review documentation for technical accuracy against the current API, command correctness, and consistency across language bindings.
Flag stale examples, missing SPDX headers where required, and instructions that no longer match CI or pre-commit behavior.

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
🔇 Additional comments (3)
docs/about-nemo-relay/concepts/codecs.mdx (1)

83-131: LGTM!

crates/cli/src/adapters/mod.rs (1)

34-118: LGTM!

Also applies to: 133-321, 335-386

crates/core/src/codec/resolve.rs (1)

27-53: 📐 Maintainability & Code Quality

Add the required core-runtime validation before merge.

This changes crates/core codec dispatch, but the PR validation list still omits cargo clippy --workspace --all-targets -- -D warnings, the full binding test matrix, and validate-change. Please include those runs so the shared runtime contract is exercised outside the Rust-only path.

As per coding guidelines, "If crates/core or crates/adaptive changed, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly" and "If the change touched crates/core or shared runtime semantics, also use validate-change for broader validation."

Also applies to: 92-103

Source: Coding guidelines

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 2

🤖 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 `@crates/cli/src/adapters/mod.rs`:
- Around line 120-132: The normalized metadata builder in the adapter should
stop propagating user_email, since it is currently inserted alongside other
fields and later exported in traces. Update the metadata normalization logic in
the function that iterates over the payload keys to omit user_email entirely, or
only include it behind an explicit redaction/opt-in gate. Keep the existing
handling for cwd, transcript_path, project_dir, model, agent_id, and agent_type
unchanged.

In `@crates/core/src/codec/anthropic.rs`:
- Around line 43-50: The Anthropic request detector in PROVIDER_SURFACE is too
narrow because detect_request only checks for a top-level system field, so raw
Anthropic Messages requests without system get misrouted to OpenAIChat. Update
the AnthropicMessages surface detection to recognize another Anthropic-specific
discriminator or use provider context in
resolve_request_surface/normalize_request, and ensure AnthropicMessagesCodec is
selected for no-system requests. Add a regression test around the Anthropic
detector and surface resolution for the no-system case.
🪄 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: 7cad5b0d-f873-4f2c-89ba-d70d00f2a393

📥 Commits

Reviewing files that changed from the base of the PR and between 4b9a530 and f62642e.

📒 Files selected for processing (8)
  • crates/cli/src/adapters/mod.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
  • docs/about-nemo-relay/concepts/codecs.mdx
📜 Review details
🔇 Additional comments (3)
docs/about-nemo-relay/concepts/codecs.mdx (1)

83-131: LGTM!

crates/cli/src/adapters/mod.rs (1)

34-118: LGTM!

Also applies to: 133-321, 335-386

crates/core/src/codec/resolve.rs (1)

27-53: 📐 Maintainability & Code Quality

Add the required core-runtime validation before merge.

This changes crates/core codec dispatch, but the PR validation list still omits cargo clippy --workspace --all-targets -- -D warnings, the full binding test matrix, and validate-change. Please include those runs so the shared runtime contract is exercised outside the Rust-only path.

As per coding guidelines, "If crates/core or crates/adaptive changed, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly" and "If the change touched crates/core or shared runtime semantics, also use validate-change for broader validation."

Also applies to: 92-103

Source: Coding guidelines

🛑 Comments failed to post (2)
crates/cli/src/adapters/mod.rs (1)

120-132: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -nP '\buser_email\b' --type=rust
rg -nP '\.metadata\b' --type=rust crates/cli/src -C2

Repository: NVIDIA/NeMo-Relay

Length of output: 155


🏁 Script executed:

#!/bin/bash
set -euo pipefail

git ls-files crates/cli/src/adapters/mod.rs crates/cli/src | sed -n '1,120p'
echo '--- outline ---'
ast-grep outline crates/cli/src/adapters/mod.rs --view expanded || true
echo '--- lines 1-260 ---'
sed -n '1,260p' crates/cli/src/adapters/mod.rs | cat -n
echo '--- search metadata consumers in cli ---'
rg -n 'metadata' crates/cli/src -g '*.rs' -C 2 || true
echo '--- search user_email across repo ---'
rg -n 'user_email' -g '*.rs' -g '*.md' -g '*.toml' || true

Repository: NVIDIA/NeMo-Relay

Length of output: 50374


user_email should not be propagated into normalized metadata. It is merged into session/scope metadata and ends up in exported traces; drop it or gate it behind an explicit redaction/opt-in flag.

🤖 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/cli/src/adapters/mod.rs` around lines 120 - 132, The normalized
metadata builder in the adapter should stop propagating user_email, since it is
currently inserted alongside other fields and later exported in traces. Update
the metadata normalization logic in the function that iterates over the payload
keys to omit user_email entirely, or only include it behind an explicit
redaction/opt-in gate. Keep the existing handling for cwd, transcript_path,
project_dir, model, agent_id, and agent_type unchanged.

Source: Coding guidelines

crates/core/src/codec/anthropic.rs (1)

43-50: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== relevant files ==\n'
git ls-files crates/core/src/codec | sed -n '1,120p'
printf '\n== anthropic codec outline ==\n'
ast-grep outline crates/core/src/codec/anthropic.rs --view expanded || true
printf '\n== resolve outline ==\n'
ast-grep outline crates/core/src/codec/resolve.rs --view expanded || true
printf '\n== request surface adapter outline ==\n'
ast-grep outline crates/adaptive/src/acg/request_surfaces/mod.rs --view expanded || true

printf '\n== search detector definitions ==\n'
rg -n "detect_request:|ProviderSurface::AnthropicMessages|OpenAIChat|OpenAIResponses|detect_request_surface|normalize_request" \
  crates/core/src/codec crates/adaptive/src/acg/request_surfaces -n

printf '\n== anthropic codec excerpt ==\n'
sed -n '1,180p' crates/core/src/codec/anthropic.rs

printf '\n== resolve excerpt ==\n'
sed -n '1,220p' crates/core/src/codec/resolve.rs

printf '\n== request surfaces excerpt ==\n'
sed -n '1,260p' crates/adaptive/src/acg/request_surfaces/mod.rs

Repository: NVIDIA/NeMo-Relay

Length of output: 32089


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== resolve tests ==\n'
sed -n '1,260p' crates/core/tests/unit/codec/resolve_tests.rs

printf '\n== anthropic codec tests ==\n'
sed -n '850,980p' crates/core/src/codec/anthropic.rs

printf '\n== anthropic request decode/encode path ==\n'
sed -n '180,620p' crates/core/src/codec/anthropic.rs

printf '\n== adaptive request surface tests ==\n'
sed -n '1,260p' crates/adaptive/src/acg/request_surfaces/mod.rs

Repository: NVIDIA/NeMo-Relay

Length of output: 32368


Anthropic detector needs a discriminator beyond system. Valid Anthropic Messages requests can omit top-level system, but this predicate falls through to OpenAIChat for that shape, so resolve_request_surface() rejects raw Anthropic requests and normalize_request() picks the wrong codec. Add another Anthropic-specific check or route by provider context, and cover the no-system case with a regression test.

🤖 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/core/src/codec/anthropic.rs` around lines 43 - 50, The Anthropic
request detector in PROVIDER_SURFACE is too narrow because detect_request only
checks for a top-level system field, so raw Anthropic Messages requests without
system get misrouted to OpenAIChat. Update the AnthropicMessages surface
detection to recognize another Anthropic-specific discriminator or use provider
context in resolve_request_surface/normalize_request, and ensure
AnthropicMessagesCodec is selected for no-system requests. Add a regression test
around the Anthropic detector and surface resolution for the no-system case.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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 `@crates/cli/src/adapters/mod.rs`:
- Around line 117-127: The metadata normalization in the adapter is promoting
high-cardinality/PII fields into shared event metadata, which should be kept
low-cardinality and stable. Update the normalization logic in the helper around
the header/payload mapping so `cwd`, `transcript_path`, `project_dir`, and
`user_email` are not copied into the shared metadata object; keep them only in
the raw payload or redact/hash them before insertion. Apply the same fix in the
corresponding event normalization block referenced by the same field set so both
locations stay consistent.

In `@crates/core/src/codec/resolve.rs`:
- Around line 114-117: normalize_request currently ignores provider context by
always calling request_descriptor with None, so ambiguous messages-only
Anthropic requests can still resolve to the OpenAI Chat codec through the event
fallback path. Update normalize_request (and the call site in event.rs if
needed) to thread through a provider hint or add a hint-aware normalization
entry point that uses detect_request_surface_with_hint. Add a regression test
covering the Anthropic {"messages": ...} shape to verify it normalizes to the
Anthropic path instead of the OpenAI one.
🪄 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: f61c0bfa-a0a1-4f85-a97b-cef13c07969d

📥 Commits

Reviewing files that changed from the base of the PR and between f62642e and 655f4c2.

📒 Files selected for processing (8)
  • crates/cli/src/adapters/mod.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
  • docs/about-nemo-relay/concepts/codecs.mdx
💤 Files with no reviewable changes (1)
  • docs/about-nemo-relay/concepts/codecs.mdx
📜 Review details
🧰 Additional context used
📓 Path-based instructions (14)
**/*.rs

📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)

Use snake_case naming convention for Rust identifiers (e.g., nemo_relay_tool_call)

**/*.rs: Any Rust change must run just test-rust
Any Rust change must run cargo fmt --all
Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for all FFI work since it is Rust work
Run just test-rust to validate FFI changes
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting on FFI work

When Rust files changed as part of Go work, also run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all when Rust files are changed as part of Node work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files are changed as part of Node work
Run just test-rust when Rust files are changed as part of Node work

**/*.rs: Run cargo fmt --all to format all Rust code
Run cargo clippy --workspace --all-targets -- -D warnings to enforce all clippy lints as errors

**/*.rs: Run cargo fmt --all when Rust files changed as part of WebAssembly work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files changed as part of WebAssembly work

**/*.rs: If any Rust code changed, always run just test-rust
If any Rust code changed, also run cargo fmt --all
If any Rust code changed, also run cargo clippy --workspace --all-targets -- -D warnings
Run Rust formatting with cargo fmt --all
Run Rust linting with cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Use cargo fmt for Rust code formatting
Run cargo clippy -- -D warnings to lint Rust code and treat all warnings as errors
Use Rust snake_case naming convention for Rust identifiers
Include SPDX license header in all Rust source files using double-slash comment syntax
Validate Rust code with uv run pre-commit run --all-files to enforce cargo fmt formatting check, cargo clippy lints, and cargo deny aud...

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/cli/src/adapters/mod.rs
{crates/adaptive/**/*.rs,**/*test*.{rs,py,go,ts,js},**/*adaptive*test*.{rs,py,go,ts,js},docs/plugins/adaptive/**}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Maintain documented and tested validation and report behavior for adaptive surfaces

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
**/{Cargo.toml,**/*.rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Maintain consistency between Rust package names in Cargo.toml and their actual usage across the codebase

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/cli/src/adapters/mod.rs
**/*.{h,hpp,c,cpp,rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Ensure FFI header and library naming follows consistent conventions across platform-specific builds

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/cli/src/adapters/mod.rs
{crates/core,crates/adaptive}/**/*

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changes to crates/core or crates/adaptive must run the full language matrix

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/src/codec/openai_chat.rs
**/*.{rs,toml}

📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)

Update Rust crate names and module prefixes during coordinated rename operations

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/cli/src/adapters/mod.rs
crates/core/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)

If the change touched crates/core or shared runtime semantics, also use validate-change for broader validation

crates/core/**/*.rs: Use Json = serde_json::Value in Rust-facing runtime APIs where the existing code expects JSON payloads.
Use Result<T> with FlowError in core runtime paths. Keep errors explicit and binding-appropriate at the wrapper layer.

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/src/codec/openai_chat.rs
crates/{core,adaptive}/**

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If crates/core or crates/adaptive changed, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/src/codec/openai_chat.rs
**/*.{rs,py,js,ts,tsx,jsx,go,sh,toml,yaml,yml,md}

📄 CodeRabbit inference engine (AGENTS.md)

Keep SPDX headers on source, docs, scripts, and configuration files. The project is Apache-2.0.

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/cli/src/adapters/mod.rs
**/*.{rs,py,go,js,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Follow binding naming conventions: Rust and Python use snake_case, C FFI exports prefixed nemo_relay_, Go uses PascalCase for public APIs, Node.js uses camelCase.

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/cli/src/adapters/mod.rs
crates/**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

crates/**/*.rs: Keep async behavior on the existing tokio-based model. Bindings should preserve callback and future lifetimes rather than blocking or hiding async work unexpectedly.
Use Json = serde_json::Value in Rust-facing runtime APIs for JSON payload handling.

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/cli/src/adapters/mod.rs
**

⚙️ CodeRabbit configuration file

**:

AGENTS.md

This file provides guidance to agents, including Claude Code and OpenAI Codex, when working in this repository.

Project Overview

NeMo Relay is a multi-language agent runtime framework for execution scopes, lifecycle events, middleware, plugins, and observability around tool and LLM calls. The core runtime is Rust. Primary supported bindings are Rust, Python, and Node.js. Go, WebAssembly, and the raw C FFI are experimental and source-first.

The shared runtime model is:

  1. Scope stacks decide where work belongs and which scope-local behavior is visible.
  2. Middleware registries decide what guardrails and intercepts run around managed calls.
  3. Plugins install reusable runtime behavior from configuration.
  4. Events record runtime behavior in ATOF form.
  5. Subscribers and exporters consume events in-process or export them to ATIF, OpenTelemetry, OpenInference, or other backends.

Repository Structure

The repository layout separates the Rust runtime, language bindings, documentation,
integration patches, and agent-facing skills.

crates/
  core/       # Rust core runtime crate, published as nemo-relay
  adaptive/   # Adaptive runtime primitives and plugin components
  python/     # PyO3 native extension for the Python package
  ffi/        # Raw C ABI layer used by downstream bindings such as Go
  node/       # NAPI Node.js binding and JavaScript/TypeScript entry points
  wasm/       # wasm-bindgen WebAssembly binding and JS wrappers
python/
  nemo_relay/  # Python wrapper package: scopes, tools, LLM, middleware, typed helpers, plugins, adaptive helpers
  tests/      # Python tests
go/
  nemo_relay/  # Experimental Go CGo binding and tests
fern/         # Fern documentation site
scripts/      # Stable wrappers and helper scripts; build/test/docs entry points live in justfile
third_party/  # P...

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/src/codec/openai_chat.rs
  • crates/cli/src/adapters/mod.rs
crates/{core,adaptive}/**/*.rs

⚙️ CodeRabbit configuration file

crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/openai_responses.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/src/codec/openai_chat.rs
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
🔇 Additional comments (1)
crates/core/src/codec/resolve.rs (1)

52-56: 📐 Maintainability & Code Quality

Please add the required crates/core validation before merge.

The PR summary lists cargo fmt --all, targeted Rust tests, just test-rust, and just docs, but the repo guidance for crates/core Rust changes also expects cargo clippy --workspace --all-targets -- -D warnings, uv run pre-commit run --all-files, validate-change, and the full binding matrix (just test-python, just test-node, just test-go, just test-wasm). As per coding guidelines, "If crates/core or crates/adaptive changed, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly."

Source: Coding guidelines

Comment thread crates/cli/src/adapters/mod.rs
Comment thread crates/core/src/codec/resolve.rs
Signed-off-by: Yuchen Zhang <yuchenz@nvidia.com>
Signed-off-by: Yuchen Zhang <yuchenz@nvidia.com>
Signed-off-by: Yuchen Zhang <yuchenz@nvidia.com>
Signed-off-by: Yuchen Zhang <yuchenz@nvidia.com>
Signed-off-by: Yuchen Zhang <yuchenz@nvidia.com>
Signed-off-by: Yuchen Zhang <yuchenz@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@crates/cli/src/adapters/mod.rs`:
- Around line 201-204: This is a tracked migration TODO for the free-function
shims in `mod.rs`; make sure the planned shim removal won’t be lost by filing or
linking a follow-up issue. Update the `TODO(extraction)` note near the shim
functions to reference the tracking issue, and keep the callers pointed at
`AgentPayloadExtractor` implementations as the migration progresses.
🪄 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: 251f94b1-8c28-48e3-911c-329a8b0e2383

📥 Commits

Reviewing files that changed from the base of the PR and between 655f4c2 and ad1fbb8.

📒 Files selected for processing (6)
  • crates/cli/src/adapters/mod.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
  • docs/about-nemo-relay/concepts/codecs.mdx
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Check / Run
  • GitHub Check: Preview docs
🧰 Additional context used
📓 Path-based instructions (25)
**/*.rs

📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)

Use snake_case naming convention for Rust identifiers (e.g., nemo_relay_tool_call)

**/*.rs: Any Rust change must run just test-rust
Any Rust change must run cargo fmt --all
Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for all FFI work since it is Rust work
Run just test-rust to validate FFI changes
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting on FFI work

When Rust files changed as part of Go work, also run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all when Rust files are changed as part of Node work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files are changed as part of Node work
Run just test-rust when Rust files are changed as part of Node work

**/*.rs: Run cargo fmt --all to format all Rust code
Run cargo clippy --workspace --all-targets -- -D warnings to enforce all clippy lints as errors

**/*.rs: Run cargo fmt --all when Rust files changed as part of WebAssembly work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files changed as part of WebAssembly work

**/*.rs: If any Rust code changed, always run just test-rust
If any Rust code changed, also run cargo fmt --all
If any Rust code changed, also run cargo clippy --workspace --all-targets -- -D warnings
Run Rust formatting with cargo fmt --all
Run Rust linting with cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Use cargo fmt for Rust code formatting
Run cargo clippy -- -D warnings to lint Rust code and treat all warnings as errors
Use Rust snake_case naming convention for Rust identifiers
Include SPDX license header in all Rust source files using double-slash comment syntax
Validate Rust code with uv run pre-commit run --all-files to enforce cargo fmt formatting check, cargo clippy lints, and cargo deny aud...

Files:

  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/resolve.rs
  • crates/cli/src/adapters/mod.rs
{crates/adaptive/**/*.rs,**/*test*.{rs,py,go,ts,js},**/*adaptive*test*.{rs,py,go,ts,js},docs/plugins/adaptive/**}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Maintain documented and tested validation and report behavior for adaptive surfaces

Files:

  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
**/{Cargo.toml,**/*.rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Maintain consistency between Rust package names in Cargo.toml and their actual usage across the codebase

Files:

  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/resolve.rs
  • crates/cli/src/adapters/mod.rs
**/*.{h,hpp,c,cpp,rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Ensure FFI header and library naming follows consistent conventions across platform-specific builds

Files:

  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/resolve.rs
  • crates/cli/src/adapters/mod.rs
**/*.{rs,toml}

📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)

Update Rust crate names and module prefixes during coordinated rename operations

Files:

  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/resolve.rs
  • crates/cli/src/adapters/mod.rs
**/*.{rs,py,js,ts,tsx,jsx,go,sh,toml,yaml,yml,md}

📄 CodeRabbit inference engine (AGENTS.md)

Keep SPDX headers on source, docs, scripts, and configuration files. The project is Apache-2.0.

Files:

  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/resolve.rs
  • crates/cli/src/adapters/mod.rs
**/*.{rs,py,go,js,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Follow binding naming conventions: Rust and Python use snake_case, C FFI exports prefixed nemo_relay_, Go uses PascalCase for public APIs, Node.js uses camelCase.

Files:

  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/resolve.rs
  • crates/cli/src/adapters/mod.rs
crates/**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

crates/**/*.rs: Keep async behavior on the existing tokio-based model. Bindings should preserve callback and future lifetimes rather than blocking or hiding async work unexpectedly.
Use Json = serde_json::Value in Rust-facing runtime APIs for JSON payload handling.

Files:

  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/resolve.rs
  • crates/cli/src/adapters/mod.rs
**

⚙️ CodeRabbit configuration file

**:

AGENTS.md

This file provides guidance to agents, including Claude Code and OpenAI Codex, when working in this repository.

Project Overview

NeMo Relay is a multi-language agent runtime framework for execution scopes, lifecycle events, middleware, plugins, and observability around tool and LLM calls. The core runtime is Rust. Primary supported bindings are Rust, Python, and Node.js. Go, WebAssembly, and the raw C FFI are experimental and source-first.

The shared runtime model is:

  1. Scope stacks decide where work belongs and which scope-local behavior is visible.
  2. Middleware registries decide what guardrails and intercepts run around managed calls.
  3. Plugins install reusable runtime behavior from configuration.
  4. Events record runtime behavior in ATOF form.
  5. Subscribers and exporters consume events in-process or export them to ATIF, OpenTelemetry, OpenInference, or other backends.

Repository Structure

The repository layout separates the Rust runtime, language bindings, documentation,
integration patches, and agent-facing skills.

crates/
  core/       # Rust core runtime crate, published as nemo-relay
  adaptive/   # Adaptive runtime primitives and plugin components
  python/     # PyO3 native extension for the Python package
  ffi/        # Raw C ABI layer used by downstream bindings such as Go
  node/       # NAPI Node.js binding and JavaScript/TypeScript entry points
  wasm/       # wasm-bindgen WebAssembly binding and JS wrappers
python/
  nemo_relay/  # Python wrapper package: scopes, tools, LLM, middleware, typed helpers, plugins, adaptive helpers
  tests/      # Python tests
go/
  nemo_relay/  # Experimental Go CGo binding and tests
fern/         # Fern documentation site
scripts/      # Stable wrappers and helper scripts; build/test/docs entry points live in justfile
third_party/  # P...

Files:

  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/cli/src/alignment/mod.rs
  • crates/core/src/codec/resolve.rs
  • docs/about-nemo-relay/concepts/codecs.mdx
  • crates/cli/src/adapters/mod.rs
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
{crates/core,crates/adaptive}/**/*

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changes to crates/core or crates/adaptive must run the full language matrix

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/resolve.rs
crates/core/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)

If the change touched crates/core or shared runtime semantics, also use validate-change for broader validation

crates/core/**/*.rs: Use Json = serde_json::Value in Rust-facing runtime APIs where the existing code expects JSON payloads.
Use Result<T> with FlowError in core runtime paths. Keep errors explicit and binding-appropriate at the wrapper layer.

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/resolve.rs
crates/{core,adaptive}/**

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If crates/core or crates/adaptive changed, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/resolve.rs
crates/{core,adaptive}/**/*.rs

⚙️ CodeRabbit configuration file

crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.

Files:

  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/src/codec/resolve.rs
{docs/**,README.md,CONTRIBUTING.md}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

{docs/**,README.md,CONTRIBUTING.md}: For docs-only changes, run targeted checks only if commands, package names, or examples changed. Use just docs for docs-site builds and just docs-linkcheck when links changed
Run docs site build with just docs

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
{docs/**,README.md,CONTRIBUTING.md,**/*.md}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

Run docs link validation with just docs-linkcheck when links change

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
{docs/**,README.md}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

Verify README and docs entry points still match current package names and paths for large or public-facing changes

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
{docs/**,examples/**,README.md}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

Verify examples still run with documented commands for large or public-facing changes

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
{docs/**,README.md,**/Cargo.toml,**/package.json,**/*.md}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

Ensure renamed public surfaces are reflected consistently in manifests and docs for large or public-facing changes

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
**/*.{md,mdx,py,sh,yaml,yml,toml,json}

📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)

Keep package names, repo references, and build commands current

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
**/*.mdx

📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)

In MDX files, top-of-file comments must use JSX comment delimiters: {/* to open and */} to close. Do not use HTML comments for MDX SPDX headers.

MDX top-of-file SPDX comments must use {/* ... */} delimiters instead of HTML comment delimiters (Must-Fix)

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
**/*.{html,md,mdx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Include SPDX license header in HTML and Markdown files using HTML comment syntax

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
docs/**/*.{md,mdx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Update embedded documentation snippets, patch docs, and binding-support notes if examples or supported bindings changed

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
docs/**

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Run just docs or ./scripts/build-docs.sh html to regenerate ignored Fern API reference pages before validation for documentation site changes

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
{docs/**,README.md,CONTRIBUTING.md,RELEASING.md,SECURITY.md}

⚙️ CodeRabbit configuration file

{docs/**,README.md,CONTRIBUTING.md,RELEASING.md,SECURITY.md}: Review documentation for technical accuracy against the current API, command correctness, and consistency across language bindings.
Flag stale examples, missing SPDX headers where required, and instructions that no longer match CI or pre-commit behavior.

Files:

  • docs/about-nemo-relay/concepts/codecs.mdx
🔇 Additional comments (8)
crates/cli/src/alignment/mod.rs (1)

606-609: 📐 Maintainability & Code Quality

Run the required Rust lint pass.

The PR validation list covers cargo fmt --all and just test-rust, but it omits cargo clippy --workspace --all-targets -- -D warnings, which is required for any Rust change in this repo. As per coding guidelines, **/*.rs: "If any Rust code changed, also run cargo clippy --workspace --all-targets -- -D warnings."

Source: Coding guidelines

docs/about-nemo-relay/concepts/codecs.mdx (1)

83-138: LGTM!

crates/core/src/codec/resolve.rs (2)

70-72: 🩺 Stability & Availability

Confirm normalize_request threads the provider hint, not just detection.

detect_request_surface deliberately delegates with None, but the prior review flagged that normalize_request also hardcodes None, so the event.rs fallback path normalizes messages-only Anthropic requests through the OpenAI Chat descriptor. The new request_descriptor helper and the test at resolve_tests.rs:297-300 confirm that a None hint resolves messages-only payloads to OpenAIChat — verify the normalization entry point actually plumbs the provider hint so this isn't silently mis-decoded.

#!/bin/bash
# Inspect normalize_request and its event.rs call site for hint threading.
fd resolve.rs -p crates/core/src/codec --exec sed -n '104,130p'
rg -nP -C3 '\bnormalize_request\s*\(' crates/core/src

38-47: LGTM!

crates/core/tests/unit/codec/resolve_tests.rs (1)

289-313: LGTM!

crates/cli/src/adapters/mod.rs (1)

139-198: LGTM!

crates/cli/tests/coverage/adapters_tests.rs (2)

234-317: LGTM!


340-341: LGTM!

Comment thread crates/cli/src/adapters/mod.rs
Signed-off-by: Yuchen Zhang <yuchenz@nvidia.com>
Signed-off-by: Yuchen Zhang <yuchenz@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@crates/cli/tests/coverage/adapters_tests.rs`:
- Line 820: The coverage test around the normalized payload only checks that
`metadata` no longer contains `cwd`, so it can still pass if `cwd` is dropped
entirely. Update the test in `adapters_tests.rs` to also assert the relocated
`cwd` remains present on `event.payload["cwd"]`, using the existing normalized
event assertions in this test case so the relocation contract is fully covered.
🪄 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: 9c33e325-6e14-454c-ab62-d52e0d81f7cd

📥 Commits

Reviewing files that changed from the base of the PR and between ad1fbb8 and 20816ae.

📒 Files selected for processing (7)
  • crates/cli/src/adapters/mod.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/event.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
  • crates/core/tests/unit/types_tests.rs
💤 Files with no reviewable changes (1)
  • crates/cli/src/adapters/mod.rs
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Check / Run
  • GitHub Check: Preview docs
🧰 Additional context used
📓 Path-based instructions (15)
crates/core/src/api/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)

Implement behavior first in Rust core API modules: crates/core/src/api/ and related core modules such as crates/core/src/api/runtime/, crates/core/src/codec/, or crates/core/src/json.rs

Files:

  • crates/core/src/api/event.rs
**/*.rs

📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)

Use snake_case naming convention for Rust identifiers (e.g., nemo_relay_tool_call)

**/*.rs: Any Rust change must run just test-rust
Any Rust change must run cargo fmt --all
Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for all FFI work since it is Rust work
Run just test-rust to validate FFI changes
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting on FFI work

When Rust files changed as part of Go work, also run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all when Rust files are changed as part of Node work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files are changed as part of Node work
Run just test-rust when Rust files are changed as part of Node work

**/*.rs: Run cargo fmt --all to format all Rust code
Run cargo clippy --workspace --all-targets -- -D warnings to enforce all clippy lints as errors

**/*.rs: Run cargo fmt --all when Rust files changed as part of WebAssembly work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files changed as part of WebAssembly work

**/*.rs: If any Rust code changed, always run just test-rust
If any Rust code changed, also run cargo fmt --all
If any Rust code changed, also run cargo clippy --workspace --all-targets -- -D warnings
Run Rust formatting with cargo fmt --all
Run Rust linting with cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Use cargo fmt for Rust code formatting
Run cargo clippy -- -D warnings to lint Rust code and treat all warnings as errors
Use Rust snake_case naming convention for Rust identifiers
Include SPDX license header in all Rust source files using double-slash comment syntax
Validate Rust code with uv run pre-commit run --all-files to enforce cargo fmt formatting check, cargo clippy lints, and cargo deny aud...

Files:

  • crates/core/src/api/event.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/tests/unit/types_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
**/{Cargo.toml,**/*.rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Maintain consistency between Rust package names in Cargo.toml and their actual usage across the codebase

Files:

  • crates/core/src/api/event.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/tests/unit/types_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
**/*.{h,hpp,c,cpp,rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Ensure FFI header and library naming follows consistent conventions across platform-specific builds

Files:

  • crates/core/src/api/event.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/tests/unit/types_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
{crates/core,crates/adaptive}/**/*

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changes to crates/core or crates/adaptive must run the full language matrix

Files:

  • crates/core/src/api/event.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/tests/unit/types_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
**/*.{rs,toml}

📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)

Update Rust crate names and module prefixes during coordinated rename operations

Files:

  • crates/core/src/api/event.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/tests/unit/types_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
crates/core/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)

If the change touched crates/core or shared runtime semantics, also use validate-change for broader validation

crates/core/**/*.rs: Use Json = serde_json::Value in Rust-facing runtime APIs where the existing code expects JSON payloads.
Use Result<T> with FlowError in core runtime paths. Keep errors explicit and binding-appropriate at the wrapper layer.

Files:

  • crates/core/src/api/event.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/tests/unit/types_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
crates/{core,adaptive}/**

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If crates/core or crates/adaptive changed, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly

Files:

  • crates/core/src/api/event.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/tests/unit/types_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
**/*.{rs,py,js,ts,tsx,jsx,go,sh,toml,yaml,yml,md}

📄 CodeRabbit inference engine (AGENTS.md)

Keep SPDX headers on source, docs, scripts, and configuration files. The project is Apache-2.0.

Files:

  • crates/core/src/api/event.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/tests/unit/types_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
**/*.{rs,py,go,js,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Follow binding naming conventions: Rust and Python use snake_case, C FFI exports prefixed nemo_relay_, Go uses PascalCase for public APIs, Node.js uses camelCase.

Files:

  • crates/core/src/api/event.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/tests/unit/types_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
crates/**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

crates/**/*.rs: Keep async behavior on the existing tokio-based model. Bindings should preserve callback and future lifetimes rather than blocking or hiding async work unexpectedly.
Use Json = serde_json::Value in Rust-facing runtime APIs for JSON payload handling.

Files:

  • crates/core/src/api/event.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/tests/unit/types_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
**

⚙️ CodeRabbit configuration file

**:

AGENTS.md

This file provides guidance to agents, including Claude Code and OpenAI Codex, when working in this repository.

Project Overview

NeMo Relay is a multi-language agent runtime framework for execution scopes, lifecycle events, middleware, plugins, and observability around tool and LLM calls. The core runtime is Rust. Primary supported bindings are Rust, Python, and Node.js. Go, WebAssembly, and the raw C FFI are experimental and source-first.

The shared runtime model is:

  1. Scope stacks decide where work belongs and which scope-local behavior is visible.
  2. Middleware registries decide what guardrails and intercepts run around managed calls.
  3. Plugins install reusable runtime behavior from configuration.
  4. Events record runtime behavior in ATOF form.
  5. Subscribers and exporters consume events in-process or export them to ATIF, OpenTelemetry, OpenInference, or other backends.

Repository Structure

The repository layout separates the Rust runtime, language bindings, documentation,
integration patches, and agent-facing skills.

crates/
  core/       # Rust core runtime crate, published as nemo-relay
  adaptive/   # Adaptive runtime primitives and plugin components
  python/     # PyO3 native extension for the Python package
  ffi/        # Raw C ABI layer used by downstream bindings such as Go
  node/       # NAPI Node.js binding and JavaScript/TypeScript entry points
  wasm/       # wasm-bindgen WebAssembly binding and JS wrappers
python/
  nemo_relay/  # Python wrapper package: scopes, tools, LLM, middleware, typed helpers, plugins, adaptive helpers
  tests/      # Python tests
go/
  nemo_relay/  # Experimental Go CGo binding and tests
fern/         # Fern documentation site
scripts/      # Stable wrappers and helper scripts; build/test/docs entry points live in justfile
third_party/  # P...

Files:

  • crates/core/src/api/event.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/tests/unit/types_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
crates/{core,adaptive}/**/*.rs

⚙️ CodeRabbit configuration file

crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.

Files:

  • crates/core/src/api/event.rs
  • crates/core/src/codec/resolve.rs
  • crates/core/tests/unit/types_tests.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
{crates/adaptive/**/*.rs,**/*test*.{rs,py,go,ts,js},**/*adaptive*test*.{rs,py,go,ts,js},docs/plugins/adaptive/**}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Maintain documented and tested validation and report behavior for adaptive surfaces

Files:

  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/tests/unit/types_tests.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/tests/unit/types_tests.rs
  • crates/core/tests/unit/codec/resolve_tests.rs
🔇 Additional comments (6)
crates/cli/tests/coverage/adapters_tests.rs (1)

31-37: LGTM!

Also applies to: 342-345

crates/core/src/codec/anthropic.rs (1)

43-58: LGTM!

crates/core/src/codec/resolve.rs (1)

118-131: Resolves the prior hint-threading gap. normalize_request_with_hint is now the hint-aware entry point and event.rs calls it, so the messages-only Anthropic fallback path is no longer forced through OpenAI Chat when a hint is present. normalize_request preserving None keeps existing shape-only behavior intact.

crates/core/tests/unit/codec/resolve_tests.rs (1)

278-356: LGTM!

crates/core/tests/unit/types_tests.rs (1)

679-708: LGTM!

crates/core/src/api/event.rs (1)

42-42: 🎯 Functional Correctness

Need the LLM handle construction and the provider-hint matcher to decide whether the name is contractual or just a caller-controlled label.

Comment thread crates/cli/tests/coverage/adapters_tests.rs
Signed-off-by: Yuchen Zhang <yuchenz@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (1)
crates/cli/tests/coverage/adapters_tests.rs (1)

278-319: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Exercise the populated event builders, not just the extractor.

This test proves BUILTIN_AGENT_PAYLOAD_EXTRACTOR, but the PR also rewired common_llm_hint_event and common_tool_event to consume that data. A field-mapping regression there would still pass. Add assertions on the emitted LlmHintEvent/ToolEvent for this populated payload. As per path instructions, "Tests should cover the behavior promised by the changed API surface."

🤖 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/cli/tests/coverage/adapters_tests.rs` around lines 278 - 319, This
test only validates BUILTIN_AGENT_PAYLOAD_EXTRACTOR, but the changed behavior
also flows through common_llm_hint_event and common_tool_event. Update the
populated payload test to assert the emitted LlmHintEvent and ToolEvent values,
not just the extracted hint/tool call data, so the field mapping from the
builder functions is covered. Use the existing
builtin_extractor_reads_agent_hint_and_tool_call_fields test as the anchor and
verify the full event contents for the same payload.

Source: Path instructions

🤖 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 `@crates/core/src/api/event.rs`:
- Around line 42-45: The request normalization in event handling is using
LlmHandle.name as a codec hint, which can change classification for non-gateway
callers. Update resolve::normalize_request_with_hint usage in the event path so
only known gateway route names are treated as hints, or add a separate explicit
provider-surface hint field instead of reusing the logical name. Keep
CreateLlmHandleParams::name as a logical/provider identifier and preserve
existing fallback normalization behavior for non-gateway cases.

---

Outside diff comments:
In `@crates/cli/tests/coverage/adapters_tests.rs`:
- Around line 278-319: This test only validates BUILTIN_AGENT_PAYLOAD_EXTRACTOR,
but the changed behavior also flows through common_llm_hint_event and
common_tool_event. Update the populated payload test to assert the emitted
LlmHintEvent and ToolEvent values, not just the extracted hint/tool call data,
so the field mapping from the builder functions is covered. Use the existing
builtin_extractor_reads_agent_hint_and_tool_call_fields test as the anchor and
verify the full event contents for the same payload.
🪄 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: 14e1d14b-eaf5-4591-ad5b-3099be3cc670

📥 Commits

Reviewing files that changed from the base of the PR and between 20816ae and 720e19e.

📒 Files selected for processing (9)
  • crates/cli/src/adapters/mod.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/src/gateway.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/event.rs
  • crates/core/src/api/llm.rs
  • crates/core/src/api/runtime/state.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Check / Run
  • GitHub Check: Preview docs
🧰 Additional context used
📓 Path-based instructions (17)
crates/core/src/api/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)

Implement behavior first in Rust core API modules: crates/core/src/api/ and related core modules such as crates/core/src/api/runtime/, crates/core/src/codec/, or crates/core/src/json.rs

Files:

  • crates/core/src/api/runtime/state.rs
  • crates/core/src/api/event.rs
  • crates/core/src/api/llm.rs
**/*.rs

📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)

Use snake_case naming convention for Rust identifiers (e.g., nemo_relay_tool_call)

**/*.rs: Any Rust change must run just test-rust
Any Rust change must run cargo fmt --all
Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for all FFI work since it is Rust work
Run just test-rust to validate FFI changes
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting on FFI work

When Rust files changed as part of Go work, also run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all when Rust files are changed as part of Node work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files are changed as part of Node work
Run just test-rust when Rust files are changed as part of Node work

**/*.rs: Run cargo fmt --all to format all Rust code
Run cargo clippy --workspace --all-targets -- -D warnings to enforce all clippy lints as errors

**/*.rs: Run cargo fmt --all when Rust files changed as part of WebAssembly work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files changed as part of WebAssembly work

**/*.rs: If any Rust code changed, always run just test-rust
If any Rust code changed, also run cargo fmt --all
If any Rust code changed, also run cargo clippy --workspace --all-targets -- -D warnings
Run Rust formatting with cargo fmt --all
Run Rust linting with cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Use cargo fmt for Rust code formatting
Run cargo clippy -- -D warnings to lint Rust code and treat all warnings as errors
Use Rust snake_case naming convention for Rust identifiers
Include SPDX license header in all Rust source files using double-slash comment syntax
Validate Rust code with uv run pre-commit run --all-files to enforce cargo fmt formatting check, cargo clippy lints, and cargo deny aud...

Files:

  • crates/core/src/api/runtime/state.rs
  • crates/core/src/api/event.rs
  • crates/cli/src/gateway.rs
  • crates/core/src/api/llm.rs
  • crates/core/src/codec/anthropic.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/cli/src/adapters/mod.rs
  • crates/core/src/codec/resolve.rs
crates/core/src/api/runtime/state.rs

📄 CodeRabbit inference engine (.agents/skills/add-middleware/SKILL.md)

crates/core/src/api/runtime/state.rs: Add registry fields as SortedRegistry<GuardrailEntry<T>> or SortedRegistry<Intercept<T>> to NemoRelayContextState in crates/core/src/api/runtime/state.rs
Add chain execution helpers to NemoRelayContextState following the pattern of existing methods like tool_sanitize_request_chain or tool_request_intercepts_chain

Files:

  • crates/core/src/api/runtime/state.rs
**/{Cargo.toml,**/*.rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Maintain consistency between Rust package names in Cargo.toml and their actual usage across the codebase

Files:

  • crates/core/src/api/runtime/state.rs
  • crates/core/src/api/event.rs
  • crates/cli/src/gateway.rs
  • crates/core/src/api/llm.rs
  • crates/core/src/codec/anthropic.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/cli/src/adapters/mod.rs
  • crates/core/src/codec/resolve.rs
**/*.{h,hpp,c,cpp,rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Ensure FFI header and library naming follows consistent conventions across platform-specific builds

Files:

  • crates/core/src/api/runtime/state.rs
  • crates/core/src/api/event.rs
  • crates/cli/src/gateway.rs
  • crates/core/src/api/llm.rs
  • crates/core/src/codec/anthropic.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/cli/src/adapters/mod.rs
  • crates/core/src/codec/resolve.rs
{crates/core,crates/adaptive}/**/*

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changes to crates/core or crates/adaptive must run the full language matrix

Files:

  • crates/core/src/api/runtime/state.rs
  • crates/core/src/api/event.rs
  • crates/core/src/api/llm.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
**/*.{rs,toml}

📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)

Update Rust crate names and module prefixes during coordinated rename operations

Files:

  • crates/core/src/api/runtime/state.rs
  • crates/core/src/api/event.rs
  • crates/cli/src/gateway.rs
  • crates/core/src/api/llm.rs
  • crates/core/src/codec/anthropic.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/cli/src/adapters/mod.rs
  • crates/core/src/codec/resolve.rs
crates/core/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)

If the change touched crates/core or shared runtime semantics, also use validate-change for broader validation

crates/core/**/*.rs: Use Json = serde_json::Value in Rust-facing runtime APIs where the existing code expects JSON payloads.
Use Result<T> with FlowError in core runtime paths. Keep errors explicit and binding-appropriate at the wrapper layer.

Files:

  • crates/core/src/api/runtime/state.rs
  • crates/core/src/api/event.rs
  • crates/core/src/api/llm.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
crates/{core,adaptive}/**

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If crates/core or crates/adaptive changed, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly

Files:

  • crates/core/src/api/runtime/state.rs
  • crates/core/src/api/event.rs
  • crates/core/src/api/llm.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
**/*.{rs,py,js,ts,tsx,jsx,go,sh,toml,yaml,yml,md}

📄 CodeRabbit inference engine (AGENTS.md)

Keep SPDX headers on source, docs, scripts, and configuration files. The project is Apache-2.0.

Files:

  • crates/core/src/api/runtime/state.rs
  • crates/core/src/api/event.rs
  • crates/cli/src/gateway.rs
  • crates/core/src/api/llm.rs
  • crates/core/src/codec/anthropic.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/cli/src/adapters/mod.rs
  • crates/core/src/codec/resolve.rs
**/*.{rs,py,go,js,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Follow binding naming conventions: Rust and Python use snake_case, C FFI exports prefixed nemo_relay_, Go uses PascalCase for public APIs, Node.js uses camelCase.

Files:

  • crates/core/src/api/runtime/state.rs
  • crates/core/src/api/event.rs
  • crates/cli/src/gateway.rs
  • crates/core/src/api/llm.rs
  • crates/core/src/codec/anthropic.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/cli/src/adapters/mod.rs
  • crates/core/src/codec/resolve.rs
crates/**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

crates/**/*.rs: Keep async behavior on the existing tokio-based model. Bindings should preserve callback and future lifetimes rather than blocking or hiding async work unexpectedly.
Use Json = serde_json::Value in Rust-facing runtime APIs for JSON payload handling.

Files:

  • crates/core/src/api/runtime/state.rs
  • crates/core/src/api/event.rs
  • crates/cli/src/gateway.rs
  • crates/core/src/api/llm.rs
  • crates/core/src/codec/anthropic.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/cli/src/adapters/mod.rs
  • crates/core/src/codec/resolve.rs
**

⚙️ CodeRabbit configuration file

**:

AGENTS.md

This file provides guidance to agents, including Claude Code and OpenAI Codex, when working in this repository.

Project Overview

NeMo Relay is a multi-language agent runtime framework for execution scopes, lifecycle events, middleware, plugins, and observability around tool and LLM calls. The core runtime is Rust. Primary supported bindings are Rust, Python, and Node.js. Go, WebAssembly, and the raw C FFI are experimental and source-first.

The shared runtime model is:

  1. Scope stacks decide where work belongs and which scope-local behavior is visible.
  2. Middleware registries decide what guardrails and intercepts run around managed calls.
  3. Plugins install reusable runtime behavior from configuration.
  4. Events record runtime behavior in ATOF form.
  5. Subscribers and exporters consume events in-process or export them to ATIF, OpenTelemetry, OpenInference, or other backends.

Repository Structure

The repository layout separates the Rust runtime, language bindings, documentation,
integration patches, and agent-facing skills.

crates/
  core/       # Rust core runtime crate, published as nemo-relay
  adaptive/   # Adaptive runtime primitives and plugin components
  python/     # PyO3 native extension for the Python package
  ffi/        # Raw C ABI layer used by downstream bindings such as Go
  node/       # NAPI Node.js binding and JavaScript/TypeScript entry points
  wasm/       # wasm-bindgen WebAssembly binding and JS wrappers
python/
  nemo_relay/  # Python wrapper package: scopes, tools, LLM, middleware, typed helpers, plugins, adaptive helpers
  tests/      # Python tests
go/
  nemo_relay/  # Experimental Go CGo binding and tests
fern/         # Fern documentation site
scripts/      # Stable wrappers and helper scripts; build/test/docs entry points live in justfile
third_party/  # P...

Files:

  • crates/core/src/api/runtime/state.rs
  • crates/core/src/api/event.rs
  • crates/cli/src/gateway.rs
  • crates/core/src/api/llm.rs
  • crates/core/src/codec/anthropic.rs
  • crates/cli/src/alignment/mod.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/cli/src/adapters/mod.rs
  • crates/core/src/codec/resolve.rs
crates/{core,adaptive}/**/*.rs

⚙️ CodeRabbit configuration file

crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.

Files:

  • crates/core/src/api/runtime/state.rs
  • crates/core/src/api/event.rs
  • crates/core/src/api/llm.rs
  • crates/core/src/codec/anthropic.rs
  • crates/core/src/codec/resolve.rs
crates/core/src/api/{tool,llm}.rs

📄 CodeRabbit inference engine (.agents/skills/add-middleware/SKILL.md)

Wire the new middleware chain into the execute path in crates/core/src/api/tool.rs or crates/core/src/api/llm.rs at the appropriate pipeline stage

Files:

  • crates/core/src/api/llm.rs
{crates/adaptive/**/*.rs,**/*test*.{rs,py,go,ts,js},**/*adaptive*test*.{rs,py,go,ts,js},docs/plugins/adaptive/**}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Maintain documented and tested validation and report behavior for adaptive surfaces

Files:

  • crates/cli/tests/coverage/adapters_tests.rs
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • crates/cli/tests/coverage/adapters_tests.rs
🔇 Additional comments (4)
crates/cli/src/adapters/mod.rs (1)

82-86: 📐 Maintainability & Code Quality

Add the missing Rust validation steps before merge.

The PR validation list includes cargo fmt --all and just test-rust, but it still needs cargo clippy --workspace --all-targets -- -D warnings and uv run pre-commit run --all-files for a Rust change in this repo. Please include those results as well. As per coding guidelines, "Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings" and "Validate Rust code with uv run pre-commit run --all-files."

Source: Coding guidelines

crates/cli/tests/coverage/adapters_tests.rs (1)

238-275: LGTM!

crates/cli/src/alignment/mod.rs (1)

90-117: LGTM!

Also applies to: 613-625

crates/core/src/codec/resolve.rs (1)

30-32: 📐 Maintainability & Code Quality

Please add the required repo validation for this crates/core change.

The PR summary only lists targeted Rust tests, cargo fmt --all, just test-rust, and just docs, but the repo guidance for crates/core changes is stricter: run the full binding matrix plus the required Rust lint/pre-commit checks before merge. Please attach results for cargo clippy --workspace --all-targets -- -D warnings, uv run pre-commit run --all-files, validate-change, and the affected binding suites. As per coding guidelines, "If crates/core or crates/adaptive changed, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly" and "Validate Rust code with uv run pre-commit run --all-files."

Source: Coding guidelines

Comment thread crates/core/src/api/event.rs
Signed-off-by: Yuchen Zhang <yuchenz@nvidia.com>
Signed-off-by: Yuchen Zhang <yuchenz@nvidia.com>
@yczhang-nv yczhang-nv changed the title refactor(codec): share provider extraction strategies refactor: define shared agent-payload and provider-schema extraction strategies Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Improvement improvement to existing functionality lang:rust PR changes/introduces Rust code size:L PR is large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant