refactor filter pipeline: introduce ResolvedFilterChain and FilterPipeline types

- Replace 4 separate filter params with single Arc<FilterPipeline> in llm_chat
- Add ResolvedFilterChain (filter_ids + agents) and FilterPipeline (input + output)
- Rename utils.rs to streaming.rs, extract STREAM_BUFFER_SIZE constant
- Deduplicate output filter logic via Box<dyn StreamProcessor>
- Rename upstream_path param to request_path for consistency

Made-with: Cursor
This commit is contained in:
Adil Hafeez 2026-03-18 16:47:16 -07:00
parent 15c6ce7d64
commit 1605d2caa6
7 changed files with 119 additions and 126 deletions

View file

@ -7,7 +7,7 @@ use std::io::Read;
use std::sync::Arc;
use tracing::{debug, info, warn};
use crate::handlers::utils::StreamProcessor;
use crate::handlers::streaming::StreamProcessor;
use crate::state::{OpenAIConversationState, StateStorage};
/// Processor that wraps another processor and handles v1/responses state management