get_model_identifier(
model: BaseChatModel,
) -> str | None| Name | Type | Description |
|---|---|---|
model* | BaseChatModel | Chat model instance to inspect. |
Extract the provider-native model identifier from a chat model.
Providers do not agree on a single field name for the identifier. Some use
model_name, while others use model. Reading the serialized model config
lets us inspect both without relying on reflective attribute access.