Class: Anthropic::Models::Beta::BetaModelInfo

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

Overview

See Also:

  • Anthropic::Resources::Beta::Models#retrieve

Defined Under Namespace

Modules: Lifecycle

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(id:, allowed_fallback_models:, capabilities:, created_at:, deprecated_at:, display_name:, lifecycle:, line:, max_input_tokens:, max_tokens:, retires_at:, type: :model) ⇒ BetaModelInfo

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

Parameters:

  • id (String) —

    Unique model identifier.

  • allowed_fallback_models (Array<String>, nil) —

    Model IDs this model accepts as fallbacks[i].model on the Messages API. An emp

  • capabilities (Anthropic::Models::Beta::BetaModelCapabilities, nil) —

    Object mapping capability names to their support details. Keys are always presen

  • created_at (Time) —

    RFC 3339 datetime string representing the time at which the model was released.

  • deprecated_at (Time, nil) —

    RFC 3339 datetime string representing the time of the model's most recent deprec

  • display_name (String) —

    A human-readable name for the model.

  • lifecycle (Symbol, Anthropic::Models::Beta::BetaModelInfo::Lifecycle) —

    The model's current lifecycle stage.

  • line (Symbol, Anthropic::Models::Beta::BetaModelLine, nil) —

    The model line this model belongs to, such as opus for both Claude Opus 4.5 an

  • max_input_tokens (Integer, nil) —

    Maximum input context window size in tokens for this model.

  • max_tokens (Integer, nil) —

    Maximum value for the max_tokens parameter when using this model.

  • retires_at (Time, nil) —

    RFC 3339 datetime string representing the model's currently scheduled retirement

  • type (Symbol, :model) (defaults to: :model) —

    Object type.

  • id: (String)
  • allowed_fallback_models: (::Array[String], nil)
  • capabilities: (Anthropic::Beta::BetaModelCapabilities, nil)
  • created_at: (Time)
  • deprecated_at: (Time, nil)
  • display_name: (String)
  • lifecycle: (Anthropic::Models::Beta::BetaModelInfo::lifecycle)
  • line: (Anthropic::Models::Beta::beta_model_line, nil)
  • max_input_tokens: (Integer, nil)
  • max_tokens: (Integer, nil)
  • retires_at: (Time, nil)
  • type: (:model) (defaults to: :model)


# File 'lib/anthropic/models/beta/beta_model_info.rb', line 102

Instance Attribute Details

#allowed_fallback_models ⇒ Array<String>?

Model IDs this model accepts as fallbacks[i].model on the Messages API. An empty list means the fallbacks parameter is not supported for this model as primary.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


20
# File 'lib/anthropic/models/beta/beta_model_info.rb', line 20

required :allowed_fallback_models, Anthropic::Internal::Type::ArrayOf[String], nil?: true

#capabilities ⇒ Anthropic::Models::Beta::BetaModelCapabilities?

Object mapping capability names to their support details. Keys are always present for all known capabilities.

Parameters:

  • value (Anthropic::Beta::BetaModelCapabilities, nil)

Returns:



27
# File 'lib/anthropic/models/beta/beta_model_info.rb', line 27

required :capabilities, -> { Anthropic::Beta::BetaModelCapabilities }, 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.

Parameters:

  • value (Time)

Returns:

  • (Time)


34
# File 'lib/anthropic/models/beta/beta_model_info.rb', line 34

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.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


42
# File 'lib/anthropic/models/beta/beta_model_info.rb', line 42

required :deprecated_at, Time, nil?: true

#display_name ⇒ String

A human-readable name for the model.

Parameters:

  • value (String)

Returns:

  • (String)


48
# File 'lib/anthropic/models/beta/beta_model_info.rb', line 48

required :display_name, String

#id ⇒ String

Unique model identifier.

Parameters:

  • value (String)

Returns:

  • (String)


12
# File 'lib/anthropic/models/beta/beta_model_info.rb', line 12

required :id, String

#lifecycle ⇒ Symbol, Anthropic::Models::Beta::BetaModelInfo::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.

Parameters:

  • value (Anthropic::Models::Beta::BetaModelInfo::lifecycle)

Returns:



62
# File 'lib/anthropic/models/beta/beta_model_info.rb', line 62

required :lifecycle, enum: -> { Anthropic::Beta::BetaModelInfo::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.

Parameters:

  • value (Anthropic::Models::Beta::beta_model_line, nil)

Returns:



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

required :line, enum: -> { Anthropic::Beta::BetaModelLine }, nil?: true

#max_input_tokens ⇒ Integer?

Maximum input context window size in tokens for this model.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


76
# File 'lib/anthropic/models/beta/beta_model_info.rb', line 76

required :max_input_tokens, Integer, nil?: true

#max_tokens ⇒ Integer?

Maximum value for the max_tokens parameter when using this model.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


82
# File 'lib/anthropic/models/beta/beta_model_info.rb', line 82

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.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


92
# File 'lib/anthropic/models/beta/beta_model_info.rb', line 92

required :retires_at, Time, nil?: true

#type ⇒ Symbol, :model

Object type.

For Models, this is always "model".

Parameters:

  • value (:model)

Returns:

  • (Symbol, :model)


100
# File 'lib/anthropic/models/beta/beta_model_info.rb', line 100

required :type, const: :model

Instance Method Details

#to_hash ⇒ { id: String, allowed_fallback_models: ::Array[String]?, capabilities: Anthropic::Beta::BetaModelCapabilities?, created_at: Time, deprecated_at: Time?, display_name: String, lifecycle: Anthropic::Models::Beta::BetaModelInfo::lifecycle, line: Anthropic::Models::Beta::beta_model_line?, max_input_tokens: Integer?, max_tokens: Integer?, retires_at: Time?, type: :model }

Returns:

  • ({ id: String, allowed_fallback_models: ::Array[String]?, capabilities: Anthropic::Beta::BetaModelCapabilities?, created_at: Time, deprecated_at: Time?, display_name: String, lifecycle: Anthropic::Models::Beta::BetaModelInfo::lifecycle, line: Anthropic::Models::Beta::beta_model_line?, max_input_tokens: Integer?, max_tokens: Integer?, retires_at: Time?, type: :model })


62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'sig/anthropic/models/beta/beta_model_info.rbs', line 62

def to_hash: -> {
  id: String,
  allowed_fallback_models: ::Array[String]?,
  capabilities: Anthropic::Beta::BetaModelCapabilities?,
  created_at: Time,
  deprecated_at: Time?,
  display_name: String,
  lifecycle: Anthropic::Models::Beta::BetaModelInfo::lifecycle,
  line: Anthropic::Models::Beta::beta_model_line?,
  max_input_tokens: Integer?,
  max_tokens: Integer?,
  retires_at: Time?,
  type: :model
}