@classmethoddefget_reference_model(cls)->"Type[ObjectReference]":ifcls._reference_modelisNone:raiseValueError("reference model not set")returncls._reference_model
@field_validator("api_key")@classmethoddefvalidate_api_key(cls:type["AnthropicAPIKey"],value:Any)->Any:ifnotre.match(r"^sk-ant-api03-[a-zA-Z0-9\-\_]{95}$",value):raiseValueError("Invalid Anthropic API Key")returnvalue