anthropic-sdk-beta 0.1.0.pre.beta.6 → 0.1.0.pre.beta.7
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.
- checksums.yaml +4 -4
- data/.ignore +2 -0
- data/CHANGELOG.md +88 -0
- data/README.md +171 -126
- data/lib/anthropic/bedrock.rb +5 -0
- data/lib/anthropic/client.rb +7 -6
- data/lib/anthropic/errors.rb +10 -10
- data/lib/anthropic/file_part.rb +55 -0
- data/lib/anthropic/helpers/bedrock/client.rb +259 -0
- data/lib/anthropic/helpers/vertex/client.rb +218 -0
- data/lib/anthropic/internal/page.rb +28 -38
- data/lib/anthropic/internal/transport/base_client.rb +104 -19
- data/lib/anthropic/internal/transport/pooled_net_requester.rb +20 -4
- data/lib/anthropic/internal/type/array_of.rb +28 -2
- data/lib/anthropic/internal/type/base_model.rb +125 -31
- data/lib/anthropic/internal/type/base_page.rb +10 -1
- data/lib/anthropic/internal/type/base_stream.rb +19 -2
- data/lib/anthropic/internal/type/boolean.rb +16 -11
- data/lib/anthropic/internal/type/converter.rb +46 -1
- data/lib/anthropic/internal/type/enum.rb +43 -23
- data/lib/anthropic/internal/type/{io_like.rb → file_input.rb} +36 -15
- data/lib/anthropic/internal/type/hash_of.rb +28 -2
- data/lib/anthropic/internal/type/request_parameters.rb +7 -14
- data/lib/anthropic/internal/type/union.rb +32 -8
- data/lib/anthropic/internal/type/unknown.rb +16 -11
- data/lib/anthropic/internal/util.rb +180 -73
- data/lib/anthropic/internal.rb +11 -2
- data/lib/anthropic/models/anthropic_beta.rb +14 -11
- data/lib/anthropic/models/api_error_object.rb +3 -7
- data/lib/anthropic/models/authentication_error.rb +3 -7
- data/lib/anthropic/models/base64_image_source.rb +9 -16
- data/lib/anthropic/models/base64_pdf_source.rb +4 -8
- data/lib/anthropic/models/beta/beta_base64_image_source.rb +9 -16
- data/lib/anthropic/models/beta/beta_base64_pdf_block.rb +38 -30
- data/lib/anthropic/models/beta/beta_base64_pdf_source.rb +4 -8
- data/lib/anthropic/models/beta/beta_cache_control_ephemeral.rb +2 -6
- data/lib/anthropic/models/beta/beta_citation_char_location.rb +7 -21
- data/lib/anthropic/models/beta/beta_citation_char_location_param.rb +7 -21
- data/lib/anthropic/models/beta/beta_citation_content_block_location.rb +7 -21
- data/lib/anthropic/models/beta/beta_citation_content_block_location_param.rb +7 -21
- data/lib/anthropic/models/beta/beta_citation_page_location.rb +7 -21
- data/lib/anthropic/models/beta/beta_citation_page_location_param.rb +7 -21
- data/lib/anthropic/models/beta/beta_citation_web_search_result_location_param.rb +43 -0
- data/lib/anthropic/models/beta/beta_citations_config_param.rb +3 -11
- data/lib/anthropic/models/beta/beta_citations_delta.rb +24 -16
- data/lib/anthropic/models/beta/beta_citations_web_search_result_location.rb +43 -0
- data/lib/anthropic/models/beta/beta_content_block.rb +23 -7
- data/lib/anthropic/models/beta/beta_content_block_param.rb +29 -10
- data/lib/anthropic/models/beta/beta_content_block_source.rb +23 -15
- data/lib/anthropic/models/beta/beta_content_block_source_content.rb +8 -5
- data/lib/anthropic/models/beta/beta_image_block_param.rb +22 -18
- data/lib/anthropic/models/beta/beta_input_json_delta.rb +3 -7
- data/lib/anthropic/models/beta/beta_message.rb +27 -22
- data/lib/anthropic/models/beta/beta_message_delta_usage.rb +33 -5
- data/lib/anthropic/models/beta/beta_message_param.rb +37 -23
- data/lib/anthropic/models/beta/beta_message_tokens_count.rb +5 -6
- data/lib/anthropic/models/beta/beta_metadata.rb +5 -6
- data/lib/anthropic/models/beta/beta_model_info.rb +11 -9
- data/lib/anthropic/models/beta/beta_plain_text_source.rb +4 -8
- data/lib/anthropic/models/beta/beta_raw_content_block_delta.rb +19 -8
- data/lib/anthropic/models/beta/beta_raw_content_block_delta_event.rb +6 -10
- data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +30 -19
- data/lib/anthropic/models/beta/beta_raw_content_block_stop_event.rb +3 -7
- data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +19 -22
- data/lib/anthropic/models/beta/beta_raw_message_start_event.rb +5 -9
- data/lib/anthropic/models/beta/beta_raw_message_stop_event.rb +2 -6
- data/lib/anthropic/models/beta/beta_raw_message_stream_event.rb +21 -9
- data/lib/anthropic/models/beta/beta_redacted_thinking_block.rb +3 -7
- data/lib/anthropic/models/beta/beta_redacted_thinking_block_param.rb +3 -7
- data/lib/anthropic/models/beta/beta_server_tool_usage.rb +20 -0
- data/lib/anthropic/models/beta/beta_server_tool_use_block.rb +37 -0
- data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +48 -0
- data/lib/anthropic/models/beta/beta_signature_delta.rb +3 -7
- data/lib/anthropic/models/beta/beta_stop_reason.rb +4 -5
- data/lib/anthropic/models/beta/beta_text_block.rb +11 -10
- data/lib/anthropic/models/beta/beta_text_block_param.rb +13 -13
- data/lib/anthropic/models/beta/beta_text_citation.rb +18 -6
- data/lib/anthropic/models/beta/beta_text_citation_param.rb +18 -6
- data/lib/anthropic/models/beta/beta_text_delta.rb +3 -7
- data/lib/anthropic/models/beta/beta_thinking_block.rb +4 -8
- data/lib/anthropic/models/beta/beta_thinking_block_param.rb +4 -8
- data/lib/anthropic/models/beta/beta_thinking_config_disabled.rb +2 -6
- data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +7 -7
- data/lib/anthropic/models/beta/beta_thinking_config_param.rb +10 -5
- data/lib/anthropic/models/beta/beta_thinking_delta.rb +3 -7
- data/lib/anthropic/models/beta/beta_tool.rb +34 -41
- data/lib/anthropic/models/beta/beta_tool_bash_20241022.rb +13 -11
- data/lib/anthropic/models/beta/beta_tool_bash_20250124.rb +13 -11
- data/lib/anthropic/models/beta/beta_tool_choice.rb +18 -8
- data/lib/anthropic/models/beta/beta_tool_choice_any.rb +10 -14
- data/lib/anthropic/models/beta/beta_tool_choice_auto.rb +10 -14
- data/lib/anthropic/models/beta/beta_tool_choice_none.rb +4 -8
- data/lib/anthropic/models/beta/beta_tool_choice_tool.rb +12 -15
- data/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb +19 -24
- data/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rb +19 -24
- data/lib/anthropic/models/beta/beta_tool_result_block_param.rb +47 -35
- data/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rb +13 -11
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rb +13 -11
- data/lib/anthropic/models/beta/beta_tool_union.rb +26 -10
- data/lib/anthropic/models/beta/beta_tool_use_block.rb +5 -9
- data/lib/anthropic/models/beta/beta_tool_use_block_param.rb +13 -12
- data/lib/anthropic/models/beta/beta_url_image_source.rb +3 -7
- data/lib/anthropic/models/beta/beta_url_pdf_source.rb +3 -7
- data/lib/anthropic/models/beta/beta_usage.rb +15 -8
- data/lib/anthropic/models/beta/beta_web_search_result_block.rb +43 -0
- data/lib/anthropic/models/beta/beta_web_search_result_block_param.rb +43 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_20250305.rb +126 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_request_error.rb +39 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_result_block.rb +31 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_result_block_content.rb +33 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_result_block_param.rb +41 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_result_block_param_content.rb +35 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_result_error.rb +39 -0
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +80 -84
- data/lib/anthropic/models/beta/message_create_params.rb +71 -111
- data/lib/anthropic/models/beta/messages/batch_cancel_params.rb +8 -16
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +105 -140
- data/lib/anthropic/models/beta/messages/batch_delete_params.rb +8 -16
- data/lib/anthropic/models/beta/messages/batch_list_params.rb +20 -34
- data/lib/anthropic/models/beta/messages/batch_results_params.rb +8 -16
- data/lib/anthropic/models/beta/messages/batch_retrieve_params.rb +8 -16
- data/lib/anthropic/models/beta/messages/beta_deleted_message_batch.rb +7 -7
- data/lib/anthropic/models/beta/messages/beta_message_batch.rb +32 -39
- data/lib/anthropic/models/beta/messages/beta_message_batch_canceled_result.rb +2 -6
- data/lib/anthropic/models/beta/messages/beta_message_batch_errored_result.rb +5 -9
- data/lib/anthropic/models/beta/messages/beta_message_batch_expired_result.rb +2 -6
- data/lib/anthropic/models/beta/messages/beta_message_batch_individual_response.rb +13 -12
- data/lib/anthropic/models/beta/messages/beta_message_batch_request_counts.rb +13 -10
- data/lib/anthropic/models/beta/messages/beta_message_batch_result.rb +17 -7
- data/lib/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rb +5 -9
- data/lib/anthropic/models/beta/model_list_params.rb +22 -25
- data/lib/anthropic/models/beta/model_retrieve_params.rb +10 -7
- data/lib/anthropic/models/beta_api_error.rb +3 -7
- data/lib/anthropic/models/beta_authentication_error.rb +3 -7
- data/lib/anthropic/models/beta_billing_error.rb +3 -7
- data/lib/anthropic/models/beta_error.rb +27 -12
- data/lib/anthropic/models/beta_error_response.rb +5 -9
- data/lib/anthropic/models/beta_gateway_timeout_error.rb +3 -7
- data/lib/anthropic/models/beta_invalid_request_error.rb +3 -7
- data/lib/anthropic/models/beta_not_found_error.rb +3 -7
- data/lib/anthropic/models/beta_overloaded_error.rb +3 -7
- data/lib/anthropic/models/beta_permission_error.rb +3 -7
- data/lib/anthropic/models/beta_rate_limit_error.rb +3 -7
- data/lib/anthropic/models/billing_error.rb +3 -7
- data/lib/anthropic/models/cache_control_ephemeral.rb +2 -6
- data/lib/anthropic/models/citation_char_location.rb +7 -21
- data/lib/anthropic/models/citation_char_location_param.rb +7 -21
- data/lib/anthropic/models/citation_content_block_location.rb +7 -21
- data/lib/anthropic/models/citation_content_block_location_param.rb +7 -21
- data/lib/anthropic/models/citation_page_location.rb +7 -21
- data/lib/anthropic/models/citation_page_location_param.rb +7 -21
- data/lib/anthropic/models/citation_web_search_result_location_param.rb +39 -0
- data/lib/anthropic/models/citations_config_param.rb +3 -11
- data/lib/anthropic/models/citations_delta.rb +24 -16
- data/lib/anthropic/models/citations_web_search_result_location.rb +39 -0
- data/lib/anthropic/models/completion.rb +15 -12
- data/lib/anthropic/models/completion_create_params.rb +38 -57
- data/lib/anthropic/models/content_block.rb +23 -7
- data/lib/anthropic/models/content_block_param.rb +29 -10
- data/lib/anthropic/models/content_block_source.rb +17 -15
- data/lib/anthropic/models/content_block_source_content.rb +8 -5
- data/lib/anthropic/models/document_block_param.rb +38 -30
- data/lib/anthropic/models/error_object.rb +27 -12
- data/lib/anthropic/models/error_response.rb +5 -9
- data/lib/anthropic/models/gateway_timeout_error.rb +3 -7
- data/lib/anthropic/models/image_block_param.rb +20 -18
- data/lib/anthropic/models/input_json_delta.rb +3 -7
- data/lib/anthropic/models/invalid_request_error.rb +3 -7
- data/lib/anthropic/models/message.rb +27 -21
- data/lib/anthropic/models/message_count_tokens_params.rb +45 -52
- data/lib/anthropic/models/message_count_tokens_tool.rb +18 -6
- data/lib/anthropic/models/message_create_params.rb +64 -101
- data/lib/anthropic/models/message_delta_usage.rb +33 -5
- data/lib/anthropic/models/message_param.rb +39 -24
- data/lib/anthropic/models/message_tokens_count.rb +5 -6
- data/lib/anthropic/models/messages/batch_cancel_params.rb +3 -8
- data/lib/anthropic/models/messages/batch_create_params.rb +92 -131
- data/lib/anthropic/models/messages/batch_delete_params.rb +3 -8
- data/lib/anthropic/models/messages/batch_list_params.rb +15 -26
- data/lib/anthropic/models/messages/batch_results_params.rb +3 -8
- data/lib/anthropic/models/messages/batch_retrieve_params.rb +3 -8
- data/lib/anthropic/models/messages/deleted_message_batch.rb +7 -7
- data/lib/anthropic/models/messages/message_batch.rb +30 -39
- data/lib/anthropic/models/messages/message_batch_canceled_result.rb +2 -6
- data/lib/anthropic/models/messages/message_batch_errored_result.rb +5 -9
- data/lib/anthropic/models/messages/message_batch_expired_result.rb +2 -6
- data/lib/anthropic/models/messages/message_batch_individual_response.rb +12 -12
- data/lib/anthropic/models/messages/message_batch_request_counts.rb +13 -10
- data/lib/anthropic/models/messages/message_batch_result.rb +17 -7
- data/lib/anthropic/models/messages/message_batch_succeeded_result.rb +5 -9
- data/lib/anthropic/models/metadata.rb +5 -6
- data/lib/anthropic/models/model.rb +19 -16
- data/lib/anthropic/models/model_info.rb +11 -9
- data/lib/anthropic/models/model_list_params.rb +22 -25
- data/lib/anthropic/models/model_retrieve_params.rb +10 -7
- data/lib/anthropic/models/not_found_error.rb +3 -7
- data/lib/anthropic/models/overloaded_error.rb +3 -7
- data/lib/anthropic/models/permission_error.rb +3 -7
- data/lib/anthropic/models/plain_text_source.rb +4 -8
- data/lib/anthropic/models/rate_limit_error.rb +3 -7
- data/lib/anthropic/models/raw_content_block_delta.rb +19 -8
- data/lib/anthropic/models/raw_content_block_delta_event.rb +6 -10
- data/lib/anthropic/models/raw_content_block_start_event.rb +30 -18
- data/lib/anthropic/models/raw_content_block_stop_event.rb +3 -7
- data/lib/anthropic/models/raw_message_delta_event.rb +19 -22
- data/lib/anthropic/models/raw_message_start_event.rb +5 -9
- data/lib/anthropic/models/raw_message_stop_event.rb +2 -6
- data/lib/anthropic/models/raw_message_stream_event.rb +21 -9
- data/lib/anthropic/models/redacted_thinking_block.rb +3 -7
- data/lib/anthropic/models/redacted_thinking_block_param.rb +3 -7
- data/lib/anthropic/models/server_tool_usage.rb +16 -0
- data/lib/anthropic/models/server_tool_use_block.rb +33 -0
- data/lib/anthropic/models/server_tool_use_block_param.rb +44 -0
- data/lib/anthropic/models/signature_delta.rb +3 -7
- data/lib/anthropic/models/stop_reason.rb +4 -5
- data/lib/anthropic/models/text_block.rb +13 -10
- data/lib/anthropic/models/text_block_param.rb +13 -13
- data/lib/anthropic/models/text_citation.rb +18 -6
- data/lib/anthropic/models/text_citation_param.rb +18 -6
- data/lib/anthropic/models/text_delta.rb +3 -7
- data/lib/anthropic/models/thinking_block.rb +4 -8
- data/lib/anthropic/models/thinking_block_param.rb +4 -8
- data/lib/anthropic/models/thinking_config_disabled.rb +2 -6
- data/lib/anthropic/models/thinking_config_enabled.rb +7 -7
- data/lib/anthropic/models/thinking_config_param.rb +8 -5
- data/lib/anthropic/models/thinking_delta.rb +3 -7
- data/lib/anthropic/models/tool.rb +42 -30
- data/lib/anthropic/models/tool_bash_20250124.rb +13 -11
- data/lib/anthropic/models/tool_choice.rb +17 -7
- data/lib/anthropic/models/tool_choice_any.rb +10 -14
- data/lib/anthropic/models/tool_choice_auto.rb +10 -14
- data/lib/anthropic/models/tool_choice_none.rb +4 -8
- data/lib/anthropic/models/tool_choice_tool.rb +12 -15
- data/lib/anthropic/models/tool_result_block_param.rb +37 -35
- data/lib/anthropic/models/tool_text_editor_20250124.rb +13 -11
- data/lib/anthropic/models/tool_union.rb +18 -6
- data/lib/anthropic/models/tool_use_block.rb +5 -9
- data/lib/anthropic/models/tool_use_block_param.rb +13 -12
- data/lib/anthropic/models/url_image_source.rb +3 -7
- data/lib/anthropic/models/url_pdf_source.rb +3 -7
- data/lib/anthropic/models/usage.rb +15 -8
- data/lib/anthropic/models/web_search_result_block.rb +39 -0
- data/lib/anthropic/models/web_search_result_block_param.rb +39 -0
- data/lib/anthropic/models/web_search_tool_20250305.rb +122 -0
- data/lib/anthropic/models/web_search_tool_request_error.rb +35 -0
- data/lib/anthropic/models/web_search_tool_result_block.rb +27 -0
- data/lib/anthropic/models/web_search_tool_result_block_content.rb +23 -0
- data/lib/anthropic/models/web_search_tool_result_block_param.rb +37 -0
- data/lib/anthropic/models/web_search_tool_result_block_param_content.rb +26 -0
- data/lib/anthropic/models/web_search_tool_result_error.rb +35 -0
- data/lib/anthropic/models.rb +250 -0
- data/lib/anthropic/request_options.rb +8 -6
- data/lib/anthropic/resources/beta/messages/batches.rb +58 -38
- data/lib/anthropic/resources/beta/messages.rb +86 -44
- data/lib/anthropic/resources/beta/models.rb +28 -13
- data/lib/anthropic/resources/completions.rb +61 -29
- data/lib/anthropic/resources/messages/batches.rb +36 -22
- data/lib/anthropic/resources/messages.rb +80 -41
- data/lib/anthropic/resources/models.rb +28 -13
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic/vertex.rb +5 -0
- data/lib/anthropic.rb +37 -12
- data/rbi/anthropic/bedrock.rbi +5 -0
- data/rbi/{lib/anthropic → anthropic}/client.rbi +16 -12
- data/rbi/{lib/anthropic → anthropic}/errors.rbi +34 -15
- data/rbi/anthropic/file_part.rbi +37 -0
- data/rbi/anthropic/helpers/bedrock/client.rbi +82 -0
- data/rbi/anthropic/helpers/vertex/client.rbi +58 -0
- data/rbi/{lib/anthropic → anthropic}/internal/jsonl_stream.rbi +3 -2
- data/rbi/{lib/anthropic → anthropic}/internal/page.rbi +3 -1
- data/rbi/{lib/anthropic → anthropic}/internal/stream.rbi +6 -2
- data/rbi/anthropic/internal/transport/base_client.rbi +310 -0
- data/rbi/{lib/anthropic → anthropic}/internal/transport/pooled_net_requester.rbi +32 -13
- data/rbi/anthropic/internal/type/array_of.rbi +98 -0
- data/rbi/anthropic/internal/type/base_model.rbi +299 -0
- data/rbi/{lib/anthropic → anthropic}/internal/type/base_page.rbi +14 -8
- data/rbi/{lib/anthropic → anthropic}/internal/type/base_stream.rbi +27 -10
- data/rbi/anthropic/internal/type/boolean.rbi +50 -0
- data/rbi/{lib/anthropic → anthropic}/internal/type/converter.rbi +76 -26
- data/rbi/{lib/anthropic → anthropic}/internal/type/enum.rbi +33 -19
- data/rbi/{lib/anthropic/internal/type/io_like.rbi → anthropic/internal/type/file_input.rbi} +18 -11
- data/rbi/anthropic/internal/type/hash_of.rbi +98 -0
- data/rbi/anthropic/internal/type/request_parameters.rbi +29 -0
- data/rbi/anthropic/internal/type/union.rbi +111 -0
- data/rbi/anthropic/internal/type/unknown.rbi +50 -0
- data/rbi/anthropic/internal/util.rbi +451 -0
- data/rbi/{lib/anthropic → anthropic}/internal.rbi +3 -2
- data/rbi/anthropic/models/anthropic_beta.rbi +54 -0
- data/rbi/{lib/anthropic → anthropic}/models/api_error_object.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/authentication_error.rbi +10 -3
- data/rbi/anthropic/models/base64_image_source.rbi +82 -0
- data/rbi/anthropic/models/base64_pdf_source.rbi +35 -0
- data/rbi/anthropic/models/beta/beta_base64_image_source.rbi +95 -0
- data/rbi/anthropic/models/beta/beta_base64_pdf_block.rbi +134 -0
- data/rbi/anthropic/models/beta/beta_base64_pdf_source.rbi +42 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_cache_control_ephemeral.rbi +15 -5
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_char_location.rbi +23 -16
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_char_location_param.rbi +23 -16
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_content_block_location.rbi +26 -17
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_content_block_location_param.rbi +27 -17
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_page_location.rbi +23 -16
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_page_location_param.rbi +23 -16
- data/rbi/anthropic/models/beta/beta_citation_web_search_result_location_param.rbi +67 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citations_config_param.rbi +15 -5
- data/rbi/anthropic/models/beta/beta_citations_delta.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_citations_web_search_result_location.rbi +67 -0
- data/rbi/anthropic/models/beta/beta_content_block.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_content_block_param.rbi +36 -0
- data/rbi/anthropic/models/beta/beta_content_block_source.rbi +110 -0
- data/rbi/anthropic/models/beta/beta_content_block_source_content.rbi +29 -0
- data/rbi/anthropic/models/beta/beta_image_block_param.rbi +101 -0
- data/rbi/anthropic/models/beta/beta_input_json_delta.rbi +35 -0
- data/rbi/anthropic/models/beta/beta_message.rbi +268 -0
- data/rbi/anthropic/models/beta/beta_message_delta_usage.rbi +85 -0
- data/rbi/anthropic/models/beta/beta_message_param.rbi +162 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_message_tokens_count.rbi +19 -5
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_metadata.rbi +19 -5
- data/rbi/anthropic/models/beta/beta_model_info.rbi +66 -0
- data/rbi/anthropic/models/beta/beta_plain_text_source.rbi +42 -0
- data/rbi/anthropic/models/beta/beta_raw_content_block_delta.rbi +32 -0
- data/rbi/anthropic/models/beta/beta_raw_content_block_delta_event.rbi +74 -0
- data/rbi/anthropic/models/beta/beta_raw_content_block_start_event.rbi +103 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_raw_content_block_stop_event.rbi +15 -5
- data/rbi/anthropic/models/beta/beta_raw_message_delta_event.rbi +135 -0
- data/rbi/anthropic/models/beta/beta_raw_message_start_event.rbi +45 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_raw_message_stop_event.rbi +15 -5
- data/rbi/anthropic/models/beta/beta_raw_message_stream_event.rbi +33 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_redacted_thinking_block.rbi +15 -5
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_redacted_thinking_block_param.rbi +15 -5
- data/rbi/anthropic/models/beta/beta_server_tool_usage.rbi +34 -0
- data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +50 -0
- data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +78 -0
- data/rbi/anthropic/models/beta/beta_signature_delta.rbi +35 -0
- data/rbi/anthropic/models/beta/beta_stop_reason.rbi +37 -0
- data/rbi/anthropic/models/beta/beta_text_block.rbi +94 -0
- data/rbi/anthropic/models/beta/beta_text_block_param.rbi +105 -0
- data/rbi/anthropic/models/beta/beta_text_citation.rbi +31 -0
- data/rbi/anthropic/models/beta/beta_text_citation_param.rbi +31 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_text_delta.rbi +12 -5
- data/rbi/anthropic/models/beta/beta_thinking_block.rbi +44 -0
- data/rbi/anthropic/models/beta/beta_thinking_block_param.rbi +44 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_thinking_config_disabled.rbi +15 -5
- data/rbi/anthropic/models/beta/beta_thinking_config_enabled.rbi +56 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_thinking_config_param.rbi +15 -7
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_thinking_delta.rbi +15 -5
- data/rbi/anthropic/models/beta/beta_tool.rbi +165 -0
- data/rbi/anthropic/models/beta/beta_tool_bash_20241022.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_tool_bash_20250124.rbi +72 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_tool_choice.rbi +15 -7
- data/rbi/anthropic/models/beta/beta_tool_choice_any.rbi +56 -0
- data/rbi/anthropic/models/beta/beta_tool_choice_auto.rbi +56 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_tool_choice_none.rbi +15 -5
- data/rbi/anthropic/models/beta/beta_tool_choice_tool.rbi +68 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_tool_computer_use_20241022.rbi +42 -23
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_tool_computer_use_20250124.rbi +42 -23
- data/rbi/anthropic/models/beta/beta_tool_result_block_param.rbi +187 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20241022.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250124.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_tool_union.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_tool_use_block.rbi +50 -0
- data/rbi/anthropic/models/beta/beta_tool_use_block_param.rbi +78 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_url_image_source.rbi +15 -5
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_url_pdf_source.rbi +15 -5
- data/rbi/anthropic/models/beta/beta_usage.rbi +82 -0
- data/rbi/anthropic/models/beta/beta_web_search_result_block.rbi +66 -0
- data/rbi/anthropic/models/beta/beta_web_search_result_block_param.rbi +66 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_20250305.rbi +201 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_request_error.rbi +100 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_result_block.rbi +65 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_result_block_content.rbi +40 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_result_block_param.rbi +89 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_result_block_param_content.rbi +40 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_result_error.rbi +100 -0
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +656 -0
- data/rbi/anthropic/models/beta/message_create_params.rbi +759 -0
- data/rbi/anthropic/models/beta/messages/batch_cancel_params.rbi +65 -0
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +906 -0
- data/rbi/anthropic/models/beta/messages/batch_delete_params.rbi +65 -0
- data/rbi/anthropic/models/beta/messages/batch_list_params.rbi +106 -0
- data/rbi/anthropic/models/beta/messages/batch_results_params.rbi +65 -0
- data/rbi/anthropic/models/beta/messages/batch_retrieve_params.rbi +65 -0
- data/rbi/anthropic/models/beta/messages/beta_deleted_message_batch.rbi +44 -0
- data/rbi/anthropic/models/beta/messages/beta_message_batch.rbi +214 -0
- data/rbi/anthropic/models/beta/messages/beta_message_batch_canceled_result.rbi +30 -0
- data/rbi/anthropic/models/beta/messages/beta_message_batch_errored_result.rbi +45 -0
- data/rbi/anthropic/models/beta/messages/beta_message_batch_expired_result.rbi +30 -0
- data/rbi/anthropic/models/beta/messages/beta_message_batch_individual_response.rbi +89 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/messages/beta_message_batch_request_counts.rbi +41 -12
- data/rbi/anthropic/models/beta/messages/beta_message_batch_result.rbi +38 -0
- data/rbi/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rbi +45 -0
- data/rbi/anthropic/models/beta/model_list_params.rbi +103 -0
- data/rbi/anthropic/models/beta/model_retrieve_params.rbi +62 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta_api_error.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/beta_authentication_error.rbi +13 -3
- data/rbi/{lib/anthropic → anthropic}/models/beta_billing_error.rbi +10 -3
- data/rbi/anthropic/models/beta_error.rbi +28 -0
- data/rbi/anthropic/models/beta_error_response.rbi +74 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta_gateway_timeout_error.rbi +13 -3
- data/rbi/{lib/anthropic → anthropic}/models/beta_invalid_request_error.rbi +13 -3
- data/rbi/{lib/anthropic → anthropic}/models/beta_not_found_error.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/beta_overloaded_error.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/beta_permission_error.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/beta_rate_limit_error.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/billing_error.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/cache_control_ephemeral.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/citation_char_location.rbi +18 -14
- data/rbi/{lib/anthropic → anthropic}/models/citation_char_location_param.rbi +21 -14
- data/rbi/{lib/anthropic → anthropic}/models/citation_content_block_location.rbi +24 -15
- data/rbi/{lib/anthropic → anthropic}/models/citation_content_block_location_param.rbi +24 -15
- data/rbi/{lib/anthropic → anthropic}/models/citation_page_location.rbi +18 -14
- data/rbi/{lib/anthropic → anthropic}/models/citation_page_location_param.rbi +21 -14
- data/rbi/anthropic/models/citation_web_search_result_location_param.rbi +62 -0
- data/rbi/{lib/anthropic → anthropic}/models/citations_config_param.rbi +10 -3
- data/rbi/anthropic/models/citations_delta.rbi +81 -0
- data/rbi/anthropic/models/citations_web_search_result_location.rbi +62 -0
- data/rbi/anthropic/models/completion.rbi +93 -0
- data/rbi/anthropic/models/completion_create_params.rbi +217 -0
- data/rbi/anthropic/models/content_block.rbi +25 -0
- data/rbi/anthropic/models/content_block_param.rbi +28 -0
- data/rbi/anthropic/models/content_block_source.rbi +92 -0
- data/rbi/anthropic/models/content_block_source_content.rbi +22 -0
- data/rbi/anthropic/models/document_block_param.rbi +120 -0
- data/rbi/anthropic/models/error_object.rbi +28 -0
- data/rbi/anthropic/models/error_response.rbi +74 -0
- data/rbi/{lib/anthropic → anthropic}/models/gateway_timeout_error.rbi +10 -3
- data/rbi/anthropic/models/image_block_param.rbi +80 -0
- data/rbi/anthropic/models/input_json_delta.rbi +28 -0
- data/rbi/{lib/anthropic → anthropic}/models/invalid_request_error.rbi +10 -3
- data/rbi/anthropic/models/message.rbi +259 -0
- data/rbi/anthropic/models/message_count_tokens_params.rbi +569 -0
- data/rbi/anthropic/models/message_count_tokens_tool.rbi +25 -0
- data/rbi/anthropic/models/message_create_params.rbi +699 -0
- data/rbi/anthropic/models/message_delta_usage.rbi +76 -0
- data/rbi/anthropic/models/message_param.rbi +147 -0
- data/rbi/anthropic/models/message_tokens_count.rbi +29 -0
- data/rbi/anthropic/models/messages/batch_cancel_params.rbi +32 -0
- data/rbi/anthropic/models/messages/batch_create_params.rbi +840 -0
- data/rbi/anthropic/models/messages/batch_delete_params.rbi +32 -0
- data/rbi/{lib/anthropic → anthropic}/models/messages/batch_list_params.rbi +34 -12
- data/rbi/anthropic/models/messages/batch_results_params.rbi +32 -0
- data/rbi/anthropic/models/messages/batch_retrieve_params.rbi +32 -0
- data/rbi/anthropic/models/messages/deleted_message_batch.rbi +42 -0
- data/rbi/anthropic/models/messages/message_batch.rbi +208 -0
- data/rbi/{lib/anthropic → anthropic}/models/messages/message_batch_canceled_result.rbi +15 -5
- data/rbi/anthropic/models/messages/message_batch_errored_result.rbi +42 -0
- data/rbi/{lib/anthropic → anthropic}/models/messages/message_batch_expired_result.rbi +15 -5
- data/rbi/anthropic/models/messages/message_batch_individual_response.rbi +89 -0
- data/rbi/{lib/anthropic → anthropic}/models/messages/message_batch_request_counts.rbi +43 -14
- data/rbi/{lib/anthropic → anthropic}/models/messages/message_batch_result.rbi +17 -7
- data/rbi/anthropic/models/messages/message_batch_succeeded_result.rbi +40 -0
- data/rbi/anthropic/models/metadata.rbi +35 -0
- data/rbi/anthropic/models/model.rbi +68 -0
- data/rbi/anthropic/models/model_info.rbi +62 -0
- data/rbi/anthropic/models/model_list_params.rbi +95 -0
- data/rbi/anthropic/models/model_retrieve_params.rbi +54 -0
- data/rbi/{lib/anthropic → anthropic}/models/not_found_error.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/overloaded_error.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/permission_error.rbi +10 -3
- data/rbi/anthropic/models/plain_text_source.rbi +35 -0
- data/rbi/{lib/anthropic → anthropic}/models/rate_limit_error.rbi +10 -3
- data/rbi/anthropic/models/raw_content_block_delta.rbi +26 -0
- data/rbi/anthropic/models/raw_content_block_delta_event.rbi +70 -0
- data/rbi/anthropic/models/raw_content_block_start_event.rbi +99 -0
- data/rbi/{lib/anthropic → anthropic}/models/raw_content_block_stop_event.rbi +13 -3
- data/rbi/anthropic/models/raw_message_delta_event.rbi +119 -0
- data/rbi/anthropic/models/raw_message_start_event.rbi +33 -0
- data/rbi/anthropic/models/raw_message_stop_event.rbi +23 -0
- data/rbi/anthropic/models/raw_message_stream_event.rbi +27 -0
- data/rbi/{lib/anthropic → anthropic}/models/redacted_thinking_block.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/redacted_thinking_block_param.rbi +13 -3
- data/rbi/anthropic/models/server_tool_usage.rbi +27 -0
- data/rbi/anthropic/models/server_tool_use_block.rbi +43 -0
- data/rbi/anthropic/models/server_tool_use_block_param.rbi +71 -0
- data/rbi/{lib/anthropic → anthropic}/models/signature_delta.rbi +10 -3
- data/rbi/anthropic/models/stop_reason.rbi +23 -0
- data/rbi/anthropic/models/text_block.rbi +90 -0
- data/rbi/anthropic/models/text_block_param.rbi +95 -0
- data/rbi/anthropic/models/text_citation.rbi +23 -0
- data/rbi/anthropic/models/text_citation_param.rbi +23 -0
- data/rbi/{lib/anthropic → anthropic}/models/text_delta.rbi +10 -3
- data/rbi/anthropic/models/thinking_block.rbi +35 -0
- data/rbi/anthropic/models/thinking_block_param.rbi +35 -0
- data/rbi/{lib/anthropic → anthropic}/models/thinking_config_disabled.rbi +10 -3
- data/rbi/anthropic/models/thinking_config_enabled.rbi +49 -0
- data/rbi/{lib/anthropic → anthropic}/models/thinking_config_param.rbi +13 -2
- data/rbi/{lib/anthropic → anthropic}/models/thinking_delta.rbi +10 -3
- data/rbi/anthropic/models/tool.rbi +142 -0
- data/rbi/anthropic/models/tool_bash_20250124.rbi +62 -0
- data/rbi/anthropic/models/tool_choice.rbi +25 -0
- data/rbi/anthropic/models/tool_choice_any.rbi +49 -0
- data/rbi/anthropic/models/tool_choice_auto.rbi +49 -0
- data/rbi/{lib/anthropic → anthropic}/models/tool_choice_none.rbi +10 -3
- data/rbi/anthropic/models/tool_choice_tool.rbi +57 -0
- data/rbi/anthropic/models/tool_result_block_param.rbi +162 -0
- data/rbi/anthropic/models/tool_text_editor_20250124.rbi +62 -0
- data/rbi/anthropic/models/tool_union.rbi +23 -0
- data/rbi/anthropic/models/tool_use_block.rbi +43 -0
- data/rbi/anthropic/models/tool_use_block_param.rbi +68 -0
- data/rbi/{lib/anthropic → anthropic}/models/url_image_source.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/url_pdf_source.rbi +10 -3
- data/rbi/anthropic/models/usage.rbi +74 -0
- data/rbi/anthropic/models/web_search_result_block.rbi +59 -0
- data/rbi/anthropic/models/web_search_result_block_param.rbi +62 -0
- data/rbi/anthropic/models/web_search_tool_20250305.rbi +181 -0
- data/rbi/anthropic/models/web_search_tool_request_error.rbi +88 -0
- data/rbi/anthropic/models/web_search_tool_result_block.rbi +61 -0
- data/rbi/anthropic/models/web_search_tool_result_block_content.rbi +31 -0
- data/rbi/anthropic/models/web_search_tool_result_block_param.rbi +80 -0
- data/rbi/anthropic/models/web_search_tool_result_block_param_content.rbi +33 -0
- data/rbi/anthropic/models/web_search_tool_result_error.rbi +90 -0
- data/rbi/anthropic/models.rbi +229 -0
- data/rbi/{lib/anthropic → anthropic}/request_options.rbi +18 -5
- data/rbi/{lib/anthropic → anthropic}/resources/beta/messages/batches.rbi +54 -32
- data/rbi/{lib/anthropic → anthropic}/resources/beta/messages.rbi +131 -106
- data/rbi/{lib/anthropic → anthropic}/resources/beta/models.rbi +23 -14
- data/rbi/{lib/anthropic → anthropic}/resources/beta.rbi +2 -1
- data/rbi/{lib/anthropic → anthropic}/resources/completions.rbi +38 -29
- data/rbi/{lib/anthropic → anthropic}/resources/messages/batches.rbi +38 -24
- data/rbi/{lib/anthropic → anthropic}/resources/messages.rbi +104 -91
- data/rbi/anthropic/resources/models.rbi +62 -0
- data/rbi/anthropic/vertex.rbi +5 -0
- data/sig/anthropic/bedrock.rbs +3 -0
- data/sig/anthropic/file_part.rbs +21 -0
- data/sig/anthropic/helpers/bedrock/client.rbs +43 -0
- data/sig/anthropic/helpers/vertex/client.rbs +36 -0
- data/sig/anthropic/internal/transport/base_client.rbs +25 -4
- data/sig/anthropic/internal/transport/pooled_net_requester.rbs +4 -0
- data/sig/anthropic/internal/type/array_of.rbs +4 -0
- data/sig/anthropic/internal/type/base_model.rbs +19 -1
- data/sig/anthropic/internal/type/base_page.rbs +1 -1
- data/sig/anthropic/internal/type/base_stream.rbs +2 -0
- data/sig/anthropic/internal/type/converter.rbs +6 -0
- data/sig/anthropic/internal/type/enum.rbs +5 -2
- data/sig/anthropic/internal/type/{io_like.rbs → file_input.rbs} +1 -1
- data/sig/anthropic/internal/type/hash_of.rbs +4 -0
- data/sig/anthropic/internal/type/request_parameters.rbs +5 -1
- data/sig/anthropic/internal/type/union.rbs +5 -0
- data/sig/anthropic/internal/util.rbs +31 -12
- data/sig/anthropic/internal.rbs +3 -1
- data/sig/anthropic/models/anthropic_beta.rbs +1 -8
- data/sig/anthropic/models/api_error_object.rbs +0 -2
- data/sig/anthropic/models/authentication_error.rbs +0 -2
- data/sig/anthropic/models/base64_image_source.rbs +4 -6
- data/sig/anthropic/models/base64_pdf_source.rbs +0 -2
- data/sig/anthropic/models/beta/beta_base64_image_source.rbs +4 -6
- data/sig/anthropic/models/beta/beta_base64_pdf_block.rbs +16 -18
- data/sig/anthropic/models/beta/beta_base64_pdf_source.rbs +0 -2
- data/sig/anthropic/models/beta/beta_cache_control_ephemeral.rbs +0 -2
- data/sig/anthropic/models/beta/beta_citation_char_location.rbs +0 -2
- data/sig/anthropic/models/beta/beta_citation_char_location_param.rbs +0 -2
- data/sig/anthropic/models/beta/beta_citation_content_block_location.rbs +0 -2
- data/sig/anthropic/models/beta/beta_citation_content_block_location_param.rbs +0 -2
- data/sig/anthropic/models/beta/beta_citation_page_location.rbs +0 -2
- data/sig/anthropic/models/beta/beta_citation_page_location_param.rbs +0 -2
- data/sig/anthropic/models/beta/beta_citation_web_search_result_location_param.rbs +36 -0
- data/sig/anthropic/models/beta/beta_citations_config_param.rbs +0 -2
- data/sig/anthropic/models/beta/beta_citations_delta.rbs +8 -9
- data/sig/anthropic/models/beta/beta_citations_web_search_result_location.rbs +36 -0
- data/sig/anthropic/models/beta/beta_content_block.rbs +7 -5
- data/sig/anthropic/models/beta/beta_content_block_param.rbs +10 -8
- data/sig/anthropic/models/beta/beta_content_block_source.rbs +5 -10
- data/sig/anthropic/models/beta/beta_content_block_source_content.rbs +3 -3
- data/sig/anthropic/models/beta/beta_image_block_param.rbs +9 -11
- data/sig/anthropic/models/beta/beta_input_json_delta.rbs +0 -2
- data/sig/anthropic/models/beta/beta_message.rbs +3 -5
- data/sig/anthropic/models/beta/beta_message_delta_usage.rbs +22 -3
- data/sig/anthropic/models/beta/beta_message_param.rbs +9 -14
- data/sig/anthropic/models/beta/beta_message_tokens_count.rbs +0 -2
- data/sig/anthropic/models/beta/beta_metadata.rbs +0 -2
- data/sig/anthropic/models/beta/beta_model_info.rbs +0 -2
- data/sig/anthropic/models/beta/beta_plain_text_source.rbs +0 -2
- data/sig/anthropic/models/beta/beta_raw_content_block_delta.rbs +6 -6
- data/sig/anthropic/models/beta/beta_raw_content_block_delta_event.rbs +0 -2
- data/sig/anthropic/models/beta/beta_raw_content_block_start_event.rbs +10 -10
- data/sig/anthropic/models/beta/beta_raw_content_block_stop_event.rbs +0 -2
- data/sig/anthropic/models/beta/beta_raw_message_delta_event.rbs +6 -10
- data/sig/anthropic/models/beta/beta_raw_message_start_event.rbs +3 -5
- data/sig/anthropic/models/beta/beta_raw_message_stop_event.rbs +0 -2
- data/sig/anthropic/models/beta/beta_raw_message_stream_event.rbs +7 -7
- data/sig/anthropic/models/beta/beta_redacted_thinking_block.rbs +0 -2
- data/sig/anthropic/models/beta/beta_redacted_thinking_block_param.rbs +0 -2
- data/sig/anthropic/models/beta/beta_server_tool_usage.rbs +15 -0
- data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +27 -0
- data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +36 -0
- data/sig/anthropic/models/beta/beta_signature_delta.rbs +0 -2
- data/sig/anthropic/models/beta/beta_stop_reason.rbs +8 -1
- data/sig/anthropic/models/beta/beta_text_block.rbs +0 -2
- data/sig/anthropic/models/beta/beta_text_block_param.rbs +3 -5
- data/sig/anthropic/models/beta/beta_text_citation.rbs +5 -4
- data/sig/anthropic/models/beta/beta_text_citation_param.rbs +5 -4
- data/sig/anthropic/models/beta/beta_text_delta.rbs +0 -2
- data/sig/anthropic/models/beta/beta_thinking_block.rbs +0 -2
- data/sig/anthropic/models/beta/beta_thinking_block_param.rbs +0 -2
- data/sig/anthropic/models/beta/beta_thinking_config_disabled.rbs +0 -2
- data/sig/anthropic/models/beta/beta_thinking_config_enabled.rbs +0 -2
- data/sig/anthropic/models/beta/beta_thinking_config_param.rbs +3 -3
- data/sig/anthropic/models/beta/beta_thinking_delta.rbs +0 -2
- data/sig/anthropic/models/beta/beta_tool.rbs +10 -14
- data/sig/anthropic/models/beta/beta_tool_bash_20241022.rbs +3 -5
- data/sig/anthropic/models/beta/beta_tool_bash_20250124.rbs +3 -5
- data/sig/anthropic/models/beta/beta_tool_choice.rbs +5 -5
- data/sig/anthropic/models/beta/beta_tool_choice_any.rbs +0 -2
- data/sig/anthropic/models/beta/beta_tool_choice_auto.rbs +0 -2
- data/sig/anthropic/models/beta/beta_tool_choice_none.rbs +0 -2
- data/sig/anthropic/models/beta/beta_tool_choice_tool.rbs +0 -2
- data/sig/anthropic/models/beta/beta_tool_computer_use_20241022.rbs +3 -5
- data/sig/anthropic/models/beta/beta_tool_computer_use_20250124.rbs +3 -5
- data/sig/anthropic/models/beta/beta_tool_result_block_param.rbs +14 -19
- data/sig/anthropic/models/beta/beta_tool_text_editor_20241022.rbs +3 -5
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250124.rbs +3 -5
- data/sig/anthropic/models/beta/beta_tool_union.rbs +9 -8
- data/sig/anthropic/models/beta/beta_tool_use_block.rbs +0 -2
- data/sig/anthropic/models/beta/beta_tool_use_block_param.rbs +3 -5
- data/sig/anthropic/models/beta/beta_url_image_source.rbs +0 -2
- data/sig/anthropic/models/beta/beta_url_pdf_source.rbs +0 -2
- data/sig/anthropic/models/beta/beta_usage.rbs +6 -4
- data/sig/anthropic/models/beta/beta_web_search_result_block.rbs +36 -0
- data/sig/anthropic/models/beta/beta_web_search_result_block_param.rbs +36 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_20250305.rbs +73 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_request_error.rbs +43 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_result_block.rbs +28 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_result_block_content.rbs +19 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_result_block_param.rbs +32 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_result_block_param_content.rbs +19 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_result_error.rbs +43 -0
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +20 -25
- data/sig/anthropic/models/beta/message_create_params.rbs +11 -17
- data/sig/anthropic/models/beta/messages/batch_cancel_params.rbs +0 -2
- data/sig/anthropic/models/beta/messages/batch_create_params.rbs +22 -31
- data/sig/anthropic/models/beta/messages/batch_delete_params.rbs +0 -2
- data/sig/anthropic/models/beta/messages/batch_list_params.rbs +0 -2
- data/sig/anthropic/models/beta/messages/batch_results_params.rbs +0 -2
- data/sig/anthropic/models/beta/messages/batch_retrieve_params.rbs +0 -2
- data/sig/anthropic/models/beta/messages/beta_deleted_message_batch.rbs +0 -2
- data/sig/anthropic/models/beta/messages/beta_message_batch.rbs +7 -9
- data/sig/anthropic/models/beta/messages/beta_message_batch_canceled_result.rbs +0 -2
- data/sig/anthropic/models/beta/messages/beta_message_batch_errored_result.rbs +3 -5
- data/sig/anthropic/models/beta/messages/beta_message_batch_expired_result.rbs +0 -2
- data/sig/anthropic/models/beta/messages/beta_message_batch_individual_response.rbs +0 -2
- data/sig/anthropic/models/beta/messages/beta_message_batch_request_counts.rbs +0 -2
- data/sig/anthropic/models/beta/messages/beta_message_batch_result.rbs +5 -5
- data/sig/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rbs +3 -5
- data/sig/anthropic/models/beta/model_list_params.rbs +13 -3
- data/sig/anthropic/models/beta/model_retrieve_params.rbs +11 -3
- data/sig/anthropic/models/beta_api_error.rbs +0 -2
- data/sig/anthropic/models/beta_authentication_error.rbs +0 -2
- data/sig/anthropic/models/beta_billing_error.rbs +0 -2
- data/sig/anthropic/models/beta_error.rbs +10 -10
- data/sig/anthropic/models/beta_error_response.rbs +0 -2
- data/sig/anthropic/models/beta_gateway_timeout_error.rbs +0 -2
- data/sig/anthropic/models/beta_invalid_request_error.rbs +0 -2
- data/sig/anthropic/models/beta_not_found_error.rbs +0 -2
- data/sig/anthropic/models/beta_overloaded_error.rbs +0 -2
- data/sig/anthropic/models/beta_permission_error.rbs +0 -2
- data/sig/anthropic/models/beta_rate_limit_error.rbs +0 -2
- data/sig/anthropic/models/billing_error.rbs +0 -2
- data/sig/anthropic/models/cache_control_ephemeral.rbs +0 -2
- data/sig/anthropic/models/citation_char_location.rbs +0 -2
- data/sig/anthropic/models/citation_char_location_param.rbs +0 -2
- data/sig/anthropic/models/citation_content_block_location.rbs +0 -2
- data/sig/anthropic/models/citation_content_block_location_param.rbs +0 -2
- data/sig/anthropic/models/citation_page_location.rbs +0 -2
- data/sig/anthropic/models/citation_page_location_param.rbs +0 -2
- data/sig/anthropic/models/citation_web_search_result_location_param.rbs +32 -0
- data/sig/anthropic/models/citations_config_param.rbs +0 -2
- data/sig/anthropic/models/citations_delta.rbs +8 -12
- data/sig/anthropic/models/citations_web_search_result_location.rbs +32 -0
- data/sig/anthropic/models/completion.rbs +0 -2
- data/sig/anthropic/models/completion_create_params.rbs +13 -9
- data/sig/anthropic/models/content_block.rbs +7 -5
- data/sig/anthropic/models/content_block_param.rbs +10 -8
- data/sig/anthropic/models/content_block_source.rbs +5 -13
- data/sig/anthropic/models/content_block_source_content.rbs +2 -2
- data/sig/anthropic/models/document_block_param.rbs +16 -18
- data/sig/anthropic/models/error_object.rbs +10 -10
- data/sig/anthropic/models/error_response.rbs +0 -2
- data/sig/anthropic/models/gateway_timeout_error.rbs +0 -2
- data/sig/anthropic/models/image_block_param.rbs +8 -11
- data/sig/anthropic/models/input_json_delta.rbs +0 -2
- data/sig/anthropic/models/invalid_request_error.rbs +0 -2
- data/sig/anthropic/models/message.rbs +3 -5
- data/sig/anthropic/models/message_count_tokens_params.rbs +6 -10
- data/sig/anthropic/models/message_count_tokens_tool.rbs +5 -4
- data/sig/anthropic/models/message_create_params.rbs +10 -16
- data/sig/anthropic/models/message_delta_usage.rbs +22 -3
- data/sig/anthropic/models/message_param.rbs +9 -14
- data/sig/anthropic/models/message_tokens_count.rbs +0 -2
- data/sig/anthropic/models/messages/batch_cancel_params.rbs +0 -2
- data/sig/anthropic/models/messages/batch_create_params.rbs +21 -34
- data/sig/anthropic/models/messages/batch_delete_params.rbs +0 -2
- data/sig/anthropic/models/messages/batch_list_params.rbs +0 -2
- data/sig/anthropic/models/messages/batch_results_params.rbs +0 -2
- data/sig/anthropic/models/messages/batch_retrieve_params.rbs +0 -2
- data/sig/anthropic/models/messages/deleted_message_batch.rbs +0 -2
- data/sig/anthropic/models/messages/message_batch.rbs +7 -9
- data/sig/anthropic/models/messages/message_batch_canceled_result.rbs +0 -2
- data/sig/anthropic/models/messages/message_batch_errored_result.rbs +3 -5
- data/sig/anthropic/models/messages/message_batch_expired_result.rbs +0 -2
- data/sig/anthropic/models/messages/message_batch_individual_response.rbs +0 -2
- data/sig/anthropic/models/messages/message_batch_request_counts.rbs +0 -2
- data/sig/anthropic/models/messages/message_batch_result.rbs +5 -5
- data/sig/anthropic/models/messages/message_batch_succeeded_result.rbs +3 -8
- data/sig/anthropic/models/metadata.rbs +0 -2
- data/sig/anthropic/models/model.rbs +1 -13
- data/sig/anthropic/models/model_info.rbs +0 -2
- data/sig/anthropic/models/model_list_params.rbs +13 -3
- data/sig/anthropic/models/model_retrieve_params.rbs +11 -3
- data/sig/anthropic/models/not_found_error.rbs +0 -2
- data/sig/anthropic/models/overloaded_error.rbs +0 -2
- data/sig/anthropic/models/permission_error.rbs +0 -2
- data/sig/anthropic/models/plain_text_source.rbs +0 -2
- data/sig/anthropic/models/rate_limit_error.rbs +0 -2
- data/sig/anthropic/models/raw_content_block_delta.rbs +6 -6
- data/sig/anthropic/models/raw_content_block_delta_event.rbs +0 -2
- data/sig/anthropic/models/raw_content_block_start_event.rbs +10 -10
- data/sig/anthropic/models/raw_content_block_stop_event.rbs +0 -2
- data/sig/anthropic/models/raw_message_delta_event.rbs +6 -10
- data/sig/anthropic/models/raw_message_start_event.rbs +3 -5
- data/sig/anthropic/models/raw_message_stop_event.rbs +0 -2
- data/sig/anthropic/models/raw_message_stream_event.rbs +7 -7
- data/sig/anthropic/models/redacted_thinking_block.rbs +0 -2
- data/sig/anthropic/models/redacted_thinking_block_param.rbs +0 -2
- data/sig/anthropic/models/server_tool_usage.rbs +11 -0
- data/sig/anthropic/models/server_tool_use_block.rbs +23 -0
- data/sig/anthropic/models/server_tool_use_block_param.rbs +32 -0
- data/sig/anthropic/models/signature_delta.rbs +0 -2
- data/sig/anthropic/models/stop_reason.rbs +9 -1
- data/sig/anthropic/models/text_block.rbs +0 -2
- data/sig/anthropic/models/text_block_param.rbs +3 -5
- data/sig/anthropic/models/text_citation.rbs +5 -4
- data/sig/anthropic/models/text_citation_param.rbs +5 -4
- data/sig/anthropic/models/text_delta.rbs +0 -2
- data/sig/anthropic/models/thinking_block.rbs +0 -2
- data/sig/anthropic/models/thinking_block_param.rbs +0 -2
- data/sig/anthropic/models/thinking_config_disabled.rbs +0 -2
- data/sig/anthropic/models/thinking_config_enabled.rbs +0 -2
- data/sig/anthropic/models/thinking_config_param.rbs +2 -3
- data/sig/anthropic/models/thinking_delta.rbs +0 -2
- data/sig/anthropic/models/tool.rbs +21 -11
- data/sig/anthropic/models/tool_bash_20250124.rbs +3 -5
- data/sig/anthropic/models/tool_choice.rbs +5 -5
- data/sig/anthropic/models/tool_choice_any.rbs +0 -2
- data/sig/anthropic/models/tool_choice_auto.rbs +0 -2
- data/sig/anthropic/models/tool_choice_none.rbs +0 -2
- data/sig/anthropic/models/tool_choice_tool.rbs +0 -2
- data/sig/anthropic/models/tool_result_block_param.rbs +13 -20
- data/sig/anthropic/models/tool_text_editor_20250124.rbs +3 -5
- data/sig/anthropic/models/tool_union.rbs +5 -4
- data/sig/anthropic/models/tool_use_block.rbs +0 -2
- data/sig/anthropic/models/tool_use_block_param.rbs +3 -5
- data/sig/anthropic/models/url_image_source.rbs +0 -2
- data/sig/anthropic/models/url_pdf_source.rbs +0 -2
- data/sig/anthropic/models/usage.rbs +6 -4
- data/sig/anthropic/models/web_search_result_block.rbs +32 -0
- data/sig/anthropic/models/web_search_result_block_param.rbs +32 -0
- data/sig/anthropic/models/web_search_tool_20250305.rbs +69 -0
- data/sig/anthropic/models/web_search_tool_request_error.rbs +39 -0
- data/sig/anthropic/models/web_search_tool_result_block.rbs +24 -0
- data/sig/anthropic/models/web_search_tool_result_block_content.rbs +15 -0
- data/sig/anthropic/models/web_search_tool_result_block_param.rbs +28 -0
- data/sig/anthropic/models/web_search_tool_result_block_param_content.rbs +15 -0
- data/sig/anthropic/models/web_search_tool_result_error.rbs +39 -0
- data/sig/anthropic/models.rbs +221 -0
- data/sig/anthropic/request_options.rbs +1 -1
- data/sig/anthropic/resources/beta/messages/batches.rbs +7 -7
- data/sig/anthropic/resources/beta/messages.rbs +8 -8
- data/sig/anthropic/resources/beta/models.rbs +4 -2
- data/sig/anthropic/resources/completions.rbs +6 -4
- data/sig/anthropic/resources/messages/batches.rbs +7 -7
- data/sig/anthropic/resources/messages.rbs +7 -7
- data/sig/anthropic/resources/models.rbs +4 -2
- data/sig/anthropic/vertex.rbs +3 -0
- metadata +335 -238
- data/lib/anthropic/bedrock/client.rb +0 -261
- data/lib/anthropic/vertex/client.rb +0 -210
- data/rbi/lib/anthropic/bedrock/client.rbi +0 -80
- data/rbi/lib/anthropic/internal/transport/base_client.rbi +0 -204
- data/rbi/lib/anthropic/internal/type/array_of.rbi +0 -82
- data/rbi/lib/anthropic/internal/type/base_model.rbi +0 -197
- data/rbi/lib/anthropic/internal/type/boolean.rbi +0 -49
- data/rbi/lib/anthropic/internal/type/hash_of.rbi +0 -82
- data/rbi/lib/anthropic/internal/type/request_parameters.rbi +0 -21
- data/rbi/lib/anthropic/internal/type/union.rbi +0 -68
- data/rbi/lib/anthropic/internal/type/unknown.rbi +0 -41
- data/rbi/lib/anthropic/internal/util.rbi +0 -282
- data/rbi/lib/anthropic/models/anthropic_beta.rbi +0 -30
- data/rbi/lib/anthropic/models/base64_image_source.rbi +0 -46
- data/rbi/lib/anthropic/models/base64_pdf_source.rbi +0 -22
- data/rbi/lib/anthropic/models/beta/beta_base64_image_source.rbi +0 -56
- data/rbi/lib/anthropic/models/beta/beta_base64_pdf_block.rbi +0 -104
- data/rbi/lib/anthropic/models/beta/beta_base64_pdf_source.rbi +0 -26
- data/rbi/lib/anthropic/models/beta/beta_citations_delta.rbi +0 -66
- data/rbi/lib/anthropic/models/beta/beta_content_block.rbi +0 -21
- data/rbi/lib/anthropic/models/beta/beta_content_block_param.rbi +0 -21
- data/rbi/lib/anthropic/models/beta/beta_content_block_source.rbi +0 -74
- data/rbi/lib/anthropic/models/beta/beta_content_block_source_content.rbi +0 -19
- data/rbi/lib/anthropic/models/beta/beta_image_block_param.rbi +0 -68
- data/rbi/lib/anthropic/models/beta/beta_input_json_delta.rbi +0 -23
- data/rbi/lib/anthropic/models/beta/beta_message.rbi +0 -180
- data/rbi/lib/anthropic/models/beta/beta_message_delta_usage.rbi +0 -21
- data/rbi/lib/anthropic/models/beta/beta_message_param.rbi +0 -126
- data/rbi/lib/anthropic/models/beta/beta_model_info.rbi +0 -38
- data/rbi/lib/anthropic/models/beta/beta_plain_text_source.rbi +0 -26
- data/rbi/lib/anthropic/models/beta/beta_raw_content_block_delta.rbi +0 -21
- data/rbi/lib/anthropic/models/beta/beta_raw_content_block_delta_event.rbi +0 -65
- data/rbi/lib/anthropic/models/beta/beta_raw_content_block_start_event.rbi +0 -74
- data/rbi/lib/anthropic/models/beta/beta_raw_message_delta_event.rbi +0 -96
- data/rbi/lib/anthropic/models/beta/beta_raw_message_start_event.rbi +0 -29
- data/rbi/lib/anthropic/models/beta/beta_raw_message_stream_event.rbi +0 -21
- data/rbi/lib/anthropic/models/beta/beta_signature_delta.rbi +0 -23
- data/rbi/lib/anthropic/models/beta/beta_stop_reason.rbi +0 -24
- data/rbi/lib/anthropic/models/beta/beta_text_block.rbi +0 -76
- data/rbi/lib/anthropic/models/beta/beta_text_block_param.rbi +0 -84
- data/rbi/lib/anthropic/models/beta/beta_text_citation.rbi +0 -21
- data/rbi/lib/anthropic/models/beta/beta_text_citation_param.rbi +0 -21
- data/rbi/lib/anthropic/models/beta/beta_thinking_block.rbi +0 -26
- data/rbi/lib/anthropic/models/beta/beta_thinking_block_param.rbi +0 -26
- data/rbi/lib/anthropic/models/beta/beta_thinking_config_enabled.rbi +0 -32
- data/rbi/lib/anthropic/models/beta/beta_tool.rbi +0 -112
- data/rbi/lib/anthropic/models/beta/beta_tool_bash_20241022.rbi +0 -49
- data/rbi/lib/anthropic/models/beta/beta_tool_bash_20250124.rbi +0 -49
- data/rbi/lib/anthropic/models/beta/beta_tool_choice_any.rbi +0 -31
- data/rbi/lib/anthropic/models/beta/beta_tool_choice_auto.rbi +0 -31
- data/rbi/lib/anthropic/models/beta/beta_tool_choice_tool.rbi +0 -37
- data/rbi/lib/anthropic/models/beta/beta_tool_result_block_param.rbi +0 -129
- data/rbi/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rbi +0 -49
- data/rbi/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rbi +0 -49
- data/rbi/lib/anthropic/models/beta/beta_tool_union.rbi +0 -21
- data/rbi/lib/anthropic/models/beta/beta_tool_use_block.rbi +0 -29
- data/rbi/lib/anthropic/models/beta/beta_tool_use_block_param.rbi +0 -60
- data/rbi/lib/anthropic/models/beta/beta_usage.rbi +0 -52
- data/rbi/lib/anthropic/models/beta/message_count_tokens_params.rbi +0 -409
- data/rbi/lib/anthropic/models/beta/message_create_params.rbi +0 -489
- data/rbi/lib/anthropic/models/beta/messages/batch_cancel_params.rbi +0 -41
- data/rbi/lib/anthropic/models/beta/messages/batch_create_params.rbi +0 -572
- data/rbi/lib/anthropic/models/beta/messages/batch_delete_params.rbi +0 -41
- data/rbi/lib/anthropic/models/beta/messages/batch_list_params.rbi +0 -72
- data/rbi/lib/anthropic/models/beta/messages/batch_results_params.rbi +0 -41
- data/rbi/lib/anthropic/models/beta/messages/batch_retrieve_params.rbi +0 -41
- data/rbi/lib/anthropic/models/beta/messages/beta_deleted_message_batch.rbi +0 -27
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch.rbi +0 -148
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_canceled_result.rbi +0 -20
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_errored_result.rbi +0 -29
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_expired_result.rbi +0 -20
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_individual_response.rbi +0 -68
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_result.rbi +0 -26
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rbi +0 -29
- data/rbi/lib/anthropic/models/beta/model_list_params.rbi +0 -59
- data/rbi/lib/anthropic/models/beta/model_retrieve_params.rbi +0 -21
- data/rbi/lib/anthropic/models/beta_error.rbi +0 -17
- data/rbi/lib/anthropic/models/beta_error_response.rbi +0 -68
- data/rbi/lib/anthropic/models/citations_delta.rbi +0 -62
- data/rbi/lib/anthropic/models/completion.rbi +0 -65
- data/rbi/lib/anthropic/models/completion_create_params.rbi +0 -142
- data/rbi/lib/anthropic/models/content_block.rbi +0 -17
- data/rbi/lib/anthropic/models/content_block_param.rbi +0 -17
- data/rbi/lib/anthropic/models/content_block_source.rbi +0 -56
- data/rbi/lib/anthropic/models/content_block_source_content.rbi +0 -12
- data/rbi/lib/anthropic/models/document_block_param.rbi +0 -97
- data/rbi/lib/anthropic/models/error_object.rbi +0 -17
- data/rbi/lib/anthropic/models/error_response.rbi +0 -68
- data/rbi/lib/anthropic/models/image_block_param.rbi +0 -57
- data/rbi/lib/anthropic/models/input_json_delta.rbi +0 -19
- data/rbi/lib/anthropic/models/message.rbi +0 -176
- data/rbi/lib/anthropic/models/message_count_tokens_params.rbi +0 -363
- data/rbi/lib/anthropic/models/message_count_tokens_tool.rbi +0 -17
- data/rbi/lib/anthropic/models/message_create_params.rbi +0 -453
- data/rbi/lib/anthropic/models/message_delta_usage.rbi +0 -17
- data/rbi/lib/anthropic/models/message_param.rbi +0 -121
- data/rbi/lib/anthropic/models/message_tokens_count.rbi +0 -18
- data/rbi/lib/anthropic/models/messages/batch_cancel_params.rbi +0 -21
- data/rbi/lib/anthropic/models/messages/batch_create_params.rbi +0 -535
- data/rbi/lib/anthropic/models/messages/batch_delete_params.rbi +0 -21
- data/rbi/lib/anthropic/models/messages/batch_results_params.rbi +0 -21
- data/rbi/lib/anthropic/models/messages/batch_retrieve_params.rbi +0 -21
- data/rbi/lib/anthropic/models/messages/deleted_message_batch.rbi +0 -25
- data/rbi/lib/anthropic/models/messages/message_batch.rbi +0 -143
- data/rbi/lib/anthropic/models/messages/message_batch_errored_result.rbi +0 -29
- data/rbi/lib/anthropic/models/messages/message_batch_individual_response.rbi +0 -68
- data/rbi/lib/anthropic/models/messages/message_batch_succeeded_result.rbi +0 -29
- data/rbi/lib/anthropic/models/metadata.rbi +0 -21
- data/rbi/lib/anthropic/models/model.rbi +0 -54
- data/rbi/lib/anthropic/models/model_info.rbi +0 -34
- data/rbi/lib/anthropic/models/model_list_params.rbi +0 -57
- data/rbi/lib/anthropic/models/model_retrieve_params.rbi +0 -19
- data/rbi/lib/anthropic/models/plain_text_source.rbi +0 -22
- data/rbi/lib/anthropic/models/raw_content_block_delta.rbi +0 -17
- data/rbi/lib/anthropic/models/raw_content_block_delta_event.rbi +0 -61
- data/rbi/lib/anthropic/models/raw_content_block_start_event.rbi +0 -70
- data/rbi/lib/anthropic/models/raw_message_delta_event.rbi +0 -81
- data/rbi/lib/anthropic/models/raw_message_start_event.rbi +0 -25
- data/rbi/lib/anthropic/models/raw_message_stop_event.rbi +0 -16
- data/rbi/lib/anthropic/models/raw_message_stream_event.rbi +0 -17
- data/rbi/lib/anthropic/models/stop_reason.rbi +0 -20
- data/rbi/lib/anthropic/models/text_block.rbi +0 -72
- data/rbi/lib/anthropic/models/text_block_param.rbi +0 -80
- data/rbi/lib/anthropic/models/text_citation.rbi +0 -17
- data/rbi/lib/anthropic/models/text_citation_param.rbi +0 -17
- data/rbi/lib/anthropic/models/thinking_block.rbi +0 -22
- data/rbi/lib/anthropic/models/thinking_block_param.rbi +0 -22
- data/rbi/lib/anthropic/models/thinking_config_enabled.rbi +0 -28
- data/rbi/lib/anthropic/models/tool.rbi +0 -88
- data/rbi/lib/anthropic/models/tool_bash_20250124.rbi +0 -43
- data/rbi/lib/anthropic/models/tool_choice.rbi +0 -19
- data/rbi/lib/anthropic/models/tool_choice_any.rbi +0 -27
- data/rbi/lib/anthropic/models/tool_choice_auto.rbi +0 -27
- data/rbi/lib/anthropic/models/tool_choice_tool.rbi +0 -33
- data/rbi/lib/anthropic/models/tool_result_block_param.rbi +0 -102
- data/rbi/lib/anthropic/models/tool_text_editor_20250124.rbi +0 -43
- data/rbi/lib/anthropic/models/tool_union.rbi +0 -17
- data/rbi/lib/anthropic/models/tool_use_block.rbi +0 -25
- data/rbi/lib/anthropic/models/tool_use_block_param.rbi +0 -56
- data/rbi/lib/anthropic/models/usage.rbi +0 -47
- data/rbi/lib/anthropic/resources/models.rbi +0 -53
- data/rbi/lib/anthropic/vertex/client.rbi +0 -56
- data/sig/anthropic/bedrock/client.rbs +0 -41
- data/sig/anthropic/vertex/client.rbs +0 -34
- /data/rbi/{lib/anthropic → anthropic}/version.rbi +0 -0
@@ -4,6 +4,9 @@ module Anthropic
|
|
4
4
|
module Resources
|
5
5
|
class Messages
|
6
6
|
class Batches
|
7
|
+
# Some parameter documentations has been truncated, see
|
8
|
+
# {Anthropic::Models::Messages::BatchCreateParams} for more details.
|
9
|
+
#
|
7
10
|
# Send a batch of Message creation requests.
|
8
11
|
#
|
9
12
|
# The Message Batches API can be used to process multiple Messages API requests at
|
@@ -15,19 +18,20 @@ module Anthropic
|
|
15
18
|
#
|
16
19
|
# @overload create(requests:, request_options: {})
|
17
20
|
#
|
18
|
-
# @param requests [Array<Anthropic::
|
21
|
+
# @param requests [Array<Anthropic::Messages::BatchCreateParams::Request>] List of requests for prompt completion. Each is an individual request to create
|
22
|
+
#
|
19
23
|
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
20
24
|
#
|
21
|
-
# @return [Anthropic::
|
25
|
+
# @return [Anthropic::Messages::MessageBatch]
|
22
26
|
#
|
23
27
|
# @see Anthropic::Models::Messages::BatchCreateParams
|
24
28
|
def create(params)
|
25
|
-
parsed, options = Anthropic::
|
29
|
+
parsed, options = Anthropic::Messages::BatchCreateParams.dump_request(params)
|
26
30
|
@client.request(
|
27
31
|
method: :post,
|
28
32
|
path: "v1/messages/batches",
|
29
33
|
body: parsed,
|
30
|
-
model: Anthropic::
|
34
|
+
model: Anthropic::Messages::MessageBatch,
|
31
35
|
options: options
|
32
36
|
)
|
33
37
|
end
|
@@ -41,21 +45,25 @@ module Anthropic
|
|
41
45
|
#
|
42
46
|
# @overload retrieve(message_batch_id, request_options: {})
|
43
47
|
#
|
44
|
-
# @param message_batch_id [String]
|
48
|
+
# @param message_batch_id [String] ID of the Message Batch.
|
49
|
+
#
|
45
50
|
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
46
51
|
#
|
47
|
-
# @return [Anthropic::
|
52
|
+
# @return [Anthropic::Messages::MessageBatch]
|
48
53
|
#
|
49
54
|
# @see Anthropic::Models::Messages::BatchRetrieveParams
|
50
55
|
def retrieve(message_batch_id, params = {})
|
51
56
|
@client.request(
|
52
57
|
method: :get,
|
53
58
|
path: ["v1/messages/batches/%1$s", message_batch_id],
|
54
|
-
model: Anthropic::
|
59
|
+
model: Anthropic::Messages::MessageBatch,
|
55
60
|
options: params[:request_options]
|
56
61
|
)
|
57
62
|
end
|
58
63
|
|
64
|
+
# Some parameter documentations has been truncated, see
|
65
|
+
# {Anthropic::Models::Messages::BatchListParams} for more details.
|
66
|
+
#
|
59
67
|
# List all Message Batches within a Workspace. Most recently created batches are
|
60
68
|
# returned first.
|
61
69
|
#
|
@@ -64,22 +72,25 @@ module Anthropic
|
|
64
72
|
#
|
65
73
|
# @overload list(after_id: nil, before_id: nil, limit: nil, request_options: {})
|
66
74
|
#
|
67
|
-
# @param after_id [String]
|
68
|
-
#
|
69
|
-
# @param
|
75
|
+
# @param after_id [String] ID of the object to use as a cursor for pagination. When provided, returns the p
|
76
|
+
#
|
77
|
+
# @param before_id [String] ID of the object to use as a cursor for pagination. When provided, returns the p
|
78
|
+
#
|
79
|
+
# @param limit [Integer] Number of items to return per page.
|
80
|
+
#
|
70
81
|
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
71
82
|
#
|
72
|
-
# @return [Anthropic::Internal::Page<Anthropic::
|
83
|
+
# @return [Anthropic::Internal::Page<Anthropic::Messages::MessageBatch>]
|
73
84
|
#
|
74
85
|
# @see Anthropic::Models::Messages::BatchListParams
|
75
86
|
def list(params = {})
|
76
|
-
parsed, options = Anthropic::
|
87
|
+
parsed, options = Anthropic::Messages::BatchListParams.dump_request(params)
|
77
88
|
@client.request(
|
78
89
|
method: :get,
|
79
90
|
path: "v1/messages/batches",
|
80
91
|
query: parsed,
|
81
92
|
page: Anthropic::Internal::Page,
|
82
|
-
model: Anthropic::
|
93
|
+
model: Anthropic::Messages::MessageBatch,
|
83
94
|
options: options
|
84
95
|
)
|
85
96
|
end
|
@@ -94,17 +105,18 @@ module Anthropic
|
|
94
105
|
#
|
95
106
|
# @overload delete(message_batch_id, request_options: {})
|
96
107
|
#
|
97
|
-
# @param message_batch_id [String]
|
108
|
+
# @param message_batch_id [String] ID of the Message Batch.
|
109
|
+
#
|
98
110
|
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
99
111
|
#
|
100
|
-
# @return [Anthropic::
|
112
|
+
# @return [Anthropic::Messages::DeletedMessageBatch]
|
101
113
|
#
|
102
114
|
# @see Anthropic::Models::Messages::BatchDeleteParams
|
103
115
|
def delete(message_batch_id, params = {})
|
104
116
|
@client.request(
|
105
117
|
method: :delete,
|
106
118
|
path: ["v1/messages/batches/%1$s", message_batch_id],
|
107
|
-
model: Anthropic::
|
119
|
+
model: Anthropic::Messages::DeletedMessageBatch,
|
108
120
|
options: params[:request_options]
|
109
121
|
)
|
110
122
|
end
|
@@ -124,17 +136,18 @@ module Anthropic
|
|
124
136
|
#
|
125
137
|
# @overload cancel(message_batch_id, request_options: {})
|
126
138
|
#
|
127
|
-
# @param message_batch_id [String]
|
139
|
+
# @param message_batch_id [String] ID of the Message Batch.
|
140
|
+
#
|
128
141
|
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
129
142
|
#
|
130
|
-
# @return [Anthropic::
|
143
|
+
# @return [Anthropic::Messages::MessageBatch]
|
131
144
|
#
|
132
145
|
# @see Anthropic::Models::Messages::BatchCancelParams
|
133
146
|
def cancel(message_batch_id, params = {})
|
134
147
|
@client.request(
|
135
148
|
method: :post,
|
136
149
|
path: ["v1/messages/batches/%1$s/cancel", message_batch_id],
|
137
|
-
model: Anthropic::
|
150
|
+
model: Anthropic::Messages::MessageBatch,
|
138
151
|
options: params[:request_options]
|
139
152
|
)
|
140
153
|
end
|
@@ -150,10 +163,11 @@ module Anthropic
|
|
150
163
|
#
|
151
164
|
# @overload results_streaming(message_batch_id, request_options: {})
|
152
165
|
#
|
153
|
-
# @param message_batch_id [String]
|
166
|
+
# @param message_batch_id [String] ID of the Message Batch.
|
167
|
+
#
|
154
168
|
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
155
169
|
#
|
156
|
-
# @return [Anthropic::Internal::JsonLStream<Anthropic::
|
170
|
+
# @return [Anthropic::Internal::JsonLStream<Anthropic::Messages::MessageBatchIndividualResponse>]
|
157
171
|
#
|
158
172
|
# @see Anthropic::Models::Messages::BatchResultsParams
|
159
173
|
def results_streaming(message_batch_id, params = {})
|
@@ -162,7 +176,7 @@ module Anthropic
|
|
162
176
|
path: ["v1/messages/batches/%1$s/results", message_batch_id],
|
163
177
|
headers: {"accept" => "application/x-jsonl"},
|
164
178
|
stream: Anthropic::Internal::JsonLStream,
|
165
|
-
model: Anthropic::
|
179
|
+
model: Anthropic::Messages::MessageBatchIndividualResponse,
|
166
180
|
options: params[:request_options]
|
167
181
|
)
|
168
182
|
end
|
@@ -8,6 +8,9 @@ module Anthropic
|
|
8
8
|
|
9
9
|
# See {Anthropic::Resources::Messages#stream_raw} for streaming counterpart.
|
10
10
|
#
|
11
|
+
# Some parameter documentations has been truncated, see
|
12
|
+
# {Anthropic::Models::MessageCreateParams} for more details.
|
13
|
+
#
|
11
14
|
# Send a structured list of input messages with text and/or image content, and the
|
12
15
|
# model will generate the next message in the conversation.
|
13
16
|
#
|
@@ -18,25 +21,37 @@ module Anthropic
|
|
18
21
|
#
|
19
22
|
# @overload create(max_tokens:, messages:, model:, metadata: nil, stop_sequences: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, request_options: {})
|
20
23
|
#
|
21
|
-
# @param max_tokens [Integer]
|
22
|
-
#
|
23
|
-
# @param
|
24
|
-
#
|
25
|
-
# @param
|
26
|
-
#
|
27
|
-
# @param
|
28
|
-
#
|
29
|
-
# @param
|
30
|
-
#
|
31
|
-
# @param
|
32
|
-
#
|
24
|
+
# @param max_tokens [Integer] The maximum number of tokens to generate before stopping.
|
25
|
+
#
|
26
|
+
# @param messages [Array<Anthropic::MessageParam>] Input messages.
|
27
|
+
#
|
28
|
+
# @param model [Symbol, String, Anthropic::Model] The model that will complete your prompt.\n\nSee [models](https://docs.anthropic
|
29
|
+
#
|
30
|
+
# @param metadata [Anthropic::Metadata] An object describing metadata about the request.
|
31
|
+
#
|
32
|
+
# @param stop_sequences [Array<String>] Custom text sequences that will cause the model to stop generating.
|
33
|
+
#
|
34
|
+
# @param system_ [String, Array<Anthropic::TextBlockParam>] System prompt.
|
35
|
+
#
|
36
|
+
# @param temperature [Float] Amount of randomness injected into the response.
|
37
|
+
#
|
38
|
+
# @param thinking [Anthropic::ThinkingConfigEnabled, Anthropic::ThinkingConfigDisabled] Configuration for enabling Claude's extended thinking.
|
39
|
+
#
|
40
|
+
# @param tool_choice [Anthropic::ToolChoiceAuto, Anthropic::ToolChoiceAny, Anthropic::ToolChoiceTool, Anthropic::ToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
|
41
|
+
#
|
42
|
+
# @param tools [Array<Anthropic::Tool, Anthropic::ToolBash20250124, Anthropic::ToolTextEditor20250124, Anthropic::WebSearchTool20250305>] Definitions of tools that the model may use.
|
43
|
+
#
|
44
|
+
# @param top_k [Integer] Only sample from the top K options for each subsequent token.
|
45
|
+
#
|
46
|
+
# @param top_p [Float] Use nucleus sampling.
|
47
|
+
#
|
33
48
|
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
34
49
|
#
|
35
|
-
# @return [Anthropic::
|
50
|
+
# @return [Anthropic::Message]
|
36
51
|
#
|
37
52
|
# @see Anthropic::Models::MessageCreateParams
|
38
53
|
def create(params)
|
39
|
-
parsed, options = Anthropic::
|
54
|
+
parsed, options = Anthropic::MessageCreateParams.dump_request(params)
|
40
55
|
if parsed[:stream]
|
41
56
|
message = "Please use `#stream_raw` for the streaming use case."
|
42
57
|
raise ArgumentError.new(message)
|
@@ -45,8 +60,8 @@ module Anthropic
|
|
45
60
|
method: :post,
|
46
61
|
path: "v1/messages",
|
47
62
|
body: parsed,
|
48
|
-
model: Anthropic::
|
49
|
-
options: options
|
63
|
+
model: Anthropic::Message,
|
64
|
+
options: {timeout: 600, **options}
|
50
65
|
)
|
51
66
|
end
|
52
67
|
|
@@ -56,6 +71,9 @@ module Anthropic
|
|
56
71
|
|
57
72
|
# See {Anthropic::Resources::Messages#create} for non-streaming counterpart.
|
58
73
|
#
|
74
|
+
# Some parameter documentations has been truncated, see
|
75
|
+
# {Anthropic::Models::MessageCreateParams} for more details.
|
76
|
+
#
|
59
77
|
# Send a structured list of input messages with text and/or image content, and the
|
60
78
|
# model will generate the next message in the conversation.
|
61
79
|
#
|
@@ -66,25 +84,37 @@ module Anthropic
|
|
66
84
|
#
|
67
85
|
# @overload stream_raw(max_tokens:, messages:, model:, metadata: nil, stop_sequences: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, request_options: {})
|
68
86
|
#
|
69
|
-
# @param max_tokens [Integer]
|
70
|
-
#
|
71
|
-
# @param
|
72
|
-
#
|
73
|
-
# @param
|
74
|
-
#
|
75
|
-
# @param
|
76
|
-
#
|
77
|
-
# @param
|
78
|
-
#
|
79
|
-
# @param
|
80
|
-
#
|
87
|
+
# @param max_tokens [Integer] The maximum number of tokens to generate before stopping.
|
88
|
+
#
|
89
|
+
# @param messages [Array<Anthropic::MessageParam>] Input messages.
|
90
|
+
#
|
91
|
+
# @param model [Symbol, String, Anthropic::Model] The model that will complete your prompt.\n\nSee [models](https://docs.anthropic
|
92
|
+
#
|
93
|
+
# @param metadata [Anthropic::Metadata] An object describing metadata about the request.
|
94
|
+
#
|
95
|
+
# @param stop_sequences [Array<String>] Custom text sequences that will cause the model to stop generating.
|
96
|
+
#
|
97
|
+
# @param system_ [String, Array<Anthropic::TextBlockParam>] System prompt.
|
98
|
+
#
|
99
|
+
# @param temperature [Float] Amount of randomness injected into the response.
|
100
|
+
#
|
101
|
+
# @param thinking [Anthropic::ThinkingConfigEnabled, Anthropic::ThinkingConfigDisabled] Configuration for enabling Claude's extended thinking.
|
102
|
+
#
|
103
|
+
# @param tool_choice [Anthropic::ToolChoiceAuto, Anthropic::ToolChoiceAny, Anthropic::ToolChoiceTool, Anthropic::ToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
|
104
|
+
#
|
105
|
+
# @param tools [Array<Anthropic::Tool, Anthropic::ToolBash20250124, Anthropic::ToolTextEditor20250124, Anthropic::WebSearchTool20250305>] Definitions of tools that the model may use.
|
106
|
+
#
|
107
|
+
# @param top_k [Integer] Only sample from the top K options for each subsequent token.
|
108
|
+
#
|
109
|
+
# @param top_p [Float] Use nucleus sampling.
|
110
|
+
#
|
81
111
|
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
82
112
|
#
|
83
|
-
# @return [Anthropic::Internal::Stream<Anthropic::
|
113
|
+
# @return [Anthropic::Internal::Stream<Anthropic::RawMessageStartEvent, Anthropic::RawMessageDeltaEvent, Anthropic::RawMessageStopEvent, Anthropic::RawContentBlockStartEvent, Anthropic::RawContentBlockDeltaEvent, Anthropic::RawContentBlockStopEvent>]
|
84
114
|
#
|
85
115
|
# @see Anthropic::Models::MessageCreateParams
|
86
116
|
def stream_raw(params)
|
87
|
-
parsed, options = Anthropic::
|
117
|
+
parsed, options = Anthropic::MessageCreateParams.dump_request(params)
|
88
118
|
unless parsed.fetch(:stream, true)
|
89
119
|
message = "Please use `#create` for the non-streaming use case."
|
90
120
|
raise ArgumentError.new(message)
|
@@ -96,11 +126,14 @@ module Anthropic
|
|
96
126
|
headers: {"accept" => "text/event-stream"},
|
97
127
|
body: parsed,
|
98
128
|
stream: Anthropic::Internal::Stream,
|
99
|
-
model: Anthropic::
|
100
|
-
options: options
|
129
|
+
model: Anthropic::RawMessageStreamEvent,
|
130
|
+
options: {timeout: 600, **options}
|
101
131
|
)
|
102
132
|
end
|
103
133
|
|
134
|
+
# Some parameter documentations has been truncated, see
|
135
|
+
# {Anthropic::Models::MessageCountTokensParams} for more details.
|
136
|
+
#
|
104
137
|
# Count the number of tokens in a Message.
|
105
138
|
#
|
106
139
|
# The Token Count API can be used to count the number of tokens in a Message,
|
@@ -111,24 +144,30 @@ module Anthropic
|
|
111
144
|
#
|
112
145
|
# @overload count_tokens(messages:, model:, system_: nil, thinking: nil, tool_choice: nil, tools: nil, request_options: {})
|
113
146
|
#
|
114
|
-
# @param messages [Array<Anthropic::
|
115
|
-
#
|
116
|
-
# @param
|
117
|
-
#
|
118
|
-
# @param
|
119
|
-
#
|
147
|
+
# @param messages [Array<Anthropic::MessageParam>] Input messages.
|
148
|
+
#
|
149
|
+
# @param model [Symbol, String, Anthropic::Model] The model that will complete your prompt.\n\nSee [models](https://docs.anthropic
|
150
|
+
#
|
151
|
+
# @param system_ [String, Array<Anthropic::TextBlockParam>] System prompt.
|
152
|
+
#
|
153
|
+
# @param thinking [Anthropic::ThinkingConfigEnabled, Anthropic::ThinkingConfigDisabled] Configuration for enabling Claude's extended thinking.
|
154
|
+
#
|
155
|
+
# @param tool_choice [Anthropic::ToolChoiceAuto, Anthropic::ToolChoiceAny, Anthropic::ToolChoiceTool, Anthropic::ToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
|
156
|
+
#
|
157
|
+
# @param tools [Array<Anthropic::Tool, Anthropic::ToolBash20250124, Anthropic::ToolTextEditor20250124, Anthropic::WebSearchTool20250305>] Definitions of tools that the model may use.
|
158
|
+
#
|
120
159
|
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
121
160
|
#
|
122
|
-
# @return [Anthropic::
|
161
|
+
# @return [Anthropic::MessageTokensCount]
|
123
162
|
#
|
124
163
|
# @see Anthropic::Models::MessageCountTokensParams
|
125
164
|
def count_tokens(params)
|
126
|
-
parsed, options = Anthropic::
|
165
|
+
parsed, options = Anthropic::MessageCountTokensParams.dump_request(params)
|
127
166
|
@client.request(
|
128
167
|
method: :post,
|
129
168
|
path: "v1/messages/count_tokens",
|
130
169
|
body: parsed,
|
131
|
-
model: Anthropic::
|
170
|
+
model: Anthropic::MessageTokensCount,
|
132
171
|
options: options
|
133
172
|
)
|
134
173
|
end
|
@@ -8,46 +8,61 @@ module Anthropic
|
|
8
8
|
# The Models API response can be used to determine information about a specific
|
9
9
|
# model or resolve a model alias to a model ID.
|
10
10
|
#
|
11
|
-
# @overload retrieve(model_id, request_options: {})
|
11
|
+
# @overload retrieve(model_id, betas: nil, request_options: {})
|
12
|
+
#
|
13
|
+
# @param model_id [String] Model identifier or alias.
|
14
|
+
#
|
15
|
+
# @param betas [Array<String, Symbol, Anthropic::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
|
12
16
|
#
|
13
|
-
# @param model_id [String]
|
14
17
|
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
15
18
|
#
|
16
|
-
# @return [Anthropic::
|
19
|
+
# @return [Anthropic::ModelInfo]
|
17
20
|
#
|
18
21
|
# @see Anthropic::Models::ModelRetrieveParams
|
19
22
|
def retrieve(model_id, params = {})
|
23
|
+
parsed, options = Anthropic::ModelRetrieveParams.dump_request(params)
|
20
24
|
@client.request(
|
21
25
|
method: :get,
|
22
26
|
path: ["v1/models/%1$s", model_id],
|
23
|
-
|
24
|
-
|
27
|
+
headers: parsed.transform_keys(betas: "anthropic-beta"),
|
28
|
+
model: Anthropic::ModelInfo,
|
29
|
+
options: options
|
25
30
|
)
|
26
31
|
end
|
27
32
|
|
33
|
+
# Some parameter documentations has been truncated, see
|
34
|
+
# {Anthropic::Models::ModelListParams} for more details.
|
35
|
+
#
|
28
36
|
# List available models.
|
29
37
|
#
|
30
38
|
# The Models API response can be used to determine which models are available for
|
31
39
|
# use in the API. More recently released models are listed first.
|
32
40
|
#
|
33
|
-
# @overload list(after_id: nil, before_id: nil, limit: nil, request_options: {})
|
41
|
+
# @overload list(after_id: nil, before_id: nil, limit: nil, betas: nil, request_options: {})
|
42
|
+
#
|
43
|
+
# @param after_id [String] Query param: ID of the object to use as a cursor for pagination. When provided,
|
44
|
+
#
|
45
|
+
# @param before_id [String] Query param: ID of the object to use as a cursor for pagination. When provided,
|
46
|
+
#
|
47
|
+
# @param limit [Integer] Query param: Number of items to return per page.
|
48
|
+
#
|
49
|
+
# @param betas [Array<String, Symbol, Anthropic::AnthropicBeta>] Header param: Optional header to specify the beta version(s) you want to use.
|
34
50
|
#
|
35
|
-
# @param after_id [String]
|
36
|
-
# @param before_id [String]
|
37
|
-
# @param limit [Integer]
|
38
51
|
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
39
52
|
#
|
40
|
-
# @return [Anthropic::Internal::Page<Anthropic::
|
53
|
+
# @return [Anthropic::Internal::Page<Anthropic::ModelInfo>]
|
41
54
|
#
|
42
55
|
# @see Anthropic::Models::ModelListParams
|
43
56
|
def list(params = {})
|
44
|
-
parsed, options = Anthropic::
|
57
|
+
parsed, options = Anthropic::ModelListParams.dump_request(params)
|
58
|
+
query_params = [:after_id, :before_id, :limit]
|
45
59
|
@client.request(
|
46
60
|
method: :get,
|
47
61
|
path: "v1/models",
|
48
|
-
query: parsed,
|
62
|
+
query: parsed.slice(*query_params),
|
63
|
+
headers: parsed.except(*query_params).transform_keys(betas: "anthropic-beta"),
|
49
64
|
page: Anthropic::Internal::Page,
|
50
|
-
model: Anthropic::
|
65
|
+
model: Anthropic::ModelInfo,
|
51
66
|
options: options
|
52
67
|
)
|
53
68
|
end
|
data/lib/anthropic/version.rb
CHANGED
data/lib/anthropic.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Standard libraries.
|
4
|
+
# rubocop:disable Lint/RedundantRequireStatement
|
4
5
|
require "English"
|
5
6
|
require "cgi"
|
6
7
|
require "date"
|
@@ -15,19 +16,11 @@ require "set"
|
|
15
16
|
require "stringio"
|
16
17
|
require "time"
|
17
18
|
require "uri"
|
19
|
+
# rubocop:enable Lint/RedundantRequireStatement
|
18
20
|
|
19
21
|
# We already ship the preferred sorbet manifests in the package itself.
|
20
22
|
# `tapioca` currently does not offer us a way to opt out of unnecessary compilation.
|
21
23
|
if Object.const_defined?(:Tapioca) && caller.chain([$PROGRAM_NAME]).chain(ARGV).grep(/tapioca/)
|
22
|
-
Warning.warn(
|
23
|
-
<<~WARN
|
24
|
-
\n
|
25
|
-
⚠️ skipped loading of "anthropic" gem under `tapioca`.
|
26
|
-
|
27
|
-
This message is normal and expected if you are running a `tapioca` command, and does not impact `.rbi` generation.
|
28
|
-
\n
|
29
|
-
WARN
|
30
|
-
)
|
31
24
|
return
|
32
25
|
end
|
33
26
|
|
@@ -40,7 +33,7 @@ require_relative "anthropic/internal/util"
|
|
40
33
|
require_relative "anthropic/internal/type/converter"
|
41
34
|
require_relative "anthropic/internal/type/unknown"
|
42
35
|
require_relative "anthropic/internal/type/boolean"
|
43
|
-
require_relative "anthropic/internal/type/
|
36
|
+
require_relative "anthropic/internal/type/file_input"
|
44
37
|
require_relative "anthropic/internal/type/enum"
|
45
38
|
require_relative "anthropic/internal/type/union"
|
46
39
|
require_relative "anthropic/internal/type/array_of"
|
@@ -51,12 +44,15 @@ require_relative "anthropic/internal/type/base_stream"
|
|
51
44
|
require_relative "anthropic/internal/type/request_parameters"
|
52
45
|
require_relative "anthropic/internal"
|
53
46
|
require_relative "anthropic/request_options"
|
47
|
+
require_relative "anthropic/file_part"
|
54
48
|
require_relative "anthropic/errors"
|
55
49
|
require_relative "anthropic/internal/transport/base_client"
|
56
50
|
require_relative "anthropic/internal/transport/pooled_net_requester"
|
57
51
|
require_relative "anthropic/client"
|
58
|
-
require_relative "anthropic/bedrock/client"
|
59
|
-
require_relative "anthropic/vertex/client"
|
52
|
+
require_relative "anthropic/helpers/bedrock/client"
|
53
|
+
require_relative "anthropic/helpers/vertex/client"
|
54
|
+
require_relative "anthropic/bedrock"
|
55
|
+
require_relative "anthropic/vertex"
|
60
56
|
require_relative "anthropic/internal/stream"
|
61
57
|
require_relative "anthropic/internal/jsonl_stream"
|
62
58
|
require_relative "anthropic/internal/page"
|
@@ -77,6 +73,8 @@ require_relative "anthropic/models/beta/beta_citation_page_location"
|
|
77
73
|
require_relative "anthropic/models/beta/beta_citation_page_location_param"
|
78
74
|
require_relative "anthropic/models/beta/beta_citations_config_param"
|
79
75
|
require_relative "anthropic/models/beta/beta_citations_delta"
|
76
|
+
require_relative "anthropic/models/beta/beta_citations_web_search_result_location"
|
77
|
+
require_relative "anthropic/models/beta/beta_citation_web_search_result_location_param"
|
80
78
|
require_relative "anthropic/models/beta/beta_content_block"
|
81
79
|
require_relative "anthropic/models/beta/beta_content_block_param"
|
82
80
|
require_relative "anthropic/models/beta/beta_content_block_source"
|
@@ -100,6 +98,9 @@ require_relative "anthropic/models/beta/beta_raw_message_stop_event"
|
|
100
98
|
require_relative "anthropic/models/beta/beta_raw_message_stream_event"
|
101
99
|
require_relative "anthropic/models/beta/beta_redacted_thinking_block"
|
102
100
|
require_relative "anthropic/models/beta/beta_redacted_thinking_block_param"
|
101
|
+
require_relative "anthropic/models/beta/beta_server_tool_usage"
|
102
|
+
require_relative "anthropic/models/beta/beta_server_tool_use_block"
|
103
|
+
require_relative "anthropic/models/beta/beta_server_tool_use_block_param"
|
103
104
|
require_relative "anthropic/models/beta/beta_signature_delta"
|
104
105
|
require_relative "anthropic/models/beta/beta_stop_reason"
|
105
106
|
require_relative "anthropic/models/beta/beta_text_block"
|
@@ -132,6 +133,15 @@ require_relative "anthropic/models/beta/beta_tool_use_block_param"
|
|
132
133
|
require_relative "anthropic/models/beta/beta_url_image_source"
|
133
134
|
require_relative "anthropic/models/beta/beta_url_pdf_source"
|
134
135
|
require_relative "anthropic/models/beta/beta_usage"
|
136
|
+
require_relative "anthropic/models/beta/beta_web_search_result_block"
|
137
|
+
require_relative "anthropic/models/beta/beta_web_search_result_block_param"
|
138
|
+
require_relative "anthropic/models/beta/beta_web_search_tool_20250305"
|
139
|
+
require_relative "anthropic/models/beta/beta_web_search_tool_request_error"
|
140
|
+
require_relative "anthropic/models/beta/beta_web_search_tool_result_block"
|
141
|
+
require_relative "anthropic/models/beta/beta_web_search_tool_result_block_content"
|
142
|
+
require_relative "anthropic/models/beta/beta_web_search_tool_result_block_param"
|
143
|
+
require_relative "anthropic/models/beta/beta_web_search_tool_result_block_param_content"
|
144
|
+
require_relative "anthropic/models/beta/beta_web_search_tool_result_error"
|
135
145
|
require_relative "anthropic/models/beta/message_count_tokens_params"
|
136
146
|
require_relative "anthropic/models/beta/message_create_params"
|
137
147
|
require_relative "anthropic/models/beta/messages/batch_cancel_params"
|
@@ -172,6 +182,8 @@ require_relative "anthropic/models/citation_page_location"
|
|
172
182
|
require_relative "anthropic/models/citation_page_location_param"
|
173
183
|
require_relative "anthropic/models/citations_config_param"
|
174
184
|
require_relative "anthropic/models/citations_delta"
|
185
|
+
require_relative "anthropic/models/citations_web_search_result_location"
|
186
|
+
require_relative "anthropic/models/citation_web_search_result_location_param"
|
175
187
|
require_relative "anthropic/models/completion"
|
176
188
|
require_relative "anthropic/models/completion_create_params"
|
177
189
|
require_relative "anthropic/models/content_block"
|
@@ -227,6 +239,9 @@ require_relative "anthropic/models/raw_message_stop_event"
|
|
227
239
|
require_relative "anthropic/models/raw_message_stream_event"
|
228
240
|
require_relative "anthropic/models/redacted_thinking_block"
|
229
241
|
require_relative "anthropic/models/redacted_thinking_block_param"
|
242
|
+
require_relative "anthropic/models/server_tool_usage"
|
243
|
+
require_relative "anthropic/models/server_tool_use_block"
|
244
|
+
require_relative "anthropic/models/server_tool_use_block_param"
|
230
245
|
require_relative "anthropic/models/signature_delta"
|
231
246
|
require_relative "anthropic/models/stop_reason"
|
232
247
|
require_relative "anthropic/models/text_block"
|
@@ -255,6 +270,16 @@ require_relative "anthropic/models/tool_use_block_param"
|
|
255
270
|
require_relative "anthropic/models/url_image_source"
|
256
271
|
require_relative "anthropic/models/url_pdf_source"
|
257
272
|
require_relative "anthropic/models/usage"
|
273
|
+
require_relative "anthropic/models/web_search_result_block"
|
274
|
+
require_relative "anthropic/models/web_search_result_block_param"
|
275
|
+
require_relative "anthropic/models/web_search_tool_20250305"
|
276
|
+
require_relative "anthropic/models/web_search_tool_request_error"
|
277
|
+
require_relative "anthropic/models/web_search_tool_result_block"
|
278
|
+
require_relative "anthropic/models/web_search_tool_result_block_content"
|
279
|
+
require_relative "anthropic/models/web_search_tool_result_block_param"
|
280
|
+
require_relative "anthropic/models/web_search_tool_result_block_param_content"
|
281
|
+
require_relative "anthropic/models/web_search_tool_result_error"
|
282
|
+
require_relative "anthropic/models"
|
258
283
|
require_relative "anthropic/resources/beta"
|
259
284
|
require_relative "anthropic/resources/beta/messages"
|
260
285
|
require_relative "anthropic/resources/beta/messages/batches"
|
@@ -30,15 +30,18 @@ module Anthropic
|
|
30
30
|
|
31
31
|
# @api private
|
32
32
|
sig { override.returns(T::Hash[String, String]) }
|
33
|
-
private def auth_headers
|
33
|
+
private def auth_headers
|
34
|
+
end
|
34
35
|
|
35
36
|
# @api private
|
36
37
|
sig { returns(T::Hash[String, String]) }
|
37
|
-
private def api_key_auth
|
38
|
+
private def api_key_auth
|
39
|
+
end
|
38
40
|
|
39
41
|
# @api private
|
40
42
|
sig { returns(T::Hash[String, String]) }
|
41
|
-
private def bearer_auth
|
43
|
+
private def bearer_auth
|
44
|
+
end
|
42
45
|
|
43
46
|
# Creates and returns a new client for interacting with the API.
|
44
47
|
sig do
|
@@ -50,21 +53,22 @@ module Anthropic
|
|
50
53
|
timeout: Float,
|
51
54
|
initial_retry_delay: Float,
|
52
55
|
max_retry_delay: Float
|
53
|
-
)
|
54
|
-
.returns(T.attached_class)
|
56
|
+
).returns(T.attached_class)
|
55
57
|
end
|
56
58
|
def self.new(
|
57
59
|
# Defaults to `ENV["ANTHROPIC_API_KEY"]`
|
58
60
|
api_key: ENV["ANTHROPIC_API_KEY"],
|
59
61
|
# Defaults to `ENV["ANTHROPIC_AUTH_TOKEN"]`
|
60
62
|
auth_token: ENV["ANTHROPIC_AUTH_TOKEN"],
|
61
|
-
# Override the default base URL for the API, e.g.,
|
62
|
-
|
63
|
+
# Override the default base URL for the API, e.g.,
|
64
|
+
# `"https://api.example.com/v2/"`. Defaults to `ENV["ANTHROPIC_BASE_URL"]`
|
65
|
+
base_url: ENV["ANTHROPIC_BASE_URL"],
|
63
66
|
# Max number of retries to attempt after a failed retryable request.
|
64
|
-
max_retries: DEFAULT_MAX_RETRIES,
|
65
|
-
timeout: DEFAULT_TIMEOUT_IN_SECONDS,
|
66
|
-
initial_retry_delay: DEFAULT_INITIAL_RETRY_DELAY,
|
67
|
-
max_retry_delay: DEFAULT_MAX_RETRY_DELAY
|
68
|
-
)
|
67
|
+
max_retries: Anthropic::Client::DEFAULT_MAX_RETRIES,
|
68
|
+
timeout: Anthropic::Client::DEFAULT_TIMEOUT_IN_SECONDS,
|
69
|
+
initial_retry_delay: Anthropic::Client::DEFAULT_INITIAL_RETRY_DELAY,
|
70
|
+
max_retry_delay: Anthropic::Client::DEFAULT_MAX_RETRY_DELAY
|
71
|
+
)
|
72
|
+
end
|
69
73
|
end
|
70
74
|
end
|