Drop the temporary pydantic-ai pin: require released pydantic-ai-slim>=2.13.0

pydantic-ai 2.13.0 shipped #6333's `get_model`/`resolve_model_id`/`for_agent`
hooks to PyPI, so the temporary `[tool.uv.sources]` git pin is no longer
needed. Resolve from PyPI and raise the floor from the historical 2.1.0 to
2.13.0, since `ManagedAgent` requires `get_model`. Full suite + 100%
coverage green against released 2.13.0.
This commit is contained in:
Douwe Maan
2026-07-20 17:30:27 +00:00
parent de2d29af79
commit 0834f3b0fb
2 changed files with 22 additions and 25 deletions
+5 -16
View File
@@ -29,7 +29,9 @@ classifiers = [
]
dependencies = [
"httpx>=0.28.1",
"pydantic-ai-slim>=2.1.0",
# `ManagedAgent` requires the `AbstractCapability.get_model()` hook (pydantic-ai#6333, first
# released in 2.13.0), so the floor is 2.13.0 rather than the historical 2.1.0.
"pydantic-ai-slim>=2.13.0",
]
[project.optional-dependencies]
@@ -48,7 +50,7 @@ dbos = [
]
logfire = [
'logfire>=4.31.0',
"pydantic-ai-slim[spec]>=2.1.0",
"pydantic-ai-slim[spec]>=2.13.0",
]
[project.urls]
@@ -70,7 +72,7 @@ dev = [
'logfire[httpx]>=4.31.0',
'dirty-equals>=0.9.0',
'inline-snapshot>=0.32.5',
'pydantic-ai-slim[spec]>=2.1.0',
'pydantic-ai-slim[spec]>=2.13.0',
"pytest-examples>=0.0.18",
"pytest-recording>=0.13.4",
]
@@ -79,19 +81,6 @@ lint = [
'pyright>=1.1.408',
]
[tool.uv.sources]
# TEMPORARY PIN — remove when the pydantic-ai release that includes #6333 lands on PyPI.
# pydantic-ai#6333 (MERGED to `main`) adds the `AbstractCapability.get_model()` hook that `ManagedAgent`
# uses to source the agent's model with correct precedence (fixing the model-less-agent and
# `run(model=...)`-loses-to-managed-model limits). Its selector form — `get_model()` returning a
# callable that receives `ModelSelectionContext` (with `.agent`/`.deps`) — is what lets a *nameless*
# `ManagedAgent` source the model too, deriving its variable from the agent at selection time. The
# current PyPI release (2.12.0) predates the merge, so we pin to the merge commit on `main` until the
# next release ships the hook, at which point this source drops and we resolve from the `>=` floor above.
# NOTE: `pydantic-ai-slim` lives in the `pydantic_ai_slim/` subdirectory of the monorepo. Pinned to an
# explicit rev (not `branch = 'main'`) so the resolution is reproducible and doesn't drift as main moves.
pydantic-ai-slim = { git = 'https://github.com/pydantic/pydantic-ai.git', rev = '9688a9cca2fcf81451cdac35e701250dbdfec75e', subdirectory = 'pydantic_ai_slim' }
[tool.hatch.version]
source = 'uv-dynamic-versioning'
Generated
+17 -9
View File
@@ -1059,10 +1059,10 @@ lint = [
requires-dist = [
{ name = "httpx", specifier = ">=0.28.1" },
{ name = "logfire", marker = "extra == 'logfire'", specifier = ">=4.31.0" },
{ name = "pydantic-ai-slim", git = "https://github.com/pydantic/pydantic-ai.git?subdirectory=pydantic_ai_slim&rev=9688a9cca2fcf81451cdac35e701250dbdfec75e" },
{ name = "pydantic-ai-slim", extras = ["dbos"], marker = "extra == 'dbos'", git = "https://github.com/pydantic/pydantic-ai.git?subdirectory=pydantic_ai_slim&rev=9688a9cca2fcf81451cdac35e701250dbdfec75e" },
{ name = "pydantic-ai-slim", extras = ["spec"], marker = "extra == 'logfire'", git = "https://github.com/pydantic/pydantic-ai.git?subdirectory=pydantic_ai_slim&rev=9688a9cca2fcf81451cdac35e701250dbdfec75e" },
{ name = "pydantic-ai-slim", extras = ["temporal"], marker = "extra == 'temporal'", git = "https://github.com/pydantic/pydantic-ai.git?subdirectory=pydantic_ai_slim&rev=9688a9cca2fcf81451cdac35e701250dbdfec75e" },
{ name = "pydantic-ai-slim", specifier = ">=2.13.0" },
{ name = "pydantic-ai-slim", extras = ["dbos"], marker = "extra == 'dbos'" },
{ name = "pydantic-ai-slim", extras = ["spec"], marker = "extra == 'logfire'", specifier = ">=2.13.0" },
{ name = "pydantic-ai-slim", extras = ["temporal"], marker = "extra == 'temporal'" },
{ name = "pydantic-monty", marker = "extra == 'code-mode'", specifier = ">=0.0.16" },
{ name = "pydantic-monty", marker = "extra == 'codemode'", specifier = ">=0.0.16" },
]
@@ -1076,7 +1076,7 @@ dev = [
{ name = "inline-snapshot", specifier = ">=0.32.5" },
{ name = "logfire", extras = ["httpx"], specifier = ">=4.31.0" },
{ name = "pydantic-ai-harness", extras = ["code-mode"] },
{ name = "pydantic-ai-slim", extras = ["spec"], git = "https://github.com/pydantic/pydantic-ai.git?subdirectory=pydantic_ai_slim&rev=9688a9cca2fcf81451cdac35e701250dbdfec75e" },
{ name = "pydantic-ai-slim", extras = ["spec"], specifier = ">=2.13.0" },
{ name = "pytest", specifier = ">=9.0.0" },
{ name = "pytest-anyio" },
{ name = "pytest-examples", specifier = ">=0.0.18" },
@@ -1089,8 +1089,8 @@ lint = [
[[package]]
name = "pydantic-ai-slim"
version = "2.12.1.dev10+9688a9cc"
source = { git = "https://github.com/pydantic/pydantic-ai.git?subdirectory=pydantic_ai_slim&rev=9688a9cca2fcf81451cdac35e701250dbdfec75e#9688a9cca2fcf81451cdac35e701250dbdfec75e" }
version = "2.13.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "exceptiongroup", marker = "python_full_version < '3.11'" },
{ name = "genai-prices" },
@@ -1101,6 +1101,10 @@ dependencies = [
{ name = "pydantic-graph" },
{ name = "typing-inspection" },
]
sdist = { url = "https://files.pythonhosted.org/packages/cc/cc/aeaef08962f86e4ad76f8f741138590fe9415b3e5085193dbcc621f76518/pydantic_ai_slim-2.13.0.tar.gz", hash = "sha256:3d5f4e5012dc0a4b0e9f76268ce8afd734191b48dbccbf221ac7d030d9e8fcae", size = 839266, upload-time = "2026-07-18T02:55:47.076Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/77/4e/24f932dfe7c29c23fc875c774acfae4330218362705faa9f590f43ef40da/pydantic_ai_slim-2.13.0-py3-none-any.whl", hash = "sha256:b56b4bf2d5bfcadc0f83a5da16c750b013a2d79cebc2170501ed82435acf39f1", size = 1019269, upload-time = "2026-07-18T02:55:40.017Z" },
]
[package.optional-dependencies]
dbos = [
@@ -1232,14 +1236,18 @@ wheels = [
[[package]]
name = "pydantic-graph"
version = "2.12.1.dev10+9688a9cc"
source = { git = "https://github.com/pydantic/pydantic-ai.git?subdirectory=pydantic_graph&rev=9688a9cca2fcf81451cdac35e701250dbdfec75e#9688a9cca2fcf81451cdac35e701250dbdfec75e" }
version = "2.13.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "httpx" },
{ name = "logfire-api" },
{ name = "pydantic" },
{ name = "typing-inspection" },
]
sdist = { url = "https://files.pythonhosted.org/packages/76/94/ff70ba2c05dddb4c503c6adae5e3f019b01b896e44805bda3b8f84feadfb/pydantic_graph-2.13.0.tar.gz", hash = "sha256:0b77975fef41c993744d06f6e56c49afdbfedb23e8984fe46b2f962dcf90f556", size = 43939, upload-time = "2026-07-18T02:55:49.153Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/b4/87/c70957d6c519d1cb7375ffdcbe7bf28cf755a2efbf53863c9c4595c91e8e/pydantic_graph-2.13.0-py3-none-any.whl", hash = "sha256:65c51707c36fcc146d2d4130ed26c3186803419b126f72709b77181d0bb0e82e", size = 51656, upload-time = "2026-07-18T02:55:43.041Z" },
]
[[package]]
name = "pydantic-handlebars"