kaxil opened a new pull request, #76495: URL: https://github.com/apache/airflow/pull/76495
Two Common AI errors told the user about something they never used. **`MCPToolset` through a framework adapter.** `AirflowTools(MCPToolset(...))` raised a `NotImplementedError` that pointed users of every adapter at Strands' `MCPClient` or ADK's `McpToolset`, and called the adapters "the framework-neutral tools", a term only the provider's internals use. It now raises `MCPToolsetNotSupportedError`, still a `NotImplementedError`, and each adapter names its own way to connect an MCP server: | Adapter | The error now says | |---|---| | OpenAI Agents SDK | pass the server to the agent's `mcp_servers` with one of the SDK's `MCPServer` classes, such as `MCPServerStreamableHttp` | | Anthropic tool runner (sync and async) | run with `AsyncAnthropic` and `AsyncAirflowTools`, converting the tools with `anthropic.lib.tools.mcp.async_mcp_tool()` | | Claude Agent SDK | pass the server to `build_options(mcp_servers=...)` and its `mcp__<name>__*` tools to `allowed_tools` | | Strands | connect Strands' `MCPClient` | | ADK | connect ADK's `McpToolset` | Outside an adapter the message keeps the generic "connect your framework's own MCP client". The framework pages for Anthropic and the Claude Agent SDK now say the same as their errors. **`durable_cache_path` from `run_durably()`.** On Airflow before 3.3, a missing `[common.ai] durable_cache_path` raised `durable=True requires ...`, but callers of `run_durably()` and `run_durably_sync()` never pass `durable=True`. The error and the option's description in `provider.yaml` now talk about durable execution instead. ## Design rationale **The adapter's hint goes through a private `_collect_tools()`, not a new keyword on `collect_tools()`.** `collect_tools` is listed as stable for third-party adapters in [`stability.rst`](https://github.com/apache/airflow/blob/953d7ff3d6a741d12a8d63b6d8a4be1b7b94e654/providers/common/ai/docs/stability.rst?plain=1#L169-L176), and a message fix shouldn't add to that surface. Its signature is unchanged, and a third-party adapter that calls it gets the generic message. **Both Anthropic runners point at the async helper.** The SDK's sync `mcp_tool()` calls each tool through `anyio.from_thread.run(client.call_tool, ...)`, which needs an AnyIO worker thread with the MCP session open on its loop. A sync task has neither. `async_mcp_tool()` exists from `anthropic` 1.1.0, the provider's floor. Before and after, from `airflow dags test` on Airflow 3.2.2 with `openai-agents` 0.20.0 and no `durable_cache_path` set: -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
