Skip to content

feat: layer code-driven plugin config#199

Draft
zhongxuanwang-nv wants to merge 5 commits into
NVIDIA:mainfrom
zhongxuanwang-nv:feat/relay-183-layer-code-driven-plugin-config
Draft

feat: layer code-driven plugin config#199
zhongxuanwang-nv wants to merge 5 commits into
NVIDIA:mainfrom
zhongxuanwang-nv:feat/relay-183-layer-code-driven-plugin-config

Conversation

@zhongxuanwang-nv
Copy link
Copy Markdown
Member

@zhongxuanwang-nv zhongxuanwang-nv commented Jun 1, 2026

Overview

Layers code-driven plugin configuration over materialized file-backed plugin configuration so callers can combine discovered plugins.toml, inline [plugins].config, CLI overrides, request headers, and binding-level config builders deterministically.

  • 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

  • Added layer_plugin_config to the Rust core plugin API with recursive object merging, scalar/array replacement, and top-level component upsert by kind.
  • Exposed plugin config layering across FFI, Python, Node.js, WebAssembly, and Go wrapper surfaces.
  • Updated CLI config resolution so file-backed config remains compatible while code-driven layers like --plugin-config and request header config overlay the effective base.
  • Added effective plugin config source tracking in gateway config, doctor output, launcher printing, and server activation errors.
  • Updated plugin configuration docs and agent skills to describe precedence, file-source conflicts, and code-driven overlays.
  • Added focused tests across core, CLI, FFI, Python, Node.js, Go, and WebAssembly.

Quick functional check:

from nemo_relay import plugin

base = {
    "version": 1,
    "components": [
        {
            "kind": "observability",
            "enabled": False,
            "config": {
                "atof": {
                    "enabled": True,
                    "filename": "base.jsonl",
                }
            },
        }
    ],
}
overlay = {
    "components": [
        {
            "kind": "observability",
            "config": {
                "atof": {
                    "mode": "overwrite",
                }
            },
        }
    ],
}

plugin.layer(base, overlay)

Expected output:

{
    "version": 1,
    "components": [
        {
            "kind": "observability",
            "enabled": False,
            "config": {
                "atof": {
                    "enabled": True,
                    "filename": "base.jsonl",
                    "mode": "overwrite",
                }
            },
        }
    ],
}

Validation: full Rust, Python, Node.js, Go, WebAssembly, docs, cargo fmt, cargo clippy --workspace --all-targets -- -D warnings, and uv run pre-commit run --all-files passed. Focused reruns covered core layering, CLI layer precedence, the real nemo-relay run --dry-run binary path, and the Python/Node.js/Go/FFI/WebAssembly wrapper paths.

Where should the reviewer start?

Start with crates/core/src/plugin.rs for the shared layering semantics, then crates/cli/src/config.rs for source precedence and CLI/header composition.

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

Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 1, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 8be88135-d4da-43f6-b78d-90575e0d1e81

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

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

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

@github-actions github-actions Bot added size:L PR is large Feature a new feature lang:go PR changes/introduces Go code lang:js PR changes/introduces Javascript/Typescript code lang:python PR changes/introduces Python code lang:rust PR changes/introduces Rust code labels Jun 1, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

@zhongxuanwang-nv zhongxuanwang-nv self-assigned this Jun 2, 2026
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
@github-actions github-actions Bot added size:XL PR is extra large and removed size:L PR is large labels Jun 2, 2026
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature a new feature lang:go PR changes/introduces Go code lang:js PR changes/introduces Javascript/Typescript code lang:python PR changes/introduces Python code lang:rust PR changes/introduces Rust code size:XL PR is extra large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant