ModelRolesConfig class final

Model-role configuration: role → ordered fallback chains, path-scoped overrides, and the retry policy.

Constructors

ModelRolesConfig({required Map<String, List<ModelRef>> roles, List<PathRoleOverride> pathOverrides = const [], ModelRolesRetryPolicy retry = const ModelRolesRetryPolicy()})
Creates a config; roles maps role id to its ordered chain.
ModelRolesConfig.fromYaml(YamlMap map)
Parses the roles: / modelOverrides: / retry: sections of the CLI config. Strict: any schema problem throws ConfigException (a corrupt roles section must surface, never silently reset to defaults).
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
pathOverrides List<PathRoleOverride>
Path-scoped role chains, most-specific match wins.
final
retry ModelRolesRetryPolicy
Retry/fallback knobs.
final
roles Map<String, List<ModelRef>>
Role id → ordered fallback chain (first entry is primary).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

chainFor(String role, {String? cwd, String? homeDir}) List<ModelRef>?
Resolves role's chain for the working directory cwd.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
toYaml() String
Serializes to the roles: / modelOverrides: / retry: yaml sections (round-trips with ModelRolesConfig.fromYaml).

Operators

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