class LittleGhost::ModelResolver

Maps an application model role to an executable Model.

resolver = LittleGhost::ModelResolver.new(
  profiles: {
    customer_support: {target: "openrouter:openai/gpt-5.6-luna"}
  }
)
# With OPENROUTER_API_KEY set:
model = resolver.resolve(:customer_support)

A role is an application-facing name such as :customer_support. Callers may also pass a provider:model-id target or an inline configuration mapping.

A dotted role such as customer_support.escalation uses the nearest defined profile, here customer_support, when it has none of its own. A profile’s inherits name is looked up the same way, then the profile’s target, settings, and request options are layered over its parent’s.

Model details come from the bundled catalog until you call refresh!. A long-lived process can pass catalog_refresh_interval to refresh every configured source when details are first needed and again in the background once the interval has passed.