CustomProviderRegistry class final

The live list of saved custom providers (shared by the CLI, which mutates it, and the executable, which persists it).

Constructors

CustomProviderRegistry(List<CustomProviderEntry> entries)
Creates a registry over entries (a live, mutable list).

Properties

entries List<CustomProviderEntry>
All saved entries, in insertion order.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(CustomProviderEntry entry) → void
Adds (or replaces, on name clash) entry.
deriveName(String baseUrl) String
Derives a unique display name from baseUrl's host (and non-default port), avoiding catalog provider names and existing entries: localhost:11434, api.acme.com, api.acme.com-2, ...
find(String name) CustomProviderEntry?
Finds an entry by name (case-insensitive), or null.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateModel(String name, String modelId) → void
Records the last-used model for the entry named name (no-op when absent).

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

keyNameFor(String baseUrl, {String? providerName}) String
The secure-store key name backing baseUrl's key: FA_KEY_LOCALHOST_11434, FA_KEY_API_ACME_COM (the store accepts [A-Za-z0-9_]+ only). With providerName (a saved entry's name) the name is appended — FA_KEY_API_KIMI_COM_WORK — so several accounts on the same endpoint keep separate keys instead of overwriting one host-scoped entry.