Exception: Legion::Extensions::Llm::ModelNotAllowedError
- Inherits:
-
StandardError
- Object
- StandardError
- Legion::Extensions::Llm::ModelNotAllowedError
- Defined in:
- lib/legion/extensions/llm/error.rb
Overview
Raised when a request targets a model excluded by the configured model_whitelist / model_blacklist. This is a compliance guard enforced at the provider dispatch boundary (the last line before the model API call), so a denied model can never be reached regardless of caller. Non-retryable: retrying the same denied model must never succeed.
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
Instance Method Summary collapse
-
#initialize(message = nil, model: nil, provider: nil) ⇒ ModelNotAllowedError
constructor
A new instance of ModelNotAllowedError.
Constructor Details
#initialize(message = nil, model: nil, provider: nil) ⇒ ModelNotAllowedError
Returns a new instance of ModelNotAllowedError.
38 39 40 41 42 |
# File 'lib/legion/extensions/llm/error.rb', line 38 def initialize( = nil, model: nil, provider: nil) @model = model @provider = provider super( || "model #{model.inspect} is not permitted by the configured model policy for provider #{provider.inspect}") end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
36 37 38 |
# File 'lib/legion/extensions/llm/error.rb', line 36 def model @model end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
36 37 38 |
# File 'lib/legion/extensions/llm/error.rb', line 36 def provider @provider end |