resolve_model(
model: str | BaseChatModel,
) -> BaseChatModel| Name | Type | Description |
|---|---|---|
model* | str | BaseChatModel | Model string (e.g. |
Resolve a model string to a BaseChatModel.
If model is already a BaseChatModel, returns it unchanged.
String models are resolved via init_chat_model, composed with any
provider-specific initialization behavior registered in the
ProviderProfile registry. Built-in registrations supply the OpenAI
Responses API default and OpenRouter app attribution headers; users can
layer additional providers or overrides via register_provider_profile.