ModelCapabilityOverrides class final

The models.overrides: map: <provider> → <modelId> → override. Keys are free-form (unknown providers/models are legal — they address catalog futures, E4); the lookup normalizes the provider name and matches the model id verbatim.

Constructors

ModelCapabilityOverrides({Map<String, Map<String, ModelCapabilityOverride>>? entries})
Creates an empty (or pre-populated) overrides map.
ModelCapabilityOverrides.fromYaml(Object? node)
Parses the overrides: node, strictly: providers and model ids are non-empty strings, entries are ModelCapabilityOverride maps.
factory

Properties

entries → Iterable<({ModelCapabilityOverride caps, String modelId, String provider})>
Every pinned (provider, modelId, override) triple — the settings surfaces enumerate these.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isEmpty → bool
True when no override is pinned anywhere.
no setter
length → int
How many model overrides are pinned in total.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

lookup(String provider, String modelId) → ModelCapabilityOverride?
The pinned override for provider/modelId, or null. The provider key is case-insensitive (catalog names are lowercase); the model id matches verbatim.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(String provider, String modelId) → bool
Removes the override for provider/modelId; true when one existed.
set(String provider, String modelId, ModelCapabilityOverride override) → void
Registers (or replaces) the override for provider/modelId.
toString() → String
A string representation of this object.
inherited
toYaml() → String
Serializes the overrides: section body: per-provider blocks nested under models.overrides (providers at +4, model ids at +6, fields at +8 — the depths ModelsConfig.toYaml nests the section at).

Operators

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