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 schema 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
78 79 80 |
# File 'lib/raif/model_manifest.rb', line 78 def adapter_class_name @adapter_class_name end |
#api_name ⇒ Object
Returns the value of attribute api_name
78 79 80 |
# File 'lib/raif/model_manifest.rb', line 78 def api_name @api_name end |
#capabilities ⇒ Object
Returns the value of attribute capabilities
78 79 80 |
# File 'lib/raif/model_manifest.rb', line 78 def capabilities @capabilities end |
#display_name ⇒ Object
Returns the value of attribute display_name
78 79 80 |
# File 'lib/raif/model_manifest.rb', line 78 def display_name @display_name end |
#endpoint ⇒ Object
Returns the value of attribute endpoint
78 79 80 |
# File 'lib/raif/model_manifest.rb', line 78 def endpoint @endpoint end |
#key ⇒ Object
Returns the value of attribute key
78 79 80 |
# File 'lib/raif/model_manifest.rb', line 78 def key @key end |
#key_base ⇒ Object
Returns the value of attribute key_base
78 79 80 |
# File 'lib/raif/model_manifest.rb', line 78 def key_base @key_base end |
#lifecycle ⇒ Object
Returns the value of attribute lifecycle
78 79 80 |
# File 'lib/raif/model_manifest.rb', line 78 def lifecycle @lifecycle end |
#max_completion_tokens ⇒ Object
Returns the value of attribute max_completion_tokens
78 79 80 |
# File 'lib/raif/model_manifest.rb', line 78 def max_completion_tokens @max_completion_tokens end |
#pricing ⇒ Object
Returns the value of attribute pricing
78 79 80 |
# File 'lib/raif/model_manifest.rb', line 78 def pricing @pricing end |
#provider_name ⇒ Object
Returns the value of attribute provider_name
78 79 80 |
# File 'lib/raif/model_manifest.rb', line 78 def provider_name @provider_name end |
#source_path ⇒ Object
Returns the value of attribute source_path
78 79 80 |
# File 'lib/raif/model_manifest.rb', line 78 def source_path @source_path end |
Instance Method Details
#active? ⇒ Boolean
85 |
# File 'lib/raif/model_manifest.rb', line 85 def active? = status == :active |
#claimed_value(capability) ⇒ Object
105 106 107 108 109 110 111 112 |
# File 'lib/raif/model_manifest.rb', line 105 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
86 |
# File 'lib/raif/model_manifest.rb', line 86 def deprecated? = status == :deprecated |
#retired? ⇒ Boolean
87 |
# File 'lib/raif/model_manifest.rb', line 87 def retired? = status == :retired |
#smokable_capabilities ⇒ Object
Capabilities the smoke runner would test for this entry: "completion" always, plus every schema 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.
97 98 99 100 101 102 103 |
# File 'lib/raif/model_manifest.rb', line 97 def smokable_capabilities caps = ["completion"] caps += 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
84 |
# File 'lib/raif/model_manifest.rb', line 84 def status = lifecycle.fetch(:status) |