Skip to content

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

Closed
potiuk wants to merge 4 commits into
apache:mainfrom
potiuk:common-ai-docs-rc1-fixes
Closed

potiuk wants to merge 4 commits into
apache:mainfrom
potiuk:common-ai-docs-rc1-fixes

Conversation

@potiuk

@potiuk potiuk commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #74904. 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 (^[A-Za-z0-9.!+_-]+$) accepted . and .., which step the request onto another PyPI path (pypi/<name>/../json normalizes to /pypi/json). It now has to start with a letter or digit, like the name pattern: ^[A-Za-z0-9][A-Za-z0-9.!+_-]*$. Real versions such as 3.1.0, 1!2.0 and 2.0.0rc1 still match.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5)

Generated-by: Claude Code (Opus 5) following the guidelines

🤖 Generated with Claude Code

kaxil and others added 3 commits October 17, 2026 23:50
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.
The supported-services toolsets table allows one doc link per row, and
the extra link to the sandbox backends page broke that check; the row
already links the sandbox page, which leads to the backends.

System One is only available from pydantic-ai 2.53.0, while the lock is
on 2.48.0 and every declared vendor must exist from 2.45.0, so the
vendor list cannot claim it yet. decision_models.rst still documents
the system-one: prefix.

The custom-toolset example's version pattern now has to start with a
letter or digit like the name pattern, so a version of "." or ".." can
no longer step the request onto another PyPI path, as the guide says.

Generated-by: Claude Opus 5
They ship in 1.0.0rc3, which re-cuts the unannounced rc2 to include them.

Generated-by: Claude Opus 5
@potiuk

potiuk commented Oct 17, 2026

Copy link
Copy Markdown
Member Author

Merged #74904 instead.

@potiuk potiuk changed the title Fix stale Common AI docs and add a guide to writing a toolset Keep the custom-toolset example's version from changing the PyPI path Oct 17, 2026
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