Skip to content

rulvar API reference


rulvar API reference / @rulvar/core / applyStructuredOutputTier

Function: applyStructuredOutputTier()

ts
function applyStructuredOutputTier(
   req, 
   tier, 
   schema): ChatRequest;

Defined in: packages/core/src/runtime/structured-output.ts:21

Applies the selected tier to an outgoing request. Native rides ChatRequest.schema; forced-tool synthesizes a single emit_result tool with toolChoice pinned to it; prompt injects the schema into the last user message.

Parameters

ParameterType
reqChatRequest
tierStructuredOutputTier
schemaJsonSchema

Returns

ChatRequest