@@ -152,7 +152,7 @@ def test_init_default(self, monkeypatch):
152152
153153 component = CohereChatGenerator ()
154154 assert component .api_key == Secret .from_env_var (["COHERE_API_KEY" , "CO_API_KEY" ])
155- assert component .model == "command-r-plus "
155+ assert component .model == "command-r-08-2024 "
156156 assert component .streaming_callback is None
157157 assert component .api_base_url == "https://api.cohere.com"
158158 assert not component .generation_kwargs
@@ -190,7 +190,7 @@ def test_to_dict_default(self, monkeypatch):
190190 assert data == {
191191 "type" : "haystack_integrations.components.generators.cohere.chat.chat_generator.CohereChatGenerator" ,
192192 "init_parameters" : {
193- "model" : "command-r-plus " ,
193+ "model" : "command-r-08-2024 " ,
194194 "streaming_callback" : None ,
195195 "api_key" : {
196196 "env_vars" : ["COHERE_API_KEY" , "CO_API_KEY" ],
@@ -242,7 +242,7 @@ def test_from_dict(self, monkeypatch):
242242 data = {
243243 "type" : "haystack_integrations.components.generators.cohere.chat.chat_generator.CohereChatGenerator" ,
244244 "init_parameters" : {
245- "model" : "command-r-plus " ,
245+ "model" : "command-r-08-2024 " ,
246246 "api_base_url" : "test-base-url" ,
247247 "api_key" : {
248248 "env_vars" : ["ENV_VAR" ],
@@ -257,7 +257,7 @@ def test_from_dict(self, monkeypatch):
257257 },
258258 }
259259 component = CohereChatGenerator .from_dict (data )
260- assert component .model == "command-r-plus "
260+ assert component .model == "command-r-08-2024 "
261261 assert component .streaming_callback is print_streaming_chunk
262262 assert component .api_base_url == "test-base-url"
263263 assert component .generation_kwargs == {
@@ -271,7 +271,7 @@ def test_from_dict_fail_wo_env_var(self, monkeypatch):
271271 data = {
272272 "type" : "haystack_integrations.components.generators.cohere.chat.chat_generator.CohereChatGenerator" ,
273273 "init_parameters" : {
274- "model" : "command-r-plus " ,
274+ "model" : "command-r-08-2024 " ,
275275 "api_base_url" : "test-base-url" ,
276276 "api_key" : {
277277 "env_vars" : ["COHERE_API_KEY" , "CO_API_KEY" ],
@@ -303,7 +303,7 @@ def test_serde_in_pipeline(self, monkeypatch):
303303 )
304304
305305 generator = CohereChatGenerator (
306- model = "command-r-plus " ,
306+ model = "command-r-08-2024 " ,
307307 generation_kwargs = {"temperature" : 0.7 },
308308 streaming_callback = print_streaming_chunk ,
309309 tools = [tool ],
@@ -322,7 +322,7 @@ def test_serde_in_pipeline(self, monkeypatch):
322322 "generator" : {
323323 "type" : "haystack_integrations.components.generators.cohere.chat.chat_generator.CohereChatGenerator" , # noqa: E501
324324 "init_parameters" : {
325- "model" : "command-r-plus " ,
325+ "model" : "command-r-08-2024 " ,
326326 "api_key" : {"type" : "env_var" , "env_vars" : ["COHERE_API_KEY" , "CO_API_KEY" ], "strict" : True },
327327 "streaming_callback" : "haystack.components.generators.utils.print_streaming_chunk" ,
328328 "api_base_url" : "https://api.cohere.com" ,
0 commit comments