Function●Since v0.7
get_model_provider
get_model_provider(
model: BaseChatModel,
) -> str | NoneParameters
Extract the provider name from a chat model instance.
Uses the model's _get_ls_params method. The base BaseChatModel
implementation derives ls_provider from the class name, and all major
providers override it with a hardcoded value (e.g. "anthropic").
