queueKindCatalogName function

String queueKindCatalogName(
  1. String kind,
  2. String? baseUrl
)

Maps a queue adapter kind to the catalog provider NAME the model builder keys off — derived from the catalog (resolveCliProviderSpec, issue #772 AC3), never a hand-maintained map: a catalog addition flows through with no edit here. openai-completions keeps the historical CLI rule: a custom baseUrl reports provider openai, the default reports openrouter.

Implementation

String queueKindCatalogName(String kind, String? baseUrl) {
  final spec = resolveCliProviderSpec(kind, baseUrl: baseUrl);
  if (spec == null) {
    throw ConfigException(
      'unknown provider kind "$kind" — supported: '
      '${providerQueueKinds.join(', ')}',
    );
  }
  return spec.name;
}