anthropic 1.70.0 → 1.71.0
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/CHANGELOG.md +44 -0
- data/README.md +1 -1
- data/lib/anthropic/client.rb +6 -0
- data/lib/anthropic/internal/transport/base_client.rb +12 -8
- data/lib/anthropic/internal/transport/pooled_net_requester.rb +63 -4
- data/lib/anthropic/internal/type/union.rb +6 -2
- data/lib/anthropic/internal/util.rb +3 -1
- data/lib/anthropic/models/anthropic_beta.rb +7 -4
- data/lib/anthropic/models/beta/agent_archive_params.rb +2 -2
- data/lib/anthropic/models/beta/agent_create_params.rb +8 -8
- data/lib/anthropic/models/beta/agent_list_params.rb +2 -2
- data/lib/anthropic/models/beta/agent_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/agent_update_params.rb +8 -8
- data/lib/anthropic/models/beta/agents/version_list_params.rb +2 -2
- data/lib/anthropic/models/beta/beta_browser_state_change.rb +0 -6
- data/lib/anthropic/models/beta/beta_code_execution_tool_result_block.rb +1 -4
- data/lib/anthropic/models/beta/beta_code_execution_tool_result_block_content.rb +0 -1
- data/lib/anthropic/models/beta/beta_code_execution_tool_result_block_param.rb +1 -2
- data/lib/anthropic/models/beta/beta_code_execution_tool_result_block_param_content.rb +0 -1
- data/lib/anthropic/models/beta/beta_compaction_block.rb +9 -1
- data/lib/anthropic/models/beta/beta_compaction_block_param.rb +9 -1
- data/lib/anthropic/models/beta/beta_compaction_capability.rb +32 -0
- data/lib/anthropic/models/beta/beta_compaction_config.rb +40 -0
- data/lib/anthropic/models/beta/beta_content_block.rb +3 -4
- data/lib/anthropic/models/beta/beta_content_block_param.rb +4 -5
- data/lib/anthropic/models/beta/beta_context_management_config.rb +0 -2
- data/lib/anthropic/models/beta/beta_dream.rb +1 -4
- data/lib/anthropic/models/beta/beta_dream_input.rb +0 -3
- data/lib/anthropic/models/beta/beta_dreaming_error.rb +0 -7
- data/lib/anthropic/models/beta/beta_fallback_message_iteration_usage.rb +5 -4
- data/lib/anthropic/models/beta/beta_fallbacks_param.rb +3 -3
- data/lib/anthropic/models/beta/beta_input_transformation.rb +62 -0
- data/lib/anthropic/models/beta/beta_iterations_usage.rb +7 -6
- data/lib/anthropic/models/beta/beta_managed_agents_agent_with_overrides_params.rb +6 -6
- data/lib/anthropic/models/beta/beta_managed_agents_multiagent_coordinator_params.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_multiagent_params.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_multiagent_roster_entry_params.rb +3 -3
- data/lib/anthropic/models/beta/beta_managed_agents_user_tool_result_event.rb +3 -3
- data/lib/anthropic/models/beta/beta_message.rb +21 -18
- data/lib/anthropic/models/beta/beta_message_iteration_usage.rb +3 -3
- data/lib/anthropic/models/beta/beta_model_capabilities.rb +14 -1
- data/lib/anthropic/models/beta/beta_output_behavior.rb +0 -3
- data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +4 -9
- data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +20 -17
- data/lib/anthropic/models/beta/beta_raw_message_stream_event.rb +2 -2
- data/lib/anthropic/models/beta/beta_request_tool_addition_block.rb +1 -11
- data/lib/anthropic/models/beta/beta_request_tool_removal_block.rb +1 -11
- data/lib/anthropic/models/beta/beta_server_tool_use_block.rb +1 -8
- data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +1 -4
- data/lib/anthropic/models/beta/beta_summarize_compaction.rb +40 -0
- data/lib/anthropic/models/beta/beta_thinking_mismatch_allowed_input_transformation.rb +73 -0
- data/lib/anthropic/models/beta/beta_tool_result_block_param.rb +0 -1
- data/lib/anthropic/models/beta/beta_tool_union.rb +0 -2
- data/lib/anthropic/models/beta/beta_tool_use_block.rb +1 -4
- data/lib/anthropic/models/beta/beta_tool_use_block_param.rb +1 -4
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20250910.rb +14 -1
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20260209.rb +14 -1
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20260309.rb +14 -1
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20260318.rb +14 -1
- data/lib/anthropic/models/beta/beta_web_fetch_tool_result_block.rb +1 -7
- data/lib/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rb +1 -4
- data/lib/anthropic/models/beta/beta_web_fetch_url_source_all.rb +22 -0
- data/lib/anthropic/models/beta/beta_web_fetch_url_source_except.rb +29 -0
- data/lib/anthropic/models/beta/beta_web_fetch_url_source_none.rb +22 -0
- data/lib/anthropic/models/beta/beta_web_fetch_url_source_only.rb +28 -0
- data/lib/anthropic/models/beta/beta_web_fetch_url_source_tool_reference.rb +28 -0
- data/lib/anthropic/models/beta/beta_web_fetch_url_sources.rb +234 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_result_block.rb +1 -7
- data/lib/anthropic/models/beta/beta_web_search_tool_result_block_param.rb +3 -6
- data/lib/anthropic/models/beta/beta_web_search_tool_result_block_param_content.rb +3 -3
- data/lib/anthropic/models/beta/deployment_archive_params.rb +2 -2
- data/lib/anthropic/models/beta/deployment_create_params.rb +7 -7
- data/lib/anthropic/models/beta/deployment_list_params.rb +2 -2
- data/lib/anthropic/models/beta/deployment_pause_params.rb +2 -2
- data/lib/anthropic/models/beta/deployment_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/deployment_run_list_params.rb +2 -2
- data/lib/anthropic/models/beta/deployment_run_params.rb +2 -2
- data/lib/anthropic/models/beta/deployment_run_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/deployment_unpause_params.rb +2 -2
- data/lib/anthropic/models/beta/deployment_update_params.rb +7 -7
- data/lib/anthropic/models/beta/dream_archive_params.rb +2 -2
- data/lib/anthropic/models/beta/dream_cancel_params.rb +2 -2
- data/lib/anthropic/models/beta/dream_create_params.rb +8 -16
- data/lib/anthropic/models/beta/dream_list_params.rb +2 -2
- data/lib/anthropic/models/beta/dream_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/environment_archive_params.rb +2 -2
- data/lib/anthropic/models/beta/environment_create_params.rb +2 -2
- data/lib/anthropic/models/beta/environment_delete_params.rb +2 -2
- data/lib/anthropic/models/beta/environment_list_params.rb +2 -2
- data/lib/anthropic/models/beta/environment_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/environment_update_params.rb +2 -2
- data/lib/anthropic/models/beta/environments/work_ack_params.rb +2 -2
- data/lib/anthropic/models/beta/environments/work_heartbeat_params.rb +2 -2
- data/lib/anthropic/models/beta/environments/work_list_params.rb +2 -2
- data/lib/anthropic/models/beta/environments/work_poll_params.rb +2 -2
- data/lib/anthropic/models/beta/environments/work_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/environments/work_stats_params.rb +2 -2
- data/lib/anthropic/models/beta/environments/work_stop_params.rb +2 -2
- data/lib/anthropic/models/beta/environments/work_update_params.rb +2 -2
- data/lib/anthropic/models/beta/file_delete_params.rb +2 -2
- data/lib/anthropic/models/beta/file_download_params.rb +2 -2
- data/lib/anthropic/models/beta/file_list_params.rb +2 -2
- data/lib/anthropic/models/beta/file_retrieve_metadata_params.rb +2 -2
- data/lib/anthropic/models/beta/file_upload_params.rb +2 -2
- data/lib/anthropic/models/beta/memory_store_archive_params.rb +2 -2
- data/lib/anthropic/models/beta/memory_store_create_params.rb +2 -2
- data/lib/anthropic/models/beta/memory_store_delete_params.rb +2 -2
- data/lib/anthropic/models/beta/memory_store_list_params.rb +2 -2
- data/lib/anthropic/models/beta/memory_store_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/memory_store_update_params.rb +2 -2
- data/lib/anthropic/models/beta/memory_stores/memory_create_params.rb +2 -2
- data/lib/anthropic/models/beta/memory_stores/memory_delete_params.rb +2 -2
- data/lib/anthropic/models/beta/memory_stores/memory_list_params.rb +2 -2
- data/lib/anthropic/models/beta/memory_stores/memory_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/memory_stores/memory_update_params.rb +2 -2
- data/lib/anthropic/models/beta/memory_stores/memory_version_list_params.rb +2 -2
- data/lib/anthropic/models/beta/memory_stores/memory_version_redact_params.rb +2 -2
- data/lib/anthropic/models/beta/memory_stores/memory_version_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +18 -5
- data/lib/anthropic/models/beta/message_create_params.rb +26 -11
- data/lib/anthropic/models/beta/messages/batch_cancel_params.rb +2 -2
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +26 -11
- data/lib/anthropic/models/beta/messages/batch_delete_params.rb +2 -2
- data/lib/anthropic/models/beta/messages/batch_list_params.rb +2 -2
- data/lib/anthropic/models/beta/messages/batch_results_params.rb +2 -2
- data/lib/anthropic/models/beta/messages/batch_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/model_list_params.rb +2 -2
- data/lib/anthropic/models/beta/model_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/beta_data_residency.rb +41 -12
- data/lib/anthropic/models/beta/organization/beta_data_residency_create_config.rb +5 -5
- data/lib/anthropic/models/beta/organization/beta_data_residency_update_config.rb +5 -5
- data/lib/anthropic/models/beta/organization/federation/issuer_archive_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/federation/issuer_create_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/federation/issuer_list_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/federation/issuer_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/federation/issuer_update_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/federation/rule_archive_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/federation/rule_create_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/federation/rule_list_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/federation/rule_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/federation/rule_update_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/federation/rules/workspace_add_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/federation/rules/workspace_list_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/federation/rules/workspace_remove_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/service_account_archive_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/service_account_create_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/service_account_list_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/service_account_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/service_account_update_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/service_accounts/workspace_add_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/service_accounts/workspace_list_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/service_accounts/workspace_remove_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/workspace_create_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/workspaces/service_account_add_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/workspaces/service_account_list_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/workspaces/service_account_remove_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/workspaces/service_account_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/organization/workspaces/service_account_update_params.rb +2 -2
- data/lib/anthropic/models/beta/session_archive_params.rb +2 -2
- data/lib/anthropic/models/beta/session_create_params.rb +7 -7
- data/lib/anthropic/models/beta/session_delete_params.rb +2 -2
- data/lib/anthropic/models/beta/session_list_params.rb +2 -2
- data/lib/anthropic/models/beta/session_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/session_update_params.rb +2 -2
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_agent_custom_tool_use_event.rb +3 -1
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_agent_mcp_tool_use_event.rb +2 -2
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_agent_tool_use_event.rb +3 -2
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_session_error_event.rb +1 -12
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_session_event.rb +2 -2
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_session_resource.rb +0 -2
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_session_status_idle_event.rb +1 -4
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread_status_idle_event.rb +1 -4
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_stream_session_events.rb +2 -2
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_stream_session_thread_events.rb +2 -2
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_user_custom_tool_result_event.rb +3 -3
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_user_tool_confirmation_event.rb +3 -4
- data/lib/anthropic/models/beta/sessions/event_list_params.rb +2 -2
- data/lib/anthropic/models/beta/sessions/event_send_params.rb +2 -2
- data/lib/anthropic/models/beta/sessions/event_stream_params.rb +2 -2
- data/lib/anthropic/models/beta/sessions/resource_add_params.rb +2 -2
- data/lib/anthropic/models/beta/sessions/resource_delete_params.rb +2 -2
- data/lib/anthropic/models/beta/sessions/resource_list_params.rb +2 -2
- data/lib/anthropic/models/beta/sessions/resource_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/sessions/resource_update_params.rb +2 -2
- data/lib/anthropic/models/beta/sessions/thread_archive_params.rb +2 -2
- data/lib/anthropic/models/beta/sessions/thread_list_params.rb +2 -2
- data/lib/anthropic/models/beta/sessions/thread_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/sessions/threads/event_list_params.rb +2 -2
- data/lib/anthropic/models/beta/sessions/threads/event_stream_params.rb +2 -2
- data/lib/anthropic/models/beta/skill_create_params.rb +2 -2
- data/lib/anthropic/models/beta/skill_delete_params.rb +2 -2
- data/lib/anthropic/models/beta/skill_list_params.rb +2 -2
- data/lib/anthropic/models/beta/skill_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/skills/version_create_params.rb +2 -2
- data/lib/anthropic/models/beta/skills/version_delete_params.rb +2 -2
- data/lib/anthropic/models/beta/skills/version_download_params.rb +2 -2
- data/lib/anthropic/models/beta/skills/version_list_params.rb +2 -2
- data/lib/anthropic/models/beta/skills/version_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/tunnel_archive_params.rb +2 -2
- data/lib/anthropic/models/beta/tunnel_create_params.rb +2 -2
- data/lib/anthropic/models/beta/tunnel_list_params.rb +2 -2
- data/lib/anthropic/models/beta/tunnel_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/tunnel_reveal_token_params.rb +2 -2
- data/lib/anthropic/models/beta/tunnel_rotate_token_params.rb +2 -2
- data/lib/anthropic/models/beta/tunnels/certificate_archive_params.rb +2 -2
- data/lib/anthropic/models/beta/tunnels/certificate_create_params.rb +2 -2
- data/lib/anthropic/models/beta/tunnels/certificate_list_params.rb +2 -2
- data/lib/anthropic/models/beta/tunnels/certificate_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/user_profile_create_enrollment_url_params.rb +10 -3
- data/lib/anthropic/models/beta/user_profile_create_params.rb +10 -3
- data/lib/anthropic/models/beta/user_profile_list_params.rb +10 -3
- data/lib/anthropic/models/beta/user_profile_retrieve_params.rb +10 -3
- data/lib/anthropic/models/beta/user_profile_update_params.rb +10 -3
- data/lib/anthropic/models/beta/vault_archive_params.rb +2 -2
- data/lib/anthropic/models/beta/vault_create_params.rb +2 -2
- data/lib/anthropic/models/beta/vault_delete_params.rb +2 -2
- data/lib/anthropic/models/beta/vault_list_params.rb +2 -2
- data/lib/anthropic/models/beta/vault_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/vault_update_params.rb +2 -2
- data/lib/anthropic/models/beta/vaults/beta_managed_agents_credential_networking_params.rb +0 -3
- data/lib/anthropic/models/beta/vaults/beta_managed_agents_mcp_oauth_refresh_params.rb +1 -4
- data/lib/anthropic/models/beta/vaults/beta_managed_agents_mcp_oauth_refresh_response.rb +1 -4
- data/lib/anthropic/models/beta/vaults/beta_managed_agents_mcp_oauth_refresh_update_params.rb +1 -4
- data/lib/anthropic/models/beta/vaults/credential_archive_params.rb +2 -2
- data/lib/anthropic/models/beta/vaults/credential_create_params.rb +2 -2
- data/lib/anthropic/models/beta/vaults/credential_delete_params.rb +2 -2
- data/lib/anthropic/models/beta/vaults/credential_list_params.rb +2 -2
- data/lib/anthropic/models/beta/vaults/credential_mcp_oauth_validate_params.rb +2 -2
- data/lib/anthropic/models/beta/vaults/credential_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/vaults/credential_update_params.rb +2 -2
- data/lib/anthropic/models/browser_state_change.rb +0 -6
- data/lib/anthropic/models/code_execution_tool_result_block.rb +1 -4
- data/lib/anthropic/models/code_execution_tool_result_block_content.rb +0 -1
- data/lib/anthropic/models/code_execution_tool_result_block_param.rb +1 -2
- data/lib/anthropic/models/code_execution_tool_result_block_param_content.rb +0 -1
- data/lib/anthropic/models/completion_create_params.rb +3 -3
- data/lib/anthropic/models/content_block.rb +2 -3
- data/lib/anthropic/models/content_block_param.rb +2 -3
- data/lib/anthropic/models/message_count_tokens_tool.rb +0 -2
- data/lib/anthropic/models/message_create_params.rb +1 -1
- data/lib/anthropic/models/messages/batch_create_params.rb +1 -1
- data/lib/anthropic/models/model_list_params.rb +2 -2
- data/lib/anthropic/models/model_retrieve_params.rb +2 -2
- data/lib/anthropic/models/raw_content_block_start_event.rb +3 -8
- data/lib/anthropic/models/raw_message_stream_event.rb +1 -1
- data/lib/anthropic/models/server_tool_use_block.rb +1 -8
- data/lib/anthropic/models/server_tool_use_block_param.rb +1 -4
- data/lib/anthropic/models/tool_result_block_param.rb +0 -1
- data/lib/anthropic/models/tool_union.rb +0 -2
- data/lib/anthropic/models/tool_use_block.rb +2 -4
- data/lib/anthropic/models/tool_use_block_param.rb +1 -4
- data/lib/anthropic/models/web_fetch_tool_20250910.rb +14 -1
- data/lib/anthropic/models/web_fetch_tool_20260209.rb +14 -1
- data/lib/anthropic/models/web_fetch_tool_20260309.rb +14 -1
- data/lib/anthropic/models/web_fetch_tool_20260318.rb +14 -1
- data/lib/anthropic/models/web_fetch_tool_result_block.rb +1 -7
- data/lib/anthropic/models/web_fetch_tool_result_block_param.rb +1 -4
- data/lib/anthropic/models/web_fetch_url_source_all.rb +18 -0
- data/lib/anthropic/models/web_fetch_url_source_except.rb +24 -0
- data/lib/anthropic/models/web_fetch_url_source_none.rb +18 -0
- data/lib/anthropic/models/web_fetch_url_source_only.rb +23 -0
- data/lib/anthropic/models/web_fetch_url_source_tool_reference.rb +24 -0
- data/lib/anthropic/models/web_fetch_url_sources.rb +230 -0
- data/lib/anthropic/models/web_search_tool_result_block.rb +1 -7
- data/lib/anthropic/models/web_search_tool_result_block_param.rb +3 -6
- data/lib/anthropic/models/web_search_tool_result_block_param_content.rb +3 -3
- data/lib/anthropic/models.rb +12 -0
- data/lib/anthropic/resources/beta/agents/versions.rb +1 -1
- data/lib/anthropic/resources/beta/agents.rb +7 -7
- data/lib/anthropic/resources/beta/deployment_runs.rb +2 -2
- data/lib/anthropic/resources/beta/deployments.rb +10 -10
- data/lib/anthropic/resources/beta/dreams.rb +7 -7
- data/lib/anthropic/resources/beta/environments/work.rb +8 -8
- data/lib/anthropic/resources/beta/environments.rb +6 -6
- data/lib/anthropic/resources/beta/files.rb +5 -5
- data/lib/anthropic/resources/beta/memory_stores/memories.rb +5 -5
- data/lib/anthropic/resources/beta/memory_stores/memory_versions.rb +3 -3
- data/lib/anthropic/resources/beta/memory_stores.rb +6 -6
- data/lib/anthropic/resources/beta/messages/batches.rb +6 -6
- data/lib/anthropic/resources/beta/messages.rb +22 -14
- data/lib/anthropic/resources/beta/models.rb +2 -2
- data/lib/anthropic/resources/beta/organization/federation/issuers.rb +5 -5
- data/lib/anthropic/resources/beta/organization/federation/rules/workspaces.rb +3 -3
- data/lib/anthropic/resources/beta/organization/federation/rules.rb +5 -5
- data/lib/anthropic/resources/beta/organization/service_accounts/workspaces.rb +3 -3
- data/lib/anthropic/resources/beta/organization/service_accounts.rb +5 -5
- data/lib/anthropic/resources/beta/organization/workspaces/service_accounts.rb +5 -5
- data/lib/anthropic/resources/beta/organization/workspaces.rb +1 -1
- data/lib/anthropic/resources/beta/sessions/events.rb +3 -3
- data/lib/anthropic/resources/beta/sessions/resources.rb +5 -5
- data/lib/anthropic/resources/beta/sessions/threads/events.rb +2 -2
- data/lib/anthropic/resources/beta/sessions/threads.rb +3 -3
- data/lib/anthropic/resources/beta/sessions.rb +7 -7
- data/lib/anthropic/resources/beta/skills/versions.rb +5 -5
- data/lib/anthropic/resources/beta/skills.rb +4 -4
- data/lib/anthropic/resources/beta/tunnels/certificates.rb +4 -4
- data/lib/anthropic/resources/beta/tunnels.rb +6 -6
- data/lib/anthropic/resources/beta/user_profiles.rb +38 -15
- data/lib/anthropic/resources/beta/vaults/credentials.rb +7 -7
- data/lib/anthropic/resources/beta/vaults.rb +6 -6
- data/lib/anthropic/resources/completions.rb +2 -2
- data/lib/anthropic/resources/models.rb +2 -2
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +17 -1
- data/manifest.yaml +0 -1
- data/rbi/anthropic/client.rbi +5 -0
- data/rbi/anthropic/internal/transport/base_client.rbi +2 -0
- data/rbi/anthropic/internal/transport/pooled_net_requester.rbi +27 -5
- data/rbi/anthropic/models/anthropic_beta.rbi +3 -1
- data/rbi/anthropic/models/beta/agent_archive_params.rbi +4 -4
- data/rbi/anthropic/models/beta/agent_create_params.rbi +12 -12
- data/rbi/anthropic/models/beta/agent_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/agent_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/agent_update_params.rbi +14 -14
- data/rbi/anthropic/models/beta/agents/version_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/beta_browser_state_change.rbi +0 -6
- data/rbi/anthropic/models/beta/beta_code_execution_tool_result_block.rbi +1 -7
- data/rbi/anthropic/models/beta/beta_code_execution_tool_result_block_content.rbi +0 -1
- data/rbi/anthropic/models/beta/beta_code_execution_tool_result_block_param.rbi +0 -2
- data/rbi/anthropic/models/beta/beta_code_execution_tool_result_block_param_content.rbi +0 -1
- data/rbi/anthropic/models/beta/beta_compaction_block.rbi +9 -1
- data/rbi/anthropic/models/beta/beta_compaction_block_param.rbi +9 -1
- data/rbi/anthropic/models/beta/beta_compaction_capability.rbi +60 -0
- data/rbi/anthropic/models/beta/beta_compaction_config.rbi +54 -0
- data/rbi/anthropic/models/beta/beta_content_block.rbi +2 -4
- data/rbi/anthropic/models/beta/beta_content_block_param.rbi +4 -9
- data/rbi/anthropic/models/beta/beta_context_management_config.rbi +0 -2
- data/rbi/anthropic/models/beta/beta_dream.rbi +0 -6
- data/rbi/anthropic/models/beta/beta_dream_input.rbi +0 -3
- data/rbi/anthropic/models/beta/beta_dreaming_error.rbi +0 -7
- data/rbi/anthropic/models/beta/beta_fallback_message_iteration_usage.rbi +5 -4
- data/rbi/anthropic/models/beta/beta_fallbacks_param.rbi +1 -1
- data/rbi/anthropic/models/beta/beta_input_transformation.rbi +99 -0
- data/rbi/anthropic/models/beta/beta_iterations_usage.rbi +5 -2
- data/rbi/anthropic/models/beta/beta_managed_agents_agent_with_overrides_params.rbi +10 -10
- data/rbi/anthropic/models/beta/beta_managed_agents_multiagent_coordinator_params.rbi +6 -6
- data/rbi/anthropic/models/beta/beta_managed_agents_multiagent_params.rbi +6 -6
- data/rbi/anthropic/models/beta/beta_managed_agents_multiagent_roster_entry_params.rbi +2 -2
- data/rbi/anthropic/models/beta/beta_managed_agents_user_tool_result_event.rbi +4 -4
- data/rbi/anthropic/models/beta/beta_message.rbi +40 -29
- data/rbi/anthropic/models/beta/beta_message_iteration_usage.rbi +3 -3
- data/rbi/anthropic/models/beta/beta_model_capabilities.rbi +21 -0
- data/rbi/anthropic/models/beta/beta_output_behavior.rbi +0 -3
- data/rbi/anthropic/models/beta/beta_raw_content_block_start_event.rbi +3 -11
- data/rbi/anthropic/models/beta/beta_raw_message_delta_event.rbi +40 -29
- data/rbi/anthropic/models/beta/beta_raw_message_stream_event.rbi +21 -14
- data/rbi/anthropic/models/beta/beta_request_tool_addition_block.rbi +0 -9
- data/rbi/anthropic/models/beta/beta_request_tool_removal_block.rbi +0 -9
- data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +1 -10
- data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +0 -3
- data/rbi/anthropic/models/beta/beta_summarize_compaction.rbi +54 -0
- data/rbi/anthropic/models/beta/beta_thinking_mismatch_allowed_input_transformation.rbi +140 -0
- data/rbi/anthropic/models/beta/beta_tool_result_block_param.rbi +0 -1
- data/rbi/anthropic/models/beta/beta_tool_union.rbi +0 -2
- data/rbi/anthropic/models/beta/beta_tool_use_block.rbi +0 -3
- data/rbi/anthropic/models/beta/beta_tool_use_block_param.rbi +0 -3
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20250910.rbi +28 -1
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20260209.rbi +28 -1
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20260309.rbi +27 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20260318.rbi +27 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_block.rbi +0 -3
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rbi +0 -3
- data/rbi/anthropic/models/beta/beta_web_fetch_url_source_all.rbi +32 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_url_source_except.rbi +53 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_url_source_none.rbi +32 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_url_source_only.rbi +52 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_url_source_tool_reference.rbi +36 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_url_sources.rbi +412 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_result_block.rbi +0 -3
- data/rbi/anthropic/models/beta/beta_web_search_tool_result_block_param.rbi +6 -11
- data/rbi/anthropic/models/beta/beta_web_search_tool_result_block_param_content.rbi +2 -2
- data/rbi/anthropic/models/beta/deployment_archive_params.rbi +4 -4
- data/rbi/anthropic/models/beta/deployment_create_params.rbi +9 -9
- data/rbi/anthropic/models/beta/deployment_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/deployment_pause_params.rbi +4 -4
- data/rbi/anthropic/models/beta/deployment_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/deployment_run_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/deployment_run_params.rbi +4 -4
- data/rbi/anthropic/models/beta/deployment_run_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/deployment_unpause_params.rbi +4 -4
- data/rbi/anthropic/models/beta/deployment_update_params.rbi +11 -11
- data/rbi/anthropic/models/beta/dream_archive_params.rbi +4 -4
- data/rbi/anthropic/models/beta/dream_cancel_params.rbi +4 -4
- data/rbi/anthropic/models/beta/dream_create_params.rbi +8 -17
- data/rbi/anthropic/models/beta/dream_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/dream_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/environment_archive_params.rbi +4 -4
- data/rbi/anthropic/models/beta/environment_create_params.rbi +4 -4
- data/rbi/anthropic/models/beta/environment_delete_params.rbi +4 -4
- data/rbi/anthropic/models/beta/environment_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/environment_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/environment_update_params.rbi +4 -4
- data/rbi/anthropic/models/beta/environments/work_ack_params.rbi +4 -4
- data/rbi/anthropic/models/beta/environments/work_heartbeat_params.rbi +4 -4
- data/rbi/anthropic/models/beta/environments/work_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/environments/work_poll_params.rbi +4 -4
- data/rbi/anthropic/models/beta/environments/work_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/environments/work_stats_params.rbi +4 -4
- data/rbi/anthropic/models/beta/environments/work_stop_params.rbi +4 -4
- data/rbi/anthropic/models/beta/environments/work_update_params.rbi +4 -4
- data/rbi/anthropic/models/beta/file_delete_params.rbi +4 -4
- data/rbi/anthropic/models/beta/file_download_params.rbi +4 -4
- data/rbi/anthropic/models/beta/file_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/file_retrieve_metadata_params.rbi +4 -4
- data/rbi/anthropic/models/beta/file_upload_params.rbi +4 -4
- data/rbi/anthropic/models/beta/memory_store_archive_params.rbi +4 -4
- data/rbi/anthropic/models/beta/memory_store_create_params.rbi +4 -4
- data/rbi/anthropic/models/beta/memory_store_delete_params.rbi +4 -4
- data/rbi/anthropic/models/beta/memory_store_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/memory_store_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/memory_store_update_params.rbi +4 -4
- data/rbi/anthropic/models/beta/memory_stores/memory_create_params.rbi +4 -4
- data/rbi/anthropic/models/beta/memory_stores/memory_delete_params.rbi +4 -4
- data/rbi/anthropic/models/beta/memory_stores/memory_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/memory_stores/memory_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/memory_stores/memory_update_params.rbi +4 -4
- data/rbi/anthropic/models/beta/memory_stores/memory_version_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/memory_stores/memory_version_redact_params.rbi +4 -4
- data/rbi/anthropic/models/beta/memory_stores/memory_version_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +34 -6
- data/rbi/anthropic/models/beta/message_create_params.rbi +43 -13
- data/rbi/anthropic/models/beta/messages/batch_cancel_params.rbi +4 -4
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +47 -15
- data/rbi/anthropic/models/beta/messages/batch_delete_params.rbi +4 -4
- data/rbi/anthropic/models/beta/messages/batch_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/messages/batch_results_params.rbi +4 -4
- data/rbi/anthropic/models/beta/messages/batch_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/model_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/model_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/beta_data_residency.rbi +103 -10
- data/rbi/anthropic/models/beta/organization/beta_data_residency_create_config.rbi +8 -8
- data/rbi/anthropic/models/beta/organization/beta_data_residency_update_config.rbi +8 -8
- data/rbi/anthropic/models/beta/organization/federation/issuer_archive_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/federation/issuer_create_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/federation/issuer_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/federation/issuer_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/federation/issuer_update_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/federation/rule_archive_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/federation/rule_create_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/federation/rule_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/federation/rule_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/federation/rule_update_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/federation/rules/workspace_add_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/federation/rules/workspace_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/federation/rules/workspace_remove_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/service_account_archive_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/service_account_create_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/service_account_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/service_account_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/service_account_update_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/service_accounts/workspace_add_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/service_accounts/workspace_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/service_accounts/workspace_remove_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/workspace_create_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/workspaces/service_account_add_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/workspaces/service_account_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/workspaces/service_account_remove_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/workspaces/service_account_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/workspaces/service_account_update_params.rbi +4 -4
- data/rbi/anthropic/models/beta/session_archive_params.rbi +4 -4
- data/rbi/anthropic/models/beta/session_create_params.rbi +12 -12
- data/rbi/anthropic/models/beta/session_delete_params.rbi +4 -4
- data/rbi/anthropic/models/beta/session_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/session_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/session_update_params.rbi +4 -4
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_agent_custom_tool_use_event.rbi +6 -2
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_agent_mcp_tool_use_event.rbi +4 -4
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_agent_tool_use_event.rbi +6 -4
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_session_error_event.rbi +0 -9
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_session_event.rbi +0 -4
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_session_resource.rbi +0 -1
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_session_status_idle_event.rbi +0 -3
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_session_thread_status_idle_event.rbi +0 -3
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_stream_session_events.rbi +0 -4
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_stream_session_thread_events.rbi +0 -4
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_user_custom_tool_result_event.rbi +4 -4
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_user_tool_confirmation_event.rbi +4 -6
- data/rbi/anthropic/models/beta/sessions/event_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/sessions/event_send_params.rbi +4 -4
- data/rbi/anthropic/models/beta/sessions/event_stream_params.rbi +4 -4
- data/rbi/anthropic/models/beta/sessions/resource_add_params.rbi +4 -4
- data/rbi/anthropic/models/beta/sessions/resource_delete_params.rbi +4 -4
- data/rbi/anthropic/models/beta/sessions/resource_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/sessions/resource_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/sessions/resource_update_params.rbi +4 -4
- data/rbi/anthropic/models/beta/sessions/thread_archive_params.rbi +4 -4
- data/rbi/anthropic/models/beta/sessions/thread_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/sessions/thread_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/sessions/threads/event_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/sessions/threads/event_stream_params.rbi +4 -4
- data/rbi/anthropic/models/beta/skill_create_params.rbi +4 -4
- data/rbi/anthropic/models/beta/skill_delete_params.rbi +4 -4
- data/rbi/anthropic/models/beta/skill_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/skill_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/skills/version_create_params.rbi +4 -4
- data/rbi/anthropic/models/beta/skills/version_delete_params.rbi +4 -4
- data/rbi/anthropic/models/beta/skills/version_download_params.rbi +4 -4
- data/rbi/anthropic/models/beta/skills/version_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/skills/version_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/tunnel_archive_params.rbi +4 -4
- data/rbi/anthropic/models/beta/tunnel_create_params.rbi +4 -4
- data/rbi/anthropic/models/beta/tunnel_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/tunnel_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/tunnel_reveal_token_params.rbi +4 -4
- data/rbi/anthropic/models/beta/tunnel_rotate_token_params.rbi +4 -4
- data/rbi/anthropic/models/beta/tunnels/certificate_archive_params.rbi +4 -4
- data/rbi/anthropic/models/beta/tunnels/certificate_create_params.rbi +4 -4
- data/rbi/anthropic/models/beta/tunnels/certificate_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/tunnels/certificate_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/user_profile_create_enrollment_url_params.rbi +13 -4
- data/rbi/anthropic/models/beta/user_profile_create_params.rbi +13 -4
- data/rbi/anthropic/models/beta/user_profile_list_params.rbi +13 -4
- data/rbi/anthropic/models/beta/user_profile_retrieve_params.rbi +13 -4
- data/rbi/anthropic/models/beta/user_profile_update_params.rbi +13 -4
- data/rbi/anthropic/models/beta/vault_archive_params.rbi +4 -4
- data/rbi/anthropic/models/beta/vault_create_params.rbi +4 -4
- data/rbi/anthropic/models/beta/vault_delete_params.rbi +4 -4
- data/rbi/anthropic/models/beta/vault_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/vault_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/vault_update_params.rbi +4 -4
- data/rbi/anthropic/models/beta/vaults/beta_managed_agents_credential_networking_params.rbi +0 -3
- data/rbi/anthropic/models/beta/vaults/beta_managed_agents_mcp_oauth_refresh_params.rbi +0 -3
- data/rbi/anthropic/models/beta/vaults/beta_managed_agents_mcp_oauth_refresh_response.rbi +0 -3
- data/rbi/anthropic/models/beta/vaults/beta_managed_agents_mcp_oauth_refresh_update_params.rbi +0 -3
- data/rbi/anthropic/models/beta/vaults/credential_archive_params.rbi +4 -4
- data/rbi/anthropic/models/beta/vaults/credential_create_params.rbi +4 -4
- data/rbi/anthropic/models/beta/vaults/credential_delete_params.rbi +4 -4
- data/rbi/anthropic/models/beta/vaults/credential_list_params.rbi +4 -4
- data/rbi/anthropic/models/beta/vaults/credential_mcp_oauth_validate_params.rbi +4 -4
- data/rbi/anthropic/models/beta/vaults/credential_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/beta/vaults/credential_update_params.rbi +4 -4
- data/rbi/anthropic/models/browser_state_change.rbi +0 -6
- data/rbi/anthropic/models/code_execution_tool_result_block.rbi +1 -7
- data/rbi/anthropic/models/code_execution_tool_result_block_content.rbi +0 -1
- data/rbi/anthropic/models/code_execution_tool_result_block_param.rbi +0 -2
- data/rbi/anthropic/models/code_execution_tool_result_block_param_content.rbi +0 -1
- data/rbi/anthropic/models/completion_create_params.rbi +4 -4
- data/rbi/anthropic/models/content_block.rbi +0 -3
- data/rbi/anthropic/models/content_block_param.rbi +2 -5
- data/rbi/anthropic/models/message_count_tokens_tool.rbi +0 -2
- data/rbi/anthropic/models/model_list_params.rbi +4 -4
- data/rbi/anthropic/models/model_retrieve_params.rbi +4 -4
- data/rbi/anthropic/models/raw_content_block_start_event.rbi +1 -10
- data/rbi/anthropic/models/raw_message_stream_event.rbi +0 -1
- data/rbi/anthropic/models/server_tool_use_block.rbi +1 -10
- data/rbi/anthropic/models/server_tool_use_block_param.rbi +0 -3
- data/rbi/anthropic/models/tool_result_block_param.rbi +0 -1
- data/rbi/anthropic/models/tool_union.rbi +0 -2
- data/rbi/anthropic/models/tool_use_block.rbi +0 -3
- data/rbi/anthropic/models/tool_use_block_param.rbi +0 -3
- data/rbi/anthropic/models/web_fetch_tool_20250910.rbi +26 -1
- data/rbi/anthropic/models/web_fetch_tool_20260209.rbi +26 -1
- data/rbi/anthropic/models/web_fetch_tool_20260309.rbi +25 -0
- data/rbi/anthropic/models/web_fetch_tool_20260318.rbi +25 -0
- data/rbi/anthropic/models/web_fetch_tool_result_block.rbi +0 -3
- data/rbi/anthropic/models/web_fetch_tool_result_block_param.rbi +0 -3
- data/rbi/anthropic/models/web_fetch_url_source_all.rbi +25 -0
- data/rbi/anthropic/models/web_fetch_url_source_except.rbi +43 -0
- data/rbi/anthropic/models/web_fetch_url_source_none.rbi +25 -0
- data/rbi/anthropic/models/web_fetch_url_source_only.rbi +39 -0
- data/rbi/anthropic/models/web_fetch_url_source_tool_reference.rbi +31 -0
- data/rbi/anthropic/models/web_fetch_url_sources.rbi +386 -0
- data/rbi/anthropic/models/web_search_tool_result_block.rbi +0 -3
- data/rbi/anthropic/models/web_search_tool_result_block_param.rbi +6 -9
- data/rbi/anthropic/models/web_search_tool_result_block_param_content.rbi +2 -2
- data/rbi/anthropic/models.rbi +13 -0
- data/rbi/anthropic/resources/beta/agents/versions.rbi +1 -1
- data/rbi/anthropic/resources/beta/agents.rbi +9 -9
- data/rbi/anthropic/resources/beta/deployment_runs.rbi +2 -2
- data/rbi/anthropic/resources/beta/deployments.rbi +12 -12
- data/rbi/anthropic/resources/beta/dreams.rbi +8 -10
- data/rbi/anthropic/resources/beta/environments/work.rbi +8 -8
- data/rbi/anthropic/resources/beta/environments.rbi +6 -6
- data/rbi/anthropic/resources/beta/files.rbi +5 -5
- data/rbi/anthropic/resources/beta/memory_stores/memories.rbi +5 -5
- data/rbi/anthropic/resources/beta/memory_stores/memory_versions.rbi +3 -3
- data/rbi/anthropic/resources/beta/memory_stores.rbi +6 -6
- data/rbi/anthropic/resources/beta/messages/batches.rbi +6 -6
- data/rbi/anthropic/resources/beta/messages.rbi +60 -16
- data/rbi/anthropic/resources/beta/models.rbi +2 -2
- data/rbi/anthropic/resources/beta/organization/federation/issuers.rbi +5 -5
- data/rbi/anthropic/resources/beta/organization/federation/rules/workspaces.rbi +3 -3
- data/rbi/anthropic/resources/beta/organization/federation/rules.rbi +5 -5
- data/rbi/anthropic/resources/beta/organization/service_accounts/workspaces.rbi +3 -3
- data/rbi/anthropic/resources/beta/organization/service_accounts.rbi +5 -5
- data/rbi/anthropic/resources/beta/organization/workspaces/service_accounts.rbi +5 -5
- data/rbi/anthropic/resources/beta/organization/workspaces.rbi +1 -1
- data/rbi/anthropic/resources/beta/sessions/events.rbi +3 -3
- data/rbi/anthropic/resources/beta/sessions/resources.rbi +5 -5
- data/rbi/anthropic/resources/beta/sessions/threads/events.rbi +2 -2
- data/rbi/anthropic/resources/beta/sessions/threads.rbi +3 -3
- data/rbi/anthropic/resources/beta/sessions.rbi +8 -8
- data/rbi/anthropic/resources/beta/skills/versions.rbi +5 -5
- data/rbi/anthropic/resources/beta/skills.rbi +4 -4
- data/rbi/anthropic/resources/beta/tunnels/certificates.rbi +4 -4
- data/rbi/anthropic/resources/beta/tunnels.rbi +6 -6
- data/rbi/anthropic/resources/beta/user_profiles.rbi +45 -5
- data/rbi/anthropic/resources/beta/vaults/credentials.rbi +7 -7
- data/rbi/anthropic/resources/beta/vaults.rbi +6 -6
- data/rbi/anthropic/resources/completions.rbi +2 -2
- data/rbi/anthropic/resources/models.rbi +2 -2
- data/sig/anthropic/client.rbs +1 -0
- data/sig/anthropic/internal/transport/base_client.rbs +1 -0
- data/sig/anthropic/internal/transport/pooled_net_requester.rbs +10 -2
- data/sig/anthropic/models/anthropic_beta.rbs +4 -2
- data/sig/anthropic/models/beta/agent_create_params.rbs +2 -2
- data/sig/anthropic/models/beta/agent_update_params.rbs +2 -2
- data/sig/anthropic/models/beta/beta_compaction_block.rbs +11 -2
- data/sig/anthropic/models/beta/beta_compaction_block_param.rbs +7 -2
- data/sig/anthropic/models/beta/beta_compaction_capability.rbs +26 -0
- data/sig/anthropic/models/beta/beta_compaction_config.rbs +19 -0
- data/sig/anthropic/models/beta/beta_content_block.rbs +3 -2
- data/sig/anthropic/models/beta/beta_content_block_param.rbs +3 -2
- data/sig/anthropic/models/beta/beta_fallbacks_param.rbs +1 -1
- data/sig/anthropic/models/beta/beta_input_transformation.rbs +46 -0
- data/sig/anthropic/models/beta/beta_iterations_usage.rbs +2 -2
- data/sig/anthropic/models/beta/beta_managed_agents_agent_with_overrides_params.rbs +2 -2
- data/sig/anthropic/models/beta/beta_managed_agents_multiagent_roster_entry_params.rbs +2 -2
- data/sig/anthropic/models/beta/beta_message.rbs +4 -4
- data/sig/anthropic/models/beta/beta_message_iteration_usage.rbs +4 -4
- data/sig/anthropic/models/beta/beta_model_capabilities.rbs +5 -0
- data/sig/anthropic/models/beta/beta_raw_content_block_start_event.rbs +3 -2
- data/sig/anthropic/models/beta/beta_raw_message_delta_event.rbs +4 -4
- data/sig/anthropic/models/beta/beta_raw_message_stream_event.rbs +2 -2
- data/sig/anthropic/models/beta/beta_summarize_compaction.rbs +20 -0
- data/sig/anthropic/models/beta/beta_thinking_mismatch_allowed_input_transformation.rbs +51 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20250910.rbs +7 -2
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20260209.rbs +7 -2
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20260309.rbs +5 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20260318.rbs +5 -0
- data/sig/anthropic/models/beta/beta_web_fetch_url_source_all.rbs +17 -0
- data/sig/anthropic/models/beta/beta_web_fetch_url_source_except.rbs +29 -0
- data/sig/anthropic/models/beta/beta_web_fetch_url_source_none.rbs +17 -0
- data/sig/anthropic/models/beta/beta_web_fetch_url_source_only.rbs +29 -0
- data/sig/anthropic/models/beta/beta_web_fetch_url_source_tool_reference.rbs +20 -0
- data/sig/anthropic/models/beta/beta_web_fetch_url_sources.rbs +162 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_result_block_param_content.rbs +2 -2
- data/sig/anthropic/models/beta/deployment_create_params.rbs +1 -1
- data/sig/anthropic/models/beta/deployment_update_params.rbs +1 -1
- data/sig/anthropic/models/beta/dream_create_params.rbs +1 -1
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +5 -0
- data/sig/anthropic/models/beta/message_create_params.rbs +6 -1
- data/sig/anthropic/models/beta/messages/batch_create_params.rbs +6 -1
- data/sig/anthropic/models/beta/organization/beta_data_residency.rbs +33 -10
- data/sig/anthropic/models/beta/organization/beta_data_residency_create_config.rbs +2 -2
- data/sig/anthropic/models/beta/organization/beta_data_residency_update_config.rbs +2 -2
- data/sig/anthropic/models/beta/session_create_params.rbs +2 -2
- data/sig/anthropic/models/beta/user_profile_create_enrollment_url_params.rbs +8 -1
- data/sig/anthropic/models/beta/user_profile_create_params.rbs +8 -1
- data/sig/anthropic/models/beta/user_profile_list_params.rbs +8 -1
- data/sig/anthropic/models/beta/user_profile_retrieve_params.rbs +8 -1
- data/sig/anthropic/models/beta/user_profile_update_params.rbs +8 -1
- data/sig/anthropic/models/web_fetch_tool_20250910.rbs +7 -2
- data/sig/anthropic/models/web_fetch_tool_20260209.rbs +7 -2
- data/sig/anthropic/models/web_fetch_tool_20260309.rbs +5 -0
- data/sig/anthropic/models/web_fetch_tool_20260318.rbs +5 -0
- data/sig/anthropic/models/web_fetch_url_source_all.rbs +13 -0
- data/sig/anthropic/models/web_fetch_url_source_except.rbs +25 -0
- data/sig/anthropic/models/web_fetch_url_source_none.rbs +13 -0
- data/sig/anthropic/models/web_fetch_url_source_only.rbs +22 -0
- data/sig/anthropic/models/web_fetch_url_source_tool_reference.rbs +16 -0
- data/sig/anthropic/models/web_fetch_url_sources.rbs +151 -0
- data/sig/anthropic/models/web_search_tool_result_block_param_content.rbs +2 -2
- data/sig/anthropic/models.rbs +12 -0
- data/sig/anthropic/resources/beta/messages.rbs +4 -0
- data/sig/anthropic/resources/beta/user_profiles.rbs +5 -0
- metadata +53 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6ab8d0a99df492276cdb94f8f3c392a571e30e73231906566c6d959088bf3aa4
|
|
4
|
+
data.tar.gz: 834e8acc9a1e059f0209904e7ba60ddfcc0ed67e1be8c60fcf7614656b3c24ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 27e026c0567165a897bf257fcc9d7081b99ad1e29ce0f37fb3916688ff11f311fbc0ff081ccdef87d0a03ca793fff379a1a445aa3d206d65369dedb49f0cfcad
|
|
7
|
+
data.tar.gz: dece25375e30a2d43c8bab81bb3fcaf4cf6ed5cceda10b0aa77ac428b21a2476149e989ddcb8165e3a9695207de69d3a69bf2af23a173eef36157c5ae70a5016
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.71.0 (2026-09-15)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.70.0...v1.71.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.70.0...v1.71.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add auto mode tool permissions for Managed Agents ([8145b1f](https://github.com/anthropics/anthropic-sdk-ruby/commit/8145b1fce049b1fe98feefad2c41ccbd911ad892))
|
|
10
|
+
* **api:** add compaction parameter and signed compaction blocks (beta) ([68baa7f](https://github.com/anthropics/anthropic-sdk-ruby/commit/68baa7f15aaad3e919adf9afbb4d94a421bf3d34))
|
|
11
|
+
* **api:** add enum types for workspace data-residency geo fields ([389726b](https://github.com/anthropics/anthropic-sdk-ruby/commit/389726beec073e24a676456506e675f88912bd90))
|
|
12
|
+
* **api:** add thinking_mismatch_allowed entries to input_transformations (beta) ([509b7ce](https://github.com/anthropics/anthropic-sdk-ruby/commit/509b7cebde87b9cf071d549a142789bcb2b11a85))
|
|
13
|
+
* **api:** add url_sources to the web fetch tool ([0a787a2](https://github.com/anthropics/anthropic-sdk-ruby/commit/0a787a28e314f48c0de64d80ac66212997ec2a35))
|
|
14
|
+
* **api:** add workspace_id parameter to user profiles methods ([f0ad83c](https://github.com/anthropics/anthropic-sdk-ruby/commit/f0ad83ccc3e07e1cd15d55509fe3d0162946eecf))
|
|
15
|
+
* **client:** add a `proxy` client option ([9f39c26](https://github.com/anthropics/anthropic-sdk-ruby/commit/9f39c26cbac6bb52a3fe52f47dba522ff588a3ab))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **api:** mark usage iteration model as nullable ([167854a](https://github.com/anthropics/anthropic-sdk-ruby/commit/167854a6801249f8aa5f0d16512dcc531c68e9e5))
|
|
21
|
+
* **api:** use one input transformation type for message and delta event ([7807c32](https://github.com/anthropics/anthropic-sdk-ruby/commit/7807c32042d64c130d81a9f879e30a8c744ea4fc))
|
|
22
|
+
* **client:** ignore invalid Retry-After values and validate maxRetries ([8145b1f](https://github.com/anthropics/anthropic-sdk-ruby/commit/8145b1fce049b1fe98feefad2c41ccbd911ad892))
|
|
23
|
+
* **client:** retry connection errors in the async client and stop blocking in the coroutine retry loop ([8145b1f](https://github.com/anthropics/anthropic-sdk-ruby/commit/8145b1fce049b1fe98feefad2c41ccbd911ad892))
|
|
24
|
+
* **client:** stop union fields raising a conversion error after an earlier variant failed to match ([9f39c26](https://github.com/anthropics/anthropic-sdk-ruby/commit/9f39c26cbac6bb52a3fe52f47dba522ff588a3ab))
|
|
25
|
+
* **client:** use exponential retry backoff and fall back to it for non-positive Retry-After values ([9f39c26](https://github.com/anthropics/anthropic-sdk-ruby/commit/9f39c26cbac6bb52a3fe52f47dba522ff588a3ab))
|
|
26
|
+
* **client:** use the default backoff when Retry-After is out of range ([bdf00db](https://github.com/anthropics/anthropic-sdk-ruby/commit/bdf00db3626682338ff98c9fb3b2359faecd9460))
|
|
27
|
+
* coerce union values to their most specific variant ([c8240de](https://github.com/anthropics/anthropic-sdk-ruby/commit/c8240de05c210c74a31c42ae0063c69fc465d08a))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Chores
|
|
31
|
+
|
|
32
|
+
* **client:** decode proxy credentials without the cgi library ([9023815](https://github.com/anthropics/anthropic-sdk-ruby/commit/90238157521df7ba4c0aa460c3ed51fd4453a179))
|
|
33
|
+
* **deps:** remove cgi dependency ([#233](https://github.com/anthropics/anthropic-sdk-ruby/issues/233)) ([02a81dd](https://github.com/anthropics/anthropic-sdk-ruby/commit/02a81dd6c7d93e3e3a00675b409fa95d258626b5))
|
|
34
|
+
* **docs:** clarify that session_thread_id on tool use events is informational ([5356110](https://github.com/anthropics/anthropic-sdk-ruby/commit/53561106e4a21cd464a9441b719310d97a2ea6b0))
|
|
35
|
+
* **docs:** correct the compaction beta's parameter descriptions ([edf62b3](https://github.com/anthropics/anthropic-sdk-ruby/commit/edf62b365844022b648310732ea3ac78c2b21aaf))
|
|
36
|
+
* **internal:** reorder union variants in type listings ([9f39c26](https://github.com/anthropics/anthropic-sdk-ruby/commit/9f39c26cbac6bb52a3fe52f47dba522ff588a3ab))
|
|
37
|
+
* **internal:** set the gem license from the generator config ([9f39c26](https://github.com/anthropics/anthropic-sdk-ruby/commit/9f39c26cbac6bb52a3fe52f47dba522ff588a3ab))
|
|
38
|
+
* **tests:** stop the mock server without failing a passing test run ([46d47b0](https://github.com/anthropics/anthropic-sdk-ruby/commit/46d47b094d0467c2a534d633b66b8c9fd1121843))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Documentation
|
|
42
|
+
|
|
43
|
+
* **api:** clarify usage.iterations entry typing under server-side fallback ([82136a5](https://github.com/anthropics/anthropic-sdk-ruby/commit/82136a54d292f0919b5f6713bbc3153b7b766a72))
|
|
44
|
+
* **api:** fix typo in temperature deprecation message ([7605285](https://github.com/anthropics/anthropic-sdk-ruby/commit/76052855d56e41189c5bc5654aa96863d5ae5307))
|
|
45
|
+
* stop documenting unions with their first variant's description ([a24a371](https://github.com/anthropics/anthropic-sdk-ruby/commit/a24a37104e5ac949ba1fdef8643e083f7c7d314e))
|
|
46
|
+
|
|
3
47
|
## 1.70.0 (2026-09-10)
|
|
4
48
|
|
|
5
49
|
Full Changelog: [v1.69.0...v1.70.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.69.0...v1.70.0)
|
data/README.md
CHANGED
data/lib/anthropic/client.rb
CHANGED
|
@@ -173,6 +173,10 @@ module Anthropic
|
|
|
173
173
|
# +"https://api.example.com/v2/"+. Defaults to +ENV["ANTHROPIC_BASE_URL"]+,
|
|
174
174
|
# then to the profile's +base_url+ if present, then to +https://api.anthropic.com+.
|
|
175
175
|
#
|
|
176
|
+
# @param proxy [String, URI::Generic, nil] HTTP proxy URL, e.g., `"http://user:pass@proxy.example.com:8080"`. When `nil`,
|
|
177
|
+
# `net/http` reads the `http_proxy`, `https_proxy`, and `no_proxy` environment
|
|
178
|
+
# variables.
|
|
179
|
+
#
|
|
176
180
|
# @param max_retries [Integer] Max number of retries to attempt after a failed retryable request.
|
|
177
181
|
#
|
|
178
182
|
# @param timeout [Float]
|
|
@@ -191,6 +195,7 @@ module Anthropic
|
|
|
191
195
|
credentials: nil,
|
|
192
196
|
config: nil,
|
|
193
197
|
base_url: nil,
|
|
198
|
+
proxy: nil,
|
|
194
199
|
max_retries: self.class::DEFAULT_MAX_RETRIES,
|
|
195
200
|
timeout: self.class::DEFAULT_TIMEOUT_IN_SECONDS,
|
|
196
201
|
initial_retry_delay: self.class::DEFAULT_INITIAL_RETRY_DELAY,
|
|
@@ -279,6 +284,7 @@ module Anthropic
|
|
|
279
284
|
|
|
280
285
|
super(
|
|
281
286
|
base_url: base_url,
|
|
287
|
+
proxy: proxy,
|
|
282
288
|
timeout: timeout,
|
|
283
289
|
max_retries: max_retries,
|
|
284
290
|
initial_retry_delay: initial_retry_delay,
|
|
@@ -191,6 +191,7 @@ module Anthropic
|
|
|
191
191
|
# @api private
|
|
192
192
|
#
|
|
193
193
|
# @param base_url [String]
|
|
194
|
+
# @param proxy [String, URI::Generic, nil]
|
|
194
195
|
# @param timeout [Float]
|
|
195
196
|
# @param max_retries [Integer]
|
|
196
197
|
# @param initial_retry_delay [Float]
|
|
@@ -201,6 +202,7 @@ module Anthropic
|
|
|
201
202
|
# @param requester [Anthropic::Internal::Transport::PooledNetRequester, nil]
|
|
202
203
|
def initialize(
|
|
203
204
|
base_url:,
|
|
205
|
+
proxy: nil,
|
|
204
206
|
timeout: 0.0,
|
|
205
207
|
max_retries: 0,
|
|
206
208
|
initial_retry_delay: 0.0,
|
|
@@ -211,7 +213,7 @@ module Anthropic
|
|
|
211
213
|
requester: nil
|
|
212
214
|
)
|
|
213
215
|
@middleware = Array(middleware).freeze
|
|
214
|
-
@requester = requester || Anthropic::Internal::Transport::PooledNetRequester.new
|
|
216
|
+
@requester = requester || Anthropic::Internal::Transport::PooledNetRequester.new(proxy: proxy)
|
|
215
217
|
@headers = Anthropic::Internal::Util.normalized_headers(
|
|
216
218
|
self.class::PLATFORM_HEADERS,
|
|
217
219
|
{
|
|
@@ -365,21 +367,23 @@ module Anthropic
|
|
|
365
367
|
private def retry_delay(headers, retry_count:)
|
|
366
368
|
# Non-standard extension
|
|
367
369
|
span = Float(headers["retry-after-ms"], exception: false)&.then { _1 / 1000 }
|
|
368
|
-
return span if span
|
|
369
370
|
|
|
370
371
|
retry_header = headers["retry-after"]
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
span = retry_header&.then do
|
|
372
|
+
span ||= Float(retry_header, exception: false)
|
|
373
|
+
span ||= retry_header&.then do
|
|
374
374
|
Time.httpdate(_1) - Time.now
|
|
375
375
|
rescue ArgumentError
|
|
376
376
|
nil
|
|
377
377
|
end
|
|
378
|
-
return span if span
|
|
379
378
|
|
|
380
|
-
|
|
379
|
+
# If the API asks us to wait a certain amount of time, do what it says, however long.
|
|
380
|
+
# A non-positive value, e.g. an HTTP-date in the past, falls back to the computed backoff rather than reaching `sleep`.
|
|
381
|
+
return span if span&.positive?
|
|
382
|
+
|
|
383
|
+
# Exponential backoff capped at `max_retry_delay`, minus up to 25% jitter.
|
|
384
|
+
scale = 2**retry_count
|
|
381
385
|
jitter = 1 - (0.25 * rand)
|
|
382
|
-
(@initial_retry_delay * scale
|
|
386
|
+
(@initial_retry_delay * scale).clamp(0, @max_retry_delay) * jitter
|
|
383
387
|
end
|
|
384
388
|
|
|
385
389
|
# @api private
|
|
@@ -18,9 +18,10 @@ module Anthropic
|
|
|
18
18
|
#
|
|
19
19
|
# @param cert_store [OpenSSL::X509::Store]
|
|
20
20
|
# @param url [URI::Generic]
|
|
21
|
+
# @param proxy [URI::Generic, nil]
|
|
21
22
|
#
|
|
22
23
|
# @return [Net::HTTP]
|
|
23
|
-
def connect(cert_store:, url:)
|
|
24
|
+
def connect(cert_store:, url:, proxy: nil)
|
|
24
25
|
port =
|
|
25
26
|
case [url.port, url.scheme]
|
|
26
27
|
in [Integer, _]
|
|
@@ -31,7 +32,23 @@ module Anthropic
|
|
|
31
32
|
Net::HTTP.https_default_port
|
|
32
33
|
end
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
conn =
|
|
36
|
+
if proxy.nil?
|
|
37
|
+
# `net/http` falls back to the `http_proxy`/`https_proxy`/`no_proxy` environment variables.
|
|
38
|
+
Net::HTTP.new(url.host, port)
|
|
39
|
+
else
|
|
40
|
+
# `https://` targets are tunnelled through the proxy with CONNECT by `net/http` itself.
|
|
41
|
+
Net::HTTP.new(
|
|
42
|
+
url.host,
|
|
43
|
+
port,
|
|
44
|
+
proxy.hostname,
|
|
45
|
+
proxy.port,
|
|
46
|
+
proxy.user&.then { URI.decode_uri_component(_1) },
|
|
47
|
+
proxy.password&.then { URI.decode_uri_component(_1) }
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
conn.tap do
|
|
35
52
|
_1.use_ssl = %w[https wss].include?(url.scheme)
|
|
36
53
|
_1.max_retries = 0
|
|
37
54
|
|
|
@@ -39,6 +56,37 @@ module Anthropic
|
|
|
39
56
|
end
|
|
40
57
|
end
|
|
41
58
|
|
|
59
|
+
# @api private
|
|
60
|
+
#
|
|
61
|
+
# @param proxy [String, URI::Generic, nil]
|
|
62
|
+
#
|
|
63
|
+
# @raise [ArgumentError]
|
|
64
|
+
# @return [URI::Generic, nil]
|
|
65
|
+
def parse_proxy(proxy)
|
|
66
|
+
return nil if proxy.nil?
|
|
67
|
+
|
|
68
|
+
parsed =
|
|
69
|
+
case proxy
|
|
70
|
+
in URI::Generic
|
|
71
|
+
proxy
|
|
72
|
+
in String
|
|
73
|
+
begin
|
|
74
|
+
URI(proxy)
|
|
75
|
+
rescue URI::InvalidURIError
|
|
76
|
+
nil
|
|
77
|
+
end
|
|
78
|
+
else
|
|
79
|
+
nil
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# The offending value is deliberately left out of the message since proxy URLs often embed credentials.
|
|
83
|
+
if parsed.nil? || parsed.scheme&.downcase != "http" || parsed.host.to_s.empty?
|
|
84
|
+
raise ArgumentError.new("Expected proxy to be an http:// URL with a host, for example http://proxy.example.com:8080")
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
parsed
|
|
88
|
+
end
|
|
89
|
+
|
|
42
90
|
# @api private
|
|
43
91
|
#
|
|
44
92
|
# @param conn [Net::HTTP]
|
|
@@ -105,7 +153,7 @@ module Anthropic
|
|
|
105
153
|
pool =
|
|
106
154
|
@mutex.synchronize do
|
|
107
155
|
@pools[origin] ||= ConnectionPool.new(size: @size) do
|
|
108
|
-
self.class.connect(cert_store: @cert_store, url: url)
|
|
156
|
+
self.class.connect(cert_store: @cert_store, url: url, proxy: @proxy)
|
|
109
157
|
end
|
|
110
158
|
end
|
|
111
159
|
|
|
@@ -194,13 +242,24 @@ module Anthropic
|
|
|
194
242
|
# @api private
|
|
195
243
|
#
|
|
196
244
|
# @param size [Integer]
|
|
197
|
-
|
|
245
|
+
# @param proxy [String, URI::Generic, nil]
|
|
246
|
+
def initialize(size: self.class::DEFAULT_MAX_CONNECTIONS, proxy: nil)
|
|
198
247
|
@mutex = Mutex.new
|
|
199
248
|
@size = size
|
|
249
|
+
@proxy = self.class.parse_proxy(proxy)
|
|
200
250
|
@cert_store = OpenSSL::X509::Store.new.tap(&:set_default_paths)
|
|
201
251
|
@pools = {}
|
|
202
252
|
end
|
|
203
253
|
|
|
254
|
+
# @api private
|
|
255
|
+
#
|
|
256
|
+
# @return [String]
|
|
257
|
+
def inspect
|
|
258
|
+
# Proxy URLs often embed credentials, so never surface the password.
|
|
259
|
+
proxy = @proxy&.then { _1.password.nil? ? _1 : _1.dup.tap { |uri| uri.password = "REDACTED" } }
|
|
260
|
+
"#<#{self.class.name}:0x#{object_id.to_s(16)} size=#{@size} proxy=#{proxy.inspect}>"
|
|
261
|
+
end
|
|
262
|
+
|
|
204
263
|
define_sorbet_constant!(:Request) do
|
|
205
264
|
T.type_alias { {method: Symbol, url: URI::Generic, headers: T::Hash[String, String], body: T.anything, deadline: Float} }
|
|
206
265
|
end
|
|
@@ -171,12 +171,15 @@ module Anthropic
|
|
|
171
171
|
end
|
|
172
172
|
|
|
173
173
|
exactness = state.fetch(:exactness)
|
|
174
|
+
error = state[:error]
|
|
174
175
|
|
|
175
176
|
alternatives = []
|
|
176
177
|
known_variants.each do |_, variant_fn|
|
|
177
178
|
target = variant_fn.call
|
|
178
179
|
exact = state[:exactness] = {yes: 0, no: 0, maybe: 0}
|
|
179
180
|
state[:branched] += 1
|
|
181
|
+
# a variant that was tried and passed over must not leave its error behind
|
|
182
|
+
state[:error] = error
|
|
180
183
|
|
|
181
184
|
coerced = Anthropic::Internal::Type::Converter.coerce(target, value, state: state)
|
|
182
185
|
yes, no, maybe = exact.values
|
|
@@ -185,7 +188,7 @@ module Anthropic
|
|
|
185
188
|
state[:exactness] = exactness
|
|
186
189
|
return coerced
|
|
187
190
|
elsif maybe.positive?
|
|
188
|
-
alternatives << [[-yes, -maybe, no], exact, coerced]
|
|
191
|
+
alternatives << [[-yes, -maybe, no], exact, coerced, state[:error]]
|
|
189
192
|
end
|
|
190
193
|
end
|
|
191
194
|
|
|
@@ -194,8 +197,9 @@ module Anthropic
|
|
|
194
197
|
exactness[:no] += 1
|
|
195
198
|
state[:error] = ArgumentError.new("no matching variant for #{value.inspect}")
|
|
196
199
|
value
|
|
197
|
-
in [[_, exact, coerced], *]
|
|
200
|
+
in [[_, exact, coerced, error], *]
|
|
198
201
|
exact.each { exactness[_1] += _2 }
|
|
202
|
+
state[:error] = error
|
|
199
203
|
coerced
|
|
200
204
|
end
|
|
201
205
|
.tap { state[:exactness] = exactness }
|
|
@@ -318,7 +318,9 @@ module Anthropic
|
|
|
318
318
|
#
|
|
319
319
|
# @return [Hash{String=>Array<String>}]
|
|
320
320
|
def decode_query(query)
|
|
321
|
-
|
|
321
|
+
URI.decode_www_form(query.to_s).each_with_object({}) do |(key, value), out|
|
|
322
|
+
(out[key] ||= []) << value
|
|
323
|
+
end
|
|
322
324
|
end
|
|
323
325
|
|
|
324
326
|
# @api private
|
|
@@ -5,8 +5,6 @@ module Anthropic
|
|
|
5
5
|
module AnthropicBeta
|
|
6
6
|
extend Anthropic::Internal::Type::Union
|
|
7
7
|
|
|
8
|
-
variant String
|
|
9
|
-
|
|
10
8
|
variant const: -> { Anthropic::Models::AnthropicBeta::MESSAGE_BATCHES_2024_09_24 }
|
|
11
9
|
|
|
12
10
|
variant const: -> { Anthropic::Models::AnthropicBeta::PROMPT_CACHING_2024_07_31 }
|
|
@@ -97,11 +95,15 @@ module Anthropic
|
|
|
97
95
|
|
|
98
96
|
variant const: -> { Anthropic::Models::AnthropicBeta::MID_CONVERSATION_SYSTEM_CLEAR_AT_2026_08_21 }
|
|
99
97
|
|
|
98
|
+
variant const: -> { Anthropic::Models::AnthropicBeta::COMPACT_2026_09_04 }
|
|
99
|
+
|
|
100
|
+
variant String
|
|
101
|
+
|
|
100
102
|
# @!method self.variants
|
|
101
|
-
# @return [Array(
|
|
103
|
+
# @return [Array(Symbol, String)]
|
|
102
104
|
|
|
103
105
|
define_sorbet_constant!(:Variants) do
|
|
104
|
-
T.type_alias { T.any(
|
|
106
|
+
T.type_alias { T.any(Anthropic::AnthropicBeta::TaggedSymbol, String) }
|
|
105
107
|
end
|
|
106
108
|
|
|
107
109
|
# @!group
|
|
@@ -151,6 +153,7 @@ module Anthropic
|
|
|
151
153
|
MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01 = :"mid-conversation-output-config-2026-07-01"
|
|
152
154
|
THINKING_BINDING_CONTROLS_2026_08_01 = :"thinking-binding-controls-2026-08-01"
|
|
153
155
|
MID_CONVERSATION_SYSTEM_CLEAR_AT_2026_08_21 = :"mid-conversation-system-clear-at-2026-08-21"
|
|
156
|
+
COMPACT_2026_09_04 = :"compact-2026-09-04"
|
|
154
157
|
|
|
155
158
|
# @!endgroup
|
|
156
159
|
end
|
|
@@ -16,7 +16,7 @@ module Anthropic
|
|
|
16
16
|
# @!attribute betas
|
|
17
17
|
# Optional header to specify the beta version(s) you want to use.
|
|
18
18
|
#
|
|
19
|
-
# @return [Array<
|
|
19
|
+
# @return [Array<Symbol, String, Anthropic::Models::AnthropicBeta>, nil]
|
|
20
20
|
optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
|
|
21
21
|
|
|
22
22
|
# @!attribute workspace_id
|
|
@@ -27,7 +27,7 @@ module Anthropic
|
|
|
27
27
|
# @!method initialize(agent_id:, betas: nil, workspace_id: nil, request_options: {})
|
|
28
28
|
# @param agent_id [String]
|
|
29
29
|
#
|
|
30
|
-
# @param betas [Array<
|
|
30
|
+
# @param betas [Array<Symbol, String, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
|
|
31
31
|
#
|
|
32
32
|
# @param workspace_id [String]
|
|
33
33
|
#
|
|
@@ -14,7 +14,7 @@ module Anthropic
|
|
|
14
14
|
# e.g. `claude-opus-5`, or a `model_config` object for additional configuration
|
|
15
15
|
# control
|
|
16
16
|
#
|
|
17
|
-
# @return [
|
|
17
|
+
# @return [Anthropic::Models::Beta::BetaManagedAgentsModelConfigParams, Symbol, String, Anthropic::Models::Beta::BetaManagedAgentsModel]
|
|
18
18
|
required :model, union: -> { Anthropic::Beta::AgentCreateParams::Model }
|
|
19
19
|
|
|
20
20
|
# @!attribute name
|
|
@@ -77,7 +77,7 @@ module Anthropic
|
|
|
77
77
|
# @!attribute betas
|
|
78
78
|
# Optional header to specify the beta version(s) you want to use.
|
|
79
79
|
#
|
|
80
|
-
# @return [Array<
|
|
80
|
+
# @return [Array<Symbol, String, Anthropic::Models::AnthropicBeta>, nil]
|
|
81
81
|
optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
|
|
82
82
|
|
|
83
83
|
# @!attribute workspace_id
|
|
@@ -89,7 +89,7 @@ module Anthropic
|
|
|
89
89
|
# Some parameter documentations has been truncated, see
|
|
90
90
|
# {Anthropic::Models::Beta::AgentCreateParams} for more details.
|
|
91
91
|
#
|
|
92
|
-
# @param model [
|
|
92
|
+
# @param model [Anthropic::Models::Beta::BetaManagedAgentsModelConfigParams, Symbol, String, Anthropic::Models::Beta::BetaManagedAgentsModel] Model identifier. Accepts the [model string](https://platform.claude.com/docs/en
|
|
93
93
|
#
|
|
94
94
|
# @param name [String] Human-readable name for the agent.
|
|
95
95
|
#
|
|
@@ -107,7 +107,7 @@ module Anthropic
|
|
|
107
107
|
#
|
|
108
108
|
# @param tools [Array<Anthropic::Models::Beta::BetaManagedAgentsAgentToolset20260401Params, Anthropic::Models::Beta::BetaManagedAgentsMCPToolsetParams, Anthropic::Models::Beta::BetaManagedAgentsCustomToolParams>] Tool configurations available to the agent. Maximum of 128 tools across all tool
|
|
109
109
|
#
|
|
110
|
-
# @param betas [Array<
|
|
110
|
+
# @param betas [Array<Symbol, String, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
|
|
111
111
|
#
|
|
112
112
|
# @param workspace_id [String]
|
|
113
113
|
#
|
|
@@ -120,16 +120,16 @@ module Anthropic
|
|
|
120
120
|
module Model
|
|
121
121
|
extend Anthropic::Internal::Type::Union
|
|
122
122
|
|
|
123
|
+
# An object that defines additional configuration control over model use
|
|
124
|
+
variant -> { Anthropic::Beta::BetaManagedAgentsModelConfigParams }
|
|
125
|
+
|
|
123
126
|
# The model that will power your agent.
|
|
124
127
|
#
|
|
125
128
|
# See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.
|
|
126
129
|
variant union: -> { Anthropic::Beta::BetaManagedAgentsModel }
|
|
127
130
|
|
|
128
|
-
# An object that defines additional configuration control over model use
|
|
129
|
-
variant -> { Anthropic::Beta::BetaManagedAgentsModelConfigParams }
|
|
130
|
-
|
|
131
131
|
# @!method self.variants
|
|
132
|
-
# @return [Array(
|
|
132
|
+
# @return [Array(Anthropic::Models::Beta::BetaManagedAgentsModelConfigParams, Symbol, String, Anthropic::Models::Beta::BetaManagedAgentsModel)]
|
|
133
133
|
end
|
|
134
134
|
|
|
135
135
|
# Union type for tool configurations in the tools array.
|
|
@@ -41,7 +41,7 @@ module Anthropic
|
|
|
41
41
|
# @!attribute betas
|
|
42
42
|
# Optional header to specify the beta version(s) you want to use.
|
|
43
43
|
#
|
|
44
|
-
# @return [Array<
|
|
44
|
+
# @return [Array<Symbol, String, Anthropic::Models::AnthropicBeta>, nil]
|
|
45
45
|
optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
|
|
46
46
|
|
|
47
47
|
# @!attribute workspace_id
|
|
@@ -60,7 +60,7 @@ module Anthropic
|
|
|
60
60
|
#
|
|
61
61
|
# @param page [String] Opaque pagination cursor from a previous response.
|
|
62
62
|
#
|
|
63
|
-
# @param betas [Array<
|
|
63
|
+
# @param betas [Array<Symbol, String, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
|
|
64
64
|
#
|
|
65
65
|
# @param workspace_id [String]
|
|
66
66
|
#
|
|
@@ -23,7 +23,7 @@ module Anthropic
|
|
|
23
23
|
# @!attribute betas
|
|
24
24
|
# Optional header to specify the beta version(s) you want to use.
|
|
25
25
|
#
|
|
26
|
-
# @return [Array<
|
|
26
|
+
# @return [Array<Symbol, String, Anthropic::Models::AnthropicBeta>, nil]
|
|
27
27
|
optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
|
|
28
28
|
|
|
29
29
|
# @!attribute workspace_id
|
|
@@ -39,7 +39,7 @@ module Anthropic
|
|
|
39
39
|
#
|
|
40
40
|
# @param version [Integer] Agent version. Omit for the most recent version. Must be at least 1 if specified
|
|
41
41
|
#
|
|
42
|
-
# @param betas [Array<
|
|
42
|
+
# @param betas [Array<Symbol, String, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
|
|
43
43
|
#
|
|
44
44
|
# @param workspace_id [String]
|
|
45
45
|
#
|
|
@@ -47,7 +47,7 @@ module Anthropic
|
|
|
47
47
|
# e.g. `claude-opus-5`, or a `model_config` object for additional configuration
|
|
48
48
|
# control. Omit to preserve. Cannot be cleared.
|
|
49
49
|
#
|
|
50
|
-
# @return [
|
|
50
|
+
# @return [Anthropic::Models::Beta::BetaManagedAgentsModelConfigParams, Symbol, String, Anthropic::Models::Beta::BetaManagedAgentsModel, nil]
|
|
51
51
|
optional :model, union: -> { Anthropic::Beta::AgentUpdateParams::Model }
|
|
52
52
|
|
|
53
53
|
# @!attribute multiagent
|
|
@@ -101,7 +101,7 @@ module Anthropic
|
|
|
101
101
|
# @!attribute betas
|
|
102
102
|
# Optional header to specify the beta version(s) you want to use.
|
|
103
103
|
#
|
|
104
|
-
# @return [Array<
|
|
104
|
+
# @return [Array<Symbol, String, Anthropic::Models::AnthropicBeta>, nil]
|
|
105
105
|
optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
|
|
106
106
|
|
|
107
107
|
# @!attribute workspace_id
|
|
@@ -121,7 +121,7 @@ module Anthropic
|
|
|
121
121
|
#
|
|
122
122
|
# @param metadata [Hash{Symbol=>String, nil}, nil] Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omi
|
|
123
123
|
#
|
|
124
|
-
# @param model [
|
|
124
|
+
# @param model [Anthropic::Models::Beta::BetaManagedAgentsModelConfigParams, Symbol, String, Anthropic::Models::Beta::BetaManagedAgentsModel] Model identifier. Accepts the [model string](https://platform.claude.com/docs/en
|
|
125
125
|
#
|
|
126
126
|
# @param multiagent [Anthropic::Models::Beta::BetaManagedAgentsMultiagentParams, nil] A coordinator topology: the session's primary thread orchestrates work by spawni
|
|
127
127
|
#
|
|
@@ -135,7 +135,7 @@ module Anthropic
|
|
|
135
135
|
#
|
|
136
136
|
# @param version [Integer] The agent's current version, used to prevent concurrent overwrites. Obtain this
|
|
137
137
|
#
|
|
138
|
-
# @param betas [Array<
|
|
138
|
+
# @param betas [Array<Symbol, String, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
|
|
139
139
|
#
|
|
140
140
|
# @param workspace_id [String]
|
|
141
141
|
#
|
|
@@ -148,16 +148,16 @@ module Anthropic
|
|
|
148
148
|
module Model
|
|
149
149
|
extend Anthropic::Internal::Type::Union
|
|
150
150
|
|
|
151
|
+
# An object that defines additional configuration control over model use
|
|
152
|
+
variant -> { Anthropic::Beta::BetaManagedAgentsModelConfigParams }
|
|
153
|
+
|
|
151
154
|
# The model that will power your agent.
|
|
152
155
|
#
|
|
153
156
|
# See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.
|
|
154
157
|
variant union: -> { Anthropic::Beta::BetaManagedAgentsModel }
|
|
155
158
|
|
|
156
|
-
# An object that defines additional configuration control over model use
|
|
157
|
-
variant -> { Anthropic::Beta::BetaManagedAgentsModelConfigParams }
|
|
158
|
-
|
|
159
159
|
# @!method self.variants
|
|
160
|
-
# @return [Array(
|
|
160
|
+
# @return [Array(Anthropic::Models::Beta::BetaManagedAgentsModelConfigParams, Symbol, String, Anthropic::Models::Beta::BetaManagedAgentsModel)]
|
|
161
161
|
end
|
|
162
162
|
|
|
163
163
|
# Union type for tool configurations in the tools array.
|
|
@@ -29,7 +29,7 @@ module Anthropic
|
|
|
29
29
|
# @!attribute betas
|
|
30
30
|
# Optional header to specify the beta version(s) you want to use.
|
|
31
31
|
#
|
|
32
|
-
# @return [Array<
|
|
32
|
+
# @return [Array<Symbol, String, Anthropic::Models::AnthropicBeta>, nil]
|
|
33
33
|
optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
|
|
34
34
|
|
|
35
35
|
# @!attribute workspace_id
|
|
@@ -44,7 +44,7 @@ module Anthropic
|
|
|
44
44
|
#
|
|
45
45
|
# @param page [String] Opaque pagination cursor.
|
|
46
46
|
#
|
|
47
|
-
# @param betas [Array<
|
|
47
|
+
# @param betas [Array<Symbol, String, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
|
|
48
48
|
#
|
|
49
49
|
# @param workspace_id [String]
|
|
50
50
|
#
|
|
@@ -3,12 +3,6 @@
|
|
|
3
3
|
module Anthropic
|
|
4
4
|
module Models
|
|
5
5
|
module Beta
|
|
6
|
-
# A tab this call's execution opened that remains open at its end — the creation
|
|
7
|
-
# delta of the `tabs` inventory, not an event log.
|
|
8
|
-
#
|
|
9
|
-
# Carries only the `tab_id`; the tab's `title` and `url` live on its `tabs` entry,
|
|
10
|
-
# which must include the same `tab_id`. A tab opened during a failed call gets no
|
|
11
|
-
# deferred `tab_opened`; it simply appears in the next result's `tabs` inventory.
|
|
12
6
|
module BetaBrowserStateChange
|
|
13
7
|
extend Anthropic::Internal::Type::Union
|
|
14
8
|
|
|
@@ -5,7 +5,6 @@ module Anthropic
|
|
|
5
5
|
module Beta
|
|
6
6
|
class BetaCodeExecutionToolResultBlock < Anthropic::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute content
|
|
8
|
-
# Code execution result with encrypted stdout for PFC + web_search results.
|
|
9
8
|
#
|
|
10
9
|
# @return [Anthropic::Models::Beta::BetaCodeExecutionToolResultError, Anthropic::Models::Beta::BetaCodeExecutionResultBlock, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlock]
|
|
11
10
|
required :content, union: -> { Anthropic::Beta::BetaCodeExecutionToolResultBlockContent }
|
|
@@ -21,10 +20,8 @@ module Anthropic
|
|
|
21
20
|
required :type, const: :code_execution_tool_result
|
|
22
21
|
|
|
23
22
|
# @!method initialize(content:, tool_use_id:, type: :code_execution_tool_result)
|
|
24
|
-
# @param content [Anthropic::Models::Beta::BetaCodeExecutionToolResultError, Anthropic::Models::Beta::BetaCodeExecutionResultBlock, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlock]
|
|
25
|
-
#
|
|
23
|
+
# @param content [Anthropic::Models::Beta::BetaCodeExecutionToolResultError, Anthropic::Models::Beta::BetaCodeExecutionResultBlock, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlock]
|
|
26
24
|
# @param tool_use_id [String]
|
|
27
|
-
#
|
|
28
25
|
# @param type [Symbol, :code_execution_tool_result]
|
|
29
26
|
end
|
|
30
27
|
end
|
|
@@ -5,7 +5,6 @@ module Anthropic
|
|
|
5
5
|
module Beta
|
|
6
6
|
class BetaCodeExecutionToolResultBlockParam < Anthropic::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute content
|
|
8
|
-
# Code execution result with encrypted stdout for PFC + web_search results.
|
|
9
8
|
#
|
|
10
9
|
# @return [Anthropic::Models::Beta::BetaCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaCodeExecutionResultBlockParam, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlockParam]
|
|
11
10
|
required :content, union: -> { Anthropic::Beta::BetaCodeExecutionToolResultBlockParamContent }
|
|
@@ -27,7 +26,7 @@ module Anthropic
|
|
|
27
26
|
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
|
28
27
|
|
|
29
28
|
# @!method initialize(content:, tool_use_id:, cache_control: nil, type: :code_execution_tool_result)
|
|
30
|
-
# @param content [Anthropic::Models::Beta::BetaCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaCodeExecutionResultBlockParam, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlockParam]
|
|
29
|
+
# @param content [Anthropic::Models::Beta::BetaCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaCodeExecutionResultBlockParam, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlockParam]
|
|
31
30
|
#
|
|
32
31
|
# @param tool_use_id [String]
|
|
33
32
|
#
|
|
@@ -21,7 +21,13 @@ module Anthropic
|
|
|
21
21
|
# @return [Symbol, :compaction]
|
|
22
22
|
required :type, const: :compaction
|
|
23
23
|
|
|
24
|
-
# @!
|
|
24
|
+
# @!attribute signature
|
|
25
|
+
# Signature over the summary, to be sent back with the block verbatim
|
|
26
|
+
#
|
|
27
|
+
# @return [String, nil]
|
|
28
|
+
optional :signature, String, nil?: true
|
|
29
|
+
|
|
30
|
+
# @!method initialize(content:, encrypted_content:, signature: nil, type: :compaction)
|
|
25
31
|
# A compaction block returned when autocompact is triggered.
|
|
26
32
|
#
|
|
27
33
|
# When content is None, it indicates the compaction failed to produce a valid
|
|
@@ -32,6 +38,8 @@ module Anthropic
|
|
|
32
38
|
#
|
|
33
39
|
# @param encrypted_content [String, nil] Opaque metadata from prior compaction, to be round-tripped verbatim
|
|
34
40
|
#
|
|
41
|
+
# @param signature [String, nil] Signature over the summary, to be sent back with the block verbatim
|
|
42
|
+
#
|
|
35
43
|
# @param type [Symbol, :compaction]
|
|
36
44
|
end
|
|
37
45
|
end
|