{"id":23262,"library":"apache-airflow-providers-cohere","title":"Apache Airflow Providers Cohere","description":"Apache Airflow provider for integrating with Cohere, enabling workflows that leverage Cohere's large language models for text generation, embedding, classification, and summarization. Current version 1.6.5, released on 2025-03-07. Active development with regular releases.","status":"active","version":"1.6.5","language":"python","source_language":"en","source_url":"https://github.com/astronomer/airflow-providers-cohere","tags":["airflow","cohere","provider","llm","ml"],"install":[{"cmd":"pip install apache-airflow-providers-cohere","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required: provider runs within Airflow","package":"apache-airflow","optional":true},{"reason":"Required: official Cohere Python SDK","package":"cohere","optional":false}],"imports":[{"note":"Old import path had '_hook' suffix, deprecated in v1.0.0","wrong":"from airflow.providers.cohere.hooks.cohere_hook import CohereHook","symbol":"CohereHook","correct":"from airflow.providers.cohere.hooks.cohere import CohereHook"},{"note":"Operator module renamed; use 'embedding'","wrong":"from airflow.providers.cohere.operators.cohere_embedding import CohereEmbeddingOperator","symbol":"CohereEmbeddingOperator","correct":"from airflow.providers.cohere.operators.embedding import CohereEmbeddingOperator"}],"quickstart":{"code":"from airflow import DAG\nfrom airflow.providers.cohere.hooks.cohere import CohereHook\nfrom airflow.providers.cohere.operators.embedding import CohereEmbeddingOperator\nfrom datetime import datetime\n\nwith DAG('cohere_demo', start_date=datetime(2024,1,1), schedule=None) as dag:\n    embed = CohereEmbeddingOperator(\n        task_id='embed_text',\n        conn_id='cohere_default',\n        text='Hello, world!',\n        model='embed-english-v3.0',\n        input_type='search_document'\n    )\n","lang":"python","description":"Create a DAG with a Cohere embedding operator. Requires a Cohere connection in Airflow."},"warnings":[{"fix":"Update imports to use 'hooks.cohere' and 'operators.embedding'.","message":"Upgrading from provider versions <1.0.0 to >=1.0.0 changed hook and operator import paths. Old paths (with unerlying 'cohere_hook' or 'cohere_embedding' modules) no longer work. Use the current imports shown above.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Replace CohereGenerateOperator with CohereTextGenOperator from 'airflow.providers.cohere.operators.text_gen'.","message":"The 'CohereGenerateOperator' is deprecated as of v1.3.0. Use 'CohereTextGenOperator' instead.","severity":"deprecated","affected_versions":">=1.3.0"},{"fix":"Create a Cohere connection in Airflow UI: Conn Id: cohere_default, Conn Type: Cohere, Login: (your API key). Host: https://api.cohere.com","message":"Cohere API keys are typically stored in an Airflow connection with conn_type='cohere'. Ensure the connection ID matches the root path of Cohere's API base (https://api.cohere.com). Incorrect base can cause 401 errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'-03':34 '-07':35 '1.6.5':30 '2025':33 'activ':36 'airflow':2,6,41 'apach':1,5 'classif':25 'coher':4,11,16,42 'current':28 'develop':37 'embed':24 'enabl':12 'generat':23 'integr':9 'languag':19 'larg':18 'leverag':15 'llm':44 'ml':45 'model':20 'provid':3,7,43 'regular':39 'releas':31,40 'summar':27 'text':22 'version':29 'workflow':13","created_at":"2026-05-01T08:06:49.516739+00:00","updated_at":"2026-05-01T08:06:49.516739+00:00","problems":[{"fix":"pip install apache-airflow-providers-cohere","cause":"The provider package is not installed.","error":"ModuleNotFoundError: No module named 'airflow.providers.cohere'"},{"fix":"Use correct import: from airflow.providers.cohere.hooks.cohere import CohereHook","cause":"The hook class name changed or path is wrong. In older versions it was 'CohereHook' in 'cohere_hook' module.","error":"ImportError: cannot import name 'CohereHook' from 'airflow.providers.cohere.hooks.cohere'"},{"fix":"Use hook.conn instead of hook.get_conn()","cause":"The hook API changed; get_conn was removed in place of a 'conn' property.","error":"AttributeError: 'CohereHook' object has no attribute 'get_conn'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.6.6","cli_name":"airflow","cli_version":"","type":"library","homepage":null,"github":"https://github.com/apache/airflow","docs":"https://airflow.apache.org/docs/apache-airflow-providers-cohere/1.6.5","changelog":"https://airflow.apache.org/docs/apache-airflow-providers-cohere/1.6.5/changelog.html","pypi":"https://pypi.org/project/apache-airflow-providers-cohere/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["llm-agents","ai-ml","workflow"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}