Skip to content

ModelCatalog

Category: Core

Source: model_catalog.dart

Runtime types for the Glue model/provider catalog.

Status: part of the proposed core data model — see docs/plans/2026-04-29-harness-layers.md. Originally lived in catalog/model_catalog.dart; relocated so strategies and credentials can depend on these types without crossing the harness boundary.

The catalog parser and the bundled models_generated.dart snapshot stay in catalog/ because they pull in YAML/IO dependencies — only the pure data types move here.

Enums

AuthKind

How a provider obtains its credential.

  • [apiKey] — a single string the user pastes in (or reads from an env var).
  • [oauth] — an interactive OAuth flow (device code, PKCE). The adapter drives the flow via [ProviderAdapter.beginInteractiveAuth] and decides what fields to store.
  • [none] — no credential needed (Ollama, local-vllm).
ValueDescription
apiKey
oauth
none

Classes

Capability

The canonical capability names used by the catalog.

Individual model entries list a subset in their capabilities field. The model picker filters on these via selection.default_filter.capabilities.

Properties

PropertyTypeDescription
chatconst
streamingconst
toolsconst
parallelToolsconst
visionconst
filesconst
jsonconst
reasoningconst
codingconst
localconst
browserconst
binaryToolResultsconst
allconst

ModelCatalog

Top-level catalog object.

Constructor

dart
const ModelCatalog({
    required this.version,
    required this.updatedAt,
    required this.defaults,
    required this.capabilities,
    required this.providers,
  })

Properties

PropertyTypeDescription
versionint
updatedAtString
defaultsDefaultsConfig
capabilitiesMap<String, String>Capability id → human description.
providersMap<String, ProviderDef>Provider id → provider definition.

DefaultsConfig

Constructor

dart
const DefaultsConfig({required this.model, this.smallModel, this.localModel})

Properties

PropertyTypeDescription
modelString
smallModelString?
localModelString?

AuthSpec

Constructor

dart
const AuthSpec({required this.kind, this.envVar, this.helpUrl})

Properties

PropertyTypeDescription
kindAuthKind
envVarString?Name of the environment variable that backs this provider's API key when [kind] is [AuthKind.apiKey]. When set, env wins over stored.
helpUrlString?"Where do I get a key?" link shown in the /provider add form.
idString
nameString
adapterStringWire protocol: anthropic
compatibilityString?Quirks profile: openai
enabledbool
baseUrlString?
docsUrlString?
authAuthSpec
requestHeadersMap<String, String>
modelsMap<String, ModelDef>Model id → model definition.
idStringCatalog key — stable, user-facing (CLI, config, session files, URLs).
nameStringHuman display label.
apiIdStringThe exact string sent to the provider's API. Defaults to [id] when the catalog entry doesn't override it. Let upstream slugs like openai/gpt-oss-120b live here instead of leaking into user-facing ids.
recommendedbool
isDefaultbool
enabledboolWhen false, the model picker hides this entry but the catalog still records it. Useful for surfaces that aren't yet wired up at runtime (e.g. agents that need a background-execution runner).
capabilitiesSet<String>
contextWindowint?
maxOutputTokensint?
speedString?
costString?
notesString?

Methods

`const ProviderDef({
required this.id,
required this.name,
required this.adapter,
required this.auth,
required this.models,
this.compatibility,
this.enabled = true,
this.baseUrl,
this.docsUrl,
this.requestHeaders = const {},

})`

`const ModelDef({
required this.id,
required this.name,
String? apiId,
this.recommended = false,
this.isDefault = false,
this.enabled = true,
this.capabilities = const {},
this.contextWindow,
this.maxOutputTokens,
this.speed,
this.cost,
this.notes,

})`

ProviderDef

Constructor

dart
const ProviderDef({
    required this.id,
    required this.name,
    required this.adapter,
    required this.auth,
    required this.models,
    this.compatibility,
    this.enabled = true,
    this.baseUrl,
    this.docsUrl,
    this.requestHeaders = const {},
  })

Properties

PropertyTypeDescription
idString
nameString
adapterStringWire protocol: anthropic
compatibilityString?Quirks profile: openai
enabledbool
baseUrlString?
docsUrlString?
authAuthSpec
requestHeadersMap<String, String>
modelsMap<String, ModelDef>Model id → model definition.

ModelDef

Constructor

dart
const ModelDef({
    required this.id,
    required this.name,
    String? apiId,
    this.recommended = false,
    this.isDefault = false,
    this.enabled = true,
    this.capabilities = const {},
    this.contextWindow,
    this.maxOutputTokens,
    this.speed,
    this.cost,
    this.notes,
  })

Properties

PropertyTypeDescription
idStringCatalog key — stable, user-facing (CLI, config, session files, URLs).
nameStringHuman display label.
apiIdStringThe exact string sent to the provider's API. Defaults to [id] when the catalog entry doesn't override it. Let upstream slugs like openai/gpt-oss-120b live here instead of leaking into user-facing ids.
recommendedbool
isDefaultbool
enabledboolWhen false, the model picker hides this entry but the catalog still records it. Useful for surfaces that aren't yet wired up at runtime (e.g. agents that need a background-execution runner).
capabilitiesSet<String>
contextWindowint?
maxOutputTokensint?
speedString?
costString?
notesString?

Released under the MIT License.