Module: Legion::Extensions::Llm::AutoRegistration
- Defined in:
- lib/legion/extensions/llm/auto_registration.rb
Overview
Mixin that lex-llm-* provider modules ‘extend` to expose shared discovery metadata. Registration into Legion::LLM is owned by legion-llm so loaded providers can be rediscovered after reloads.
Prerequisites on the extending module:
- `PROVIDER_FAMILY` constant (Symbol, e.g. :ollama)
- `provider_class` singleton method returning the Provider subclass
Instance Method Summary collapse
-
#discover_instances ⇒ Object
Override in each provider.
-
#provider_aliases ⇒ Object
Optional provider-family aliases that legion-llm should register against the same discovered provider instances.
Instance Method Details
#discover_instances ⇒ Object
Override in each provider. Returns { instance_id => config_hash }.
15 16 17 |
# File 'lib/legion/extensions/llm/auto_registration.rb', line 15 def discover_instances {} end |
#provider_aliases ⇒ Object
Optional provider-family aliases that legion-llm should register against the same discovered provider instances.
21 22 23 |
# File 'lib/legion/extensions/llm/auto_registration.rb', line 21 def provider_aliases [] end |