Skip to content

Add AGENTS.md to common AI provider#62824

Merged
kaxil merged 1 commit into
apache:mainfrom
astronomer:add/common-ai-agents-md
Mar 3, 2026
Merged

Add AGENTS.md to common AI provider#62824
kaxil merged 1 commit into
apache:mainfrom
astronomer:add/common-ai-agents-md

Conversation

@kaxil

@kaxil kaxil commented Mar 3, 2026

Copy link
Copy Markdown
Member

Summary

Adds providers/common/ai/AGENTS.md to guide AI coding tools and contributors toward correct design decisions when working on the common AI provider.

Why

PR #62816 added ~280 lines of Azure OpenAI builder/factory code that duplicated what pydantic-ai's AzureProvider already handles natively. An AGENTS.md in the provider directory would have steered the contributor (and AI coding tools like Cursor, Claude Code, Copilot) toward the simpler approach from the start.

What the file covers

  • Design principles: delegate to pydantic-ai, keep the hook thin, no premature abstractions
  • Adding new LLM providers: check pydantic-ai first, only add a get_conn() branch if needed
  • Security: no dynamic imports from connection extras, SQL validation stays on by default
  • Common pitfalls: don't construct raw SDK clients, don't add provider-specific connection types, use common.compat for SDK imports
  • Key file paths for quick navigation

Follows the style of airflow-core/src/airflow/api_fastapi/execution_api/AGENTS.md — domain-specific and concise, not generic setup. The root providers/AGENTS.md already covers general provider conventions.

Guide AI coding tools and contributors toward the right design
decisions: delegate to pydantic-ai instead of re-implementing
provider-specific logic, keep the hook thin, avoid premature
abstractions like builder patterns or registries.

Motivated by PR apache#62816 which added ~280 lines of Azure OpenAI
builder code that duplicated what pydantic-ai's AzureProvider
already handles natively.
@kaxil kaxil merged commit be73e4f into apache:main Mar 3, 2026
62 checks passed
@kaxil kaxil deleted the add/common-ai-agents-md branch March 3, 2026 22:08
dominikhei pushed a commit to dominikhei/airflow that referenced this pull request Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants