listModels method

Future<List<AIModel>> listModels({
  1. String? beforeId,
  2. String? afterId,
  3. int limit = 20,
})

List available models from Anthropic API

API Reference: https://docs.anthropic.com/en/api/models-list

Supports pagination with beforeId, afterId, and limit parameters. Returns a list of available models with their metadata.

Implementation

Future<List<AIModel>> listModels({
  String? beforeId,
  String? afterId,
  int limit = 20,
}) async {
  return _models.listModels(
    beforeId: beforeId,
    afterId: afterId,
    limit: limit,
  );
}