Skip to main content

Built-in Middleware

Built-in middleware for common proxy use cases

XpertAI provides built-in middleware for common use cases. Each middleware is production-tested and can be configured according to your specific needs.

Model Provider Agnostic Middleware

The following middleware works with any LLM provider:

MiddlewareDescription
Context CompressionAutomatically summarizes conversation history when approaching session limit.

Context Compression

Automatically summarizes conversation history when approaching token limits, preserving recent messages while compressing older context. The summarization feature is suitable for the following scenarios:

  • Long conversations that exceed the context window.
  • Multi-turn dialogues with extensive history.
  • Applications that need to retain full conversation context.