Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
Hosted adaptive runtime that registers NeMo Relay plugin components.
This type validates configuration, builds the configured storage backend, registers intercepts and subscribers, and maintains the hot cache used by adaptive features on the request path.
impl AdaptiveRuntimeimpl AdaptiveRuntime
newpub async fn new(config: AdaptiveConfig) -> Result<Self>
Create a new adaptive runtime from configuration.
config: Adaptive runtime configuration to validate and apply.A Result containing a new AdaptiveRuntime.
Returns AdaptiveError::InvalidConfig when validation reports errors, or any backend-construction error produced while building the configured state backend.
validate_configpub fn validate_config(config: &AdaptiveConfig) -> ConfigReport
Validate an adaptive runtime configuration without constructing a runtime.
config: Configuration to validate.A ConfigReport containing validation diagnostics.
reportpub fn report(&self) -> &ConfigReport
Return the configuration report captured during construction.
The ConfigReport associated with this runtime.
wait_for_idlepub fn wait_for_idle(&self)
Block until the telemetry drain has processed all pending events.
This method performs a simple polling wait and is intended for tests, shutdown paths, or other coordination points.
build_cache_request_factspub fn build_cache_request_facts(
&self,
agent_id: &str,
provider: &str,
annotated_request: &AnnotatedLlmRequest,
) -> Option<CacheRequestFacts>
Build cache-diagnostics facts for an annotated request.
agent_id: Agent identifier associated with the request.provider: Logical provider name associated with the request.annotated_request: Annotated request to analyze.Some(CacheRequestFacts) when enough hot-cache state is available to derive them and None otherwise.
bind_scopepub fn bind_scope(&mut self, scope_uuid: Uuid) -> Result<()>
Bind the runtime’s ACG request rewrite to an active scope.
External framework integrations can bind the runtime to a session scope and then invoke nemo_relay.llm.request_intercepts(...) explicitly at the provider boundary. Once any scope is bound, this runtime’s hosted ACG execution intercept becomes pass-through so external frameworks do not double-translate requests.
Returns an error when the runtime is not yet registered, when ACG is not configured for this runtime, or when the scope-local request intercept cannot be constructed or registered.
registerpub async fn register(&mut self) -> Result<()>
Register all configured adaptive features with the shared runtime.
A Result that is Ok(()) when registration succeeds.
Returns any error raised while seeding state or registering features.
deregisterpub fn deregister(&mut self) -> Result<()>
Deregister all previously registered adaptive features.
A Result that is Ok(()) after registrations have been rolled back.
Returns any rollback error surfaced by the hosted plugin system.
shutdownpub async fn shutdown(self) -> Result<()>
Deregister the runtime and consume it.
A Result that is Ok(()) when shutdown completes.
Propagates any error returned by Self::deregister.
impl Debug for AdaptiveRuntimeimpl Debug for AdaptiveRuntime
fmtfn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Drop for AdaptiveRuntimeimpl Drop for AdaptiveRuntime
dropfn drop(&mut self)