It could be even simpler:

onSuccess(if responseAsModel then builder else getRespJson)