Interface ModelCatalog

All Known Implementing Classes:
AnthropicModelCatalog, GoogleAiGeminiModelCatalog, MistralAiModelCatalog, OpenAiModelCatalog

@Experimental public interface ModelCatalog
Represents a service that can discover available models from an LLM provider. This allows customers to list available models and their capabilities without needing to go to individual AI provider websites.

Similar to ChatModel and StreamingChatModel, each provider should implement this interface to enable model listing.

Example usage:

OpenAiModelCatalog catalog = OpenAiModelCatalog.builder()
    .apiKey(apiKey)
    .build();

List<ModelDescription> models = catalog.listModels();

Since:
1.10.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves a list of available models from the provider.
    Returns the provider for this catalog service.
  • Method Details

    • listModels

      List<ModelDescription> listModels()
      Retrieves a list of available models from the provider.
      Returns:
      A list of model descriptions
      Throws:
      RuntimeException - if the listing operation fails
    • provider

      ModelProvider provider()
      Returns the provider for this catalog service.
      Returns:
      The model provider