anthropic 0.57.1__tar.gz → 0.58.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (400) hide show
  1. anthropic-0.58.1/.release-please-manifest.json +3 -0
  2. {anthropic-0.57.1 → anthropic-0.58.1}/CHANGELOG.md +37 -0
  3. {anthropic-0.57.1 → anthropic-0.58.1}/PKG-INFO +7 -6
  4. {anthropic-0.57.1 → anthropic-0.58.1}/README.md +4 -4
  5. {anthropic-0.57.1 → anthropic-0.58.1}/examples/bedrock.py +2 -2
  6. {anthropic-0.57.1 → anthropic-0.58.1}/examples/images.py +1 -1
  7. {anthropic-0.57.1 → anthropic-0.58.1}/examples/mcp.py +1 -1
  8. {anthropic-0.57.1 → anthropic-0.58.1}/examples/messages.py +2 -2
  9. {anthropic-0.57.1 → anthropic-0.58.1}/examples/messages_stream.py +1 -1
  10. {anthropic-0.57.1 → anthropic-0.58.1}/examples/text_completions_demo_async.py +1 -1
  11. {anthropic-0.57.1 → anthropic-0.58.1}/examples/text_completions_demo_sync.py +1 -1
  12. {anthropic-0.57.1 → anthropic-0.58.1}/examples/text_completions_streaming.py +2 -2
  13. {anthropic-0.57.1 → anthropic-0.58.1}/examples/thinking.py +1 -1
  14. {anthropic-0.57.1 → anthropic-0.58.1}/examples/thinking_stream.py +1 -1
  15. {anthropic-0.57.1 → anthropic-0.58.1}/examples/tools.py +2 -2
  16. {anthropic-0.57.1 → anthropic-0.58.1}/examples/tools_stream.py +1 -1
  17. {anthropic-0.57.1 → anthropic-0.58.1}/examples/vertex.py +2 -2
  18. {anthropic-0.57.1 → anthropic-0.58.1}/examples/web_search.py +1 -1
  19. {anthropic-0.57.1 → anthropic-0.58.1}/examples/web_search_stream.py +1 -1
  20. {anthropic-0.57.1 → anthropic-0.58.1}/pyproject.toml +3 -2
  21. {anthropic-0.57.1 → anthropic-0.58.1}/requirements-dev.lock +7 -5
  22. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_base_client.py +9 -2
  23. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_models.py +7 -4
  24. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_version.py +1 -1
  25. {anthropic-0.57.1 → anthropic-0.58.1}/tests/test_client.py +2 -2
  26. {anthropic-0.57.1 → anthropic-0.58.1}/tests/test_models.py +45 -0
  27. {anthropic-0.57.1 → anthropic-0.58.1}/uv.lock +54 -33
  28. anthropic-0.57.1/.release-please-manifest.json +0 -3
  29. {anthropic-0.57.1 → anthropic-0.58.1}/.gitignore +0 -0
  30. {anthropic-0.57.1 → anthropic-0.58.1}/CONTRIBUTING.md +0 -0
  31. {anthropic-0.57.1 → anthropic-0.58.1}/LICENSE +0 -0
  32. {anthropic-0.57.1 → anthropic-0.58.1}/SECURITY.md +0 -0
  33. {anthropic-0.57.1 → anthropic-0.58.1}/api.md +0 -0
  34. {anthropic-0.57.1 → anthropic-0.58.1}/bin/check-release-environment +0 -0
  35. {anthropic-0.57.1 → anthropic-0.58.1}/bin/publish-pypi +0 -0
  36. {anthropic-0.57.1 → anthropic-0.58.1}/examples/.keep +0 -0
  37. {anthropic-0.57.1 → anthropic-0.58.1}/examples/batch_results.py +0 -0
  38. {anthropic-0.57.1 → anthropic-0.58.1}/examples/logo.png +0 -0
  39. {anthropic-0.57.1 → anthropic-0.58.1}/helpers.md +0 -0
  40. {anthropic-0.57.1 → anthropic-0.58.1}/mypy.ini +0 -0
  41. {anthropic-0.57.1 → anthropic-0.58.1}/release-please-config.json +0 -0
  42. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/__init__.py +0 -0
  43. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_client.py +0 -0
  44. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_compat.py +0 -0
  45. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_constants.py +0 -0
  46. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_decoders/jsonl.py +0 -0
  47. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_exceptions.py +0 -0
  48. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_files.py +0 -0
  49. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_legacy_response.py +0 -0
  50. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_qs.py +0 -0
  51. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_resource.py +0 -0
  52. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_response.py +0 -0
  53. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_streaming.py +0 -0
  54. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_types.py +0 -0
  55. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_utils/__init__.py +0 -0
  56. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_utils/_httpx.py +0 -0
  57. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_utils/_logs.py +0 -0
  58. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_utils/_proxy.py +0 -0
  59. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_utils/_reflection.py +0 -0
  60. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_utils/_resources_proxy.py +0 -0
  61. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_utils/_streams.py +0 -0
  62. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_utils/_sync.py +0 -0
  63. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_utils/_transform.py +0 -0
  64. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_utils/_typing.py +0 -0
  65. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/_utils/_utils.py +0 -0
  66. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/.keep +0 -0
  67. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/__init__.py +0 -0
  68. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/_extras/__init__.py +0 -0
  69. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/_extras/_common.py +0 -0
  70. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/_extras/_google_auth.py +0 -0
  71. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/bedrock/__init__.py +0 -0
  72. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/bedrock/_auth.py +0 -0
  73. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/bedrock/_beta.py +0 -0
  74. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/bedrock/_beta_messages.py +0 -0
  75. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/bedrock/_client.py +0 -0
  76. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/bedrock/_stream.py +0 -0
  77. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/bedrock/_stream_decoder.py +0 -0
  78. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/streaming/__init__.py +0 -0
  79. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/streaming/_beta_messages.py +0 -0
  80. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/streaming/_beta_types.py +0 -0
  81. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/streaming/_messages.py +0 -0
  82. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/streaming/_types.py +0 -0
  83. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/vertex/__init__.py +0 -0
  84. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/vertex/_auth.py +0 -0
  85. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/vertex/_beta.py +0 -0
  86. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/vertex/_beta_messages.py +0 -0
  87. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/lib/vertex/_client.py +0 -0
  88. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/pagination.py +0 -0
  89. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/py.typed +0 -0
  90. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/resources/__init__.py +0 -0
  91. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/resources/beta/__init__.py +0 -0
  92. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/resources/beta/beta.py +0 -0
  93. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/resources/beta/files.py +0 -0
  94. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/resources/beta/messages/__init__.py +0 -0
  95. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/resources/beta/messages/batches.py +0 -0
  96. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/resources/beta/messages/messages.py +0 -0
  97. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/resources/beta/models.py +0 -0
  98. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/resources/completions.py +0 -0
  99. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/resources/messages/__init__.py +0 -0
  100. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/resources/messages/batches.py +0 -0
  101. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/resources/messages/messages.py +0 -0
  102. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/resources/models.py +0 -0
  103. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/__init__.py +0 -0
  104. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/anthropic_beta_param.py +0 -0
  105. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/base64_image_source_param.py +0 -0
  106. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/base64_pdf_source_param.py +0 -0
  107. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/__init__.py +0 -0
  108. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_base64_image_source_param.py +0 -0
  109. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_base64_pdf_block_param.py +0 -0
  110. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_base64_pdf_source_param.py +0 -0
  111. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_cache_control_ephemeral_param.py +0 -0
  112. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_cache_creation.py +0 -0
  113. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_citation_char_location.py +0 -0
  114. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_citation_char_location_param.py +0 -0
  115. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_citation_content_block_location.py +0 -0
  116. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_citation_content_block_location_param.py +0 -0
  117. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_citation_page_location.py +0 -0
  118. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_citation_page_location_param.py +0 -0
  119. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_citation_search_result_location.py +0 -0
  120. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_citation_search_result_location_param.py +0 -0
  121. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_citation_web_search_result_location_param.py +0 -0
  122. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_citations_config_param.py +0 -0
  123. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_citations_delta.py +0 -0
  124. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_citations_web_search_result_location.py +0 -0
  125. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_code_execution_output_block.py +0 -0
  126. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_code_execution_output_block_param.py +0 -0
  127. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_code_execution_result_block.py +0 -0
  128. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_code_execution_result_block_param.py +0 -0
  129. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_code_execution_tool_20250522_param.py +0 -0
  130. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_code_execution_tool_result_block.py +0 -0
  131. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_code_execution_tool_result_block_content.py +0 -0
  132. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_code_execution_tool_result_block_param.py +0 -0
  133. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_code_execution_tool_result_block_param_content_param.py +0 -0
  134. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_code_execution_tool_result_error.py +0 -0
  135. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_code_execution_tool_result_error_code.py +0 -0
  136. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_code_execution_tool_result_error_param.py +0 -0
  137. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_container.py +0 -0
  138. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_container_upload_block.py +0 -0
  139. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_container_upload_block_param.py +0 -0
  140. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_content_block.py +0 -0
  141. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_content_block_param.py +0 -0
  142. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_content_block_source_content_param.py +0 -0
  143. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_content_block_source_param.py +0 -0
  144. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_file_document_source_param.py +0 -0
  145. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_file_image_source_param.py +0 -0
  146. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_image_block_param.py +0 -0
  147. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_input_json_delta.py +0 -0
  148. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_mcp_tool_result_block.py +0 -0
  149. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_mcp_tool_use_block.py +0 -0
  150. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_mcp_tool_use_block_param.py +0 -0
  151. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_message.py +0 -0
  152. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_message_delta_usage.py +0 -0
  153. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_message_param.py +0 -0
  154. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_message_tokens_count.py +0 -0
  155. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_metadata_param.py +0 -0
  156. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_model_info.py +0 -0
  157. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_plain_text_source_param.py +0 -0
  158. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_raw_content_block_delta.py +0 -0
  159. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_raw_content_block_delta_event.py +0 -0
  160. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_raw_content_block_start_event.py +0 -0
  161. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_raw_content_block_stop_event.py +0 -0
  162. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_raw_message_delta_event.py +0 -0
  163. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_raw_message_start_event.py +0 -0
  164. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_raw_message_stop_event.py +0 -0
  165. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_raw_message_stream_event.py +0 -0
  166. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_redacted_thinking_block.py +0 -0
  167. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_redacted_thinking_block_param.py +0 -0
  168. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_request_document_block_param.py +0 -0
  169. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_request_mcp_server_tool_configuration_param.py +0 -0
  170. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_request_mcp_server_url_definition_param.py +0 -0
  171. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_request_mcp_tool_result_block_param.py +0 -0
  172. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_search_result_block_param.py +0 -0
  173. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_server_tool_usage.py +0 -0
  174. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_server_tool_use_block.py +0 -0
  175. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_server_tool_use_block_param.py +0 -0
  176. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_signature_delta.py +0 -0
  177. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_stop_reason.py +0 -0
  178. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_text_block.py +0 -0
  179. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_text_block_param.py +0 -0
  180. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_text_citation.py +0 -0
  181. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_text_citation_param.py +0 -0
  182. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_text_delta.py +0 -0
  183. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_thinking_block.py +0 -0
  184. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_thinking_block_param.py +0 -0
  185. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_thinking_config_disabled_param.py +0 -0
  186. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_thinking_config_enabled_param.py +0 -0
  187. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_thinking_config_param.py +0 -0
  188. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_thinking_delta.py +0 -0
  189. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_tool_bash_20241022_param.py +0 -0
  190. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_tool_bash_20250124_param.py +0 -0
  191. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_tool_choice_any_param.py +0 -0
  192. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_tool_choice_auto_param.py +0 -0
  193. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_tool_choice_none_param.py +0 -0
  194. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_tool_choice_param.py +0 -0
  195. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_tool_choice_tool_param.py +0 -0
  196. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_tool_computer_use_20241022_param.py +0 -0
  197. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_tool_computer_use_20250124_param.py +0 -0
  198. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_tool_param.py +0 -0
  199. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_tool_result_block_param.py +0 -0
  200. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_tool_text_editor_20241022_param.py +0 -0
  201. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_tool_text_editor_20250124_param.py +0 -0
  202. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_tool_text_editor_20250429_param.py +0 -0
  203. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_tool_union_param.py +0 -0
  204. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_tool_use_block.py +0 -0
  205. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_tool_use_block_param.py +0 -0
  206. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_url_image_source_param.py +0 -0
  207. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_url_pdf_source_param.py +0 -0
  208. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_usage.py +0 -0
  209. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_web_search_result_block.py +0 -0
  210. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_web_search_result_block_param.py +0 -0
  211. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_web_search_tool_20250305_param.py +0 -0
  212. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_web_search_tool_request_error_param.py +0 -0
  213. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_web_search_tool_result_block.py +0 -0
  214. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_web_search_tool_result_block_content.py +0 -0
  215. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_web_search_tool_result_block_param.py +0 -0
  216. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_web_search_tool_result_block_param_content_param.py +0 -0
  217. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_web_search_tool_result_error.py +0 -0
  218. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/beta_web_search_tool_result_error_code.py +0 -0
  219. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/deleted_file.py +0 -0
  220. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/file_list_params.py +0 -0
  221. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/file_metadata.py +0 -0
  222. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/file_upload_params.py +0 -0
  223. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/message_count_tokens_params.py +0 -0
  224. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/message_create_params.py +0 -0
  225. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/messages/__init__.py +0 -0
  226. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/messages/batch_create_params.py +0 -0
  227. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/messages/batch_list_params.py +0 -0
  228. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/messages/beta_deleted_message_batch.py +0 -0
  229. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/messages/beta_message_batch.py +0 -0
  230. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/messages/beta_message_batch_canceled_result.py +0 -0
  231. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/messages/beta_message_batch_errored_result.py +0 -0
  232. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/messages/beta_message_batch_expired_result.py +0 -0
  233. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/messages/beta_message_batch_individual_response.py +0 -0
  234. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/messages/beta_message_batch_request_counts.py +0 -0
  235. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/messages/beta_message_batch_result.py +0 -0
  236. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/messages/beta_message_batch_succeeded_result.py +0 -0
  237. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta/model_list_params.py +0 -0
  238. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta_api_error.py +0 -0
  239. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta_authentication_error.py +0 -0
  240. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta_billing_error.py +0 -0
  241. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta_error.py +0 -0
  242. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta_error_response.py +0 -0
  243. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta_gateway_timeout_error.py +0 -0
  244. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta_invalid_request_error.py +0 -0
  245. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta_not_found_error.py +0 -0
  246. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta_overloaded_error.py +0 -0
  247. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta_permission_error.py +0 -0
  248. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/beta_rate_limit_error.py +0 -0
  249. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/cache_control_ephemeral_param.py +0 -0
  250. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/citation_char_location.py +0 -0
  251. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/citation_char_location_param.py +0 -0
  252. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/citation_content_block_location.py +0 -0
  253. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/citation_content_block_location_param.py +0 -0
  254. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/citation_page_location.py +0 -0
  255. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/citation_page_location_param.py +0 -0
  256. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/citation_web_search_result_location_param.py +0 -0
  257. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/citations_config_param.py +0 -0
  258. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/citations_delta.py +0 -0
  259. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/citations_web_search_result_location.py +0 -0
  260. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/completion.py +0 -0
  261. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/completion_create_params.py +0 -0
  262. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/content_block.py +0 -0
  263. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/content_block_delta_event.py +0 -0
  264. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/content_block_param.py +0 -0
  265. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/content_block_source_content_param.py +0 -0
  266. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/content_block_source_param.py +0 -0
  267. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/content_block_start_event.py +0 -0
  268. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/content_block_stop_event.py +0 -0
  269. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/document_block_param.py +0 -0
  270. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/image_block_param.py +0 -0
  271. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/input_json_delta.py +0 -0
  272. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/message.py +0 -0
  273. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/message_count_tokens_params.py +0 -0
  274. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/message_count_tokens_tool_param.py +0 -0
  275. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/message_create_params.py +0 -0
  276. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/message_delta_event.py +0 -0
  277. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/message_delta_usage.py +0 -0
  278. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/message_param.py +0 -0
  279. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/message_start_event.py +0 -0
  280. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/message_stop_event.py +0 -0
  281. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/message_stream_event.py +0 -0
  282. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/message_tokens_count.py +0 -0
  283. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/messages/__init__.py +0 -0
  284. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/messages/batch_create_params.py +0 -0
  285. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/messages/batch_list_params.py +0 -0
  286. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/messages/deleted_message_batch.py +0 -0
  287. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/messages/message_batch.py +0 -0
  288. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/messages/message_batch_canceled_result.py +0 -0
  289. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/messages/message_batch_errored_result.py +0 -0
  290. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/messages/message_batch_expired_result.py +0 -0
  291. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/messages/message_batch_individual_response.py +0 -0
  292. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/messages/message_batch_request_counts.py +0 -0
  293. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/messages/message_batch_result.py +0 -0
  294. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/messages/message_batch_succeeded_result.py +0 -0
  295. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/metadata_param.py +0 -0
  296. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/model.py +0 -0
  297. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/model_info.py +0 -0
  298. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/model_list_params.py +0 -0
  299. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/model_param.py +0 -0
  300. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/plain_text_source_param.py +0 -0
  301. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/raw_content_block_delta.py +0 -0
  302. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/raw_content_block_delta_event.py +0 -0
  303. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/raw_content_block_start_event.py +0 -0
  304. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/raw_content_block_stop_event.py +0 -0
  305. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/raw_message_delta_event.py +0 -0
  306. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/raw_message_start_event.py +0 -0
  307. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/raw_message_stop_event.py +0 -0
  308. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/raw_message_stream_event.py +0 -0
  309. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/redacted_thinking_block.py +0 -0
  310. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/redacted_thinking_block_param.py +0 -0
  311. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/server_tool_usage.py +0 -0
  312. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/server_tool_use_block.py +0 -0
  313. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/server_tool_use_block_param.py +0 -0
  314. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/shared/__init__.py +0 -0
  315. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/shared/api_error_object.py +0 -0
  316. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/shared/authentication_error.py +0 -0
  317. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/shared/billing_error.py +0 -0
  318. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/shared/error_object.py +0 -0
  319. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/shared/error_response.py +0 -0
  320. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/shared/gateway_timeout_error.py +0 -0
  321. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/shared/invalid_request_error.py +0 -0
  322. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/shared/not_found_error.py +0 -0
  323. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/shared/overloaded_error.py +0 -0
  324. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/shared/permission_error.py +0 -0
  325. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/shared/rate_limit_error.py +0 -0
  326. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/signature_delta.py +0 -0
  327. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/stop_reason.py +0 -0
  328. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/text_block.py +0 -0
  329. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/text_block_param.py +0 -0
  330. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/text_citation.py +0 -0
  331. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/text_citation_param.py +0 -0
  332. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/text_delta.py +0 -0
  333. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/thinking_block.py +0 -0
  334. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/thinking_block_param.py +0 -0
  335. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/thinking_config_disabled_param.py +0 -0
  336. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/thinking_config_enabled_param.py +0 -0
  337. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/thinking_config_param.py +0 -0
  338. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/thinking_delta.py +0 -0
  339. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/tool_bash_20250124_param.py +0 -0
  340. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/tool_choice_any_param.py +0 -0
  341. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/tool_choice_auto_param.py +0 -0
  342. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/tool_choice_none_param.py +0 -0
  343. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/tool_choice_param.py +0 -0
  344. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/tool_choice_tool_param.py +0 -0
  345. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/tool_param.py +0 -0
  346. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/tool_result_block_param.py +0 -0
  347. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/tool_text_editor_20250124_param.py +0 -0
  348. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/tool_union_param.py +0 -0
  349. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/tool_use_block.py +0 -0
  350. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/tool_use_block_param.py +0 -0
  351. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/url_image_source_param.py +0 -0
  352. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/url_pdf_source_param.py +0 -0
  353. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/usage.py +0 -0
  354. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/web_search_result_block.py +0 -0
  355. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/web_search_result_block_param.py +0 -0
  356. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/web_search_tool_20250305_param.py +0 -0
  357. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/web_search_tool_request_error_param.py +0 -0
  358. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/web_search_tool_result_block.py +0 -0
  359. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/web_search_tool_result_block_content.py +0 -0
  360. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/web_search_tool_result_block_param.py +0 -0
  361. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/web_search_tool_result_block_param_content_param.py +0 -0
  362. {anthropic-0.57.1 → anthropic-0.58.1}/src/anthropic/types/web_search_tool_result_error.py +0 -0
  363. {anthropic-0.57.1 → anthropic-0.58.1}/tests/__init__.py +0 -0
  364. {anthropic-0.57.1 → anthropic-0.58.1}/tests/api_resources/__init__.py +0 -0
  365. {anthropic-0.57.1 → anthropic-0.58.1}/tests/api_resources/beta/__init__.py +0 -0
  366. {anthropic-0.57.1 → anthropic-0.58.1}/tests/api_resources/beta/messages/__init__.py +0 -0
  367. {anthropic-0.57.1 → anthropic-0.58.1}/tests/api_resources/beta/messages/test_batches.py +0 -0
  368. {anthropic-0.57.1 → anthropic-0.58.1}/tests/api_resources/beta/test_files.py +0 -0
  369. {anthropic-0.57.1 → anthropic-0.58.1}/tests/api_resources/beta/test_messages.py +0 -0
  370. {anthropic-0.57.1 → anthropic-0.58.1}/tests/api_resources/beta/test_models.py +0 -0
  371. {anthropic-0.57.1 → anthropic-0.58.1}/tests/api_resources/messages/__init__.py +0 -0
  372. {anthropic-0.57.1 → anthropic-0.58.1}/tests/api_resources/messages/test_batches.py +0 -0
  373. {anthropic-0.57.1 → anthropic-0.58.1}/tests/api_resources/test_completions.py +0 -0
  374. {anthropic-0.57.1 → anthropic-0.58.1}/tests/api_resources/test_messages.py +0 -0
  375. {anthropic-0.57.1 → anthropic-0.58.1}/tests/api_resources/test_models.py +0 -0
  376. {anthropic-0.57.1 → anthropic-0.58.1}/tests/conftest.py +0 -0
  377. {anthropic-0.57.1 → anthropic-0.58.1}/tests/decoders/test_jsonl.py +0 -0
  378. {anthropic-0.57.1 → anthropic-0.58.1}/tests/lib/streaming/__init__.py +0 -0
  379. {anthropic-0.57.1 → anthropic-0.58.1}/tests/lib/streaming/fixtures/basic_response.txt +0 -0
  380. {anthropic-0.57.1 → anthropic-0.58.1}/tests/lib/streaming/fixtures/incomplete_partial_json_response.txt +0 -0
  381. {anthropic-0.57.1 → anthropic-0.58.1}/tests/lib/streaming/fixtures/tool_use_response.txt +0 -0
  382. {anthropic-0.57.1 → anthropic-0.58.1}/tests/lib/streaming/helpers.py +0 -0
  383. {anthropic-0.57.1 → anthropic-0.58.1}/tests/lib/streaming/test_beta_messages.py +0 -0
  384. {anthropic-0.57.1 → anthropic-0.58.1}/tests/lib/streaming/test_messages.py +0 -0
  385. {anthropic-0.57.1 → anthropic-0.58.1}/tests/lib/streaming/test_partial_json.py +0 -0
  386. {anthropic-0.57.1 → anthropic-0.58.1}/tests/lib/test_bedrock.py +0 -0
  387. {anthropic-0.57.1 → anthropic-0.58.1}/tests/lib/test_vertex.py +0 -0
  388. {anthropic-0.57.1 → anthropic-0.58.1}/tests/sample_file.txt +0 -0
  389. {anthropic-0.57.1 → anthropic-0.58.1}/tests/test_deepcopy.py +0 -0
  390. {anthropic-0.57.1 → anthropic-0.58.1}/tests/test_extract_files.py +0 -0
  391. {anthropic-0.57.1 → anthropic-0.58.1}/tests/test_files.py +0 -0
  392. {anthropic-0.57.1 → anthropic-0.58.1}/tests/test_legacy_response.py +0 -0
  393. {anthropic-0.57.1 → anthropic-0.58.1}/tests/test_qs.py +0 -0
  394. {anthropic-0.57.1 → anthropic-0.58.1}/tests/test_required_args.py +0 -0
  395. {anthropic-0.57.1 → anthropic-0.58.1}/tests/test_response.py +0 -0
  396. {anthropic-0.57.1 → anthropic-0.58.1}/tests/test_streaming.py +0 -0
  397. {anthropic-0.57.1 → anthropic-0.58.1}/tests/test_transform.py +0 -0
  398. {anthropic-0.57.1 → anthropic-0.58.1}/tests/test_utils/test_proxy.py +0 -0
  399. {anthropic-0.57.1 → anthropic-0.58.1}/tests/test_utils/test_typing.py +0 -0
  400. {anthropic-0.57.1 → anthropic-0.58.1}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.58.1"
3
+ }
@@ -1,5 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.58.1 (2025-07-18)
4
+
5
+ Full Changelog: [v0.58.0...v0.58.1](https://github.com/anthropics/anthropic-sdk-python/compare/v0.58.0...v0.58.1)
6
+
7
+ ### Chores
8
+
9
+ * **internal:** version bump ([31c3b38](https://github.com/anthropics/anthropic-sdk-python/commit/31c3b380e5ceab20789080c65cef9bd74e318a3e))
10
+
11
+ ## 0.58.0 (2025-07-18)
12
+
13
+ Full Changelog: [v0.57.1...v0.58.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.57.1...v0.58.0)
14
+
15
+ ### Features
16
+
17
+ * clean up environment call outs ([4f64e9c](https://github.com/anthropics/anthropic-sdk-python/commit/4f64e9c1bdb142bbcff2072baa709afdea348889))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **client:** don't send Content-Type header on GET requests ([727268f](https://github.com/anthropics/anthropic-sdk-python/commit/727268f2bd4cb42aa1472e1f0c6a92fd6a5cb122))
23
+ * **parsing:** correctly handle nested discriminated unions ([44dd47e](https://github.com/anthropics/anthropic-sdk-python/commit/44dd47e15ed91af912eac4791421e11504c3094b))
24
+
25
+
26
+ ### Chores
27
+
28
+ * **internal:** bump pinned h11 dep ([9a947e1](https://github.com/anthropics/anthropic-sdk-python/commit/9a947e1061021529937395758acb4d77b685a68b))
29
+ * **internal:** codegen related update ([33f2b34](https://github.com/anthropics/anthropic-sdk-python/commit/33f2b3468a971ca2ce6eb8b823b26d45092303f7))
30
+ * **internal:** version bump ([5f0f5ad](https://github.com/anthropics/anthropic-sdk-python/commit/5f0f5adba5392facf8331451c449513ae005a054))
31
+ * **package:** mark python 3.13 as supported ([703d557](https://github.com/anthropics/anthropic-sdk-python/commit/703d55747456a3825ba8c79cd492d6e64276dc15))
32
+ * **readme:** fix version rendering on pypi ([dd956a6](https://github.com/anthropics/anthropic-sdk-python/commit/dd956a616a45191398aac9061eaaa5f3b7cbf2f6))
33
+
34
+
35
+ ### Documentation
36
+
37
+ * model in examples ([89b6925](https://github.com/anthropics/anthropic-sdk-python/commit/89b69256dcbd107970d0763afc62f2cbf08e3d5a))
38
+ * model in examples ([1eccecb](https://github.com/anthropics/anthropic-sdk-python/commit/1eccecbec9e0c0cde748695e0cb1bc61ac8ffca5))
39
+
3
40
  ## 0.57.1 (2025-07-03)
4
41
 
5
42
  Full Changelog: [v0.57.0...v0.57.1](https://github.com/anthropics/anthropic-sdk-python/compare/v0.57.0...v0.57.1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: anthropic
3
- Version: 0.57.1
3
+ Version: 0.58.1
4
4
  Summary: The official Python library for the anthropic API
5
5
  Project-URL: Homepage, https://github.com/anthropics/anthropic-sdk-python
6
6
  Project-URL: Repository, https://github.com/anthropics/anthropic-sdk-python
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.9
18
18
  Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
21
22
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
23
  Classifier: Typing :: Typed
23
24
  Requires-Python: >=3.8
@@ -30,7 +31,7 @@ Requires-Dist: sniffio
30
31
  Requires-Dist: typing-extensions<5,>=4.10
31
32
  Provides-Extra: aiohttp
32
33
  Requires-Dist: aiohttp; extra == 'aiohttp'
33
- Requires-Dist: httpx-aiohttp>=0.1.6; extra == 'aiohttp'
34
+ Requires-Dist: httpx-aiohttp>=0.1.8; extra == 'aiohttp'
34
35
  Provides-Extra: bedrock
35
36
  Requires-Dist: boto3>=1.28.57; extra == 'bedrock'
36
37
  Requires-Dist: botocore>=1.31.57; extra == 'bedrock'
@@ -40,7 +41,8 @@ Description-Content-Type: text/markdown
40
41
 
41
42
  # Anthropic Python API library
42
43
 
43
- [![PyPI version](https://github.com/anthropics/anthropic-sdk-python/tree/main/<https://img.shields.io/pypi/v/anthropic.svg?label=pypi%20(stable)>)](https://pypi.org/project/anthropic/)
44
+ <!-- prettier-ignore -->
45
+ [![PyPI version](https://img.shields.io/pypi/v/anthropic.svg?label=pypi%20(stable))](https://pypi.org/project/anthropic/)
44
46
 
45
47
  The Anthropic Python library provides convenient access to the Anthropic REST API from any Python 3.8+
46
48
  application. It includes type definitions for all request params and response fields,
@@ -134,7 +136,6 @@ pip install anthropic[aiohttp]
134
136
  Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
135
137
 
136
138
  ```python
137
- import os
138
139
  import asyncio
139
140
  from anthropic import DefaultAioHttpClient
140
141
  from anthropic import AsyncAnthropic
@@ -142,7 +143,7 @@ from anthropic import AsyncAnthropic
142
143
 
143
144
  async def main() -> None:
144
145
  async with AsyncAnthropic(
145
- api_key=os.environ.get("ANTHROPIC_API_KEY"), # This is the default and can be omitted
146
+ api_key="my-anthropic-api-key",
146
147
  http_client=DefaultAioHttpClient(),
147
148
  ) as client:
148
149
  message = await client.messages.create(
@@ -329,7 +330,7 @@ message = client.messages.create(
329
330
  "content": "Hello!",
330
331
  }
331
332
  ],
332
- model="anthropic.claude-sonnet-4-20250514-v2:0",
333
+ model="anthropic.claude-sonnet-4-20250514-v1:0",
333
334
  )
334
335
  print(message)
335
336
  ```
@@ -1,6 +1,7 @@
1
1
  # Anthropic Python API library
2
2
 
3
- [![PyPI version](<https://img.shields.io/pypi/v/anthropic.svg?label=pypi%20(stable)>)](https://pypi.org/project/anthropic/)
3
+ <!-- prettier-ignore -->
4
+ [![PyPI version](https://img.shields.io/pypi/v/anthropic.svg?label=pypi%20(stable))](https://pypi.org/project/anthropic/)
4
5
 
5
6
  The Anthropic Python library provides convenient access to the Anthropic REST API from any Python 3.8+
6
7
  application. It includes type definitions for all request params and response fields,
@@ -94,7 +95,6 @@ pip install anthropic[aiohttp]
94
95
  Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
95
96
 
96
97
  ```python
97
- import os
98
98
  import asyncio
99
99
  from anthropic import DefaultAioHttpClient
100
100
  from anthropic import AsyncAnthropic
@@ -102,7 +102,7 @@ from anthropic import AsyncAnthropic
102
102
 
103
103
  async def main() -> None:
104
104
  async with AsyncAnthropic(
105
- api_key=os.environ.get("ANTHROPIC_API_KEY"), # This is the default and can be omitted
105
+ api_key="my-anthropic-api-key",
106
106
  http_client=DefaultAioHttpClient(),
107
107
  ) as client:
108
108
  message = await client.messages.create(
@@ -289,7 +289,7 @@ message = client.messages.create(
289
289
  "content": "Hello!",
290
290
  }
291
291
  ],
292
- model="anthropic.claude-sonnet-4-20250514-v2:0",
292
+ model="anthropic.claude-sonnet-4-20250514-v1:0",
293
293
  )
294
294
  print(message)
295
295
  ```
@@ -19,7 +19,7 @@ message = client.messages.create(
19
19
  "content": "Hello!",
20
20
  }
21
21
  ],
22
- model="anthropic.claude-3-sonnet-20240229-v1:0",
22
+ model="anthropic.claude-sonnet-4-20250514-v1:0",
23
23
  )
24
24
  print(message.model_dump_json(indent=2))
25
25
 
@@ -33,7 +33,7 @@ with client.messages.stream(
33
33
  "content": "Say hello there!",
34
34
  }
35
35
  ],
36
- model="anthropic.claude-3-sonnet-20240229-v1:0",
36
+ model="anthropic.claude-sonnet-4-20250514-v1:0",
37
37
  ) as stream:
38
38
  for text in stream.text_stream:
39
39
  print(text, end="", flush=True)
@@ -25,6 +25,6 @@ response = client.messages.create(
25
25
  ],
26
26
  },
27
27
  ],
28
- model="claude-3-5-sonnet-latest",
28
+ model="claude-sonnet-4-20250514",
29
29
  )
30
30
  print(response.model_dump_json(indent=2))
@@ -5,7 +5,7 @@ from anthropic import Anthropic
5
5
  anthropic = Anthropic()
6
6
 
7
7
  response = anthropic.beta.messages.create(
8
- model="claude-3-7-sonnet-20250219",
8
+ model="claude-sonnet-4-20250514",
9
9
  max_tokens=1000,
10
10
  messages=[
11
11
  {
@@ -10,7 +10,7 @@ response = client.messages.create(
10
10
  "content": "Hello!",
11
11
  }
12
12
  ],
13
- model="claude-3-5-sonnet-latest",
13
+ model="claude-sonnet-4-20250514",
14
14
  )
15
15
  print(response)
16
16
 
@@ -30,6 +30,6 @@ response2 = client.messages.create(
30
30
  "content": "How are you?",
31
31
  },
32
32
  ],
33
- model="claude-3-5-sonnet-latest",
33
+ model="claude-sonnet-4-20250514",
34
34
  )
35
35
  print(response2)
@@ -16,7 +16,7 @@ async def main() -> None:
16
16
  "content": "Say hello there!",
17
17
  }
18
18
  ],
19
- model="claude-3-5-sonnet-latest",
19
+ model="claude-sonnet-4-20250514",
20
20
  ) as stream:
21
21
  async for event in stream:
22
22
  if event.type == "text":
@@ -10,7 +10,7 @@ async def main() -> None:
10
10
  client = AsyncAnthropic()
11
11
 
12
12
  res = await client.completions.create(
13
- model="claude-2.1",
13
+ model="claude-sonnet-4-20250514",
14
14
  prompt=f"{anthropic.HUMAN_PROMPT} how does a court case get to the Supreme Court? {anthropic.AI_PROMPT}",
15
15
  max_tokens_to_sample=1000,
16
16
  )
@@ -8,7 +8,7 @@ def main() -> None:
8
8
  client = Anthropic()
9
9
 
10
10
  res = client.completions.create(
11
- model="claude-2.1",
11
+ model="claude-sonnet-4-20250514",
12
12
  prompt=f"{anthropic.HUMAN_PROMPT} how does a court case get to the Supreme Court? {anthropic.AI_PROMPT}",
13
13
  max_tokens_to_sample=1000,
14
14
  )
@@ -15,7 +15,7 @@ Hey Claude! How can I recursively list all files in a directory in Python?
15
15
  def sync_stream() -> None:
16
16
  stream = client.completions.create(
17
17
  prompt=f"{HUMAN_PROMPT} {question}{AI_PROMPT}",
18
- model="claude-2.1",
18
+ model="claude-sonnet-4-20250514",
19
19
  stream=True,
20
20
  max_tokens_to_sample=300,
21
21
  )
@@ -29,7 +29,7 @@ def sync_stream() -> None:
29
29
  async def async_stream() -> None:
30
30
  stream = await async_client.completions.create(
31
31
  prompt=f"{HUMAN_PROMPT} {question}{AI_PROMPT}",
32
- model="claude-2.1",
32
+ model="claude-sonnet-4-20250514",
33
33
  stream=True,
34
34
  max_tokens_to_sample=300,
35
35
  )
@@ -3,7 +3,7 @@ import anthropic
3
3
  client = anthropic.Anthropic()
4
4
 
5
5
  response = client.messages.create(
6
- model="claude-3-7-sonnet-20250219",
6
+ model="claude-sonnet-4-20250514",
7
7
  max_tokens=3200,
8
8
  thinking={"type": "enabled", "budget_tokens": 1600},
9
9
  messages=[{"role": "user", "content": "Create a haiku about Anthropic."}],
@@ -3,7 +3,7 @@ import anthropic
3
3
  client = anthropic.Anthropic()
4
4
 
5
5
  with client.messages.stream(
6
- model="claude-3-7-sonnet-20250219",
6
+ model="claude-sonnet-4-20250514",
7
7
  max_tokens=3200,
8
8
  thinking={"type": "enabled", "budget_tokens": 1600},
9
9
  messages=[{"role": "user", "content": "Create a haiku about Anthropic."}],
@@ -21,7 +21,7 @@ tools: list[ToolParam] = [
21
21
  ]
22
22
 
23
23
  message = client.messages.create(
24
- model="claude-3-5-sonnet-latest",
24
+ model="claude-sonnet-4-20250514",
25
25
  max_tokens=1024,
26
26
  messages=[user_message],
27
27
  tools=tools,
@@ -32,7 +32,7 @@ assert message.stop_reason == "tool_use"
32
32
 
33
33
  tool = next(c for c in message.content if c.type == "tool_use")
34
34
  response = client.messages.create(
35
- model="claude-3-5-sonnet-latest",
35
+ model="claude-sonnet-4-20250514",
36
36
  max_tokens=1024,
37
37
  messages=[
38
38
  user_message,
@@ -8,7 +8,7 @@ client = AsyncAnthropic()
8
8
  async def main() -> None:
9
9
  async with client.messages.stream(
10
10
  max_tokens=1024,
11
- model="claude-3-5-sonnet-latest",
11
+ model="claude-sonnet-4-20250514",
12
12
  tools=[
13
13
  {
14
14
  "name": "get_weather",
@@ -9,7 +9,7 @@ def sync_client() -> None:
9
9
  client = AnthropicVertex()
10
10
 
11
11
  message = client.messages.create(
12
- model="claude-3-sonnet@20240229",
12
+ model="claude-sonnet-4@20250514",
13
13
  max_tokens=100,
14
14
  messages=[
15
15
  {
@@ -27,7 +27,7 @@ async def async_client() -> None:
27
27
  client = AsyncAnthropicVertex()
28
28
 
29
29
  message = await client.messages.create(
30
- model="claude-3-sonnet@20240229",
30
+ model="claude-sonnet-4@20250514",
31
31
  max_tokens=1024,
32
32
  messages=[
33
33
  {
@@ -6,7 +6,7 @@ client = Anthropic()
6
6
 
7
7
  # Create a message with web search enabled
8
8
  message = client.messages.create(
9
- model="claude-3-5-sonnet-latest",
9
+ model="claude-sonnet-4-20250514",
10
10
  max_tokens=1024,
11
11
  messages=[{"role": "user", "content": "What's the weather in New York?"}],
12
12
  tools=[
@@ -11,7 +11,7 @@ async def main() -> None:
11
11
 
12
12
  # Create an async stream with web search enabled
13
13
  async with client.beta.messages.stream(
14
- model="claude-3-5-sonnet-latest",
14
+ model="claude-sonnet-4-20250514",
15
15
  max_tokens=1024,
16
16
  messages=[{"role": "user", "content": "What's the weather in New York?"}],
17
17
  tools=[
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "anthropic"
3
- version = "0.57.1"
3
+ version = "0.58.1"
4
4
  description = "The official Python library for the anthropic API"
5
5
  dynamic = ["readme"]
6
6
  license = "MIT"
@@ -25,6 +25,7 @@ classifiers = [
25
25
  "Programming Language :: Python :: 3.10",
26
26
  "Programming Language :: Python :: 3.11",
27
27
  "Programming Language :: Python :: 3.12",
28
+ "Programming Language :: Python :: 3.13",
28
29
  "Operating System :: OS Independent",
29
30
  "Operating System :: POSIX",
30
31
  "Operating System :: MacOS",
@@ -35,7 +36,7 @@ classifiers = [
35
36
  ]
36
37
 
37
38
  [project.optional-dependencies]
38
- aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.6"]
39
+ aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
39
40
  vertex = ["google-auth[requests] >=2, <3"]
40
41
  bedrock = ["boto3 >= 1.28.57", "botocore >= 1.31.57"]
41
42
 
@@ -11,8 +11,10 @@ anyio==4.8.0 ; python_full_version >= '3.9'
11
11
  # via
12
12
  # anthropic
13
13
  # httpx
14
- boto3-stubs==1.38.42
15
- botocore-stubs==1.38.30
14
+ boto3-stubs==1.39.4
15
+ botocore-stubs==1.38.30 ; python_full_version < '3.9'
16
+ # via boto3-stubs
17
+ botocore-stubs==1.38.46 ; python_full_version >= '3.9'
16
18
  # via boto3-stubs
17
19
  certifi==2024.12.14
18
20
  # via
@@ -29,9 +31,9 @@ exceptiongroup==1.2.2 ; python_full_version < '3.11'
29
31
  # pytest
30
32
  execnet==2.1.1
31
33
  # via pytest-xdist
32
- h11==0.14.0
34
+ h11==0.16.0
33
35
  # via httpcore
34
- httpcore==1.0.7
36
+ httpcore==1.0.9
35
37
  # via httpx
36
38
  httpx==0.28.1
37
39
  # via
@@ -96,7 +98,7 @@ tomli==2.2.1 ; python_full_version < '3.11'
96
98
  # via
97
99
  # mypy
98
100
  # pytest
99
- types-awscrt==0.27.2
101
+ types-awscrt==0.27.4
100
102
  # via botocore-stubs
101
103
  types-s3transfer==0.13.0
102
104
  # via boto3-stubs
@@ -542,6 +542,15 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
542
542
  # work around https://github.com/encode/httpx/discussions/2880
543
543
  kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
544
544
 
545
+ is_body_allowed = options.method.lower() != "get"
546
+
547
+ if is_body_allowed:
548
+ kwargs["json"] = json_data if is_given(json_data) else None
549
+ kwargs["files"] = files
550
+ else:
551
+ headers.pop("Content-Type", None)
552
+ kwargs.pop("data", None)
553
+
545
554
  # TODO: report this error to httpx
546
555
  return self._client.build_request( # pyright: ignore[reportUnknownMemberType]
547
556
  headers=headers,
@@ -553,8 +562,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
553
562
  # so that passing a `TypedDict` doesn't cause an error.
554
563
  # https://github.com/microsoft/pyright/issues/3526#event-6715453066
555
564
  params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
556
- json=json_data if is_given(json_data) else None,
557
- files=files,
558
565
  **kwargs,
559
566
  )
560
567
 
@@ -5,6 +5,7 @@ import inspect
5
5
  from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
6
6
  from datetime import date, datetime
7
7
  from typing_extensions import (
8
+ List,
8
9
  Unpack,
9
10
  Literal,
10
11
  ClassVar,
@@ -382,7 +383,7 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object:
382
383
  if type_ is None:
383
384
  raise RuntimeError(f"Unexpected field type is None for {key}")
384
385
 
385
- return construct_type(value=value, type_=type_)
386
+ return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None))
386
387
 
387
388
 
388
389
  def is_basemodel(type_: type) -> bool:
@@ -436,7 +437,7 @@ def construct_type_unchecked(*, value: object, type_: type[_T]) -> _T:
436
437
  return cast(_T, construct_type(value=value, type_=type_))
437
438
 
438
439
 
439
- def construct_type(*, value: object, type_: object) -> object:
440
+ def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]] = None) -> object:
440
441
  """Loose coercion to the expected type with construction of nested values.
441
442
 
442
443
  If the given value does not match the expected type then it is returned as-is.
@@ -454,8 +455,10 @@ def construct_type(*, value: object, type_: object) -> object:
454
455
  type_ = type_.__value__ # type: ignore[unreachable]
455
456
 
456
457
  # unwrap `Annotated[T, ...]` -> `T`
457
- if is_annotated_type(type_):
458
- meta: tuple[Any, ...] = get_args(type_)[1:]
458
+ if metadata is not None:
459
+ meta: tuple[Any, ...] = tuple(metadata)
460
+ elif is_annotated_type(type_):
461
+ meta = get_args(type_)[1:]
459
462
  type_ = extract_type_arg(type_, 0)
460
463
  else:
461
464
  meta = tuple()
@@ -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.57.1" # x-release-please-version
4
+ __version__ = "0.58.1" # x-release-please-version
@@ -472,7 +472,7 @@ class TestAnthropic:
472
472
  def test_multipart_repeating_array(self, client: Anthropic) -> None:
473
473
  request = client._build_request(
474
474
  FinalRequestOptions.construct(
475
- method="get",
475
+ method="post",
476
476
  url="/foo",
477
477
  headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
478
478
  json_data={"array": ["foo", "bar"]},
@@ -1370,7 +1370,7 @@ class TestAsyncAnthropic:
1370
1370
  def test_multipart_repeating_array(self, async_client: AsyncAnthropic) -> None:
1371
1371
  request = async_client._build_request(
1372
1372
  FinalRequestOptions.construct(
1373
- method="get",
1373
+ method="post",
1374
1374
  url="/foo",
1375
1375
  headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
1376
1376
  json_data={"array": ["foo", "bar"]},
@@ -889,3 +889,48 @@ def test_discriminated_union_case() -> None:
889
889
  )
890
890
 
891
891
  assert isinstance(m, ModelB)
892
+
893
+
894
+ def test_nested_discriminated_union() -> None:
895
+ class InnerType1(BaseModel):
896
+ type: Literal["type_1"]
897
+
898
+ class InnerModel(BaseModel):
899
+ inner_value: str
900
+
901
+ class InnerType2(BaseModel):
902
+ type: Literal["type_2"]
903
+ some_inner_model: InnerModel
904
+
905
+ class Type1(BaseModel):
906
+ base_type: Literal["base_type_1"]
907
+ value: Annotated[
908
+ Union[
909
+ InnerType1,
910
+ InnerType2,
911
+ ],
912
+ PropertyInfo(discriminator="type"),
913
+ ]
914
+
915
+ class Type2(BaseModel):
916
+ base_type: Literal["base_type_2"]
917
+
918
+ T = Annotated[
919
+ Union[
920
+ Type1,
921
+ Type2,
922
+ ],
923
+ PropertyInfo(discriminator="base_type"),
924
+ ]
925
+
926
+ model = construct_type(
927
+ type_=T,
928
+ value={
929
+ "base_type": "base_type_1",
930
+ "value": {
931
+ "type": "type_2",
932
+ },
933
+ },
934
+ )
935
+ assert isinstance(model, Type1)
936
+ assert isinstance(model.value, InnerType2)