getModel method
Get information about a specific model
API Reference: https://docs.anthropic.com/en/api/models
Returns detailed information about a specific model including its capabilities, creation date, and display name.
Implementation
Future<AIModel?> getModel(String modelId) async {
try {
final responseData = await client.getJson('$modelsEndpoint/$modelId');
return AIModel.fromJson(responseData);
} catch (e) {
client.logger.warning('Failed to get model $modelId: $e');
return null;
}
}