Type Alias LlmRequest Intercept Fn
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
pub type LlmRequestInterceptFn = Arc<dyn Fn(&str, LlmRequest, Option<AnnotatedLlmRequest>) -> Result<(LlmRequest, Option<AnnotatedLlmRequest>)> + Send + Sync>;
Rewrite or annotate an LLM request before execution.
Request intercepts can transform the wire request, attach or replace a normalized AnnotatedLlmRequest, or both.
Parameters
- First argument: Logical provider or model family name.
- Second argument: LLM request to transform.
- Third argument: Optional normalized request annotation to carry forward.
Returns
A Result containing the transformed request and optional annotation.
Errors
The callback can return any FlowError to abort the request-intercept chain.