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

# Cohere

> Parameter reference for the Cohere model class, covering request, client, and retry settings.

The Cohere model provides access to Cohere's language models.

## Parameters

| Parameter | Type | Default | Description |
| - | - | - | - |
| `id` | `str` | `"command-a-03-2025"` | The ID of the Cohere model to use |
| `name` | `str` | `"cohere"` | The name of the model |
| `provider` | `str` | `"Cohere"` | The provider of the model |
| `api_key` | `Optional[str]` | `None` | The API key for Cohere (defaults to CO\_API\_KEY env var) |
| `max_tokens` | `Optional[int]` | `None` | Maximum number of tokens to generate |
| `temperature` | `Optional[float]` | `None` | Controls randomness in the model's output. In v2.7.2, pass zero as `request_params={"temperature": 0}` because `temperature=0` is not sent |
| `top_p` | `Optional[float]` | `None` | Controls diversity via nucleus sampling (0.01 to 0.99) |
| `top_k` | `Optional[int]` | `None` | Controls diversity via top-k sampling |
| `seed` | `Optional[int]` | `None` | Random seed for best-effort repeatability. Identical requests can still differ. In v2.7.2, pass zero as `request_params={"seed": 0}` because `seed=0` is not sent |
| `frequency_penalty` | `Optional[float]` | `None` | Reduces repetition by penalizing frequent tokens (0.0 to 1.0) |
| `presence_penalty` | `Optional[float]` | `None` | Reduces repetition by penalizing present tokens (0.0 to 1.0) |
| `logprobs` | `Optional[bool]` | `None` | Return log probabilities of the output tokens |
| `strict_tools` | `bool` | `False` | Enforce strict tool schemas in requests |
| `add_chat_history` | `bool` | `False` | Reserved in v2.7.2. Request construction does not read this value |
| `request_params` | `Optional[Dict[str, Any]]` | `None` | Additional parameters to include in the request |
| `client_params` | `Optional[Dict[str, Any]]` | `None` | Reserved in v2.7.2. Client construction does not merge this mapping |
| `http_client` | `Optional[Union[httpx.Client, httpx.AsyncClient]]` | `None` | Custom HTTP client for requests |
| `client` | `Optional[CohereClient]` | `None` | Pre-configured Cohere client |
| `async_client` | `Optional[CohereAsyncClient]` | `None` | Pre-configured async Cohere client |
| `model_type` | `ModelType` | `ModelType.MODEL` | Functional role of this model (e.g. `MODEL`, `OUTPUT_MODEL`, `PARSER_MODEL`). Set by the agent |
| `supports_native_structured_outputs` | `bool` | `False` | Whether the model supports structured outputs natively |
| `supports_json_schema_outputs` | `bool` | `False` | Whether the model uses 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 of tool messages |
| `assistant_message_role` | `str` | `"assistant"` | Role of 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 responses, in seconds |
| `cache_dir` | `Optional[str]` | `None` | Directory for the response cache. Defaults to `~/.agno/cache/model_responses` |
| `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 a failed model invocation once with a guidance message appended |
| `retry_with_guidance_limit` | `int` | `1` | Number of times to retry the model invocation with guidance |

> [!WARNING]
>
> Agno v2.7.2 omits zero-valued model fields during request construction. Pass a supported zero value through `request_params` instead. `add_chat_history` does not affect message construction, and `client_params` is not passed to either Cohere client.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.