pydantic-ai 1.28.0__tar.gz → 1.41.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,48 +79,23 @@ update-examples: ## Update documentation examples
79
79
  update-vcr-tests: ## Update tests using VCR that hit LLM APIs; note you'll need to set API keys as appropriate
80
80
  uv run -m pytest --record-mode=rewrite tests
81
81
 
82
- # `--no-strict` so you can build the docs without insiders packages
82
+ # `--no-strict` so you can build the docs without fixing all warnings
83
83
  .PHONY: docs
84
84
  docs: ## Build the documentation
85
85
  uv run mkdocs build --no-strict
86
86
 
87
- # `--no-strict` so you can build the docs without insiders packages
87
+ # `--no-strict` so you can build the docs without fixing all warnings
88
88
  .PHONY: docs-serve
89
89
  docs-serve: ## Build and serve the documentation
90
90
  uv run mkdocs serve --no-strict
91
91
 
92
- .PHONY: .docs-insiders-install
93
- .docs-insiders-install: ## Install insiders packages for docs if necessary
94
- ifeq ($(shell uv pip show mkdocs-material | grep -q insiders && echo 'installed'), installed)
95
- @echo 'insiders packages already installed'
96
- else ifeq ($(PPPR_TOKEN),)
97
- @echo "Error: PPPR_TOKEN is not set, can't install insiders packages"
98
- @exit 1
99
- else
100
- @echo 'installing insiders packages...'
101
- @uv pip install --reinstall --no-deps \
102
- --extra-index-url https://pydantic:${PPPR_TOKEN}@pppr.pydantic.dev/simple/ \
103
- mkdocs-material mkdocstrings-python
104
- endif
105
-
106
- .PHONY: docs-insiders
107
- docs-insiders: .docs-insiders-install ## Build the documentation using insiders packages
108
- uv run --no-sync mkdocs build -f mkdocs.insiders.yml
109
-
110
- .PHONY: docs-serve-insiders
111
- docs-serve-insiders: .docs-insiders-install ## Build and serve the documentation using insiders packages
112
- uv run --no-sync mkdocs serve -f mkdocs.insiders.yml
113
-
114
92
  .PHONY: cf-pages-build
115
93
  cf-pages-build: ## Install uv, install dependencies and build the docs, used on CloudFlare Pages
116
94
  curl -LsSf https://astral.sh/uv/install.sh | sh
117
95
  uv python install 3.12
118
96
  uv sync --python 3.12 --frozen --group docs
119
- uv pip install --reinstall --no-deps \
120
- --extra-index-url https://pydantic:${PPPR_TOKEN}@pppr.pydantic.dev/simple/ \
121
- mkdocs-material mkdocstrings-python
122
97
  uv pip freeze
123
- uv run --no-sync mkdocs build -f mkdocs.insiders.yml
98
+ uv run mkdocs build
124
99
 
125
100
  .PHONY: all
126
101
  all: format lint typecheck testcov ## Run code formatting, linting, static type checks, and tests with coverage report generation
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pydantic-ai
3
- Version: 1.28.0
3
+ Version: 1.41.0
4
4
  Summary: Agent Framework / shim to use Pydantic with LLMs
5
5
  Project-URL: Homepage, https://ai.pydantic.dev
6
6
  Project-URL: Source, https://github.com/pydantic/pydantic-ai
@@ -26,25 +26,27 @@ Classifier: Topic :: Internet
26
26
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
27
27
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
28
28
  Requires-Python: >=3.10
29
- Requires-Dist: pydantic-ai-slim[ag-ui,anthropic,bedrock,cli,cohere,evals,fastmcp,google,groq,huggingface,logfire,mcp,mistral,openai,retries,temporal,ui,vertexai]==1.28.0
29
+ Requires-Dist: pydantic-ai-slim[ag-ui,anthropic,bedrock,cli,cohere,evals,fastmcp,google,groq,huggingface,logfire,mcp,mistral,openai,retries,temporal,ui,vertexai]==1.41.0
30
30
  Provides-Extra: a2a
31
31
  Requires-Dist: fasta2a>=0.4.1; extra == 'a2a'
32
32
  Provides-Extra: dbos
33
- Requires-Dist: pydantic-ai-slim[dbos]==1.28.0; extra == 'dbos'
33
+ Requires-Dist: pydantic-ai-slim[dbos]==1.41.0; extra == 'dbos'
34
34
  Provides-Extra: examples
35
- Requires-Dist: pydantic-ai-examples==1.28.0; extra == 'examples'
35
+ Requires-Dist: pydantic-ai-examples==1.41.0; extra == 'examples'
36
36
  Provides-Extra: outlines-llamacpp
37
- Requires-Dist: pydantic-ai-slim[outlines-llamacpp]==1.28.0; extra == 'outlines-llamacpp'
37
+ Requires-Dist: pydantic-ai-slim[outlines-llamacpp]==1.41.0; extra == 'outlines-llamacpp'
38
38
  Provides-Extra: outlines-mlxlm
39
- Requires-Dist: pydantic-ai-slim[outlines-mlxlm]==1.28.0; (platform_system == 'Darwin' and platform_machine == 'arm64') and extra == 'outlines-mlxlm'
39
+ Requires-Dist: pydantic-ai-slim[outlines-mlxlm]==1.41.0; (platform_system == 'Darwin' and platform_machine == 'arm64') and extra == 'outlines-mlxlm'
40
40
  Provides-Extra: outlines-sglang
41
- Requires-Dist: pydantic-ai-slim[outlines-sglang]==1.28.0; extra == 'outlines-sglang'
41
+ Requires-Dist: pydantic-ai-slim[outlines-sglang]==1.41.0; extra == 'outlines-sglang'
42
42
  Provides-Extra: outlines-transformers
43
- Requires-Dist: pydantic-ai-slim[outlines-transformers]==1.28.0; extra == 'outlines-transformers'
43
+ Requires-Dist: pydantic-ai-slim[outlines-transformers]==1.41.0; extra == 'outlines-transformers'
44
44
  Provides-Extra: outlines-vllm-offline
45
- Requires-Dist: pydantic-ai-slim[outlines-vllm-offline]==1.28.0; extra == 'outlines-vllm-offline'
45
+ Requires-Dist: pydantic-ai-slim[outlines-vllm-offline]==1.41.0; extra == 'outlines-vllm-offline'
46
46
  Provides-Extra: prefect
47
- Requires-Dist: pydantic-ai-slim[prefect]==1.28.0; extra == 'prefect'
47
+ Requires-Dist: pydantic-ai-slim[prefect]==1.41.0; extra == 'prefect'
48
+ Provides-Extra: sentence-transformers
49
+ Requires-Dist: pydantic-ai-slim[sentence-transformers]==1.41.0; extra == 'sentence-transformers'
48
50
  Description-Content-Type: text/markdown
49
51
 
50
52
  <div align="center">
@@ -88,7 +90,7 @@ We built Pydantic AI with one simple aim: to bring that FastAPI feeling to GenAI
88
90
  [Pydantic Validation](https://docs.pydantic.dev/latest/) is the validation layer of the OpenAI SDK, the Google ADK, the Anthropic SDK, LangChain, LlamaIndex, AutoGPT, Transformers, CrewAI, Instructor and many more. _Why use the derivative when you can go straight to the source?_ :smiley:
89
91
 
90
92
  2. **Model-agnostic**:
91
- Supports virtually every [model](https://ai.pydantic.dev/models/overview) and provider: OpenAI, Anthropic, Gemini, DeepSeek, Grok, Cohere, Mistral, and Perplexity; Azure AI Foundry, Amazon Bedrock, Google Vertex AI, Ollama, LiteLLM, Groq, OpenRouter, Together AI, Fireworks AI, Cerebras, Hugging Face, GitHub, Heroku, Vercel, Nebius, OVHcloud, and Outlines. If your favorite model or provider is not listed, you can easily implement a [custom model](https://ai.pydantic.dev/models/overview#custom-models).
93
+ Supports virtually every [model](https://ai.pydantic.dev/models/overview) and provider: OpenAI, Anthropic, Gemini, DeepSeek, Grok, Cohere, Mistral, and Perplexity; Azure AI Foundry, Amazon Bedrock, Google Vertex AI, Ollama, LiteLLM, Groq, OpenRouter, Together AI, Fireworks AI, Cerebras, Hugging Face, GitHub, Heroku, Vercel, Nebius, OVHcloud, Alibaba Cloud, and Outlines. If your favorite model or provider is not listed, you can easily implement a [custom model](https://ai.pydantic.dev/models/overview#custom-models).
92
94
 
93
95
  3. **Seamless Observability**:
94
96
  Tightly [integrates](https://ai.pydantic.dev/logfire) with [Pydantic Logfire](https://pydantic.dev/logfire), our general-purpose OpenTelemetry observability platform, for real-time debugging, evals-based performance monitoring, and behavior, tracing, and cost tracking. If you already have an observability platform that supports OTel, you can [use that too](https://ai.pydantic.dev/logfire#alternative-observability-backends).
@@ -39,7 +39,7 @@ We built Pydantic AI with one simple aim: to bring that FastAPI feeling to GenAI
39
39
  [Pydantic Validation](https://docs.pydantic.dev/latest/) is the validation layer of the OpenAI SDK, the Google ADK, the Anthropic SDK, LangChain, LlamaIndex, AutoGPT, Transformers, CrewAI, Instructor and many more. _Why use the derivative when you can go straight to the source?_ :smiley:
40
40
 
41
41
  2. **Model-agnostic**:
42
- Supports virtually every [model](https://ai.pydantic.dev/models/overview) and provider: OpenAI, Anthropic, Gemini, DeepSeek, Grok, Cohere, Mistral, and Perplexity; Azure AI Foundry, Amazon Bedrock, Google Vertex AI, Ollama, LiteLLM, Groq, OpenRouter, Together AI, Fireworks AI, Cerebras, Hugging Face, GitHub, Heroku, Vercel, Nebius, OVHcloud, and Outlines. If your favorite model or provider is not listed, you can easily implement a [custom model](https://ai.pydantic.dev/models/overview#custom-models).
42
+ Supports virtually every [model](https://ai.pydantic.dev/models/overview) and provider: OpenAI, Anthropic, Gemini, DeepSeek, Grok, Cohere, Mistral, and Perplexity; Azure AI Foundry, Amazon Bedrock, Google Vertex AI, Ollama, LiteLLM, Groq, OpenRouter, Together AI, Fireworks AI, Cerebras, Hugging Face, GitHub, Heroku, Vercel, Nebius, OVHcloud, Alibaba Cloud, and Outlines. If your favorite model or provider is not listed, you can easily implement a [custom model](https://ai.pydantic.dev/models/overview#custom-models).
43
43
 
44
44
  3. **Seamless Observability**:
45
45
  Tightly [integrates](https://ai.pydantic.dev/logfire) with [Pydantic Logfire](https://pydantic.dev/logfire), our general-purpose OpenTelemetry observability platform, for real-time debugging, evals-based performance monitoring, and behavior, tracing, and cost tracking. If you already have an observability platform that supports OTel, you can [use that too](https://ai.pydantic.dev/logfire#alternative-observability-backends).
@@ -59,6 +59,7 @@ outlines-llamacpp = ["pydantic-ai-slim[outlines-llamacpp]=={{ version }}"]
59
59
  outlines-mlxlm = ["pydantic-ai-slim[outlines-mlxlm]=={{ version }}; platform_system == 'Darwin' and platform_machine == 'arm64'"]
60
60
  outlines-sglang = ["pydantic-ai-slim[outlines-sglang]=={{ version }}"]
61
61
  outlines-vllm-offline = ["pydantic-ai-slim[outlines-vllm-offline]=={{ version }}"]
62
+ sentence-transformers = ["pydantic-ai-slim[sentence-transformers]=={{ version }}"]
62
63
 
63
64
  [project.urls]
64
65
  Homepage = "https://ai.pydantic.dev"
@@ -98,19 +99,20 @@ dev = [
98
99
  "dirty-equals>=0.9.0",
99
100
  "duckduckgo-search>=7.0.0",
100
101
  "inline-snapshot>=0.19.3",
101
- "pytest>=8.3.3",
102
+ "pytest>=9.0.0",
102
103
  "pytest-examples>=0.0.18",
103
104
  "pytest-mock>=3.14.0",
104
105
  "pytest-pretty>=1.3.0",
105
106
  "pytest-recording>=0.13.2",
106
107
  "diff-cover>=9.2.0",
107
- "boto3-stubs[bedrock-runtime]",
108
+ "boto3-stubs[bedrock-runtime]>=1.42.13",
108
109
  "strict-no-cover @ git+https://github.com/pydantic/strict-no-cover.git@7fc59da2c4dff919db2095a0f0e47101b657131d",
109
110
  "pytest-xdist>=3.6.1",
110
111
  # Needed for PyCharm users
111
112
  "pip>=25.2",
112
113
  "genai-prices>=0.0.28",
113
114
  "mcp-run-python>=0.0.20",
115
+ "brotli>=1.2.0",
114
116
  ]
115
117
  lint = ["mypy>=1.11.2", "pyright>=1.1.390", "ruff>=0.6.9"]
116
118
  docs = [
@@ -120,8 +122,8 @@ docs = [
120
122
  "mkdocs-glightbox>=0.4.0",
121
123
  "mkdocs-llmstxt>=0.2.0",
122
124
  "mkdocs-redirects>=1.2.2",
123
- "mkdocs-material[imaging]>=9.5.45",
124
- "mkdocstrings-python>=1.12.2",
125
+ "mkdocs-material[imaging]>=9.7.0",
126
+ "mkdocstrings-python>=2.0.0",
125
127
  "griffe-warnings-deprecated>=1.1.0",
126
128
  "pydantic-docs",
127
129
  ]
@@ -196,7 +198,7 @@ quote-style = "single"
196
198
  "docs/**/*.py" = ["D"]
197
199
 
198
200
  [tool.pyright]
199
- pythonVersion = "3.12"
201
+ pythonVersion = "3.10"
200
202
  typeCheckingMode = "strict"
201
203
  reportMissingTypeStubs = false
202
204
  reportUnnecessaryIsInstance = false
@@ -245,7 +247,6 @@ filterwarnings = [
245
247
  "ignore:unclosed <socket:ResourceWarning",
246
248
  "ignore:unclosed event loop:ResourceWarning",
247
249
  ]
248
- # addopts = ["--inline-snapshot=create,fix"]
249
250
 
250
251
  # https://coverage.readthedocs.io/en/latest/config.html#run
251
252
  [tool.coverage.run]
@@ -261,9 +262,11 @@ include = [
261
262
  "tests/**/*.py",
262
263
  ]
263
264
  omit = [
264
- "tests/test_live.py",
265
265
  "tests/example_modules/*.py",
266
266
  "pydantic_ai_slim/pydantic_ai/ext/aci.py", # aci-sdk is too niche to be added as an (optional) dependency
267
+ # TODO(Marcelo): Enable prefect coverage again.
268
+ "pydantic_ai_slim/pydantic_ai/durable_exec/prefect/*.py",
269
+ "tests/test_prefect.py",
267
270
  ]
268
271
  branch = true
269
272
  # Disable include-ignored warnings as --source is enabled automatically causing a self conflict as per:
@@ -307,6 +310,8 @@ exclude_lines = [
307
310
  'except ImportError as _import_error:',
308
311
  '$\s*pass$',
309
312
  'assert False',
313
+ '@pytest\.mark\.skip',
314
+ '@pytest\.mark\.xfail',
310
315
  ]
311
316
 
312
317
  [tool.logfire]
File without changes
File without changes