# What changed in @ai-sdk/cohere

> 23 changes in @ai-sdk/cohere 3 to 4 from its official release notes, upgrade guides and advisories: 4 breaking, 2 security, 9 new APIs and options. Each one cited. Sources checked 2026-10-19. HTML: https://unstale.sh/npm/@ai-sdk/cohere/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @ai-sdk/cohere 4

### Breaking changes

- The package is ESM-only; consumers using require() must switch to ESM import syntax. (4.0.0) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%404.0.0)
- The data property is tagged with a type, and the image part type is removed. (4.0.0) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%404.0.0)
- The minimum supported Node.js version is 22; supported versions are 22, 24, and 26. (4.0.0) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%404.0.0)

### Security

- @ai-sdk/provider-utils has an Uncontrolled Resource Consumption issue (4.0.33) — [security advisory](https://github.com/advisories/GHSA-866G-F22W-33X8)
- Streamed tool call arguments are parsed more defensively against prototype keys. (4.0.0) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%404.0.0)

### New APIs and options

- Adds max as a portable reasoning level, widening the reasoning option type; exhaustive switches and mappings must handle it. (4.0.56) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%404.0.56)
- Cohere embeddings now support selecting embedding formats. (4.0.55) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%404.0.55)
- Cohere models can now receive images. (4.0.0) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%404.0.0)
- Adds support for provider references and uploading files where supported by the provider. (4.0.0) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%404.0.0)
- Providers support a new top-level reasoning parameter. (4.0.0) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%404.0.0)
- Provider model classes can cross workflow step boundaries using serialization and deserialization methods. (4.0.0) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%404.0.0)

### Behavior and default changes

- The Cohere embedding outputDimension option now allows 768 and 2048 for Embed 5 models. (3.0.68, 4.0.55) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%404.0.55), [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%403.0.68)
- Provider config types make headers optional, so manually constructed model configs can omit them. (4.0.0) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%404.0.0)

### Fixes and other changes

- Top-level embedding dimensions are mapped to provider settings, allowing the requested dimensions to be passed through. (4.0.59) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%404.0.59)
- Usage details now report cached input tokens. (4.0.56) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%404.0.56)
- The User-Agent header is now standards-compliant. (4.0.52) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%404.0.52)
- Preserves complete raw usage objects returned by the Cohere provider. (3.0.59, 4.0.33) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%404.0.33), [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%403.0.59)

## @ai-sdk/cohere 3

### Breaking changes

- Use embeddingModel to create an embedding model; it replaces textEmbeddingModel. (3.0.0) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%403.0.0)

### New APIs and options

- The raw finish reason is now exposed. (3.0.0) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%403.0.0)
- Reranking is now supported. (3.0.0) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%403.0.0)
- Reranking models now support shorthand names. (3.0.0) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%403.0.0)

### Behavior and default changes

- Token usage information is extended. (3.0.0) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%403.0.0)
- Requests now include the provider version in the user-agent header. (3.0.0) — [release notes](https://github.com/vercel/ai/releases/tag/%40ai-sdk/cohere%403.0.0)
