ModelListDialect class abstract final

One provider's "how to list models" implementation. Each dialect encapsulates its own detection (does this endpoint belong to me?) and its own fetch (what URL, what auth, what shape the response has, how to normalise ids). Pickers never see the internals — they just call fetchModelsForEndpoint which delegates.

The ModelListDialect.fetch onBundledFallback parameter is optional for dialects without a bundled offline catalog: keep it in the override's signature and simply ignore it — only dialects that answer from a bundled catalog when the live fetch fails ever invoke it. (Adding the parameter is a breaking change for out-of-tree implementers; called out in CHANGELOG.md.)

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

fetch(String baseUrl, String apiKey, {Client? client, void onBundledFallback()?}) → Future<ModelsEndpointInfo>
Fetches the model list. Implementations must answer an empty ModelsEndpointInfo on any error — the manual-entry fallback in the pickers depends on it. A dialect that answers from a bundled catalog because the live fetch failed (the Codex catalog today) invokes onBundledFallback so pickers can surface the provenance.
matches(String baseUrl, String? provider) → bool
Whether this dialect handles baseUrl (optionally with the provider's hint from the caller).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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