modelFor

fun modelFor(role: String, provider: String?): String?

The model configured for role under provider, or null if the role says nothing about it.

A null provider returns null rather than guessing: with no active credential there is no provider to select within, and the flat map is the right answer. Provider names are matched case-insensitively, because they arrive from user-supplied credentials as often as from yaml.