Repository navigation
fix: restrict typed reconstruction to registered types - #1304
Merged
willkill07 merged 1 commit intoOct 13, 2026
Merged
Conversation
Signed-off-by: Will Killian <[email protected]>
Contributor
ericevans-nv
approved these changes
Oct 13, 2026
2 tasks done
willkill07
added a commit
that referenced
this pull request
Oct 14, 2026
#### Overview Add 0.10.1 release notes covering the fifteen PRs merged into `release/0.10` since `0.10.0`, plus the anticipated merge of #1317, with matching patch-upgrade guidance. Preserve the 0.10.0 notes and follow the NVIDIA documentation style guide. - [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. #### Details - Cover daemon-worker LLM middleware (#1281), the YAML dependency update (#1282), hook timeout and failure-policy fixes (#1288, #1289, #1290), and request-edit preservation (#1296). - Cover Anthropic streaming storage (#1303), Python typed reconstruction (#1304), Go native handle lifetimes (#1302), authenticated Pi hooks and session ownership (#1306), dynamic plugin trust failures (#1305), and verified native plugin loading (#1307). - Cover Pi named-upstream restrictions (#1314), LangChain tool-schema edits (#1316), and the configurable ChatGPT Codex endpoint (#1319). - Assume #1317 will merge: document plugin HTTP error helpers and prefixes, preservation of remote Guardrails and forwarded hook HTTP error statuses, verified reporting identities, and streaming limits. Verified against its current head `b61bb7da0bc6de7b7d5d27a569981867b7b2fcb9`; its implementation is not merged into this branch. - Add upgrade guidance for hook credentials and registration, generated hooks, daemon response behavior, request edits, Pi extensions and private provider endpoints, native plugin dependencies, stored Python typed values, ChatGPT endpoints, and HTTP error handling. - Keep PR references and counts out of user-facing release notes. Preserve the prior CodeRabbit corrections for MCP route registration, forwarded-stream observation limits, sanitizer-only behavior, and 0.10.1 installation pins. - Merge the latest `release/0.10` into the PR branch. Distinguish personal hook refresh commands from administrator-managed daemon bundles. Validation: `just docs`, `uv run pre-commit run`, and `git diff --cached --check` passed. Fern skipped the published redirect-history check because FDR returned HTTP 403. Verified the merged release range against source and public documentation, and the assumed #1317 behavior against its current PR source and docs. Language test suites were not run because the PR diff only updates documentation prose and installation version pins. Package installation commands, live daemon upgrades, plugin activations, and hook refreshes were not executed. Validation runs on the current release branch; #1317 remains an explicit release-content assumption. #### Where should the reviewer start? Start with `Release 0.10.1` in `docs/about-nemo-relay/release-notes/index.mdx`, then review `Update from NeMo Relay 0.10.0 to 0.10.1` in `docs/reference/migration-guides.mdx`. Review the new Pi endpoint, ChatGPT endpoint, LangChain tool-edit, and HTTP error guidance, including the #1317 merge assumption. Check matching version pins in `docs/getting-started/installation.mdx`. #### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to) - Relates to: none <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added NeMo Relay 0.10.0 and 0.10.1 release notes, including feature highlights, compatibility updates, fixes, and known issues. * Expanded migration guidance with upgrade steps and details on hook credentials and delivery, daemon-worker middleware behavior, request editing, plugin requirements, and Python value handling. * Updated installation examples across supported platforms, packages, and integrations to reference version 0.10.1. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Will Killian <[email protected]>
2 tasks done
willkill07
added a commit
that referenced
this pull request
Oct 15, 2026
#### Overview Direct users of `BestEffortAnyCodec` could supply a copied runtime type token and modified data to run a registered class's constructor or validators. Tagged dataclass and Pydantic values now remain JSON dictionaries by default. Callers must list the classes they want to restore in `allowed_types`. - [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. #### Details - Replace the process-wide registry with an explicit list of classes for each codec. Encoding never adds classes to this list. - Resolve tags only against supplied class objects. Ignore old runtime type tokens. Keep pickle decoding restricted to builtin containers. - Allow known framework result types in LangChain and LangGraph. Use the request's declared schemas for LangChain structured responses. This includes raw unions and `AutoStrategy` unions. Keep tool arguments as plain JSON. - Cover modified data, copied tokens, isolation between codecs, and structured-response schemas. Update the usage guide, migration guide, and API docstrings. **Breaking change:** `BestEffortAnyCodec()` no longer restores dataclass or Pydantic objects by default. Use `BestEffortAnyCodec(allowed_types=[SearchArgs, SearchResult])` for typed round trips. Allowed constructors and validators still run on input data. Validation passed: - `just test-python`: 83 native binding tests, 1,002 Python tests, and 24 example tests. - `just test-python-langchain`: 182 integration tests. - `just docs`: local checks passed. Published-redirect verification was unavailable because FDR returned HTTP 403. - Repository pre-commit hooks passed on staged changes. - The documented allowlist example ran successfully. Rust, Node.js, and Go APIs are unchanged, so their standalone suites were not run. #### Where should the reviewer start? Start with `BestEffortAnyCodec` in `python/nemo_relay/typed.py` and the security cases in `python/tests/test_typed.py`. Then review the explicit result types in the LangChain and LangGraph codecs and the declared-schema tests in `python/tests/integrations/langchain_tests/test_middleware.py`. #### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to) - Closes [RELAY-1071](https://linear.app/nvidia/issue/RELAY-1071). - Closes [RELAY-1031](https://linear.app/nvidia/issue/RELAY-1031). This adds hardening to the original fix in #1304. RELAY-1031 is already marked Done. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Python object decoding can restore tagged dataclass and Pydantic values when their exact classes are explicitly allowed; other values remain dictionaries. Restored values are constructed or validated by their classes. * LangChain and LangGraph integrations support decoding known structured-response types and tool results. * **Documentation** * Guidance covers type allowlists, JSON tool arguments, schema-specific codecs, and decoding data across processes. * **Security** * Decoding does not import modules. Pickle decoding remains limited to supported built-in containers, regardless of the allowlist. Legacy runtime-type tokens do not enable restoration. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Will Killian <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Restrict Python tagged-value reconstruction to types registered in the current process, and keep LangChain/LangGraph tool arguments as plain JSON. Registered typed values and framework tool results continue to round-trip without public API signature changes.
Details
BestEffortAnyCodec; dataclass and Pydantic tags resolve only through the runtime type registry populated byto_json().JsonPassthroughfor both sync and async LangChain/LangGraph tool arguments, while preserving the existing result codecs.DataclassCodecorPydanticCodecto select their type.No public API signatures change. The behavior change is that unregistered tagged payloads no longer reconstruct Python objects, and tagged integration arguments remain JSON even when their runtime type token is registered.
Validation passed: 65 focused checks;
just test-python(83 native binding tests, 785 Python tests, and 24 example tests);just test-python-langchain(134 integration tests); and all repository pre-commit hooks. Rust, Node.js, and Go surfaces are unchanged, so their standalone suites were not run.Where should the reviewer start?
Start with
python/nemo_relay/typed.py, then review the argument codecs inpython/nemo_relay/integrations/langchain/middleware.pyandpython/nemo_relay/integrations/langgraph/tool_node.py. The regressions inpython/tests/test_typed.pyand the corresponding integration test files exercise the changed behavior.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit
Bug Fixes
Documentation