Data producer plugins run in the PrepareRequestData phase of the request-control pipeline, before filters and scorers execute. Each plugin implements requestcontrol.DataProducer and writes typed attributes onto endpoints or the InferenceRequest itself. Downstream plugins (scorers, filters, admission controllers) read these attributes without re-doing the computation.
The following diagram shows how producers are connected to the request control and scheduling plugins:
Producers may also implement additional lifecycle hooks:
PreRequest — called after a routing decision is made; used to persist bookkeeping state (e.g., update a cache index, increment an in-flight counter).
ResponseHeader / ResponseBody — called as response data arrives; used to collect training data or release in-flight counters.
Tracks which pods recently processed each multimodal input hash and scores encoder-cache affinity.
Plugin ordering and dependencies
The framework resolves a DAG from each plugin's Produces and Consumes declarations and runs producers in dependency order. Explicit dependencies to be aware of:
mm-embeddings-cache-produceroptionally consumes TokenizedPrompt; configure token-producer first when multimodal features need tokenizer-derived hashes.
inflight-load-produceroptionally consumes PrefixCacheMatchInfo from an approx or precise prefix producer; prefix-discounting is applied automatically when the attribute is present.
predicted-latency-produceroptionally consumes PrefixCacheMatchInfo; set prefixMatchInfoProducerName in its config to the name of the prefix producer instance.
Package sessionid provides a DataProducer that extracts a session identifier from a configured request header or named cookie and publishes it as a SessionID attribute on the InferenceRequest attribute store, so that affinity-aware scorers and filters can read it without knowing how the session was carried on the wire.
Package sessionid provides a DataProducer that extracts a session identifier from a configured request header or named cookie and publishes it as a SessionID attribute on the InferenceRequest attribute store, so that affinity-aware scorers and filters can read it without knowing how the session was carried on the wire.
Package tokenizer provides a DataProducer plugin that tokenizes the request prompt and publishes the result on InferenceRequestBody.TokenizedPrompt for downstream consumers (scorers, filters, other data producers).
Package tokenizer provides a DataProducer plugin that tokenizes the request prompt and publishes the result on InferenceRequestBody.TokenizedPrompt for downstream consumers (scorers, filters, other data producers).
Click to show internal directories.
Click to hide internal directories.
go.dev uses cookies from Google to deliver and enhance the quality of its services and to
analyze traffic. Learn more.