Class: RosettAi::AiConfig::CostControls
- Inherits:
-
Object
- Object
- RosettAi::AiConfig::CostControls
- Defined in:
- lib/rosett_ai/ai_config/cost_controls.rb
Overview
Advisory cost tier preferences for AI tool usage.
Cost controls are purely advisory — rosett-ai is a compiler, not a runtime. These preferences guide model selection and are compiled into engine-specific configuration hints.
Constant Summary collapse
- TIERS =
['economy', 'standard', 'premium'].freeze
Instance Attribute Summary collapse
-
#monthly_budget_note ⇒ Object
readonly
Returns the value of attribute monthly_budget_note.
-
#preferred_tier ⇒ Object
readonly
Returns the value of attribute preferred_tier.
Instance Method Summary collapse
-
#initialize(preferred_tier: 'standard', monthly_budget_note: nil) ⇒ CostControls
constructor
A new instance of CostControls.
-
#to_h ⇒ Hash
Serializable representation.
Constructor Details
#initialize(preferred_tier: 'standard', monthly_budget_note: nil) ⇒ CostControls
Returns a new instance of CostControls.
20 21 22 23 24 25 |
# File 'lib/rosett_ai/ai_config/cost_controls.rb', line 20 def initialize(preferred_tier: 'standard', monthly_budget_note: nil) validate_tier!(preferred_tier) @preferred_tier = preferred_tier.freeze @monthly_budget_note = monthly_budget_note&.freeze end |
Instance Attribute Details
#monthly_budget_note ⇒ Object (readonly)
Returns the value of attribute monthly_budget_note.
16 17 18 |
# File 'lib/rosett_ai/ai_config/cost_controls.rb', line 16 def monthly_budget_note @monthly_budget_note end |
#preferred_tier ⇒ Object (readonly)
Returns the value of attribute preferred_tier.
16 17 18 |
# File 'lib/rosett_ai/ai_config/cost_controls.rb', line 16 def preferred_tier @preferred_tier end |
Instance Method Details
#to_h ⇒ Hash
Returns serializable representation.
28 29 30 31 32 |
# File 'lib/rosett_ai/ai_config/cost_controls.rb', line 28 def to_h hash = { 'preferred_tier' => @preferred_tier } hash['monthly_budget_note'] = @monthly_budget_note if @monthly_budget_note hash end |