pydantic-ai 0.5.0__tar.gz → 0.5.1__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.5.0 → pydantic_ai-0.5.1}/Makefile +2 -5
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/PKG-INFO +3 -3
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/pyproject.toml +5 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/conftest.py +5 -5
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/evals/test_dataset.py +89 -89
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_fallback.py +11 -1
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_gemini.py +20 -17
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_gemini_vertex.py +2 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_google.py +5 -3
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_openai.py +3 -3
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_google_vertex.py +6 -2
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_live.py +17 -11
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/.gitignore +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/LICENSE +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/README.md +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/__init__.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/assets/dummy.pdf +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/assets/kiwi.png +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/assets/marcelo.mp3 +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/assets/product_name.txt +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/assets/small_video.mp4 +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_mcp/test_agent_with_server_not_running.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_mcp/test_agent_with_stdio_server.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_mcp/test_tool_returning_audio_resource.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_mcp/test_tool_returning_audio_resource_link.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_mcp/test_tool_returning_dict.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_mcp/test_tool_returning_error.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_mcp/test_tool_returning_image.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_mcp/test_tool_returning_image_resource.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_mcp/test_tool_returning_image_resource_link.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_mcp/test_tool_returning_multiple_items.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_mcp/test_tool_returning_none.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_mcp/test_tool_returning_str.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_mcp/test_tool_returning_text_resource.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_mcp/test_tool_returning_text_resource_link.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_settings/test_stop_settings[anthropic].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_settings/test_stop_settings[bedrock].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_settings/test_stop_settings[cohere].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_settings/test_stop_settings[gemini].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_settings/test_stop_settings[google].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_settings/test_stop_settings[groq].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_settings/test_stop_settings[mistral].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/cassettes/test_settings/test_stop_settings[openai].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/evals/__init__.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/evals/test_evaluator_base.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/evals/test_evaluator_common.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/evals/test_evaluator_context.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/evals/test_evaluator_spec.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/evals/test_evaluators.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/evals/test_llm_as_a_judge.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/evals/test_otel.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/evals/test_render_numbers.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/evals/test_reporting.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/evals/test_reports.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/evals/test_utils.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/evals/utils.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/example_modules/README.md +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/example_modules/bank_database.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/example_modules/fake_database.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/example_modules/mcp_server.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/example_modules/weather_service.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/ext/__init__.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/ext/test_langchain.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/graph/__init__.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/graph/test_file_persistence.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/graph/test_graph.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/graph/test_mermaid.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/graph/test_persistence.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/graph/test_state.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/graph/test_utils.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/import_examples.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/json_body_serializer.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/mcp_server.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/__init__.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_anthropic/test_anthropic_model_empty_message_on_history.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_anthropic/test_anthropic_model_instructions.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_anthropic/test_anthropic_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_anthropic/test_anthropic_model_thinking_part_stream.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_anthropic/test_anthropic_prompted_output.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_anthropic/test_anthropic_prompted_output_multiple.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_anthropic/test_anthropic_text_output_function.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_anthropic/test_anthropic_tool_output.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_anthropic/test_anthropic_tool_with_thinking.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_anthropic/test_document_binary_content_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_anthropic/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_anthropic/test_extra_headers.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_anthropic/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_anthropic/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_anthropic/test_image_url_input_invalid_mime_type.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_anthropic/test_multiple_parallel_tool_calls.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_anthropic/test_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_bedrock_empty_system_prompt.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_bedrock_model.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_bedrock_model_anthropic_model_without_tools.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_bedrock_model_guardrail_config.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_bedrock_model_instructions.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_bedrock_model_iter_stream.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_bedrock_model_max_tokens.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_bedrock_model_other_parameters.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_bedrock_model_performance_config.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_bedrock_model_retry.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_bedrock_model_stream.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_bedrock_model_structured_output.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_bedrock_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_bedrock_model_thinking_part_stream.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_bedrock_model_top_p.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_bedrock_multiple_documents_in_history.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_text_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_video_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_bedrock/test_video_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_cohere/test_cohere_model_instructions.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_cohere/test_cohere_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_cohere/test_request_simple_success_with_vcr.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_deepseek/test_deepseek_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_deepseek/test_deepseek_model_thinking_stream.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_download_item/test_download_item_application_octet_stream.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_download_item/test_download_item_audio_mpeg.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_download_item/test_download_item_no_content_type.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_gemini_additional_properties_is_false.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_gemini_additional_properties_is_true.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_gemini_drop_exclusive_maximum.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_gemini_exclusive_minimum_and_maximum.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_gemini_model_instructions.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_gemini_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_gemini_native_output.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_gemini_native_output_multiple.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_gemini_prompted_output.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_gemini_prompted_output_multiple.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_gemini_prompted_output_with_tools.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_gemini_text_output_function.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_gemini_tool_config_any_with_tool_without_args.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_gemini_tool_output.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_gemini_youtube_video_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_labels_are_ignored_with_gla_provider.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_video_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini/test_video_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini_vertex/test_labels.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini_vertex/test_url_input[AudioUrl (gs)].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini_vertex/test_url_input[AudioUrl].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini_vertex/test_url_input[DocumentUrl (gs)].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini_vertex/test_url_input[DocumentUrl].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini_vertex/test_url_input[ImageUrl (gs)].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini_vertex/test_url_input[ImageUrl].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini_vertex/test_url_input[VideoUrl (YouTube)].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini_vertex/test_url_input[VideoUrl (gs)].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini_vertex/test_url_input[VideoUrl].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_gemini_vertex/test_url_input_force_download.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_document_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_empty_assistant_response.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_empty_user_prompt.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_image_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_instructions.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_iter_stream.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_max_tokens.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_multiple_documents_in_history.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_retry.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_safety_settings.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_stream.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_structured_output.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_text_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_thinking_config.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_thinking_part_iter.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_top_p.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_vertex_labels.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_vertex_provider.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_video_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_video_as_binary_content_input_with_vendor_metadata.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_video_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_model_youtube_video_url_input_with_vendor_metadata.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_native_output.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_native_output_multiple.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_prompted_output.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_prompted_output_multiple.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_prompted_output_with_tools.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_text_output_function.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_timeout.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_tool_config_any_with_tool_without_args.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_tool_output.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_url_input[AudioUrl (gs)].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_url_input[AudioUrl].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_url_input[DocumentUrl (gs)].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_url_input[DocumentUrl].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_url_input[ImageUrl (gs)].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_url_input[ImageUrl].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_url_input[VideoUrl (YouTube)].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_url_input[VideoUrl (gs)].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_url_input[VideoUrl].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_google/test_google_url_input_force_download.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_groq/test_extra_headers.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_groq/test_groq_model_instructions.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_groq/test_groq_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_groq/test_groq_model_thinking_part_iter.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_groq/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_groq/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_groq/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_huggingface/test_hf_model_instructions.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_huggingface/test_hf_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_huggingface/test_hf_model_thinking_part_iter.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_huggingface/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_huggingface/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_huggingface/test_max_completion_tokens[Qwen-Qwen2.5-72B-Instruct].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_huggingface/test_max_completion_tokens[deepseek-ai-DeepSeek-R1-0528].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_huggingface/test_max_completion_tokens[meta-llama-Llama-3.3-70B-Instruct].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_huggingface/test_request_simple_success_with_vcr.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_huggingface/test_request_simple_usage.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_huggingface/test_simple_completion.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_huggingface/test_stream_completion.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_mistral/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_mistral/test_mistral_model_instructions.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_mistral/test_mistral_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_model_names/test_known_model_names.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_audio_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_compatible_api_with_tool_calls_without_id.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_document_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_extra_headers.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_image_url_tool_response.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_invalid_response.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_max_completion_tokens[gpt-4.5-preview].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_max_completion_tokens[gpt-4o-mini].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_max_completion_tokens[o3-mini].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_multiple_agent_tool_calls.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_openai_audio_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_openai_instructions.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_openai_instructions_with_tool_calls_keep_instructions.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_openai_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_openai_model_thinking_part_iter.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_openai_model_without_system_prompt.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_openai_native_output.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_openai_native_output_multiple.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_openai_o1_mini_system_role[developer].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_openai_o1_mini_system_role[system].yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_openai_prompted_output.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_openai_prompted_output_multiple.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_openai_responses_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_openai_text_output_function.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_openai_tool_output.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_reasoning_model_with_temperature.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_text_response.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_user_id.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai/test_valid_response.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_audio_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_native_output.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_native_output_multiple.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_openai_responses_document_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_openai_responses_document_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_openai_responses_image_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_builtin_tools.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_http_error.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_instructions.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_retry.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_simple_response.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_simple_response_with_tool_call.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_openai_responses_output_type.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_openai_responses_reasoning_effort.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_openai_responses_reasoning_generate_summary.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_openai_responses_stream.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_openai_responses_system_prompt.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_openai_responses_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_prompted_output.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_prompted_output_multiple.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_reasoning_model_with_temperature.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_text_output_function.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/cassettes/test_openai_responses/test_tool_output.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/mock_async_stream.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_anthropic.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_bedrock.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_cohere.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_deepseek.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_download_item.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_groq.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_huggingface.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_instrumented.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_mcp_sampling.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_mistral.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_model.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_model_function.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_model_names.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_model_request_parameters.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_model_settings.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_model_test.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/models/test_openai_responses.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/__init__.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/cassettes/test_azure/test_azure_provider_call.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/cassettes/test_google_vertex/test_vertexai_provider.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/cassettes/test_heroku/test_heroku_model_provider_claude_3_7_sonnet.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/cassettes/test_openrouter/test_openrouter_with_google_model.yaml +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_anthropic.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_azure.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_bedrock.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_cohere.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_deepseek.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_fireworks.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_github.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_google_gla.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_grok.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_groq.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_heroku.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_huggingface.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_mistral.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_moonshotai.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_openai.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_openrouter.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_provider_names.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_together.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/providers/test_vercel.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_a2a.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_ag_ui.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_agent.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_cli.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_deps.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_direct.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_examples.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_format_as_xml.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_history_processor.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_json_body_serializer.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_logfire.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_mcp.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_messages.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_parts_manager.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_settings.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_streaming.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_tenacity.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_thinking_part.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_tools.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_toolsets.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_usage_limits.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/test_utils.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/typed_agent.py +0 -0
- {pydantic_ai-0.5.0 → pydantic_ai-0.5.1}/tests/typed_graph.py +0 -0
|
@@ -60,13 +60,10 @@ typecheck-both: typecheck-pyright typecheck-mypy
|
|
|
60
60
|
|
|
61
61
|
.PHONY: test
|
|
62
62
|
test: ## Run tests and collect coverage data
|
|
63
|
-
uv run coverage run -m pytest
|
|
63
|
+
COVERAGE_PROCESS_START=./pyproject.toml uv run coverage run -m pytest -n auto --dist=loadgroup
|
|
64
|
+
@uv run coverage combine
|
|
64
65
|
@uv run coverage report
|
|
65
66
|
|
|
66
|
-
.PHONY: test-fast
|
|
67
|
-
test-fast: ## Same as test except no coverage and 4x faster depending on hardware
|
|
68
|
-
uv run pytest -n auto --dist=loadgroup
|
|
69
|
-
|
|
70
67
|
.PHONY: test-all-python
|
|
71
68
|
test-all-python: ## Run tests on Python 3.9 to 3.13
|
|
72
69
|
UV_PROJECT_ENVIRONMENT=.venv39 uv run --python 3.9 --all-extras --all-packages coverage run -p -m pytest
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydantic-ai
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.1
|
|
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,retries,vertexai]==0.5.
|
|
31
|
+
Requires-Dist: pydantic-ai-slim[ag-ui,anthropic,bedrock,cli,cohere,evals,google,groq,huggingface,mcp,mistral,openai,retries,vertexai]==0.5.1
|
|
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.5.
|
|
35
|
+
Requires-Dist: pydantic-ai-examples==0.5.1; extra == 'examples'
|
|
36
36
|
Provides-Extra: logfire
|
|
37
37
|
Requires-Dist: logfire>=3.11.0; extra == 'logfire'
|
|
38
38
|
Description-Content-Type: text/markdown
|
|
@@ -215,6 +215,10 @@ filterwarnings = [
|
|
|
215
215
|
|
|
216
216
|
# https://coverage.readthedocs.io/en/latest/config.html#run
|
|
217
217
|
[tool.coverage.run]
|
|
218
|
+
parallel = true
|
|
219
|
+
concurrency = ["multiprocessing", "thread"]
|
|
220
|
+
# We use a subdirectory for coverage data to avoid noisy coverage data files.
|
|
221
|
+
data_file = ".coverage/.coverage"
|
|
218
222
|
# required to avoid warnings about files created by create_module fixture
|
|
219
223
|
include = [
|
|
220
224
|
"pydantic_ai_slim/**/*.py",
|
|
@@ -245,6 +249,7 @@ source = [
|
|
|
245
249
|
|
|
246
250
|
# https://coverage.readthedocs.io/en/latest/config.html#report
|
|
247
251
|
[tool.coverage.report]
|
|
252
|
+
fail_under = 100
|
|
248
253
|
skip_covered = true
|
|
249
254
|
show_missing = true
|
|
250
255
|
ignore_errors = true
|
|
@@ -251,7 +251,7 @@ def pytest_recording_configure(config: Any, vcr: VCR):
|
|
|
251
251
|
def mock_vcr_aiohttp_content(mocker: MockerFixture):
|
|
252
252
|
try:
|
|
253
253
|
from vcr.stubs import aiohttp_stubs
|
|
254
|
-
except ImportError:
|
|
254
|
+
except ImportError: # pragma: lax no cover
|
|
255
255
|
return
|
|
256
256
|
|
|
257
257
|
# google-genai calls `self.response_stream.content.readline()` where `self.response_stream` is a `MockClientResponse`,
|
|
@@ -416,9 +416,9 @@ def vertex_provider_auth(mocker: MockerFixture) -> None: # pragma: lax no cover
|
|
|
416
416
|
|
|
417
417
|
|
|
418
418
|
@pytest.fixture()
|
|
419
|
-
async def vertex_provider():
|
|
419
|
+
async def vertex_provider(): # pragma: lax no cover
|
|
420
420
|
# NOTE: You need to comment out this line to rewrite the cassettes locally.
|
|
421
|
-
if not os.getenv('CI', False):
|
|
421
|
+
if not os.getenv('CI', False):
|
|
422
422
|
pytest.skip('Requires properly configured local google vertex config to pass')
|
|
423
423
|
|
|
424
424
|
try:
|
|
@@ -478,10 +478,10 @@ def model(
|
|
|
478
478
|
|
|
479
479
|
return CohereModel('command-r-plus', provider=CohereProvider(api_key=co_api_key))
|
|
480
480
|
elif request.param == 'gemini':
|
|
481
|
-
from pydantic_ai.models.gemini import GeminiModel
|
|
481
|
+
from pydantic_ai.models.gemini import GeminiModel # type: ignore[reportDeprecated]
|
|
482
482
|
from pydantic_ai.providers.google_gla import GoogleGLAProvider
|
|
483
483
|
|
|
484
|
-
return GeminiModel('gemini-1.5-flash', provider=GoogleGLAProvider(api_key=gemini_api_key))
|
|
484
|
+
return GeminiModel('gemini-1.5-flash', provider=GoogleGLAProvider(api_key=gemini_api_key)) # type: ignore[reportDeprecated]
|
|
485
485
|
elif request.param == 'google':
|
|
486
486
|
from pydantic_ai.models.google import GoogleModel
|
|
487
487
|
from pydantic_ai.providers.google import GoogleProvider
|
|
@@ -7,11 +7,11 @@ from pathlib import Path
|
|
|
7
7
|
from typing import Any
|
|
8
8
|
|
|
9
9
|
import pytest
|
|
10
|
-
from dirty_equals import HasRepr, IsNumber
|
|
10
|
+
from dirty_equals import HasRepr, IsNumber, IsPartialDict
|
|
11
11
|
from inline_snapshot import snapshot
|
|
12
12
|
from pydantic import BaseModel, TypeAdapter
|
|
13
13
|
|
|
14
|
-
from ..conftest import
|
|
14
|
+
from ..conftest import try_import
|
|
15
15
|
from .utils import render_table
|
|
16
16
|
|
|
17
17
|
with try_import() as imports_successful:
|
|
@@ -1159,7 +1159,7 @@ async def test_evaluate_async_logfire(
|
|
|
1159
1159
|
example_dataset: Dataset[TaskInput, TaskOutput, TaskMetadata],
|
|
1160
1160
|
simple_evaluator: type[Evaluator[TaskInput, TaskOutput, TaskMetadata]],
|
|
1161
1161
|
capfire: CaptureLogfire,
|
|
1162
|
-
):
|
|
1162
|
+
): # pragma: lax no cover
|
|
1163
1163
|
"""Test evaluating a dataset."""
|
|
1164
1164
|
example_dataset.add_evaluator(simple_evaluator())
|
|
1165
1165
|
|
|
@@ -1197,90 +1197,90 @@ async def test_evaluate_async_logfire(
|
|
|
1197
1197
|
'parent': None,
|
|
1198
1198
|
'start_time': 1000000000,
|
|
1199
1199
|
},
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
'
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
'
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
'
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
'
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1200
|
+
IsPartialDict(
|
|
1201
|
+
{
|
|
1202
|
+
'attributes': {
|
|
1203
|
+
'assertions': '{"correct":{"name":"correct","value":true,"reason":null,"source":{"name":"SimpleEvaluator","arguments":null}}}',
|
|
1204
|
+
'attributes': '{}',
|
|
1205
|
+
'case_name': 'case1',
|
|
1206
|
+
'expected_output': '{"answer":"4","confidence":1.0}',
|
|
1207
|
+
'inputs': '{"query":"What is 2+2?"}',
|
|
1208
|
+
'labels': '{}',
|
|
1209
|
+
'logfire.json_schema': '{"type":"object","properties":{"task_name":{},"case_name":{},"inputs":{"type":"object","title":"TaskInput","x-python-datatype":"PydanticModel"},"metadata":{"type":"object","title":"TaskMetadata","x-python-datatype":"PydanticModel"},"expected_output":{"type":"object","title":"TaskOutput","x-python-datatype":"PydanticModel"},"output":{"type":"object","title":"TaskOutput","x-python-datatype":"PydanticModel"},"task_duration":{},"metrics":{"type":"object"},"attributes":{"type":"object"},"assertions":{"type":"object"},"scores":{"type":"object"},"labels":{"type":"object"}}}',
|
|
1210
|
+
'logfire.msg': 'case: case1',
|
|
1211
|
+
'logfire.msg_template': 'case: {case_name}',
|
|
1212
|
+
'logfire.span_type': 'span',
|
|
1213
|
+
'metadata': '{"difficulty":"easy","category":"general"}',
|
|
1214
|
+
'metrics': '{}',
|
|
1215
|
+
'output': '{"answer":"4","confidence":1.0}',
|
|
1216
|
+
'scores': '{"confidence":{"name":"confidence","value":1.0,"reason":null,"source":{"name":"SimpleEvaluator","arguments":null}}}',
|
|
1217
|
+
'task_duration': 1.0,
|
|
1218
|
+
'task_name': 'mock_async_task',
|
|
1219
|
+
},
|
|
1220
|
+
'context': {'is_remote': False, 'span_id': 3, 'trace_id': 1},
|
|
1221
|
+
'end_time': 8000000000,
|
|
1222
|
+
'name': 'case: {case_name}',
|
|
1223
|
+
'parent': {'is_remote': False, 'span_id': 1, 'trace_id': 1},
|
|
1224
|
+
'start_time': 2000000000,
|
|
1225
|
+
}
|
|
1226
|
+
),
|
|
1227
|
+
IsPartialDict(
|
|
1228
|
+
{
|
|
1229
|
+
'attributes': {
|
|
1230
|
+
'logfire.json_schema': '{"type":"object","properties":{"task":{}}}',
|
|
1231
|
+
'logfire.msg': 'execute mock_async_task',
|
|
1232
|
+
'logfire.msg_template': 'execute {task}',
|
|
1233
|
+
'logfire.span_type': 'span',
|
|
1234
|
+
'task': 'mock_async_task',
|
|
1235
|
+
},
|
|
1236
|
+
'context': {'is_remote': False, 'span_id': 5, 'trace_id': 1},
|
|
1237
|
+
'end_time': 4000000000,
|
|
1238
|
+
'name': 'execute {task}',
|
|
1239
|
+
'parent': {'is_remote': False, 'span_id': 3, 'trace_id': 1},
|
|
1240
|
+
'start_time': 3000000000,
|
|
1241
|
+
}
|
|
1242
|
+
),
|
|
1243
|
+
IsPartialDict(
|
|
1244
|
+
{
|
|
1245
|
+
'attributes': {
|
|
1246
|
+
'assertions': '{"correct":{"name":"correct","value":true,"reason":null,"source":{"name":"SimpleEvaluator","arguments":null}}}',
|
|
1247
|
+
'attributes': '{}',
|
|
1248
|
+
'case_name': 'case2',
|
|
1249
|
+
'expected_output': '{"answer":"Paris","confidence":1.0}',
|
|
1250
|
+
'inputs': '{"query":"What is the capital of France?"}',
|
|
1251
|
+
'labels': '{}',
|
|
1252
|
+
'logfire.json_schema': '{"type":"object","properties":{"task_name":{},"case_name":{},"inputs":{"type":"object","title":"TaskInput","x-python-datatype":"PydanticModel"},"metadata":{"type":"object","title":"TaskMetadata","x-python-datatype":"PydanticModel"},"expected_output":{"type":"object","title":"TaskOutput","x-python-datatype":"PydanticModel"},"output":{"type":"object","title":"TaskOutput","x-python-datatype":"PydanticModel"},"task_duration":{},"metrics":{"type":"object"},"attributes":{"type":"object"},"assertions":{"type":"object"},"scores":{"type":"object"},"labels":{"type":"object"}}}',
|
|
1253
|
+
'logfire.msg': 'case: case2',
|
|
1254
|
+
'logfire.msg_template': 'case: {case_name}',
|
|
1255
|
+
'logfire.span_type': 'span',
|
|
1256
|
+
'metadata': '{"difficulty":"medium","category":"geography"}',
|
|
1257
|
+
'metrics': '{}',
|
|
1258
|
+
'output': '{"answer":"Paris","confidence":1.0}',
|
|
1259
|
+
'scores': '{"confidence":{"name":"confidence","value":1.0,"reason":null,"source":{"name":"SimpleEvaluator","arguments":null}}}',
|
|
1260
|
+
'task_duration': 1.0,
|
|
1261
|
+
'task_name': 'mock_async_task',
|
|
1262
|
+
},
|
|
1263
|
+
'context': {'is_remote': False, 'span_id': 7, 'trace_id': 1},
|
|
1264
|
+
'end_time': 9000000000,
|
|
1265
|
+
'name': 'case: {case_name}',
|
|
1266
|
+
'parent': {'is_remote': False, 'span_id': 1, 'trace_id': 1},
|
|
1267
|
+
'start_time': 5000000000,
|
|
1268
|
+
}
|
|
1269
|
+
),
|
|
1270
|
+
IsPartialDict(
|
|
1271
|
+
{
|
|
1272
|
+
'attributes': {
|
|
1273
|
+
'logfire.json_schema': '{"type":"object","properties":{"task":{}}}',
|
|
1274
|
+
'logfire.msg': 'execute mock_async_task',
|
|
1275
|
+
'logfire.msg_template': 'execute {task}',
|
|
1276
|
+
'logfire.span_type': 'span',
|
|
1277
|
+
'task': 'mock_async_task',
|
|
1278
|
+
},
|
|
1279
|
+
'context': {'is_remote': False, 'span_id': 9, 'trace_id': 1},
|
|
1280
|
+
'end_time': 7000000000,
|
|
1281
|
+
'name': 'execute {task}',
|
|
1282
|
+
'parent': {'is_remote': False, 'span_id': 7, 'trace_id': 1},
|
|
1283
|
+
'start_time': 6000000000,
|
|
1284
|
+
}
|
|
1285
|
+
),
|
|
1286
1286
|
]
|
|
@@ -3,6 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
import sys
|
|
4
4
|
from collections.abc import AsyncIterator
|
|
5
5
|
from datetime import timezone
|
|
6
|
+
from typing import Any
|
|
6
7
|
|
|
7
8
|
import pytest
|
|
8
9
|
from inline_snapshot import snapshot
|
|
@@ -247,6 +248,14 @@ def test_all_failed() -> None:
|
|
|
247
248
|
assert exceptions[0].body == {'error': 'test error'}
|
|
248
249
|
|
|
249
250
|
|
|
251
|
+
def add_missing_response_model(spans: list[dict[str, Any]]) -> list[dict[str, Any]]:
|
|
252
|
+
for span in spans:
|
|
253
|
+
attrs = span.setdefault('attributes', {})
|
|
254
|
+
if 'gen_ai.request.model' in attrs:
|
|
255
|
+
attrs.setdefault('gen_ai.response.model', attrs['gen_ai.request.model'])
|
|
256
|
+
return spans
|
|
257
|
+
|
|
258
|
+
|
|
250
259
|
@pytest.mark.skipif(not logfire_imports_successful(), reason='logfire not installed')
|
|
251
260
|
def test_all_failed_instrumented(capfire: CaptureLogfire) -> None:
|
|
252
261
|
fallback_model = FallbackModel(failure_model, failure_model)
|
|
@@ -260,7 +269,7 @@ def test_all_failed_instrumented(capfire: CaptureLogfire) -> None:
|
|
|
260
269
|
assert exceptions[0].status_code == 500
|
|
261
270
|
assert exceptions[0].model_name == 'test-function-model'
|
|
262
271
|
assert exceptions[0].body == {'error': 'test error'}
|
|
263
|
-
assert capfire.exporter.exported_spans_as_dict() == snapshot(
|
|
272
|
+
assert add_missing_response_model(capfire.exporter.exported_spans_as_dict()) == snapshot(
|
|
264
273
|
[
|
|
265
274
|
{
|
|
266
275
|
'name': 'chat fallback:function:failure_response:,function:failure_response:',
|
|
@@ -277,6 +286,7 @@ def test_all_failed_instrumented(capfire: CaptureLogfire) -> None:
|
|
|
277
286
|
'logfire.span_type': 'span',
|
|
278
287
|
'logfire.msg': 'chat fallback:function:failure_response:,function:failure_response:',
|
|
279
288
|
'logfire.level_num': 17,
|
|
289
|
+
'gen_ai.response.model': 'fallback:function:failure_response:,function:failure_response:',
|
|
280
290
|
},
|
|
281
291
|
'events': [
|
|
282
292
|
{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# pyright: reportPrivateUsage=false
|
|
2
|
+
# pyright: reportDeprecated=false
|
|
2
3
|
from __future__ import annotations as _annotations
|
|
3
4
|
|
|
4
5
|
import datetime
|
|
@@ -60,7 +61,7 @@ from pydantic_ai.tools import ToolDefinition
|
|
|
60
61
|
|
|
61
62
|
from ..conftest import ClientWithHandler, IsDatetime, IsInstance, IsNow, IsStr, TestEnv, try_import
|
|
62
63
|
|
|
63
|
-
pytestmark = pytest.mark.anyio
|
|
64
|
+
pytestmark = [pytest.mark.anyio, pytest.mark.filterwarnings('ignore:Use `GoogleModel` instead.:DeprecationWarning')]
|
|
64
65
|
|
|
65
66
|
|
|
66
67
|
async def test_model_simple(allow_model_requests: None):
|
|
@@ -360,24 +361,25 @@ async def test_json_def_enum(allow_model_requests: None):
|
|
|
360
361
|
|
|
361
362
|
# This tests that the enum values are properly converted to strings for Gemini
|
|
362
363
|
assert m._get_tools(mrp) == snapshot(
|
|
363
|
-
|
|
364
|
-
function_declarations
|
|
365
|
-
|
|
366
|
-
name
|
|
367
|
-
description
|
|
368
|
-
parameters
|
|
364
|
+
{
|
|
365
|
+
'function_declarations': [
|
|
366
|
+
{
|
|
367
|
+
'name': 'result',
|
|
368
|
+
'description': 'This is the tool for the final Result',
|
|
369
|
+
'parameters': {
|
|
369
370
|
'properties': {
|
|
370
371
|
'progress': {
|
|
371
372
|
'items': {'enum': ['100', '80', '60', '40', '20'], 'type': 'string'},
|
|
372
373
|
'type': 'array',
|
|
373
374
|
'nullable': True,
|
|
375
|
+
'default': None,
|
|
374
376
|
}
|
|
375
377
|
},
|
|
376
378
|
'type': 'object',
|
|
377
379
|
},
|
|
378
|
-
|
|
380
|
+
}
|
|
379
381
|
]
|
|
380
|
-
|
|
382
|
+
}
|
|
381
383
|
)
|
|
382
384
|
|
|
383
385
|
|
|
@@ -406,12 +408,12 @@ async def test_json_def_replaced_any_of(allow_model_requests: None):
|
|
|
406
408
|
)
|
|
407
409
|
mrp = m.customize_request_parameters(mrp)
|
|
408
410
|
assert m._get_tools(mrp) == snapshot(
|
|
409
|
-
|
|
410
|
-
function_declarations
|
|
411
|
-
|
|
412
|
-
name
|
|
413
|
-
description
|
|
414
|
-
parameters
|
|
411
|
+
{
|
|
412
|
+
'function_declarations': [
|
|
413
|
+
{
|
|
414
|
+
'name': 'result',
|
|
415
|
+
'description': 'This is the tool for the final Result',
|
|
416
|
+
'parameters': {
|
|
415
417
|
'properties': {
|
|
416
418
|
'op_location': {
|
|
417
419
|
'properties': {
|
|
@@ -421,13 +423,14 @@ async def test_json_def_replaced_any_of(allow_model_requests: None):
|
|
|
421
423
|
'required': ['lat', 'lng'],
|
|
422
424
|
'nullable': True,
|
|
423
425
|
'type': 'object',
|
|
426
|
+
'default': None,
|
|
424
427
|
}
|
|
425
428
|
},
|
|
426
429
|
'type': 'object',
|
|
427
430
|
},
|
|
428
|
-
|
|
431
|
+
}
|
|
429
432
|
]
|
|
430
|
-
|
|
433
|
+
}
|
|
431
434
|
)
|
|
432
435
|
|
|
433
436
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
# pyright: reportDeprecated=false
|
|
1
2
|
import os
|
|
2
3
|
from dataclasses import dataclass
|
|
3
4
|
from typing import Union
|
|
@@ -32,6 +33,7 @@ with try_import() as imports_successful:
|
|
|
32
33
|
pytestmark = [
|
|
33
34
|
pytest.mark.skipif(not imports_successful(), reason='google-auth not installed'),
|
|
34
35
|
pytest.mark.anyio,
|
|
36
|
+
pytest.mark.filterwarnings('ignore:Use `GoogleModel` instead.:DeprecationWarning'),
|
|
35
37
|
]
|
|
36
38
|
|
|
37
39
|
|
|
@@ -318,7 +318,9 @@ async def test_google_model_gla_labels_raises_value_error(allow_model_requests:
|
|
|
318
318
|
await agent.run('What is the capital of France?')
|
|
319
319
|
|
|
320
320
|
|
|
321
|
-
async def test_google_model_vertex_provider(
|
|
321
|
+
async def test_google_model_vertex_provider(
|
|
322
|
+
allow_model_requests: None, vertex_provider: GoogleProvider
|
|
323
|
+
): # pragma: lax no cover
|
|
322
324
|
model = GoogleModel('gemini-2.0-flash', provider=vertex_provider)
|
|
323
325
|
agent = Agent(model=model, system_prompt='You are a helpful chatbot.')
|
|
324
326
|
result = await agent.run('What is the capital of France?')
|
|
@@ -774,7 +776,7 @@ async def test_google_url_input(
|
|
|
774
776
|
expected_output: str,
|
|
775
777
|
allow_model_requests: None,
|
|
776
778
|
vertex_provider: GoogleProvider,
|
|
777
|
-
) -> None:
|
|
779
|
+
) -> None: # pragma: lax no cover
|
|
778
780
|
m = GoogleModel('gemini-2.0-flash', provider=vertex_provider)
|
|
779
781
|
agent = Agent(m)
|
|
780
782
|
result = await agent.run(['What is the main content of this URL?', url])
|
|
@@ -806,7 +808,7 @@ async def test_google_url_input(
|
|
|
806
808
|
not os.getenv('CI', False), reason='Requires properly configured local google vertex config to pass'
|
|
807
809
|
)
|
|
808
810
|
@pytest.mark.vcr()
|
|
809
|
-
async def test_google_url_input_force_download(allow_model_requests: None) -> None:
|
|
811
|
+
async def test_google_url_input_force_download(allow_model_requests: None) -> None: # pragma: lax no cover
|
|
810
812
|
provider = GoogleProvider(project='pydantic-ai', location='us-central1')
|
|
811
813
|
m = GoogleModel('gemini-2.0-flash', provider=provider)
|
|
812
814
|
agent = Agent(m)
|
|
@@ -37,12 +37,10 @@ from pydantic_ai.messages import (
|
|
|
37
37
|
UserPromptPart,
|
|
38
38
|
)
|
|
39
39
|
from pydantic_ai.models import ModelRequestParameters
|
|
40
|
-
from pydantic_ai.models.gemini import GeminiModel
|
|
41
40
|
from pydantic_ai.output import NativeOutput, PromptedOutput, TextOutput, ToolOutput
|
|
42
41
|
from pydantic_ai.profiles import ModelProfile
|
|
43
42
|
from pydantic_ai.profiles._json_schema import InlineDefsJsonSchemaTransformer
|
|
44
43
|
from pydantic_ai.profiles.openai import OpenAIModelProfile, openai_model_profile
|
|
45
|
-
from pydantic_ai.providers.google_gla import GoogleGLAProvider
|
|
46
44
|
from pydantic_ai.result import Usage
|
|
47
45
|
from pydantic_ai.settings import ModelSettings
|
|
48
46
|
from pydantic_ai.tools import ToolDefinition
|
|
@@ -65,6 +63,7 @@ with try_import() as imports_successful:
|
|
|
65
63
|
from openai.types.chat.chat_completion_token_logprob import ChatCompletionTokenLogprob
|
|
66
64
|
from openai.types.completion_usage import CompletionUsage, PromptTokensDetails
|
|
67
65
|
|
|
66
|
+
from pydantic_ai.models.google import GoogleModel
|
|
68
67
|
from pydantic_ai.models.openai import (
|
|
69
68
|
OpenAIModel,
|
|
70
69
|
OpenAIModelSettings,
|
|
@@ -73,6 +72,7 @@ with try_import() as imports_successful:
|
|
|
73
72
|
OpenAISystemPromptRole,
|
|
74
73
|
)
|
|
75
74
|
from pydantic_ai.profiles.openai import OpenAIJsonSchemaTransformer
|
|
75
|
+
from pydantic_ai.providers.google import GoogleProvider
|
|
76
76
|
from pydantic_ai.providers.openai import OpenAIProvider
|
|
77
77
|
|
|
78
78
|
# note: we use Union here so that casting works with Python 3.9
|
|
@@ -1016,7 +1016,7 @@ async def test_max_completion_tokens(allow_model_requests: None, model_name: str
|
|
|
1016
1016
|
|
|
1017
1017
|
|
|
1018
1018
|
async def test_multiple_agent_tool_calls(allow_model_requests: None, gemini_api_key: str, openai_api_key: str):
|
|
1019
|
-
gemini_model =
|
|
1019
|
+
gemini_model = GoogleModel('gemini-2.0-flash-exp', provider=GoogleProvider(api_key=gemini_api_key))
|
|
1020
1020
|
openai_model = OpenAIModel('gpt-4o-mini', provider=OpenAIProvider(api_key=openai_api_key))
|
|
1021
1021
|
|
|
1022
1022
|
agent = Agent(model=gemini_model)
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations as _annotations
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
import os
|
|
5
|
+
import sys
|
|
5
6
|
from dataclasses import dataclass
|
|
6
7
|
from pathlib import Path
|
|
7
8
|
from unittest.mock import patch
|
|
@@ -12,7 +13,7 @@ from inline_snapshot import snapshot
|
|
|
12
13
|
from pytest_mock import MockerFixture
|
|
13
14
|
|
|
14
15
|
from pydantic_ai.agent import Agent
|
|
15
|
-
from pydantic_ai.models.gemini import GeminiModel
|
|
16
|
+
from pydantic_ai.models.gemini import GeminiModel # type: ignore[reportDeprecated]
|
|
16
17
|
|
|
17
18
|
from ..conftest import try_import
|
|
18
19
|
|
|
@@ -24,6 +25,7 @@ with try_import() as imports_successful:
|
|
|
24
25
|
pytestmark = [
|
|
25
26
|
pytest.mark.skipif(not imports_successful(), reason='google-genai not installed'),
|
|
26
27
|
pytest.mark.anyio(),
|
|
28
|
+
pytest.mark.filterwarnings('ignore:Use `GoogleModel` instead.:DeprecationWarning'),
|
|
27
29
|
]
|
|
28
30
|
|
|
29
31
|
|
|
@@ -68,6 +70,7 @@ async def mock_refresh_token():
|
|
|
68
70
|
return 'my-token'
|
|
69
71
|
|
|
70
72
|
|
|
73
|
+
@pytest.mark.skipif(sys.version_info < (3, 10), reason='Flaky test in 3.9')
|
|
71
74
|
async def test_google_vertex_provider_service_account_file(
|
|
72
75
|
monkeypatch: pytest.MonkeyPatch, tmp_path: Path, allow_model_requests: None
|
|
73
76
|
):
|
|
@@ -81,6 +84,7 @@ async def test_google_vertex_provider_service_account_file(
|
|
|
81
84
|
assert getattr(provider.client.auth, 'project_id') == 'my-project-id'
|
|
82
85
|
|
|
83
86
|
|
|
87
|
+
@pytest.mark.skipif(sys.version_info < (3, 10), reason='Flaky test in 3.9')
|
|
84
88
|
async def test_google_vertex_provider_service_account_file_info(
|
|
85
89
|
monkeypatch: pytest.MonkeyPatch, allow_model_requests: None
|
|
86
90
|
):
|
|
@@ -164,7 +168,7 @@ def vertex_provider_auth(mocker: MockerFixture) -> None: # pragma: lax no cover
|
|
|
164
168
|
)
|
|
165
169
|
@pytest.mark.vcr()
|
|
166
170
|
async def test_vertexai_provider(allow_model_requests: None): # pragma: lax no cover
|
|
167
|
-
m = GeminiModel('gemini-2.0-flash', provider='google-vertex')
|
|
171
|
+
m = GeminiModel('gemini-2.0-flash', provider='google-vertex') # type: ignore[reportDeprecated]
|
|
168
172
|
agent = Agent(m)
|
|
169
173
|
|
|
170
174
|
result = await agent.run('What is the capital of France?')
|
|
@@ -28,24 +28,28 @@ def openai(http_client: httpx.AsyncClient, _tmp_path: Path) -> Model:
|
|
|
28
28
|
return OpenAIModel('gpt-4o-mini', provider=OpenAIProvider(http_client=http_client))
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
def gemini(
|
|
32
|
-
from pydantic_ai.models.
|
|
33
|
-
from pydantic_ai.providers.google_gla import GoogleGLAProvider
|
|
31
|
+
def gemini(_: httpx.AsyncClient, _tmp_path: Path) -> Model:
|
|
32
|
+
from pydantic_ai.models.google import GoogleModel
|
|
34
33
|
|
|
35
|
-
return
|
|
34
|
+
return GoogleModel('gemini-1.5-pro')
|
|
36
35
|
|
|
37
36
|
|
|
38
|
-
def vertexai(
|
|
39
|
-
from
|
|
40
|
-
|
|
37
|
+
def vertexai(_: httpx.AsyncClient, tmp_path: Path) -> Model:
|
|
38
|
+
from google.oauth2 import service_account
|
|
39
|
+
|
|
40
|
+
from pydantic_ai.models.google import GoogleModel
|
|
41
|
+
from pydantic_ai.providers.google import GoogleProvider
|
|
41
42
|
|
|
42
43
|
service_account_content = os.environ['GOOGLE_SERVICE_ACCOUNT_CONTENT']
|
|
43
44
|
service_account_path = tmp_path / 'service_account.json'
|
|
44
45
|
service_account_path.write_text(service_account_content)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
|
|
47
|
+
credentials = service_account.Credentials.from_service_account_file( # type: ignore[reportUnknownReturnType]
|
|
48
|
+
service_account_path,
|
|
49
|
+
scopes=['https://www.googleapis.com/auth/cloud-platform'],
|
|
48
50
|
)
|
|
51
|
+
provider = GoogleProvider(credentials=credentials)
|
|
52
|
+
return GoogleModel('gemini-1.5-flash', provider=provider)
|
|
49
53
|
|
|
50
54
|
|
|
51
55
|
def groq(http_client: httpx.AsyncClient, _tmp_path: Path) -> Model:
|
|
@@ -88,7 +92,9 @@ def cohere(http_client: httpx.AsyncClient, _tmp_path: Path) -> Model:
|
|
|
88
92
|
params = [
|
|
89
93
|
pytest.param(openai, id='openai'),
|
|
90
94
|
pytest.param(gemini, marks=pytest.mark.skip(reason='API seems very flaky'), id='gemini'),
|
|
91
|
-
pytest.param(
|
|
95
|
+
pytest.param(
|
|
96
|
+
vertexai, marks=pytest.mark.skip(reason='This needs to be fixed. It raises RuntimeError.'), id='vertexai'
|
|
97
|
+
),
|
|
92
98
|
pytest.param(groq, id='groq'),
|
|
93
99
|
pytest.param(anthropic, id='anthropic'),
|
|
94
100
|
pytest.param(ollama, id='ollama'),
|
|
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
|