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
| Parameter | Type |
|---|---|
req | ChatRequest |
tier | StructuredOutputTier |
schema | JsonSchema |