Use this guide when a framework integration needs typed application values at its public boundary while NeMo Relay still records JSON-compatible payloads.
You will choose typed value codecs for framework-facing wrappers so that:
For provider-native LLM payload normalization, use Provider Codecs.
You need:
A typed value codec is a pure data translator at the NeMo Relay boundary. It converts application-facing values to JSON before NeMo Relay emits events or runs JSON-based middleware, then converts JSON back into the type expected by the framework callback or caller.
Typed value codecs are different from provider codecs:
Use this page for typed value codecs. Use Provider Codecs when middleware needs normalized LLM messages, tools, model names, generation parameters, or provider response annotations.
When a managed typed wrapper receives a codec:
Keep codecs deterministic and side-effect free. A codec should not open network connections, mutate framework state, or hide provider I/O.
Python exposes:
JsonPassthroughDataclassCodecPydanticCodecBestEffortAnyCodecNode.js exposes JsonPassthrough and custom Codec<T> implementations.
Use BestEffortAnyCodec only at boundary code where strict schemas are unavailable. Prefer dataclass, Pydantic, or explicit Node.js codecs when the framework owns a stable schema.
Use typed value codecs when the framework wants native objects but NeMo Relay should emit JSON payloads.
Use this checklist to confirm the implementation preserves the expected runtime contract.
toJson and fromJson.Use these links to continue from this workflow into the next related task.