anthropic 1.56.0 → 1.57.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 +25 -0
- data/README.md +1 -1
- data/lib/anthropic/internal/util.rb +17 -2
- data/lib/anthropic/models/beta/agent_update_params.rb +12 -11
- data/lib/anthropic/models/beta/beta_environment_delete_response.rb +16 -4
- data/lib/anthropic/models/beta/beta_fallback_refusal_trigger.rb +10 -0
- data/lib/anthropic/models/beta/beta_managed_agents_effort_high.rb +31 -0
- data/lib/anthropic/models/beta/beta_managed_agents_effort_low.rb +31 -0
- data/lib/anthropic/models/beta/beta_managed_agents_effort_max.rb +31 -0
- data/lib/anthropic/models/beta/beta_managed_agents_effort_medium.rb +31 -0
- data/lib/anthropic/models/beta/beta_managed_agents_effort_xhigh.rb +31 -0
- data/lib/anthropic/models/beta/beta_managed_agents_model_config.rb +38 -1
- data/lib/anthropic/models/beta/beta_managed_agents_model_config_params.rb +61 -1
- data/lib/anthropic/models/beta/beta_refusal_stop_details.rb +10 -0
- data/lib/anthropic/models/beta/beta_webhook_environment_archived_event_data.rb +41 -0
- data/lib/anthropic/models/beta/beta_webhook_environment_created_event_data.rb +41 -0
- data/lib/anthropic/models/beta/beta_webhook_environment_deleted_event_data.rb +41 -0
- data/lib/anthropic/models/beta/beta_webhook_environment_updated_event_data.rb +41 -0
- data/lib/anthropic/models/beta/beta_webhook_event.rb +2 -2
- data/lib/anthropic/models/beta/beta_webhook_event_data.rb +15 -1
- data/lib/anthropic/models/beta/beta_webhook_memory_store_archived_event_data.rb +41 -0
- data/lib/anthropic/models/beta/beta_webhook_memory_store_created_event_data.rb +41 -0
- data/lib/anthropic/models/beta/beta_webhook_memory_store_deleted_event_data.rb +41 -0
- data/lib/anthropic/models/beta/environments/beta_self_hosted_work.rb +10 -1
- data/lib/anthropic/models/beta/session_create_params.rb +29 -1
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_session_retries_exhausted.rb +2 -2
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_session_status_idle_event.rb +1 -1
- data/lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread_status_idle_event.rb +1 -1
- data/lib/anthropic/models/beta/sessions/threads/event_stream_params.rb +24 -1
- data/lib/anthropic/models/beta/unwrap_webhook_event.rb +2 -2
- data/lib/anthropic/models/refusal_stop_details.rb +10 -0
- data/lib/anthropic/resources/beta/agents.rb +4 -4
- data/lib/anthropic/resources/beta/sessions/threads/events.rb +11 -2
- data/lib/anthropic/resources/beta/sessions.rb +3 -1
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +12 -0
- data/rbi/anthropic/internal/util.rbi +5 -0
- data/rbi/anthropic/models/beta/agent_update_params.rbi +17 -12
- data/rbi/anthropic/models/beta/beta_environment_delete_response.rbi +51 -4
- data/rbi/anthropic/models/beta/beta_fallback_refusal_trigger.rbi +14 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_effort_high.rbi +69 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_effort_low.rbi +69 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_effort_max.rbi +69 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_effort_medium.rbi +75 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_effort_xhigh.rbi +70 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_model_config.rbi +65 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_model_config_params.rbi +126 -0
- data/rbi/anthropic/models/beta/beta_refusal_stop_details.rbi +14 -0
- data/rbi/anthropic/models/beta/beta_webhook_environment_archived_event_data.rbi +63 -0
- data/rbi/anthropic/models/beta/beta_webhook_environment_created_event_data.rbi +63 -0
- data/rbi/anthropic/models/beta/beta_webhook_environment_deleted_event_data.rbi +63 -0
- data/rbi/anthropic/models/beta/beta_webhook_environment_updated_event_data.rbi +63 -0
- data/rbi/anthropic/models/beta/beta_webhook_event.rbi +24 -3
- data/rbi/anthropic/models/beta/beta_webhook_event_data.rbi +8 -1
- data/rbi/anthropic/models/beta/beta_webhook_memory_store_archived_event_data.rbi +63 -0
- data/rbi/anthropic/models/beta/beta_webhook_memory_store_created_event_data.rbi +63 -0
- data/rbi/anthropic/models/beta/beta_webhook_memory_store_deleted_event_data.rbi +63 -0
- data/rbi/anthropic/models/beta/environments/beta_self_hosted_work.rbi +10 -0
- data/rbi/anthropic/models/beta/session_create_params.rbi +70 -0
- data/rbi/anthropic/models/beta/sessions/beta_managed_agents_session_retries_exhausted.rbi +2 -2
- data/rbi/anthropic/models/beta/sessions/threads/event_stream_params.rbi +50 -0
- data/rbi/anthropic/models/beta/unwrap_webhook_event.rbi +8 -1
- data/rbi/anthropic/models/refusal_stop_details.rbi +14 -0
- data/rbi/anthropic/resources/beta/agents.rbi +6 -5
- data/rbi/anthropic/resources/beta/sessions/threads/events.rbi +15 -0
- data/rbi/anthropic/resources/beta/sessions.rbi +11 -0
- data/sig/anthropic/internal/util.rbs +2 -0
- data/sig/anthropic/models/beta/agent_update_params.rbs +7 -5
- data/sig/anthropic/models/beta/beta_environment_delete_response.rbs +23 -4
- data/sig/anthropic/models/beta/beta_fallback_refusal_trigger.rbs +12 -1
- data/sig/anthropic/models/beta/beta_managed_agents_effort_high.rbs +32 -0
- data/sig/anthropic/models/beta/beta_managed_agents_effort_low.rbs +32 -0
- data/sig/anthropic/models/beta/beta_managed_agents_effort_max.rbs +32 -0
- data/sig/anthropic/models/beta/beta_managed_agents_effort_medium.rbs +32 -0
- data/sig/anthropic/models/beta/beta_managed_agents_effort_xhigh.rbs +32 -0
- data/sig/anthropic/models/beta/beta_managed_agents_model_config.rbs +22 -0
- data/sig/anthropic/models/beta/beta_managed_agents_model_config_params.rbs +34 -0
- data/sig/anthropic/models/beta/beta_refusal_stop_details.rbs +12 -1
- data/sig/anthropic/models/beta/beta_webhook_environment_archived_event_data.rbs +39 -0
- data/sig/anthropic/models/beta/beta_webhook_environment_created_event_data.rbs +39 -0
- data/sig/anthropic/models/beta/beta_webhook_environment_deleted_event_data.rbs +39 -0
- data/sig/anthropic/models/beta/beta_webhook_environment_updated_event_data.rbs +39 -0
- data/sig/anthropic/models/beta/beta_webhook_event_data.rbs +7 -0
- data/sig/anthropic/models/beta/beta_webhook_memory_store_archived_event_data.rbs +39 -0
- data/sig/anthropic/models/beta/beta_webhook_memory_store_created_event_data.rbs +39 -0
- data/sig/anthropic/models/beta/beta_webhook_memory_store_deleted_event_data.rbs +39 -0
- data/sig/anthropic/models/beta/environments/beta_self_hosted_work.rbs +5 -0
- data/sig/anthropic/models/beta/session_create_params.rbs +19 -0
- data/sig/anthropic/models/beta/sessions/threads/event_stream_params.rbs +9 -0
- data/sig/anthropic/models/refusal_stop_details.rbs +12 -1
- data/sig/anthropic/resources/beta/agents.rbs +1 -1
- data/sig/anthropic/resources/beta/sessions/threads/events.rbs +1 -0
- data/sig/anthropic/resources/beta/sessions.rbs +1 -0
- metadata +38 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 82d08a6de0932e58a27b89091c4d3c29261acca43943535a4d711467feb483a8
|
|
4
|
+
data.tar.gz: c7bb501092d94bac9d6fa81ae6f1e9c107ee1b5b2f3816ed74747d3f6f671148
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8f8567e516173bba49d9d88423beeecf301207513c66bd5c5700836a30e5015d8d843acdff2cf4af725ff8524821a90b153477e9c8933c86b004d4ff20c12fe5
|
|
7
|
+
data.tar.gz: bbff41981982e86ec8fa9652422eaec9b1492b4f968b1965b97756179b890dd324fdaf59989560e30d9101cdc5a0026468dffcf621632c0b4ce76fcac1573c3d
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.57.0 (2026-07-22)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.56.1...v1.57.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.56.1...v1.57.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add support for Managed Agents model effort, initial session events, and threads delta streaming ([1aab784](https://github.com/anthropics/anthropic-sdk-ruby/commit/1aab784f0a935a727eb5e513ed3f59555017e31d))
|
|
10
|
+
|
|
11
|
+
## 1.56.1 (2026-07-21)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v1.56.0...v1.56.1](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.56.0...v1.56.1)
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **internal:** encode Time query params as RFC 3339 ([#133](https://github.com/anthropics/anthropic-sdk-ruby/issues/133)) ([47d18e9](https://github.com/anthropics/anthropic-sdk-ruby/commit/47d18e91defcd8fba90ea98790c5e3981dfa607e))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
|
|
22
|
+
* **api:** add support for new refusal category ([318ae5f](https://github.com/anthropics/anthropic-sdk-ruby/commit/318ae5f9a349aa9e33c20b8032f808b133553532))
|
|
23
|
+
* **client:** docs updates ([d2c06e7](https://github.com/anthropics/anthropic-sdk-ruby/commit/d2c06e73bec2832215bc2769143f61a68794a388))
|
|
24
|
+
* **docs:** small updates ([fbc6e77](https://github.com/anthropics/anthropic-sdk-ruby/commit/fbc6e775736217cacf11429aca6212ffa0f13c8b))
|
|
25
|
+
* **docs:** small updates ([32597cd](https://github.com/anthropics/anthropic-sdk-ruby/commit/32597cdf5094a3f8561c64fadb62c97c1eeb9e64))
|
|
26
|
+
* **internal:** codegen related update ([2116b5a](https://github.com/anthropics/anthropic-sdk-ruby/commit/2116b5aeb4dc01bcdb8548826c61f6e2a350a6a0))
|
|
27
|
+
|
|
3
28
|
## 1.56.0 (2026-07-16)
|
|
4
29
|
|
|
5
30
|
Full Changelog: [v1.55.0...v1.56.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.55.0...v1.56.0)
|
data/README.md
CHANGED
|
@@ -570,9 +570,24 @@ module Anthropic
|
|
|
570
570
|
write_query_param_element!(collection, "#{key}[#{name}]", value)
|
|
571
571
|
end
|
|
572
572
|
in Array
|
|
573
|
-
collection["#{key}[]"] = element.map(
|
|
573
|
+
collection["#{key}[]"] = element.map { query_param_string(_1) }
|
|
574
574
|
else
|
|
575
|
-
collection[key] = element
|
|
575
|
+
collection[key] = query_param_string(element)
|
|
576
|
+
end
|
|
577
|
+
end
|
|
578
|
+
|
|
579
|
+
# @api private
|
|
580
|
+
#
|
|
581
|
+
# @param element [Object]
|
|
582
|
+
#
|
|
583
|
+
# @return [String]
|
|
584
|
+
private def query_param_string(element)
|
|
585
|
+
case element
|
|
586
|
+
in Time
|
|
587
|
+
# `Time#to_s` is not a wire format — date-time params must encode as RFC 3339.
|
|
588
|
+
element.iso8601
|
|
589
|
+
else
|
|
590
|
+
element.to_s
|
|
576
591
|
end
|
|
577
592
|
end
|
|
578
593
|
|
|
@@ -13,14 +13,6 @@ module Anthropic
|
|
|
13
13
|
# @return [String]
|
|
14
14
|
required :agent_id, String
|
|
15
15
|
|
|
16
|
-
# @!attribute version
|
|
17
|
-
# The agent's current version, used to prevent concurrent overwrites. Obtain this
|
|
18
|
-
# value from a create or retrieve response. The request fails if this does not
|
|
19
|
-
# match the server's current version.
|
|
20
|
-
#
|
|
21
|
-
# @return [Integer]
|
|
22
|
-
required :version, Integer
|
|
23
|
-
|
|
24
16
|
# @!attribute description
|
|
25
17
|
# Description. Omit to preserve; send empty string or null to clear.
|
|
26
18
|
#
|
|
@@ -97,20 +89,27 @@ module Anthropic
|
|
|
97
89
|
-> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::AgentUpdateParams::Tool] },
|
|
98
90
|
nil?: true
|
|
99
91
|
|
|
92
|
+
# @!attribute version
|
|
93
|
+
# The agent's current version, used to prevent concurrent overwrites. Obtain this
|
|
94
|
+
# value from a create or retrieve response. Must be at least 1 if specified. When
|
|
95
|
+
# supplied, the request fails if it does not match the server's current version;
|
|
96
|
+
# omit to apply the update unconditionally.
|
|
97
|
+
#
|
|
98
|
+
# @return [Integer, nil]
|
|
99
|
+
optional :version, Integer
|
|
100
|
+
|
|
100
101
|
# @!attribute betas
|
|
101
102
|
# Optional header to specify the beta version(s) you want to use.
|
|
102
103
|
#
|
|
103
104
|
# @return [Array<String, Symbol, Anthropic::Models::AnthropicBeta>, nil]
|
|
104
105
|
optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
|
|
105
106
|
|
|
106
|
-
# @!method initialize(agent_id:,
|
|
107
|
+
# @!method initialize(agent_id:, description: nil, mcp_servers: nil, metadata: nil, model: nil, multiagent: nil, name: nil, skills: nil, system_: nil, tools: nil, version: nil, betas: nil, request_options: {})
|
|
107
108
|
# Some parameter documentations has been truncated, see
|
|
108
109
|
# {Anthropic::Models::Beta::AgentUpdateParams} for more details.
|
|
109
110
|
#
|
|
110
111
|
# @param agent_id [String]
|
|
111
112
|
#
|
|
112
|
-
# @param version [Integer] The agent's current version, used to prevent concurrent overwrites. Obtain this
|
|
113
|
-
#
|
|
114
113
|
# @param description [String, nil] Description. Omit to preserve; send empty string or null to clear.
|
|
115
114
|
#
|
|
116
115
|
# @param mcp_servers [Array<Anthropic::Models::Beta::BetaManagedAgentsURLMCPServerParams>, nil] MCP servers. Full replacement. Omit to preserve; send empty array or `null` to c
|
|
@@ -129,6 +128,8 @@ module Anthropic
|
|
|
129
128
|
#
|
|
130
129
|
# @param tools [Array<Anthropic::Models::Beta::BetaManagedAgentsAgentToolset20260401Params, Anthropic::Models::Beta::BetaManagedAgentsMCPToolsetParams, Anthropic::Models::Beta::BetaManagedAgentsCustomToolParams>, nil] Tool configurations available to the agent. Full replacement. Omit to preserve;
|
|
131
130
|
#
|
|
131
|
+
# @param version [Integer] The agent's current version, used to prevent concurrent overwrites. Obtain this
|
|
132
|
+
#
|
|
132
133
|
# @param betas [Array<String, Symbol, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
|
|
133
134
|
#
|
|
134
135
|
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -14,15 +14,27 @@ module Anthropic
|
|
|
14
14
|
# @!attribute type
|
|
15
15
|
# The type of response
|
|
16
16
|
#
|
|
17
|
-
# @return [Symbol,
|
|
18
|
-
required :type,
|
|
17
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaEnvironmentDeleteResponse::Type]
|
|
18
|
+
required :type, enum: -> { Anthropic::Beta::BetaEnvironmentDeleteResponse::Type }
|
|
19
19
|
|
|
20
|
-
# @!method initialize(id:, type:
|
|
20
|
+
# @!method initialize(id:, type:)
|
|
21
21
|
# Response after deleting an environment.
|
|
22
22
|
#
|
|
23
23
|
# @param id [String] Environment identifier
|
|
24
24
|
#
|
|
25
|
-
# @param type [Symbol,
|
|
25
|
+
# @param type [Symbol, Anthropic::Models::Beta::BetaEnvironmentDeleteResponse::Type] The type of response
|
|
26
|
+
|
|
27
|
+
# The type of response
|
|
28
|
+
#
|
|
29
|
+
# @see Anthropic::Models::Beta::BetaEnvironmentDeleteResponse#type
|
|
30
|
+
module Type
|
|
31
|
+
extend Anthropic::Internal::Type::Enum
|
|
32
|
+
|
|
33
|
+
ENVIRONMENT_DELETED = :environment_deleted
|
|
34
|
+
|
|
35
|
+
# @!method self.values
|
|
36
|
+
# @return [Array<Symbol>]
|
|
37
|
+
end
|
|
26
38
|
end
|
|
27
39
|
end
|
|
28
40
|
|
|
@@ -28,11 +28,21 @@ module Anthropic
|
|
|
28
28
|
module Category
|
|
29
29
|
extend Anthropic::Internal::Type::Enum
|
|
30
30
|
|
|
31
|
+
# The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.
|
|
31
32
|
CYBER = :cyber
|
|
33
|
+
|
|
34
|
+
# The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.
|
|
32
35
|
BIO = :bio
|
|
36
|
+
|
|
37
|
+
# The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category.
|
|
33
38
|
FRONTIER_LLM = :frontier_llm
|
|
39
|
+
|
|
40
|
+
# The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking).
|
|
34
41
|
REASONING_EXTRACTION = :reasoning_extraction
|
|
35
42
|
|
|
43
|
+
# The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.
|
|
44
|
+
GENERAL_HARMS = :general_harms
|
|
45
|
+
|
|
36
46
|
# @!method self.values
|
|
37
47
|
# @return [Array<Symbol>]
|
|
38
48
|
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaManagedAgentsEffortHigh < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute type
|
|
8
|
+
#
|
|
9
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaManagedAgentsEffortHigh::Type]
|
|
10
|
+
required :type, enum: -> { Anthropic::Beta::BetaManagedAgentsEffortHigh::Type }
|
|
11
|
+
|
|
12
|
+
# @!method initialize(type:)
|
|
13
|
+
# High effort. Favors reasoning depth.
|
|
14
|
+
#
|
|
15
|
+
# @param type [Symbol, Anthropic::Models::Beta::BetaManagedAgentsEffortHigh::Type]
|
|
16
|
+
|
|
17
|
+
# @see Anthropic::Models::Beta::BetaManagedAgentsEffortHigh#type
|
|
18
|
+
module Type
|
|
19
|
+
extend Anthropic::Internal::Type::Enum
|
|
20
|
+
|
|
21
|
+
HIGH = :high
|
|
22
|
+
|
|
23
|
+
# @!method self.values
|
|
24
|
+
# @return [Array<Symbol>]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
BetaManagedAgentsEffortHigh = Beta::BetaManagedAgentsEffortHigh
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaManagedAgentsEffortLow < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute type
|
|
8
|
+
#
|
|
9
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaManagedAgentsEffortLow::Type]
|
|
10
|
+
required :type, enum: -> { Anthropic::Beta::BetaManagedAgentsEffortLow::Type }
|
|
11
|
+
|
|
12
|
+
# @!method initialize(type:)
|
|
13
|
+
# Low effort. Favors latency over reasoning depth.
|
|
14
|
+
#
|
|
15
|
+
# @param type [Symbol, Anthropic::Models::Beta::BetaManagedAgentsEffortLow::Type]
|
|
16
|
+
|
|
17
|
+
# @see Anthropic::Models::Beta::BetaManagedAgentsEffortLow#type
|
|
18
|
+
module Type
|
|
19
|
+
extend Anthropic::Internal::Type::Enum
|
|
20
|
+
|
|
21
|
+
LOW = :low
|
|
22
|
+
|
|
23
|
+
# @!method self.values
|
|
24
|
+
# @return [Array<Symbol>]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
BetaManagedAgentsEffortLow = Beta::BetaManagedAgentsEffortLow
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaManagedAgentsEffortMax < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute type
|
|
8
|
+
#
|
|
9
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaManagedAgentsEffortMax::Type]
|
|
10
|
+
required :type, enum: -> { Anthropic::Beta::BetaManagedAgentsEffortMax::Type }
|
|
11
|
+
|
|
12
|
+
# @!method initialize(type:)
|
|
13
|
+
# Maximum effort. Favors reasoning depth over latency.
|
|
14
|
+
#
|
|
15
|
+
# @param type [Symbol, Anthropic::Models::Beta::BetaManagedAgentsEffortMax::Type]
|
|
16
|
+
|
|
17
|
+
# @see Anthropic::Models::Beta::BetaManagedAgentsEffortMax#type
|
|
18
|
+
module Type
|
|
19
|
+
extend Anthropic::Internal::Type::Enum
|
|
20
|
+
|
|
21
|
+
MAX = :max
|
|
22
|
+
|
|
23
|
+
# @!method self.values
|
|
24
|
+
# @return [Array<Symbol>]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
BetaManagedAgentsEffortMax = Beta::BetaManagedAgentsEffortMax
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaManagedAgentsEffortMedium < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute type
|
|
8
|
+
#
|
|
9
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaManagedAgentsEffortMedium::Type]
|
|
10
|
+
required :type, enum: -> { Anthropic::Beta::BetaManagedAgentsEffortMedium::Type }
|
|
11
|
+
|
|
12
|
+
# @!method initialize(type:)
|
|
13
|
+
# Medium effort. Balances latency and reasoning depth.
|
|
14
|
+
#
|
|
15
|
+
# @param type [Symbol, Anthropic::Models::Beta::BetaManagedAgentsEffortMedium::Type]
|
|
16
|
+
|
|
17
|
+
# @see Anthropic::Models::Beta::BetaManagedAgentsEffortMedium#type
|
|
18
|
+
module Type
|
|
19
|
+
extend Anthropic::Internal::Type::Enum
|
|
20
|
+
|
|
21
|
+
MEDIUM = :medium
|
|
22
|
+
|
|
23
|
+
# @!method self.values
|
|
24
|
+
# @return [Array<Symbol>]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
BetaManagedAgentsEffortMedium = Beta::BetaManagedAgentsEffortMedium
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaManagedAgentsEffortXhigh < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute type
|
|
8
|
+
#
|
|
9
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaManagedAgentsEffortXhigh::Type]
|
|
10
|
+
required :type, enum: -> { Anthropic::Beta::BetaManagedAgentsEffortXhigh::Type }
|
|
11
|
+
|
|
12
|
+
# @!method initialize(type:)
|
|
13
|
+
# Extra-high effort. Not all models accept this level.
|
|
14
|
+
#
|
|
15
|
+
# @param type [Symbol, Anthropic::Models::Beta::BetaManagedAgentsEffortXhigh::Type]
|
|
16
|
+
|
|
17
|
+
# @see Anthropic::Models::Beta::BetaManagedAgentsEffortXhigh#type
|
|
18
|
+
module Type
|
|
19
|
+
extend Anthropic::Internal::Type::Enum
|
|
20
|
+
|
|
21
|
+
XHIGH = :xhigh
|
|
22
|
+
|
|
23
|
+
# @!method self.values
|
|
24
|
+
# @return [Array<Symbol>]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
BetaManagedAgentsEffortXhigh = Beta::BetaManagedAgentsEffortXhigh
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -13,6 +13,13 @@ module Anthropic
|
|
|
13
13
|
# @return [Symbol, String, Anthropic::Models::Beta::BetaManagedAgentsModel]
|
|
14
14
|
required :id, union: -> { Anthropic::Beta::BetaManagedAgentsModel }
|
|
15
15
|
|
|
16
|
+
# @!attribute effort
|
|
17
|
+
# How hard Claude works on each turn. Sets `output_config.effort` on every
|
|
18
|
+
# Messages call the session makes.
|
|
19
|
+
#
|
|
20
|
+
# @return [Anthropic::Models::Beta::BetaManagedAgentsEffortLow, Anthropic::Models::Beta::BetaManagedAgentsEffortMedium, Anthropic::Models::Beta::BetaManagedAgentsEffortHigh, Anthropic::Models::Beta::BetaManagedAgentsEffortXhigh, Anthropic::Models::Beta::BetaManagedAgentsEffortMax, nil]
|
|
21
|
+
optional :effort, union: -> { Anthropic::Beta::BetaManagedAgentsModelConfig::Effort }
|
|
22
|
+
|
|
16
23
|
# @!attribute speed
|
|
17
24
|
# Inference speed mode. `fast` provides significantly faster output token
|
|
18
25
|
# generation at premium pricing. Not all models support `fast`; invalid
|
|
@@ -21,7 +28,7 @@ module Anthropic
|
|
|
21
28
|
# @return [Symbol, Anthropic::Models::Beta::BetaManagedAgentsModelConfig::Speed, nil]
|
|
22
29
|
optional :speed, enum: -> { Anthropic::Beta::BetaManagedAgentsModelConfig::Speed }
|
|
23
30
|
|
|
24
|
-
# @!method initialize(id:, speed: nil)
|
|
31
|
+
# @!method initialize(id:, effort: nil, speed: nil)
|
|
25
32
|
# Some parameter documentations has been truncated, see
|
|
26
33
|
# {Anthropic::Models::Beta::BetaManagedAgentsModelConfig} for more details.
|
|
27
34
|
#
|
|
@@ -29,8 +36,38 @@ module Anthropic
|
|
|
29
36
|
#
|
|
30
37
|
# @param id [Symbol, String, Anthropic::Models::Beta::BetaManagedAgentsModel] The model that will power your agent.
|
|
31
38
|
#
|
|
39
|
+
# @param effort [Anthropic::Models::Beta::BetaManagedAgentsEffortLow, Anthropic::Models::Beta::BetaManagedAgentsEffortMedium, Anthropic::Models::Beta::BetaManagedAgentsEffortHigh, Anthropic::Models::Beta::BetaManagedAgentsEffortXhigh, Anthropic::Models::Beta::BetaManagedAgentsEffortMax] How hard Claude works on each turn. Sets `output_config.effort` on every Message
|
|
40
|
+
#
|
|
32
41
|
# @param speed [Symbol, Anthropic::Models::Beta::BetaManagedAgentsModelConfig::Speed] Inference speed mode. `fast` provides significantly faster output token generati
|
|
33
42
|
|
|
43
|
+
# How hard Claude works on each turn. Sets `output_config.effort` on every
|
|
44
|
+
# Messages call the session makes.
|
|
45
|
+
#
|
|
46
|
+
# @see Anthropic::Models::Beta::BetaManagedAgentsModelConfig#effort
|
|
47
|
+
module Effort
|
|
48
|
+
extend Anthropic::Internal::Type::Union
|
|
49
|
+
|
|
50
|
+
discriminator :type
|
|
51
|
+
|
|
52
|
+
# Low effort. Favors latency over reasoning depth.
|
|
53
|
+
variant :low, -> { Anthropic::Beta::BetaManagedAgentsEffortLow }
|
|
54
|
+
|
|
55
|
+
# Medium effort. Balances latency and reasoning depth.
|
|
56
|
+
variant :medium, -> { Anthropic::Beta::BetaManagedAgentsEffortMedium }
|
|
57
|
+
|
|
58
|
+
# High effort. Favors reasoning depth.
|
|
59
|
+
variant :high, -> { Anthropic::Beta::BetaManagedAgentsEffortHigh }
|
|
60
|
+
|
|
61
|
+
# Extra-high effort. Not all models accept this level.
|
|
62
|
+
variant :xhigh, -> { Anthropic::Beta::BetaManagedAgentsEffortXhigh }
|
|
63
|
+
|
|
64
|
+
# Maximum effort. Favors reasoning depth over latency.
|
|
65
|
+
variant :max, -> { Anthropic::Beta::BetaManagedAgentsEffortMax }
|
|
66
|
+
|
|
67
|
+
# @!method self.variants
|
|
68
|
+
# @return [Array(Anthropic::Models::Beta::BetaManagedAgentsEffortLow, Anthropic::Models::Beta::BetaManagedAgentsEffortMedium, Anthropic::Models::Beta::BetaManagedAgentsEffortHigh, Anthropic::Models::Beta::BetaManagedAgentsEffortXhigh, Anthropic::Models::Beta::BetaManagedAgentsEffortMax)]
|
|
69
|
+
end
|
|
70
|
+
|
|
34
71
|
# Inference speed mode. `fast` provides significantly faster output token
|
|
35
72
|
# generation at premium pricing. Not all models support `fast`; invalid
|
|
36
73
|
# combinations are rejected at create time.
|
|
@@ -13,6 +13,18 @@ module Anthropic
|
|
|
13
13
|
# @return [Symbol, String, Anthropic::Models::Beta::BetaManagedAgentsModel]
|
|
14
14
|
required :id, union: -> { Anthropic::Beta::BetaManagedAgentsModel }
|
|
15
15
|
|
|
16
|
+
# @!attribute effort
|
|
17
|
+
# How hard Claude works on each inference call. Accepts a bare level string
|
|
18
|
+
# (`"high"`) or `{"type": "high"}`. On create, omitting it resolves the per-model
|
|
19
|
+
# default; on update, omitting it leaves the stored value unchanged.
|
|
20
|
+
#
|
|
21
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaManagedAgentsModelConfigParams::Effort::BetaManagedAgentsEffortLevel, Anthropic::Models::Beta::BetaManagedAgentsEffortLow, Anthropic::Models::Beta::BetaManagedAgentsEffortMedium, Anthropic::Models::Beta::BetaManagedAgentsEffortHigh, Anthropic::Models::Beta::BetaManagedAgentsEffortXhigh, Anthropic::Models::Beta::BetaManagedAgentsEffortMax, nil]
|
|
22
|
+
optional :effort,
|
|
23
|
+
union: -> {
|
|
24
|
+
Anthropic::Beta::BetaManagedAgentsModelConfigParams::Effort
|
|
25
|
+
},
|
|
26
|
+
nil?: true
|
|
27
|
+
|
|
16
28
|
# @!attribute speed
|
|
17
29
|
# Inference speed mode. `fast` provides significantly faster output token
|
|
18
30
|
# generation at premium pricing. Not all models support `fast`; invalid
|
|
@@ -21,7 +33,7 @@ module Anthropic
|
|
|
21
33
|
# @return [Symbol, Anthropic::Models::Beta::BetaManagedAgentsModelConfigParams::Speed, nil]
|
|
22
34
|
optional :speed, enum: -> { Anthropic::Beta::BetaManagedAgentsModelConfigParams::Speed }, nil?: true
|
|
23
35
|
|
|
24
|
-
# @!method initialize(id:, speed: nil)
|
|
36
|
+
# @!method initialize(id:, effort: nil, speed: nil)
|
|
25
37
|
# Some parameter documentations has been truncated, see
|
|
26
38
|
# {Anthropic::Models::Beta::BetaManagedAgentsModelConfigParams} for more details.
|
|
27
39
|
#
|
|
@@ -29,8 +41,56 @@ module Anthropic
|
|
|
29
41
|
#
|
|
30
42
|
# @param id [Symbol, String, Anthropic::Models::Beta::BetaManagedAgentsModel] The model that will power your agent.
|
|
31
43
|
#
|
|
44
|
+
# @param effort [Symbol, Anthropic::Models::Beta::BetaManagedAgentsModelConfigParams::Effort::BetaManagedAgentsEffortLevel, Anthropic::Models::Beta::BetaManagedAgentsEffortLow, Anthropic::Models::Beta::BetaManagedAgentsEffortMedium, Anthropic::Models::Beta::BetaManagedAgentsEffortHigh, Anthropic::Models::Beta::BetaManagedAgentsEffortXhigh, Anthropic::Models::Beta::BetaManagedAgentsEffortMax, nil] How hard Claude works on each inference call. Accepts a bare level string (`"hig
|
|
45
|
+
#
|
|
32
46
|
# @param speed [Symbol, Anthropic::Models::Beta::BetaManagedAgentsModelConfigParams::Speed, nil] Inference speed mode. `fast` provides significantly faster output token generati
|
|
33
47
|
|
|
48
|
+
# How hard Claude works on each inference call. Accepts a bare level string
|
|
49
|
+
# (`"high"`) or `{"type": "high"}`. On create, omitting it resolves the per-model
|
|
50
|
+
# default; on update, omitting it leaves the stored value unchanged.
|
|
51
|
+
#
|
|
52
|
+
# @see Anthropic::Models::Beta::BetaManagedAgentsModelConfigParams#effort
|
|
53
|
+
module Effort
|
|
54
|
+
extend Anthropic::Internal::Type::Union
|
|
55
|
+
|
|
56
|
+
# How hard Claude works on each turn. Higher levels favor reasoning depth over latency. Not all models accept every level; invalid combinations are rejected at create time.
|
|
57
|
+
variant enum: -> { Anthropic::Beta::BetaManagedAgentsModelConfigParams::Effort::BetaManagedAgentsEffortLevel }
|
|
58
|
+
|
|
59
|
+
# Low effort. Favors latency over reasoning depth.
|
|
60
|
+
variant -> { Anthropic::Beta::BetaManagedAgentsEffortLow }
|
|
61
|
+
|
|
62
|
+
# Medium effort. Balances latency and reasoning depth.
|
|
63
|
+
variant -> { Anthropic::Beta::BetaManagedAgentsEffortMedium }
|
|
64
|
+
|
|
65
|
+
# High effort. Favors reasoning depth.
|
|
66
|
+
variant -> { Anthropic::Beta::BetaManagedAgentsEffortHigh }
|
|
67
|
+
|
|
68
|
+
# Extra-high effort. Not all models accept this level.
|
|
69
|
+
variant -> { Anthropic::Beta::BetaManagedAgentsEffortXhigh }
|
|
70
|
+
|
|
71
|
+
# Maximum effort. Favors reasoning depth over latency.
|
|
72
|
+
variant -> { Anthropic::Beta::BetaManagedAgentsEffortMax }
|
|
73
|
+
|
|
74
|
+
# How hard Claude works on each turn. Higher levels favor reasoning depth over
|
|
75
|
+
# latency. Not all models accept every level; invalid combinations are rejected at
|
|
76
|
+
# create time.
|
|
77
|
+
module BetaManagedAgentsEffortLevel
|
|
78
|
+
extend Anthropic::Internal::Type::Enum
|
|
79
|
+
|
|
80
|
+
LOW = :low
|
|
81
|
+
MEDIUM = :medium
|
|
82
|
+
HIGH = :high
|
|
83
|
+
XHIGH = :xhigh
|
|
84
|
+
MAX = :max
|
|
85
|
+
|
|
86
|
+
# @!method self.values
|
|
87
|
+
# @return [Array<Symbol>]
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# @!method self.variants
|
|
91
|
+
# @return [Array(Symbol, Anthropic::Models::Beta::BetaManagedAgentsModelConfigParams::Effort::BetaManagedAgentsEffortLevel, Anthropic::Models::Beta::BetaManagedAgentsEffortLow, Anthropic::Models::Beta::BetaManagedAgentsEffortMedium, Anthropic::Models::Beta::BetaManagedAgentsEffortHigh, Anthropic::Models::Beta::BetaManagedAgentsEffortXhigh, Anthropic::Models::Beta::BetaManagedAgentsEffortMax)]
|
|
92
|
+
end
|
|
93
|
+
|
|
34
94
|
# Inference speed mode. `fast` provides significantly faster output token
|
|
35
95
|
# generation at premium pricing. Not all models support `fast`; invalid
|
|
36
96
|
# combinations are rejected at create time.
|
|
@@ -104,11 +104,21 @@ module Anthropic
|
|
|
104
104
|
module Category
|
|
105
105
|
extend Anthropic::Internal::Type::Enum
|
|
106
106
|
|
|
107
|
+
# The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.
|
|
107
108
|
CYBER = :cyber
|
|
109
|
+
|
|
110
|
+
# The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.
|
|
108
111
|
BIO = :bio
|
|
112
|
+
|
|
113
|
+
# The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category.
|
|
109
114
|
FRONTIER_LLM = :frontier_llm
|
|
115
|
+
|
|
116
|
+
# The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking).
|
|
110
117
|
REASONING_EXTRACTION = :reasoning_extraction
|
|
111
118
|
|
|
119
|
+
# The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.
|
|
120
|
+
GENERAL_HARMS = :general_harms
|
|
121
|
+
|
|
112
122
|
# @!method self.values
|
|
113
123
|
# @return [Array<Symbol>]
|
|
114
124
|
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaWebhookEnvironmentArchivedEventData < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# ID of the environment that triggered the event.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute organization_id
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :organization_id, String
|
|
17
|
+
|
|
18
|
+
# @!attribute type
|
|
19
|
+
#
|
|
20
|
+
# @return [Symbol, :"environment.archived"]
|
|
21
|
+
required :type, const: :"environment.archived"
|
|
22
|
+
|
|
23
|
+
# @!attribute workspace_id
|
|
24
|
+
#
|
|
25
|
+
# @return [String]
|
|
26
|
+
required :workspace_id, String
|
|
27
|
+
|
|
28
|
+
# @!method initialize(id:, organization_id:, workspace_id:, type: :"environment.archived")
|
|
29
|
+
# @param id [String] ID of the environment that triggered the event.
|
|
30
|
+
#
|
|
31
|
+
# @param organization_id [String]
|
|
32
|
+
#
|
|
33
|
+
# @param workspace_id [String]
|
|
34
|
+
#
|
|
35
|
+
# @param type [Symbol, :"environment.archived"]
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
BetaWebhookEnvironmentArchivedEventData = Beta::BetaWebhookEnvironmentArchivedEventData
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaWebhookEnvironmentCreatedEventData < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# ID of the environment that triggered the event.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute organization_id
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :organization_id, String
|
|
17
|
+
|
|
18
|
+
# @!attribute type
|
|
19
|
+
#
|
|
20
|
+
# @return [Symbol, :"environment.created"]
|
|
21
|
+
required :type, const: :"environment.created"
|
|
22
|
+
|
|
23
|
+
# @!attribute workspace_id
|
|
24
|
+
#
|
|
25
|
+
# @return [String]
|
|
26
|
+
required :workspace_id, String
|
|
27
|
+
|
|
28
|
+
# @!method initialize(id:, organization_id:, workspace_id:, type: :"environment.created")
|
|
29
|
+
# @param id [String] ID of the environment that triggered the event.
|
|
30
|
+
#
|
|
31
|
+
# @param organization_id [String]
|
|
32
|
+
#
|
|
33
|
+
# @param workspace_id [String]
|
|
34
|
+
#
|
|
35
|
+
# @param type [Symbol, :"environment.created"]
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
BetaWebhookEnvironmentCreatedEventData = Beta::BetaWebhookEnvironmentCreatedEventData
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaWebhookEnvironmentDeletedEventData < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# ID of the environment that triggered the event.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute organization_id
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :organization_id, String
|
|
17
|
+
|
|
18
|
+
# @!attribute type
|
|
19
|
+
#
|
|
20
|
+
# @return [Symbol, :"environment.deleted"]
|
|
21
|
+
required :type, const: :"environment.deleted"
|
|
22
|
+
|
|
23
|
+
# @!attribute workspace_id
|
|
24
|
+
#
|
|
25
|
+
# @return [String]
|
|
26
|
+
required :workspace_id, String
|
|
27
|
+
|
|
28
|
+
# @!method initialize(id:, organization_id:, workspace_id:, type: :"environment.deleted")
|
|
29
|
+
# @param id [String] ID of the environment that triggered the event.
|
|
30
|
+
#
|
|
31
|
+
# @param organization_id [String]
|
|
32
|
+
#
|
|
33
|
+
# @param workspace_id [String]
|
|
34
|
+
#
|
|
35
|
+
# @param type [Symbol, :"environment.deleted"]
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
BetaWebhookEnvironmentDeletedEventData = Beta::BetaWebhookEnvironmentDeletedEventData
|
|
40
|
+
end
|
|
41
|
+
end
|