listModels method

  1. @override
Stream<ModelInfo> listModels()
inherited

Returns all available models for this provider.

Implementations may or may not cache results. If your application requires caching, you should implement it yourself rather than relying on the provider.

Implementation

@override
Stream<ModelInfo> listModels() async* {
  validateApiKeyPresence();
  yield* OpenAIUtils.listOpenAIModels(
    baseUrl: modelsApiBaseUrl,
    providerName: name,
    logger: logger,
    apiKey: apiKey,
    headers: headers,
  );
}