Class: Smith::Models::Inference::Rule
- Inherits:
-
Data
- Object
- Data
- Smith::Models::Inference::Rule
- Defined in:
- lib/smith/models/inference.rb
Overview
A single rule maps a model_id matcher to capability values. The matcher is a Proc[String -> Boolean] — regex match OR version-aware predicate (e.g., Opus 4.7+).
Instance Attribute Summary collapse
-
#accepts_temperature ⇒ Object
readonly
Returns the value of attribute accepts_temperature.
-
#matcher ⇒ Object
readonly
Returns the value of attribute matcher.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
-
#thinking_shape ⇒ Object
readonly
Returns the value of attribute thinking_shape.
-
#tools_with_thinking_native ⇒ Object
readonly
Returns the value of attribute tools_with_thinking_native.
-
#tools_with_thinking_route ⇒ Object
readonly
Returns the value of attribute tools_with_thinking_route.
Instance Method Summary collapse
Instance Attribute Details
#accepts_temperature ⇒ Object (readonly)
Returns the value of attribute accepts_temperature
26 27 28 |
# File 'lib/smith/models/inference.rb', line 26 def accepts_temperature @accepts_temperature end |
#matcher ⇒ Object (readonly)
Returns the value of attribute matcher
26 27 28 |
# File 'lib/smith/models/inference.rb', line 26 def matcher @matcher end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider
26 27 28 |
# File 'lib/smith/models/inference.rb', line 26 def provider @provider end |
#thinking_shape ⇒ Object (readonly)
Returns the value of attribute thinking_shape
26 27 28 |
# File 'lib/smith/models/inference.rb', line 26 def thinking_shape @thinking_shape end |
#tools_with_thinking_native ⇒ Object (readonly)
Returns the value of attribute tools_with_thinking_native
26 27 28 |
# File 'lib/smith/models/inference.rb', line 26 def tools_with_thinking_native @tools_with_thinking_native end |
#tools_with_thinking_route ⇒ Object (readonly)
Returns the value of attribute tools_with_thinking_route
26 27 28 |
# File 'lib/smith/models/inference.rb', line 26 def tools_with_thinking_route @tools_with_thinking_route end |
Instance Method Details
#matches?(model_id) ⇒ Boolean
34 35 36 |
# File 'lib/smith/models/inference.rb', line 34 def matches?(model_id) matcher.call(model_id.to_s) end |
#to_profile(model_id) ⇒ Object
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/smith/models/inference.rb', line 38 def to_profile(model_id) Profile.new( model_id: model_id.to_s, provider: provider, thinking_shape: thinking_shape, accepts_temperature: accepts_temperature, tools_with_thinking_native: tools_with_thinking_native, tools_with_thinking_route: tools_with_thinking_route ) end |