Skip to main content
The Model class is the base class for all models in Agno. It provides common functionality and parameters that are inherited by specific model implementations like OpenAIChat, Claude, etc.

Parameters

ParameterTypeDefaultDescription
idstrRequiredThe id/name of the model to use
nameOptional[str]NoneThe display name of the model
providerOptional[str]NoneThe provider of the model
frequency_penaltyOptional[float]NonePenalizes new tokens based on their frequency in the text so far
presence_penaltyOptional[float]NonePenalizes new tokens based on whether they appear in the text so far
response_formatOptional[str]NoneThe format of the response
seedOptional[int]NoneRandom seed for deterministic sampling
stopOptional[Union[str, List[str]]]NoneUp to 4 sequences where the API will stop generating further tokens
streamboolTrueWhether to stream the response
temperatureOptional[float]NoneControls randomness in the model’s output
top_pOptional[float]NoneControls diversity via nucleus sampling
max_tokensOptional[int]NoneMaximum number of tokens to generate
request_paramsOptional[Dict[str, Any]]NoneAdditional parameters to include in the request
I