Table of Contents

Class ChatHistoryOptions

Namespace
Qavren.Edge.Chat
Assembly
Qavren.Edge.Chat.Onnx.dll

What history reduction preserves and what it may evict.

public sealed class ChatHistoryOptions
Inheritance
ChatHistoryOptions
Inherited Members

Properties

MaxHistoryTokens

The token budget history is reduced to fit.

MaxTurns

The most turns to keep, counting a user message and the reply it drew as one.

MinimumPreservedMessages

Never reduce below this many trailing messages, whatever the budget says.

PinnedMessageKeys

A message whose AdditionalProperties carries any of these keys is pinned and is never evicted, whatever the budget says. Default: one entry, "qavren.edge.rag.context".

That literal is Qavren.Edge.Rag's RagCitations.ContextMessagePropertyKey, duplicated here rather than referenced, because this package must not depend on that one. A tier-1 test asserts the two strings are equal - the same deliberate duplication, with the same guard, that sub-project 2 uses for its two query-generator service keys.

Pinning is what keeps the RAG block out of the eviction set. Without it the injected context is an unpaired user message at the tail, the reducer's "evict whole groups" rule has no group to put it in, and the first thing a tight budget would throw away is the grounding.

PreserveSystemMessages

Whether a ChatRole.System message is exempt from eviction.