> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-service-account.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Groq

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

## Parameters

| Parameter                            | Type                                               | Default                     | Description                                                                                                                       |
| ------------------------------------ | -------------------------------------------------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `id`                                 | `str`                                              | `"llama-3.3-70b-versatile"` | The id of the Groq model to use                                                                                                   |
| `name`                               | `str`                                              | `"Groq"`                    | The name of the model                                                                                                             |
| `provider`                           | `str`                                              | `"Groq"`                    | The provider of the model                                                                                                         |
| `frequency_penalty`                  | `Optional[float]`                                  | `None`                      | Penalizes new tokens based on their frequency in the text so far                                                                  |
| `logit_bias`                         | `Optional[Any]`                                    | `None`                      | Modifies the likelihood of specified tokens appearing in the completion                                                           |
| `logprobs`                           | `Optional[bool]`                                   | `None`                      | Whether to return log probabilities of the output tokens                                                                          |
| `max_tokens`                         | `Optional[int]`                                    | `None`                      | Maximum number of tokens to generate                                                                                              |
| `presence_penalty`                   | `Optional[float]`                                  | `None`                      | Penalizes new tokens based on whether they appear in the text so far                                                              |
| `seed`                               | `Optional[int]`                                    | `None`                      | Random seed for deterministic sampling                                                                                            |
| `stop`                               | `Optional[Union[str, List[str]]]`                  | `None`                      | Sequences where the API stops generating further tokens                                                                           |
| `temperature`                        | `Optional[float]`                                  | `None`                      | Controls randomness in the model's output                                                                                         |
| `top_logprobs`                       | `Optional[int]`                                    | `None`                      | Number of most likely tokens to return log probabilities for                                                                      |
| `top_p`                              | `Optional[float]`                                  | `None`                      | Controls diversity via nucleus sampling                                                                                           |
| `user`                               | `Optional[str]`                                    | `None`                      | A unique identifier representing your end-user                                                                                    |
| `extra_headers`                      | `Optional[Any]`                                    | `None`                      | Additional headers to include in requests                                                                                         |
| `extra_query`                        | `Optional[Any]`                                    | `None`                      | Additional query parameters to include in requests                                                                                |
| `request_params`                     | `Optional[Dict[str, Any]]`                         | `None`                      | Additional parameters to include in the request                                                                                   |
| `api_key`                            | `Optional[str]`                                    | `None`                      | The API key for Groq (defaults to GROQ\_API\_KEY env var)                                                                         |
| `base_url`                           | `Optional[Union[str, httpx.URL]]`                  | `None`                      | The 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` |
| `timeout`                            | `Optional[int]`                                    | `None`                      | Request timeout in seconds                                                                                                        |
| `max_retries`                        | `Optional[int]`                                    | `None`                      | Maximum number of retries for failed requests, handled by the Groq client                                                         |
| `default_headers`                    | `Optional[Any]`                                    | `None`                      | Default headers to include in all requests                                                                                        |
| `default_query`                      | `Optional[Any]`                                    | `None`                      | Default query parameters to include in all requests                                                                               |
| `http_client`                        | `Optional[Union[httpx.Client, httpx.AsyncClient]]` | `None`                      | Custom httpx client to use for requests                                                                                           |
| `client_params`                      | `Optional[Dict[str, Any]]`                         | `None`                      | Additional parameters for client configuration                                                                                    |
| `client`                             | `Optional[GroqClient]`                             | `None`                      | A pre-configured instance of the Groq client                                                                                      |
| `async_client`                       | `Optional[AsyncGroqClient]`                        | `None`                      | A pre-configured instance of the async Groq client                                                                                |
| `model_type`                         | `ModelType`                                        | `ModelType.MODEL`           | Functional role of this model (`MODEL`, `OUTPUT_MODEL`, or `PARSER_MODEL`). Set by the agent during initialization                |
| `supports_native_structured_outputs` | `bool`                                             | `False`                     | True if the model supports structured outputs natively                                                                            |
| `supports_json_schema_outputs`       | `bool`                                             | `False`                     | True if the model requires a JSON schema for structured outputs                                                                   |
| `system_prompt`                      | `Optional[str]`                                    | `None`                      | System prompt from the model added to the Agent                                                                                   |
| `instructions`                       | `Optional[List[str]]`                              | `None`                      | Instructions from the model added to the Agent                                                                                    |
| `tool_message_role`                  | `str`                                              | `"tool"`                    | Role used for tool messages                                                                                                       |
| `assistant_message_role`             | `str`                                              | `"assistant"`               | Role used for assistant messages                                                                                                  |
| `cache_response`                     | `bool`                                             | `False`                     | Cache model responses to avoid redundant API calls during development                                                             |
| `cache_ttl`                          | `Optional[int]`                                    | `None`                      | Time-to-live for cached model responses, in seconds. If None, cache never expires                                                 |
| `cache_dir`                          | `Optional[str]`                                    | `None`                      | Directory for cached model responses. If None, uses the default cache location                                                    |
| `retries`                            | `int`                                              | `0`                         | Number of retries to attempt before raising a ModelProviderError                                                                  |
| `delay_between_retries`              | `int`                                              | `1`                         | Delay between retries, in seconds                                                                                                 |
| `exponential_backoff`                | `bool`                                             | `False`                     | If True, the delay between retries is doubled each time                                                                           |
| `retry_with_guidance`                | `bool`                                             | `True`                      | Retry the model invocation with a guidance message for known errors avoidable with extra instructions                             |
| `retry_with_guidance_limit`          | `int`                                              | `1`                         | Number of times to retry the model invocation with guidance                                                                       |

Groq extends the OpenAI-compatible interface and supports most parameters from OpenAI.
