pydantic-ai 0.4.4__tar.gz → 0.4.5__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.
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/PKG-INFO +3 -3
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/evals/test_llm_as_a_judge.py +189 -7
- pydantic_ai-0.4.5/tests/models/cassettes/test_openai/test_invalid_response.yaml +51 -0
- pydantic_ai-0.4.5/tests/models/cassettes/test_openai/test_text_response.yaml +49 -0
- pydantic_ai-0.4.5/tests/models/cassettes/test_openai/test_valid_response.yaml +79 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_openai.py +41 -1
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_examples.py +1 -1
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_format_as_xml.py +23 -25
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_logfire.py +0 -3
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/.gitignore +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/LICENSE +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/Makefile +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/README.md +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/pyproject.toml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/__init__.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/assets/dummy.pdf +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/assets/kiwi.png +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/assets/marcelo.mp3 +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/assets/small_video.mp4 +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_mcp/test_agent_with_server_not_running.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_mcp/test_agent_with_stdio_server.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_mcp/test_tool_returning_audio_resource.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_mcp/test_tool_returning_dict.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_mcp/test_tool_returning_error.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_mcp/test_tool_returning_image.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_mcp/test_tool_returning_image_resource.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_mcp/test_tool_returning_multiple_items.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_mcp/test_tool_returning_none.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_mcp/test_tool_returning_str.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_mcp/test_tool_returning_text_resource.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_settings/test_stop_settings[anthropic].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_settings/test_stop_settings[bedrock].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_settings/test_stop_settings[cohere].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_settings/test_stop_settings[gemini].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_settings/test_stop_settings[google].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_settings/test_stop_settings[groq].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_settings/test_stop_settings[mistral].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_settings/test_stop_settings[openai].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/conftest.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/evals/__init__.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/evals/test_dataset.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/evals/test_evaluator_base.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/evals/test_evaluator_common.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/evals/test_evaluator_context.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/evals/test_evaluator_spec.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/evals/test_evaluators.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/evals/test_otel.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/evals/test_render_numbers.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/evals/test_reporting.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/evals/test_reports.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/evals/test_utils.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/evals/utils.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/example_modules/README.md +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/example_modules/bank_database.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/example_modules/fake_database.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/example_modules/mcp_server.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/example_modules/weather_service.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/ext/__init__.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/ext/test_langchain.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/graph/__init__.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/graph/test_file_persistence.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/graph/test_graph.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/graph/test_mermaid.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/graph/test_persistence.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/graph/test_state.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/graph/test_utils.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/import_examples.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/json_body_serializer.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/mcp_server.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/__init__.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_anthropic/test_anthropic_model_empty_message_on_history.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_anthropic/test_anthropic_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_anthropic/test_anthropic_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_anthropic/test_anthropic_model_thinking_part_stream.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_anthropic/test_anthropic_prompted_output.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_anthropic/test_anthropic_prompted_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_anthropic/test_anthropic_text_output_function.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_anthropic/test_anthropic_tool_output.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_anthropic/test_anthropic_tool_with_thinking.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_anthropic/test_document_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_anthropic/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_anthropic/test_extra_headers.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_anthropic/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_anthropic/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_anthropic/test_image_url_input_invalid_mime_type.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_anthropic/test_multiple_parallel_tool_calls.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_anthropic/test_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_bedrock_empty_system_prompt.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_bedrock_model.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_bedrock_model_anthropic_model_without_tools.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_bedrock_model_guardrail_config.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_bedrock_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_bedrock_model_iter_stream.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_bedrock_model_max_tokens.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_bedrock_model_other_parameters.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_bedrock_model_performance_config.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_bedrock_model_retry.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_bedrock_model_stream.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_bedrock_model_structured_output.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_bedrock_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_bedrock_model_thinking_part_stream.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_bedrock_model_top_p.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_bedrock_multiple_documents_in_history.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_text_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_video_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_bedrock/test_video_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_cohere/test_cohere_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_cohere/test_cohere_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_cohere/test_request_simple_success_with_vcr.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_deepseek/test_deepseek_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_deepseek/test_deepseek_model_thinking_stream.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_download_item/test_download_item_application_octet_stream.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_download_item/test_download_item_no_content_type.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_gemini_additional_properties_is_false.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_gemini_additional_properties_is_true.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_gemini_drop_exclusive_maximum.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_gemini_exclusive_minimum_and_maximum.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_gemini_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_gemini_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_gemini_native_output.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_gemini_native_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_gemini_prompted_output.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_gemini_prompted_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_gemini_prompted_output_with_tools.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_gemini_text_output_function.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_gemini_tool_config_any_with_tool_without_args.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_gemini_tool_output.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_gemini_youtube_video_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_labels_are_ignored_with_gla_provider.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_video_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini/test_video_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini_vertex/test_labels.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini_vertex/test_url_input[AudioUrl (gs)].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini_vertex/test_url_input[AudioUrl].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini_vertex/test_url_input[DocumentUrl (gs)].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini_vertex/test_url_input[DocumentUrl].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini_vertex/test_url_input[ImageUrl (gs)].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini_vertex/test_url_input[ImageUrl].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini_vertex/test_url_input[VideoUrl (YouTube)].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini_vertex/test_url_input[VideoUrl (gs)].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini_vertex/test_url_input[VideoUrl].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_gemini_vertex/test_url_input_force_download.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_empty_assistant_response.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_empty_user_prompt.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_image_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_iter_stream.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_max_tokens.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_multiple_documents_in_history.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_retry.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_safety_settings.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_stream.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_structured_output.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_text_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_thinking_config.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_thinking_part_iter.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_top_p.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_vertex_labels.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_vertex_provider.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_video_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_video_as_binary_content_input_with_vendor_metadata.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_video_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_model_youtube_video_url_input_with_vendor_metadata.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_native_output.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_native_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_prompted_output.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_prompted_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_prompted_output_with_tools.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_text_output_function.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_timeout.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_tool_config_any_with_tool_without_args.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_tool_output.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_url_input[AudioUrl (gs)].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_url_input[AudioUrl].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_url_input[DocumentUrl (gs)].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_url_input[DocumentUrl].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_url_input[ImageUrl (gs)].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_url_input[ImageUrl].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_url_input[VideoUrl (YouTube)].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_url_input[VideoUrl (gs)].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_url_input[VideoUrl].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_google/test_google_url_input_force_download.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_groq/test_extra_headers.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_groq/test_groq_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_groq/test_groq_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_groq/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_groq/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_groq/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_huggingface/test_hf_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_huggingface/test_hf_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_huggingface/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_huggingface/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_huggingface/test_max_completion_tokens[Qwen-Qwen2.5-72B-Instruct].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_huggingface/test_max_completion_tokens[deepseek-ai-DeepSeek-R1-0528].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_huggingface/test_max_completion_tokens[meta-llama-Llama-3.3-70B-Instruct].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_huggingface/test_request_simple_success_with_vcr.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_huggingface/test_request_simple_usage.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_huggingface/test_simple_completion.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_huggingface/test_stream_completion.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_mistral/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_mistral/test_mistral_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_mistral/test_mistral_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_model_names/test_known_model_names.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_audio_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_compatible_api_with_tool_calls_without_id.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_document_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_extra_headers.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_image_url_tool_response.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_max_completion_tokens[gpt-4.5-preview].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_max_completion_tokens[gpt-4o-mini].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_max_completion_tokens[o3-mini].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_multiple_agent_tool_calls.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_openai_audio_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_openai_instructions.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_openai_instructions_with_tool_calls_keep_instructions.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_openai_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_openai_model_thinking_part_iter.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_openai_model_without_system_prompt.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_openai_native_output.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_openai_native_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_openai_o1_mini_system_role[developer].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_openai_o1_mini_system_role[system].yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_openai_prompted_output.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_openai_prompted_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_openai_responses_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_openai_text_output_function.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_openai_tool_output.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_reasoning_model_with_temperature.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai/test_user_id.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_audio_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_native_output.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_native_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_openai_responses_document_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_openai_responses_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_openai_responses_image_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_builtin_tools.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_http_error.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_retry.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_simple_response.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_simple_response_with_tool_call.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_openai_responses_output_type.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_openai_responses_reasoning_effort.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_openai_responses_reasoning_generate_summary.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_openai_responses_stream.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_openai_responses_system_prompt.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_openai_responses_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_prompted_output.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_prompted_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_reasoning_model_with_temperature.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_text_output_function.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/cassettes/test_openai_responses/test_tool_output.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/mock_async_stream.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_anthropic.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_bedrock.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_cohere.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_deepseek.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_download_item.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_fallback.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_gemini.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_gemini_vertex.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_google.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_groq.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_huggingface.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_instrumented.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_mcp_sampling.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_mistral.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_model.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_model_function.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_model_names.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_model_request_parameters.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_model_settings.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_model_test.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/models/test_openai_responses.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/__init__.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/cassettes/test_azure/test_azure_provider_call.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/cassettes/test_google_vertex/test_vertexai_provider.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/cassettes/test_heroku/test_heroku_model_provider_claude_3_7_sonnet.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/cassettes/test_openrouter/test_openrouter_with_google_model.yaml +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_anthropic.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_azure.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_bedrock.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_cohere.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_deepseek.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_fireworks.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_github.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_google_gla.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_google_vertex.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_grok.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_groq.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_heroku.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_huggingface.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_mistral.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_openai.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_openrouter.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_provider_names.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/providers/test_together.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_a2a.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_ag_ui.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_agent.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_cli.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_deps.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_direct.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_history_processor.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_json_body_serializer.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_live.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_mcp.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_messages.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_parts_manager.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_settings.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_streaming.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_thinking_part.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_tools.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_toolsets.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_usage_limits.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/test_utils.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/typed_agent.py +0 -0
- {pydantic_ai-0.4.4 → pydantic_ai-0.4.5}/tests/typed_graph.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydantic-ai
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.5
|
|
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,11 +28,11 @@ 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[ag-ui,anthropic,bedrock,cli,cohere,evals,google,groq,huggingface,mcp,mistral,openai,vertexai]==0.4.
|
|
31
|
+
Requires-Dist: pydantic-ai-slim[ag-ui,anthropic,bedrock,cli,cohere,evals,google,groq,huggingface,mcp,mistral,openai,vertexai]==0.4.5
|
|
32
32
|
Provides-Extra: a2a
|
|
33
33
|
Requires-Dist: fasta2a>=0.4.1; extra == 'a2a'
|
|
34
34
|
Provides-Extra: examples
|
|
35
|
-
Requires-Dist: pydantic-ai-examples==0.4.
|
|
35
|
+
Requires-Dist: pydantic-ai-examples==0.4.5; extra == 'examples'
|
|
36
36
|
Provides-Extra: logfire
|
|
37
37
|
Requires-Dist: logfire>=3.11.0; extra == 'logfire'
|
|
38
38
|
Description-Content-Type: text/markdown
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
from __future__ import annotations as _annotations
|
|
2
2
|
|
|
3
3
|
import pytest
|
|
4
|
+
from inline_snapshot import snapshot
|
|
4
5
|
from pytest_mock import MockerFixture
|
|
5
6
|
|
|
6
|
-
from ..conftest import try_import
|
|
7
|
+
from ..conftest import BinaryContent, try_import
|
|
7
8
|
|
|
8
9
|
with try_import() as imports_successful:
|
|
9
10
|
from pydantic_ai.settings import ModelSettings
|
|
@@ -141,6 +142,54 @@ async def test_judge_input_output_mock(mocker: MockerFixture):
|
|
|
141
142
|
assert '<Rubric>\nOutput contains input\n</Rubric>' in call_args[0]
|
|
142
143
|
|
|
143
144
|
|
|
145
|
+
async def test_judge_input_output_binary_content_list_mock(mocker: MockerFixture, image_content: BinaryContent):
|
|
146
|
+
"""Test judge_input_output function with mocked agent."""
|
|
147
|
+
# Mock the agent run method
|
|
148
|
+
mock_result = mocker.MagicMock()
|
|
149
|
+
mock_result.output = GradingOutput(reason='Test passed', pass_=True, score=1.0)
|
|
150
|
+
mock_run = mocker.patch('pydantic_ai.Agent.run', return_value=mock_result)
|
|
151
|
+
|
|
152
|
+
result = await judge_input_output([image_content, image_content], 'Hello world', 'Output contains input')
|
|
153
|
+
assert isinstance(result, GradingOutput)
|
|
154
|
+
assert result.reason == 'Test passed'
|
|
155
|
+
assert result.pass_ is True
|
|
156
|
+
assert result.score == 1.0
|
|
157
|
+
|
|
158
|
+
# Verify the agent was called with correct prompt
|
|
159
|
+
mock_run.assert_called_once()
|
|
160
|
+
raw_prompt = mock_run.call_args[0][0]
|
|
161
|
+
|
|
162
|
+
# 1) It must be a list
|
|
163
|
+
assert isinstance(raw_prompt, list), 'Expected prompt to be a list when passing binary'
|
|
164
|
+
|
|
165
|
+
# 2) The BinaryContent you passed in should be one of the elements
|
|
166
|
+
assert image_content in raw_prompt, 'Expected the exact BinaryContent instance to be in the prompt list'
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
async def test_judge_input_output_binary_content_mock(mocker: MockerFixture, image_content: BinaryContent):
|
|
170
|
+
"""Test judge_input_output function with mocked agent."""
|
|
171
|
+
# Mock the agent run method
|
|
172
|
+
mock_result = mocker.MagicMock()
|
|
173
|
+
mock_result.output = GradingOutput(reason='Test passed', pass_=True, score=1.0)
|
|
174
|
+
mock_run = mocker.patch('pydantic_ai.Agent.run', return_value=mock_result)
|
|
175
|
+
|
|
176
|
+
result = await judge_input_output(image_content, 'Hello world', 'Output contains input')
|
|
177
|
+
assert isinstance(result, GradingOutput)
|
|
178
|
+
assert result.reason == 'Test passed'
|
|
179
|
+
assert result.pass_ is True
|
|
180
|
+
assert result.score == 1.0
|
|
181
|
+
|
|
182
|
+
# Verify the agent was called with correct prompt
|
|
183
|
+
mock_run.assert_called_once()
|
|
184
|
+
raw_prompt = mock_run.call_args[0][0]
|
|
185
|
+
|
|
186
|
+
# 1) It must be a list
|
|
187
|
+
assert isinstance(raw_prompt, list), 'Expected prompt to be a list when passing binary'
|
|
188
|
+
|
|
189
|
+
# 2) The BinaryContent you passed in should be one of the elements
|
|
190
|
+
assert image_content in raw_prompt, 'Expected the exact BinaryContent instance to be in the prompt list'
|
|
191
|
+
|
|
192
|
+
|
|
144
193
|
@pytest.mark.anyio
|
|
145
194
|
async def test_judge_input_output_with_model_settings_mock(mocker: MockerFixture):
|
|
146
195
|
"""Test judge_input_output function with model_settings and mocked agent."""
|
|
@@ -172,7 +221,7 @@ async def test_judge_input_output_with_model_settings_mock(mocker: MockerFixture
|
|
|
172
221
|
|
|
173
222
|
|
|
174
223
|
@pytest.mark.anyio
|
|
175
|
-
async def test_judge_input_output_expected_mock(mocker: MockerFixture):
|
|
224
|
+
async def test_judge_input_output_expected_mock(mocker: MockerFixture, image_content: BinaryContent):
|
|
176
225
|
"""Test judge_input_output_expected function with mocked agent."""
|
|
177
226
|
# Mock the agent run method
|
|
178
227
|
mock_result = mocker.MagicMock()
|
|
@@ -187,16 +236,29 @@ async def test_judge_input_output_expected_mock(mocker: MockerFixture):
|
|
|
187
236
|
assert result.score == 1.0
|
|
188
237
|
|
|
189
238
|
# Verify the agent was called with correct prompt
|
|
190
|
-
mock_run.assert_called_once()
|
|
191
239
|
call_args = mock_run.call_args[0]
|
|
192
240
|
assert '<Input>\nHello\n</Input>' in call_args[0]
|
|
193
241
|
assert '<ExpectedOutput>\nHello\n</ExpectedOutput>' in call_args[0]
|
|
194
242
|
assert '<Output>\nHello world\n</Output>' in call_args[0]
|
|
195
243
|
assert '<Rubric>\nOutput contains input\n</Rubric>' in call_args[0]
|
|
196
244
|
|
|
245
|
+
result = await judge_input_output_expected(image_content, 'Hello world', 'Hello', 'Output contains input')
|
|
246
|
+
assert isinstance(result, GradingOutput)
|
|
247
|
+
assert result.reason == 'Test passed'
|
|
248
|
+
assert result.pass_ is True
|
|
249
|
+
assert result.score == 1.0
|
|
250
|
+
|
|
251
|
+
call_args = mock_run.call_args[0]
|
|
252
|
+
assert image_content in call_args[0]
|
|
253
|
+
assert '<ExpectedOutput>\nHello\n</ExpectedOutput>' in call_args[0]
|
|
254
|
+
assert '<Output>\nHello world\n</Output>' in call_args[0]
|
|
255
|
+
assert '<Rubric>\nOutput contains input\n</Rubric>' in call_args[0]
|
|
256
|
+
|
|
197
257
|
|
|
198
258
|
@pytest.mark.anyio
|
|
199
|
-
async def test_judge_input_output_expected_with_model_settings_mock(
|
|
259
|
+
async def test_judge_input_output_expected_with_model_settings_mock(
|
|
260
|
+
mocker: MockerFixture, image_content: BinaryContent
|
|
261
|
+
):
|
|
200
262
|
"""Test judge_input_output_expected function with model_settings and mocked agent."""
|
|
201
263
|
mock_result = mocker.MagicMock()
|
|
202
264
|
mock_result.output = GradingOutput(reason='Test passed with settings', pass_=True, score=1.0)
|
|
@@ -216,7 +278,6 @@ async def test_judge_input_output_expected_with_model_settings_mock(mocker: Mock
|
|
|
216
278
|
assert result.pass_ is True
|
|
217
279
|
assert result.score == 1.0
|
|
218
280
|
|
|
219
|
-
mock_run.assert_called_once()
|
|
220
281
|
call_args, call_kwargs = mock_run.call_args
|
|
221
282
|
assert '<Input>\nHello settings\n</Input>' in call_args[0]
|
|
222
283
|
assert '<ExpectedOutput>\nHello\n</ExpectedOutput>' in call_args[0]
|
|
@@ -226,6 +287,108 @@ async def test_judge_input_output_expected_with_model_settings_mock(mocker: Mock
|
|
|
226
287
|
# Check if 'model' kwarg is passed, its value will be the default model or None
|
|
227
288
|
assert 'model' in call_kwargs
|
|
228
289
|
|
|
290
|
+
result = await judge_input_output_expected(
|
|
291
|
+
image_content,
|
|
292
|
+
'Hello world with settings',
|
|
293
|
+
'Hello',
|
|
294
|
+
'Output contains input with settings',
|
|
295
|
+
model_settings=test_model_settings,
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
assert isinstance(result, GradingOutput)
|
|
299
|
+
assert result.reason == 'Test passed with settings'
|
|
300
|
+
assert result.pass_ is True
|
|
301
|
+
assert result.score == 1.0
|
|
302
|
+
|
|
303
|
+
call_args, call_kwargs = mock_run.call_args
|
|
304
|
+
assert image_content in call_args[0]
|
|
305
|
+
assert '<ExpectedOutput>\nHello\n</ExpectedOutput>' in call_args[0]
|
|
306
|
+
assert '<Output>\nHello world with settings\n</Output>' in call_args[0]
|
|
307
|
+
assert '<Rubric>\nOutput contains input with settings\n</Rubric>' in call_args[0]
|
|
308
|
+
assert call_kwargs['model_settings'] == test_model_settings
|
|
309
|
+
# Check if 'model' kwarg is passed, its value will be the default model or None
|
|
310
|
+
assert 'model' in call_kwargs
|
|
311
|
+
|
|
312
|
+
result = await judge_input_output_expected(
|
|
313
|
+
123,
|
|
314
|
+
'Hello world with settings',
|
|
315
|
+
'Hello',
|
|
316
|
+
'Output contains input with settings',
|
|
317
|
+
model_settings=test_model_settings,
|
|
318
|
+
)
|
|
319
|
+
|
|
320
|
+
assert isinstance(result, GradingOutput)
|
|
321
|
+
assert result.reason == 'Test passed with settings'
|
|
322
|
+
assert result.pass_ is True
|
|
323
|
+
assert result.score == 1.0
|
|
324
|
+
|
|
325
|
+
call_args, call_kwargs = mock_run.call_args
|
|
326
|
+
|
|
327
|
+
assert call_args == snapshot(
|
|
328
|
+
(
|
|
329
|
+
[
|
|
330
|
+
'<Input>\n',
|
|
331
|
+
'123',
|
|
332
|
+
'</Input>',
|
|
333
|
+
"""\
|
|
334
|
+
<Output>
|
|
335
|
+
Hello world with settings
|
|
336
|
+
</Output>\
|
|
337
|
+
""",
|
|
338
|
+
"""\
|
|
339
|
+
<Rubric>
|
|
340
|
+
Output contains input with settings
|
|
341
|
+
</Rubric>\
|
|
342
|
+
""",
|
|
343
|
+
"""\
|
|
344
|
+
<ExpectedOutput>
|
|
345
|
+
Hello
|
|
346
|
+
</ExpectedOutput>\
|
|
347
|
+
""",
|
|
348
|
+
],
|
|
349
|
+
)
|
|
350
|
+
)
|
|
351
|
+
|
|
352
|
+
result = await judge_input_output_expected(
|
|
353
|
+
[123],
|
|
354
|
+
'Hello world with settings',
|
|
355
|
+
'Hello',
|
|
356
|
+
'Output contains input with settings',
|
|
357
|
+
model_settings=test_model_settings,
|
|
358
|
+
)
|
|
359
|
+
|
|
360
|
+
assert isinstance(result, GradingOutput)
|
|
361
|
+
assert result.reason == 'Test passed with settings'
|
|
362
|
+
assert result.pass_ is True
|
|
363
|
+
assert result.score == 1.0
|
|
364
|
+
|
|
365
|
+
call_args, call_kwargs = mock_run.call_args
|
|
366
|
+
|
|
367
|
+
assert call_args == snapshot(
|
|
368
|
+
(
|
|
369
|
+
[
|
|
370
|
+
'<Input>\n',
|
|
371
|
+
'123',
|
|
372
|
+
'</Input>',
|
|
373
|
+
"""\
|
|
374
|
+
<Output>
|
|
375
|
+
Hello world with settings
|
|
376
|
+
</Output>\
|
|
377
|
+
""",
|
|
378
|
+
"""\
|
|
379
|
+
<Rubric>
|
|
380
|
+
Output contains input with settings
|
|
381
|
+
</Rubric>\
|
|
382
|
+
""",
|
|
383
|
+
"""\
|
|
384
|
+
<ExpectedOutput>
|
|
385
|
+
Hello
|
|
386
|
+
</ExpectedOutput>\
|
|
387
|
+
""",
|
|
388
|
+
],
|
|
389
|
+
)
|
|
390
|
+
)
|
|
391
|
+
|
|
229
392
|
|
|
230
393
|
@pytest.mark.anyio
|
|
231
394
|
async def test_judge_output_expected_mock(mocker: MockerFixture):
|
|
@@ -243,7 +406,6 @@ async def test_judge_output_expected_mock(mocker: MockerFixture):
|
|
|
243
406
|
assert result.score == 1.0
|
|
244
407
|
|
|
245
408
|
# Verify the agent was called with correct prompt
|
|
246
|
-
mock_run.assert_called_once()
|
|
247
409
|
call_args = mock_run.call_args[0]
|
|
248
410
|
assert '<Input>' not in call_args[0]
|
|
249
411
|
assert '<ExpectedOutput>\nHello\n</ExpectedOutput>' in call_args[0]
|
|
@@ -252,7 +414,7 @@ async def test_judge_output_expected_mock(mocker: MockerFixture):
|
|
|
252
414
|
|
|
253
415
|
|
|
254
416
|
@pytest.mark.anyio
|
|
255
|
-
async def test_judge_output_expected_with_model_settings_mock(mocker: MockerFixture):
|
|
417
|
+
async def test_judge_output_expected_with_model_settings_mock(mocker: MockerFixture, image_content: BinaryContent):
|
|
256
418
|
"""Test judge_output_expected function with model_settings and mocked agent."""
|
|
257
419
|
mock_result = mocker.MagicMock()
|
|
258
420
|
mock_result.output = GradingOutput(reason='Test passed with settings', pass_=True, score=1.0)
|
|
@@ -280,3 +442,23 @@ async def test_judge_output_expected_with_model_settings_mock(mocker: MockerFixt
|
|
|
280
442
|
assert call_kwargs['model_settings'] == test_model_settings
|
|
281
443
|
# Check if 'model' kwarg is passed, its value will be the default model or None
|
|
282
444
|
assert 'model' in call_kwargs
|
|
445
|
+
|
|
446
|
+
result = await judge_output_expected(
|
|
447
|
+
image_content,
|
|
448
|
+
'Hello',
|
|
449
|
+
'Output contains input with settings',
|
|
450
|
+
model_settings=test_model_settings,
|
|
451
|
+
)
|
|
452
|
+
assert isinstance(result, GradingOutput)
|
|
453
|
+
assert result.reason == 'Test passed with settings'
|
|
454
|
+
assert result.pass_ is True
|
|
455
|
+
assert result.score == 1.0
|
|
456
|
+
|
|
457
|
+
call_args, call_kwargs = mock_run.call_args
|
|
458
|
+
assert '<Input>' not in call_args[0]
|
|
459
|
+
assert '<ExpectedOutput>\nHello\n</ExpectedOutput>' in call_args[0]
|
|
460
|
+
assert '<Output>' in call_args[0]
|
|
461
|
+
assert '<Rubric>\nOutput contains input with settings\n</Rubric>' in call_args[0]
|
|
462
|
+
assert call_kwargs['model_settings'] == test_model_settings
|
|
463
|
+
# Check if 'model' kwarg is passed, its value will be the default model or None
|
|
464
|
+
assert 'model' in call_kwargs
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
interactions:
|
|
2
|
+
- request:
|
|
3
|
+
headers:
|
|
4
|
+
accept:
|
|
5
|
+
- application/json
|
|
6
|
+
accept-encoding:
|
|
7
|
+
- gzip, deflate
|
|
8
|
+
connection:
|
|
9
|
+
- keep-alive
|
|
10
|
+
content-length:
|
|
11
|
+
- '105'
|
|
12
|
+
content-type:
|
|
13
|
+
- application/json
|
|
14
|
+
host:
|
|
15
|
+
- demo-endpoints.pydantic.workers.dev
|
|
16
|
+
method: POST
|
|
17
|
+
parsed_body:
|
|
18
|
+
messages:
|
|
19
|
+
- content: What is the capital of France?
|
|
20
|
+
role: user
|
|
21
|
+
model: gpt-4o
|
|
22
|
+
stream: false
|
|
23
|
+
uri: https://demo-endpoints.pydantic.workers.dev/bin/content-type/application/json/chat/completions
|
|
24
|
+
response:
|
|
25
|
+
headers:
|
|
26
|
+
alt-svc:
|
|
27
|
+
- h3=":443"; ma=86400
|
|
28
|
+
connection:
|
|
29
|
+
- keep-alive
|
|
30
|
+
content-length:
|
|
31
|
+
- '128'
|
|
32
|
+
content-type:
|
|
33
|
+
- application/json
|
|
34
|
+
nel:
|
|
35
|
+
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
|
36
|
+
report-to:
|
|
37
|
+
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=vnOen4x5ThZsFrq57KAufS6JIp6%2FonMEN9WyAWXKhWzx0nNhyrIm3l5ffXE0t9yP69ay6%2Bj8TXT4jmQqDkjFOqlTXQ0lpQa7jkrZpXjuk1iD2hEyEZd5q%2F6ZKddrnPGojfa4%2FOwgp3aw2wf3DFzFZoPWYFhlEA%3D%3D"}],"group":"cf-nel","max_age":604800}'
|
|
38
|
+
server-timing:
|
|
39
|
+
- cfL4;desc="?proto=TCP&rtt=5088&min_rtt=4528&rtt_var=1666&sent=5&recv=8&lost=0&retrans=0&sent_bytes=2868&recv_bytes=1339&delivery_rate=756649&cwnd=252&unsent_bytes=0&cid=1ee35b7dfe7143b8&ts=51&x=0"
|
|
40
|
+
transfer-encoding:
|
|
41
|
+
- chunked
|
|
42
|
+
vary:
|
|
43
|
+
- Accept-Encoding
|
|
44
|
+
parsed_body:
|
|
45
|
+
contentType: application/json
|
|
46
|
+
method: POST
|
|
47
|
+
pathname: /bin/content-type/application/json/chat/completions
|
|
48
|
+
status:
|
|
49
|
+
code: 200
|
|
50
|
+
message: OK
|
|
51
|
+
version: 1
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
interactions:
|
|
2
|
+
- request:
|
|
3
|
+
headers:
|
|
4
|
+
accept:
|
|
5
|
+
- application/json
|
|
6
|
+
accept-encoding:
|
|
7
|
+
- gzip, deflate
|
|
8
|
+
connection:
|
|
9
|
+
- keep-alive
|
|
10
|
+
content-length:
|
|
11
|
+
- '105'
|
|
12
|
+
content-type:
|
|
13
|
+
- application/json
|
|
14
|
+
host:
|
|
15
|
+
- demo-endpoints.pydantic.workers.dev
|
|
16
|
+
method: POST
|
|
17
|
+
parsed_body:
|
|
18
|
+
messages:
|
|
19
|
+
- content: What is the capital of France?
|
|
20
|
+
role: user
|
|
21
|
+
model: gpt-4o
|
|
22
|
+
stream: false
|
|
23
|
+
uri: https://demo-endpoints.pydantic.workers.dev/bin/chat/completions
|
|
24
|
+
response:
|
|
25
|
+
body:
|
|
26
|
+
string: method=POST pathname=/bin/chat/completions Content-Type=text/plain
|
|
27
|
+
headers:
|
|
28
|
+
alt-svc:
|
|
29
|
+
- h3=":443"; ma=86400
|
|
30
|
+
connection:
|
|
31
|
+
- keep-alive
|
|
32
|
+
content-length:
|
|
33
|
+
- '66'
|
|
34
|
+
content-type:
|
|
35
|
+
- text/plain
|
|
36
|
+
nel:
|
|
37
|
+
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
|
38
|
+
report-to:
|
|
39
|
+
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=JNLqg8RHZTY3qqAmfwzA3vjAJCnVIWrBopVnzEbxZacVCpdlDStUhB%2BnUFpk%2BK51POBOH8s6zKMJkA%2FDNORrbGZiP7MfeOrH5wmiqrw4D2F2L3L8w8GBYioreKodF%2BTsCrbqR0Y6XReZHA86T9IGo94AtnBlQg%3D%3D"}],"group":"cf-nel","max_age":604800}'
|
|
40
|
+
server-timing:
|
|
41
|
+
- cfL4;desc="?proto=TCP&rtt=24558&min_rtt=23830&rtt_var=9456&sent=5&recv=7&lost=0&retrans=0&sent_bytes=2869&recv_bytes=1309&delivery_rate=175493&cwnd=33&unsent_bytes=0&cid=4087bdc474291a40&ts=53&x=0"
|
|
42
|
+
transfer-encoding:
|
|
43
|
+
- chunked
|
|
44
|
+
vary:
|
|
45
|
+
- Accept-Encoding
|
|
46
|
+
status:
|
|
47
|
+
code: 200
|
|
48
|
+
message: OK
|
|
49
|
+
version: 1
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
interactions:
|
|
2
|
+
- request:
|
|
3
|
+
headers:
|
|
4
|
+
accept:
|
|
5
|
+
- application/json
|
|
6
|
+
accept-encoding:
|
|
7
|
+
- gzip, deflate
|
|
8
|
+
connection:
|
|
9
|
+
- keep-alive
|
|
10
|
+
content-length:
|
|
11
|
+
- '105'
|
|
12
|
+
content-type:
|
|
13
|
+
- application/json
|
|
14
|
+
host:
|
|
15
|
+
- api.openai.com
|
|
16
|
+
method: POST
|
|
17
|
+
parsed_body:
|
|
18
|
+
messages:
|
|
19
|
+
- content: What is the capital of France?
|
|
20
|
+
role: user
|
|
21
|
+
model: gpt-4o
|
|
22
|
+
stream: false
|
|
23
|
+
uri: https://api.openai.com/v1/chat/completions
|
|
24
|
+
response:
|
|
25
|
+
headers:
|
|
26
|
+
access-control-expose-headers:
|
|
27
|
+
- X-Request-ID
|
|
28
|
+
alt-svc:
|
|
29
|
+
- h3=":443"; ma=86400
|
|
30
|
+
connection:
|
|
31
|
+
- keep-alive
|
|
32
|
+
content-length:
|
|
33
|
+
- '832'
|
|
34
|
+
content-type:
|
|
35
|
+
- application/json
|
|
36
|
+
openai-organization:
|
|
37
|
+
- pydantic-28gund
|
|
38
|
+
openai-processing-ms:
|
|
39
|
+
- '288'
|
|
40
|
+
openai-project:
|
|
41
|
+
- proj_wlzE3wrTAwGKSsoZUKNhfDgz
|
|
42
|
+
openai-version:
|
|
43
|
+
- '2020-10-01'
|
|
44
|
+
strict-transport-security:
|
|
45
|
+
- max-age=31536000; includeSubDomains; preload
|
|
46
|
+
transfer-encoding:
|
|
47
|
+
- chunked
|
|
48
|
+
parsed_body:
|
|
49
|
+
choices:
|
|
50
|
+
- finish_reason: stop
|
|
51
|
+
index: 0
|
|
52
|
+
logprobs: null
|
|
53
|
+
message:
|
|
54
|
+
annotations: []
|
|
55
|
+
content: The capital of France is Paris.
|
|
56
|
+
refusal: null
|
|
57
|
+
role: assistant
|
|
58
|
+
created: 1752720361
|
|
59
|
+
id: chatcmpl-Bu8vBIrB8kIWKRyTcpEEPncjhHtMU
|
|
60
|
+
model: gpt-4o-2024-08-06
|
|
61
|
+
object: chat.completion
|
|
62
|
+
service_tier: default
|
|
63
|
+
system_fingerprint: fp_a288987b44
|
|
64
|
+
usage:
|
|
65
|
+
completion_tokens: 7
|
|
66
|
+
completion_tokens_details:
|
|
67
|
+
accepted_prediction_tokens: 0
|
|
68
|
+
audio_tokens: 0
|
|
69
|
+
reasoning_tokens: 0
|
|
70
|
+
rejected_prediction_tokens: 0
|
|
71
|
+
prompt_tokens: 14
|
|
72
|
+
prompt_tokens_details:
|
|
73
|
+
audio_tokens: 0
|
|
74
|
+
cached_tokens: 0
|
|
75
|
+
total_tokens: 21
|
|
76
|
+
status:
|
|
77
|
+
code: 200
|
|
78
|
+
message: OK
|
|
79
|
+
version: 1
|
|
@@ -46,7 +46,7 @@ from pydantic_ai.result import Usage
|
|
|
46
46
|
from pydantic_ai.settings import ModelSettings
|
|
47
47
|
from pydantic_ai.tools import ToolDefinition
|
|
48
48
|
|
|
49
|
-
from ..conftest import IsDatetime, IsInstance, IsNow, IsStr, raise_if_exception, try_import
|
|
49
|
+
from ..conftest import IsDatetime, IsInstance, IsNow, IsStr, TestEnv, raise_if_exception, try_import
|
|
50
50
|
from .mock_async_stream import MockAsyncStream
|
|
51
51
|
|
|
52
52
|
with try_import() as imports_successful:
|
|
@@ -2539,3 +2539,43 @@ Don't include any text or Markdown fencing before or after.\
|
|
|
2539
2539
|
),
|
|
2540
2540
|
]
|
|
2541
2541
|
)
|
|
2542
|
+
|
|
2543
|
+
|
|
2544
|
+
async def test_valid_response(env: TestEnv, allow_model_requests: None):
|
|
2545
|
+
"""VCR recording is of a valid response."""
|
|
2546
|
+
env.set('OPENAI_API_KEY', 'foobar')
|
|
2547
|
+
agent = Agent('openai:gpt-4o')
|
|
2548
|
+
|
|
2549
|
+
result = await agent.run('What is the capital of France?')
|
|
2550
|
+
assert result.output == snapshot('The capital of France is Paris.')
|
|
2551
|
+
|
|
2552
|
+
|
|
2553
|
+
async def test_invalid_response(allow_model_requests: None):
|
|
2554
|
+
"""VCR recording is of an invalid JSON response."""
|
|
2555
|
+
m = OpenAIModel(
|
|
2556
|
+
'gpt-4o',
|
|
2557
|
+
provider=OpenAIProvider(
|
|
2558
|
+
api_key='foobar', base_url='https://demo-endpoints.pydantic.workers.dev/bin/content-type/application/json'
|
|
2559
|
+
),
|
|
2560
|
+
)
|
|
2561
|
+
agent = Agent(m)
|
|
2562
|
+
|
|
2563
|
+
with pytest.raises(UnexpectedModelBehavior) as exc_info:
|
|
2564
|
+
await agent.run('What is the capital of France?')
|
|
2565
|
+
assert exc_info.value.message.startswith(
|
|
2566
|
+
'Invalid response from OpenAI chat completions endpoint: 5 validation errors for ChatCompletion'
|
|
2567
|
+
)
|
|
2568
|
+
|
|
2569
|
+
|
|
2570
|
+
async def test_text_response(allow_model_requests: None):
|
|
2571
|
+
"""VCR recording is of a text response."""
|
|
2572
|
+
m = OpenAIModel(
|
|
2573
|
+
'gpt-4o', provider=OpenAIProvider(api_key='foobar', base_url='https://demo-endpoints.pydantic.workers.dev/bin/')
|
|
2574
|
+
)
|
|
2575
|
+
agent = Agent(m)
|
|
2576
|
+
|
|
2577
|
+
with pytest.raises(UnexpectedModelBehavior) as exc_info:
|
|
2578
|
+
await agent.run('What is the capital of France?')
|
|
2579
|
+
assert exc_info.value.message == snapshot(
|
|
2580
|
+
'Invalid response from OpenAI chat completions endpoint, expected JSON data'
|
|
2581
|
+
)
|
|
@@ -502,7 +502,7 @@ async def model_logic( # noqa: C901
|
|
|
502
502
|
)
|
|
503
503
|
elif m.content.startswith('Write a list of 5 very rude things that I might say'):
|
|
504
504
|
raise UnexpectedModelBehavior('Safety settings triggered', body='<safety settings details>')
|
|
505
|
-
elif m.content.startswith('<
|
|
505
|
+
elif m.content.startswith('<user>\n <name>John Doe</name>'):
|
|
506
506
|
return ModelResponse(
|
|
507
507
|
parts=[ToolCallPart(tool_name='final_result_EmailOk', args={}, tool_call_id='pyd_ai_tool_call_id')]
|
|
508
508
|
)
|
|
@@ -123,35 +123,35 @@ class ExamplePydanticModel(BaseModel):
|
|
|
123
123
|
),
|
|
124
124
|
],
|
|
125
125
|
)
|
|
126
|
-
def
|
|
127
|
-
assert format_as_xml(input_obj) == output
|
|
126
|
+
def test_root_tag(input_obj: Any, output: str):
|
|
127
|
+
assert format_as_xml(input_obj, root_tag='examples', item_tag='example') == output
|
|
128
128
|
|
|
129
129
|
|
|
130
130
|
@pytest.mark.parametrize(
|
|
131
131
|
'input_obj,output',
|
|
132
132
|
[
|
|
133
|
-
pytest.param('a string', snapshot('<
|
|
134
|
-
pytest.param('a <ex>foo</ex>', snapshot('<
|
|
135
|
-
pytest.param(42, snapshot('<
|
|
133
|
+
pytest.param('a string', snapshot('<item>a string</item>'), id='string'),
|
|
134
|
+
pytest.param('a <ex>foo</ex>', snapshot('<item>a <ex>foo</ex></item>'), id='string'),
|
|
135
|
+
pytest.param(42, snapshot('<item>42</item>'), id='int'),
|
|
136
136
|
pytest.param(
|
|
137
137
|
[1, 2, 3],
|
|
138
138
|
snapshot("""\
|
|
139
|
-
<
|
|
140
|
-
<
|
|
141
|
-
<
|
|
139
|
+
<item>1</item>
|
|
140
|
+
<item>2</item>
|
|
141
|
+
<item>3</item>\
|
|
142
142
|
"""),
|
|
143
143
|
id='list[int]',
|
|
144
144
|
),
|
|
145
145
|
pytest.param(
|
|
146
146
|
[[1, 2], [3]],
|
|
147
147
|
snapshot("""\
|
|
148
|
-
<
|
|
149
|
-
<
|
|
150
|
-
<
|
|
151
|
-
</
|
|
152
|
-
<
|
|
153
|
-
<
|
|
154
|
-
</
|
|
148
|
+
<item>
|
|
149
|
+
<item>1</item>
|
|
150
|
+
<item>2</item>
|
|
151
|
+
</item>
|
|
152
|
+
<item>
|
|
153
|
+
<item>3</item>
|
|
154
|
+
</item>\
|
|
155
155
|
"""),
|
|
156
156
|
id='list[list[int]]',
|
|
157
157
|
),
|
|
@@ -166,24 +166,22 @@ def test(input_obj: Any, output: str):
|
|
|
166
166
|
pytest.param(
|
|
167
167
|
[datetime(2025, 1, 1, 12, 13), date(2025, 1, 2)],
|
|
168
168
|
snapshot("""\
|
|
169
|
-
<
|
|
170
|
-
<
|
|
169
|
+
<item>2025-01-01T12:13:00</item>
|
|
170
|
+
<item>2025-01-02</item>\
|
|
171
171
|
"""),
|
|
172
172
|
id='list[date]',
|
|
173
173
|
),
|
|
174
174
|
],
|
|
175
175
|
)
|
|
176
176
|
def test_no_root(input_obj: Any, output: str):
|
|
177
|
-
assert format_as_xml(input_obj
|
|
177
|
+
assert format_as_xml(input_obj) == output
|
|
178
178
|
|
|
179
179
|
|
|
180
180
|
def test_no_indent():
|
|
181
|
-
assert format_as_xml([1, 2, 3], indent=None) == snapshot(
|
|
182
|
-
'<
|
|
183
|
-
)
|
|
184
|
-
assert format_as_xml([1, 2, 3], indent=None, include_root_tag=False) == snapshot(
|
|
185
|
-
'<example>1</example><example>2</example><example>3</example>'
|
|
181
|
+
assert format_as_xml([1, 2, 3], indent=None, root_tag='example') == snapshot(
|
|
182
|
+
'<example><item>1</item><item>2</item><item>3</item></example>'
|
|
186
183
|
)
|
|
184
|
+
assert format_as_xml([1, 2, 3], indent=None) == snapshot('<item>1</item><item>2</item><item>3</item>')
|
|
187
185
|
|
|
188
186
|
|
|
189
187
|
def test_invalid_value():
|
|
@@ -197,8 +195,8 @@ def test_invalid_key():
|
|
|
197
195
|
|
|
198
196
|
|
|
199
197
|
def test_set():
|
|
200
|
-
assert '<example>1</example>' in format_as_xml({1, 2, 3})
|
|
198
|
+
assert '<example>1</example>' in format_as_xml({1, 2, 3}, item_tag='example')
|
|
201
199
|
|
|
202
200
|
|
|
203
201
|
def test_custom_null():
|
|
204
|
-
assert format_as_xml(None, none_str='nil') == snapshot('<
|
|
202
|
+
assert format_as_xml(None, none_str='nil') == snapshot('<item>nil</item>')
|
|
@@ -448,7 +448,6 @@ def test_instructions_with_structured_output_exclude_content(get_logfire_summary
|
|
|
448
448
|
snapshot(
|
|
449
449
|
[
|
|
450
450
|
{
|
|
451
|
-
'content': 'Here are some instructions',
|
|
452
451
|
'role': 'system',
|
|
453
452
|
'event.name': 'gen_ai.system.message',
|
|
454
453
|
},
|
|
@@ -480,7 +479,6 @@ def test_instructions_with_structured_output_exclude_content(get_logfire_summary
|
|
|
480
479
|
]
|
|
481
480
|
)
|
|
482
481
|
),
|
|
483
|
-
'final_result': '{"content": "a"}',
|
|
484
482
|
'logfire.json_schema': IsJson(
|
|
485
483
|
snapshot(
|
|
486
484
|
{
|
|
@@ -497,7 +495,6 @@ def test_instructions_with_structured_output_exclude_content(get_logfire_summary
|
|
|
497
495
|
snapshot(
|
|
498
496
|
[
|
|
499
497
|
{
|
|
500
|
-
'content': 'Here are some instructions',
|
|
501
498
|
'role': 'system',
|
|
502
499
|
'gen_ai.system': 'test',
|
|
503
500
|
'event.name': 'gen_ai.system.message',
|
|
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.4.4 → pydantic_ai-0.4.5}/tests/cassettes/test_mcp/test_agent_with_stdio_server.yaml
RENAMED
|
File without changes
|