cohere
Auto-generated API reference for cohere.
Function: cohere()
cohere(
config):AdapterFactory
Defined in: cohere.ts:23
Cohere Command models via Cohere's OpenAI-compatibility endpoint.
- Streams tokens via SSE (OpenAI-compatible chunks).
- Supports tool calls in the OpenAI
toolsshape. - Reports
usageon the final stream chunk when the upstream model returns it (Cohere's compatibility layer mirrors OpenAI'sstream_options: \{ include_usage: true \}semantics). - Inherits auto-retry from the shared OpenAI core (
retry).
Default model: command-r-plus. Override via model.
#Parameters
#config
Partial<CohereConfig> & object
#Returns
AdapterFactory