anthropic 0.56.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.
Files changed (400) hide show
  1. anthropic-0.57.0/.release-please-manifest.json +3 -0
  2. {anthropic-0.56.0 → anthropic-0.57.0}/CHANGELOG.md +29 -0
  3. {anthropic-0.56.0 → anthropic-0.57.0}/PKG-INFO +30 -32
  4. {anthropic-0.56.0 → anthropic-0.57.0}/README.md +29 -31
  5. {anthropic-0.56.0 → anthropic-0.57.0}/api.md +3 -0
  6. {anthropic-0.56.0 → anthropic-0.57.0}/examples/batch_results.py +1 -1
  7. {anthropic-0.56.0 → anthropic-0.57.0}/pyproject.toml +1 -1
  8. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_exceptions.py +4 -1
  9. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_version.py +1 -1
  10. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/streaming/_beta_messages.py +7 -2
  11. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/streaming/_messages.py +6 -2
  12. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/resources/beta/messages/messages.py +56 -8
  13. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/resources/messages/messages.py +56 -8
  14. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/__init__.py +5 -0
  15. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citations_delta.py +2 -0
  16. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_content_block_param.py +9 -7
  17. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_message.py +4 -0
  18. anthropic-0.57.0/src/anthropic/types/beta/beta_search_result_block_param.py +27 -0
  19. anthropic-0.57.0/src/anthropic/types/beta/beta_search_result_location_citation.py +24 -0
  20. anthropic-0.57.0/src/anthropic/types/beta/beta_search_result_location_citation_param.py +24 -0
  21. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_text_citation.py +2 -0
  22. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_text_citation_param.py +2 -0
  23. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_result_block_param.py +2 -1
  24. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/message_count_tokens_params.py +11 -5
  25. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/message_create_params.py +7 -1
  26. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/content_block.py +1 -1
  27. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/message.py +4 -0
  28. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/message_count_tokens_params.py +7 -1
  29. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/message_create_params.py +7 -1
  30. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/raw_content_block_start_event.py +1 -1
  31. {anthropic-0.56.0 → anthropic-0.57.0}/tests/api_resources/beta/messages/test_batches.py +8 -8
  32. {anthropic-0.56.0 → anthropic-0.57.0}/tests/api_resources/beta/test_messages.py +16 -16
  33. {anthropic-0.56.0 → anthropic-0.57.0}/tests/api_resources/messages/test_batches.py +6 -6
  34. {anthropic-0.56.0 → anthropic-0.57.0}/tests/api_resources/test_messages.py +16 -16
  35. {anthropic-0.56.0 → anthropic-0.57.0}/tests/test_client.py +12 -12
  36. {anthropic-0.56.0 → anthropic-0.57.0}/uv.lock +1 -1
  37. anthropic-0.56.0/.release-please-manifest.json +0 -3
  38. {anthropic-0.56.0 → anthropic-0.57.0}/.gitignore +0 -0
  39. {anthropic-0.56.0 → anthropic-0.57.0}/CONTRIBUTING.md +0 -0
  40. {anthropic-0.56.0 → anthropic-0.57.0}/LICENSE +0 -0
  41. {anthropic-0.56.0 → anthropic-0.57.0}/SECURITY.md +0 -0
  42. {anthropic-0.56.0 → anthropic-0.57.0}/bin/check-release-environment +0 -0
  43. {anthropic-0.56.0 → anthropic-0.57.0}/bin/publish-pypi +0 -0
  44. {anthropic-0.56.0 → anthropic-0.57.0}/examples/.keep +0 -0
  45. {anthropic-0.56.0 → anthropic-0.57.0}/examples/bedrock.py +0 -0
  46. {anthropic-0.56.0 → anthropic-0.57.0}/examples/images.py +0 -0
  47. {anthropic-0.56.0 → anthropic-0.57.0}/examples/logo.png +0 -0
  48. {anthropic-0.56.0 → anthropic-0.57.0}/examples/mcp.py +0 -0
  49. {anthropic-0.56.0 → anthropic-0.57.0}/examples/messages.py +0 -0
  50. {anthropic-0.56.0 → anthropic-0.57.0}/examples/messages_stream.py +0 -0
  51. {anthropic-0.56.0 → anthropic-0.57.0}/examples/text_completions_demo_async.py +0 -0
  52. {anthropic-0.56.0 → anthropic-0.57.0}/examples/text_completions_demo_sync.py +0 -0
  53. {anthropic-0.56.0 → anthropic-0.57.0}/examples/text_completions_streaming.py +0 -0
  54. {anthropic-0.56.0 → anthropic-0.57.0}/examples/thinking.py +0 -0
  55. {anthropic-0.56.0 → anthropic-0.57.0}/examples/thinking_stream.py +0 -0
  56. {anthropic-0.56.0 → anthropic-0.57.0}/examples/tools.py +0 -0
  57. {anthropic-0.56.0 → anthropic-0.57.0}/examples/tools_stream.py +0 -0
  58. {anthropic-0.56.0 → anthropic-0.57.0}/examples/vertex.py +0 -0
  59. {anthropic-0.56.0 → anthropic-0.57.0}/examples/web_search.py +0 -0
  60. {anthropic-0.56.0 → anthropic-0.57.0}/examples/web_search_stream.py +0 -0
  61. {anthropic-0.56.0 → anthropic-0.57.0}/helpers.md +0 -0
  62. {anthropic-0.56.0 → anthropic-0.57.0}/mypy.ini +0 -0
  63. {anthropic-0.56.0 → anthropic-0.57.0}/release-please-config.json +0 -0
  64. {anthropic-0.56.0 → anthropic-0.57.0}/requirements-dev.lock +0 -0
  65. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/__init__.py +0 -0
  66. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_base_client.py +0 -0
  67. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_client.py +0 -0
  68. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_compat.py +0 -0
  69. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_constants.py +0 -0
  70. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_decoders/jsonl.py +0 -0
  71. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_files.py +0 -0
  72. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_legacy_response.py +0 -0
  73. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_models.py +0 -0
  74. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_qs.py +0 -0
  75. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_resource.py +0 -0
  76. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_response.py +0 -0
  77. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_streaming.py +0 -0
  78. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_types.py +0 -0
  79. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_utils/__init__.py +0 -0
  80. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_utils/_httpx.py +0 -0
  81. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_utils/_logs.py +0 -0
  82. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_utils/_proxy.py +0 -0
  83. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_utils/_reflection.py +0 -0
  84. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_utils/_resources_proxy.py +0 -0
  85. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_utils/_streams.py +0 -0
  86. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_utils/_sync.py +0 -0
  87. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_utils/_transform.py +0 -0
  88. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_utils/_typing.py +0 -0
  89. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/_utils/_utils.py +0 -0
  90. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/.keep +0 -0
  91. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/__init__.py +0 -0
  92. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/_extras/__init__.py +0 -0
  93. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/_extras/_common.py +0 -0
  94. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/_extras/_google_auth.py +0 -0
  95. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/bedrock/__init__.py +0 -0
  96. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/bedrock/_auth.py +0 -0
  97. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/bedrock/_beta.py +0 -0
  98. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/bedrock/_beta_messages.py +0 -0
  99. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/bedrock/_client.py +0 -0
  100. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/bedrock/_stream.py +0 -0
  101. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/bedrock/_stream_decoder.py +0 -0
  102. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/streaming/__init__.py +0 -0
  103. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/streaming/_beta_types.py +0 -0
  104. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/streaming/_types.py +0 -0
  105. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/vertex/__init__.py +0 -0
  106. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/vertex/_auth.py +0 -0
  107. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/vertex/_beta.py +0 -0
  108. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/vertex/_beta_messages.py +0 -0
  109. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/lib/vertex/_client.py +0 -0
  110. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/pagination.py +0 -0
  111. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/py.typed +0 -0
  112. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/resources/__init__.py +0 -0
  113. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/resources/beta/__init__.py +0 -0
  114. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/resources/beta/beta.py +0 -0
  115. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/resources/beta/files.py +0 -0
  116. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/resources/beta/messages/__init__.py +0 -0
  117. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/resources/beta/messages/batches.py +0 -0
  118. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/resources/beta/models.py +0 -0
  119. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/resources/completions.py +0 -0
  120. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/resources/messages/__init__.py +0 -0
  121. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/resources/messages/batches.py +0 -0
  122. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/resources/models.py +0 -0
  123. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/__init__.py +0 -0
  124. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/anthropic_beta_param.py +0 -0
  125. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/base64_image_source_param.py +0 -0
  126. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/base64_pdf_source_param.py +0 -0
  127. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_base64_image_source_param.py +0 -0
  128. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_base64_pdf_block_param.py +0 -0
  129. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_base64_pdf_source_param.py +0 -0
  130. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_cache_control_ephemeral_param.py +0 -0
  131. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_cache_creation.py +0 -0
  132. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citation_char_location.py +0 -0
  133. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citation_char_location_param.py +0 -0
  134. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citation_content_block_location.py +0 -0
  135. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citation_content_block_location_param.py +0 -0
  136. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citation_page_location.py +0 -0
  137. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citation_page_location_param.py +0 -0
  138. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citation_web_search_result_location_param.py +0 -0
  139. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citations_config_param.py +0 -0
  140. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_citations_web_search_result_location.py +0 -0
  141. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_output_block.py +0 -0
  142. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_output_block_param.py +0 -0
  143. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_result_block.py +0 -0
  144. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_result_block_param.py +0 -0
  145. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_tool_20250522_param.py +0 -0
  146. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_tool_result_block.py +0 -0
  147. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_tool_result_block_content.py +0 -0
  148. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_tool_result_block_param.py +0 -0
  149. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_tool_result_block_param_content_param.py +0 -0
  150. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_tool_result_error.py +0 -0
  151. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_tool_result_error_code.py +0 -0
  152. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_code_execution_tool_result_error_param.py +0 -0
  153. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_container.py +0 -0
  154. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_container_upload_block.py +0 -0
  155. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_container_upload_block_param.py +0 -0
  156. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_content_block.py +2 -2
  157. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_content_block_source_content_param.py +0 -0
  158. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_content_block_source_param.py +0 -0
  159. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_file_document_source_param.py +0 -0
  160. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_file_image_source_param.py +0 -0
  161. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_image_block_param.py +0 -0
  162. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_input_json_delta.py +0 -0
  163. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_mcp_tool_result_block.py +0 -0
  164. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_mcp_tool_use_block.py +0 -0
  165. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_mcp_tool_use_block_param.py +0 -0
  166. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_message_delta_usage.py +0 -0
  167. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_message_param.py +0 -0
  168. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_message_tokens_count.py +0 -0
  169. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_metadata_param.py +0 -0
  170. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_model_info.py +0 -0
  171. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_plain_text_source_param.py +0 -0
  172. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_raw_content_block_delta.py +0 -0
  173. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_raw_content_block_delta_event.py +0 -0
  174. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_raw_content_block_start_event.py +2 -2
  175. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_raw_content_block_stop_event.py +0 -0
  176. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_raw_message_delta_event.py +0 -0
  177. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_raw_message_start_event.py +0 -0
  178. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_raw_message_stop_event.py +0 -0
  179. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_raw_message_stream_event.py +0 -0
  180. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_redacted_thinking_block.py +0 -0
  181. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_redacted_thinking_block_param.py +0 -0
  182. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_request_document_block_param.py +0 -0
  183. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_request_mcp_server_tool_configuration_param.py +0 -0
  184. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_request_mcp_server_url_definition_param.py +0 -0
  185. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_request_mcp_tool_result_block_param.py +0 -0
  186. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_server_tool_usage.py +0 -0
  187. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_server_tool_use_block.py +0 -0
  188. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_server_tool_use_block_param.py +0 -0
  189. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_signature_delta.py +0 -0
  190. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_stop_reason.py +0 -0
  191. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_text_block.py +0 -0
  192. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_text_block_param.py +0 -0
  193. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_text_delta.py +0 -0
  194. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_thinking_block.py +0 -0
  195. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_thinking_block_param.py +0 -0
  196. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_thinking_config_disabled_param.py +0 -0
  197. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_thinking_config_enabled_param.py +0 -0
  198. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_thinking_config_param.py +0 -0
  199. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_thinking_delta.py +0 -0
  200. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_bash_20241022_param.py +0 -0
  201. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_bash_20250124_param.py +0 -0
  202. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_choice_any_param.py +0 -0
  203. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_choice_auto_param.py +0 -0
  204. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_choice_none_param.py +0 -0
  205. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_choice_param.py +0 -0
  206. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_choice_tool_param.py +0 -0
  207. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_computer_use_20241022_param.py +0 -0
  208. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_computer_use_20250124_param.py +0 -0
  209. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_param.py +0 -0
  210. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_text_editor_20241022_param.py +0 -0
  211. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_text_editor_20250124_param.py +0 -0
  212. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_text_editor_20250429_param.py +0 -0
  213. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_union_param.py +4 -4
  214. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_use_block.py +0 -0
  215. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_tool_use_block_param.py +0 -0
  216. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_url_image_source_param.py +0 -0
  217. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_url_pdf_source_param.py +0 -0
  218. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_usage.py +0 -0
  219. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_result_block.py +0 -0
  220. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_result_block_param.py +0 -0
  221. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_tool_20250305_param.py +0 -0
  222. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_tool_request_error_param.py +0 -0
  223. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_tool_result_block.py +0 -0
  224. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_tool_result_block_content.py +0 -0
  225. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_tool_result_block_param.py +0 -0
  226. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_tool_result_block_param_content_param.py +0 -0
  227. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_tool_result_error.py +0 -0
  228. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/beta_web_search_tool_result_error_code.py +0 -0
  229. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/deleted_file.py +0 -0
  230. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/file_list_params.py +0 -0
  231. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/file_metadata.py +0 -0
  232. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/file_upload_params.py +0 -0
  233. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/__init__.py +0 -0
  234. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/batch_create_params.py +0 -0
  235. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/batch_list_params.py +0 -0
  236. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_deleted_message_batch.py +0 -0
  237. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_message_batch.py +0 -0
  238. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_message_batch_canceled_result.py +0 -0
  239. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_message_batch_errored_result.py +0 -0
  240. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_message_batch_expired_result.py +0 -0
  241. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_message_batch_individual_response.py +0 -0
  242. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_message_batch_request_counts.py +0 -0
  243. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_message_batch_result.py +0 -0
  244. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/messages/beta_message_batch_succeeded_result.py +0 -0
  245. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta/model_list_params.py +0 -0
  246. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta_api_error.py +0 -0
  247. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta_authentication_error.py +0 -0
  248. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta_billing_error.py +0 -0
  249. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta_error.py +0 -0
  250. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta_error_response.py +0 -0
  251. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta_gateway_timeout_error.py +0 -0
  252. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta_invalid_request_error.py +0 -0
  253. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta_not_found_error.py +0 -0
  254. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta_overloaded_error.py +0 -0
  255. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta_permission_error.py +0 -0
  256. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/beta_rate_limit_error.py +0 -0
  257. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/cache_control_ephemeral_param.py +0 -0
  258. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/citation_char_location.py +0 -0
  259. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/citation_char_location_param.py +0 -0
  260. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/citation_content_block_location.py +0 -0
  261. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/citation_content_block_location_param.py +0 -0
  262. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/citation_page_location.py +0 -0
  263. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/citation_page_location_param.py +0 -0
  264. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/citation_web_search_result_location_param.py +0 -0
  265. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/citations_config_param.py +0 -0
  266. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/citations_delta.py +0 -0
  267. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/citations_web_search_result_location.py +0 -0
  268. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/completion.py +0 -0
  269. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/completion_create_params.py +0 -0
  270. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/content_block_delta_event.py +0 -0
  271. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/content_block_param.py +4 -4
  272. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/content_block_source_content_param.py +0 -0
  273. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/content_block_source_param.py +0 -0
  274. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/content_block_start_event.py +0 -0
  275. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/content_block_stop_event.py +0 -0
  276. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/document_block_param.py +0 -0
  277. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/image_block_param.py +0 -0
  278. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/input_json_delta.py +0 -0
  279. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/message_count_tokens_tool_param.py +0 -0
  280. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/message_delta_event.py +0 -0
  281. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/message_delta_usage.py +0 -0
  282. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/message_param.py +4 -4
  283. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/message_start_event.py +0 -0
  284. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/message_stop_event.py +0 -0
  285. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/message_stream_event.py +0 -0
  286. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/message_tokens_count.py +0 -0
  287. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/messages/__init__.py +0 -0
  288. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/messages/batch_create_params.py +0 -0
  289. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/messages/batch_list_params.py +0 -0
  290. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/messages/deleted_message_batch.py +0 -0
  291. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/messages/message_batch.py +0 -0
  292. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/messages/message_batch_canceled_result.py +0 -0
  293. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/messages/message_batch_errored_result.py +0 -0
  294. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/messages/message_batch_expired_result.py +0 -0
  295. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/messages/message_batch_individual_response.py +0 -0
  296. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/messages/message_batch_request_counts.py +0 -0
  297. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/messages/message_batch_result.py +0 -0
  298. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/messages/message_batch_succeeded_result.py +0 -0
  299. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/metadata_param.py +0 -0
  300. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/model.py +0 -0
  301. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/model_info.py +0 -0
  302. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/model_list_params.py +0 -0
  303. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/model_param.py +0 -0
  304. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/plain_text_source_param.py +0 -0
  305. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/raw_content_block_delta.py +0 -0
  306. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/raw_content_block_delta_event.py +0 -0
  307. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/raw_content_block_stop_event.py +0 -0
  308. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/raw_message_delta_event.py +0 -0
  309. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/raw_message_start_event.py +0 -0
  310. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/raw_message_stop_event.py +0 -0
  311. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/raw_message_stream_event.py +0 -0
  312. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/redacted_thinking_block.py +0 -0
  313. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/redacted_thinking_block_param.py +0 -0
  314. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/server_tool_usage.py +0 -0
  315. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/server_tool_use_block.py +0 -0
  316. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/server_tool_use_block_param.py +0 -0
  317. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/shared/__init__.py +0 -0
  318. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/shared/api_error_object.py +0 -0
  319. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/shared/authentication_error.py +0 -0
  320. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/shared/billing_error.py +0 -0
  321. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/shared/error_object.py +0 -0
  322. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/shared/error_response.py +0 -0
  323. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/shared/gateway_timeout_error.py +0 -0
  324. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/shared/invalid_request_error.py +0 -0
  325. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/shared/not_found_error.py +0 -0
  326. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/shared/overloaded_error.py +0 -0
  327. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/shared/permission_error.py +0 -0
  328. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/shared/rate_limit_error.py +0 -0
  329. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/signature_delta.py +0 -0
  330. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/stop_reason.py +0 -0
  331. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/text_block.py +0 -0
  332. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/text_block_param.py +0 -0
  333. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/text_citation.py +0 -0
  334. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/text_citation_param.py +0 -0
  335. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/text_delta.py +0 -0
  336. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/thinking_block.py +0 -0
  337. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/thinking_block_param.py +0 -0
  338. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/thinking_config_disabled_param.py +0 -0
  339. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/thinking_config_enabled_param.py +0 -0
  340. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/thinking_config_param.py +0 -0
  341. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/thinking_delta.py +0 -0
  342. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/tool_bash_20250124_param.py +0 -0
  343. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/tool_choice_any_param.py +0 -0
  344. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/tool_choice_auto_param.py +0 -0
  345. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/tool_choice_none_param.py +0 -0
  346. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/tool_choice_param.py +0 -0
  347. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/tool_choice_tool_param.py +0 -0
  348. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/tool_param.py +0 -0
  349. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/tool_result_block_param.py +0 -0
  350. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/tool_text_editor_20250124_param.py +0 -0
  351. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/tool_union_param.py +0 -0
  352. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/tool_use_block.py +0 -0
  353. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/tool_use_block_param.py +0 -0
  354. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/url_image_source_param.py +0 -0
  355. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/url_pdf_source_param.py +0 -0
  356. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/usage.py +0 -0
  357. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/web_search_result_block.py +0 -0
  358. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/web_search_result_block_param.py +0 -0
  359. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/web_search_tool_20250305_param.py +0 -0
  360. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/web_search_tool_request_error_param.py +0 -0
  361. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/web_search_tool_result_block.py +0 -0
  362. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/web_search_tool_result_block_content.py +0 -0
  363. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/web_search_tool_result_block_param.py +0 -0
  364. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/web_search_tool_result_block_param_content_param.py +0 -0
  365. {anthropic-0.56.0 → anthropic-0.57.0}/src/anthropic/types/web_search_tool_result_error.py +0 -0
  366. {anthropic-0.56.0 → anthropic-0.57.0}/tests/__init__.py +0 -0
  367. {anthropic-0.56.0 → anthropic-0.57.0}/tests/api_resources/__init__.py +0 -0
  368. {anthropic-0.56.0 → anthropic-0.57.0}/tests/api_resources/beta/__init__.py +0 -0
  369. {anthropic-0.56.0 → anthropic-0.57.0}/tests/api_resources/beta/messages/__init__.py +0 -0
  370. {anthropic-0.56.0 → anthropic-0.57.0}/tests/api_resources/beta/test_files.py +0 -0
  371. {anthropic-0.56.0 → anthropic-0.57.0}/tests/api_resources/beta/test_models.py +0 -0
  372. {anthropic-0.56.0 → anthropic-0.57.0}/tests/api_resources/messages/__init__.py +0 -0
  373. {anthropic-0.56.0 → anthropic-0.57.0}/tests/api_resources/test_completions.py +0 -0
  374. {anthropic-0.56.0 → anthropic-0.57.0}/tests/api_resources/test_models.py +0 -0
  375. {anthropic-0.56.0 → anthropic-0.57.0}/tests/conftest.py +0 -0
  376. {anthropic-0.56.0 → anthropic-0.57.0}/tests/decoders/test_jsonl.py +0 -0
  377. {anthropic-0.56.0 → anthropic-0.57.0}/tests/lib/streaming/__init__.py +0 -0
  378. {anthropic-0.56.0 → anthropic-0.57.0}/tests/lib/streaming/fixtures/basic_response.txt +0 -0
  379. {anthropic-0.56.0 → anthropic-0.57.0}/tests/lib/streaming/fixtures/incomplete_partial_json_response.txt +0 -0
  380. {anthropic-0.56.0 → anthropic-0.57.0}/tests/lib/streaming/fixtures/tool_use_response.txt +0 -0
  381. {anthropic-0.56.0 → anthropic-0.57.0}/tests/lib/streaming/helpers.py +0 -0
  382. {anthropic-0.56.0 → anthropic-0.57.0}/tests/lib/streaming/test_beta_messages.py +0 -0
  383. {anthropic-0.56.0 → anthropic-0.57.0}/tests/lib/streaming/test_messages.py +0 -0
  384. {anthropic-0.56.0 → anthropic-0.57.0}/tests/lib/streaming/test_partial_json.py +0 -0
  385. {anthropic-0.56.0 → anthropic-0.57.0}/tests/lib/test_bedrock.py +0 -0
  386. {anthropic-0.56.0 → anthropic-0.57.0}/tests/lib/test_vertex.py +0 -0
  387. {anthropic-0.56.0 → anthropic-0.57.0}/tests/sample_file.txt +0 -0
  388. {anthropic-0.56.0 → anthropic-0.57.0}/tests/test_deepcopy.py +0 -0
  389. {anthropic-0.56.0 → anthropic-0.57.0}/tests/test_extract_files.py +0 -0
  390. {anthropic-0.56.0 → anthropic-0.57.0}/tests/test_files.py +0 -0
  391. {anthropic-0.56.0 → anthropic-0.57.0}/tests/test_legacy_response.py +0 -0
  392. {anthropic-0.56.0 → anthropic-0.57.0}/tests/test_models.py +0 -0
  393. {anthropic-0.56.0 → anthropic-0.57.0}/tests/test_qs.py +0 -0
  394. {anthropic-0.56.0 → anthropic-0.57.0}/tests/test_required_args.py +0 -0
  395. {anthropic-0.56.0 → anthropic-0.57.0}/tests/test_response.py +0 -0
  396. {anthropic-0.56.0 → anthropic-0.57.0}/tests/test_streaming.py +0 -0
  397. {anthropic-0.56.0 → anthropic-0.57.0}/tests/test_transform.py +0 -0
  398. {anthropic-0.56.0 → anthropic-0.57.0}/tests/test_utils/test_proxy.py +0 -0
  399. {anthropic-0.56.0 → anthropic-0.57.0}/tests/test_utils/test_typing.py +0 -0
  400. {anthropic-0.56.0 → anthropic-0.57.0}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.57.0"
3
+ }
@@ -1,5 +1,34 @@
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
+
3
32
  ## 0.56.0 (2025-07-01)
4
33
 
5
34
  Full Changelog: [v0.55.0...v0.56.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.55.0...v0.56.0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: anthropic
3
- Version: 0.56.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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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.beta.messages.count_tokens()` method. This takes the same `messages` list as the `.create()` method.
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.beta.messages.count_tokens(
251
- model="claude-3-5-sonnet-20241022",
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 beta support for the [Message Batches API](https://docs.anthropic.com/en/docs/build-with-claude/message-batches) under the `client.beta.messages.batches` namespace.
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.beta.messages.batches.create(
276
+ await client.messages.batches.create(
278
277
  requests=[
279
278
  {
280
279
  "custom_id": "my-first-request",
281
280
  "params": {
282
- "model": "claude-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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.beta.messages.batches.results(batch_id)
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-3-5-sonnet-20241022-v2:0",
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-3-5-sonnet-v2@20241022",
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.beta.messages.batches.list(
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.beta.messages.batches.list(
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.beta.messages.batches.list(
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.beta.messages.batches.list(
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-3-7-sonnet-20250219",
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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
- *is* public. Unless documented otherwise, *all* other `_` prefix properties,
571
- methods and modules are *private*.
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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.beta.messages.count_tokens()` method. This takes the same `messages` list as the `.create()` method.
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.beta.messages.count_tokens(
211
- model="claude-3-5-sonnet-20241022",
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 beta support for the [Message Batches API](https://docs.anthropic.com/en/docs/build-with-claude/message-batches) under the `client.beta.messages.batches` namespace.
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.beta.messages.batches.create(
236
+ await client.messages.batches.create(
238
237
  requests=[
239
238
  {
240
239
  "custom_id": "my-first-request",
241
240
  "params": {
242
- "model": "claude-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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.beta.messages.batches.results(batch_id)
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-3-5-sonnet-20241022-v2:0",
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-3-5-sonnet-v2@20241022",
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.beta.messages.batches.list(
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.beta.messages.batches.list(
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.beta.messages.batches.list(
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.beta.messages.batches.list(
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-3-7-sonnet-20250219",
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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
- *is* public. Unless documented otherwise, *all* other `_` prefix properties,
531
- methods and modules are *private*.
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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-3-5-sonnet-latest",
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,
@@ -14,6 +14,6 @@ except IndexError as exc:
14
14
 
15
15
  s = time.monotonic()
16
16
 
17
- result_stream = client.beta.messages.batches.results(batch_id)
17
+ result_stream = client.messages.batches.results(batch_id)
18
18
  for result in result_stream:
19
19
  rich.print(result)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "anthropic"
3
- version = "0.56.0"
3
+ version = "0.57.0"
4
4
  description = "The official Python library for the anthropic API"
5
5
  dynamic = ["readme"]
6
6
  license = "MIT"
@@ -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__(message="Request timed out.", request=request)
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):
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "anthropic"
4
- __version__ = "0.56.0" # x-release-please-version
4
+ __version__ = "0.57.0" # x-release-please-version
@@ -101,7 +101,9 @@ class BetaMessageStream:
101
101
  text_blocks.append(block.text)
102
102
 
103
103
  if not text_blocks:
104
- raise RuntimeError("Expected to have received at least 1 text block")
104
+ raise RuntimeError(
105
+ f".get_final_text() can only be called when the API returns a `text` content block.\nThe API returned {','.join([b.type for b in message.content])} content block type(s) that you can access by calling get_final_message().content"
106
+ )
105
107
 
106
108
  return "".join(text_blocks)
107
109
 
@@ -239,7 +241,10 @@ class BetaAsyncMessageStream:
239
241
  text_blocks.append(block.text)
240
242
 
241
243
  if not text_blocks:
242
- raise RuntimeError("Expected to have received at least 1 text block")
244
+ raise RuntimeError(
245
+ f".get_final_text() can only be called when the API returns a `text` content block.\nThe API returned {','.join([b.type for b in message.content])} content block type(s) that you can access by calling get_final_message().content"
246
+ )
247
+
243
248
 
244
249
  return "".join(text_blocks)
245
250
 
@@ -100,7 +100,9 @@ class MessageStream:
100
100
  text_blocks.append(block.text)
101
101
 
102
102
  if not text_blocks:
103
- raise RuntimeError("Expected to have received at least 1 text block")
103
+ raise RuntimeError(
104
+ f".get_final_text() can only be called when the API returns a `text` content block.\nThe API returned {','.join([b.type for b in message.content])} content block type(s) that you can access by calling get_final_message().content"
105
+ )
104
106
 
105
107
  return "".join(text_blocks)
106
108
 
@@ -237,7 +239,9 @@ class AsyncMessageStream:
237
239
  text_blocks.append(block.text)
238
240
 
239
241
  if not text_blocks:
240
- raise RuntimeError("Expected to have received at least 1 text block")
242
+ raise RuntimeError(
243
+ f".get_final_text() can only be called when the API returns a `text` content block.\nThe API returned {','.join([b.type for b in message.content])} content block type(s) that you can access by calling get_final_message().content"
244
+ )
241
245
 
242
246
  return "".join(text_blocks)
243
247