listModels method
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,
);
}