Skip to content

Fix stale Common AI docs and add a guide to writing a toolset - #74904

Merged
potiuk merged 5 commits into
apache:mainfrom
astronomer:common-ai-docs-rc1-fixes
Oct 17, 2026
Merged

potiuk merged 5 commits into
apache:mainfrom
astronomer:common-ai-docs-rc1-fixes

Conversation

@kaxil

@kaxil kaxil commented Oct 17, 2026

Copy link
Copy Markdown
Member

Fixes docs statements in the Common AI provider that don't match what the provider does. Each one turned up while testing 1.0.0rc1 (#74741), and each was rechecked against main before editing.

  • Supported services. The SandboxToolset row named only Docker Sandboxes. It now lists all six shipped backends (Modal, Islo, OpenSandbox, OpenShell, Boat, sbx). The managed-agent row named Snowflake Cortex Agents and Azure AI Foundry, but no provider implements them. Only BedrockAgentCoreHook (amazon) and AgentEngineHook (google) implement the managed-agent contract on main. The DataFusion row gains Azure Blob Storage (Add Azure Blob Storage support to the DataFusion object storage layer #73374) and GCS, which common.sql's DataFusion object-store providers support.
  • System One servers are added to the pydanticai connection's external-services in provider.yaml. The supported-services page is generated from that list, and decision_models.rst documents the system-one: prefix. get_provider_info.py is regenerated.
  • Changelog, get_schema note. It said "check truncated first". A full result has no truncated key, so result["truncated"] raises KeyError on every table that isn't summarized. It now says result.get("truncated").
  • Install lines. The Anthropic, Strands and ADK guides all use SQLToolset, which imports sqlglot from this provider's sql extra. Following any of them in a fresh environment failed with ModuleNotFoundError: No module named 'sqlglot'. DataFusionToolset has the same import guard, so its page now names both extras.
  • New guide: writing your own toolset (toolsets/custom.rst). Until now, subclassing AirflowToolset and implementing execute_tool (Make execute_tool the public method AirflowToolset subclasses implement #73938) was documented only in docstrings. The guide uses a new example Dag, a small toolset over PyPI's JSON API through HttpHook. It covers id, get_tools, execute_tool, agent_template_fields, replayable, which exceptions reach the model and which fail the task, run_blocking, and using the toolset from other frameworks. The JSON output and retry prompt shown on the page come from a run of the toolset against pypi.org. Like everything not on the stability page's stable list, the page is marked experimental.

README.rst's htt ps typo is left alone. The release-prep README regeneration rewrites the whole file from a template that has the correct URL.

The durable-execution items from the same testing are fixed in code in a separate PR, so the 1.0.0 changelog's durable note stays as it is: the code change makes it accurate.

Correct statements in the Common AI provider docs that do not match what the
provider does, found while testing 1.0.0rc1 (apache#74741):

- Supported services: list every shipped sandbox backend, only the
  managed-agent services a provider hook implements, Azure Blob Storage and
  GCS for DataFusion, and System One servers for the pydanticai connection.
- Changelog: a full get_schema result has no "truncated" key, so callers
  read it with result.get("truncated").
- Install lines: the Anthropic, Strands and ADK guides and the DataFusion
  toolset need the sql extra for sqlglot.
- New guide for subclassing AirflowToolset and implementing execute_tool.
The example now constrains package names and versions with a pattern, so
the model cannot point the HTTP call at another path on the host, and gives
the blocking request a 30-second timeout, since run_blocking serializes
every blocking call in the process. The guide also says what a changed
toolset id costs a durable retry: every step from that toolset's first
call on runs again.

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two of the provider metadata tests fail in every Compat, Non-DB and LowestDeps job, and both failures come from this PR. The suggestions below fix them. rc2 of 1.0.0 is already cut, so this will ship in 1.0.1.


Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting

Comment thread providers/common/ai/provider.yaml Resolved
@potiuk

potiuk commented Oct 17, 2026

Copy link
Copy Markdown
Member

Thanks @kaxil! Maintainer edits are off on this branch, so I opened #74935 with your two commits (authorship kept) plus the fixes from my review, and a 1.0.0 changelog entry so it goes into rc3. Closing this one in favour of it.


Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting

@potiuk potiuk closed this Oct 17, 2026
@potiuk potiuk reopened this Oct 17, 2026
@potiuk

potiuk commented Oct 17, 2026

Copy link
Copy Markdown
Member

Ah I see you just merged it :)

@potiuk
potiuk merged commit 70363ba into apache:main Oct 17, 2026
81 of 85 checks passed
potiuk added a commit that referenced this pull request Oct 17, 2026
common.ai 1.0.0rc2 was never put to a vote, so it is re-cut as rc3 to include the docs fixes from #74904 and #74935.

Generated-by: Claude Opus 5
potiuk added a commit to potiuk/airflow that referenced this pull request Oct 17, 2026
…he#74935

The entry merged in apache#74937 cited apache#74935, which was closed in favour of apache#74904 before this fix could land through it; the fix ships through apache#74939. apache#74937 itself goes in the excluded block.

Generated-by: Claude Opus 5
potiuk added a commit that referenced this pull request Oct 17, 2026
…#74939)

* Keep the custom-toolset example's version from changing the PyPI path

The writing-a-toolset guide says the example's pattern constraints keep
a name or version from changing the URL the hook calls, but the version
pattern accepted "." and "..", which step the request onto another PyPI
path. It now has to start with a letter or digit, like the name pattern.

Generated-by: Claude Opus 5

* Point the 1.0.0 changelog entry at this PR instead of the closed #74935

The entry merged in #74937 cited #74935, which was closed in favour of #74904 before this fix could land through it; the fix ships through #74939. #74937 itself goes in the excluded block.

Generated-by: Claude Opus 5
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