Cohere Provider
The Cohere provider enables you to use Cohere’s language models for text generation, embeddings, and document reranking.Installation
Setup
Get your API key from Cohere Dashboard and set it as an environment variable:Usage
Basic Text Generation
Streaming Responses
Structured Output
Configuration
Custom Provider Instance
Provider Options
- apiKey: Your Cohere API key (defaults to
COHERE_API_KEYenv var) - baseURL: Custom API endpoint URL
- headers: Custom headers for requests
Available Models
Text Models
command-a-03-2025- Latest Command modelcommand-r-plus- Most capable modelcommand-r- Balanced performancecommand-r7b-12-2024- Efficient 7B model
Reasoning Models
command-a-reasoning-08-2025- Reasoning model
Advanced Features
Tool Calling
Reasoning
Embeddings
embed-english-v3.0(1024 dimensions)embed-multilingual-v3.0(1024 dimensions)embed-english-light-v3.0(384 dimensions)
search_document- For documents in a vector databasesearch_query- For search queriesclassification- For classification tasksclustering- For clustering tasks
Reranking
rerank-v3.5- Latest reranking modelrerank-english-v3.0- English-onlyrerank-multilingual-v3.0- Multilingual support
Model Capabilities
| Model | Tools | Structured Output | Reasoning |
|---|---|---|---|
| command-a-03-2025 | ✓ | ✓ | ✗ |
| command-r-plus | ✓ | ✓ | ✗ |
| command-r | ✓ | ✓ | ✗ |
| command-a-reasoning | ✓ | ✓ | ✓ |