> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.nvidia.com/nemo/relay/v0.10.0/reference/api/rust-library-reference/nemo-relay/codec/resolve/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/relay/_mcp/server. # Module resolve > Provider-surface detection, best-effort normalization, and construction of the matching built-in codecs from a raw payload, surface, or codec name. Generated from `cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker`. Provider-surface detection, best-effort normalization, and construction of the matching built-in codecs from a raw payload, surface, or codec name. ## Enums * [ProviderSurface](/reference/api/rust-library-reference/nemo-relay/codec/resolve/enum-providersurface): A built-in provider request/response surface. ## Functions * [detect\_request\_surface](/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-detect-request-surface): Detect the request surface from a raw request body by top-level key. * [detect\_request\_surface\_with\_hint](/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-detect-request-surface-with-hint): Like [`detect_request_surface`](/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-detect-request-surface), but a recognized `provider_hint` resolves the one ambiguous shape (an Anthropic request without a top-level `system`, otherwise read as OpenAI Chat). Today, only the exact hints `"anthropic"` and `"anthropic.messages"` change detection; `None` or any other value is ignored and detection stays shape-only. * [detect\_response\_surface](/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-detect-response-surface): Detect the response surface from a raw provider response, classifying only when exactly one built-in shape matches (the built-in codecs accept minimal objects, so decode success alone is not a reliable classifier). * [normalize\_request](/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-normalize-request): Best-effort decode of a raw request into [`AnnotatedLlmRequest`](/reference/api/rust-library-reference/nemo-relay/codec/request/struct-annotatedllmrequest) (fail-open). * [normalize\_request\_with\_hint](/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-normalize-request-with-hint): Like [`normalize_request`](/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-normalize-request), but a recognized `provider_hint` can disambiguate provider request shapes that are otherwise identical. * [normalize\_response](/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-normalize-response): Best-effort decode of a raw response into [`AnnotatedLlmResponse`](/reference/api/rust-library-reference/nemo-relay/codec/response/struct-annotatedllmresponse) (fail-open). * [request\_codec](/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-request-codec): Constructs the built-in bidirectional request codec ([`LlmCodec`](/reference/api/rust-library-reference/nemo-relay/codec/traits/trait-llmcodec)) for a surface. * [response\_codec](/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-response-codec): Constructs the built-in decode-only response codec ([`LlmResponseCodec`](/reference/api/rust-library-reference/nemo-relay/codec/traits/trait-llmresponsecodec)) for a surface. * [streaming\_codec](/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-streaming-codec): Constructs a fresh, single-use streaming codec ([`StreamingCodec`](/reference/api/rust-library-reference/nemo-relay/codec/streaming/trait-streamingcodec)) for a surface. * [supported\_codec\_names](/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-supported-codec-names): The canonical codec names of every built-in provider surface, for config validation and "supported codec" messages. > Provider-surface detection, best-effort normalization, and construction of the matching built-in codecs from a raw payload, surface, or codec name. ## Docs - [Enum Provider Surface](https://docs.nvidia.com/nemo/relay/v0.10.0/reference/api/rust-library-reference/nemo-relay/codec/resolve/enum-providersurface.md): A built-in provider request/response surface. - [Function detect_request_surface](https://docs.nvidia.com/nemo/relay/v0.10.0/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-detect-request-surface.md): Detect the request surface from a raw request body by top-level key. - [Function detect_request_surface_with_hint](https://docs.nvidia.com/nemo/relay/v0.10.0/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-detect-request-surface-with-hint.md): Like `detect_request_surface`, but a recognized `provider_hint` resolves the one ambiguous shape (an Anthropic request without a top-level `system`, otherwise read as OpenAI Chat). Today, only the exact hints `"anthropic"` and `"anthropic.messages"` change detection; `None` or any other value is ignored and detection stays shape-only. - [Function detect_response_surface](https://docs.nvidia.com/nemo/relay/v0.10.0/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-detect-response-surface.md): Detect the response surface from a raw provider response, classifying only when exactly one built-in shape matches (the built-in codecs accept minimal objects, so decode success alone is not a reliable classifier). - [Function normalize_request](https://docs.nvidia.com/nemo/relay/v0.10.0/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-normalize-request.md): Best-effort decode of a raw request into `AnnotatedLlmRequest` (fail-open). - [Function normalize_request_with_hint](https://docs.nvidia.com/nemo/relay/v0.10.0/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-normalize-request-with-hint.md): Like `normalize_request`, but a recognized `provider_hint` can disambiguate provider request shapes that are otherwise identical. - [Function normalize_response](https://docs.nvidia.com/nemo/relay/v0.10.0/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-normalize-response.md): Best-effort decode of a raw response into `AnnotatedLlmResponse` (fail-open). - [Function request_codec](https://docs.nvidia.com/nemo/relay/v0.10.0/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-request-codec.md): Constructs the built-in bidirectional request codec (`LlmCodec`) for a surface. - [Function response_codec](https://docs.nvidia.com/nemo/relay/v0.10.0/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-response-codec.md): Constructs the built-in decode-only response codec (`LlmResponseCodec`) for a surface. - [Function streaming_codec](https://docs.nvidia.com/nemo/relay/v0.10.0/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-streaming-codec.md): Constructs a fresh, single-use streaming codec (`StreamingCodec`) for a surface. - [Function supported_codec_names](https://docs.nvidia.com/nemo/relay/v0.10.0/reference/api/rust-library-reference/nemo-relay/codec/resolve/fn-supported-codec-names.md): The canonical codec names of every built-in provider surface, for config validation and "supported codec" messages.