executePromptStructured

inline suspend fun <T> StageScope<*, *, *>.executePromptStructured(prompt: Prompt, model: LLModel, retryPolicy: RetryPolicy? = null): Result<T>

Executes a structured LLM prompt with consumption tracking. Creates a PromptExecutionRecord and returns the deserialized structure.

Transient-failure retries are applied automatically per the session's retry policy — see StageScope.executeWithTrackedPromptExecutor.

Parameters

retryPolicy

override for the session-default retry policy. null (default) = use the session-resolved policy. RetryPolicy.None = disable transient retries for this call.