anthropic 0.57.1__tar.gz → 0.58.0__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.
- anthropic-0.58.0/.release-please-manifest.json +3 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/CHANGELOG.md +29 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/PKG-INFO +7 -6
- {anthropic-0.57.1 → anthropic-0.58.0}/README.md +4 -4
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/bedrock.py +2 -2
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/images.py +1 -1
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/mcp.py +1 -1
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/messages.py +2 -2
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/messages_stream.py +1 -1
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/text_completions_demo_async.py +1 -1
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/text_completions_demo_sync.py +1 -1
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/text_completions_streaming.py +2 -2
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/thinking.py +1 -1
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/thinking_stream.py +1 -1
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/tools.py +2 -2
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/tools_stream.py +1 -1
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/vertex.py +2 -2
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/web_search.py +1 -1
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/web_search_stream.py +1 -1
- {anthropic-0.57.1 → anthropic-0.58.0}/pyproject.toml +3 -2
- {anthropic-0.57.1 → anthropic-0.58.0}/requirements-dev.lock +7 -5
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_base_client.py +9 -2
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_models.py +7 -4
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_version.py +1 -1
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/test_client.py +2 -2
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/test_models.py +45 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/uv.lock +54 -33
- anthropic-0.57.1/.release-please-manifest.json +0 -3
- {anthropic-0.57.1 → anthropic-0.58.0}/.gitignore +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/CONTRIBUTING.md +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/LICENSE +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/SECURITY.md +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/api.md +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/bin/check-release-environment +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/bin/publish-pypi +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/.keep +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/batch_results.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/examples/logo.png +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/helpers.md +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/mypy.ini +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/release-please-config.json +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_client.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_compat.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_constants.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_decoders/jsonl.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_exceptions.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_files.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_legacy_response.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_qs.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_resource.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_response.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_streaming.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_types.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_utils/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_utils/_httpx.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_utils/_logs.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_utils/_proxy.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_utils/_reflection.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_utils/_resources_proxy.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_utils/_streams.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_utils/_sync.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_utils/_transform.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_utils/_typing.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/_utils/_utils.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/.keep +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/_extras/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/_extras/_common.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/_extras/_google_auth.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/bedrock/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/bedrock/_auth.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/bedrock/_beta.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/bedrock/_beta_messages.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/bedrock/_client.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/bedrock/_stream.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/bedrock/_stream_decoder.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/streaming/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/streaming/_beta_messages.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/streaming/_beta_types.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/streaming/_messages.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/streaming/_types.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/vertex/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/vertex/_auth.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/vertex/_beta.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/vertex/_beta_messages.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/lib/vertex/_client.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/pagination.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/py.typed +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/resources/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/resources/beta/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/resources/beta/beta.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/resources/beta/files.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/resources/beta/messages/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/resources/beta/messages/batches.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/resources/beta/messages/messages.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/resources/beta/models.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/resources/completions.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/resources/messages/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/resources/messages/batches.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/resources/messages/messages.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/resources/models.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/anthropic_beta_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/base64_image_source_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/base64_pdf_source_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_base64_image_source_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_base64_pdf_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_base64_pdf_source_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_cache_control_ephemeral_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_cache_creation.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_citation_char_location.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_citation_char_location_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_citation_content_block_location.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_citation_content_block_location_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_citation_page_location.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_citation_page_location_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_citation_search_result_location.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_citation_search_result_location_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_citation_web_search_result_location_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_citations_config_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_citations_delta.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_citations_web_search_result_location.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_code_execution_output_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_code_execution_output_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_code_execution_result_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_code_execution_result_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_code_execution_tool_20250522_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_code_execution_tool_result_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_code_execution_tool_result_block_content.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_code_execution_tool_result_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_code_execution_tool_result_block_param_content_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_code_execution_tool_result_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_code_execution_tool_result_error_code.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_code_execution_tool_result_error_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_container.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_container_upload_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_container_upload_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_content_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_content_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_content_block_source_content_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_content_block_source_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_file_document_source_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_file_image_source_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_image_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_input_json_delta.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_mcp_tool_result_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_mcp_tool_use_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_mcp_tool_use_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_message.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_message_delta_usage.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_message_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_message_tokens_count.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_metadata_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_model_info.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_plain_text_source_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_raw_content_block_delta.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_raw_content_block_delta_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_raw_content_block_start_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_raw_content_block_stop_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_raw_message_delta_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_raw_message_start_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_raw_message_stop_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_raw_message_stream_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_redacted_thinking_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_redacted_thinking_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_request_document_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_request_mcp_server_tool_configuration_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_request_mcp_server_url_definition_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_request_mcp_tool_result_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_search_result_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_server_tool_usage.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_server_tool_use_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_server_tool_use_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_signature_delta.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_stop_reason.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_text_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_text_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_text_citation.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_text_citation_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_text_delta.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_thinking_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_thinking_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_thinking_config_disabled_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_thinking_config_enabled_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_thinking_config_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_thinking_delta.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_tool_bash_20241022_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_tool_bash_20250124_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_tool_choice_any_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_tool_choice_auto_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_tool_choice_none_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_tool_choice_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_tool_choice_tool_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_tool_computer_use_20241022_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_tool_computer_use_20250124_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_tool_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_tool_result_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_tool_text_editor_20241022_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_tool_text_editor_20250124_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_tool_text_editor_20250429_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_tool_union_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_tool_use_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_tool_use_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_url_image_source_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_url_pdf_source_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_usage.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_web_search_result_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_web_search_result_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_web_search_tool_20250305_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_web_search_tool_request_error_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_web_search_tool_result_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_web_search_tool_result_block_content.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_web_search_tool_result_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_web_search_tool_result_block_param_content_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_web_search_tool_result_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/beta_web_search_tool_result_error_code.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/deleted_file.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/file_list_params.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/file_metadata.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/file_upload_params.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/message_count_tokens_params.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/message_create_params.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/messages/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/messages/batch_create_params.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/messages/batch_list_params.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/messages/beta_deleted_message_batch.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/messages/beta_message_batch.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/messages/beta_message_batch_canceled_result.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/messages/beta_message_batch_errored_result.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/messages/beta_message_batch_expired_result.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/messages/beta_message_batch_individual_response.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/messages/beta_message_batch_request_counts.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/messages/beta_message_batch_result.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/messages/beta_message_batch_succeeded_result.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta/model_list_params.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta_api_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta_authentication_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta_billing_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta_error_response.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta_gateway_timeout_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta_invalid_request_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta_not_found_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta_overloaded_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta_permission_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/beta_rate_limit_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/cache_control_ephemeral_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/citation_char_location.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/citation_char_location_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/citation_content_block_location.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/citation_content_block_location_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/citation_page_location.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/citation_page_location_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/citation_web_search_result_location_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/citations_config_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/citations_delta.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/citations_web_search_result_location.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/completion.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/completion_create_params.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/content_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/content_block_delta_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/content_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/content_block_source_content_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/content_block_source_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/content_block_start_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/content_block_stop_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/document_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/image_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/input_json_delta.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/message.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/message_count_tokens_params.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/message_count_tokens_tool_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/message_create_params.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/message_delta_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/message_delta_usage.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/message_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/message_start_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/message_stop_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/message_stream_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/message_tokens_count.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/messages/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/messages/batch_create_params.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/messages/batch_list_params.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/messages/deleted_message_batch.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/messages/message_batch.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/messages/message_batch_canceled_result.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/messages/message_batch_errored_result.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/messages/message_batch_expired_result.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/messages/message_batch_individual_response.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/messages/message_batch_request_counts.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/messages/message_batch_result.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/messages/message_batch_succeeded_result.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/metadata_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/model.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/model_info.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/model_list_params.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/model_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/plain_text_source_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/raw_content_block_delta.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/raw_content_block_delta_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/raw_content_block_start_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/raw_content_block_stop_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/raw_message_delta_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/raw_message_start_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/raw_message_stop_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/raw_message_stream_event.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/redacted_thinking_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/redacted_thinking_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/server_tool_usage.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/server_tool_use_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/server_tool_use_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/shared/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/shared/api_error_object.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/shared/authentication_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/shared/billing_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/shared/error_object.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/shared/error_response.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/shared/gateway_timeout_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/shared/invalid_request_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/shared/not_found_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/shared/overloaded_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/shared/permission_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/shared/rate_limit_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/signature_delta.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/stop_reason.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/text_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/text_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/text_citation.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/text_citation_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/text_delta.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/thinking_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/thinking_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/thinking_config_disabled_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/thinking_config_enabled_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/thinking_config_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/thinking_delta.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/tool_bash_20250124_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/tool_choice_any_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/tool_choice_auto_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/tool_choice_none_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/tool_choice_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/tool_choice_tool_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/tool_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/tool_result_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/tool_text_editor_20250124_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/tool_union_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/tool_use_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/tool_use_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/url_image_source_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/url_pdf_source_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/usage.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/web_search_result_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/web_search_result_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/web_search_tool_20250305_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/web_search_tool_request_error_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/web_search_tool_result_block.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/web_search_tool_result_block_content.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/web_search_tool_result_block_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/web_search_tool_result_block_param_content_param.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/src/anthropic/types/web_search_tool_result_error.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/api_resources/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/api_resources/beta/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/api_resources/beta/messages/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/api_resources/beta/messages/test_batches.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/api_resources/beta/test_files.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/api_resources/beta/test_messages.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/api_resources/beta/test_models.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/api_resources/messages/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/api_resources/messages/test_batches.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/api_resources/test_completions.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/api_resources/test_messages.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/api_resources/test_models.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/conftest.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/decoders/test_jsonl.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/lib/streaming/__init__.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/lib/streaming/fixtures/basic_response.txt +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/lib/streaming/fixtures/incomplete_partial_json_response.txt +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/lib/streaming/fixtures/tool_use_response.txt +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/lib/streaming/helpers.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/lib/streaming/test_beta_messages.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/lib/streaming/test_messages.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/lib/streaming/test_partial_json.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/lib/test_bedrock.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/lib/test_vertex.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/sample_file.txt +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/test_deepcopy.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/test_extract_files.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/test_files.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/test_legacy_response.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/test_qs.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/test_required_args.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/test_response.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/test_streaming.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/test_transform.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/test_utils/test_proxy.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/test_utils/test_typing.py +0 -0
- {anthropic-0.57.1 → anthropic-0.58.0}/tests/utils.py +0 -0
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.58.0 (2025-07-18)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.57.1...v0.58.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.57.1...v0.58.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* clean up environment call outs ([4f64e9c](https://github.com/anthropics/anthropic-sdk-python/commit/4f64e9c1bdb142bbcff2072baa709afdea348889))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **client:** don't send Content-Type header on GET requests ([727268f](https://github.com/anthropics/anthropic-sdk-python/commit/727268f2bd4cb42aa1472e1f0c6a92fd6a5cb122))
|
|
15
|
+
* **parsing:** correctly handle nested discriminated unions ([44dd47e](https://github.com/anthropics/anthropic-sdk-python/commit/44dd47e15ed91af912eac4791421e11504c3094b))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Chores
|
|
19
|
+
|
|
20
|
+
* **internal:** bump pinned h11 dep ([9a947e1](https://github.com/anthropics/anthropic-sdk-python/commit/9a947e1061021529937395758acb4d77b685a68b))
|
|
21
|
+
* **internal:** codegen related update ([33f2b34](https://github.com/anthropics/anthropic-sdk-python/commit/33f2b3468a971ca2ce6eb8b823b26d45092303f7))
|
|
22
|
+
* **internal:** version bump ([5f0f5ad](https://github.com/anthropics/anthropic-sdk-python/commit/5f0f5adba5392facf8331451c449513ae005a054))
|
|
23
|
+
* **package:** mark python 3.13 as supported ([703d557](https://github.com/anthropics/anthropic-sdk-python/commit/703d55747456a3825ba8c79cd492d6e64276dc15))
|
|
24
|
+
* **readme:** fix version rendering on pypi ([dd956a6](https://github.com/anthropics/anthropic-sdk-python/commit/dd956a616a45191398aac9061eaaa5f3b7cbf2f6))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Documentation
|
|
28
|
+
|
|
29
|
+
* model in examples ([89b6925](https://github.com/anthropics/anthropic-sdk-python/commit/89b69256dcbd107970d0763afc62f2cbf08e3d5a))
|
|
30
|
+
* model in examples ([1eccecb](https://github.com/anthropics/anthropic-sdk-python/commit/1eccecbec9e0c0cde748695e0cb1bc61ac8ffca5))
|
|
31
|
+
|
|
3
32
|
## 0.57.1 (2025-07-03)
|
|
4
33
|
|
|
5
34
|
Full Changelog: [v0.57.0...v0.57.1](https://github.com/anthropics/anthropic-sdk-python/compare/v0.57.0...v0.57.1)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: anthropic
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.58.0
|
|
4
4
|
Summary: The official Python library for the anthropic API
|
|
5
5
|
Project-URL: Homepage, https://github.com/anthropics/anthropic-sdk-python
|
|
6
6
|
Project-URL: Repository, https://github.com/anthropics/anthropic-sdk-python
|
|
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
23
|
Classifier: Typing :: Typed
|
|
23
24
|
Requires-Python: >=3.8
|
|
@@ -30,7 +31,7 @@ Requires-Dist: sniffio
|
|
|
30
31
|
Requires-Dist: typing-extensions<5,>=4.10
|
|
31
32
|
Provides-Extra: aiohttp
|
|
32
33
|
Requires-Dist: aiohttp; extra == 'aiohttp'
|
|
33
|
-
Requires-Dist: httpx-aiohttp>=0.1.
|
|
34
|
+
Requires-Dist: httpx-aiohttp>=0.1.8; extra == 'aiohttp'
|
|
34
35
|
Provides-Extra: bedrock
|
|
35
36
|
Requires-Dist: boto3>=1.28.57; extra == 'bedrock'
|
|
36
37
|
Requires-Dist: botocore>=1.31.57; extra == 'bedrock'
|
|
@@ -40,7 +41,8 @@ Description-Content-Type: text/markdown
|
|
|
40
41
|
|
|
41
42
|
# Anthropic Python API library
|
|
42
43
|
|
|
43
|
-
|
|
44
|
+
<!-- prettier-ignore -->
|
|
45
|
+
[)](https://pypi.org/project/anthropic/)
|
|
44
46
|
|
|
45
47
|
The Anthropic Python library provides convenient access to the Anthropic REST API from any Python 3.8+
|
|
46
48
|
application. It includes type definitions for all request params and response fields,
|
|
@@ -134,7 +136,6 @@ pip install anthropic[aiohttp]
|
|
|
134
136
|
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
|
|
135
137
|
|
|
136
138
|
```python
|
|
137
|
-
import os
|
|
138
139
|
import asyncio
|
|
139
140
|
from anthropic import DefaultAioHttpClient
|
|
140
141
|
from anthropic import AsyncAnthropic
|
|
@@ -142,7 +143,7 @@ from anthropic import AsyncAnthropic
|
|
|
142
143
|
|
|
143
144
|
async def main() -> None:
|
|
144
145
|
async with AsyncAnthropic(
|
|
145
|
-
api_key=
|
|
146
|
+
api_key="my-anthropic-api-key",
|
|
146
147
|
http_client=DefaultAioHttpClient(),
|
|
147
148
|
) as client:
|
|
148
149
|
message = await client.messages.create(
|
|
@@ -329,7 +330,7 @@ message = client.messages.create(
|
|
|
329
330
|
"content": "Hello!",
|
|
330
331
|
}
|
|
331
332
|
],
|
|
332
|
-
model="anthropic.claude-sonnet-4-20250514-
|
|
333
|
+
model="anthropic.claude-sonnet-4-20250514-v1:0",
|
|
333
334
|
)
|
|
334
335
|
print(message)
|
|
335
336
|
```
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Anthropic Python API library
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!-- prettier-ignore -->
|
|
4
|
+
[)](https://pypi.org/project/anthropic/)
|
|
4
5
|
|
|
5
6
|
The Anthropic Python library provides convenient access to the Anthropic REST API from any Python 3.8+
|
|
6
7
|
application. It includes type definitions for all request params and response fields,
|
|
@@ -94,7 +95,6 @@ pip install anthropic[aiohttp]
|
|
|
94
95
|
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
|
|
95
96
|
|
|
96
97
|
```python
|
|
97
|
-
import os
|
|
98
98
|
import asyncio
|
|
99
99
|
from anthropic import DefaultAioHttpClient
|
|
100
100
|
from anthropic import AsyncAnthropic
|
|
@@ -102,7 +102,7 @@ from anthropic import AsyncAnthropic
|
|
|
102
102
|
|
|
103
103
|
async def main() -> None:
|
|
104
104
|
async with AsyncAnthropic(
|
|
105
|
-
api_key=
|
|
105
|
+
api_key="my-anthropic-api-key",
|
|
106
106
|
http_client=DefaultAioHttpClient(),
|
|
107
107
|
) as client:
|
|
108
108
|
message = await client.messages.create(
|
|
@@ -289,7 +289,7 @@ message = client.messages.create(
|
|
|
289
289
|
"content": "Hello!",
|
|
290
290
|
}
|
|
291
291
|
],
|
|
292
|
-
model="anthropic.claude-sonnet-4-20250514-
|
|
292
|
+
model="anthropic.claude-sonnet-4-20250514-v1:0",
|
|
293
293
|
)
|
|
294
294
|
print(message)
|
|
295
295
|
```
|
|
@@ -19,7 +19,7 @@ message = client.messages.create(
|
|
|
19
19
|
"content": "Hello!",
|
|
20
20
|
}
|
|
21
21
|
],
|
|
22
|
-
model="anthropic.claude-
|
|
22
|
+
model="anthropic.claude-sonnet-4-20250514-v1:0",
|
|
23
23
|
)
|
|
24
24
|
print(message.model_dump_json(indent=2))
|
|
25
25
|
|
|
@@ -33,7 +33,7 @@ with client.messages.stream(
|
|
|
33
33
|
"content": "Say hello there!",
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
|
-
model="anthropic.claude-
|
|
36
|
+
model="anthropic.claude-sonnet-4-20250514-v1:0",
|
|
37
37
|
) as stream:
|
|
38
38
|
for text in stream.text_stream:
|
|
39
39
|
print(text, end="", flush=True)
|
|
@@ -10,7 +10,7 @@ response = client.messages.create(
|
|
|
10
10
|
"content": "Hello!",
|
|
11
11
|
}
|
|
12
12
|
],
|
|
13
|
-
model="claude-
|
|
13
|
+
model="claude-sonnet-4-20250514",
|
|
14
14
|
)
|
|
15
15
|
print(response)
|
|
16
16
|
|
|
@@ -30,6 +30,6 @@ response2 = client.messages.create(
|
|
|
30
30
|
"content": "How are you?",
|
|
31
31
|
},
|
|
32
32
|
],
|
|
33
|
-
model="claude-
|
|
33
|
+
model="claude-sonnet-4-20250514",
|
|
34
34
|
)
|
|
35
35
|
print(response2)
|
|
@@ -10,7 +10,7 @@ async def main() -> None:
|
|
|
10
10
|
client = AsyncAnthropic()
|
|
11
11
|
|
|
12
12
|
res = await client.completions.create(
|
|
13
|
-
model="claude-
|
|
13
|
+
model="claude-sonnet-4-20250514",
|
|
14
14
|
prompt=f"{anthropic.HUMAN_PROMPT} how does a court case get to the Supreme Court? {anthropic.AI_PROMPT}",
|
|
15
15
|
max_tokens_to_sample=1000,
|
|
16
16
|
)
|
|
@@ -8,7 +8,7 @@ def main() -> None:
|
|
|
8
8
|
client = Anthropic()
|
|
9
9
|
|
|
10
10
|
res = client.completions.create(
|
|
11
|
-
model="claude-
|
|
11
|
+
model="claude-sonnet-4-20250514",
|
|
12
12
|
prompt=f"{anthropic.HUMAN_PROMPT} how does a court case get to the Supreme Court? {anthropic.AI_PROMPT}",
|
|
13
13
|
max_tokens_to_sample=1000,
|
|
14
14
|
)
|
|
@@ -15,7 +15,7 @@ Hey Claude! How can I recursively list all files in a directory in Python?
|
|
|
15
15
|
def sync_stream() -> None:
|
|
16
16
|
stream = client.completions.create(
|
|
17
17
|
prompt=f"{HUMAN_PROMPT} {question}{AI_PROMPT}",
|
|
18
|
-
model="claude-
|
|
18
|
+
model="claude-sonnet-4-20250514",
|
|
19
19
|
stream=True,
|
|
20
20
|
max_tokens_to_sample=300,
|
|
21
21
|
)
|
|
@@ -29,7 +29,7 @@ def sync_stream() -> None:
|
|
|
29
29
|
async def async_stream() -> None:
|
|
30
30
|
stream = await async_client.completions.create(
|
|
31
31
|
prompt=f"{HUMAN_PROMPT} {question}{AI_PROMPT}",
|
|
32
|
-
model="claude-
|
|
32
|
+
model="claude-sonnet-4-20250514",
|
|
33
33
|
stream=True,
|
|
34
34
|
max_tokens_to_sample=300,
|
|
35
35
|
)
|
|
@@ -3,7 +3,7 @@ import anthropic
|
|
|
3
3
|
client = anthropic.Anthropic()
|
|
4
4
|
|
|
5
5
|
response = client.messages.create(
|
|
6
|
-
model="claude-
|
|
6
|
+
model="claude-sonnet-4-20250514",
|
|
7
7
|
max_tokens=3200,
|
|
8
8
|
thinking={"type": "enabled", "budget_tokens": 1600},
|
|
9
9
|
messages=[{"role": "user", "content": "Create a haiku about Anthropic."}],
|
|
@@ -3,7 +3,7 @@ import anthropic
|
|
|
3
3
|
client = anthropic.Anthropic()
|
|
4
4
|
|
|
5
5
|
with client.messages.stream(
|
|
6
|
-
model="claude-
|
|
6
|
+
model="claude-sonnet-4-20250514",
|
|
7
7
|
max_tokens=3200,
|
|
8
8
|
thinking={"type": "enabled", "budget_tokens": 1600},
|
|
9
9
|
messages=[{"role": "user", "content": "Create a haiku about Anthropic."}],
|
|
@@ -21,7 +21,7 @@ tools: list[ToolParam] = [
|
|
|
21
21
|
]
|
|
22
22
|
|
|
23
23
|
message = client.messages.create(
|
|
24
|
-
model="claude-
|
|
24
|
+
model="claude-sonnet-4-20250514",
|
|
25
25
|
max_tokens=1024,
|
|
26
26
|
messages=[user_message],
|
|
27
27
|
tools=tools,
|
|
@@ -32,7 +32,7 @@ assert message.stop_reason == "tool_use"
|
|
|
32
32
|
|
|
33
33
|
tool = next(c for c in message.content if c.type == "tool_use")
|
|
34
34
|
response = client.messages.create(
|
|
35
|
-
model="claude-
|
|
35
|
+
model="claude-sonnet-4-20250514",
|
|
36
36
|
max_tokens=1024,
|
|
37
37
|
messages=[
|
|
38
38
|
user_message,
|
|
@@ -9,7 +9,7 @@ def sync_client() -> None:
|
|
|
9
9
|
client = AnthropicVertex()
|
|
10
10
|
|
|
11
11
|
message = client.messages.create(
|
|
12
|
-
model="claude-
|
|
12
|
+
model="claude-sonnet-4@20250514",
|
|
13
13
|
max_tokens=100,
|
|
14
14
|
messages=[
|
|
15
15
|
{
|
|
@@ -27,7 +27,7 @@ async def async_client() -> None:
|
|
|
27
27
|
client = AsyncAnthropicVertex()
|
|
28
28
|
|
|
29
29
|
message = await client.messages.create(
|
|
30
|
-
model="claude-
|
|
30
|
+
model="claude-sonnet-4@20250514",
|
|
31
31
|
max_tokens=1024,
|
|
32
32
|
messages=[
|
|
33
33
|
{
|
|
@@ -6,7 +6,7 @@ client = Anthropic()
|
|
|
6
6
|
|
|
7
7
|
# Create a message with web search enabled
|
|
8
8
|
message = client.messages.create(
|
|
9
|
-
model="claude-
|
|
9
|
+
model="claude-sonnet-4-20250514",
|
|
10
10
|
max_tokens=1024,
|
|
11
11
|
messages=[{"role": "user", "content": "What's the weather in New York?"}],
|
|
12
12
|
tools=[
|
|
@@ -11,7 +11,7 @@ async def main() -> None:
|
|
|
11
11
|
|
|
12
12
|
# Create an async stream with web search enabled
|
|
13
13
|
async with client.beta.messages.stream(
|
|
14
|
-
model="claude-
|
|
14
|
+
model="claude-sonnet-4-20250514",
|
|
15
15
|
max_tokens=1024,
|
|
16
16
|
messages=[{"role": "user", "content": "What's the weather in New York?"}],
|
|
17
17
|
tools=[
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "anthropic"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.58.0"
|
|
4
4
|
description = "The official Python library for the anthropic API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "MIT"
|
|
@@ -25,6 +25,7 @@ classifiers = [
|
|
|
25
25
|
"Programming Language :: Python :: 3.10",
|
|
26
26
|
"Programming Language :: Python :: 3.11",
|
|
27
27
|
"Programming Language :: Python :: 3.12",
|
|
28
|
+
"Programming Language :: Python :: 3.13",
|
|
28
29
|
"Operating System :: OS Independent",
|
|
29
30
|
"Operating System :: POSIX",
|
|
30
31
|
"Operating System :: MacOS",
|
|
@@ -35,7 +36,7 @@ classifiers = [
|
|
|
35
36
|
]
|
|
36
37
|
|
|
37
38
|
[project.optional-dependencies]
|
|
38
|
-
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.
|
|
39
|
+
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
|
|
39
40
|
vertex = ["google-auth[requests] >=2, <3"]
|
|
40
41
|
bedrock = ["boto3 >= 1.28.57", "botocore >= 1.31.57"]
|
|
41
42
|
|
|
@@ -11,8 +11,10 @@ anyio==4.8.0 ; python_full_version >= '3.9'
|
|
|
11
11
|
# via
|
|
12
12
|
# anthropic
|
|
13
13
|
# httpx
|
|
14
|
-
boto3-stubs==1.
|
|
15
|
-
botocore-stubs==1.38.30
|
|
14
|
+
boto3-stubs==1.39.4
|
|
15
|
+
botocore-stubs==1.38.30 ; python_full_version < '3.9'
|
|
16
|
+
# via boto3-stubs
|
|
17
|
+
botocore-stubs==1.38.46 ; python_full_version >= '3.9'
|
|
16
18
|
# via boto3-stubs
|
|
17
19
|
certifi==2024.12.14
|
|
18
20
|
# via
|
|
@@ -29,9 +31,9 @@ exceptiongroup==1.2.2 ; python_full_version < '3.11'
|
|
|
29
31
|
# pytest
|
|
30
32
|
execnet==2.1.1
|
|
31
33
|
# via pytest-xdist
|
|
32
|
-
h11==0.
|
|
34
|
+
h11==0.16.0
|
|
33
35
|
# via httpcore
|
|
34
|
-
httpcore==1.0.
|
|
36
|
+
httpcore==1.0.9
|
|
35
37
|
# via httpx
|
|
36
38
|
httpx==0.28.1
|
|
37
39
|
# via
|
|
@@ -96,7 +98,7 @@ tomli==2.2.1 ; python_full_version < '3.11'
|
|
|
96
98
|
# via
|
|
97
99
|
# mypy
|
|
98
100
|
# pytest
|
|
99
|
-
types-awscrt==0.27.
|
|
101
|
+
types-awscrt==0.27.4
|
|
100
102
|
# via botocore-stubs
|
|
101
103
|
types-s3transfer==0.13.0
|
|
102
104
|
# via boto3-stubs
|
|
@@ -542,6 +542,15 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
542
542
|
# work around https://github.com/encode/httpx/discussions/2880
|
|
543
543
|
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
|
|
544
544
|
|
|
545
|
+
is_body_allowed = options.method.lower() != "get"
|
|
546
|
+
|
|
547
|
+
if is_body_allowed:
|
|
548
|
+
kwargs["json"] = json_data if is_given(json_data) else None
|
|
549
|
+
kwargs["files"] = files
|
|
550
|
+
else:
|
|
551
|
+
headers.pop("Content-Type", None)
|
|
552
|
+
kwargs.pop("data", None)
|
|
553
|
+
|
|
545
554
|
# TODO: report this error to httpx
|
|
546
555
|
return self._client.build_request( # pyright: ignore[reportUnknownMemberType]
|
|
547
556
|
headers=headers,
|
|
@@ -553,8 +562,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
553
562
|
# so that passing a `TypedDict` doesn't cause an error.
|
|
554
563
|
# https://github.com/microsoft/pyright/issues/3526#event-6715453066
|
|
555
564
|
params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
|
|
556
|
-
json=json_data if is_given(json_data) else None,
|
|
557
|
-
files=files,
|
|
558
565
|
**kwargs,
|
|
559
566
|
)
|
|
560
567
|
|
|
@@ -5,6 +5,7 @@ import inspect
|
|
|
5
5
|
from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
|
|
6
6
|
from datetime import date, datetime
|
|
7
7
|
from typing_extensions import (
|
|
8
|
+
List,
|
|
8
9
|
Unpack,
|
|
9
10
|
Literal,
|
|
10
11
|
ClassVar,
|
|
@@ -382,7 +383,7 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object:
|
|
|
382
383
|
if type_ is None:
|
|
383
384
|
raise RuntimeError(f"Unexpected field type is None for {key}")
|
|
384
385
|
|
|
385
|
-
return construct_type(value=value, type_=type_)
|
|
386
|
+
return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None))
|
|
386
387
|
|
|
387
388
|
|
|
388
389
|
def is_basemodel(type_: type) -> bool:
|
|
@@ -436,7 +437,7 @@ def construct_type_unchecked(*, value: object, type_: type[_T]) -> _T:
|
|
|
436
437
|
return cast(_T, construct_type(value=value, type_=type_))
|
|
437
438
|
|
|
438
439
|
|
|
439
|
-
def construct_type(*, value: object, type_: object) -> object:
|
|
440
|
+
def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]] = None) -> object:
|
|
440
441
|
"""Loose coercion to the expected type with construction of nested values.
|
|
441
442
|
|
|
442
443
|
If the given value does not match the expected type then it is returned as-is.
|
|
@@ -454,8 +455,10 @@ def construct_type(*, value: object, type_: object) -> object:
|
|
|
454
455
|
type_ = type_.__value__ # type: ignore[unreachable]
|
|
455
456
|
|
|
456
457
|
# unwrap `Annotated[T, ...]` -> `T`
|
|
457
|
-
if
|
|
458
|
-
meta: tuple[Any, ...] =
|
|
458
|
+
if metadata is not None:
|
|
459
|
+
meta: tuple[Any, ...] = tuple(metadata)
|
|
460
|
+
elif is_annotated_type(type_):
|
|
461
|
+
meta = get_args(type_)[1:]
|
|
459
462
|
type_ = extract_type_arg(type_, 0)
|
|
460
463
|
else:
|
|
461
464
|
meta = tuple()
|
|
@@ -472,7 +472,7 @@ class TestAnthropic:
|
|
|
472
472
|
def test_multipart_repeating_array(self, client: Anthropic) -> None:
|
|
473
473
|
request = client._build_request(
|
|
474
474
|
FinalRequestOptions.construct(
|
|
475
|
-
method="
|
|
475
|
+
method="post",
|
|
476
476
|
url="/foo",
|
|
477
477
|
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
|
|
478
478
|
json_data={"array": ["foo", "bar"]},
|
|
@@ -1370,7 +1370,7 @@ class TestAsyncAnthropic:
|
|
|
1370
1370
|
def test_multipart_repeating_array(self, async_client: AsyncAnthropic) -> None:
|
|
1371
1371
|
request = async_client._build_request(
|
|
1372
1372
|
FinalRequestOptions.construct(
|
|
1373
|
-
method="
|
|
1373
|
+
method="post",
|
|
1374
1374
|
url="/foo",
|
|
1375
1375
|
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
|
|
1376
1376
|
json_data={"array": ["foo", "bar"]},
|
|
@@ -889,3 +889,48 @@ def test_discriminated_union_case() -> None:
|
|
|
889
889
|
)
|
|
890
890
|
|
|
891
891
|
assert isinstance(m, ModelB)
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
def test_nested_discriminated_union() -> None:
|
|
895
|
+
class InnerType1(BaseModel):
|
|
896
|
+
type: Literal["type_1"]
|
|
897
|
+
|
|
898
|
+
class InnerModel(BaseModel):
|
|
899
|
+
inner_value: str
|
|
900
|
+
|
|
901
|
+
class InnerType2(BaseModel):
|
|
902
|
+
type: Literal["type_2"]
|
|
903
|
+
some_inner_model: InnerModel
|
|
904
|
+
|
|
905
|
+
class Type1(BaseModel):
|
|
906
|
+
base_type: Literal["base_type_1"]
|
|
907
|
+
value: Annotated[
|
|
908
|
+
Union[
|
|
909
|
+
InnerType1,
|
|
910
|
+
InnerType2,
|
|
911
|
+
],
|
|
912
|
+
PropertyInfo(discriminator="type"),
|
|
913
|
+
]
|
|
914
|
+
|
|
915
|
+
class Type2(BaseModel):
|
|
916
|
+
base_type: Literal["base_type_2"]
|
|
917
|
+
|
|
918
|
+
T = Annotated[
|
|
919
|
+
Union[
|
|
920
|
+
Type1,
|
|
921
|
+
Type2,
|
|
922
|
+
],
|
|
923
|
+
PropertyInfo(discriminator="base_type"),
|
|
924
|
+
]
|
|
925
|
+
|
|
926
|
+
model = construct_type(
|
|
927
|
+
type_=T,
|
|
928
|
+
value={
|
|
929
|
+
"base_type": "base_type_1",
|
|
930
|
+
"value": {
|
|
931
|
+
"type": "type_2",
|
|
932
|
+
},
|
|
933
|
+
},
|
|
934
|
+
)
|
|
935
|
+
assert isinstance(model, Type1)
|
|
936
|
+
assert isinstance(model.value, InnerType2)
|