LlmFactory
Category: Agent
Source: llm_factory.dart
Classes
LlmClientFactory
Creates [LlmClient] instances from a [ModelRef] via the adapter registry.
The legacy provider-enum switch is gone — every client flows through catalog → resolved provider + model → adapter.createClient.
Constructor
dart
LlmClientFactory(this._config)Methods
LlmClient createFor(ModelRef ref, {required String systemPrompt})
Build an [LlmClient] for [ref]. Resolves the provider (credentials included), looks up the adapter by wire protocol, and delegates.
Throws [ConfigError] when the provider is unknown or the adapter has not been registered.
LlmClient createFromConfig({required String systemPrompt})
Shortcut: use the config's [GlueConfig.activeModel].