EffectiveCliArgs class final

Provider/model restoration. Precedence: an explicit --provider flag (full manual control, preconfigs disabled) > the FA_PROVIDER_* env declaration (faProviderPreconfig) > the saved provider: (the persisted /provider switch) > the parsed default.

The saved kind restores whenever it resolves through the catalog (resolveCliProviderSpec — every catalog name AND adapter kind, chatgpt-codex included; coverage by construction, issue #760) and restores AS THE RESOLVED SPEC'S KIND: a saved catalog name (openai, chatgpt) resolves to its adapter kind here, because everything downstream (AgentCliConfig.providerKind → providerStreamFunction) speaks kinds only. A saved id NO version knows must never brick the boot: it is reported back as unknownSavedProvider and the parsed default (a known provider) takes over — the executable prints the loud named warning (bad value, file, fallback taken) and keeps booting.

The preconfig supplies model/baseUrl too, so the saved restore never leaks through while it is active (--model/--base-url flags still override individual fields). No env-key auto-pick: a bare API key in the environment never activates a provider — the model would be an implicit default, and providers carry none by design. FA_PROVIDER_* stays: it names the model explicitly. The environment is injected (env is required): the CLI passes Platform.environment, tests pass exactly the map they mean — resolution never reads ambient process state.

The boot result carrier (resolveEffectiveCliArgs's return type). A class, not a record — 6 fields exceeded the record_size cap (issue #1997); the field docs live on the resolver below.

Constructors

EffectiveCliArgs({required CliArgs args, required String provider, required EnvProviderPreconfig? faPreconfig, required String? unknownSavedProvider, required String? incompatibleSavedEndpoint, required List<String> bindingWarnings})
const

Properties

args → CliArgs
final
bindingWarnings → List<String>
final
faPreconfig → EnvProviderPreconfig?
final
hashCode → int
The hash code for this object.
no setterinherited
incompatibleSavedEndpoint → String?
final
provider → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unknownSavedProvider → String?
final

Methods

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