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.
Specialized Interceptors#
System Messages
Modify system messages and prompts in requests.
Payload Modification
Add, remove, or modify request parameters.
:octicon:`brain;1.5em;sd-mr-1` Reasoning
Handle reasoning tokens and track reasoning metrics.
Progress Tracking
Track evaluation progress and status updates.
Process Post-Evaluation Results#
Post-Evaluation Hooks
Run additional processing, reporting, or cleanup after evaluations complete.