Skip to content

Resolved

Category: Providers

Source: resolved.dart

Glue-native value types that bundle a [ProviderDef] / [ModelDef] with runtime-resolved data (credential, compatibility profile).

Adapters consume these and never read the environment or credential store directly, so the credential boundary stays single-hop.

Classes

ResolvedProvider

Constructor

dart
const ResolvedProvider({
    required this.def,
    this.apiKey,
    this.credentials = const {},
  })

Properties

PropertyTypeDescription
defProviderDef
apiKeyString?The resolved api-key value (env > stored) for [AuthKind.apiKey] providers. Null for oauth/none kinds.
credentialsMap<String, String>All stored credential fields for this provider. Used by OAuth adapters (github_token, copilot_token, copilot_token_expires_at) and by multi-field API-key providers in the future. For plain api-key providers this is {api_key: <value>} when stored, empty otherwise.
idString get
adapterString get
baseUrlString? get
requestHeadersMap<String, String> get
compatibilityString getWhen the catalog omits compatibility, default to the adapter id. This keeps vanilla OpenAI the default; provider quirks opt in by name.
idString get
adapterString get
baseUrlString? get
compatibilityString getWhen the catalog omits compatibility, default to the adapter id. This keeps vanilla OpenAI the default; provider quirks opt in by name.

ResolvedModel

Constructor

dart
const ResolvedModel({required this.def, required this.provider})

Properties

PropertyTypeDescription
defModelDef
providerProviderDef
idString get
nameString get
apiIdString get
idString get
nameString get
apiIdString get

Released under the MIT License.