rulvar API reference / @rulvar/rulvar / ChatRequest
Interface: ChatRequest
Defined in: packages/core/dist/index.d.ts
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
| Property | Type | Description | Defined in |
|---|---|---|---|
cacheHint? | CacheHint | - | packages/core/dist/index.d.ts |
effort? | Effort | Canonical effort, already resolved and scrubbed by the router. | packages/core/dist/index.d.ts |
maxOutputTokens? | number | - | packages/core/dist/index.d.ts |
messages | Msg[] | System messages are Msg entries with role 'system'. | packages/core/dist/index.d.ts |
model | string | Wire model id: the segment after 'adapterId:' in ModelRef. | packages/core/dist/index.d.ts |
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/dist/index.d.ts |
schema? | JsonSchema | Structured-output target; tier already chosen by the router. | packages/core/dist/index.d.ts |
stopSequences? | string[] | - | packages/core/dist/index.d.ts |
toolChoice? | ToolChoice | - | packages/core/dist/index.d.ts |
tools? | ToolContract[] | - | packages/core/dist/index.d.ts |