pydantic-ai 0.1.1__tar.gz → 0.1.2__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.1.1 → pydantic_ai-0.1.2}/PKG-INFO +3 -3
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/test_openai.py +50 -14
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/test_agent.py +10 -2
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/test_mcp.py +10 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/.gitignore +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/LICENSE +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/Makefile +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/README.md +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/pyproject.toml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/__init__.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/assets/dummy.pdf +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/assets/kiwi.png +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/assets/marcelo.mp3 +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/assets/small_video.mp4 +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/cassettes/test_mcp/test_agent_with_stdio_server.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/cassettes/test_settings/test_stop_settings[anthropic].yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/cassettes/test_settings/test_stop_settings[bedrock].yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/cassettes/test_settings/test_stop_settings[cohere].yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/cassettes/test_settings/test_stop_settings[gemini].yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/cassettes/test_settings/test_stop_settings[groq].yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/cassettes/test_settings/test_stop_settings[mistral].yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/cassettes/test_settings/test_stop_settings[openai].yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/conftest.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/evals/__init__.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/evals/test_dataset.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/evals/test_evaluator_base.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/evals/test_evaluator_common.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/evals/test_evaluator_context.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/evals/test_evaluator_spec.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/evals/test_evaluators.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/evals/test_llm_as_a_judge.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/evals/test_otel.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/evals/test_render_numbers.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/evals/test_reporting.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/evals/test_reports.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/evals/test_utils.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/evals/utils.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/example_modules/README.md +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/example_modules/bank_database.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/example_modules/fake_database.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/example_modules/weather_service.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/graph/__init__.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/graph/test_file_persistence.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/graph/test_graph.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/graph/test_mermaid.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/graph/test_persistence.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/graph/test_state.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/graph/test_utils.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/import_examples.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/json_body_serializer.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/mcp_server.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/__init__.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_anthropic/test_anthropic_model_instructions.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_anthropic/test_document_binary_content_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_anthropic/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_anthropic/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_anthropic/test_image_url_input_invalid_mime_type.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_anthropic/test_multiple_parallel_tool_calls.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_anthropic/test_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_bedrock_empty_system_prompt.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_bedrock_model.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_bedrock_model_anthropic_model_without_tools.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_bedrock_model_guardrail_config.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_bedrock_model_instructions.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_bedrock_model_iter_stream.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_bedrock_model_max_tokens.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_bedrock_model_other_parameters.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_bedrock_model_performance_config.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_bedrock_model_retry.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_bedrock_model_stream.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_bedrock_model_structured_response.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_bedrock_model_top_p.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_text_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_video_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_video_url_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_cohere/test_cohere_model_instructions.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_cohere/test_request_simple_success_with_vcr.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_gemini/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_gemini/test_gemini_additional_properties_is_false.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_gemini/test_gemini_additional_properties_is_true.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_gemini/test_gemini_drop_exclusive_maximum.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_gemini/test_gemini_exclusive_minimum_and_maximum.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_gemini/test_gemini_model_instructions.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_gemini/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_gemini/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_groq/test_groq_model_instructions.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_groq/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_groq/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_mistral/test_mistral_model_instructions.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai/test_audio_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai/test_max_completion_tokens[gpt-4.5-preview].yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai/test_max_completion_tokens[gpt-4o-mini].yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai/test_max_completion_tokens[o3-mini].yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai/test_multiple_agent_tool_calls.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai/test_openai_instructions.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai/test_openai_instructions_with_tool_calls_keep_instructions.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai/test_openai_model_without_system_prompt.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai/test_openai_o1_mini_system_role[developer].yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai/test_openai_o1_mini_system_role[system].yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai/test_user_id.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai_responses/test_audio_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai_responses/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai_responses/test_openai_responses_document_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai_responses/test_openai_responses_document_url_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai_responses/test_openai_responses_image_url_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_builtin_tools.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_http_error.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_instructions.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_retry.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_simple_response.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_simple_response_with_tool_call.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai_responses/test_openai_responses_output_type.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai_responses/test_openai_responses_reasoning_effort.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai_responses/test_openai_responses_reasoning_generate_summary.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai_responses/test_openai_responses_stream.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai_responses/test_openai_responses_system_prompt.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_openai_responses/test_openai_responses_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/mock_async_stream.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/test_anthropic.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/test_bedrock.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/test_cohere.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/test_fallback.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/test_gemini.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/test_groq.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/test_instrumented.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/test_mistral.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/test_model.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/test_model_function.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/test_model_names.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/test_model_test.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/test_openai_responses.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/providers/__init__.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/providers/cassettes/test_azure/test_azure_provider_call.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/providers/cassettes/test_google_vertex/test_vertexai_provider.yaml +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/providers/test_anthropic.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/providers/test_azure.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/providers/test_bedrock.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/providers/test_cohere.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/providers/test_deepseek.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/providers/test_google_gla.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/providers/test_google_vertex.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/providers/test_groq.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/providers/test_mistral.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/providers/test_openai.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/providers/test_provider_names.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/test_cli.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/test_deps.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/test_examples.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/test_format_as_xml.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/test_json_body_serializer.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/test_live.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/test_logfire.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/test_messages.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/test_parts_manager.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/test_settings.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/test_streaming.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/test_tools.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/test_usage_limits.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/test_utils.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/typed_agent.py +0 -0
- {pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/typed_graph.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydantic-ai
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
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,evals,groq,mcp,mistral,openai,vertexai]==0.1.
|
|
31
|
+
Requires-Dist: pydantic-ai-slim[anthropic,bedrock,cli,cohere,evals,groq,mcp,mistral,openai,vertexai]==0.1.2
|
|
32
32
|
Provides-Extra: examples
|
|
33
|
-
Requires-Dist: pydantic-ai-examples==0.1.
|
|
33
|
+
Requires-Dist: pydantic-ai-examples==0.1.2; extra == 'examples'
|
|
34
34
|
Provides-Extra: logfire
|
|
35
35
|
Requires-Dist: logfire>=3.11.0; extra == 'logfire'
|
|
36
36
|
Description-Content-Type: text/markdown
|
|
@@ -4,6 +4,7 @@ import json
|
|
|
4
4
|
from collections.abc import Sequence
|
|
5
5
|
from dataclasses import dataclass, field
|
|
6
6
|
from datetime import datetime, timezone
|
|
7
|
+
from enum import Enum
|
|
7
8
|
from functools import cached_property
|
|
8
9
|
from typing import Annotated, Any, Callable, Literal, Union, cast
|
|
9
10
|
|
|
@@ -730,9 +731,15 @@ class MyDefaultDc:
|
|
|
730
731
|
x: int = 1
|
|
731
732
|
|
|
732
733
|
|
|
734
|
+
class MyEnum(Enum):
|
|
735
|
+
a = 'a'
|
|
736
|
+
b = 'b'
|
|
737
|
+
|
|
738
|
+
|
|
733
739
|
@dataclass
|
|
734
740
|
class MyRecursiveDc:
|
|
735
741
|
field: MyRecursiveDc | None
|
|
742
|
+
my_enum: MyEnum = Field(description='my enum')
|
|
736
743
|
|
|
737
744
|
|
|
738
745
|
@dataclass
|
|
@@ -826,9 +833,13 @@ def tool_with_tuples(x: tuple[int], y: tuple[str] = ('abc',)) -> str:
|
|
|
826
833
|
},
|
|
827
834
|
'type': 'object',
|
|
828
835
|
},
|
|
836
|
+
'MyEnum': {'enum': ['a', 'b'], 'type': 'string'},
|
|
829
837
|
'MyRecursiveDc': {
|
|
830
|
-
'properties': {
|
|
831
|
-
|
|
838
|
+
'properties': {
|
|
839
|
+
'field': {'anyOf': [{'$ref': '#/$defs/MyRecursiveDc'}, {'type': 'null'}]},
|
|
840
|
+
'my_enum': {'description': 'my enum', 'anyOf': [{'$ref': '#/$defs/MyEnum'}]},
|
|
841
|
+
},
|
|
842
|
+
'required': ['field', 'my_enum'],
|
|
832
843
|
'type': 'object',
|
|
833
844
|
},
|
|
834
845
|
},
|
|
@@ -857,11 +868,15 @@ def tool_with_tuples(x: tuple[int], y: tuple[str] = ('abc',)) -> str:
|
|
|
857
868
|
'additionalProperties': False,
|
|
858
869
|
'required': ['field'],
|
|
859
870
|
},
|
|
871
|
+
'MyEnum': {'enum': ['a', 'b'], 'type': 'string'},
|
|
860
872
|
'MyRecursiveDc': {
|
|
861
|
-
'properties': {
|
|
873
|
+
'properties': {
|
|
874
|
+
'field': {'anyOf': [{'$ref': '#/$defs/MyRecursiveDc'}, {'type': 'null'}]},
|
|
875
|
+
'my_enum': {'description': 'my enum', 'anyOf': [{'$ref': '#/$defs/MyEnum'}]},
|
|
876
|
+
},
|
|
862
877
|
'type': 'object',
|
|
863
878
|
'additionalProperties': False,
|
|
864
|
-
'required': ['field'],
|
|
879
|
+
'required': ['field', 'my_enum'],
|
|
865
880
|
},
|
|
866
881
|
},
|
|
867
882
|
'additionalProperties': False,
|
|
@@ -998,7 +1013,7 @@ def tool_with_tuples(x: tuple[int], y: tuple[str] = ('abc',)) -> str:
|
|
|
998
1013
|
}
|
|
999
1014
|
},
|
|
1000
1015
|
'additionalProperties': False,
|
|
1001
|
-
'properties': {'x': {'
|
|
1016
|
+
'properties': {'x': {'anyOf': [{'type': 'integer'}, {'$ref': '#/$defs/MyDefaultDc'}]}},
|
|
1002
1017
|
'required': ['x'],
|
|
1003
1018
|
'type': 'object',
|
|
1004
1019
|
}
|
|
@@ -1079,12 +1094,15 @@ def tool_with_tuples(x: tuple[int], y: tuple[str] = ('abc',)) -> str:
|
|
|
1079
1094
|
{
|
|
1080
1095
|
'additionalProperties': False,
|
|
1081
1096
|
'properties': {
|
|
1082
|
-
'x': {
|
|
1097
|
+
'x': {
|
|
1098
|
+
'prefixItems': [{'type': 'integer'}],
|
|
1099
|
+
'type': 'array',
|
|
1100
|
+
'description': 'minItems=1, maxItems=1',
|
|
1101
|
+
},
|
|
1083
1102
|
'y': {
|
|
1084
|
-
'maxItems': 1,
|
|
1085
|
-
'minItems': 1,
|
|
1086
1103
|
'prefixItems': [{'type': 'string'}],
|
|
1087
1104
|
'type': 'array',
|
|
1105
|
+
'description': 'minItems=1, maxItems=1',
|
|
1088
1106
|
},
|
|
1089
1107
|
},
|
|
1090
1108
|
'required': ['x', 'y'],
|
|
@@ -1160,28 +1178,46 @@ def test_strict_schema():
|
|
|
1160
1178
|
'MyModel': {
|
|
1161
1179
|
'additionalProperties': False,
|
|
1162
1180
|
'properties': {
|
|
1163
|
-
'my_discriminated_union': {'
|
|
1181
|
+
'my_discriminated_union': {'anyOf': [{'$ref': '#/$defs/Apple'}, {'$ref': '#/$defs/Banana'}]},
|
|
1164
1182
|
'my_list': {'items': {'type': 'number'}, 'type': 'array'},
|
|
1165
1183
|
'my_patterns': {
|
|
1166
1184
|
'additionalProperties': False,
|
|
1167
|
-
'
|
|
1185
|
+
'description': "patternProperties={'^my-pattern$': {'type': 'string'}}",
|
|
1168
1186
|
'type': 'object',
|
|
1169
1187
|
'properties': {},
|
|
1170
1188
|
'required': [],
|
|
1171
1189
|
},
|
|
1172
|
-
'my_recursive': {'anyOf': [{'$ref': '
|
|
1190
|
+
'my_recursive': {'anyOf': [{'$ref': '#'}, {'type': 'null'}]},
|
|
1173
1191
|
'my_tuple': {
|
|
1174
|
-
'maxItems': 1,
|
|
1175
|
-
'minItems': 1,
|
|
1176
1192
|
'prefixItems': [{'type': 'integer'}],
|
|
1177
1193
|
'type': 'array',
|
|
1194
|
+
'description': 'minItems=1, maxItems=1',
|
|
1178
1195
|
},
|
|
1179
1196
|
},
|
|
1180
1197
|
'required': ['my_recursive', 'my_patterns', 'my_tuple', 'my_list', 'my_discriminated_union'],
|
|
1181
1198
|
'type': 'object',
|
|
1182
1199
|
},
|
|
1183
1200
|
},
|
|
1184
|
-
'
|
|
1201
|
+
'properties': {
|
|
1202
|
+
'my_recursive': {'anyOf': [{'$ref': '#'}, {'type': 'null'}]},
|
|
1203
|
+
'my_patterns': {
|
|
1204
|
+
'type': 'object',
|
|
1205
|
+
'description': "patternProperties={'^my-pattern$': {'type': 'string'}}",
|
|
1206
|
+
'additionalProperties': False,
|
|
1207
|
+
'properties': {},
|
|
1208
|
+
'required': [],
|
|
1209
|
+
},
|
|
1210
|
+
'my_tuple': {
|
|
1211
|
+
'prefixItems': [{'type': 'integer'}],
|
|
1212
|
+
'type': 'array',
|
|
1213
|
+
'description': 'minItems=1, maxItems=1',
|
|
1214
|
+
},
|
|
1215
|
+
'my_list': {'items': {'type': 'number'}, 'type': 'array'},
|
|
1216
|
+
'my_discriminated_union': {'anyOf': [{'$ref': '#/$defs/Apple'}, {'$ref': '#/$defs/Banana'}]},
|
|
1217
|
+
},
|
|
1218
|
+
'required': ['my_recursive', 'my_patterns', 'my_tuple', 'my_list', 'my_discriminated_union'],
|
|
1219
|
+
'type': 'object',
|
|
1220
|
+
'additionalProperties': False,
|
|
1185
1221
|
}
|
|
1186
1222
|
)
|
|
1187
1223
|
|
|
@@ -15,6 +15,7 @@ from pydantic_ai import Agent, ModelRetry, RunContext, UnexpectedModelBehavior,
|
|
|
15
15
|
from pydantic_ai.messages import (
|
|
16
16
|
BinaryContent,
|
|
17
17
|
ModelMessage,
|
|
18
|
+
ModelMessagesTypeAdapter,
|
|
18
19
|
ModelRequest,
|
|
19
20
|
ModelResponse,
|
|
20
21
|
ModelResponsePart,
|
|
@@ -1675,8 +1676,11 @@ def test_custom_output_type_invalid() -> None:
|
|
|
1675
1676
|
def test_binary_content_all_messages_json():
|
|
1676
1677
|
agent = Agent('test')
|
|
1677
1678
|
|
|
1678
|
-
|
|
1679
|
-
|
|
1679
|
+
content = BinaryContent(data=b'Hello', media_type='text/plain')
|
|
1680
|
+
result = agent.run_sync(['Hello', content])
|
|
1681
|
+
|
|
1682
|
+
serialized = result.all_messages_json()
|
|
1683
|
+
assert json.loads(serialized) == snapshot(
|
|
1680
1684
|
[
|
|
1681
1685
|
{
|
|
1682
1686
|
'parts': [
|
|
@@ -1698,6 +1702,10 @@ def test_binary_content_all_messages_json():
|
|
|
1698
1702
|
]
|
|
1699
1703
|
)
|
|
1700
1704
|
|
|
1705
|
+
# We also need to be able to round trip the serialized messages.
|
|
1706
|
+
messages = ModelMessagesTypeAdapter.validate_json(serialized)
|
|
1707
|
+
assert messages == result.all_messages()
|
|
1708
|
+
|
|
1701
1709
|
|
|
1702
1710
|
def test_instructions_raise_error_when_system_prompt_is_set():
|
|
1703
1711
|
agent = Agent('test', instructions='An instructions!')
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"""Tests for the MCP (Model Context Protocol) server implementation."""
|
|
2
2
|
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
3
5
|
import pytest
|
|
4
6
|
from dirty_equals import IsInstance
|
|
5
7
|
from inline_snapshot import snapshot
|
|
@@ -38,6 +40,14 @@ async def test_stdio_server():
|
|
|
38
40
|
assert result.content == snapshot([TextContent(type='text', text='32.0')])
|
|
39
41
|
|
|
40
42
|
|
|
43
|
+
async def test_stdio_server_with_cwd():
|
|
44
|
+
test_dir = Path(__file__).parent
|
|
45
|
+
server = MCPServerStdio('python', ['mcp_server.py'], cwd=test_dir)
|
|
46
|
+
async with server:
|
|
47
|
+
tools = await server.list_tools()
|
|
48
|
+
assert len(tools) == 1
|
|
49
|
+
|
|
50
|
+
|
|
41
51
|
def test_sse_server():
|
|
42
52
|
sse_server = MCPServerHTTP(url='http://localhost:8000/sse')
|
|
43
53
|
assert sse_server.url == 'http://localhost:8000/sse'
|
|
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.1.1 → pydantic_ai-0.1.2}/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
|
{pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/cassettes/test_settings/test_stop_settings[groq].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
|
{pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_bedrock/test_bedrock_model.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
|
{pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/tests/models/cassettes/test_gemini/test_image_url_input.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pydantic_ai-0.1.1 → pydantic_ai-0.1.2}/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
|
|
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
|