Skip to content

rulvar API reference


rulvar API reference / @rulvar/anthropic / buildAnthropicParams

Function: buildAnthropicParams()

ts
function buildAnthropicParams(req, options): Record<string, unknown>;

Defined in: packages/anthropic/src/wire.ts:145

Builds Messages API params from a ChatRequest. cacheHint compiles into cache_control breakpoints; beyond the provider cap of 4 the DEEPEST breakpoints are kept and the shallowest dropped, deterministically.

Parameters

ParameterType
reqChatRequest
options{ ids: IdMap; maxOutputTokens: number; thinkingForm: "adaptive" | "enabled-budget"; }
options.idsIdMap
options.maxOutputTokensnumber
options.thinkingForm"adaptive" | "enabled-budget"

Returns

Record&lt;string, unknown&gt;