Groq

Parameter reference for the Groq model class, covering request and client settings.

The Groq model provides access to Groq's high-performance language models.

Parameters

ParameterTypeDefaultDescription
idstr"openai/gpt-oss-120b"The id of the Groq model to use
namestr"Groq"The name of the model
providerstr"Groq"The provider of the model
frequency_penaltyOptional[float]NoneDeclared and forwarded by Agno, but currently unsupported by the Groq API; leave unset.
logit_biasOptional[Any]NoneDeclared and forwarded by Agno, but currently unsupported by the Groq API; leave unset.
logprobsOptional[bool]NoneDeclared and forwarded by Agno, but currently unsupported by the Groq API; leave unset.
max_tokensOptional[int]NoneDeprecated provider token limit; use supported max_completion_tokens through request_params.
presence_penaltyOptional[float]NoneDeclared and forwarded by Agno, but currently unsupported by the Groq API; leave unset.
seedOptional[int]NoneBest-effort repeatability; identical requests may still produce different results.
stopOptional[Union[str, List[str]]]NoneSequences where the API stops generating further tokens
temperatureOptional[float]NoneControls randomness in the model's output
top_logprobsOptional[int]NoneDeclared and forwarded by Agno, but currently unsupported by the Groq API; leave unset.
top_pOptional[float]NoneControls diversity via nucleus sampling
userOptional[str]NoneA unique identifier representing your end-user
extra_headersOptional[Any]NoneAdditional headers to include in requests
extra_queryOptional[Any]NoneAdditional query parameters to include in requests
request_paramsOptional[Dict[str, Any]]NoneAdditional parameters to include in the request
api_keyOptional[str]NoneThe API key for Groq (defaults to GROQ_API_KEY env var)
base_urlOptional[Union[str, httpx.URL]]NoneThe base URL for the Groq API. When unset, the Groq client falls back to the GROQ_BASE_URL env var, then https://api.groq.com
timeoutOptional[int]NoneRequest timeout in seconds
max_retriesOptional[int]NoneMaximum number of retries for failed requests, handled by the Groq client
default_headersOptional[Any]NoneDefault headers to include in all requests
default_queryOptional[Any]NoneDefault query parameters to include in all requests
http_clientOptional[Union[httpx.Client, httpx.AsyncClient]]NoneCustom httpx client to use for requests
client_paramsOptional[Dict[str, Any]]NoneAdditional parameters for client configuration
clientOptional[GroqClient]NoneA pre-configured instance of the Groq client
async_clientOptional[AsyncGroqClient]NoneA pre-configured instance of the async Groq client
model_typeModelTypeModelType.MODELFunctional role of this model (e.g. MODEL, OUTPUT_MODEL, PARSER_MODEL). Set by the agent during initialization
supports_native_structured_outputsboolFalseTrue if the model supports structured outputs natively
supports_json_schema_outputsboolFalseTrue if the model requires a JSON schema for structured outputs
system_promptOptional[str]NoneSystem prompt from the model added to the Agent
instructionsOptional[List[str]]NoneInstructions from the model added to the Agent
tool_message_rolestr"tool"Role used for tool messages
assistant_message_rolestr"assistant"Role used for assistant messages
cache_responseboolFalseCache model responses to avoid redundant API calls during development
cache_ttlOptional[int]NoneTime-to-live for cached model responses, in seconds. If None, cache never expires
cache_dirOptional[str]NoneDirectory for cached model responses. If None, uses the default cache location
retriesint0Number of retries to attempt before raising a ModelProviderError
delay_between_retriesint1Delay between retries, in seconds
exponential_backoffboolFalseIf True, the delay between retries is doubled each time
retry_with_guidanceboolTrueRetry the model invocation with a guidance message for known errors avoidable with extra instructions
retry_with_guidance_limitint1Number of times to retry the model invocation with guidance
Check the Groq API reference for model-specific support. Provider options without a direct Agno field, such as reasoning_effort, can be supplied through request_params.