langchain_core.language_models.chat_models.BaseChatModel (the wrapped chat model type)
pydantic.Field and typing.Annotated (used for type annotations/metadata only)
Standard library: datetime, enum, typing.Optional
Usage
from datetime import datetimefrom naas_abi_core.models.Model import ChatModel# `model` must be an actual LangChain BaseChatModel instance in real usage.# Here we use a placeholder to show construction only.model = object() # replace with a real BaseChatModelchat_model = ChatModel( model_id="gpt-4.1", provider="openai", model=model, # should be a BaseChatModel context_window=128000, name="GPT-4.1", created_at=datetime.utcnow(),)print(chat_model.model_id)print(chat_model.model_type)print(chat_model.context_window)
Caveats
These classes are not Pydantic BaseModels; the Field(...) metadata is not automatically enforced/validated at runtime.
model is annotated as BaseChatModel, but there is no runtime type checking in __init__.