Class: Anthropic::Models::ModelInfo
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::ModelInfo
- Defined in:
- lib/anthropic/models/model_info.rb,
sig/anthropic/models/model_info.rbs
Overview
Defined Under Namespace
Modules: Lifecycle
Instance Attribute Summary collapse
-
#capabilities ⇒ Anthropic::Models::ModelCapabilities?
Object mapping capability names to their support details.
-
#created_at ⇒ Time
RFC 3339 datetime string representing the time at which the model was released.
-
#deprecated_at ⇒ Time?
RFC 3339 datetime string representing the time of the model's most recent deprecation.
-
#display_name ⇒ String
A human-readable name for the model.
-
#id ⇒ String
Unique model identifier.
-
#lifecycle ⇒ Symbol, Anthropic::Models::ModelInfo::Lifecycle
The model's current lifecycle stage.
-
#line ⇒ Symbol, ...
The model line this model belongs to, such as
opusfor both Claude Opus 4.5 and Claude Opus 4.6. -
#max_input_tokens ⇒ Integer?
Maximum input context window size in tokens for this model.
-
#max_tokens ⇒ Integer?
Maximum value for the
max_tokensparameter when using this model. -
#retires_at ⇒ Time?
RFC 3339 datetime string representing the model's currently scheduled retirement date.
-
#type ⇒ Symbol, :model
Object type.
Instance Method Summary collapse
-
#initialize(id:, capabilities:, created_at:, deprecated_at:, display_name:, lifecycle:, line:, max_input_tokens:, max_tokens:, retires_at:, type: :model) ⇒ ModelInfo
constructor
Some parameter documentations has been truncated, see ModelInfo for more details.
- #to_hash ⇒ { id: String, capabilities: Anthropic::ModelCapabilities?, created_at: Time, deprecated_at: Time?, display_name: String, lifecycle: Anthropic::Models::ModelInfo::lifecycle, line: Anthropic::Models::model_line?, max_input_tokens: Integer?, max_tokens: Integer?, retires_at: Time?, type: :model }
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(id:, capabilities:, created_at:, deprecated_at:, display_name:, lifecycle:, line:, max_input_tokens:, max_tokens:, retires_at:, type: :model) ⇒ ModelInfo
Some parameter documentations has been truncated, see Anthropic::Models::ModelInfo for more details.
|
|
# File 'lib/anthropic/models/model_info.rb', line 93
|
Instance Attribute Details
#capabilities ⇒ Anthropic::Models::ModelCapabilities?
Object mapping capability names to their support details. Keys are always present for all known capabilities.
18 |
# File 'lib/anthropic/models/model_info.rb', line 18 required :capabilities, -> { Anthropic::ModelCapabilities }, nil?: true |
#created_at ⇒ Time
RFC 3339 datetime string representing the time at which the model was released. May be set to an epoch value if the release date is unknown.
25 |
# File 'lib/anthropic/models/model_info.rb', line 25 required :created_at, Time |
#deprecated_at ⇒ Time?
RFC 3339 datetime string representing the time of the model's most recent
deprecation. Populated for deprecated and retired models; null while the
model is active.
33 |
# File 'lib/anthropic/models/model_info.rb', line 33 required :deprecated_at, Time, nil?: true |
#display_name ⇒ String
A human-readable name for the model.
39 |
# File 'lib/anthropic/models/model_info.rb', line 39 required :display_name, String |
#id ⇒ String
Unique model identifier.
11 |
# File 'lib/anthropic/models/model_info.rb', line 11 required :id, String |
#lifecycle ⇒ Symbol, Anthropic::Models::ModelInfo::Lifecycle
The model's current lifecycle stage.
active: The model is available for use, open to new adopters, and not scheduled for retirement.deprecated: The model remains callable for organizations with existing access, but is headed for retirement and closed to new adopters.retired: The model is no longer available for use; inference requests naming it fail. It remains in the catalogue as the historical record of its retirement.
53 |
# File 'lib/anthropic/models/model_info.rb', line 53 required :lifecycle, enum: -> { Anthropic::ModelInfo::Lifecycle } |
#line ⇒ Symbol, ...
The model line this model belongs to, such as opus for both Claude Opus 4.5
and Claude Opus 4.6. More lines may be added. null when the model belongs to
no line; do not infer a line from the id.
61 |
# File 'lib/anthropic/models/model_info.rb', line 61 required :line, enum: -> { Anthropic::ModelLine }, nil?: true |
#max_input_tokens ⇒ Integer?
Maximum input context window size in tokens for this model.
67 |
# File 'lib/anthropic/models/model_info.rb', line 67 required :max_input_tokens, Integer, nil?: true |
#max_tokens ⇒ Integer?
Maximum value for the max_tokens parameter when using this model.
73 |
# File 'lib/anthropic/models/model_info.rb', line 73 required :max_tokens, Integer, nil?: true |
#retires_at ⇒ Time?
RFC 3339 datetime string representing the model's currently scheduled retirement
date. The schedule can be revised until retirement occurs; null while the
model is active or while no retirement is scheduled. A past date on a
deprecated model means retirement is overdue, not that it has occurred:
lifecycle is the retirement signal.
83 |
# File 'lib/anthropic/models/model_info.rb', line 83 required :retires_at, Time, nil?: true |
#type ⇒ Symbol, :model
Object type.
For Models, this is always "model".
91 |
# File 'lib/anthropic/models/model_info.rb', line 91 required :type, const: :model |
Instance Method Details
#to_hash ⇒ { id: String, capabilities: Anthropic::ModelCapabilities?, created_at: Time, deprecated_at: Time?, display_name: String, lifecycle: Anthropic::Models::ModelInfo::lifecycle, line: Anthropic::Models::model_line?, max_input_tokens: Integer?, max_tokens: Integer?, retires_at: Time?, type: :model }
55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'sig/anthropic/models/model_info.rbs', line 55
def to_hash: -> {
id: String,
capabilities: Anthropic::ModelCapabilities?,
created_at: Time,
deprecated_at: Time?,
display_name: String,
lifecycle: Anthropic::Models::ModelInfo::lifecycle,
line: Anthropic::Models::model_line?,
max_input_tokens: Integer?,
max_tokens: Integer?,
retires_at: Time?,
type: :model
}
|