anthropic 0.55.0__tar.gz → 0.57.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.57.0/.release-please-manifest.json +3 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/CHANGELOG.md +58 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/PKG-INFO +30 -32
- {anthropic-0.55.0 → anthropic-0.57.0}/README.md +29 -31
- {anthropic-0.55.0 → anthropic-0.57.0}/api.md +3 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/bin/check-release-environment +1 -1
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/batch_results.py +1 -1
- {anthropic-0.55.0 → anthropic-0.57.0}/pyproject.toml +1 -1
- {anthropic-0.55.0 → anthropic-0.57.0}/requirements-dev.lock +1 -1
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_exceptions.py +4 -1
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_version.py +1 -1
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/bedrock/_client.py +28 -6
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/streaming/_beta_messages.py +7 -2
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/streaming/_messages.py +6 -2
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/vertex/_client.py +8 -2
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/resources/beta/messages/messages.py +56 -8
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/resources/messages/messages.py +57 -8
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/__init__.py +5 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citations_delta.py +2 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_content_block_param.py +9 -7
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_message.py +4 -0
- anthropic-0.57.0/src/anthropic/types/beta/beta_search_result_block_param.py +27 -0
- anthropic-0.57.0/src/anthropic/types/beta/beta_search_result_location_citation.py +24 -0
- anthropic-0.57.0/src/anthropic/types/beta/beta_search_result_location_citation_param.py +24 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_text_citation.py +2 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_text_citation_param.py +2 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_result_block_param.py +2 -1
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/message_count_tokens_params.py +11 -5
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/message_create_params.py +7 -1
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/content_block.py +1 -1
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/message.py +4 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/message_count_tokens_params.py +7 -1
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/message_create_params.py +7 -1
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/raw_content_block_start_event.py +1 -1
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/api_resources/beta/messages/test_batches.py +8 -8
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/api_resources/beta/test_messages.py +16 -16
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/api_resources/messages/test_batches.py +6 -6
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/api_resources/test_messages.py +16 -16
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/lib/streaming/fixtures/basic_response.txt +1 -1
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/lib/streaming/test_beta_messages.py +4 -4
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/lib/streaming/test_messages.py +5 -5
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/lib/test_bedrock.py +69 -1
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/lib/test_vertex.py +54 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/test_client.py +14 -12
- {anthropic-0.55.0 → anthropic-0.57.0}/uv.lock +1681 -1679
- anthropic-0.55.0/.release-please-manifest.json +0 -3
- {anthropic-0.55.0 → anthropic-0.57.0}/.gitignore +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/CONTRIBUTING.md +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/LICENSE +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/SECURITY.md +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/bin/publish-pypi +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/.keep +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/bedrock.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/images.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/logo.png +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/mcp.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/messages.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/messages_stream.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/text_completions_demo_async.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/text_completions_demo_sync.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/text_completions_streaming.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/thinking.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/thinking_stream.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/tools.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/tools_stream.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/vertex.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/web_search.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/examples/web_search_stream.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/helpers.md +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/mypy.ini +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/release-please-config.json +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_base_client.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_client.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_compat.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_constants.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_decoders/jsonl.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_files.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_legacy_response.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_models.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_qs.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_resource.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_response.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_streaming.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_types.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_utils/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_utils/_httpx.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_utils/_logs.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_utils/_proxy.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_utils/_reflection.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_utils/_resources_proxy.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_utils/_streams.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_utils/_sync.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_utils/_transform.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_utils/_typing.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/_utils/_utils.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/.keep +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/_extras/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/_extras/_common.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/_extras/_google_auth.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/bedrock/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/bedrock/_auth.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/bedrock/_beta.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/bedrock/_beta_messages.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/bedrock/_stream.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/bedrock/_stream_decoder.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/streaming/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/streaming/_beta_types.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/streaming/_types.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/vertex/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/vertex/_auth.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/vertex/_beta.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/lib/vertex/_beta_messages.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/pagination.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/py.typed +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/resources/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/resources/beta/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/resources/beta/beta.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/resources/beta/files.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/resources/beta/messages/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/resources/beta/messages/batches.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/resources/beta/models.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/resources/completions.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/resources/messages/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/resources/messages/batches.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/resources/models.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/anthropic_beta_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/base64_image_source_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/base64_pdf_source_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_base64_image_source_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_base64_pdf_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_base64_pdf_source_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_cache_control_ephemeral_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_cache_creation.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citation_char_location.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citation_char_location_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citation_content_block_location.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citation_content_block_location_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citation_page_location.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citation_page_location_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citation_web_search_result_location_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citations_config_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citations_web_search_result_location.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_output_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_output_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_result_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_result_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_tool_20250522_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_tool_result_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_tool_result_block_content.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_tool_result_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_tool_result_block_param_content_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_tool_result_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_tool_result_error_code.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_tool_result_error_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_container.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_container_upload_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_container_upload_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_content_block.py +2 -2
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_content_block_source_content_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_content_block_source_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_file_document_source_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_file_image_source_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_image_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_input_json_delta.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_mcp_tool_result_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_mcp_tool_use_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_mcp_tool_use_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_message_delta_usage.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_message_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_message_tokens_count.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_metadata_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_model_info.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_plain_text_source_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_raw_content_block_delta.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_raw_content_block_delta_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_raw_content_block_start_event.py +2 -2
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_raw_content_block_stop_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_raw_message_delta_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_raw_message_start_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_raw_message_stop_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_raw_message_stream_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_redacted_thinking_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_redacted_thinking_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_request_document_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_request_mcp_server_tool_configuration_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_request_mcp_server_url_definition_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_request_mcp_tool_result_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_server_tool_usage.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_server_tool_use_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_server_tool_use_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_signature_delta.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_stop_reason.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_text_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_text_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_text_delta.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_thinking_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_thinking_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_thinking_config_disabled_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_thinking_config_enabled_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_thinking_config_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_thinking_delta.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_bash_20241022_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_bash_20250124_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_choice_any_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_choice_auto_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_choice_none_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_choice_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_choice_tool_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_computer_use_20241022_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_computer_use_20250124_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_text_editor_20241022_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_text_editor_20250124_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_text_editor_20250429_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_union_param.py +4 -4
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_use_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_use_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_url_image_source_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_url_pdf_source_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_usage.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_result_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_result_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_tool_20250305_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_tool_request_error_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_tool_result_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_tool_result_block_content.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_tool_result_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_tool_result_block_param_content_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_tool_result_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_tool_result_error_code.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/deleted_file.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/file_list_params.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/file_metadata.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/file_upload_params.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/batch_create_params.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/batch_list_params.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_deleted_message_batch.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_message_batch.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_message_batch_canceled_result.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_message_batch_errored_result.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_message_batch_expired_result.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_message_batch_individual_response.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_message_batch_request_counts.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_message_batch_result.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_message_batch_succeeded_result.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta/model_list_params.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta_api_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta_authentication_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta_billing_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta_error_response.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta_gateway_timeout_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta_invalid_request_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta_not_found_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta_overloaded_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta_permission_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/beta_rate_limit_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/cache_control_ephemeral_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/citation_char_location.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/citation_char_location_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/citation_content_block_location.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/citation_content_block_location_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/citation_page_location.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/citation_page_location_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/citation_web_search_result_location_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/citations_config_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/citations_delta.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/citations_web_search_result_location.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/completion.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/completion_create_params.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/content_block_delta_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/content_block_param.py +4 -4
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/content_block_source_content_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/content_block_source_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/content_block_start_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/content_block_stop_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/document_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/image_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/input_json_delta.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/message_count_tokens_tool_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/message_delta_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/message_delta_usage.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/message_param.py +4 -4
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/message_start_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/message_stop_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/message_stream_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/message_tokens_count.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/messages/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/messages/batch_create_params.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/messages/batch_list_params.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/messages/deleted_message_batch.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/messages/message_batch.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/messages/message_batch_canceled_result.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/messages/message_batch_errored_result.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/messages/message_batch_expired_result.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/messages/message_batch_individual_response.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/messages/message_batch_request_counts.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/messages/message_batch_result.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/messages/message_batch_succeeded_result.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/metadata_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/model.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/model_info.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/model_list_params.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/model_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/plain_text_source_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/raw_content_block_delta.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/raw_content_block_delta_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/raw_content_block_stop_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/raw_message_delta_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/raw_message_start_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/raw_message_stop_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/raw_message_stream_event.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/redacted_thinking_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/redacted_thinking_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/server_tool_usage.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/server_tool_use_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/server_tool_use_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/shared/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/shared/api_error_object.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/shared/authentication_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/shared/billing_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/shared/error_object.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/shared/error_response.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/shared/gateway_timeout_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/shared/invalid_request_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/shared/not_found_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/shared/overloaded_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/shared/permission_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/shared/rate_limit_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/signature_delta.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/stop_reason.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/text_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/text_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/text_citation.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/text_citation_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/text_delta.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/thinking_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/thinking_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/thinking_config_disabled_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/thinking_config_enabled_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/thinking_config_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/thinking_delta.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/tool_bash_20250124_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/tool_choice_any_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/tool_choice_auto_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/tool_choice_none_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/tool_choice_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/tool_choice_tool_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/tool_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/tool_result_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/tool_text_editor_20250124_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/tool_union_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/tool_use_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/tool_use_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/url_image_source_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/url_pdf_source_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/usage.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/web_search_result_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/web_search_result_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/web_search_tool_20250305_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/web_search_tool_request_error_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/web_search_tool_result_block.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/web_search_tool_result_block_content.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/web_search_tool_result_block_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/web_search_tool_result_block_param_content_param.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/src/anthropic/types/web_search_tool_result_error.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/api_resources/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/api_resources/beta/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/api_resources/beta/messages/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/api_resources/beta/test_files.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/api_resources/beta/test_models.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/api_resources/messages/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/api_resources/test_completions.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/api_resources/test_models.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/conftest.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/decoders/test_jsonl.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/lib/streaming/__init__.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/lib/streaming/fixtures/incomplete_partial_json_response.txt +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/lib/streaming/fixtures/tool_use_response.txt +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/lib/streaming/helpers.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/lib/streaming/test_partial_json.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/sample_file.txt +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/test_deepcopy.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/test_extract_files.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/test_files.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/test_legacy_response.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/test_models.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/test_qs.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/test_required_args.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/test_response.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/test_streaming.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/test_transform.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/test_utils/test_proxy.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/test_utils/test_typing.py +0 -0
- {anthropic-0.55.0 → anthropic-0.57.0}/tests/utils.py +0 -0
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.57.0 (2025-07-03)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.56.0...v0.57.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.56.0...v0.57.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add support for Search Result Content Blocks ([4896178](https://github.com/anthropics/anthropic-sdk-python/commit/4896178d23832e4c84775571e8919c690ff998a1))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* improve timeout/network error message to be more helpful ([347fb57](https://github.com/anthropics/anthropic-sdk-python/commit/347fb57c49129ff1fdac19859eb4c80808ed0711))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Chores
|
|
18
|
+
|
|
19
|
+
* **ci:** change upload type ([4dc4178](https://github.com/anthropics/anthropic-sdk-python/commit/4dc4178d0a1eaeafc248deac4e08cc782f778600))
|
|
20
|
+
* **internal:** version bump ([363629c](https://github.com/anthropics/anthropic-sdk-python/commit/363629cbc85d1e81d1e503d224dc8c7a3d1fa113))
|
|
21
|
+
* **stream:** improve get_final_text() error message ([#979](https://github.com/anthropics/anthropic-sdk-python/issues/979)) ([5ae0a33](https://github.com/anthropics/anthropic-sdk-python/commit/5ae0a3303f8369575d9ebefe5b2c45cc435facdb))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Documentation
|
|
25
|
+
|
|
26
|
+
* fix vertex id ([f7392c7](https://github.com/anthropics/anthropic-sdk-python/commit/f7392c7789fc2d329ab63c4d2ed7ba0d1dc0c7c0))
|
|
27
|
+
* fix vertex id ([92fe132](https://github.com/anthropics/anthropic-sdk-python/commit/92fe1329a9a8a31de2fe71b40c4fdd84fb033dae))
|
|
28
|
+
* update model in readme ([1a4df78](https://github.com/anthropics/anthropic-sdk-python/commit/1a4df783a75589dce9826a5c0564692ed0d7d7fb))
|
|
29
|
+
* update models and non-beta ([a54e65c](https://github.com/anthropics/anthropic-sdk-python/commit/a54e65c5bc9dd1ac188ea9c166943548cc6f7c08))
|
|
30
|
+
* update more models ([9e3dd6a](https://github.com/anthropics/anthropic-sdk-python/commit/9e3dd6afc565a6777f96ab05a28dcf2b4b9591da))
|
|
31
|
+
|
|
32
|
+
## 0.56.0 (2025-07-01)
|
|
33
|
+
|
|
34
|
+
Full Changelog: [v0.55.0...v0.56.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.55.0...v0.56.0)
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
* **bedrock:** automatically infer AWS Region ([#974](https://github.com/anthropics/anthropic-sdk-python/issues/974)) ([f648e09](https://github.com/anthropics/anthropic-sdk-python/commit/f648e09c43ea227a7a388cbdd21e8ddb762963e4))
|
|
39
|
+
* **vertex:** support global region endpoint ([1fd1adf](https://github.com/anthropics/anthropic-sdk-python/commit/1fd1adf736e4e5a3e16819c052903dfe4a436132))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
* **ci:** correct conditional ([18e625a](https://github.com/anthropics/anthropic-sdk-python/commit/18e625a1a6de15ff7729149c19b8c22191ed8622))
|
|
45
|
+
* **ci:** release-doctor — report correct token name ([c91f50d](https://github.com/anthropics/anthropic-sdk-python/commit/c91f50dbd7057ea465b9d71795488cdae8c1a13a))
|
|
46
|
+
* **tests:** avoid deprecation warnings ([71b432f](https://github.com/anthropics/anthropic-sdk-python/commit/71b432f2d22d72f6763d7042677cb43122302ded))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Chores
|
|
50
|
+
|
|
51
|
+
* **ci:** only run for pushes and fork pull requests ([447b793](https://github.com/anthropics/anthropic-sdk-python/commit/447b793baf8ba4df63a8fcfcd870a85dd2d07f07))
|
|
52
|
+
* **internal:** add breaking change detection ([e6d0eca](https://github.com/anthropics/anthropic-sdk-python/commit/e6d0eca3fc5c918b56e42fbe46fcf9bedd26ca4d))
|
|
53
|
+
* **internal:** codegen related update ([f88517b](https://github.com/anthropics/anthropic-sdk-python/commit/f88517bfb56969674b82193b788d2043806e5a39))
|
|
54
|
+
* **internal:** codegen related update ([a385cb9](https://github.com/anthropics/anthropic-sdk-python/commit/a385cb9270f8214907ce1f4923e16537ac10cdab))
|
|
55
|
+
* **internal:** codegen related update ([9d4b537](https://github.com/anthropics/anthropic-sdk-python/commit/9d4b537be3e248f2ce0d98721f9bbbdc32b75575))
|
|
56
|
+
* **internal:** codegen related update ([6a3a6fe](https://github.com/anthropics/anthropic-sdk-python/commit/6a3a6fe3743ee448a83f294d394c5bf9b214176f))
|
|
57
|
+
* **internal:** codegen related update ([28704a6](https://github.com/anthropics/anthropic-sdk-python/commit/28704a63eb20f6ed78f13b424190cac14aca8a0f))
|
|
58
|
+
* **tests:** run tests with min and max supported Python versions by default ([0ad8534](https://github.com/anthropics/anthropic-sdk-python/commit/0ad85343fbe4d2934aa826fde36c7927f7b57803))
|
|
59
|
+
* **tests:** skip some failing tests on the latest python versions ([f63a2d2](https://github.com/anthropics/anthropic-sdk-python/commit/f63a2d29d5c56175078eaf5c67a142aec0937174))
|
|
60
|
+
|
|
3
61
|
## 0.55.0 (2025-06-23)
|
|
4
62
|
|
|
5
63
|
Full Changelog: [v0.54.0...v0.55.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.54.0...v0.55.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: anthropic
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.57.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
|
|
@@ -77,7 +77,7 @@ message = client.messages.create(
|
|
|
77
77
|
"content": "Hello, Claude",
|
|
78
78
|
}
|
|
79
79
|
],
|
|
80
|
-
model="claude-
|
|
80
|
+
model="claude-sonnet-4-20250514",
|
|
81
81
|
)
|
|
82
82
|
print(message.content)
|
|
83
83
|
```
|
|
@@ -110,7 +110,7 @@ async def main() -> None:
|
|
|
110
110
|
"content": "Hello, Claude",
|
|
111
111
|
}
|
|
112
112
|
],
|
|
113
|
-
model="claude-
|
|
113
|
+
model="claude-sonnet-4-20250514",
|
|
114
114
|
)
|
|
115
115
|
print(message.content)
|
|
116
116
|
|
|
@@ -153,7 +153,7 @@ async def main() -> None:
|
|
|
153
153
|
"content": "Hello, Claude",
|
|
154
154
|
}
|
|
155
155
|
],
|
|
156
|
-
model="claude-
|
|
156
|
+
model="claude-sonnet-4-20250514",
|
|
157
157
|
)
|
|
158
158
|
print(message.content)
|
|
159
159
|
|
|
@@ -178,7 +178,7 @@ stream = client.messages.create(
|
|
|
178
178
|
"content": "Hello, Claude",
|
|
179
179
|
}
|
|
180
180
|
],
|
|
181
|
-
model="claude-
|
|
181
|
+
model="claude-sonnet-4-20250514",
|
|
182
182
|
stream=True,
|
|
183
183
|
)
|
|
184
184
|
for event in stream:
|
|
@@ -200,7 +200,7 @@ stream = await client.messages.create(
|
|
|
200
200
|
"content": "Hello, Claude",
|
|
201
201
|
}
|
|
202
202
|
],
|
|
203
|
-
model="claude-
|
|
203
|
+
model="claude-sonnet-4-20250514",
|
|
204
204
|
stream=True,
|
|
205
205
|
)
|
|
206
206
|
async for event in stream:
|
|
@@ -226,7 +226,7 @@ async def main() -> None:
|
|
|
226
226
|
"content": "Say hello there!",
|
|
227
227
|
}
|
|
228
228
|
],
|
|
229
|
-
model="claude-
|
|
229
|
+
model="claude-sonnet-4-20250514",
|
|
230
230
|
) as stream:
|
|
231
231
|
async for text in stream.text_stream:
|
|
232
232
|
print(text, end="", flush=True)
|
|
@@ -244,11 +244,11 @@ Alternatively, you can use `client.messages.create(..., stream=True)` which only
|
|
|
244
244
|
|
|
245
245
|
## Token counting
|
|
246
246
|
|
|
247
|
-
To get the token count for a message without creating it you can use the `client.
|
|
247
|
+
To get the token count for a message without creating it you can use the `client.messages.count_tokens()` method. This takes the same `messages` list as the `.create()` method.
|
|
248
248
|
|
|
249
249
|
```py
|
|
250
|
-
count = client.
|
|
251
|
-
model="claude-
|
|
250
|
+
count = client.messages.count_tokens(
|
|
251
|
+
model="claude-sonnet-4-20250514",
|
|
252
252
|
messages=[
|
|
253
253
|
{"role": "user", "content": "Hello, world"}
|
|
254
254
|
]
|
|
@@ -266,20 +266,19 @@ message.usage
|
|
|
266
266
|
|
|
267
267
|
## Message Batches
|
|
268
268
|
|
|
269
|
-
This SDK provides
|
|
270
|
-
|
|
269
|
+
This SDK provides support for the [Message Batches API](https://docs.anthropic.com/en/docs/build-with-claude/message-batches) under the `client.messages.batches` namespace.
|
|
271
270
|
|
|
272
271
|
### Creating a batch
|
|
273
272
|
|
|
274
273
|
Message Batches take the exact same request params as the standard Messages API:
|
|
275
274
|
|
|
276
275
|
```python
|
|
277
|
-
await client.
|
|
276
|
+
await client.messages.batches.create(
|
|
278
277
|
requests=[
|
|
279
278
|
{
|
|
280
279
|
"custom_id": "my-first-request",
|
|
281
280
|
"params": {
|
|
282
|
-
"model": "claude-
|
|
281
|
+
"model": "claude-sonnet-4-20250514",
|
|
283
282
|
"max_tokens": 1024,
|
|
284
283
|
"messages": [{"role": "user", "content": "Hello, world"}],
|
|
285
284
|
},
|
|
@@ -287,7 +286,7 @@ await client.beta.messages.batches.create(
|
|
|
287
286
|
{
|
|
288
287
|
"custom_id": "my-second-request",
|
|
289
288
|
"params": {
|
|
290
|
-
"model": "claude-
|
|
289
|
+
"model": "claude-sonnet-4-20250514",
|
|
291
290
|
"max_tokens": 1024,
|
|
292
291
|
"messages": [{"role": "user", "content": "Hi again, friend"}],
|
|
293
292
|
},
|
|
@@ -296,13 +295,12 @@ await client.beta.messages.batches.create(
|
|
|
296
295
|
)
|
|
297
296
|
```
|
|
298
297
|
|
|
299
|
-
|
|
300
298
|
### Getting results from a batch
|
|
301
299
|
|
|
302
300
|
Once a Message Batch has been processed, indicated by `.processing_status === 'ended'`, you can access the results with `.batches.results()`
|
|
303
301
|
|
|
304
302
|
```python
|
|
305
|
-
result_stream = await client.
|
|
303
|
+
result_stream = await client.messages.batches.results(batch_id)
|
|
306
304
|
async for entry in result_stream:
|
|
307
305
|
if entry.result.type == "succeeded":
|
|
308
306
|
print(entry.result.message.content)
|
|
@@ -331,7 +329,7 @@ message = client.messages.create(
|
|
|
331
329
|
"content": "Hello!",
|
|
332
330
|
}
|
|
333
331
|
],
|
|
334
|
-
model="anthropic.claude-
|
|
332
|
+
model="anthropic.claude-sonnet-4-20250514-v2:0",
|
|
335
333
|
)
|
|
336
334
|
print(message)
|
|
337
335
|
```
|
|
@@ -362,7 +360,7 @@ from anthropic import AnthropicVertex
|
|
|
362
360
|
client = AnthropicVertex()
|
|
363
361
|
|
|
364
362
|
message = client.messages.create(
|
|
365
|
-
model="claude-
|
|
363
|
+
model="claude-sonnet-4@20250514",
|
|
366
364
|
max_tokens=100,
|
|
367
365
|
messages=[
|
|
368
366
|
{
|
|
@@ -398,7 +396,7 @@ client = Anthropic()
|
|
|
398
396
|
|
|
399
397
|
all_batches = []
|
|
400
398
|
# Automatically fetches more pages as needed.
|
|
401
|
-
for batch in client.
|
|
399
|
+
for batch in client.messages.batches.list(
|
|
402
400
|
limit=20,
|
|
403
401
|
):
|
|
404
402
|
# Do something with batch here
|
|
@@ -418,7 +416,7 @@ client = AsyncAnthropic()
|
|
|
418
416
|
async def main() -> None:
|
|
419
417
|
all_batches = []
|
|
420
418
|
# Iterate through items across all pages, issuing requests as needed.
|
|
421
|
-
async for batch in client.
|
|
419
|
+
async for batch in client.messages.batches.list(
|
|
422
420
|
limit=20,
|
|
423
421
|
):
|
|
424
422
|
all_batches.append(batch)
|
|
@@ -431,7 +429,7 @@ asyncio.run(main())
|
|
|
431
429
|
Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:
|
|
432
430
|
|
|
433
431
|
```python
|
|
434
|
-
first_page = await client.
|
|
432
|
+
first_page = await client.messages.batches.list(
|
|
435
433
|
limit=20,
|
|
436
434
|
)
|
|
437
435
|
if first_page.has_next_page():
|
|
@@ -445,7 +443,7 @@ if first_page.has_next_page():
|
|
|
445
443
|
Or just work directly with the returned data:
|
|
446
444
|
|
|
447
445
|
```python
|
|
448
|
-
first_page = await client.
|
|
446
|
+
first_page = await client.messages.batches.list(
|
|
449
447
|
limit=20,
|
|
450
448
|
)
|
|
451
449
|
|
|
@@ -473,7 +471,7 @@ message = client.messages.create(
|
|
|
473
471
|
"role": "user",
|
|
474
472
|
}
|
|
475
473
|
],
|
|
476
|
-
model="claude-
|
|
474
|
+
model="claude-sonnet-4-20250514",
|
|
477
475
|
metadata={},
|
|
478
476
|
)
|
|
479
477
|
print(message.metadata)
|
|
@@ -520,7 +518,7 @@ try:
|
|
|
520
518
|
"content": "Hello, Claude",
|
|
521
519
|
}
|
|
522
520
|
],
|
|
523
|
-
model="claude-
|
|
521
|
+
model="claude-sonnet-4-20250514",
|
|
524
522
|
)
|
|
525
523
|
except anthropic.APIConnectionError as e:
|
|
526
524
|
print("The server could not be reached")
|
|
@@ -561,14 +559,14 @@ message = client.messages.create(
|
|
|
561
559
|
"content": "Hello, Claude",
|
|
562
560
|
}
|
|
563
561
|
],
|
|
564
|
-
model="claude-
|
|
562
|
+
model="claude-sonnet-4-20250514",
|
|
565
563
|
)
|
|
566
564
|
print(message._request_id) # req_018EeWyXxfu5pfWkrYcMdjWG
|
|
567
565
|
```
|
|
568
566
|
|
|
569
567
|
Note that unlike other properties that use an `_` prefix, the `_request_id` property
|
|
570
|
-
|
|
571
|
-
methods and modules are
|
|
568
|
+
_is_ public. Unless documented otherwise, _all_ other `_` prefix properties,
|
|
569
|
+
methods and modules are _private_.
|
|
572
570
|
|
|
573
571
|
### Retries
|
|
574
572
|
|
|
@@ -596,7 +594,7 @@ client.with_options(max_retries=5).messages.create(
|
|
|
596
594
|
"content": "Hello, Claude",
|
|
597
595
|
}
|
|
598
596
|
],
|
|
599
|
-
model="claude-
|
|
597
|
+
model="claude-sonnet-4-20250514",
|
|
600
598
|
)
|
|
601
599
|
```
|
|
602
600
|
|
|
@@ -628,7 +626,7 @@ client.with_options(timeout=5.0).messages.create(
|
|
|
628
626
|
"content": "Hello, Claude",
|
|
629
627
|
}
|
|
630
628
|
],
|
|
631
|
-
model="claude-
|
|
629
|
+
model="claude-sonnet-4-20250514",
|
|
632
630
|
)
|
|
633
631
|
```
|
|
634
632
|
|
|
@@ -711,7 +709,7 @@ response = client.messages.with_raw_response.create(
|
|
|
711
709
|
"role": "user",
|
|
712
710
|
"content": "Hello, Claude",
|
|
713
711
|
}],
|
|
714
|
-
model="claude-
|
|
712
|
+
model="claude-sonnet-4-20250514",
|
|
715
713
|
)
|
|
716
714
|
print(response.headers.get('X-My-Header'))
|
|
717
715
|
|
|
@@ -745,7 +743,7 @@ with client.messages.with_streaming_response.create(
|
|
|
745
743
|
"content": "Hello, Claude",
|
|
746
744
|
}
|
|
747
745
|
],
|
|
748
|
-
model="claude-
|
|
746
|
+
model="claude-sonnet-4-20250514",
|
|
749
747
|
) as response:
|
|
750
748
|
print(response.headers.get("X-My-Header"))
|
|
751
749
|
|
|
@@ -37,7 +37,7 @@ message = client.messages.create(
|
|
|
37
37
|
"content": "Hello, Claude",
|
|
38
38
|
}
|
|
39
39
|
],
|
|
40
|
-
model="claude-
|
|
40
|
+
model="claude-sonnet-4-20250514",
|
|
41
41
|
)
|
|
42
42
|
print(message.content)
|
|
43
43
|
```
|
|
@@ -70,7 +70,7 @@ async def main() -> None:
|
|
|
70
70
|
"content": "Hello, Claude",
|
|
71
71
|
}
|
|
72
72
|
],
|
|
73
|
-
model="claude-
|
|
73
|
+
model="claude-sonnet-4-20250514",
|
|
74
74
|
)
|
|
75
75
|
print(message.content)
|
|
76
76
|
|
|
@@ -113,7 +113,7 @@ async def main() -> None:
|
|
|
113
113
|
"content": "Hello, Claude",
|
|
114
114
|
}
|
|
115
115
|
],
|
|
116
|
-
model="claude-
|
|
116
|
+
model="claude-sonnet-4-20250514",
|
|
117
117
|
)
|
|
118
118
|
print(message.content)
|
|
119
119
|
|
|
@@ -138,7 +138,7 @@ stream = client.messages.create(
|
|
|
138
138
|
"content": "Hello, Claude",
|
|
139
139
|
}
|
|
140
140
|
],
|
|
141
|
-
model="claude-
|
|
141
|
+
model="claude-sonnet-4-20250514",
|
|
142
142
|
stream=True,
|
|
143
143
|
)
|
|
144
144
|
for event in stream:
|
|
@@ -160,7 +160,7 @@ stream = await client.messages.create(
|
|
|
160
160
|
"content": "Hello, Claude",
|
|
161
161
|
}
|
|
162
162
|
],
|
|
163
|
-
model="claude-
|
|
163
|
+
model="claude-sonnet-4-20250514",
|
|
164
164
|
stream=True,
|
|
165
165
|
)
|
|
166
166
|
async for event in stream:
|
|
@@ -186,7 +186,7 @@ async def main() -> None:
|
|
|
186
186
|
"content": "Say hello there!",
|
|
187
187
|
}
|
|
188
188
|
],
|
|
189
|
-
model="claude-
|
|
189
|
+
model="claude-sonnet-4-20250514",
|
|
190
190
|
) as stream:
|
|
191
191
|
async for text in stream.text_stream:
|
|
192
192
|
print(text, end="", flush=True)
|
|
@@ -204,11 +204,11 @@ Alternatively, you can use `client.messages.create(..., stream=True)` which only
|
|
|
204
204
|
|
|
205
205
|
## Token counting
|
|
206
206
|
|
|
207
|
-
To get the token count for a message without creating it you can use the `client.
|
|
207
|
+
To get the token count for a message without creating it you can use the `client.messages.count_tokens()` method. This takes the same `messages` list as the `.create()` method.
|
|
208
208
|
|
|
209
209
|
```py
|
|
210
|
-
count = client.
|
|
211
|
-
model="claude-
|
|
210
|
+
count = client.messages.count_tokens(
|
|
211
|
+
model="claude-sonnet-4-20250514",
|
|
212
212
|
messages=[
|
|
213
213
|
{"role": "user", "content": "Hello, world"}
|
|
214
214
|
]
|
|
@@ -226,20 +226,19 @@ message.usage
|
|
|
226
226
|
|
|
227
227
|
## Message Batches
|
|
228
228
|
|
|
229
|
-
This SDK provides
|
|
230
|
-
|
|
229
|
+
This SDK provides support for the [Message Batches API](https://docs.anthropic.com/en/docs/build-with-claude/message-batches) under the `client.messages.batches` namespace.
|
|
231
230
|
|
|
232
231
|
### Creating a batch
|
|
233
232
|
|
|
234
233
|
Message Batches take the exact same request params as the standard Messages API:
|
|
235
234
|
|
|
236
235
|
```python
|
|
237
|
-
await client.
|
|
236
|
+
await client.messages.batches.create(
|
|
238
237
|
requests=[
|
|
239
238
|
{
|
|
240
239
|
"custom_id": "my-first-request",
|
|
241
240
|
"params": {
|
|
242
|
-
"model": "claude-
|
|
241
|
+
"model": "claude-sonnet-4-20250514",
|
|
243
242
|
"max_tokens": 1024,
|
|
244
243
|
"messages": [{"role": "user", "content": "Hello, world"}],
|
|
245
244
|
},
|
|
@@ -247,7 +246,7 @@ await client.beta.messages.batches.create(
|
|
|
247
246
|
{
|
|
248
247
|
"custom_id": "my-second-request",
|
|
249
248
|
"params": {
|
|
250
|
-
"model": "claude-
|
|
249
|
+
"model": "claude-sonnet-4-20250514",
|
|
251
250
|
"max_tokens": 1024,
|
|
252
251
|
"messages": [{"role": "user", "content": "Hi again, friend"}],
|
|
253
252
|
},
|
|
@@ -256,13 +255,12 @@ await client.beta.messages.batches.create(
|
|
|
256
255
|
)
|
|
257
256
|
```
|
|
258
257
|
|
|
259
|
-
|
|
260
258
|
### Getting results from a batch
|
|
261
259
|
|
|
262
260
|
Once a Message Batch has been processed, indicated by `.processing_status === 'ended'`, you can access the results with `.batches.results()`
|
|
263
261
|
|
|
264
262
|
```python
|
|
265
|
-
result_stream = await client.
|
|
263
|
+
result_stream = await client.messages.batches.results(batch_id)
|
|
266
264
|
async for entry in result_stream:
|
|
267
265
|
if entry.result.type == "succeeded":
|
|
268
266
|
print(entry.result.message.content)
|
|
@@ -291,7 +289,7 @@ message = client.messages.create(
|
|
|
291
289
|
"content": "Hello!",
|
|
292
290
|
}
|
|
293
291
|
],
|
|
294
|
-
model="anthropic.claude-
|
|
292
|
+
model="anthropic.claude-sonnet-4-20250514-v2:0",
|
|
295
293
|
)
|
|
296
294
|
print(message)
|
|
297
295
|
```
|
|
@@ -322,7 +320,7 @@ from anthropic import AnthropicVertex
|
|
|
322
320
|
client = AnthropicVertex()
|
|
323
321
|
|
|
324
322
|
message = client.messages.create(
|
|
325
|
-
model="claude-
|
|
323
|
+
model="claude-sonnet-4@20250514",
|
|
326
324
|
max_tokens=100,
|
|
327
325
|
messages=[
|
|
328
326
|
{
|
|
@@ -358,7 +356,7 @@ client = Anthropic()
|
|
|
358
356
|
|
|
359
357
|
all_batches = []
|
|
360
358
|
# Automatically fetches more pages as needed.
|
|
361
|
-
for batch in client.
|
|
359
|
+
for batch in client.messages.batches.list(
|
|
362
360
|
limit=20,
|
|
363
361
|
):
|
|
364
362
|
# Do something with batch here
|
|
@@ -378,7 +376,7 @@ client = AsyncAnthropic()
|
|
|
378
376
|
async def main() -> None:
|
|
379
377
|
all_batches = []
|
|
380
378
|
# Iterate through items across all pages, issuing requests as needed.
|
|
381
|
-
async for batch in client.
|
|
379
|
+
async for batch in client.messages.batches.list(
|
|
382
380
|
limit=20,
|
|
383
381
|
):
|
|
384
382
|
all_batches.append(batch)
|
|
@@ -391,7 +389,7 @@ asyncio.run(main())
|
|
|
391
389
|
Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:
|
|
392
390
|
|
|
393
391
|
```python
|
|
394
|
-
first_page = await client.
|
|
392
|
+
first_page = await client.messages.batches.list(
|
|
395
393
|
limit=20,
|
|
396
394
|
)
|
|
397
395
|
if first_page.has_next_page():
|
|
@@ -405,7 +403,7 @@ if first_page.has_next_page():
|
|
|
405
403
|
Or just work directly with the returned data:
|
|
406
404
|
|
|
407
405
|
```python
|
|
408
|
-
first_page = await client.
|
|
406
|
+
first_page = await client.messages.batches.list(
|
|
409
407
|
limit=20,
|
|
410
408
|
)
|
|
411
409
|
|
|
@@ -433,7 +431,7 @@ message = client.messages.create(
|
|
|
433
431
|
"role": "user",
|
|
434
432
|
}
|
|
435
433
|
],
|
|
436
|
-
model="claude-
|
|
434
|
+
model="claude-sonnet-4-20250514",
|
|
437
435
|
metadata={},
|
|
438
436
|
)
|
|
439
437
|
print(message.metadata)
|
|
@@ -480,7 +478,7 @@ try:
|
|
|
480
478
|
"content": "Hello, Claude",
|
|
481
479
|
}
|
|
482
480
|
],
|
|
483
|
-
model="claude-
|
|
481
|
+
model="claude-sonnet-4-20250514",
|
|
484
482
|
)
|
|
485
483
|
except anthropic.APIConnectionError as e:
|
|
486
484
|
print("The server could not be reached")
|
|
@@ -521,14 +519,14 @@ message = client.messages.create(
|
|
|
521
519
|
"content": "Hello, Claude",
|
|
522
520
|
}
|
|
523
521
|
],
|
|
524
|
-
model="claude-
|
|
522
|
+
model="claude-sonnet-4-20250514",
|
|
525
523
|
)
|
|
526
524
|
print(message._request_id) # req_018EeWyXxfu5pfWkrYcMdjWG
|
|
527
525
|
```
|
|
528
526
|
|
|
529
527
|
Note that unlike other properties that use an `_` prefix, the `_request_id` property
|
|
530
|
-
|
|
531
|
-
methods and modules are
|
|
528
|
+
_is_ public. Unless documented otherwise, _all_ other `_` prefix properties,
|
|
529
|
+
methods and modules are _private_.
|
|
532
530
|
|
|
533
531
|
### Retries
|
|
534
532
|
|
|
@@ -556,7 +554,7 @@ client.with_options(max_retries=5).messages.create(
|
|
|
556
554
|
"content": "Hello, Claude",
|
|
557
555
|
}
|
|
558
556
|
],
|
|
559
|
-
model="claude-
|
|
557
|
+
model="claude-sonnet-4-20250514",
|
|
560
558
|
)
|
|
561
559
|
```
|
|
562
560
|
|
|
@@ -588,7 +586,7 @@ client.with_options(timeout=5.0).messages.create(
|
|
|
588
586
|
"content": "Hello, Claude",
|
|
589
587
|
}
|
|
590
588
|
],
|
|
591
|
-
model="claude-
|
|
589
|
+
model="claude-sonnet-4-20250514",
|
|
592
590
|
)
|
|
593
591
|
```
|
|
594
592
|
|
|
@@ -671,7 +669,7 @@ response = client.messages.with_raw_response.create(
|
|
|
671
669
|
"role": "user",
|
|
672
670
|
"content": "Hello, Claude",
|
|
673
671
|
}],
|
|
674
|
-
model="claude-
|
|
672
|
+
model="claude-sonnet-4-20250514",
|
|
675
673
|
)
|
|
676
674
|
print(response.headers.get('X-My-Header'))
|
|
677
675
|
|
|
@@ -705,7 +703,7 @@ with client.messages.with_streaming_response.create(
|
|
|
705
703
|
"content": "Hello, Claude",
|
|
706
704
|
}
|
|
707
705
|
],
|
|
708
|
-
model="claude-
|
|
706
|
+
model="claude-sonnet-4-20250514",
|
|
709
707
|
) as response:
|
|
710
708
|
print(response.headers.get("X-My-Header"))
|
|
711
709
|
|
|
@@ -256,6 +256,9 @@ from anthropic.types.beta import (
|
|
|
256
256
|
BetaRequestMCPServerToolConfiguration,
|
|
257
257
|
BetaRequestMCPServerURLDefinition,
|
|
258
258
|
BetaRequestMCPToolResultBlockParam,
|
|
259
|
+
BetaSearchResultBlockParam,
|
|
260
|
+
BetaSearchResultLocationCitation,
|
|
261
|
+
BetaSearchResultLocationCitationParam,
|
|
259
262
|
BetaServerToolUsage,
|
|
260
263
|
BetaServerToolUseBlock,
|
|
261
264
|
BetaServerToolUseBlockParam,
|
|
@@ -7,7 +7,7 @@ if [ -z "${STAINLESS_API_KEY}" ]; then
|
|
|
7
7
|
fi
|
|
8
8
|
|
|
9
9
|
if [ -z "${PYPI_TOKEN}" ]; then
|
|
10
|
-
errors+=("The
|
|
10
|
+
errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
|
|
11
11
|
fi
|
|
12
12
|
|
|
13
13
|
lenErrors=${#errors[@]}
|
|
@@ -75,7 +75,10 @@ class APIConnectionError(APIError):
|
|
|
75
75
|
|
|
76
76
|
class APITimeoutError(APIConnectionError):
|
|
77
77
|
def __init__(self, request: httpx.Request) -> None:
|
|
78
|
-
super().__init__(
|
|
78
|
+
super().__init__(
|
|
79
|
+
message="Request timed out or interrupted. This could be due to a network timeout, dropped connection, or request cancellation. See https://docs.anthropic.com/en/api/errors#long-requests for more details.",
|
|
80
|
+
request=request,
|
|
81
|
+
)
|
|
79
82
|
|
|
80
83
|
|
|
81
84
|
class BadRequestError(APIStatusError):
|