get_model_provider(
model: BaseChatModel,
) -> str | None| Name | Type | Description |
|---|---|---|
model* | BaseChatModel | Chat model instance to inspect. |
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").