---
title: How do you find LLM calls hidden in Airflow and dbt pipelines?
url: https://opencontroller.lyzr.com/blog/find-llm-calls-in-airflow-and-dbt-pipelines
published: 2026-11-17
updated: 2026-11-17
author: Lyzr
---

# How do you find LLM calls hidden in Airflow and dbt pipelines?

**Check four places: the Airflow provider packages you install, the DAG code (LLM decorators, operators and SDK imports), the Airflow connections that hold model credentials, and dbt models that call warehouse AI functions. Then record who the pipeline runs as and which data it sends. Pipelines are automated by design, so an LLM step in one runs every day without anyone watching.**

Data teams were early adopters of LLMs for classification, extraction and summarisation. Those steps often sit inside orchestration code that security teams never review. They are AI workflows with service identities, production data and schedules. Find them as part of your [shadow AI discovery](/blog/how-to-find-shadow-ai-agents).

## What changed in Airflow in 2026?

Apache Airflow added a first-party way to call models. The `apache-airflow-providers-common-ai` package was first released on 14 April 2026 and needs Airflow 3.0 or later. It runs on Pydantic AI and holds the model choice in an Airflow connection, referenced by `llm_conn_id`. That makes discovery easier, because LLM use now has standard names.

| What to look for | Examples |
|---|---|
| TaskFlow decorators | `@task.llm`, `@task.agent`, `@task.llm_branch`, `@task.llm_sql`, `@task.llm_file_analysis`, `@task.llm_schema_compare` |
| Operators and hooks | `LLMOperator`, `AgentOperator`, `PydanticAIHook` |
| Toolsets an agent can use | `SQLToolset`, `HookToolset`, `MCPToolset`, `DataFusionToolset` |
| Connection types | `pydanticai`, `pydanticai-azure`, `pydanticai-bedrock`, `pydanticai-vertex` |

Note `@task.agent` with `MCPToolset` or `SQLToolset`: that is an agent with tools running on a schedule, not just a model call. Treat it with the same care as any [MCP-connected agent](/blog/how-to-govern-mcp-servers).

## How do you find LLM use in Airflow, step by step?

1. **List installed providers.** Check each Airflow environment's requirements for `apache-airflow-providers-common-ai` and model-specific providers such as `apache-airflow-providers-openai`.
2. **Search DAG code.** Grep the DAG repositories for the decorators and operators above, plus direct SDK imports such as `openai`, `anthropic`, `google.genai`, `boto3` with `bedrock-runtime`, and `langchain`. The [source code discovery](/blog/find-ai-agents-in-source-code) patterns apply.
3. **List connections.** Use the Airflow REST API or CLI to list connections, then flag the `pydanticai*` types and any HTTP connections whose host is a model provider. Check your secrets backend too, since connections may live there.
4. **Map tasks to data.** For each LLM task, record the upstream tables or files and their classification.
5. **Record the identity.** Note which worker service account or cloud role runs the task and what else it can reach.

## How do you find LLM use in dbt?

dbt rarely calls models directly. It calls them through the warehouse.

- **Search compiled SQL.** After `dbt compile`, the manifest holds compiled code for each model. Search it for warehouse AI functions such as `AI_COMPLETE`, `ai_query` or `AI.GENERATE`. The full lists are in [finding AI SQL functions in data warehouses](/blog/find-ai-sql-functions-in-data-warehouses).
- **Check macros.** Teams often wrap AI calls in a macro, so search macro files and their callers.
- **Check Python models.** dbt Python models can import model SDKs directly. Search them like any other code.
- **Note materialisation.** An incremental model that calls a model on new rows runs every load. A full-refresh model calls it on every row, every run, which matters for cost.

## Which risks show up most often?

| Finding | Risk | Fix |
|---|---|---|
| API key in a DAG file or variable | Leaked or shared key | Move to a secrets backend and rotate |
| One connection shared by many DAGs | No cost or owner attribution | One connection per use case, routed through a gateway |
| Personal data sent to an external model | Data protection exposure | Mask columns or use an approved model |
| Agent task with SQL write access | Unreviewed changes to data | Read-only toolsets; review like code |
| No owner on the DAG | Nobody to call on failure | Assign owner in the DAG and the AI inventory |

Add these checks to the same review that covers [AI agents in CI/CD pipelines](/blog/find-ai-agents-in-ci-cd-pipelines), so every new DAG or model is scanned before merge.

## How Opencontroller does this

Opencontroller's LLM Gateway exposes OpenAI-compatible endpoints with routing, fallback and retry, caching, and cost attribution per agent and per version, so a pipeline connection can point at it and become attributable. Auto-discovery finds agents, models and API keys across AWS, Azure and Google Cloud, and the registry tracks owners. To see it, [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Does Airflow have built-in LLM operators?**
Yes, through the common.ai provider, released in April 2026 for Airflow 3.0 and later.

**How do we find AI use in dbt projects?**
Search compiled SQL for warehouse AI functions and Python models for SDK imports, in CI on every project.

**Is a scheduled LLM task an agent?**
A single model call is a workflow step. A task using `@task.agent` with tools is an agent and should be governed like one.

## Key facts

To find LLM calls in Airflow and dbt pipelines, check four places: installed Airflow provider packages (apache-airflow-providers-common-ai, first released 14 April 2026 for Airflow 3.0+, and older provider packages such as openai); DAG code for the @task.llm, @task.agent, @task.llm_sql and related decorators, LLMOperator, AgentOperator and direct SDK imports; Airflow connections of types pydanticai, pydanticai-azure, pydanticai-bedrock and pydanticai-vertex or with model-provider hosts; and dbt models whose compiled SQL calls warehouse AI functions or whose Python models import model SDKs. Then record the scheduler identity, data sources and owner. Opencontroller by Lyzr includes an LLM Gateway with cost attribution per agent. Pricing starts from $250K per deployment per year.

## Related

- [How do you find AI SQL functions running in your data warehouse?](https://opencontroller.lyzr.com/blog/find-ai-sql-functions-in-data-warehouses.md)
- [How do you find AI agents running in CI/CD pipelines?](https://opencontroller.lyzr.com/blog/find-ai-agents-in-ci-cd-pipelines.md)
- [How do you find AI agents in your code repositories?](https://opencontroller.lyzr.com/blog/find-ai-agents-in-source-code.md)
- [More on Discovery and shadow agents](https://opencontroller.lyzr.com/blog/cluster/discovery-and-shadow-agents)
