Build a Provider Engine¶
Provider engines still own final request construction. For benchmark-native
runs, Themis renders prompt templates before infer(...) is called.
Use the Prepared Prompt¶
class MyEngine:
def infer(self, trial, context, runtime):
messages = [message.model_dump(mode="json") for message in trial.prompt.messages]
...
What Themis Preserves¶
trial.prompt.messagescontains the rendered messages sent to the modeltrial.prompt.id,trial.prompt.family, andtrial.prompt.variablesstay available for routing and loggingtrial.task.dimensions,trial.task.slice_id, andtrial.task.benchmark_idstay available for request metadata and reporting