Class: Anthropic::Models::ModelCapabilities

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/model_capabilities.rb,
sig/anthropic/models/model_capabilities.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(batch:, citations:, code_execution:, context_management:, effort:, image_input:, pdf_input:, server_tools:, structured_outputs:, thinking:) ⇒ ModelCapabilities

Model capability information.

Some parameter documentations has been truncated, see Anthropic::Models::ModelCapabilities for more details.

Parameters:



# File 'lib/anthropic/models/model_capabilities.rb', line 72

Instance Attribute Details

#batch ⇒ Anthropic::Models::CapabilitySupport

Whether the model supports the Batch API.



10
# File 'lib/anthropic/models/model_capabilities.rb', line 10

required :batch, -> { Anthropic::CapabilitySupport }

#citations ⇒ Anthropic::Models::CapabilitySupport

Whether the model supports citation generation.



16
# File 'lib/anthropic/models/model_capabilities.rb', line 16

required :citations, -> { Anthropic::CapabilitySupport }

#code_execution ⇒ Anthropic::Models::CapabilitySupport

Whether code that the model runs in the code execution tool can call the request's other tools, as in programmatic tool calling and dynamic filtering for web search and web fetch. Support for the code execution tool itself is in server_tools.code_execution.



25
# File 'lib/anthropic/models/model_capabilities.rb', line 25

required :code_execution, -> { Anthropic::CapabilitySupport }

#context_management ⇒ Anthropic::Models::ContextManagementCapability

Context management support and available strategies.



31
# File 'lib/anthropic/models/model_capabilities.rb', line 31

required :context_management, -> { Anthropic::ContextManagementCapability }

#effort ⇒ Anthropic::Models::EffortCapability

Effort (reasoning_effort) support and available levels.



37
# File 'lib/anthropic/models/model_capabilities.rb', line 37

required :effort, -> { Anthropic::EffortCapability }

#image_input ⇒ Anthropic::Models::CapabilitySupport

Whether the model accepts image content blocks.



43
# File 'lib/anthropic/models/model_capabilities.rb', line 43

required :image_input, -> { Anthropic::CapabilitySupport }

#pdf_input ⇒ Anthropic::Models::CapabilitySupport

Whether the model accepts PDF content blocks.



49
# File 'lib/anthropic/models/model_capabilities.rb', line 49

required :pdf_input, -> { Anthropic::CapabilitySupport }

#server_tools ⇒ Anthropic::Models::ServerToolsCapability

Whether this model supports the web search and code execution server tools. supported is true when the model supports at least one of the tools. A supported tool can still be rejected for your organization, for example when an admin has turned web search off.



58
# File 'lib/anthropic/models/model_capabilities.rb', line 58

required :server_tools, -> { Anthropic::ServerToolsCapability }

#structured_outputs ⇒ Anthropic::Models::CapabilitySupport

Whether the model supports structured output / JSON mode / strict tool schemas.



64
# File 'lib/anthropic/models/model_capabilities.rb', line 64

required :structured_outputs, -> { Anthropic::CapabilitySupport }

#thinking ⇒ Anthropic::Models::ThinkingCapability

Thinking capability and supported type configurations.



70
# File 'lib/anthropic/models/model_capabilities.rb', line 70

required :thinking, -> { Anthropic::ThinkingCapability }

Instance Method Details

#to_hash ⇒ { batch: Anthropic::CapabilitySupport, citations: Anthropic::CapabilitySupport, code_execution: Anthropic::CapabilitySupport, context_management: Anthropic::ContextManagementCapability, effort: Anthropic::EffortCapability, image_input: Anthropic::CapabilitySupport, pdf_input: Anthropic::CapabilitySupport, server_tools: Anthropic::ServerToolsCapability, structured_outputs: Anthropic::CapabilitySupport, thinking: Anthropic::ThinkingCapability }



51
52
53
54
55
56
57
58
59
60
61
62
# File 'sig/anthropic/models/model_capabilities.rbs', line 51

def to_hash: -> {
  batch: Anthropic::CapabilitySupport,
  citations: Anthropic::CapabilitySupport,
  code_execution: Anthropic::CapabilitySupport,
  context_management: Anthropic::ContextManagementCapability,
  effort: Anthropic::EffortCapability,
  image_input: Anthropic::CapabilitySupport,
  pdf_input: Anthropic::CapabilitySupport,
  server_tools: Anthropic::ServerToolsCapability,
  structured_outputs: Anthropic::CapabilitySupport,
  thinking: Anthropic::ThinkingCapability
}