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
| Parameter | Type |
|---|---|
req | ChatRequest |
options | { ids: IdMap; maxOutputTokens: number; thinkingForm: "adaptive" | "enabled-budget"; } |
options.ids | IdMap |
options.maxOutputTokens | number |
options.thinkingForm | "adaptive" | "enabled-budget" |
Returns
Record<string, unknown>