anthropic 1.78.0 → 1.79.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 +35 -0
- data/LICENSE +8 -0
- data/README.md +42 -1
- data/lib/anthropic/client.rb +32 -0
- data/lib/anthropic/helpers/aws/client.rb +12 -2
- data/lib/anthropic/helpers/aws_auth.rb +8 -1
- data/lib/anthropic/helpers/bedrock/client.rb +19 -2
- data/lib/anthropic/helpers/bedrock/mantle_client.rb +19 -2
- data/lib/anthropic/helpers/google_cloud/client.rb +12 -2
- data/lib/anthropic/helpers/streaming/message_stream.rb +20 -43
- data/lib/anthropic/helpers/tools/runner.rb +104 -11
- data/lib/anthropic/helpers/tracing/attributes.rb +34 -0
- data/lib/anthropic/helpers/tracing/config.rb +16 -0
- data/lib/anthropic/helpers/tracing/content.rb +346 -0
- data/lib/anthropic/helpers/tracing/recorders.rb +131 -0
- data/lib/anthropic/helpers/tracing/response.rb +29 -0
- data/lib/anthropic/helpers/tracing/streamed_message.rb +189 -0
- data/lib/anthropic/helpers/tracing/tool_spans.rb +138 -0
- data/lib/anthropic/helpers/tracing.rb +13 -0
- data/lib/anthropic/helpers/vertex/client.rb +19 -2
- data/lib/anthropic/internal/tracing.rb +1118 -0
- data/lib/anthropic/internal/transport/base_client.rb +174 -10
- data/lib/anthropic/internal/transport/pooled_net_requester.rb +6 -0
- data/lib/anthropic/models/anthropic_beta.rb +3 -0
- data/lib/anthropic/models/beta/agent_create_params.rb +17 -6
- data/lib/anthropic/models/beta/agent_update_params.rb +17 -6
- data/lib/anthropic/models/beta/beta_dream_input.rb +2 -2
- data/lib/anthropic/models/beta/beta_fallbacks_param.rb +6 -2
- data/lib/anthropic/models/beta/beta_managed_agents_agent.rb +15 -6
- data/lib/anthropic/models/beta/beta_managed_agents_agent_tool_config_params.rb +8 -8
- data/lib/anthropic/models/beta/beta_managed_agents_agent_toolset_default_config.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_agent_toolset_default_config_params.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_agent_with_overrides_params.rb +6 -6
- data/lib/anthropic/models/beta/beta_managed_agents_aws_role_execution_identity.rb +29 -0
- data/lib/anthropic/models/beta/beta_managed_agents_aws_role_execution_identity_params.rb +34 -0
- data/lib/anthropic/models/beta/beta_managed_agents_bash_tool_config.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_bash_tool_config_params.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_deployment_initial_event.rb +3 -3
- data/lib/anthropic/models/beta/beta_managed_agents_deployment_initial_event_params.rb +3 -3
- data/lib/anthropic/models/beta/beta_managed_agents_deployment_paused_reason.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_deployment_paused_reason_error.rb +38 -14
- data/lib/anthropic/models/beta/beta_managed_agents_deployment_run.rb +16 -16
- data/lib/anthropic/models/beta/beta_managed_agents_deployment_user_define_outcome_event.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_deployment_user_message_event.rb +4 -4
- data/lib/anthropic/models/beta/beta_managed_agents_edit_tool_config.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_edit_tool_config_params.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_execution_identity.rb +57 -0
- data/lib/anthropic/models/beta/beta_managed_agents_execution_identity_params.rb +62 -0
- data/lib/anthropic/models/beta/beta_managed_agents_github_repository_resource_config.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_github_repository_resource_params.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_glob_tool_config.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_glob_tool_config_params.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_grep_tool_config.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_grep_tool_config_params.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_mcp_tool_config.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_mcp_tool_config_params.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_mcp_toolset_default_config.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_mcp_toolset_default_config_params.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_model.rb +0 -2
- data/lib/anthropic/models/beta/beta_managed_agents_model_config.rb +5 -5
- data/lib/anthropic/models/beta/beta_managed_agents_multiagent.rb +1 -1
- data/lib/anthropic/models/beta/beta_managed_agents_multiagent_coordinator.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_multiagent_params.rb +1 -1
- data/lib/anthropic/models/beta/beta_managed_agents_read_tool_config.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_read_tool_config_params.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_service_account_execution_identity.rb +21 -0
- data/lib/anthropic/models/beta/beta_managed_agents_service_account_execution_identity_params.rb +23 -0
- data/lib/anthropic/models/beta/beta_managed_agents_session_agent.rb +16 -6
- data/lib/anthropic/models/beta/beta_managed_agents_session_agent_update.rb +3 -3
- data/lib/anthropic/models/beta/beta_managed_agents_session_multiagent.rb +1 -1
- data/lib/anthropic/models/beta/beta_managed_agents_session_multiagent_coordinator.rb +8 -2
- data/lib/anthropic/models/beta/beta_managed_agents_session_resource_config.rb +3 -3
- data/lib/anthropic/models/beta/beta_managed_agents_session_thread_agent.rb +19 -6
- data/lib/anthropic/models/beta/beta_managed_agents_skill_params.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_start_event_preview.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_trigger_context.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_user_tool_result_event.rb +4 -4
- data/lib/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config_params.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_web_search_tool_config.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_web_search_tool_config_params.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_write_tool_config.rb +2 -2
- data/lib/anthropic/models/beta/beta_managed_agents_write_tool_config_params.rb +2 -2
- data/lib/anthropic/models/beta/beta_message_delta_usage.rb +0 -1
- data/lib/anthropic/models/beta/beta_output_behavior.rb +2 -2
- data/lib/anthropic/models/beta/beta_thinking_config_adaptive.rb +6 -4
- data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +6 -4
- data/lib/anthropic/models/beta/beta_thinking_config_param.rb +8 -7
- data/lib/anthropic/models/beta/beta_usage.rb +0 -1
- data/lib/anthropic/models/beta/deployment_create_params.rb +3 -3
- data/lib/anthropic/models/beta/deployment_update_params.rb +3 -3
- data/lib/anthropic/models/beta/memory_stores/beta_managed_agents_actor.rb +3 -3
- data/lib/anthropic/models/beta/memory_stores/beta_managed_agents_error.rb +6 -3
- data/lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_list_item.rb +2 -2
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +15 -10
- data/lib/anthropic/models/beta/message_create_params.rb +21 -12
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +21 -12
- data/lib/anthropic/models/beta/organization/beta_analytics_cost_bucketed_result.rb +3 -3
- data/lib/anthropic/models/beta/organization/beta_analytics_cost_users_item.rb +3 -3
- data/lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb +3 -3
- data/lib/anthropic/models/beta/organization/beta_analytics_usage_users_item.rb +3 -3
- data/lib/anthropic/models/beta/organization/beta_deleted_telemetry_destination.rb +30 -0
- data/lib/anthropic/models/beta/organization/beta_spend_limit.rb +2 -2
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination.rb +118 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_content_mode.rb +29 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_delivery_health.rb +69 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_disabled_reason.rb +73 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_disabled_reason_caller.rb +21 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_disabled_reason_invalid_address.rb +29 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_disabled_reason_redirect.rb +23 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_disabled_reason_sustained_failure.rb +25 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_state.rb +71 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_state_disabled.rb +36 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_state_disabled_params.rb +24 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_state_enabled.rb +21 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_state_enabled_params.rb +23 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_state_params.rb +61 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_test_failure.rb +37 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_test_response.rb +35 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_test_result.rb +61 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_test_success.rb +21 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_traces.rb +61 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_traces_params.rb +71 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_workspaces.rb +69 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_all.rb +23 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_all_params.rb +23 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_exclude.rb +22 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_exclude_params.rb +49 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_include.rb +21 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_include_params.rb +49 -0
- data/lib/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_params.rb +70 -0
- data/lib/anthropic/models/beta/organization/invite_create_params.rb +4 -2
- data/lib/anthropic/models/beta/organization/spend_limit_list_params.rb +2 -5
- data/lib/anthropic/models/beta/organization/telemetry_destination_create_params.rb +93 -0
- data/lib/anthropic/models/beta/organization/telemetry_destination_delete_params.rb +34 -0
- data/lib/anthropic/models/beta/organization/telemetry_destination_list_params.rb +62 -0
- data/lib/anthropic/models/beta/organization/telemetry_destination_retrieve_params.rb +34 -0
- data/lib/anthropic/models/beta/organization/telemetry_destination_test_params.rb +34 -0
- data/lib/anthropic/models/beta/organization/telemetry_destination_update_params.rb +120 -0
- data/lib/anthropic/models/beta/organization/telemetry_destinations/beta_deleted_telemetry_destination_workspace.rb +40 -0
- data/lib/anthropic/models/beta/organization/telemetry_destinations/beta_telemetry_destination_workspace.rb +52 -0
- data/lib/anthropic/models/beta/organization/telemetry_destinations/workspace_add_params.rb +44 -0
- data/lib/anthropic/models/beta/organization/telemetry_destinations/workspace_list_params.rb +57 -0
- data/lib/anthropic/models/beta/organization/telemetry_destinations/workspace_remove_params.rb +44 -0
- data/lib/anthropic/models/beta/organization/user_update_params.rb +4 -2
- data/lib/anthropic/models/beta/session_create_params.rb +5 -5
- 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_result_event.rb +4 -4
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_agent_message_event.rb +2 -2
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_agent_thread_message_received_event.rb +4 -4
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_agent_thread_message_sent_event.rb +4 -4
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_agent_tool_result_event.rb +4 -4
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_billing_error.rb +3 -3
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_credential_host_unreachable_error.rb +3 -3
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_document_block.rb +4 -4
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_event_params.rb +14 -8
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_github_repository_resource.rb +2 -2
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_image_block.rb +3 -3
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_inline_agent.rb +14 -6
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_mcp_authentication_failed_error.rb +3 -3
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_mcp_connection_failed_error.rb +3 -3
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_model_overloaded_error.rb +3 -3
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_model_rate_limited_error.rb +3 -3
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_model_request_failed_error.rb +3 -3
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_repository_authentication_error.rb +3 -3
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_repository_checkout_error.rb +3 -3
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_repository_clone_error.rb +3 -3
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_repository_forbidden_error.rb +3 -3
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_repository_not_found_error.rb +3 -3
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_send_session_events.rb +8 -8
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_session_error_event.rb +14 -8
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_session_event.rb +64 -37
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_session_resource.rb +3 -3
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_session_status_idle_event.rb +4 -4
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rb +8 -2
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread_status_idle_event.rb +4 -4
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_stream_session_events.rb +66 -39
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_stream_session_thread_events.rb +66 -39
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_unknown_error.rb +3 -3
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_user_custom_tool_result_event.rb +7 -7
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_user_custom_tool_result_event_params.rb +7 -7
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_user_define_outcome_event.rb +2 -2
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_user_define_outcome_event_params.rb +2 -2
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_user_message_event.rb +4 -4
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_user_message_event_params.rb +4 -4
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_user_tool_result_event_params.rb +4 -4
- data/lib/anthropic/models/beta/sessions/resource_retrieve_response.rb +3 -3
- data/lib/anthropic/models/beta/sessions/resource_update_response.rb +3 -3
- data/lib/anthropic/models/beta/vaults/beta_managed_agents_credential.rb +6 -3
- data/lib/anthropic/models/beta/vaults/beta_managed_agents_credential_networking_params.rb +7 -2
- data/lib/anthropic/models/beta/vaults/beta_managed_agents_environment_variable_auth_response.rb +7 -2
- data/lib/anthropic/models/beta/vaults/beta_managed_agents_mcp_oauth_refresh_params.rb +3 -3
- data/lib/anthropic/models/beta/vaults/beta_managed_agents_mcp_oauth_refresh_response.rb +12 -3
- data/lib/anthropic/models/beta/vaults/beta_managed_agents_mcp_oauth_refresh_update_params.rb +8 -2
- data/lib/anthropic/models/beta/vaults/credential_create_params.rb +6 -3
- data/lib/anthropic/models/beta/vaults/credential_update_params.rb +6 -3
- data/lib/anthropic/models/message_count_tokens_params.rb +15 -10
- data/lib/anthropic/models/message_create_params.rb +15 -10
- data/lib/anthropic/models/messages/batch_create_params.rb +15 -10
- data/lib/anthropic/models/model.rb +0 -2
- data/lib/anthropic/models/organization/invite_create_params.rb +4 -2
- data/lib/anthropic/models/organization/user_update_params.rb +4 -2
- data/lib/anthropic/models/thinking_config_adaptive.rb +6 -4
- data/lib/anthropic/models/thinking_config_enabled.rb +6 -4
- data/lib/anthropic/models/thinking_config_param.rb +8 -7
- data/lib/anthropic/request_options.rb +7 -0
- data/lib/anthropic/resources/beta/agents/versions.rb +4 -0
- data/lib/anthropic/resources/beta/agents.rb +22 -2
- data/lib/anthropic/resources/beta/deployment_runs.rb +16 -0
- data/lib/anthropic/resources/beta/deployments.rb +24 -0
- data/lib/anthropic/resources/beta/dreams.rb +15 -0
- data/lib/anthropic/resources/beta/environments/work.rb +42 -0
- data/lib/anthropic/resources/beta/environments.rb +18 -0
- data/lib/anthropic/resources/beta/files.rb +15 -0
- data/lib/anthropic/resources/beta/memory_stores/memories.rb +31 -0
- data/lib/anthropic/resources/beta/memory_stores/memory_versions.rb +28 -0
- data/lib/anthropic/resources/beta/memory_stores.rb +18 -0
- data/lib/anthropic/resources/beta/messages/batches.rb +19 -1
- data/lib/anthropic/resources/beta/messages.rb +12 -4
- data/lib/anthropic/resources/beta/models.rb +6 -0
- data/lib/anthropic/resources/beta/organization/analytics/apps/chat/projects.rb +3 -0
- data/lib/anthropic/resources/beta/organization/analytics/artifacts.rb +3 -0
- data/lib/anthropic/resources/beta/organization/analytics/connectors.rb +4 -0
- data/lib/anthropic/resources/beta/organization/analytics/cost_report.rb +20 -0
- data/lib/anthropic/resources/beta/organization/analytics/plugins.rb +4 -0
- data/lib/anthropic/resources/beta/organization/analytics/skills.rb +4 -0
- data/lib/anthropic/resources/beta/organization/analytics/summaries.rb +3 -0
- data/lib/anthropic/resources/beta/organization/analytics/usage_report.rb +20 -0
- data/lib/anthropic/resources/beta/organization/analytics/user_cost_report.rb +23 -0
- data/lib/anthropic/resources/beta/organization/analytics/user_usage_report.rb +23 -0
- data/lib/anthropic/resources/beta/organization/analytics/users.rb +4 -0
- data/lib/anthropic/resources/beta/organization/api_keys.rb +9 -0
- data/lib/anthropic/resources/beta/organization/compliance_settings.rb +4 -0
- data/lib/anthropic/resources/beta/organization/external_keys.rb +18 -0
- data/lib/anthropic/resources/beta/organization/federation/issuers.rb +15 -0
- data/lib/anthropic/resources/beta/organization/federation/rules/workspaces.rb +14 -0
- data/lib/anthropic/resources/beta/organization/federation/rules.rb +15 -0
- data/lib/anthropic/resources/beta/organization/invites.rb +12 -0
- data/lib/anthropic/resources/beta/organization/plugin_marketplaces.rb +14 -0
- data/lib/anthropic/resources/beta/organization/plugins/installation_settings.rb +16 -0
- data/lib/anthropic/resources/beta/organization/plugins/shares.rb +4 -0
- data/lib/anthropic/resources/beta/organization/plugins/versions.rb +22 -0
- data/lib/anthropic/resources/beta/organization/plugins.rb +27 -0
- data/lib/anthropic/resources/beta/organization/rate_limits.rb +3 -0
- data/lib/anthropic/resources/beta/organization/rbac_groups/members.rb +14 -0
- data/lib/anthropic/resources/beta/organization/rbac_groups.rb +15 -0
- data/lib/anthropic/resources/beta/organization/rbac_roles/permissions.rb +4 -0
- data/lib/anthropic/resources/beta/organization/rbac_roles.rb +6 -0
- data/lib/anthropic/resources/beta/organization/service_accounts/workspaces.rb +14 -0
- data/lib/anthropic/resources/beta/organization/service_accounts.rb +15 -0
- data/lib/anthropic/resources/beta/organization/spend_limits/effective.rb +5 -2
- data/lib/anthropic/resources/beta/organization/spend_limits/increase_requests.rb +12 -0
- data/lib/anthropic/resources/beta/organization/spend_limits.rb +17 -7
- data/lib/anthropic/resources/beta/organization/telemetry_destinations/workspaces.rb +173 -0
- data/lib/anthropic/resources/beta/organization/telemetry_destinations.rb +274 -0
- data/lib/anthropic/resources/beta/organization/users.rb +12 -0
- data/lib/anthropic/resources/beta/organization/workspaces/members.rb +26 -0
- data/lib/anthropic/resources/beta/organization/workspaces/rate_limits.rb +4 -0
- data/lib/anthropic/resources/beta/organization/workspaces/service_accounts.rb +26 -0
- data/lib/anthropic/resources/beta/organization/workspaces.rb +15 -0
- data/lib/anthropic/resources/beta/organization.rb +7 -0
- data/lib/anthropic/resources/beta/sessions/events.rb +21 -1
- data/lib/anthropic/resources/beta/sessions/resources.rb +26 -0
- data/lib/anthropic/resources/beta/sessions/threads/events.rb +15 -1
- data/lib/anthropic/resources/beta/sessions/threads.rb +16 -0
- data/lib/anthropic/resources/beta/sessions.rb +32 -0
- data/lib/anthropic/resources/beta/skills/versions.rb +17 -0
- data/lib/anthropic/resources/beta/skills.rb +12 -0
- data/lib/anthropic/resources/beta/tunnels/certificates.rb +20 -0
- data/lib/anthropic/resources/beta/tunnels.rb +18 -0
- data/lib/anthropic/resources/beta/user_profiles.rb +15 -0
- data/lib/anthropic/resources/beta/vaults/credentials.rb +38 -0
- data/lib/anthropic/resources/beta/vaults.rb +18 -0
- data/lib/anthropic/resources/completions.rb +5 -1
- data/lib/anthropic/resources/files.rb +15 -0
- data/lib/anthropic/resources/messages/batches.rb +19 -1
- data/lib/anthropic/resources/messages.rb +12 -4
- data/lib/anthropic/resources/models.rb +6 -0
- data/lib/anthropic/resources/organization/api_keys.rb +9 -0
- data/lib/anthropic/resources/organization/compliance_settings.rb +4 -0
- data/lib/anthropic/resources/organization/external_keys.rb +18 -0
- data/lib/anthropic/resources/organization/federation/issuers.rb +15 -0
- data/lib/anthropic/resources/organization/federation/rules/workspaces.rb +14 -0
- data/lib/anthropic/resources/organization/federation/rules.rb +15 -0
- data/lib/anthropic/resources/organization/invites.rb +12 -0
- data/lib/anthropic/resources/organization/rate_limits.rb +3 -0
- data/lib/anthropic/resources/organization/service_accounts/workspaces.rb +14 -0
- data/lib/anthropic/resources/organization/service_accounts.rb +15 -0
- data/lib/anthropic/resources/organization/users.rb +12 -0
- data/lib/anthropic/resources/organization/workspaces/members.rb +26 -0
- data/lib/anthropic/resources/organization/workspaces/rate_limits.rb +4 -0
- data/lib/anthropic/resources/organization/workspaces/service_accounts.rb +26 -0
- data/lib/anthropic/resources/organization/workspaces.rb +15 -0
- data/lib/anthropic/resources/organization.rb +2 -0
- data/lib/anthropic/resources/skills/versions.rb +14 -0
- data/lib/anthropic/resources/skills.rb +12 -0
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +58 -0
- data/rbi/anthropic/client.rbi +28 -0
- data/rbi/anthropic/helpers/aws/client.rbi +6 -2
- data/rbi/anthropic/helpers/bedrock/client.rbi +6 -2
- data/rbi/anthropic/helpers/bedrock/mantle_client.rbi +6 -2
- data/rbi/anthropic/helpers/google_cloud/client.rbi +6 -2
- data/rbi/anthropic/helpers/streaming/message_stream.rbi +4 -1
- data/rbi/anthropic/helpers/vertex/client.rbi +6 -2
- data/rbi/anthropic/internal/tracing.rbi +847 -0
- data/rbi/anthropic/internal/transport/base_client.rbi +93 -5
- data/rbi/anthropic/internal/type/base_stream.rbi +2 -0
- data/rbi/anthropic/models/anthropic_beta.rbi +5 -0
- data/rbi/anthropic/models/beta/agent_create_params.rbi +34 -3
- data/rbi/anthropic/models/beta/agent_update_params.rbi +34 -3
- data/rbi/anthropic/models/beta/beta_fallback_param.rbi +3 -2
- data/rbi/anthropic/models/beta/beta_fallbacks_param.rbi +6 -2
- data/rbi/anthropic/models/beta/beta_managed_agents_agent.rbi +17 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_agent_with_overrides_params.rbi +3 -3
- data/rbi/anthropic/models/beta/beta_managed_agents_aws_role_execution_identity.rbi +40 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_aws_role_execution_identity_params.rbi +42 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_execution_identity.rbi +85 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_execution_identity_params.rbi +87 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_model.rbi +0 -2
- data/rbi/anthropic/models/beta/beta_managed_agents_service_account_execution_identity.rbi +32 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_service_account_execution_identity_params.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_session_agent.rbi +19 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_session_multiagent_coordinator.rbi +9 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_session_thread_agent.rbi +19 -0
- data/rbi/anthropic/models/beta/beta_message_delta_usage.rbi +0 -2
- data/rbi/anthropic/models/beta/beta_thinking_config_adaptive.rbi +9 -6
- data/rbi/anthropic/models/beta/beta_thinking_config_enabled.rbi +9 -6
- data/rbi/anthropic/models/beta/beta_thinking_config_param.rbi +11 -9
- data/rbi/anthropic/models/beta/beta_usage.rbi +0 -2
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +28 -18
- data/rbi/anthropic/models/beta/message_create_params.rbi +40 -22
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +40 -22
- data/rbi/anthropic/models/beta/organization/beta_analytics_cost_bucketed_result.rbi +6 -6
- data/rbi/anthropic/models/beta/organization/beta_analytics_cost_users_item.rbi +6 -6
- data/rbi/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rbi +6 -6
- data/rbi/anthropic/models/beta/organization/beta_analytics_usage_users_item.rbi +6 -6
- data/rbi/anthropic/models/beta/organization/beta_deleted_telemetry_destination.rbi +39 -0
- data/rbi/anthropic/models/beta/organization/beta_spend_limit.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination.rbi +191 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_content_mode.rbi +53 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_delivery_health.rbi +106 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_disabled_reason.rbi +95 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_disabled_reason_caller.rbi +31 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_disabled_reason_invalid_address.rbi +39 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_disabled_reason_redirect.rbi +33 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_disabled_reason_sustained_failure.rbi +35 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_state.rbi +99 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_state_disabled.rbi +66 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_state_disabled_params.rbi +34 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_state_enabled.rbi +31 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_state_enabled_params.rbi +33 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_state_params.rbi +81 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_test_failure.rbi +47 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_test_response.rbi +62 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_test_result.rbi +88 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_test_success.rbi +31 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_traces.rbi +97 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_traces_params.rbi +120 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_workspaces.rbi +93 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_all.rbi +33 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_all_params.rbi +33 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_exclude.rbi +32 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_exclude_params.rbi +80 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_include.rbi +31 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_include_params.rbi +80 -0
- data/rbi/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_params.rbi +107 -0
- data/rbi/anthropic/models/beta/organization/invite_create_params.rbi +6 -3
- data/rbi/anthropic/models/beta/organization/spend_limit_list_params.rbi +2 -8
- data/rbi/anthropic/models/beta/organization/telemetry_destination_create_params.rbi +186 -0
- data/rbi/anthropic/models/beta/organization/telemetry_destination_delete_params.rbi +73 -0
- data/rbi/anthropic/models/beta/organization/telemetry_destination_list_params.rbi +114 -0
- data/rbi/anthropic/models/beta/organization/telemetry_destination_retrieve_params.rbi +73 -0
- data/rbi/anthropic/models/beta/organization/telemetry_destination_test_params.rbi +73 -0
- data/rbi/anthropic/models/beta/organization/telemetry_destination_update_params.rbi +264 -0
- data/rbi/anthropic/models/beta/organization/telemetry_destinations/beta_deleted_telemetry_destination_workspace.rbi +61 -0
- data/rbi/anthropic/models/beta/organization/telemetry_destinations/beta_telemetry_destination_workspace.rbi +73 -0
- data/rbi/anthropic/models/beta/organization/telemetry_destinations/workspace_add_params.rbi +84 -0
- data/rbi/anthropic/models/beta/organization/telemetry_destinations/workspace_list_params.rbi +100 -0
- data/rbi/anthropic/models/beta/organization/telemetry_destinations/workspace_remove_params.rbi +84 -0
- data/rbi/anthropic/models/beta/organization/user_update_params.rbi +6 -3
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_agent_custom_tool_use_event.rbi +3 -1
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_event_params.rbi +2 -2
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_inline_agent.rbi +17 -0
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_send_session_events.rbi +2 -2
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_session_event.rbi +2 -2
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rbi +9 -0
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_stream_session_events.rbi +2 -2
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_stream_session_thread_events.rbi +2 -2
- 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_custom_tool_result_event_params.rbi +4 -4
- data/rbi/anthropic/models/message_count_tokens_params.rbi +28 -18
- data/rbi/anthropic/models/message_create_params.rbi +28 -18
- data/rbi/anthropic/models/messages/batch_create_params.rbi +28 -18
- data/rbi/anthropic/models/model.rbi +0 -2
- data/rbi/anthropic/models/organization/invite_create_params.rbi +6 -3
- data/rbi/anthropic/models/organization/user_update_params.rbi +6 -3
- data/rbi/anthropic/models/thinking_config_adaptive.rbi +9 -6
- data/rbi/anthropic/models/thinking_config_enabled.rbi +9 -6
- data/rbi/anthropic/models/thinking_config_param.rbi +11 -9
- data/rbi/anthropic/request_options.rbi +5 -0
- data/rbi/anthropic/resources/beta/agents.rbi +22 -2
- data/rbi/anthropic/resources/beta/messages/batches.rbi +2 -1
- data/rbi/anthropic/resources/beta/messages.rbi +56 -32
- data/rbi/anthropic/resources/beta/organization/invites.rbi +2 -1
- data/rbi/anthropic/resources/beta/organization/spend_limits/effective.rbi +2 -2
- data/rbi/anthropic/resources/beta/organization/spend_limits.rbi +5 -10
- data/rbi/anthropic/resources/beta/organization/telemetry_destinations/workspaces.rbi +124 -0
- data/rbi/anthropic/resources/beta/organization/telemetry_destinations.rbi +300 -0
- data/rbi/anthropic/resources/beta/organization/users.rbi +2 -1
- data/rbi/anthropic/resources/beta/organization.rbi +7 -0
- data/rbi/anthropic/resources/beta/sessions/events.rbi +2 -1
- data/rbi/anthropic/resources/beta/sessions/threads/events.rbi +2 -1
- data/rbi/anthropic/resources/completions.rbi +6 -1
- data/rbi/anthropic/resources/messages/batches.rbi +2 -1
- data/rbi/anthropic/resources/messages.rbi +44 -28
- data/rbi/anthropic/resources/organization/invites.rbi +2 -1
- data/rbi/anthropic/resources/organization/users.rbi +2 -1
- data/sig/anthropic/client.rbs +1 -0
- data/sig/anthropic/helpers/bedrock/client.rbs +2 -1
- data/sig/anthropic/helpers/google_cloud/client.rbs +2 -1
- data/sig/anthropic/helpers/streaming/message_stream.rbs +2 -2
- data/sig/anthropic/helpers/vertex/client.rbs +2 -1
- data/sig/anthropic/internal/tracing.rbs +477 -0
- data/sig/anthropic/internal/transport/base_client.rbs +37 -2
- data/sig/anthropic/internal/type/base_stream.rbs +1 -1
- data/sig/anthropic/models/anthropic_beta.rbs +2 -0
- data/sig/anthropic/models/beta/agent_create_params.rbs +5 -0
- data/sig/anthropic/models/beta/agent_update_params.rbs +5 -0
- data/sig/anthropic/models/beta/beta_managed_agents_agent.rbs +5 -0
- data/sig/anthropic/models/beta/beta_managed_agents_aws_role_execution_identity.rbs +20 -0
- data/sig/anthropic/models/beta/beta_managed_agents_aws_role_execution_identity_params.rbs +20 -0
- data/sig/anthropic/models/beta/beta_managed_agents_execution_identity.rbs +42 -0
- data/sig/anthropic/models/beta/beta_managed_agents_execution_identity_params.rbs +42 -0
- data/sig/anthropic/models/beta/beta_managed_agents_model.rbs +0 -2
- data/sig/anthropic/models/beta/beta_managed_agents_service_account_execution_identity.rbs +18 -0
- data/sig/anthropic/models/beta/beta_managed_agents_service_account_execution_identity_params.rbs +18 -0
- data/sig/anthropic/models/beta/beta_managed_agents_session_agent.rbs +5 -0
- data/sig/anthropic/models/beta/beta_managed_agents_session_multiagent_coordinator.rbs +2 -0
- data/sig/anthropic/models/beta/beta_managed_agents_session_thread_agent.rbs +5 -0
- data/sig/anthropic/models/beta/organization/beta_deleted_telemetry_destination.rbs +23 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination.rbs +74 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_content_mode.rbs +23 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_delivery_health.rbs +30 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_disabled_reason.rbs +51 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_disabled_reason_caller.rbs +18 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_disabled_reason_invalid_address.rbs +18 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_disabled_reason_redirect.rbs +18 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_disabled_reason_sustained_failure.rbs +18 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_state.rbs +42 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_state_disabled.rbs +29 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_state_disabled_params.rbs +18 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_state_enabled.rbs +17 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_state_enabled_params.rbs +18 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_state_params.rbs +40 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_test_failure.rbs +20 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_test_response.rbs +29 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_test_result.rbs +42 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_test_success.rbs +17 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_traces.rbs +39 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_traces_params.rbs +41 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_workspaces.rbs +45 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_all.rbs +17 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_all_params.rbs +17 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_exclude.rbs +17 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_exclude_params.rbs +25 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_include.rbs +17 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_include_params.rbs +25 -0
- data/sig/anthropic/models/beta/organization/beta_telemetry_destination_workspaces_params.rbs +48 -0
- data/sig/anthropic/models/beta/organization/telemetry_destination_create_params.rbs +65 -0
- data/sig/anthropic/models/beta/organization/telemetry_destination_delete_params.rbs +39 -0
- data/sig/anthropic/models/beta/organization/telemetry_destination_list_params.rbs +55 -0
- data/sig/anthropic/models/beta/organization/telemetry_destination_retrieve_params.rbs +39 -0
- data/sig/anthropic/models/beta/organization/telemetry_destination_test_params.rbs +39 -0
- data/sig/anthropic/models/beta/organization/telemetry_destination_update_params.rbs +79 -0
- data/sig/anthropic/models/beta/organization/telemetry_destinations/beta_deleted_telemetry_destination_workspace.rbs +36 -0
- data/sig/anthropic/models/beta/organization/telemetry_destinations/beta_telemetry_destination_workspace.rbs +41 -0
- data/sig/anthropic/models/beta/organization/telemetry_destinations/workspace_add_params.rbs +46 -0
- data/sig/anthropic/models/beta/organization/telemetry_destinations/workspace_list_params.rbs +55 -0
- data/sig/anthropic/models/beta/organization/telemetry_destinations/workspace_remove_params.rbs +46 -0
- data/sig/anthropic/models/beta/sessions/beta_managed_agents_inline_agent.rbs +5 -0
- data/sig/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rbs +3 -0
- data/sig/anthropic/models/model.rbs +0 -2
- data/sig/anthropic/request_options.rbs +3 -0
- data/sig/anthropic/resources/beta/agents.rbs +2 -0
- data/sig/anthropic/resources/beta/messages/batches.rbs +1 -1
- data/sig/anthropic/resources/beta/messages.rbs +1 -1
- data/sig/anthropic/resources/beta/organization/telemetry_destinations/workspaces.rbs +35 -0
- data/sig/anthropic/resources/beta/organization/telemetry_destinations.rbs +61 -0
- data/sig/anthropic/resources/beta/organization.rbs +2 -0
- data/sig/anthropic/resources/beta/sessions/events.rbs +1 -1
- data/sig/anthropic/resources/beta/sessions/threads/events.rbs +1 -1
- data/sig/anthropic/resources/completions.rbs +1 -1
- data/sig/anthropic/resources/messages/batches.rbs +1 -1
- data/sig/anthropic/resources/messages.rbs +1 -1
- metadata +178 -2
|
@@ -106,11 +106,14 @@ module Anthropic
|
|
|
106
106
|
when :overloaded_error
|
|
107
107
|
Anthropic::BetaOverloadedError.new(**args)
|
|
108
108
|
when :memory_precondition_failed_error
|
|
109
|
-
Anthropic::Beta::MemoryStores::BetaManagedAgentsMemoryPreconditionFailedError.new(
|
|
109
|
+
Anthropic::Beta::MemoryStores::BetaManagedAgentsMemoryPreconditionFailedError.new(
|
|
110
|
+
type: type,
|
|
111
|
+
**args
|
|
112
|
+
)
|
|
110
113
|
when :memory_path_conflict_error
|
|
111
|
-
Anthropic::Beta::MemoryStores::BetaManagedAgentsMemoryPathConflictError.new(**args)
|
|
114
|
+
Anthropic::Beta::MemoryStores::BetaManagedAgentsMemoryPathConflictError.new(type: type, **args)
|
|
112
115
|
when :conflict_error
|
|
113
|
-
Anthropic::Beta::MemoryStores::BetaManagedAgentsConflictError.new(**args)
|
|
116
|
+
Anthropic::Beta::MemoryStores::BetaManagedAgentsConflictError.new(type: type, **args)
|
|
114
117
|
else
|
|
115
118
|
raise ArgumentError, "unknown type: #{type}"
|
|
116
119
|
end
|
|
@@ -67,9 +67,9 @@ module Anthropic
|
|
|
67
67
|
def self.new(type:, **args)
|
|
68
68
|
case type.to_sym
|
|
69
69
|
when :memory
|
|
70
|
-
Anthropic::Beta::MemoryStores::BetaManagedAgentsMemory.new(**args)
|
|
70
|
+
Anthropic::Beta::MemoryStores::BetaManagedAgentsMemory.new(type: type, **args)
|
|
71
71
|
when :memory_prefix
|
|
72
|
-
Anthropic::Beta::MemoryStores::BetaManagedAgentsMemoryPrefix.new(**args)
|
|
72
|
+
Anthropic::Beta::MemoryStores::BetaManagedAgentsMemoryPrefix.new(type: type, **args)
|
|
73
73
|
else
|
|
74
74
|
raise ArgumentError, "unknown type: #{type}"
|
|
75
75
|
end
|
|
@@ -23,7 +23,10 @@ module Anthropic
|
|
|
23
23
|
#
|
|
24
24
|
# If the final message uses the `assistant` role, the response content will
|
|
25
25
|
# continue immediately from the content in that message. This can be used to
|
|
26
|
-
# constrain part of the model's response.
|
|
26
|
+
# constrain part of the model's response. This is called prefill. On models that
|
|
27
|
+
# don't support prefill, creating a message that ends with a partial `assistant`
|
|
28
|
+
# response returns a 400 error. See
|
|
29
|
+
# [Prefill not supported](https://platform.claude.com/docs/en/api/errors#prefill-not-supported).
|
|
27
30
|
#
|
|
28
31
|
# Example with a single `user` message:
|
|
29
32
|
#
|
|
@@ -41,7 +44,8 @@ module Anthropic
|
|
|
41
44
|
# ]
|
|
42
45
|
# ```
|
|
43
46
|
#
|
|
44
|
-
# Example with a partially-filled response from Claude
|
|
47
|
+
# Example with a partially-filled response from Claude, for models that support
|
|
48
|
+
# prefill:
|
|
45
49
|
#
|
|
46
50
|
# ```json
|
|
47
51
|
# [
|
|
@@ -161,15 +165,16 @@ module Anthropic
|
|
|
161
165
|
optional :system_, union: -> { Anthropic::Beta::MessageCountTokensParams::System }, api_name: :system
|
|
162
166
|
|
|
163
167
|
# @!attribute thinking
|
|
164
|
-
# Configuration for
|
|
168
|
+
# Configuration for Claude's thinking.
|
|
165
169
|
#
|
|
166
|
-
#
|
|
167
|
-
#
|
|
168
|
-
# tokens
|
|
170
|
+
# With `{"type": "adaptive"}`, Claude decides when and how much to think. With
|
|
171
|
+
# `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of
|
|
172
|
+
# at least 1,024. Thinking tokens count toward your `max_tokens` limit.
|
|
169
173
|
#
|
|
170
|
-
#
|
|
171
|
-
#
|
|
172
|
-
#
|
|
174
|
+
# Which `type` values are accepted, and what happens when you omit `thinking`,
|
|
175
|
+
# depend on the model. See
|
|
176
|
+
# [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#configuring-thinking)
|
|
177
|
+
# for each model's behavior.
|
|
173
178
|
#
|
|
174
179
|
# @return [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigBetweenTools, Anthropic::Models::Beta::BetaThinkingConfigAdaptive, nil]
|
|
175
180
|
optional :thinking, union: -> { Anthropic::Beta::BetaThinkingConfigParam }
|
|
@@ -312,7 +317,7 @@ module Anthropic
|
|
|
312
317
|
#
|
|
313
318
|
# @param system_ [String, Array<Anthropic::Models::Beta::BetaTextBlockParam>] System prompt.
|
|
314
319
|
#
|
|
315
|
-
# @param thinking [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigBetweenTools, Anthropic::Models::Beta::BetaThinkingConfigAdaptive] Configuration for
|
|
320
|
+
# @param thinking [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigBetweenTools, Anthropic::Models::Beta::BetaThinkingConfigAdaptive] Configuration for Claude's thinking.
|
|
316
321
|
#
|
|
317
322
|
# @param tool_choice [Anthropic::Models::Beta::BetaToolChoiceAuto, Anthropic::Models::Beta::BetaToolChoiceAny, Anthropic::Models::Beta::BetaToolChoiceTool, Anthropic::Models::Beta::BetaToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
|
|
318
323
|
#
|
|
@@ -42,7 +42,10 @@ module Anthropic
|
|
|
42
42
|
#
|
|
43
43
|
# If the final message uses the `assistant` role, the response content will
|
|
44
44
|
# continue immediately from the content in that message. This can be used to
|
|
45
|
-
# constrain part of the model's response.
|
|
45
|
+
# constrain part of the model's response. This is called prefill. On models that
|
|
46
|
+
# don't support prefill, creating a message that ends with a partial `assistant`
|
|
47
|
+
# response returns a 400 error. See
|
|
48
|
+
# [Prefill not supported](https://platform.claude.com/docs/en/api/errors#prefill-not-supported).
|
|
46
49
|
#
|
|
47
50
|
# Example with a single `user` message:
|
|
48
51
|
#
|
|
@@ -60,7 +63,8 @@ module Anthropic
|
|
|
60
63
|
# ]
|
|
61
64
|
# ```
|
|
62
65
|
#
|
|
63
|
-
# Example with a partially-filled response from Claude
|
|
66
|
+
# Example with a partially-filled response from Claude, for models that support
|
|
67
|
+
# prefill:
|
|
64
68
|
#
|
|
65
69
|
# ```json
|
|
66
70
|
# [
|
|
@@ -180,8 +184,12 @@ module Anthropic
|
|
|
180
184
|
# @!attribute fallbacks
|
|
181
185
|
# Opt-in server-side retry on one or more substitute models when the requested
|
|
182
186
|
# model declines for policy reasons. Tried in order: if the first entry also
|
|
183
|
-
# declines, the second is tried, and so on.
|
|
184
|
-
#
|
|
187
|
+
# declines, the second is tried, and so on. Some models don't support fallbacks;
|
|
188
|
+
# on those models, a list of fallback models returns a 400 error. See
|
|
189
|
+
# [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback).
|
|
190
|
+
# The string "default" requests the requested model's server-defined default
|
|
191
|
+
# fallback configuration. On a model that doesn't support fallbacks, the request
|
|
192
|
+
# runs on the requested model alone, so a declined request stays declined.
|
|
185
193
|
#
|
|
186
194
|
# @return [Symbol, :default, Array<Anthropic::Models::Beta::BetaFallbackParam>, nil]
|
|
187
195
|
optional :fallbacks, union: -> { Anthropic::Beta::BetaFallbacksParam }, nil?: true
|
|
@@ -284,15 +292,16 @@ module Anthropic
|
|
|
284
292
|
optional :temperature, Float
|
|
285
293
|
|
|
286
294
|
# @!attribute thinking
|
|
287
|
-
# Configuration for
|
|
295
|
+
# Configuration for Claude's thinking.
|
|
288
296
|
#
|
|
289
|
-
#
|
|
290
|
-
#
|
|
291
|
-
# tokens
|
|
297
|
+
# With `{"type": "adaptive"}`, Claude decides when and how much to think. With
|
|
298
|
+
# `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of
|
|
299
|
+
# at least 1,024. Thinking tokens count toward your `max_tokens` limit.
|
|
292
300
|
#
|
|
293
|
-
#
|
|
294
|
-
#
|
|
295
|
-
#
|
|
301
|
+
# Which `type` values are accepted, and what happens when you omit `thinking`,
|
|
302
|
+
# depend on the model. See
|
|
303
|
+
# [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#configuring-thinking)
|
|
304
|
+
# for each model's behavior.
|
|
296
305
|
#
|
|
297
306
|
# @return [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigBetweenTools, Anthropic::Models::Beta::BetaThinkingConfigAdaptive, nil]
|
|
298
307
|
optional :thinking, union: -> { Anthropic::Beta::BetaThinkingConfigParam }
|
|
@@ -484,7 +493,7 @@ module Anthropic
|
|
|
484
493
|
#
|
|
485
494
|
# @param temperature [Float] Amount of randomness injected into the response.
|
|
486
495
|
#
|
|
487
|
-
# @param thinking [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigBetweenTools, Anthropic::Models::Beta::BetaThinkingConfigAdaptive] Configuration for
|
|
496
|
+
# @param thinking [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigBetweenTools, Anthropic::Models::Beta::BetaThinkingConfigAdaptive] Configuration for Claude's thinking.
|
|
488
497
|
#
|
|
489
498
|
# @param tool_choice [Anthropic::Models::Beta::BetaToolChoiceAuto, Anthropic::Models::Beta::BetaToolChoiceAny, Anthropic::Models::Beta::BetaToolChoiceTool, Anthropic::Models::Beta::BetaToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
|
|
490
499
|
#
|
|
@@ -120,7 +120,10 @@ module Anthropic
|
|
|
120
120
|
#
|
|
121
121
|
# If the final message uses the `assistant` role, the response content will
|
|
122
122
|
# continue immediately from the content in that message. This can be used to
|
|
123
|
-
# constrain part of the model's response.
|
|
123
|
+
# constrain part of the model's response. This is called prefill. On models that
|
|
124
|
+
# don't support prefill, creating a message that ends with a partial `assistant`
|
|
125
|
+
# response returns a 400 error. See
|
|
126
|
+
# [Prefill not supported](https://platform.claude.com/docs/en/api/errors#prefill-not-supported).
|
|
124
127
|
#
|
|
125
128
|
# Example with a single `user` message:
|
|
126
129
|
#
|
|
@@ -138,7 +141,8 @@ module Anthropic
|
|
|
138
141
|
# ]
|
|
139
142
|
# ```
|
|
140
143
|
#
|
|
141
|
-
# Example with a partially-filled response from Claude
|
|
144
|
+
# Example with a partially-filled response from Claude, for models that support
|
|
145
|
+
# prefill:
|
|
142
146
|
#
|
|
143
147
|
# ```json
|
|
144
148
|
# [
|
|
@@ -262,8 +266,12 @@ module Anthropic
|
|
|
262
266
|
# @!attribute fallbacks
|
|
263
267
|
# Opt-in server-side retry on one or more substitute models when the requested
|
|
264
268
|
# model declines for policy reasons. Tried in order: if the first entry also
|
|
265
|
-
# declines, the second is tried, and so on.
|
|
266
|
-
#
|
|
269
|
+
# declines, the second is tried, and so on. Some models don't support fallbacks;
|
|
270
|
+
# on those models, a list of fallback models returns a 400 error. See
|
|
271
|
+
# [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback).
|
|
272
|
+
# The string "default" requests the requested model's server-defined default
|
|
273
|
+
# fallback configuration. On a model that doesn't support fallbacks, the request
|
|
274
|
+
# runs on the requested model alone, so a declined request stays declined.
|
|
267
275
|
#
|
|
268
276
|
# @return [Symbol, :default, Array<Anthropic::Models::Beta::BetaFallbackParam>, nil]
|
|
269
277
|
optional :fallbacks, union: -> { Anthropic::Beta::BetaFallbacksParam }, nil?: true
|
|
@@ -384,15 +392,16 @@ module Anthropic
|
|
|
384
392
|
optional :temperature, Float
|
|
385
393
|
|
|
386
394
|
# @!attribute thinking
|
|
387
|
-
# Configuration for
|
|
395
|
+
# Configuration for Claude's thinking.
|
|
388
396
|
#
|
|
389
|
-
#
|
|
390
|
-
#
|
|
391
|
-
# tokens
|
|
397
|
+
# With `{"type": "adaptive"}`, Claude decides when and how much to think. With
|
|
398
|
+
# `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of
|
|
399
|
+
# at least 1,024. Thinking tokens count toward your `max_tokens` limit.
|
|
392
400
|
#
|
|
393
|
-
#
|
|
394
|
-
#
|
|
395
|
-
#
|
|
401
|
+
# Which `type` values are accepted, and what happens when you omit `thinking`,
|
|
402
|
+
# depend on the model. See
|
|
403
|
+
# [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#configuring-thinking)
|
|
404
|
+
# for each model's behavior.
|
|
396
405
|
#
|
|
397
406
|
# @return [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigBetweenTools, Anthropic::Models::Beta::BetaThinkingConfigAdaptive, nil]
|
|
398
407
|
optional :thinking, union: -> { Anthropic::Beta::BetaThinkingConfigParam }
|
|
@@ -569,7 +578,7 @@ module Anthropic
|
|
|
569
578
|
#
|
|
570
579
|
# @param temperature [Float] Amount of randomness injected into the response.
|
|
571
580
|
#
|
|
572
|
-
# @param thinking [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigBetweenTools, Anthropic::Models::Beta::BetaThinkingConfigAdaptive] Configuration for
|
|
581
|
+
# @param thinking [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigBetweenTools, Anthropic::Models::Beta::BetaThinkingConfigAdaptive] Configuration for Claude's thinking.
|
|
573
582
|
#
|
|
574
583
|
# @param tool_choice [Anthropic::Models::Beta::BetaToolChoiceAuto, Anthropic::Models::Beta::BetaToolChoiceAny, Anthropic::Models::Beta::BetaToolChoiceTool, Anthropic::Models::Beta::BetaToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
|
|
575
584
|
#
|
|
@@ -79,9 +79,9 @@ module Anthropic
|
|
|
79
79
|
|
|
80
80
|
# @!attribute model
|
|
81
81
|
# Model that produced the usage or cost, as a model name in the form the
|
|
82
|
-
# `models[]` filter accepts (for example, `claude-opus-5`). Null unless `model`
|
|
83
|
-
# in `group_by[]`; it can also be null on grouped rows whose usage or cost is
|
|
84
|
-
# attributed to a specific model, such as code execution.
|
|
82
|
+
# `models[]` filter accepts (for example, `claude-opus-5-5`). Null unless `model`
|
|
83
|
+
# is in `group_by[]`; it can also be null on grouped rows whose usage or cost is
|
|
84
|
+
# not attributed to a specific model, such as code execution.
|
|
85
85
|
#
|
|
86
86
|
# @return [String, nil]
|
|
87
87
|
required :model, String, nil?: true
|
|
@@ -91,9 +91,9 @@ module Anthropic
|
|
|
91
91
|
|
|
92
92
|
# @!attribute model
|
|
93
93
|
# Model that produced the usage or cost, as a model name in the form the
|
|
94
|
-
# `models[]` filter accepts (for example, `claude-opus-5`). Null unless `model`
|
|
95
|
-
# in `group_by[]`; it can also be null on grouped rows whose usage or cost is
|
|
96
|
-
# attributed to a specific model, such as code execution.
|
|
94
|
+
# `models[]` filter accepts (for example, `claude-opus-5-5`). Null unless `model`
|
|
95
|
+
# is in `group_by[]`; it can also be null on grouped rows whose usage or cost is
|
|
96
|
+
# not attributed to a specific model, such as code execution.
|
|
97
97
|
#
|
|
98
98
|
# @return [String, nil]
|
|
99
99
|
required :model, String, nil?: true
|
|
@@ -66,9 +66,9 @@ module Anthropic
|
|
|
66
66
|
|
|
67
67
|
# @!attribute model
|
|
68
68
|
# Model that produced the usage or cost, as a model name in the form the
|
|
69
|
-
# `models[]` filter accepts (for example, `claude-opus-5`). Null unless `model`
|
|
70
|
-
# in `group_by[]`; it can also be null on grouped rows whose usage or cost is
|
|
71
|
-
# attributed to a specific model, such as code execution.
|
|
69
|
+
# `models[]` filter accepts (for example, `claude-opus-5-5`). Null unless `model`
|
|
70
|
+
# is in `group_by[]`; it can also be null on grouped rows whose usage or cost is
|
|
71
|
+
# not attributed to a specific model, such as code execution.
|
|
72
72
|
#
|
|
73
73
|
# @return [String, nil]
|
|
74
74
|
required :model, String, nil?: true
|
|
@@ -79,9 +79,9 @@ module Anthropic
|
|
|
79
79
|
|
|
80
80
|
# @!attribute model
|
|
81
81
|
# Model that produced the usage or cost, as a model name in the form the
|
|
82
|
-
# `models[]` filter accepts (for example, `claude-opus-5`). Null unless `model`
|
|
83
|
-
# in `group_by[]`; it can also be null on grouped rows whose usage or cost is
|
|
84
|
-
# attributed to a specific model, such as code execution.
|
|
82
|
+
# `models[]` filter accepts (for example, `claude-opus-5-5`). Null unless `model`
|
|
83
|
+
# is in `group_by[]`; it can also be null on grouped rows whose usage or cost is
|
|
84
|
+
# not attributed to a specific model, such as code execution.
|
|
85
85
|
#
|
|
86
86
|
# @return [String, nil]
|
|
87
87
|
required :model, String, nil?: true
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
# @see Anthropic::Resources::Beta::Organization::TelemetryDestinations#delete
|
|
8
|
+
class BetaDeletedTelemetryDestination < Anthropic::Internal::Type::BaseModel
|
|
9
|
+
# @!attribute id
|
|
10
|
+
# ID of the deleted destination (`tdst_...`).
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute type
|
|
16
|
+
#
|
|
17
|
+
# @return [Symbol, :telemetry_destination_deleted]
|
|
18
|
+
required :type, const: :telemetry_destination_deleted
|
|
19
|
+
|
|
20
|
+
# @!method initialize(id:, type: :telemetry_destination_deleted)
|
|
21
|
+
# Confirmation that a destination was deleted.
|
|
22
|
+
#
|
|
23
|
+
# @param id [String] ID of the deleted destination (`tdst_...`).
|
|
24
|
+
#
|
|
25
|
+
# @param type [Symbol, :telemetry_destination_deleted]
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -34,8 +34,8 @@ module Anthropic
|
|
|
34
34
|
|
|
35
35
|
# @!attribute is_enabled
|
|
36
36
|
# Read-only. `false` when extra usage is switched off for this organization
|
|
37
|
-
# (`organization` limit)
|
|
38
|
-
#
|
|
37
|
+
# (`organization` limit); `amount` is kept and applies again when it's switched
|
|
38
|
+
# back on. Always `true` for other limits.
|
|
39
39
|
#
|
|
40
40
|
# @return [Boolean]
|
|
41
41
|
required :is_enabled, Anthropic::Internal::Type::Boolean
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
# @see Anthropic::Resources::Beta::Organization::TelemetryDestinations#create
|
|
8
|
+
class BetaTelemetryDestination < Anthropic::Internal::Type::BaseModel
|
|
9
|
+
# @!attribute id
|
|
10
|
+
# The unique ID of the destination (`tdst_...`).
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute created_at
|
|
16
|
+
# Time the destination was created.
|
|
17
|
+
#
|
|
18
|
+
# @return [Time]
|
|
19
|
+
required :created_at, Time
|
|
20
|
+
|
|
21
|
+
# @!attribute delivery_health
|
|
22
|
+
# The most recent delivery results for this destination.
|
|
23
|
+
#
|
|
24
|
+
# @return [Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDeliveryHealth]
|
|
25
|
+
required :delivery_health, -> { Anthropic::Beta::Organization::BetaTelemetryDestinationDeliveryHealth }
|
|
26
|
+
|
|
27
|
+
# @!attribute display_name
|
|
28
|
+
# Human-readable name for the destination. Null when none was set.
|
|
29
|
+
#
|
|
30
|
+
# @return [String, nil]
|
|
31
|
+
required :display_name, String, nil?: true
|
|
32
|
+
|
|
33
|
+
# @!attribute endpoint_url
|
|
34
|
+
# The base URL of the destination's OTLP/HTTP endpoint, exactly as registered.
|
|
35
|
+
#
|
|
36
|
+
# The API appends the per-signal path, such as `/v1/traces`, on delivery, unless
|
|
37
|
+
# `traces.endpoint_url` is set.
|
|
38
|
+
#
|
|
39
|
+
# @return [String]
|
|
40
|
+
required :endpoint_url, String
|
|
41
|
+
|
|
42
|
+
# @!attribute header_names
|
|
43
|
+
# Names of the registered request headers. Header values are write-only and are
|
|
44
|
+
# never returned.
|
|
45
|
+
#
|
|
46
|
+
# @return [Array<String>]
|
|
47
|
+
required :header_names, Anthropic::Internal::Type::ArrayOf[String]
|
|
48
|
+
|
|
49
|
+
# @!attribute state
|
|
50
|
+
# Whether the destination receives deliveries.
|
|
51
|
+
#
|
|
52
|
+
# @return [Anthropic::Models::Beta::Organization::BetaTelemetryDestinationStateEnabled, Anthropic::Models::Beta::Organization::BetaTelemetryDestinationStateDisabled]
|
|
53
|
+
required :state, union: -> { Anthropic::Beta::Organization::BetaTelemetryDestinationState }
|
|
54
|
+
|
|
55
|
+
# @!attribute traces
|
|
56
|
+
# The destination's settings for the traces it receives.
|
|
57
|
+
#
|
|
58
|
+
# @return [Anthropic::Models::Beta::Organization::BetaTelemetryDestinationTraces]
|
|
59
|
+
required :traces, -> { Anthropic::Beta::Organization::BetaTelemetryDestinationTraces }
|
|
60
|
+
|
|
61
|
+
# @!attribute type
|
|
62
|
+
#
|
|
63
|
+
# @return [Symbol, :telemetry_destination]
|
|
64
|
+
required :type, const: :telemetry_destination
|
|
65
|
+
|
|
66
|
+
# @!attribute updated_at
|
|
67
|
+
# Time of the last change to the destination's configuration or state. Changes to
|
|
68
|
+
# `delivery_health` don't change it.
|
|
69
|
+
#
|
|
70
|
+
# An update that sets a header value always changes it, even when the value is the
|
|
71
|
+
# same as before. Adding or removing a single workspace on the destination's list
|
|
72
|
+
# doesn't change it. An update that changes the list does.
|
|
73
|
+
#
|
|
74
|
+
# @return [Time]
|
|
75
|
+
required :updated_at, Time
|
|
76
|
+
|
|
77
|
+
# @!attribute workspaces
|
|
78
|
+
# Which of the organization's workspaces the destination covers.
|
|
79
|
+
#
|
|
80
|
+
# @return [Anthropic::Models::Beta::Organization::BetaTelemetryDestinationWorkspacesAll, Anthropic::Models::Beta::Organization::BetaTelemetryDestinationWorkspacesInclude, Anthropic::Models::Beta::Organization::BetaTelemetryDestinationWorkspacesExclude]
|
|
81
|
+
required :workspaces, union: -> { Anthropic::Beta::Organization::BetaTelemetryDestinationWorkspaces }
|
|
82
|
+
|
|
83
|
+
# @!method initialize(id:, created_at:, delivery_health:, display_name:, endpoint_url:, header_names:, state:, traces:, updated_at:, workspaces:, type: :telemetry_destination)
|
|
84
|
+
# An OpenTelemetry destination: an OTLP/HTTP endpoint, the request headers sent
|
|
85
|
+
# with every delivery to it, what the exported spans contain, and which workspaces
|
|
86
|
+
# it covers. A destination belongs to an organization. A workspace's spans go to
|
|
87
|
+
# every enabled destination that covers it.
|
|
88
|
+
#
|
|
89
|
+
# Some parameter documentations has been truncated, see
|
|
90
|
+
# {Anthropic::Models::Beta::Organization::BetaTelemetryDestination} for more
|
|
91
|
+
# details.
|
|
92
|
+
#
|
|
93
|
+
# @param id [String] The unique ID of the destination (`tdst_...`).
|
|
94
|
+
#
|
|
95
|
+
# @param created_at [Time] Time the destination was created.
|
|
96
|
+
#
|
|
97
|
+
# @param delivery_health [Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDeliveryHealth] The most recent delivery results for this destination.
|
|
98
|
+
#
|
|
99
|
+
# @param display_name [String, nil] Human-readable name for the destination. Null when none was set.
|
|
100
|
+
#
|
|
101
|
+
# @param endpoint_url [String] The base URL of the destination's OTLP/HTTP endpoint, exactly as registered.
|
|
102
|
+
#
|
|
103
|
+
# @param header_names [Array<String>] Names of the registered request headers. Header values are write-only and are ne
|
|
104
|
+
#
|
|
105
|
+
# @param state [Anthropic::Models::Beta::Organization::BetaTelemetryDestinationStateEnabled, Anthropic::Models::Beta::Organization::BetaTelemetryDestinationStateDisabled] Whether the destination receives deliveries.
|
|
106
|
+
#
|
|
107
|
+
# @param traces [Anthropic::Models::Beta::Organization::BetaTelemetryDestinationTraces] The destination's settings for the traces it receives.
|
|
108
|
+
#
|
|
109
|
+
# @param updated_at [Time] Time of the last change to the destination's configuration or state. Changes to
|
|
110
|
+
#
|
|
111
|
+
# @param workspaces [Anthropic::Models::Beta::Organization::BetaTelemetryDestinationWorkspacesAll, Anthropic::Models::Beta::Organization::BetaTelemetryDestinationWorkspacesInclude, Anthropic::Models::Beta::Organization::BetaTelemetryDestinationWorkspacesExclude] Which of the organization's workspaces the destination covers.
|
|
112
|
+
#
|
|
113
|
+
# @param type [Symbol, :telemetry_destination]
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
# What the spans that the API exports to a telemetry destination contain.
|
|
8
|
+
#
|
|
9
|
+
# See the
|
|
10
|
+
# [OpenTelemetry export guide](https://platform.claude.com/docs/en/manage-claude/opentelemetry#choose-a-content-mode)
|
|
11
|
+
# to learn what the spans contain in each content mode.
|
|
12
|
+
module BetaTelemetryDestinationContentMode
|
|
13
|
+
extend Anthropic::Internal::Type::Enum
|
|
14
|
+
|
|
15
|
+
# The spans contain identifiers, timing, status, token counts, and similar metadata. They don't contain prompt text, completion text, or tool inputs and outputs.
|
|
16
|
+
METADATA_ONLY = :metadata_only
|
|
17
|
+
|
|
18
|
+
# The spans contain the same metadata as `metadata_only`, plus message and tool content.
|
|
19
|
+
#
|
|
20
|
+
# An organization with a data-handling restriction, such as under HIPAA, can't choose this mode. The API exports only metadata for such an organization, even to a destination that already has `content`.
|
|
21
|
+
CONTENT = :content
|
|
22
|
+
|
|
23
|
+
# @!method self.values
|
|
24
|
+
# @return [Array<Symbol>]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
class BetaTelemetryDestinationDeliveryHealth < Anthropic::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute last_error
|
|
9
|
+
# A message that describes the most recent failed delivery to the destination, or
|
|
10
|
+
# `null` if no delivery has failed yet.
|
|
11
|
+
#
|
|
12
|
+
# Examples are `temporary DNS failure`, `TLS failure`, `timeout`,
|
|
13
|
+
# `connection failure`, `invalid address`, `HTTP error (status 503)`, and
|
|
14
|
+
# `redirect (status 301)`. The message is `invalid address` both for a hostname
|
|
15
|
+
# that doesn't exist and for an address that isn't publicly routable. It never
|
|
16
|
+
# contains the endpoint's response body, a header value, a network address, or TLS
|
|
17
|
+
# details.
|
|
18
|
+
#
|
|
19
|
+
# `last_error` and `last_error_at` always change together. A later successful
|
|
20
|
+
# delivery doesn't clear them. If `last_success_at` is later than `last_error_at`,
|
|
21
|
+
# a delivery has succeeded since this failure.
|
|
22
|
+
#
|
|
23
|
+
# See the
|
|
24
|
+
# [OpenTelemetry export guide](https://platform.claude.com/docs/en/manage-claude/opentelemetry#delivery-errors)
|
|
25
|
+
# to learn the likely cause of each error.
|
|
26
|
+
#
|
|
27
|
+
# @return [String, nil]
|
|
28
|
+
required :last_error, String, nil?: true
|
|
29
|
+
|
|
30
|
+
# @!attribute last_error_at
|
|
31
|
+
# Time of the failure that `last_error` describes. Changes together with
|
|
32
|
+
# `last_error`. Null until a delivery first fails.
|
|
33
|
+
#
|
|
34
|
+
# @return [Time, nil]
|
|
35
|
+
required :last_error_at, Time, nil?: true
|
|
36
|
+
|
|
37
|
+
# @!attribute last_success_at
|
|
38
|
+
# Time of the most recent successful delivery to the destination, or `null` if no
|
|
39
|
+
# delivery has succeeded yet.
|
|
40
|
+
#
|
|
41
|
+
# @return [Time, nil]
|
|
42
|
+
required :last_success_at, Time, nil?: true
|
|
43
|
+
|
|
44
|
+
# @!method initialize(last_error:, last_error_at:, last_success_at:)
|
|
45
|
+
# The most recent delivery results that the API records for a telemetry
|
|
46
|
+
# destination.
|
|
47
|
+
#
|
|
48
|
+
# Changes to the destination's configuration or state don't reset these fields.
|
|
49
|
+
# Changes to these fields don't change `updated_at`. The values can lag behind the
|
|
50
|
+
# latest deliveries.
|
|
51
|
+
#
|
|
52
|
+
# See the
|
|
53
|
+
# [OpenTelemetry export guide](https://platform.claude.com/docs/en/manage-claude/opentelemetry#delivery-and-health)
|
|
54
|
+
# to learn how the API delivers spans and when it disables a destination.
|
|
55
|
+
#
|
|
56
|
+
# Some parameter documentations has been truncated, see
|
|
57
|
+
# {Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDeliveryHealth}
|
|
58
|
+
# for more details.
|
|
59
|
+
#
|
|
60
|
+
# @param last_error [String, nil] A message that describes the most recent failed delivery to the destination, or
|
|
61
|
+
#
|
|
62
|
+
# @param last_error_at [Time, nil] Time of the failure that `last_error` describes. Changes together with `last_err
|
|
63
|
+
#
|
|
64
|
+
# @param last_success_at [Time, nil] Time of the most recent successful delivery to the destination, or `null` if no
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
# Why the destination is disabled: `caller` when a caller disabled it, or the
|
|
8
|
+
# reason the API disabled it automatically (`sustained_failure`,
|
|
9
|
+
# `invalid_address`, or `redirect`). Every automatic disable is reversible with an
|
|
10
|
+
# update that sets `state` to `enabled`. An update that sets `disabled` on a
|
|
11
|
+
# destination that is already disabled keeps its reason.
|
|
12
|
+
module BetaTelemetryDestinationDisabledReason
|
|
13
|
+
extend Anthropic::Internal::Type::Union
|
|
14
|
+
|
|
15
|
+
discriminator :type
|
|
16
|
+
|
|
17
|
+
# A caller disabled the destination with an update that set `state` to `disabled`.
|
|
18
|
+
variant :caller, -> { Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonCaller }
|
|
19
|
+
|
|
20
|
+
# The API disabled the destination because deliveries to it failed, with no successful delivery in between, for longer than a threshold that Anthropic configures and that is not part of this contract. The reason is `invalid_address` instead when the most recent failed delivery failed with an invalid address.
|
|
21
|
+
variant :sustained_failure,
|
|
22
|
+
-> { Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonSustainedFailure }
|
|
23
|
+
|
|
24
|
+
# The API disabled the destination because deliveries to it failed for longer than the same threshold as for `sustained_failure`, and the most recent failed delivery failed with an invalid address: the DNS answer says that the endpoint's hostname doesn't exist or doesn't have an address, or the address that the API would connect to isn't publicly routable or is reserved, for example a loopback, link-local, private-network, or cloud-metadata address. The API doesn't connect to such an address, and retries the delivery a bounded number of times as it does after a timeout. A timeout or a server failure of the DNS lookup is a temporary DNS failure instead, not an invalid address.
|
|
25
|
+
variant :invalid_address,
|
|
26
|
+
-> { Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonInvalidAddress }
|
|
27
|
+
|
|
28
|
+
# The API disabled the destination because the endpoint answered a delivery with a 3xx status. Redirects are never followed, and one such answer disables the destination at once.
|
|
29
|
+
variant :redirect, -> { Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonRedirect }
|
|
30
|
+
|
|
31
|
+
module Type
|
|
32
|
+
extend Anthropic::Internal::Type::Enum
|
|
33
|
+
|
|
34
|
+
CALLER = :caller
|
|
35
|
+
SUSTAINED_FAILURE = :sustained_failure
|
|
36
|
+
INVALID_ADDRESS = :invalid_address
|
|
37
|
+
REDIRECT = :redirect
|
|
38
|
+
|
|
39
|
+
# @!method self.values
|
|
40
|
+
# @return [Array<Symbol>]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# @!method self.variants
|
|
44
|
+
# @return [Array(Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDisabledReasonCaller, Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDisabledReasonSustainedFailure, Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDisabledReasonInvalidAddress, Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDisabledReasonRedirect)]
|
|
45
|
+
|
|
46
|
+
# Creates a new instance of the variant class whose `type` matches the given
|
|
47
|
+
# value, passing the remaining arguments to its constructor.
|
|
48
|
+
#
|
|
49
|
+
# @param type [Symbol, Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDisabledReason::Type, String]
|
|
50
|
+
#
|
|
51
|
+
# @param args [Hash{Symbol=>Object}] Attributes for the chosen variant.
|
|
52
|
+
#
|
|
53
|
+
# @raise [ArgumentError]
|
|
54
|
+
# @return [Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDisabledReasonCaller, Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDisabledReasonSustainedFailure, Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDisabledReasonInvalidAddress, Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDisabledReasonRedirect]
|
|
55
|
+
def self.new(type:, **args)
|
|
56
|
+
case type.to_sym
|
|
57
|
+
when :caller
|
|
58
|
+
Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonCaller.new(**args)
|
|
59
|
+
when :sustained_failure
|
|
60
|
+
Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonSustainedFailure.new(**args)
|
|
61
|
+
when :invalid_address
|
|
62
|
+
Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonInvalidAddress.new(**args)
|
|
63
|
+
when :redirect
|
|
64
|
+
Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonRedirect.new(**args)
|
|
65
|
+
else
|
|
66
|
+
raise ArgumentError, "unknown type: #{type}"
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
data/lib/anthropic/models/beta/organization/beta_telemetry_destination_disabled_reason_caller.rb
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
class BetaTelemetryDestinationDisabledReasonCaller < Anthropic::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute type
|
|
9
|
+
#
|
|
10
|
+
# @return [Symbol, :caller]
|
|
11
|
+
required :type, const: :caller
|
|
12
|
+
|
|
13
|
+
# @!method initialize(type: :caller)
|
|
14
|
+
# A caller disabled the destination with an update that set `state` to `disabled`.
|
|
15
|
+
#
|
|
16
|
+
# @param type [Symbol, :caller]
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|