diff --git a/airflow/providers/cohere/hooks/cohere.py b/airflow/providers/cohere/hooks/cohere.py index 3b60c9060c361..2ce40c74d1e8e 100644 --- a/airflow/providers/cohere/hooks/cohere.py +++ b/airflow/providers/cohere/hooks/cohere.py @@ -53,7 +53,7 @@ def __init__( self.max_retries = max_retries @cached_property - def get_conn(self) -> cohere.Client: + def get_conn(self) -> cohere.Client: # type: ignore[override] conn = self.get_connection(self.conn_id) return cohere.Client( api_key=conn.password, timeout=self.timeout, max_retries=self.max_retries, api_url=conn.host diff --git a/airflow/providers/cohere/provider.yaml b/airflow/providers/cohere/provider.yaml index f3e218b8f3c42..43d3f35372183 100644 --- a/airflow/providers/cohere/provider.yaml +++ b/airflow/providers/cohere/provider.yaml @@ -42,7 +42,7 @@ integrations: dependencies: - apache-airflow>=2.6.0 - - cohere>=4.37 + - cohere>=4.37,<5 hooks: - integration-name: Cohere diff --git a/generated/provider_dependencies.json b/generated/provider_dependencies.json index 66d19d2563505..d09846e29a3ff 100644 --- a/generated/provider_dependencies.json +++ b/generated/provider_dependencies.json @@ -330,7 +330,7 @@ "cohere": { "deps": [ "apache-airflow>=2.6.0", - "cohere>=4.37" + "cohere>=4.37,<5" ], "devel-deps": [], "cross-providers-deps": [], diff --git a/pyproject.toml b/pyproject.toml index a65d8695d08b7..277a212634c8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -663,7 +663,7 @@ cncf-kubernetes = [ # source: airflow/providers/cncf/kubernetes/provider.yaml "kubernetes_asyncio>=28.1.0,<=29.0.0", ] cohere = [ # source: airflow/providers/cohere/provider.yaml - "cohere>=4.37", + "cohere>=4.37,<5", ] common-io = [] # source: airflow/providers/common/io/provider.yaml common-sql = [ # source: airflow/providers/common/sql/provider.yaml