Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/core / ChatRequest

Interface: ChatRequest

Defined in: packages/core/src/l0/messages.ts:123

The provider-neutral chat request. Sampling parameters (temperature, top_p, top_k) are deliberately absent from the first-class surface: both first-class providers reject them on current reasoning models; where a target legitimately supports them they travel through the adapter's providerOptions namespace, subject to caps scrubbing.

Properties

PropertyTypeDescriptionDefined in
cacheHint?CacheHint-packages/core/src/l0/messages.ts:136
effort?EffortCanonical effort, already resolved and scrubbed by the router.packages/core/src/l0/messages.ts:133
maxOutputTokens?number-packages/core/src/l0/messages.ts:134
messagesMsg[]System messages are Msg entries with role 'system'.packages/core/src/l0/messages.ts:127
modelstringWire model id: the segment after 'adapterId:' in ModelRef.packages/core/src/l0/messages.ts:125
providerOptions?Record<string, Record<string, unknown>>Namespaced by adapter id: { anthropic: {...}, openai: {...} }. An adapter MUST read only its own namespace and MUST ignore unknown namespaces without error. Canonical fields always win where both express the same thing; a namespaced option silently contradicting a canonical field is a typed ConfigError.packages/core/src/l0/messages.ts:144
schema?JsonSchemaStructured-output target; tier already chosen by the router.packages/core/src/l0/messages.ts:131
stopSequences?string[]-packages/core/src/l0/messages.ts:135
toolChoice?ToolChoice-packages/core/src/l0/messages.ts:129
tools?ToolContract[]-packages/core/src/l0/messages.ts:128