ProviderQueueEntry constructor
ProviderQueueEntry({})
Creates a validated entry. Throws ArgumentError on an unknown provider type or a blank model (the same strictness the parsers enforce, available to the editor).
Implementation
ProviderQueueEntry({
required this.providerType,
required this.model,
this.baseUrl,
this.apiKeyEnv,
this.contextWindow,
this.maxTokens,
this.ref,
}) {
if (!providerQueueKinds.contains(providerType)) {
throw ArgumentError.value(
providerType,
'providerType',
'unknown provider_type — supported: ${providerQueueKinds.join(', ')}',
);
}
if (model.trim().isEmpty) {
throw ArgumentError.value(model, 'model', 'must be a non-empty string');
}
}