@ai-sdk/cohere 4.0.0-beta.9 → 4.0.0-canary.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,218 @@
1
1
  # @ai-sdk/cohere
2
2
 
3
+ ## 4.0.0-canary.33
4
+
5
+ ### Patch Changes
6
+
7
+ - 0c4c275: trigger initial canary release
8
+ - Updated dependencies [0c4c275]
9
+ - @ai-sdk/provider-utils@5.0.0-canary.31
10
+ - @ai-sdk/provider@4.0.0-canary.15
11
+
12
+ ## 4.0.0-beta.32
13
+
14
+ ### Major Changes
15
+
16
+ - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
17
+
18
+ For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [08d2129]
23
+ - @ai-sdk/provider-utils@5.0.0-beta.30
24
+
25
+ ## 4.0.0-beta.31
26
+
27
+ ### Patch Changes
28
+
29
+ - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
30
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
31
+ - Updated dependencies [9bd6512]
32
+ - Updated dependencies [258c093]
33
+ - Updated dependencies [b6783da]
34
+ - @ai-sdk/provider-utils@5.0.0-beta.29
35
+ - @ai-sdk/provider@4.0.0-beta.14
36
+
37
+ ## 4.0.0-beta.30
38
+
39
+ ### Patch Changes
40
+
41
+ - 9f0e36c: trigger release for all packages after provenance setup
42
+ - Updated dependencies [9f0e36c]
43
+ - @ai-sdk/provider@4.0.0-beta.13
44
+ - @ai-sdk/provider-utils@5.0.0-beta.28
45
+
46
+ ## 4.0.0-beta.29
47
+
48
+ ### Patch Changes
49
+
50
+ - 58a2ad7: fix: more precise default message for tool execution denial
51
+ - Updated dependencies [785fe16]
52
+ - Updated dependencies [67df0a0]
53
+ - Updated dependencies [befb78c]
54
+ - Updated dependencies [0458559]
55
+ - Updated dependencies [5852c0a]
56
+ - Updated dependencies [fc92055]
57
+ - @ai-sdk/provider-utils@5.0.0-beta.27
58
+
59
+ ## 4.0.0-beta.28
60
+
61
+ ### Patch Changes
62
+
63
+ - Updated dependencies [2e98477]
64
+ - @ai-sdk/provider-utils@5.0.0-beta.26
65
+
66
+ ## 4.0.0-beta.27
67
+
68
+ ### Patch Changes
69
+
70
+ - Updated dependencies [eea8d98]
71
+ - @ai-sdk/provider-utils@5.0.0-beta.25
72
+
73
+ ## 4.0.0-beta.26
74
+
75
+ ### Patch Changes
76
+
77
+ - Updated dependencies [f807e45]
78
+ - @ai-sdk/provider-utils@5.0.0-beta.24
79
+
80
+ ## 4.0.0-beta.25
81
+
82
+ ### Patch Changes
83
+
84
+ - Updated dependencies [350ea38]
85
+ - @ai-sdk/provider-utils@5.0.0-beta.23
86
+
87
+ ## 4.0.0-beta.24
88
+
89
+ ### Patch Changes
90
+
91
+ - Updated dependencies [083947b]
92
+ - @ai-sdk/provider-utils@5.0.0-beta.22
93
+
94
+ ## 4.0.0-beta.23
95
+
96
+ ### Patch Changes
97
+
98
+ - Updated dependencies [add1126]
99
+ - @ai-sdk/provider-utils@5.0.0-beta.21
100
+
101
+ ## 4.0.0-beta.22
102
+
103
+ ### Patch Changes
104
+
105
+ - b3976a2: Add workflow serialization support to all provider models.
106
+
107
+ **`@ai-sdk/provider-utils`:** New `serializeModel()` helper that extracts only serializable properties from a model instance, filtering out functions and objects containing functions. Third-party provider authors can use this to add workflow support to their own models.
108
+
109
+ **All providers:** `headers` is now optional in provider config types. This is non-breaking — existing code that passes `headers` continues to work. Custom provider implementations that construct model configs manually can now omit `headers`, which is useful when models are deserialized from a workflow step boundary where auth is provided separately.
110
+
111
+ All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
112
+
113
+ - Updated dependencies [b3976a2]
114
+ - Updated dependencies [ff5eba1]
115
+ - @ai-sdk/provider-utils@5.0.0-beta.20
116
+ - @ai-sdk/provider@4.0.0-beta.12
117
+
118
+ ## 4.0.0-beta.21
119
+
120
+ ### Major Changes
121
+
122
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
123
+
124
+ ### Patch Changes
125
+
126
+ - Updated dependencies [ef992f8]
127
+ - @ai-sdk/provider@4.0.0-beta.11
128
+ - @ai-sdk/provider-utils@5.0.0-beta.19
129
+
130
+ ## 4.0.0-beta.20
131
+
132
+ ### Patch Changes
133
+
134
+ - 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
135
+ - Updated dependencies [90e2d8a]
136
+ - @ai-sdk/provider-utils@5.0.0-beta.18
137
+
138
+ ## 4.0.0-beta.19
139
+
140
+ ### Patch Changes
141
+
142
+ - Updated dependencies [3ae1786]
143
+ - @ai-sdk/provider-utils@5.0.0-beta.17
144
+
145
+ ## 4.0.0-beta.18
146
+
147
+ ### Patch Changes
148
+
149
+ - Updated dependencies [176466a]
150
+ - @ai-sdk/provider@4.0.0-beta.10
151
+ - @ai-sdk/provider-utils@5.0.0-beta.16
152
+
153
+ ## 4.0.0-beta.17
154
+
155
+ ### Patch Changes
156
+
157
+ - Updated dependencies [e311194]
158
+ - @ai-sdk/provider@4.0.0-beta.9
159
+ - @ai-sdk/provider-utils@5.0.0-beta.15
160
+
161
+ ## 4.0.0-beta.16
162
+
163
+ ### Patch Changes
164
+
165
+ - Updated dependencies [34bd95d]
166
+ - Updated dependencies [008271d]
167
+ - @ai-sdk/provider@4.0.0-beta.8
168
+ - @ai-sdk/provider-utils@5.0.0-beta.14
169
+
170
+ ## 4.0.0-beta.15
171
+
172
+ ### Patch Changes
173
+
174
+ - Updated dependencies [b0c2869]
175
+ - Updated dependencies [7e26e81]
176
+ - @ai-sdk/provider-utils@5.0.0-beta.13
177
+
178
+ ## 4.0.0-beta.14
179
+
180
+ ### Patch Changes
181
+
182
+ - Updated dependencies [46d1149]
183
+ - @ai-sdk/provider-utils@5.0.0-beta.12
184
+
185
+ ## 4.0.0-beta.13
186
+
187
+ ### Patch Changes
188
+
189
+ - 6fd51c0: fix(provider): preserve error type prefix in getErrorMessage
190
+ - Updated dependencies [6fd51c0]
191
+ - @ai-sdk/provider-utils@5.0.0-beta.11
192
+ - @ai-sdk/provider@4.0.0-beta.7
193
+
194
+ ## 4.0.0-beta.12
195
+
196
+ ### Patch Changes
197
+
198
+ - c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
199
+ - Updated dependencies [c29a26f]
200
+ - @ai-sdk/provider-utils@5.0.0-beta.10
201
+ - @ai-sdk/provider@4.0.0-beta.6
202
+
203
+ ## 4.0.0-beta.11
204
+
205
+ ### Patch Changes
206
+
207
+ - 38fc777: Add AI Gateway hint to provider READMEs
208
+
209
+ ## 4.0.0-beta.10
210
+
211
+ ### Patch Changes
212
+
213
+ - Updated dependencies [2e17091]
214
+ - @ai-sdk/provider-utils@5.0.0-beta.9
215
+
3
216
  ## 4.0.0-beta.9
4
217
 
5
218
  ### Patch Changes
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  The **[Cohere provider](https://ai-sdk.dev/providers/ai-sdk-providers/cohere)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model support for the Cohere API.
4
4
 
5
+ > **Deploying to Vercel?** With Vercel's AI Gateway you can access Cohere (and hundreds of models from other providers) — no additional packages, API keys, or extra cost. [Get started with AI Gateway](https://vercel.com/ai-gateway).
6
+
5
7
  ## Setup
6
8
 
7
9
  The Cohere provider is available in the `@ai-sdk/cohere` module. You can install it with
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { ProviderV4, LanguageModelV4, EmbeddingModelV4, RerankingModelV4 } from
3
3
  import { FetchFunction } from '@ai-sdk/provider-utils';
4
4
 
5
5
  type CohereChatModelId = 'command-a-03-2025' | 'command-a-reasoning-08-2025' | 'command-r7b-12-2024' | 'command-r-plus-04-2024' | 'command-r-plus' | 'command-r-08-2024' | 'command-r-03-2024' | 'command-r' | 'command' | 'command-nightly' | 'command-light' | 'command-light-nightly' | (string & {});
6
- declare const cohereLanguageModelOptions: z.ZodObject<{
6
+ declare const cohereLanguageModelChatOptions: z.ZodObject<{
7
7
  thinking: z.ZodOptional<z.ZodObject<{
8
8
  type: z.ZodOptional<z.ZodEnum<{
9
9
  enabled: "enabled";
@@ -12,7 +12,7 @@ declare const cohereLanguageModelOptions: z.ZodObject<{
12
12
  tokenBudget: z.ZodOptional<z.ZodNumber>;
13
13
  }, z.core.$strip>>;
14
14
  }, z.core.$strip>;
15
- type CohereLanguageModelOptions = z.infer<typeof cohereLanguageModelOptions>;
15
+ type CohereLanguageModelChatOptions = z.infer<typeof cohereLanguageModelChatOptions>;
16
16
 
17
17
  type CohereRerankingModelId = 'rerank-v3.5' | 'rerank-english-v3.0' | 'rerank-multilingual-v3.0' | (string & {});
18
18
  type CohereRerankingModelOptions = {
@@ -114,4 +114,4 @@ declare const cohere: CohereProvider;
114
114
 
115
115
  declare const VERSION: string;
116
116
 
117
- export { type CohereLanguageModelOptions as CohereChatModelOptions, type CohereEmbeddingModelOptions, type CohereLanguageModelOptions, type CohereProvider, type CohereProviderSettings, type CohereRerankingModelOptions, type CohereRerankingModelOptions as CohereRerankingOptions, VERSION, cohere, createCohere };
117
+ export { type CohereLanguageModelChatOptions as CohereChatModelOptions, type CohereEmbeddingModelOptions, type CohereLanguageModelChatOptions, type CohereLanguageModelChatOptions as CohereLanguageModelOptions, type CohereProvider, type CohereProviderSettings, type CohereRerankingModelOptions, type CohereRerankingModelOptions as CohereRerankingOptions, VERSION, cohere, createCohere };