Class: Raif::ModelManifest::Entry
- Inherits:
-
Struct
- Object
- Struct
- Raif::ModelManifest::Entry
- Defined in:
- lib/raif/model_manifest.rb
Instance Attribute Summary collapse
-
#adapter_class_name ⇒ Object
Returns the value of attribute adapter_class_name.
-
#api_name ⇒ Object
Returns the value of attribute api_name.
-
#capabilities ⇒ Object
Returns the value of attribute capabilities.
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#key ⇒ Object
Returns the value of attribute key.
-
#key_base ⇒ Object
Returns the value of attribute key_base.
-
#lifecycle ⇒ Object
Returns the value of attribute lifecycle.
-
#max_completion_tokens ⇒ Object
Returns the value of attribute max_completion_tokens.
-
#pricing ⇒ Object
Returns the value of attribute pricing.
-
#provider_name ⇒ Object
Returns the value of attribute provider_name.
-
#source_path ⇒ Object
Returns the value of attribute source_path.
Instance Method Summary collapse
- #active? ⇒ Boolean
- #claimed_value(capability) ⇒ Object
- #deprecated? ⇒ Boolean
- #retired? ⇒ Boolean
-
#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).
- #status ⇒ Object
Instance Attribute Details
#adapter_class_name ⇒ Object
Returns the value of attribute adapter_class_name
90 91 92 |
# File 'lib/raif/model_manifest.rb', line 90 def adapter_class_name @adapter_class_name end |
#api_name ⇒ Object
Returns the value of attribute api_name
90 91 92 |
# File 'lib/raif/model_manifest.rb', line 90 def api_name @api_name end |
#capabilities ⇒ Object
Returns the value of attribute capabilities
90 91 92 |
# File 'lib/raif/model_manifest.rb', line 90 def capabilities @capabilities end |
#display_name ⇒ Object
Returns the value of attribute display_name
90 91 92 |
# File 'lib/raif/model_manifest.rb', line 90 def display_name @display_name end |
#endpoint ⇒ Object
Returns the value of attribute endpoint
90 91 92 |
# File 'lib/raif/model_manifest.rb', line 90 def endpoint @endpoint end |
#key ⇒ Object
Returns the value of attribute key
90 91 92 |
# File 'lib/raif/model_manifest.rb', line 90 def key @key end |
#key_base ⇒ Object
Returns the value of attribute key_base
90 91 92 |
# File 'lib/raif/model_manifest.rb', line 90 def key_base @key_base end |
#lifecycle ⇒ Object
Returns the value of attribute lifecycle
90 91 92 |
# File 'lib/raif/model_manifest.rb', line 90 def lifecycle @lifecycle end |
#max_completion_tokens ⇒ Object
Returns the value of attribute max_completion_tokens
90 91 92 |
# File 'lib/raif/model_manifest.rb', line 90 def max_completion_tokens @max_completion_tokens end |
#pricing ⇒ Object
Returns the value of attribute pricing
90 91 92 |
# File 'lib/raif/model_manifest.rb', line 90 def pricing @pricing end |
#provider_name ⇒ Object
Returns the value of attribute provider_name
90 91 92 |
# File 'lib/raif/model_manifest.rb', line 90 def provider_name @provider_name end |
#source_path ⇒ Object
Returns the value of attribute source_path
90 91 92 |
# File 'lib/raif/model_manifest.rb', line 90 def source_path @source_path end |
Instance Method Details
#active? ⇒ Boolean
97 |
# File 'lib/raif/model_manifest.rb', line 97 def active? = status == :active |
#claimed_value(capability) ⇒ Object
117 118 119 120 121 122 123 124 |
# File 'lib/raif/model_manifest.rb', line 117 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] else capabilities[capability.to_sym] end end |
#deprecated? ⇒ Boolean
98 |
# File 'lib/raif/model_manifest.rb', line 98 def deprecated? = status == :deprecated |
#retired? ⇒ Boolean
99 |
# File 'lib/raif/model_manifest.rb', line 99 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.
109 110 111 112 113 114 115 |
# File 'lib/raif/model_manifest.rb', line 109 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
96 |
# File 'lib/raif/model_manifest.rb', line 96 def status = lifecycle.fetch(:status) |