{"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,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","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,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}