Skip to main content

Module optimization

Module optimization 

Source
Expand description

Plugin-neutral evidence recording for managed LLM calls. Managed, bounded LLM optimization accounting.

Structs§

LlmOptimizationRecorder
Cloneable capability for adding evidence to the current managed LLM call.

Constants§

MAX_LLM_OPTIMIZATION_CONTRIBUTIONS
Maximum contributions retained for one LLM call.
MAX_LLM_OPTIMIZATION_CONTRIBUTION_ATTEMPTS
Maximum contribution records inspected before the recorder seals itself.
MAX_LLM_OPTIMIZATION_CONTRIBUTION_BYTES
Maximum serialized size of one complete contribution envelope.
MAX_LLM_OPTIMIZATION_TOTAL_CONTRIBUTION_BYTES
Maximum aggregate serialized size of all contribution envelopes for one call.

Functions§

current_llm_optimization_recorder
Return a recorder for the current execution intercept, if it is managed by Relay.
record_llm_optimization_contribution
Best-effort shorthand for recording evidence on the current managed call.