Class: Raif::ModelManifest::Entry

Inherits:
Struct
  • Object
show all
Defined in:
lib/raif/model_manifest.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#adapter_class_name ⇒ Object

Returns the value of attribute adapter_class_name

Returns:

  • (Object) —

    the current value of adapter_class_name



101
102
103
# File 'lib/raif/model_manifest.rb', line 101

def adapter_class_name
  @adapter_class_name
end

#api_name ⇒ Object

Returns the value of attribute api_name

Returns:

  • (Object) —

    the current value of api_name



101
102
103
# File 'lib/raif/model_manifest.rb', line 101

def api_name
  @api_name
end

#batch_max_completion_tokens ⇒ Object

Returns the value of attribute batch_max_completion_tokens

Returns:

  • (Object) —

    the current value of batch_max_completion_tokens



101
102
103
# File 'lib/raif/model_manifest.rb', line 101

def batch_max_completion_tokens
  @batch_max_completion_tokens
end

#capabilities ⇒ Object

Returns the value of attribute capabilities

Returns:

  • (Object) —

    the current value of capabilities



101
102
103
# File 'lib/raif/model_manifest.rb', line 101

def capabilities
  @capabilities
end

#display_name ⇒ Object

Returns the value of attribute display_name

Returns:

  • (Object) —

    the current value of display_name



101
102
103
# File 'lib/raif/model_manifest.rb', line 101

def display_name
  @display_name
end

#endpoint ⇒ Object

Returns the value of attribute endpoint

Returns:

  • (Object) —

    the current value of endpoint



101
102
103
# File 'lib/raif/model_manifest.rb', line 101

def endpoint
  @endpoint
end

#key ⇒ Object

Returns the value of attribute key

Returns:

  • (Object) —

    the current value of key



101
102
103
# File 'lib/raif/model_manifest.rb', line 101

def key
  @key
end

#key_base ⇒ Object

Returns the value of attribute key_base

Returns:

  • (Object) —

    the current value of key_base



101
102
103
# File 'lib/raif/model_manifest.rb', line 101

def key_base
  @key_base
end

#lifecycle ⇒ Object

Returns the value of attribute lifecycle

Returns:

  • (Object) —

    the current value of lifecycle



101
102
103
# File 'lib/raif/model_manifest.rb', line 101

def lifecycle
  @lifecycle
end

#max_completion_tokens ⇒ Object

Returns the value of attribute max_completion_tokens

Returns:

  • (Object) —

    the current value of max_completion_tokens



101
102
103
# File 'lib/raif/model_manifest.rb', line 101

def max_completion_tokens
  @max_completion_tokens
end

#non_streaming_max_completion_tokens ⇒ Object

Returns the value of attribute non_streaming_max_completion_tokens

Returns:

  • (Object) —

    the current value of non_streaming_max_completion_tokens



101
102
103
# File 'lib/raif/model_manifest.rb', line 101

def non_streaming_max_completion_tokens
  @non_streaming_max_completion_tokens
end

#pricing ⇒ Object

Returns the value of attribute pricing

Returns:

  • (Object) —

    the current value of pricing



101
102
103
# File 'lib/raif/model_manifest.rb', line 101

def pricing
  @pricing
end

#provider_name ⇒ Object

Returns the value of attribute provider_name

Returns:

  • (Object) —

    the current value of provider_name



101
102
103
# File 'lib/raif/model_manifest.rb', line 101

def provider_name
  @provider_name
end

#source_path ⇒ Object

Returns the value of attribute source_path

Returns:

  • (Object) —

    the current value of source_path



101
102
103
# File 'lib/raif/model_manifest.rb', line 101

def source_path
  @source_path
end

Instance Method Details

#active? ⇒ Boolean

Returns:

  • (Boolean)


109
# File 'lib/raif/model_manifest.rb', line 109

def active? = status == :active

#claimed_value(capability) ⇒ Object



129
130
131
132
133
134
135
136
137
# File 'lib/raif/model_manifest.rb', line 129

def claimed_value(capability)
  case capability.to_s
  when "completion" then true
  when "streaming_tool_calls" then capabilities[:streaming] && capabilities[:native_tool_use]
  when "provider_managed_tools" then capabilities[:provider_managed_tools]
  when "reasoning_effort" then Array(capabilities[:reasoning_effort_levels]).any?
  else capabilities[capability.to_sym]
  end
end

#deprecated? ⇒ Boolean

Returns:

  • (Boolean)


110
# File 'lib/raif/model_manifest.rb', line 110

def deprecated? = status == :deprecated

#retired? ⇒ Boolean

Returns:

  • (Boolean)


111
# File 'lib/raif/model_manifest.rb', line 111

def retired? = status == :retired

#smokable_capabilities ⇒ Object

Capabilities the smoke runner would test for this entry: "completion" always, plus every smoke capability, plus the derived streaming_tool_calls whenever native tool use is claimed (even if streaming itself is claimed false, so --only streaming_tool_calls still works as a diagnostic on a streaming-disabled model).

Names are strings here and in claimed_value because that is what the smoke CLI passes around; the capabilities they read are symbol-keyed.



121
122
123
124
125
126
127
# File 'lib/raif/model_manifest.rb', line 121

def smokable_capabilities
  caps = ["completion"]
  caps += SMOKE_CAPABILITY_KEYS.reject { |c| c == :provider_managed_tools }.map(&:to_s)
  caps << "provider_managed_tools" if capabilities[:provider_managed_tools]&.any?
  caps << "streaming_tool_calls" if capabilities[:native_tool_use]
  caps
end

#status ⇒ Object



108
# File 'lib/raif/model_manifest.rb', line 108

def status = lifecycle.fetch(:status)