fix: constrain Hermes Relay compatibility - #206
Conversation
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThe Hermes adapter now restricts ChangesHermes relay dependency
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
|
Fern docs preview: https://nvidia-preview-pull-request-206.docs.buildwithfern.com/nemo/fabric |
|
/merge |
#### Overview Upgrade NeMo Fabric to NeMo Relay `>=0.7.2,<0.8` and move the public Relay observability configuration to schema v3. This is a hard migration: explicit schema-v2 configurations and removed flat OTLP/OpenInference fields are rejected with actionable errors. Configurations without an explicit observability version follow Relay 0.7's implicit-v3 behavior. Relay 0.7.2 is the narrowest supported dependency range for this contract. Retaining Relay 0.6 would preserve two configuration models across adapters and retain the Hermes compatibility constraint introduced in #206. The reviewed license delta is limited to `nemo-relay` changing from 0.6.0 to 0.7.2 and the addition of `nemo-relay-cli-bin` 0.7.2; both packages are Apache-2.0, with no new copyleft or unresolved licenses. Claude and Codex harness installations now depend directly on the supported `nemo-relay-cli-bin` distribution, so Platform Evaluator environments receive the version-matched gateway executable without the unused Relay Python package or separate Cargo/shell provisioning. Bare adapter installations remain unchanged. The Python SDK now requires Pydantic 2.12 or newer because the Relay v3 models use `Field(exclude_if=...)`; older Pydantic releases accept that metadata but do not apply it during serialization. This branch now incorporates merged #197's Claude v1alpha2 adapter contract. The conflict resolution preserves typed `AgentConfig` input while retaining Relay 0.7 validation and schema-v3 configuration. This PR supersedes #215. The branch moved from a fork to `NVIDIA/NeMo-Fabric` so the required NVSkills validation can run. #### Details - Replace the Relay observability v2 model with Relay 0.7's native v3 endpoint model across the Rust schema, Python SDK, and generated references. - Remove v2 rendering and version-negotiation code from the shared Relay adapter path. - Apply the v3 contract consistently across Claude, Codex, Deep Agents, and Hermes. - Reject explicit v2, malformed OpenTelemetry containers/endpoints, and legacy flat exporter fields before adapter setup or TOML materialization. - Update dependency metadata, lockfiles, attributions, examples, and integration guidance. - Package the standalone Relay PyPI CLI binary with Claude and Codex harness/full installs and remove separate Cargo CLI provisioning from CI. - Preserve the top-level Relay plugin configuration at version 1; only the observability component uses schema version 3. #### Validation - `just test-python` with the packaged NeMo Relay 0.7.2 CLI - 1,067 passed, 16 skipped - Focused cross-layer regression matrix before the packaging-only follow-up - 298 passed - `cargo fmt --all -- --check` - `just test-rust` - 117 passed - `cargo check -p fabric-python --locked` - `just test-typescript` - `just docs` - Full pre-commit - all 9 hooks passed, including workflow lint, lockfiles, attributions, and dependency-license checks - Clean, exact Claude and Codex leaf `harness` installs both exposed `nemo-relay 0.7.2` while excluding the `nemo-relay` Python distribution - Final-head `Runtime.invoke_stream()` checks with mocked inference: Claude and Codex streamed through the packaged CLI - 2 passed - Final-head `Runtime.invoke_stream()` checks with `nemo-relay` absent from `PATH`: Deep Agents and Hermes streamed through in-process Relay - 2 passed - Built both leaf wheels and verified `harness` and `full` metadata require `nemo-relay-cli-bin>=0.7.2,<0.8` - SDK-level AgentEvaluator matrix before the packaging-only follow-up with mocked inference and the actual NeMo Relay 0.7.2 CLI - 30/30: Codex 10/10, Claude 10/10, Deep Agents 5/5, and Hermes 5/5 - Verified 30 unique ATIF directories, paths, and session IDs; all trajectories use `ATIF-v1.7` - Verified schema v3 in all authored Relay JSON configurations and materialized `plugins.toml` files - Reviewed the lockfile license delta: `nemo-relay` 0.6.0 to 0.7.2 plus `nemo-relay-cli-bin` 0.7.2; all Apache-2.0 #### Where should the reviewer start? Start with `crates/fabric-core/src/config.rs` for the public v3 configuration contract and `adapters/common/src/nemo_fabric_adapters/common/relay_gateway.py` for the shared adapter validation boundary. The corresponding compatibility coverage is in `tests/adapters/test_adapters_common_relay_gateway.py` and `tests/python/test_sdk_contract.py`. For the merged Claude contract, review `adapters/claude/src/nemo_fabric_adapters/claude/adapter.py` and `tests/adapters/test_claude_adapter.py`. #### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to) - Relates to [FABRIC-189: Update NeMo Relay dependency to 0.7](https://linear.app/nvidia/issue/FABRIC-189/update-nemo-relay-dependency-to-07) - Relates to #197 - Relates to #206 - Relates to #215 - [x] I confirm this contribution is my own work, or I have the right to submit it under this project's license. - [x] I searched existing issues and open pull requests, and this does not duplicate existing work. ## Summary by CodeRabbit - **New Features** - Added Relay observability schema v3 with typed OpenTelemetry endpoints, projections, mappings, headers, timeouts, and optional full-payload retention. - Added support for multiple telemetry endpoints and clearer exporter validation. - Relay gateways now use isolated user-scoped configuration. - **Bug Fixes** - Prevented unintended ambient or inherited Relay configuration from affecting runs. - Rejected unsupported legacy observability configurations with clearer errors. - **Documentation** - Updated installation, integration, API, and example guidance for Relay CLI versions 0.7.2–0.7.x and schema v3. - Clarified which adapter installation options include the Relay CLI. Authors: - Ajay Thorve (https://github.com/AjayThorve) Approvers: - Zhongxuan (Daniel) Wang (https://github.com/zhongxuanwang-nv) - David Gardner (https://github.com/dagardner-nv) URL: #216
Overview
Constrain the Hermes adapter's
relayandfullextras to NeMo Relay 0.6.x.A live Hermes Agent 0.19.0 + NeMo Relay 0.7.2 run returned the correct model response, but generated no Relay artifacts. Relay 0.7 rejected Hermes' generated v3 plugin configuration; Hermes failed open, so the integration looked successful while exporting no telemetry. Hermes 0.19.0 is the only published compatible Hermes Agent release, and the supported Relay 0.6.0 combination produces both ATOF and ATIF artifacts in a fresh live run.
This aligns the Hermes leaf adapter with the root project's existing
nemo-relay>=0.6.0,<0.7constraint. It is intentionally limited to dependency metadata, the regenerated lock, and its metadata expectation; no runtime code changes.Details
nemo-relay>=0.6.0,<0.8tonemo-relay>=0.6.0,<0.7for bothrelayandfullextras.Exact Relay 0.7.2 configuration and responses
This is the exact
plugins.tomlemitted by the Hermes adapter in a clean Relay 0.7.2 reproduction of the ATOF+ATIF configuration (including its emitted local paths):Relay's
plugin.validate()response for that parsed TOML was exactly:{"diagnostics":[]}Relay's
plugin.initialize()response for the same parsed TOML was exactly:The original live Hermes Agent 0.19.0 + Relay 0.7.2 model run returned:
Validation
.venv/bin/python -m pytest -q tests/adapters/test_adapter_package_metadata.py— 18 passeduv lock --check --project adapters/hermesrelayandfullMETADATA each requirenemo-relay<0.7,>=0.6.0uv run --no-project python scripts/licensing/license_diff.py --base-ref upstream/main— no license changespre-commit run --all-files attributions-pythonandattributions-rustplugin.validate()/plugin.initialize()responses aboveWhere should the reviewer start?
Start with
adapters/hermes/pyproject.toml;adapters/hermes/uv.lockis the corresponding resolution update.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Relates to feat(hermes): use upstream Relay integration #192
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.