Skip to main content

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_KEY env var)
  • baseURL: Custom API endpoint URL
  • headers: Custom headers for requests

Available Models

Text Models

  • command-a-03-2025 - Latest Command model
  • command-r-plus - Most capable model
  • command-r - Balanced performance
  • command-r7b-12-2024 - Efficient 7B model

Reasoning Models

  • command-a-reasoning-08-2025 - Reasoning model

Advanced Features

Tool Calling

Reasoning

Embeddings

Available Models:
  • embed-english-v3.0 (1024 dimensions)
  • embed-multilingual-v3.0 (1024 dimensions)
  • embed-english-light-v3.0 (384 dimensions)
Input Types:
  • search_document - For documents in a vector database
  • search_query - For search queries
  • classification - For classification tasks
  • clustering - For clustering tasks

Reranking

Available Models:
  • rerank-v3.5 - Latest reranking model
  • rerank-english-v3.0 - English-only
  • rerank-multilingual-v3.0 - Multilingual support

Model Capabilities

Resources