Options for the summarization middleware.
interface SummarizationMiddlewareOptionsBackend instance or factory for persisting conversation history.
Path prefix for storing conversation history. Defaults to "/conversation_history".
Context retention policy after summarization. Defaults to keeping last 20 messages.
The language model to use for generating summaries. Can be a model string (e.g., "gpt-4o-mini") or a language model instance. If omitted, middleware will use the active request model.
Prompt template for generating summaries.
Threshold(s) that trigger summarization. Can be a single ContextSize or an array for multiple triggers.
Max tokens to include when generating a summary. If omitted, the complete selected conversation is provided to the summarizer.
Settings for truncating large tool arguments in old messages. If not provided, argument truncation is disabled.