refactor: removed unused api validator

This commit is contained in:
cogwheel0
2025-09-08 00:27:11 +05:30
parent 41f2739075
commit 3893e266f6
9 changed files with 3 additions and 24015 deletions

View File

@@ -12,7 +12,6 @@ import '../models/model.dart';
import '../models/conversation.dart';
import '../models/chat_message.dart';
import '../auth/api_auth_interceptor.dart';
import '../validation/validation_interceptor.dart';
import '../error/api_error_interceptor.dart';
// Tool-call details are parsed in the UI layer to render collapsible blocks
import 'persistent_streaming_service.dart';
@@ -66,16 +65,7 @@ class ApiService {
// 1. Auth interceptor (must be first to add auth headers)
_dio.interceptors.add(_authInterceptor);
// 2. Validation interceptor (validates requests/responses against OpenAPI schema)
// Disable for now to ensure parameters aren't being filtered
final validationInterceptor = ValidationInterceptor(
enableRequestValidation: false, // Disabled to preserve all parameters
enableResponseValidation: false, // Disabled for SSE streams
throwOnValidationError: false,
logValidationResults: kDebugMode,
);
// Comment out to disable completely
// _dio.interceptors.add(validationInterceptor);
// 2. Validation interceptor removed (no schema loading/logging)
// 3. Error handling interceptor (transforms errors to standardized format)
_dio.interceptors.add(
@@ -99,10 +89,7 @@ class ApiService {
// We now use custom interceptors with secure logging via DebugLogger
}
// Initialize validation interceptor asynchronously
validationInterceptor.initialize().catchError((error) {
// Handle validation initialization errors silently
});
// Validation interceptor fully removed
}
void updateAuthToken(String token) {