cohereAdapter
Auto-generated API reference for cohereAdapter.
Variable: cohereAdapter
constcohereAdapter: (config) =>AdapterFactory=cohere
Defined in: cohere.ts:39
Alias for naming consistency with other native adapters.
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