model repository 'api' injection fix