pydantic-ai 0.4.9__tar.gz → 0.4.11__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.4.9 → pydantic_ai-0.4.11}/PKG-INFO +3 -3
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_ag_ui.py +34 -37
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_agent.py +42 -1
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_parts_manager.py +9 -8
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_thinking_part.py +52 -5
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_tools.py +100 -2
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/.gitignore +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/LICENSE +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/Makefile +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/README.md +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/pyproject.toml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/__init__.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/assets/dummy.pdf +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/assets/kiwi.png +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/assets/marcelo.mp3 +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/assets/product_name.txt +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/assets/small_video.mp4 +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_mcp/test_agent_with_server_not_running.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_mcp/test_agent_with_stdio_server.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_mcp/test_tool_returning_audio_resource.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_mcp/test_tool_returning_audio_resource_link.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_mcp/test_tool_returning_dict.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_mcp/test_tool_returning_error.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_mcp/test_tool_returning_image.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_mcp/test_tool_returning_image_resource.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_mcp/test_tool_returning_image_resource_link.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_mcp/test_tool_returning_multiple_items.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_mcp/test_tool_returning_none.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_mcp/test_tool_returning_str.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_mcp/test_tool_returning_text_resource.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_mcp/test_tool_returning_text_resource_link.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_settings/test_stop_settings[anthropic].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_settings/test_stop_settings[bedrock].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_settings/test_stop_settings[cohere].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_settings/test_stop_settings[gemini].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_settings/test_stop_settings[google].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_settings/test_stop_settings[groq].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_settings/test_stop_settings[mistral].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_settings/test_stop_settings[openai].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/conftest.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/evals/__init__.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/evals/test_dataset.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/evals/test_evaluator_base.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/evals/test_evaluator_common.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/evals/test_evaluator_context.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/evals/test_evaluator_spec.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/evals/test_evaluators.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/evals/test_llm_as_a_judge.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/evals/test_otel.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/evals/test_render_numbers.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/evals/test_reporting.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/evals/test_reports.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/evals/test_utils.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/evals/utils.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/example_modules/README.md +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/example_modules/bank_database.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/example_modules/fake_database.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/example_modules/mcp_server.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/example_modules/weather_service.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/ext/__init__.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/ext/test_langchain.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/graph/__init__.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/graph/test_file_persistence.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/graph/test_graph.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/graph/test_mermaid.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/graph/test_persistence.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/graph/test_state.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/graph/test_utils.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/import_examples.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/json_body_serializer.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/mcp_server.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/__init__.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_anthropic/test_anthropic_model_empty_message_on_history.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_anthropic/test_anthropic_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_anthropic/test_anthropic_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_anthropic/test_anthropic_model_thinking_part_stream.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_anthropic/test_anthropic_prompted_output.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_anthropic/test_anthropic_prompted_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_anthropic/test_anthropic_text_output_function.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_anthropic/test_anthropic_tool_output.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_anthropic/test_anthropic_tool_with_thinking.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_anthropic/test_document_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_anthropic/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_anthropic/test_extra_headers.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_anthropic/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_anthropic/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_anthropic/test_image_url_input_invalid_mime_type.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_anthropic/test_multiple_parallel_tool_calls.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_anthropic/test_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_bedrock_empty_system_prompt.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_bedrock_model.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_bedrock_model_anthropic_model_without_tools.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_bedrock_model_guardrail_config.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_bedrock_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_bedrock_model_iter_stream.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_bedrock_model_max_tokens.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_bedrock_model_other_parameters.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_bedrock_model_performance_config.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_bedrock_model_retry.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_bedrock_model_stream.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_bedrock_model_structured_output.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_bedrock_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_bedrock_model_thinking_part_stream.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_bedrock_model_top_p.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_bedrock_multiple_documents_in_history.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_text_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_video_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_bedrock/test_video_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_cohere/test_cohere_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_cohere/test_cohere_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_cohere/test_request_simple_success_with_vcr.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_deepseek/test_deepseek_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_deepseek/test_deepseek_model_thinking_stream.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_download_item/test_download_item_application_octet_stream.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_download_item/test_download_item_audio_mpeg.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_download_item/test_download_item_no_content_type.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_gemini_additional_properties_is_false.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_gemini_additional_properties_is_true.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_gemini_drop_exclusive_maximum.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_gemini_exclusive_minimum_and_maximum.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_gemini_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_gemini_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_gemini_native_output.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_gemini_native_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_gemini_prompted_output.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_gemini_prompted_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_gemini_prompted_output_with_tools.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_gemini_text_output_function.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_gemini_tool_config_any_with_tool_without_args.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_gemini_tool_output.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_gemini_youtube_video_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_labels_are_ignored_with_gla_provider.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_video_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini/test_video_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini_vertex/test_labels.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini_vertex/test_url_input[AudioUrl (gs)].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini_vertex/test_url_input[AudioUrl].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini_vertex/test_url_input[DocumentUrl (gs)].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini_vertex/test_url_input[DocumentUrl].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini_vertex/test_url_input[ImageUrl (gs)].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini_vertex/test_url_input[ImageUrl].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini_vertex/test_url_input[VideoUrl (YouTube)].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini_vertex/test_url_input[VideoUrl (gs)].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini_vertex/test_url_input[VideoUrl].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_gemini_vertex/test_url_input_force_download.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_empty_assistant_response.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_empty_user_prompt.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_image_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_iter_stream.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_max_tokens.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_multiple_documents_in_history.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_retry.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_safety_settings.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_stream.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_structured_output.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_text_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_thinking_config.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_thinking_part_iter.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_top_p.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_vertex_labels.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_vertex_provider.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_video_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_video_as_binary_content_input_with_vendor_metadata.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_video_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_model_youtube_video_url_input_with_vendor_metadata.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_native_output.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_native_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_prompted_output.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_prompted_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_prompted_output_with_tools.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_text_output_function.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_timeout.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_tool_config_any_with_tool_without_args.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_tool_output.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_url_input[AudioUrl (gs)].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_url_input[AudioUrl].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_url_input[DocumentUrl (gs)].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_url_input[DocumentUrl].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_url_input[ImageUrl (gs)].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_url_input[ImageUrl].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_url_input[VideoUrl (YouTube)].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_url_input[VideoUrl (gs)].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_url_input[VideoUrl].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_google/test_google_url_input_force_download.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_groq/test_extra_headers.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_groq/test_groq_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_groq/test_groq_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_groq/test_groq_model_thinking_part_iter.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_groq/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_groq/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_groq/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_huggingface/test_hf_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_huggingface/test_hf_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_huggingface/test_hf_model_thinking_part_iter.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_huggingface/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_huggingface/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_huggingface/test_max_completion_tokens[Qwen-Qwen2.5-72B-Instruct].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_huggingface/test_max_completion_tokens[deepseek-ai-DeepSeek-R1-0528].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_huggingface/test_max_completion_tokens[meta-llama-Llama-3.3-70B-Instruct].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_huggingface/test_request_simple_success_with_vcr.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_huggingface/test_request_simple_usage.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_huggingface/test_simple_completion.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_huggingface/test_stream_completion.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_mistral/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_mistral/test_mistral_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_mistral/test_mistral_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_model_names/test_known_model_names.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_audio_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_compatible_api_with_tool_calls_without_id.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_document_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_extra_headers.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_image_url_tool_response.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_invalid_response.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_max_completion_tokens[gpt-4.5-preview].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_max_completion_tokens[gpt-4o-mini].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_max_completion_tokens[o3-mini].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_multiple_agent_tool_calls.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_openai_audio_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_openai_instructions.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_openai_instructions_with_tool_calls_keep_instructions.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_openai_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_openai_model_thinking_part_iter.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_openai_model_without_system_prompt.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_openai_native_output.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_openai_native_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_openai_o1_mini_system_role[developer].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_openai_o1_mini_system_role[system].yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_openai_prompted_output.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_openai_prompted_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_openai_responses_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_openai_text_output_function.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_openai_tool_output.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_reasoning_model_with_temperature.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_text_response.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_user_id.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai/test_valid_response.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_audio_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_native_output.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_native_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_openai_responses_document_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_openai_responses_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_openai_responses_image_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_builtin_tools.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_http_error.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_instructions.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_retry.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_simple_response.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_simple_response_with_tool_call.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_openai_responses_output_type.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_openai_responses_reasoning_effort.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_openai_responses_reasoning_generate_summary.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_openai_responses_stream.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_openai_responses_system_prompt.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_openai_responses_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_prompted_output.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_prompted_output_multiple.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_reasoning_model_with_temperature.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_text_output_function.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/cassettes/test_openai_responses/test_tool_output.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/mock_async_stream.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_anthropic.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_bedrock.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_cohere.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_deepseek.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_download_item.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_fallback.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_gemini.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_gemini_vertex.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_google.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_groq.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_huggingface.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_instrumented.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_mcp_sampling.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_mistral.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_model.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_model_function.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_model_names.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_model_request_parameters.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_model_settings.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_model_test.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_openai.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/models/test_openai_responses.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/__init__.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/cassettes/test_azure/test_azure_provider_call.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/cassettes/test_google_vertex/test_vertexai_provider.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/cassettes/test_heroku/test_heroku_model_provider_claude_3_7_sonnet.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/cassettes/test_openrouter/test_openrouter_with_google_model.yaml +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_anthropic.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_azure.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_bedrock.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_cohere.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_deepseek.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_fireworks.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_github.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_google_gla.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_google_vertex.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_grok.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_groq.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_heroku.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_huggingface.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_mistral.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_moonshotai.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_openai.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_openrouter.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_provider_names.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_together.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/providers/test_vercel.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_a2a.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_cli.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_deps.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_direct.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_examples.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_format_as_xml.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_history_processor.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_json_body_serializer.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_live.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_logfire.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_mcp.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_messages.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_settings.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_streaming.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_tenacity.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_toolsets.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_usage_limits.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/test_utils.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/typed_agent.py +0 -0
- {pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/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.11
|
|
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.4.
|
|
31
|
+
Requires-Dist: pydantic-ai-slim[ag-ui,anthropic,bedrock,cli,cohere,evals,google,groq,huggingface,mcp,mistral,openai,retries,vertexai]==0.4.11
|
|
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.11; extra == 'examples'
|
|
36
36
|
Provides-Extra: logfire
|
|
37
37
|
Requires-Dist: logfire>=3.11.0; extra == 'logfire'
|
|
38
38
|
Description-Content-Type: text/markdown
|
|
@@ -58,7 +58,7 @@ with contextlib.suppress(ImportError):
|
|
|
58
58
|
from pydantic_ai.ag_ui import (
|
|
59
59
|
SSE_CONTENT_TYPE,
|
|
60
60
|
StateDeps,
|
|
61
|
-
|
|
61
|
+
run_ag_ui,
|
|
62
62
|
)
|
|
63
63
|
|
|
64
64
|
has_ag_ui = True
|
|
@@ -95,13 +95,12 @@ def simple_result() -> Any:
|
|
|
95
95
|
)
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
async def
|
|
99
|
-
|
|
98
|
+
async def run_and_collect_events(
|
|
99
|
+
agent: Agent[AgentDepsT, OutputDataT], *run_inputs: RunAgentInput, deps: AgentDepsT = None
|
|
100
100
|
) -> list[dict[str, Any]]:
|
|
101
|
-
"""Helper function to collect events from an AG-UI adapter run."""
|
|
102
101
|
events = list[dict[str, Any]]()
|
|
103
102
|
for run_input in run_inputs:
|
|
104
|
-
async for event in
|
|
103
|
+
async for event in run_ag_ui(agent, run_input, deps=deps):
|
|
105
104
|
events.append(json.loads(event.removeprefix('data: ')))
|
|
106
105
|
return events
|
|
107
106
|
|
|
@@ -202,7 +201,7 @@ async def test_basic_user_message() -> None:
|
|
|
202
201
|
agent = Agent(
|
|
203
202
|
model=FunctionModel(stream_function=simple_stream),
|
|
204
203
|
)
|
|
205
|
-
|
|
204
|
+
|
|
206
205
|
run_input = create_input(
|
|
207
206
|
UserMessage(
|
|
208
207
|
id='msg_1',
|
|
@@ -210,7 +209,7 @@ async def test_basic_user_message() -> None:
|
|
|
210
209
|
)
|
|
211
210
|
)
|
|
212
211
|
|
|
213
|
-
events = await
|
|
212
|
+
events = await run_and_collect_events(agent, run_input)
|
|
214
213
|
|
|
215
214
|
assert events == simple_result()
|
|
216
215
|
|
|
@@ -227,9 +226,9 @@ async def test_empty_messages() -> None:
|
|
|
227
226
|
agent = Agent(
|
|
228
227
|
model=FunctionModel(stream_function=stream_function),
|
|
229
228
|
)
|
|
230
|
-
|
|
229
|
+
|
|
231
230
|
run_input = create_input()
|
|
232
|
-
events = await
|
|
231
|
+
events = await run_and_collect_events(agent, run_input)
|
|
233
232
|
|
|
234
233
|
assert events == snapshot(
|
|
235
234
|
[
|
|
@@ -248,7 +247,7 @@ async def test_multiple_messages() -> None:
|
|
|
248
247
|
agent = Agent(
|
|
249
248
|
model=FunctionModel(stream_function=simple_stream),
|
|
250
249
|
)
|
|
251
|
-
|
|
250
|
+
|
|
252
251
|
run_input = create_input(
|
|
253
252
|
UserMessage(
|
|
254
253
|
id='msg_1',
|
|
@@ -272,7 +271,7 @@ async def test_multiple_messages() -> None:
|
|
|
272
271
|
),
|
|
273
272
|
)
|
|
274
273
|
|
|
275
|
-
events = await
|
|
274
|
+
events = await run_and_collect_events(agent, run_input)
|
|
276
275
|
|
|
277
276
|
assert events == simple_result()
|
|
278
277
|
|
|
@@ -282,7 +281,7 @@ async def test_messages_with_history() -> None:
|
|
|
282
281
|
agent = Agent(
|
|
283
282
|
model=FunctionModel(stream_function=simple_stream),
|
|
284
283
|
)
|
|
285
|
-
|
|
284
|
+
|
|
286
285
|
run_input = create_input(
|
|
287
286
|
UserMessage(
|
|
288
287
|
id='msg_1',
|
|
@@ -294,7 +293,7 @@ async def test_messages_with_history() -> None:
|
|
|
294
293
|
),
|
|
295
294
|
)
|
|
296
295
|
|
|
297
|
-
events = await
|
|
296
|
+
events = await run_and_collect_events(agent, run_input)
|
|
298
297
|
|
|
299
298
|
assert events == simple_result()
|
|
300
299
|
|
|
@@ -317,7 +316,7 @@ async def test_tool_ag_ui() -> None:
|
|
|
317
316
|
model=FunctionModel(stream_function=stream_function),
|
|
318
317
|
tools=[send_snapshot, send_custom, current_time],
|
|
319
318
|
)
|
|
320
|
-
|
|
319
|
+
|
|
321
320
|
thread_id = uuid_str()
|
|
322
321
|
run_inputs = [
|
|
323
322
|
create_input(
|
|
@@ -355,7 +354,7 @@ async def test_tool_ag_ui() -> None:
|
|
|
355
354
|
),
|
|
356
355
|
]
|
|
357
356
|
|
|
358
|
-
events = await
|
|
357
|
+
events = await run_and_collect_events(agent, *run_inputs)
|
|
359
358
|
|
|
360
359
|
assert events == snapshot(
|
|
361
360
|
[
|
|
@@ -427,7 +426,7 @@ async def test_tool_ag_ui_multiple() -> None:
|
|
|
427
426
|
agent = Agent(
|
|
428
427
|
model=FunctionModel(stream_function=stream_function),
|
|
429
428
|
)
|
|
430
|
-
|
|
429
|
+
|
|
431
430
|
tool_call_id1 = uuid_str()
|
|
432
431
|
tool_call_id2 = uuid_str()
|
|
433
432
|
run_inputs = [
|
|
@@ -486,7 +485,7 @@ async def test_tool_ag_ui_multiple() -> None:
|
|
|
486
485
|
),
|
|
487
486
|
]
|
|
488
487
|
|
|
489
|
-
events = await
|
|
488
|
+
events = await run_and_collect_events(agent, *run_inputs)
|
|
490
489
|
|
|
491
490
|
assert events == snapshot(
|
|
492
491
|
[
|
|
@@ -562,7 +561,7 @@ async def test_tool_ag_ui_parts() -> None:
|
|
|
562
561
|
yield '{"get_weather": "Tool result"}'
|
|
563
562
|
|
|
564
563
|
agent = Agent(model=FunctionModel(stream_function=stream_function))
|
|
565
|
-
|
|
564
|
+
|
|
566
565
|
run_inputs = [
|
|
567
566
|
(
|
|
568
567
|
first_input := create_input(
|
|
@@ -600,7 +599,7 @@ async def test_tool_ag_ui_parts() -> None:
|
|
|
600
599
|
thread_id=first_input.thread_id,
|
|
601
600
|
),
|
|
602
601
|
]
|
|
603
|
-
events = await
|
|
602
|
+
events = await run_and_collect_events(agent, *run_inputs)
|
|
604
603
|
|
|
605
604
|
assert events == snapshot(
|
|
606
605
|
[
|
|
@@ -675,14 +674,14 @@ async def test_tool_local_single_event() -> None:
|
|
|
675
674
|
model=FunctionModel(stream_function=stream_function),
|
|
676
675
|
tools=[send_snapshot],
|
|
677
676
|
)
|
|
678
|
-
|
|
677
|
+
|
|
679
678
|
run_input = create_input(
|
|
680
679
|
UserMessage(
|
|
681
680
|
id='msg_1',
|
|
682
681
|
content='Please call send_snapshot',
|
|
683
682
|
),
|
|
684
683
|
)
|
|
685
|
-
events = await
|
|
684
|
+
events = await run_and_collect_events(agent, run_input)
|
|
686
685
|
|
|
687
686
|
assert events == snapshot(
|
|
688
687
|
[
|
|
@@ -744,14 +743,14 @@ async def test_tool_local_multiple_events() -> None:
|
|
|
744
743
|
model=FunctionModel(stream_function=stream_function),
|
|
745
744
|
tools=[send_custom],
|
|
746
745
|
)
|
|
747
|
-
|
|
746
|
+
|
|
748
747
|
run_input = create_input(
|
|
749
748
|
UserMessage(
|
|
750
749
|
id='msg_1',
|
|
751
750
|
content='Please call send_custom',
|
|
752
751
|
),
|
|
753
752
|
)
|
|
754
|
-
events = await
|
|
753
|
+
events = await run_and_collect_events(agent, run_input)
|
|
755
754
|
|
|
756
755
|
assert events == snapshot(
|
|
757
756
|
[
|
|
@@ -812,7 +811,6 @@ async def test_tool_local_parts() -> None:
|
|
|
812
811
|
tools=[send_snapshot, send_custom, current_time],
|
|
813
812
|
)
|
|
814
813
|
|
|
815
|
-
adapter = _Adapter(agent=agent)
|
|
816
814
|
run_input = create_input(
|
|
817
815
|
UserMessage(
|
|
818
816
|
id='msg_1',
|
|
@@ -820,7 +818,7 @@ async def test_tool_local_parts() -> None:
|
|
|
820
818
|
),
|
|
821
819
|
)
|
|
822
820
|
|
|
823
|
-
events = await
|
|
821
|
+
events = await run_and_collect_events(agent, run_input)
|
|
824
822
|
|
|
825
823
|
assert events == snapshot(
|
|
826
824
|
[
|
|
@@ -873,7 +871,7 @@ async def test_thinking() -> None:
|
|
|
873
871
|
agent = Agent(
|
|
874
872
|
model=FunctionModel(stream_function=stream_function),
|
|
875
873
|
)
|
|
876
|
-
|
|
874
|
+
|
|
877
875
|
run_input = create_input(
|
|
878
876
|
UserMessage(
|
|
879
877
|
id='msg_1',
|
|
@@ -881,7 +879,7 @@ async def test_thinking() -> None:
|
|
|
881
879
|
),
|
|
882
880
|
)
|
|
883
881
|
|
|
884
|
-
events = await
|
|
882
|
+
events = await run_and_collect_events(agent, run_input)
|
|
885
883
|
|
|
886
884
|
assert events == snapshot(
|
|
887
885
|
[
|
|
@@ -933,7 +931,7 @@ async def test_tool_local_then_ag_ui() -> None:
|
|
|
933
931
|
model=FunctionModel(stream_function=stream_function),
|
|
934
932
|
tools=[current_time],
|
|
935
933
|
)
|
|
936
|
-
|
|
934
|
+
|
|
937
935
|
run_inputs = [
|
|
938
936
|
(
|
|
939
937
|
first_input := create_input(
|
|
@@ -989,7 +987,7 @@ async def test_tool_local_then_ag_ui() -> None:
|
|
|
989
987
|
thread_id=first_input.thread_id,
|
|
990
988
|
),
|
|
991
989
|
]
|
|
992
|
-
events = await
|
|
990
|
+
events = await run_and_collect_events(agent, *run_inputs)
|
|
993
991
|
|
|
994
992
|
assert events == snapshot(
|
|
995
993
|
[
|
|
@@ -1068,7 +1066,7 @@ async def test_request_with_state() -> None:
|
|
|
1068
1066
|
deps_type=StateDeps[StateInt], # type: ignore[reportUnknownArgumentType]
|
|
1069
1067
|
prepare_tools=store_state,
|
|
1070
1068
|
)
|
|
1071
|
-
|
|
1069
|
+
|
|
1072
1070
|
run_inputs = [
|
|
1073
1071
|
create_input(
|
|
1074
1072
|
UserMessage(
|
|
@@ -1102,7 +1100,7 @@ async def test_request_with_state() -> None:
|
|
|
1102
1100
|
|
|
1103
1101
|
for run_input in run_inputs:
|
|
1104
1102
|
events = list[dict[str, Any]]()
|
|
1105
|
-
async for event in
|
|
1103
|
+
async for event in run_ag_ui(agent, run_input, deps=deps):
|
|
1106
1104
|
events.append(json.loads(event.removeprefix('data: ')))
|
|
1107
1105
|
|
|
1108
1106
|
assert events == simple_result()
|
|
@@ -1122,7 +1120,7 @@ async def test_request_with_state() -> None:
|
|
|
1122
1120
|
|
|
1123
1121
|
async def test_request_with_state_without_handler() -> None:
|
|
1124
1122
|
agent = Agent(model=FunctionModel(stream_function=simple_stream))
|
|
1125
|
-
|
|
1123
|
+
|
|
1126
1124
|
run_input = create_input(
|
|
1127
1125
|
UserMessage(
|
|
1128
1126
|
id='msg_1',
|
|
@@ -1135,7 +1133,7 @@ async def test_request_with_state_without_handler() -> None:
|
|
|
1135
1133
|
UserError,
|
|
1136
1134
|
match='AG-UI state is provided but `deps` of type `NoneType` does not implement the `StateHandler` protocol: it needs to be a dataclass with a non-optional `state` field.',
|
|
1137
1135
|
):
|
|
1138
|
-
async for _ in
|
|
1136
|
+
async for _ in run_ag_ui(agent, run_input):
|
|
1139
1137
|
pass
|
|
1140
1138
|
|
|
1141
1139
|
|
|
@@ -1155,7 +1153,7 @@ async def test_request_with_state_with_custom_handler() -> None:
|
|
|
1155
1153
|
deps_type=CustomStateDeps,
|
|
1156
1154
|
prepare_tools=store_state,
|
|
1157
1155
|
)
|
|
1158
|
-
|
|
1156
|
+
|
|
1159
1157
|
run_input = create_input(
|
|
1160
1158
|
UserMessage(
|
|
1161
1159
|
id='msg_1',
|
|
@@ -1164,7 +1162,7 @@ async def test_request_with_state_with_custom_handler() -> None:
|
|
|
1164
1162
|
state={'value': 42},
|
|
1165
1163
|
)
|
|
1166
1164
|
|
|
1167
|
-
async for _ in
|
|
1165
|
+
async for _ in run_ag_ui(agent, run_input, deps=CustomStateDeps(state={'value': 0})):
|
|
1168
1166
|
pass
|
|
1169
1167
|
|
|
1170
1168
|
assert seen_states[-1] == {'value': 42}
|
|
@@ -1183,7 +1181,6 @@ async def test_concurrent_runs() -> None:
|
|
|
1183
1181
|
async def get_state(ctx: RunContext[StateDeps[StateInt]]) -> int:
|
|
1184
1182
|
return ctx.deps.state.value
|
|
1185
1183
|
|
|
1186
|
-
adapter = _Adapter(agent=agent)
|
|
1187
1184
|
concurrent_tasks: list[asyncio.Task[list[dict[str, Any]]]] = []
|
|
1188
1185
|
|
|
1189
1186
|
for i in range(5): # Test with 5 concurrent runs
|
|
@@ -1196,7 +1193,7 @@ async def test_concurrent_runs() -> None:
|
|
|
1196
1193
|
thread_id=f'test_thread_{i}',
|
|
1197
1194
|
)
|
|
1198
1195
|
|
|
1199
|
-
task = asyncio.create_task(
|
|
1196
|
+
task = asyncio.create_task(run_and_collect_events(agent, run_input, deps=StateDeps(StateInt())))
|
|
1200
1197
|
concurrent_tasks.append(task)
|
|
1201
1198
|
|
|
1202
1199
|
results = await asyncio.gather(*concurrent_tasks)
|
|
@@ -3866,7 +3866,7 @@ def test_prepare_output_tools():
|
|
|
3866
3866
|
)
|
|
3867
3867
|
|
|
3868
3868
|
|
|
3869
|
-
async def
|
|
3869
|
+
async def test_explicit_context_manager():
|
|
3870
3870
|
try:
|
|
3871
3871
|
from pydantic_ai.mcp import MCPServerStdio
|
|
3872
3872
|
except ImportError: # pragma: lax no cover
|
|
@@ -3886,6 +3886,47 @@ async def test_context_manager():
|
|
|
3886
3886
|
assert server2.is_running
|
|
3887
3887
|
|
|
3888
3888
|
|
|
3889
|
+
async def test_implicit_context_manager():
|
|
3890
|
+
try:
|
|
3891
|
+
from pydantic_ai.mcp import MCPServerStdio
|
|
3892
|
+
except ImportError: # pragma: lax no cover
|
|
3893
|
+
pytest.skip('mcp is not installed')
|
|
3894
|
+
|
|
3895
|
+
server1 = MCPServerStdio('python', ['-m', 'tests.mcp_server'])
|
|
3896
|
+
server2 = MCPServerStdio('python', ['-m', 'tests.mcp_server'])
|
|
3897
|
+
toolset = CombinedToolset([server1, PrefixedToolset(server2, 'prefix')])
|
|
3898
|
+
agent = Agent('test', toolsets=[toolset])
|
|
3899
|
+
|
|
3900
|
+
async with agent.iter(
|
|
3901
|
+
user_prompt='Hello',
|
|
3902
|
+
):
|
|
3903
|
+
assert server1.is_running
|
|
3904
|
+
assert server2.is_running
|
|
3905
|
+
|
|
3906
|
+
|
|
3907
|
+
def test_parallel_mcp_calls():
|
|
3908
|
+
try:
|
|
3909
|
+
from pydantic_ai.mcp import MCPServerStdio
|
|
3910
|
+
except ImportError: # pragma: lax no cover
|
|
3911
|
+
pytest.skip('mcp is not installed')
|
|
3912
|
+
|
|
3913
|
+
async def call_tools_parallel(messages: list[ModelMessage], info: AgentInfo) -> ModelResponse:
|
|
3914
|
+
if len(messages) == 1:
|
|
3915
|
+
return ModelResponse(
|
|
3916
|
+
parts=[
|
|
3917
|
+
ToolCallPart(tool_name='get_none'),
|
|
3918
|
+
ToolCallPart(tool_name='get_multiple_items'),
|
|
3919
|
+
]
|
|
3920
|
+
)
|
|
3921
|
+
else:
|
|
3922
|
+
return ModelResponse(parts=[TextPart('finished')])
|
|
3923
|
+
|
|
3924
|
+
server = MCPServerStdio('python', ['-m', 'tests.mcp_server'])
|
|
3925
|
+
agent = Agent(FunctionModel(call_tools_parallel), toolsets=[server])
|
|
3926
|
+
result = agent.run_sync()
|
|
3927
|
+
assert result.output == snapshot('finished')
|
|
3928
|
+
|
|
3929
|
+
|
|
3889
3930
|
def test_set_mcp_sampling_model():
|
|
3890
3931
|
try:
|
|
3891
3932
|
from pydantic_ai.mcp import MCPServerStdio
|
|
@@ -82,14 +82,15 @@ def test_handle_dovetailed_text_deltas():
|
|
|
82
82
|
|
|
83
83
|
def test_handle_text_deltas_with_think_tags():
|
|
84
84
|
manager = ModelResponsePartsManager()
|
|
85
|
+
thinking_tags = ('<think>', '</think>')
|
|
85
86
|
|
|
86
|
-
event = manager.handle_text_delta(vendor_part_id='content', content='pre-',
|
|
87
|
+
event = manager.handle_text_delta(vendor_part_id='content', content='pre-', thinking_tags=thinking_tags)
|
|
87
88
|
assert event == snapshot(
|
|
88
89
|
PartStartEvent(index=0, part=TextPart(content='pre-', part_kind='text'), event_kind='part_start')
|
|
89
90
|
)
|
|
90
91
|
assert manager.get_parts() == snapshot([TextPart(content='pre-', part_kind='text')])
|
|
91
92
|
|
|
92
|
-
event = manager.handle_text_delta(vendor_part_id='content', content='thinking',
|
|
93
|
+
event = manager.handle_text_delta(vendor_part_id='content', content='thinking', thinking_tags=thinking_tags)
|
|
93
94
|
assert event == snapshot(
|
|
94
95
|
PartDeltaEvent(
|
|
95
96
|
index=0, delta=TextPartDelta(content_delta='thinking', part_delta_kind='text'), event_kind='part_delta'
|
|
@@ -97,7 +98,7 @@ def test_handle_text_deltas_with_think_tags():
|
|
|
97
98
|
)
|
|
98
99
|
assert manager.get_parts() == snapshot([TextPart(content='pre-thinking', part_kind='text')])
|
|
99
100
|
|
|
100
|
-
event = manager.handle_text_delta(vendor_part_id='content', content='<think>',
|
|
101
|
+
event = manager.handle_text_delta(vendor_part_id='content', content='<think>', thinking_tags=thinking_tags)
|
|
101
102
|
assert event == snapshot(
|
|
102
103
|
PartStartEvent(index=1, part=ThinkingPart(content='', part_kind='thinking'), event_kind='part_start')
|
|
103
104
|
)
|
|
@@ -105,7 +106,7 @@ def test_handle_text_deltas_with_think_tags():
|
|
|
105
106
|
[TextPart(content='pre-thinking', part_kind='text'), ThinkingPart(content='', part_kind='thinking')]
|
|
106
107
|
)
|
|
107
108
|
|
|
108
|
-
event = manager.handle_text_delta(vendor_part_id='content', content='thinking',
|
|
109
|
+
event = manager.handle_text_delta(vendor_part_id='content', content='thinking', thinking_tags=thinking_tags)
|
|
109
110
|
assert event == snapshot(
|
|
110
111
|
PartDeltaEvent(
|
|
111
112
|
index=1,
|
|
@@ -117,7 +118,7 @@ def test_handle_text_deltas_with_think_tags():
|
|
|
117
118
|
[TextPart(content='pre-thinking', part_kind='text'), ThinkingPart(content='thinking', part_kind='thinking')]
|
|
118
119
|
)
|
|
119
120
|
|
|
120
|
-
event = manager.handle_text_delta(vendor_part_id='content', content=' more',
|
|
121
|
+
event = manager.handle_text_delta(vendor_part_id='content', content=' more', thinking_tags=thinking_tags)
|
|
121
122
|
assert event == snapshot(
|
|
122
123
|
PartDeltaEvent(
|
|
123
124
|
index=1, delta=ThinkingPartDelta(content_delta=' more', part_delta_kind='thinking'), event_kind='part_delta'
|
|
@@ -130,10 +131,10 @@ def test_handle_text_deltas_with_think_tags():
|
|
|
130
131
|
]
|
|
131
132
|
)
|
|
132
133
|
|
|
133
|
-
event = manager.handle_text_delta(vendor_part_id='content', content='</think>',
|
|
134
|
+
event = manager.handle_text_delta(vendor_part_id='content', content='</think>', thinking_tags=thinking_tags)
|
|
134
135
|
assert event is None
|
|
135
136
|
|
|
136
|
-
event = manager.handle_text_delta(vendor_part_id='content', content='post-',
|
|
137
|
+
event = manager.handle_text_delta(vendor_part_id='content', content='post-', thinking_tags=thinking_tags)
|
|
137
138
|
assert event == snapshot(
|
|
138
139
|
PartStartEvent(index=2, part=TextPart(content='post-', part_kind='text'), event_kind='part_start')
|
|
139
140
|
)
|
|
@@ -145,7 +146,7 @@ def test_handle_text_deltas_with_think_tags():
|
|
|
145
146
|
]
|
|
146
147
|
)
|
|
147
148
|
|
|
148
|
-
event = manager.handle_text_delta(vendor_part_id='content', content='thinking',
|
|
149
|
+
event = manager.handle_text_delta(vendor_part_id='content', content='thinking', thinking_tags=thinking_tags)
|
|
149
150
|
assert event == snapshot(
|
|
150
151
|
PartDeltaEvent(
|
|
151
152
|
index=2, delta=TextPartDelta(content_delta='thinking', part_delta_kind='text'), event_kind='part_delta'
|
|
@@ -8,25 +8,72 @@ from pydantic_ai.messages import ModelResponsePart, TextPart, ThinkingPart, Thin
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
@pytest.mark.parametrize(
|
|
11
|
-
|
|
11
|
+
'thinking_tags, content, parts',
|
|
12
12
|
[
|
|
13
|
-
|
|
13
|
+
# default <think>…</think> cases
|
|
14
14
|
(
|
|
15
|
+
('<think>', '</think>'),
|
|
16
|
+
'foo bar',
|
|
17
|
+
[TextPart(content='foo bar')],
|
|
18
|
+
),
|
|
19
|
+
(
|
|
20
|
+
('<think>', '</think>'),
|
|
15
21
|
'foo bar<think>thinking</think>',
|
|
16
22
|
[TextPart(content='foo bar'), ThinkingPart(content='thinking')],
|
|
17
23
|
),
|
|
18
24
|
(
|
|
25
|
+
('<think>', '</think>'),
|
|
19
26
|
'foo bar<think>thinking</think>baz',
|
|
20
|
-
[
|
|
27
|
+
[
|
|
28
|
+
TextPart(content='foo bar'),
|
|
29
|
+
ThinkingPart(content='thinking'),
|
|
30
|
+
TextPart(content='baz'),
|
|
31
|
+
],
|
|
21
32
|
),
|
|
22
33
|
(
|
|
34
|
+
('<think>', '</think>'),
|
|
23
35
|
'foo bar<think>thinking',
|
|
24
36
|
[TextPart(content='foo bar'), TextPart(content='thinking')],
|
|
25
37
|
),
|
|
38
|
+
(
|
|
39
|
+
('<think>', '</think>'),
|
|
40
|
+
'foo bar<custom>thinking</custom>baz',
|
|
41
|
+
[TextPart(content='foo bar<custom>thinking</custom>baz')],
|
|
42
|
+
),
|
|
43
|
+
# custom <custom>…</custom> cases
|
|
44
|
+
(
|
|
45
|
+
('<custom>', '</custom>'),
|
|
46
|
+
'foo bar',
|
|
47
|
+
[TextPart(content='foo bar')],
|
|
48
|
+
),
|
|
49
|
+
(
|
|
50
|
+
('<custom>', '</custom>'),
|
|
51
|
+
'foo bar<custom>thinking</custom>',
|
|
52
|
+
[TextPart(content='foo bar'), ThinkingPart(content='thinking')],
|
|
53
|
+
),
|
|
54
|
+
(
|
|
55
|
+
('<custom>', '</custom>'),
|
|
56
|
+
'foo bar<custom>thinking</custom>baz',
|
|
57
|
+
[
|
|
58
|
+
TextPart(content='foo bar'),
|
|
59
|
+
ThinkingPart(content='thinking'),
|
|
60
|
+
TextPart(content='baz'),
|
|
61
|
+
],
|
|
62
|
+
),
|
|
63
|
+
(
|
|
64
|
+
('<custom>', '</custom>'),
|
|
65
|
+
'foo bar<custom>thinking',
|
|
66
|
+
[TextPart(content='foo bar'), TextPart(content='thinking')],
|
|
67
|
+
),
|
|
68
|
+
(
|
|
69
|
+
('<custom>', '</custom>'),
|
|
70
|
+
'foo bar<think>thinking</think>baz',
|
|
71
|
+
[TextPart(content='foo bar<think>thinking</think>baz')],
|
|
72
|
+
),
|
|
26
73
|
],
|
|
27
74
|
)
|
|
28
|
-
def
|
|
29
|
-
assert split_content_into_text_and_thinking(content) == parts
|
|
75
|
+
def test_split_content(thinking_tags: tuple[str, str], content: str, parts: list[ModelResponsePart]):
|
|
76
|
+
assert split_content_into_text_and_thinking(content, thinking_tags) == parts
|
|
30
77
|
|
|
31
78
|
|
|
32
79
|
def test_thinking_part_delta_applies_both_content_and_signature():
|
|
@@ -13,7 +13,16 @@ from typing_extensions import TypedDict
|
|
|
13
13
|
|
|
14
14
|
from pydantic_ai import Agent, RunContext, Tool, UserError
|
|
15
15
|
from pydantic_ai.exceptions import ModelRetry, UnexpectedModelBehavior
|
|
16
|
-
from pydantic_ai.messages import
|
|
16
|
+
from pydantic_ai.messages import (
|
|
17
|
+
ModelMessage,
|
|
18
|
+
ModelRequest,
|
|
19
|
+
ModelResponse,
|
|
20
|
+
TextPart,
|
|
21
|
+
ToolCallPart,
|
|
22
|
+
ToolReturn,
|
|
23
|
+
ToolReturnPart,
|
|
24
|
+
UserPromptPart,
|
|
25
|
+
)
|
|
17
26
|
from pydantic_ai.models.function import AgentInfo, FunctionModel
|
|
18
27
|
from pydantic_ai.models.test import TestModel
|
|
19
28
|
from pydantic_ai.output import DeferredToolCalls, ToolOutput
|
|
@@ -21,8 +30,9 @@ from pydantic_ai.tools import ToolDefinition
|
|
|
21
30
|
from pydantic_ai.toolsets.deferred import DeferredToolset
|
|
22
31
|
from pydantic_ai.toolsets.function import FunctionToolset
|
|
23
32
|
from pydantic_ai.toolsets.prefixed import PrefixedToolset
|
|
33
|
+
from pydantic_ai.usage import Usage
|
|
24
34
|
|
|
25
|
-
from .conftest import IsStr
|
|
35
|
+
from .conftest import IsDatetime, IsStr
|
|
26
36
|
|
|
27
37
|
|
|
28
38
|
def test_tool_no_ctx():
|
|
@@ -1321,3 +1331,91 @@ def test_output_type_deferred_tool_calls_by_itself():
|
|
|
1321
1331
|
def test_output_type_empty():
|
|
1322
1332
|
with pytest.raises(UserError, match='At least one output type must be provided.'):
|
|
1323
1333
|
Agent(TestModel(), output_type=[])
|
|
1334
|
+
|
|
1335
|
+
|
|
1336
|
+
def test_parallel_tool_return():
|
|
1337
|
+
def llm(messages: list[ModelMessage], info: AgentInfo) -> ModelResponse:
|
|
1338
|
+
if len(messages) == 1:
|
|
1339
|
+
return ModelResponse(
|
|
1340
|
+
parts=[ToolCallPart('get_price', {'fruit': 'apple'}), ToolCallPart('get_price', {'fruit': 'banana'})]
|
|
1341
|
+
)
|
|
1342
|
+
else:
|
|
1343
|
+
return ModelResponse(
|
|
1344
|
+
parts=[
|
|
1345
|
+
TextPart('Done!'),
|
|
1346
|
+
]
|
|
1347
|
+
)
|
|
1348
|
+
|
|
1349
|
+
agent = Agent(FunctionModel(llm))
|
|
1350
|
+
|
|
1351
|
+
@agent.tool_plain
|
|
1352
|
+
def get_price(fruit: str) -> ToolReturn:
|
|
1353
|
+
return ToolReturn(
|
|
1354
|
+
return_value=10.0,
|
|
1355
|
+
content=f'The price of {fruit} is 10.0',
|
|
1356
|
+
metadata={'foo': 'bar'},
|
|
1357
|
+
)
|
|
1358
|
+
|
|
1359
|
+
result = agent.run_sync('What do an apple and a banana cost?')
|
|
1360
|
+
|
|
1361
|
+
assert result.all_messages() == snapshot(
|
|
1362
|
+
[
|
|
1363
|
+
ModelRequest(
|
|
1364
|
+
parts=[
|
|
1365
|
+
UserPromptPart(
|
|
1366
|
+
content='What do an apple and a banana cost?',
|
|
1367
|
+
timestamp=IsDatetime(),
|
|
1368
|
+
)
|
|
1369
|
+
]
|
|
1370
|
+
),
|
|
1371
|
+
ModelResponse(
|
|
1372
|
+
parts=[
|
|
1373
|
+
ToolCallPart(
|
|
1374
|
+
tool_name='get_price',
|
|
1375
|
+
args={'fruit': 'apple'},
|
|
1376
|
+
tool_call_id=IsStr(),
|
|
1377
|
+
),
|
|
1378
|
+
ToolCallPart(
|
|
1379
|
+
tool_name='get_price',
|
|
1380
|
+
args={'fruit': 'banana'},
|
|
1381
|
+
tool_call_id=IsStr(),
|
|
1382
|
+
),
|
|
1383
|
+
],
|
|
1384
|
+
usage=Usage(requests=1, request_tokens=58, response_tokens=10, total_tokens=68),
|
|
1385
|
+
model_name='function:llm:',
|
|
1386
|
+
timestamp=IsDatetime(),
|
|
1387
|
+
),
|
|
1388
|
+
ModelRequest(
|
|
1389
|
+
parts=[
|
|
1390
|
+
ToolReturnPart(
|
|
1391
|
+
tool_name='get_price',
|
|
1392
|
+
content=10.0,
|
|
1393
|
+
tool_call_id=IsStr(),
|
|
1394
|
+
metadata={'foo': 'bar'},
|
|
1395
|
+
timestamp=IsDatetime(),
|
|
1396
|
+
),
|
|
1397
|
+
ToolReturnPart(
|
|
1398
|
+
tool_name='get_price',
|
|
1399
|
+
content=10.0,
|
|
1400
|
+
tool_call_id=IsStr(),
|
|
1401
|
+
metadata={'foo': 'bar'},
|
|
1402
|
+
timestamp=IsDatetime(),
|
|
1403
|
+
),
|
|
1404
|
+
UserPromptPart(
|
|
1405
|
+
content='The price of apple is 10.0',
|
|
1406
|
+
timestamp=IsDatetime(),
|
|
1407
|
+
),
|
|
1408
|
+
UserPromptPart(
|
|
1409
|
+
content='The price of banana is 10.0',
|
|
1410
|
+
timestamp=IsDatetime(),
|
|
1411
|
+
),
|
|
1412
|
+
]
|
|
1413
|
+
),
|
|
1414
|
+
ModelResponse(
|
|
1415
|
+
parts=[TextPart(content='Done!')],
|
|
1416
|
+
usage=Usage(requests=1, request_tokens=76, response_tokens=11, total_tokens=87),
|
|
1417
|
+
model_name='function:llm:',
|
|
1418
|
+
timestamp=IsDatetime(),
|
|
1419
|
+
),
|
|
1420
|
+
]
|
|
1421
|
+
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pydantic_ai-0.4.9 → pydantic_ai-0.4.11}/tests/cassettes/test_mcp/test_agent_with_stdio_server.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|