Interceptors#

Interceptors provide fine-grained control over request and response processing during model evaluation through a configurable pipeline architecture.

Overview#

The adapter system processes model API calls through a configurable pipeline of interceptors. Each interceptor can inspect, modify, or augment requests and responses as they flow through the evaluation process.

        graph LR
    A[Evaluation Request] --> B[Adapter System]
    B --> C[Interceptor Pipeline]
    C --> D[Model API]
    D --> E[Response Pipeline]
    E --> F[Processed Response]
    
    subgraph "Request Processing"
        C --> G[System Message]
        G --> H[Payload Modifier]
        H --> I[Request Logging]
        I --> J[Caching Check]
        J --> K[Endpoint Call]
    end
    
    subgraph "Response Processing"
        E --> L[Response Logging]
        L --> M[Reasoning Extraction]
        M --> N[Progress Tracking]
        N --> O[Cache Storage]
    end
    
    style B fill:#f3e5f5
    style C fill:#e1f5fe
    style E fill:#e8f5e8
    

Core Interceptors#

Caching

Cache requests and responses to improve performance and reduce API calls.

Caching

Specialized Interceptors#

System Messages

Modify system messages and prompts in requests.

System Messages
Payload Modification

Add, remove, or modify request parameters.

Payload Modification

Handle reasoning tokens and track reasoning metrics.

Reasoning
Progress Tracking

Track evaluation progress and status updates.

Progress Tracking

Process Post-Evaluation Results#

Post-Evaluation Hooks

Run additional processing, reporting, or cleanup after evaluations complete.

Post-Evaluation Hooks