feat(models): Add filters support and auto-validation for model-specific filters

This commit is contained in:
cogwheel0
2025-12-05 22:19:31 +05:30
parent f676f50c85
commit c630ce8c27
18 changed files with 469 additions and 4 deletions

View File

@@ -2687,6 +2687,7 @@ class ApiService {
required String model,
String? conversationId,
List<String>? toolIds,
List<String>? filterIds,
bool enableWebSearch = false,
bool enableImageGeneration = false,
Map<String, dynamic>? modelItem,
@@ -2797,6 +2798,12 @@ class ApiService {
// No default reasoning parameters included; providers handle thinking UIs natively.
// Add filter_ids if provided (Open-WebUI toggle filters)
if (filterIds != null && filterIds.isNotEmpty) {
data['filter_ids'] = filterIds;
_traceApi('Including filter_ids in streaming request: $filterIds');
}
// Add tool_ids if provided (Open-WebUI expects tool_ids as array of strings)
if (toolIds != null && toolIds.isNotEmpty) {
data['tool_ids'] = toolIds;