Registry / llm-agents / apache-airflow-providers-cohere

apache-airflow-providers-cohere

JSON →
library1.6.6pypypi✓ verified 69d ago

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.

pip install apache-airflow-providers-cohere
INSTALL
IMPORT
SIG · APACHE-AIRFLOW-PRO
A
apache-airflow-providers-cohere
llm-agentspythonv1.6.6
Install
25.7s avg
Import
4786ms
Disk
303MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.6.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 4.964s · 310.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 25.7s · import 4.608s · 293MB
303MB installed
● package 303MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CohereHook
from airflow.providers.cohere.hooks.cohere import CohereHook
from airflow.providers.cohere.hooks.cohere_hook import CohereHook
Old import path had '_hook' suffix, deprecated in v1.0.0
CohereEmbeddingOperator
from airflow.providers.cohere.operators.embedding import CohereEmbeddingOperator
from airflow.providers.cohere.operators.cohere_embedding import CohereEmbeddingOperator
Operator module renamed; use 'embedding'

Create a DAG with a Cohere embedding operator. Requires a Cohere connection in Airflow.

from airflow import DAG from airflow.providers.cohere.hooks.cohere import CohereHook from airflow.providers.cohere.operators.embedding import CohereEmbeddingOperator from datetime import datetime with DAG('cohere_demo', start_date=datetime(2024,1,1), schedule=None) as dag: embed = CohereEmbeddingOperator( task_id='embed_text', conn_id='cohere_default', text='Hello, world!', model='embed-english-v3.0', input_type='search_document' )
airflow --version
Debug
Known issues
breakingUpgrading 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.
fix
Update imports to use 'hooks.cohere' and 'operators.embedding'.
affects: <1.0.0
deprecatedThe 'CohereGenerateOperator' is deprecated as of v1.3.0. Use 'CohereTextGenOperator' instead.
fix
Replace CohereGenerateOperator with CohereTextGenOperator from 'airflow.providers.cohere.operators.text_gen'.
affects: >=1.3.0
gotchaCohere 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.
fix
Create a Cohere connection in Airflow UI: Conn Id: cohere_default, Conn Type: Cohere, Login: (your API key). Host: https://api.cohere.com
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'airflow.providers.cohere'
The provider package is not installed.
fix
pip install apache-airflow-providers-cohere
ImportError: cannot import name 'CohereHook' from 'airflow.providers.cohere.hooks.cohere'
The hook class name changed or path is wrong. In older versions it was 'CohereHook' in 'cohere_hook' module.
fix
Use correct import: from airflow.providers.cohere.hooks.cohere import CohereHook
AttributeError: 'CohereHook' object has no attribute 'get_conn'
The hook API changed; get_conn was removed in place of a 'conn' property.
fix
Use hook.conn instead of hook.get_conn()
Upgrade
Version history
1.6.6latest on PyPI · released Jun 7, 2026
Audit
Dependencies
apache-airflowoptionalRequired: provider runs within Airflow
cohererequiredRequired: official Cohere Python SDK
Agent activity
58 hits · last 30 days
node
52
Amazon
1
Google (AI)
1
Resources
apache-airflow-providers-cohere — pip install apache-airflow-providers-cohere · libregistry