Skip to content

Cohere model behaviour

Cohere's API on its own terms — its citation model, its RAG-shaped request format, rerank, and the parameters that have no equivalent elsewhere.

Most provider APIs converged on the same request body: a list of messages, a list of tools, a temperature. Cohere’s did not, and the places where it diverges are not cosmetic. It has a first-class documents field, so retrieval is part of the request rather than something you paste into a prompt. It returns a citations array that ties character spans in the answer back to the documents that supported them. It has a separate rerank endpoint that is not a generative model at all. These are design decisions about grounded generation, and they change what the request looks like more than any parameter name does.

These pages take each of those on its own terms — the documented field, the documented shape, the documented limit — rather than translating everything into OpenAI vocabulary and losing the part that is actually different. Where Cohere runs two API versions with different names for one idea, both names are given, because the version you are on decides which one is an error.

Command R+'s Context Window and Output Limit

The documented context length and maximum output length for Command R+, and why those are two separate budgets rather than one.

8 min read

The tool_results Format in the Cohere API

The array shape Cohere's v1 Chat API expects when you return tool output, and the v2 tool message that replaced it.

9 min read

The preamble Parameter: Command's Version of a System Prompt

What Cohere's preamble field does, where it sits in the rendered prompt, and what you silently replace when you set it.

8 min read

Cohere's Citations: How Command Returns Grounded Spans Automatically

The citations array Command returns alongside a grounded answer, what its offsets are counted in, and how to render it without corrupting the text.

9 min read

Streaming Event Types in the Cohere Chat Endpoint

Every event type Cohere's streaming Chat API emits, in both API versions, and which ones you must handle rather than skip.

9 min read

Cohere's Connectors: How Tool Results Get Merged Into Context

The connector request shape, the search endpoint your service must implement, and how retrieved documents are folded into the model's context.

9 min read

Stop Sequences in the Cohere API

How many stop sequences Cohere accepts, where the cut lands in the returned text, and how to tell a stop from a truncation.

8 min read

Cohere's Deprecation Timeline for Legacy Command Models

Where Cohere publishes its deprecation notices, what the lifecycle stages mean, and how to detect a retiring model from the API rather than a blog post.

8 min read

Cohere's Tokenizer and Vocabulary Size

The size of Command's vocabulary, why it is large, and the two endpoints that count tokens without spending a generation.

8 min read

JSON Mode in the Cohere API: response_format and Schema Support

How Cohere's response_format constrains output to JSON, what a supplied schema does, and which JSON Schema keywords survive.

9 min read

Cohere Command's max_tokens Default and Output Ceiling

What bounds a Command response when you do not set max_tokens, the per-model output ceiling, and the finish reason that tells you which one you hit.

8 min read

Cohere's Rerank Endpoint: Token Limit per Document

The per-document token ceiling on Cohere's rerank endpoint, what happens to text beyond it, and how the query counts against the same budget.

8 min read

Command R's Multi-Step Tool Use Loop

Build the agent loop Cohere's tool use is designed around, from the first request to the termination condition, in about forty lines.

10 min read

Cohere's Temperature Range and Default

The documented default and range for temperature on Cohere's Chat API, and why the range is narrower than other providers'.

7 min read

Pinning a Dated Cohere Model Version

Swap a bare Cohere model name for a dated snapshot, verify it exists, and set up the check that tells you when it is retiring.

8 min read

The safety_mode Parameter in the Cohere API

The documented safety_mode values, what each one swaps into the prompt, and which models accept the parameter at all.

8 min read

Other topics