pydantic-ai 0.0.45__tar.gz → 0.0.46__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.
Potentially problematic release.
This version of pydantic-ai might be problematic. Click here for more details.
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/PKG-INFO +3 -3
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/pyproject.toml +3 -3
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/conftest.py +12 -1
- pydantic_ai-0.0.46/tests/graph/test_utils.py +13 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/test_mcp.py +13 -0
- pydantic_ai-0.0.45/tests/graph/test_utils.py +0 -20
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/.gitignore +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/LICENSE +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/Makefile +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/README.md +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/__init__.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/assets/dummy.pdf +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/assets/kiwi.png +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/assets/marcelo.mp3 +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/cassettes/test_mcp/test_agent_with_stdio_server.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/example_modules/README.md +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/example_modules/bank_database.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/example_modules/fake_database.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/example_modules/weather_service.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/graph/__init__.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/graph/test_file_persistence.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/graph/test_graph.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/graph/test_mermaid.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/graph/test_persistence.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/graph/test_state.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/import_examples.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/json_body_serializer.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/mcp_server.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/__init__.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_anthropic/test_document_binary_content_input.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_anthropic/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_anthropic/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_anthropic/test_image_url_input_invalid_mime_type.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_anthropic/test_multiple_parallel_tool_calls.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_anthropic/test_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_bedrock/test_bedrock_model.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_bedrock/test_bedrock_model_anthropic_model_without_tools.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_bedrock/test_bedrock_model_iter_stream.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_bedrock/test_bedrock_model_max_tokens.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_bedrock/test_bedrock_model_retry.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_bedrock/test_bedrock_model_stream.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_bedrock/test_bedrock_model_structured_response.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_bedrock/test_bedrock_model_top_p.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_bedrock/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_bedrock/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_bedrock/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_bedrock/test_text_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_bedrock/test_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_cohere/test_request_simple_success_with_vcr.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_gemini/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_gemini/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_gemini/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_groq/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_groq/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_openai/test_audio_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_openai/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_openai/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_openai/test_max_completion_tokens[gpt-4.5-preview].yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_openai/test_max_completion_tokens[gpt-4o-mini].yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_openai/test_max_completion_tokens[o3-mini].yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_openai/test_multiple_agent_tool_calls.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_openai/test_openai_o1_mini_system_role[developer].yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_openai/test_openai_o1_mini_system_role[system].yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_openai/test_user_id.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/mock_async_stream.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/test_anthropic.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/test_bedrock.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/test_cohere.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/test_fallback.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/test_gemini.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/test_groq.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/test_instrumented.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/test_mistral.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/test_model.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/test_model_function.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/test_model_names.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/test_model_test.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/test_openai.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/providers/__init__.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/providers/cassettes/test_azure/test_azure_provider_call.yaml +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/providers/test_anthropic.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/providers/test_azure.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/providers/test_bedrock.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/providers/test_cohere.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/providers/test_deepseek.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/providers/test_google_gla.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/providers/test_google_vertex.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/providers/test_groq.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/providers/test_mistral.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/providers/test_openai.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/providers/test_provider_names.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/test_agent.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/test_cli.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/test_deps.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/test_examples.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/test_format_as_xml.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/test_json_body_serializer.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/test_live.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/test_logfire.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/test_messages.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/test_parts_manager.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/test_streaming.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/test_tools.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/test_usage_limits.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/test_utils.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/typed_agent.py +0 -0
- {pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/typed_graph.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydantic-ai
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.46
|
|
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
|
|
@@ -28,9 +28,9 @@ Classifier: Topic :: Internet
|
|
|
28
28
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
29
29
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
30
30
|
Requires-Python: >=3.9
|
|
31
|
-
Requires-Dist: pydantic-ai-slim[anthropic,bedrock,cli,cohere,groq,mcp,mistral,openai,vertexai]==0.0.
|
|
31
|
+
Requires-Dist: pydantic-ai-slim[anthropic,bedrock,cli,cohere,groq,mcp,mistral,openai,vertexai]==0.0.46
|
|
32
32
|
Provides-Extra: examples
|
|
33
|
-
Requires-Dist: pydantic-ai-examples==0.0.
|
|
33
|
+
Requires-Dist: pydantic-ai-examples==0.0.46; extra == 'examples'
|
|
34
34
|
Provides-Extra: logfire
|
|
35
35
|
Requires-Dist: logfire>=2.3; extra == 'logfire'
|
|
36
36
|
Description-Content-Type: text/markdown
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pydantic-ai"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.46"
|
|
8
8
|
description = "Agent Framework / shim to use Pydantic with LLMs"
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "Samuel Colvin", email = "samuel@pydantic.dev" },
|
|
@@ -36,7 +36,7 @@ classifiers = [
|
|
|
36
36
|
]
|
|
37
37
|
requires-python = ">=3.9"
|
|
38
38
|
dependencies = [
|
|
39
|
-
"pydantic-ai-slim[openai,vertexai,groq,anthropic,mistral,cohere,bedrock,cli,mcp]==0.0.
|
|
39
|
+
"pydantic-ai-slim[openai,vertexai,groq,anthropic,mistral,cohere,bedrock,cli,mcp]==0.0.46",
|
|
40
40
|
]
|
|
41
41
|
|
|
42
42
|
[project.urls]
|
|
@@ -46,7 +46,7 @@ Documentation = "https://ai.pydantic.dev"
|
|
|
46
46
|
Changelog = "https://github.com/pydantic/pydantic-ai/releases"
|
|
47
47
|
|
|
48
48
|
[project.optional-dependencies]
|
|
49
|
-
examples = ["pydantic-ai-examples==0.0.
|
|
49
|
+
examples = ["pydantic-ai-examples==0.0.46"]
|
|
50
50
|
logfire = ["logfire>=2.3"]
|
|
51
51
|
|
|
52
52
|
[tool.uv.sources]
|
|
@@ -200,7 +200,18 @@ def vcr_config():
|
|
|
200
200
|
@pytest.fixture(autouse=True)
|
|
201
201
|
async def close_cached_httpx_client() -> AsyncIterator[None]:
|
|
202
202
|
yield
|
|
203
|
-
|
|
203
|
+
for provider in [
|
|
204
|
+
'openai',
|
|
205
|
+
'anthropic',
|
|
206
|
+
'azure',
|
|
207
|
+
'google-gla',
|
|
208
|
+
'google-vertex',
|
|
209
|
+
'groq',
|
|
210
|
+
'mistral',
|
|
211
|
+
'cohere',
|
|
212
|
+
'deepseek',
|
|
213
|
+
]:
|
|
214
|
+
await cached_async_http_client(provider=provider).aclose()
|
|
204
215
|
|
|
205
216
|
|
|
206
217
|
@pytest.fixture(scope='session')
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from threading import Thread
|
|
2
|
+
|
|
3
|
+
from pydantic_graph._utils import get_event_loop
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_get_event_loop_in_thread():
|
|
7
|
+
def get_and_close_event_loop():
|
|
8
|
+
event_loop = get_event_loop()
|
|
9
|
+
event_loop.close()
|
|
10
|
+
|
|
11
|
+
thread = Thread(target=get_and_close_event_loop)
|
|
12
|
+
thread.start()
|
|
13
|
+
thread.join()
|
|
@@ -43,6 +43,19 @@ def test_sse_server():
|
|
|
43
43
|
assert sse_server.url == 'http://localhost:8000/sse'
|
|
44
44
|
|
|
45
45
|
|
|
46
|
+
def test_sse_server_with_header_and_timeout():
|
|
47
|
+
sse_server = MCPServerHTTP(
|
|
48
|
+
url='http://localhost:8000/sse',
|
|
49
|
+
headers={'my-custom-header': 'my-header-value'},
|
|
50
|
+
timeout=10,
|
|
51
|
+
sse_read_timeout=100,
|
|
52
|
+
)
|
|
53
|
+
assert sse_server.url == 'http://localhost:8000/sse'
|
|
54
|
+
assert sse_server.headers is not None and sse_server.headers['my-custom-header'] == 'my-header-value'
|
|
55
|
+
assert sse_server.timeout == 10
|
|
56
|
+
assert sse_server.sse_read_timeout == 100
|
|
57
|
+
|
|
58
|
+
|
|
46
59
|
async def test_agent_with_stdio_server(allow_model_requests: None, openai_api_key: str):
|
|
47
60
|
server = MCPServerStdio('python', ['-m', 'tests.mcp_server'])
|
|
48
61
|
model = OpenAIModel('gpt-4o', provider=OpenAIProvider(api_key=openai_api_key))
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
from threading import Thread
|
|
2
|
-
|
|
3
|
-
from pydantic_graph._utils import run_until_complete
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def test_run_until_complete_in_main_thread():
|
|
7
|
-
async def run(): ...
|
|
8
|
-
|
|
9
|
-
run_until_complete(run())
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def test_run_until_complete_in_thread():
|
|
13
|
-
async def run(): ...
|
|
14
|
-
|
|
15
|
-
def get_and_close_event_loop():
|
|
16
|
-
run_until_complete(run())
|
|
17
|
-
|
|
18
|
-
thread = Thread(target=get_and_close_event_loop)
|
|
19
|
-
thread.start()
|
|
20
|
-
thread.join()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/cassettes/test_mcp/test_agent_with_stdio_server.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_groq/test_image_url_input.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pydantic_ai-0.0.45 → pydantic_ai-0.0.46}/tests/models/cassettes/test_openai/test_user_id.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|