Skip to navigation

Module resolve

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -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.

Structs

  • BuiltinLlmNormalizer: Stateless provider normalization, preserving usage and provider-reported costs.

Enums

Functions

  • detect_request_surface: Detect the request surface from a raw request body by top-level key.
  • detect_request_surface_with_hint: 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.
  • 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: Best-effort decode of a raw request into [AnnotatedLlmRequest] (fail-open).
  • normalize_request_with_hint: Like normalize_request, but a recognized provider_hint can disambiguate provider request shapes that are otherwise identical.
  • normalize_response: Best-effort decode of a raw response into [AnnotatedLlmResponse] (fail-open).
  • request_codec: Constructs the built-in bidirectional request codec ([LlmCodec]) for a surface.
  • response_codec: Constructs the built-in decode-only response codec ([LlmResponseCodec]) for a surface.
  • streaming_codec: Constructs a fresh, single-use streaming codec ([StreamingCodec]) for a surface.
  • supported_codec_names: The canonical codec names of every built-in provider surface, for config validation and “supported codec” messages.