ProviderSpec class final

Static description of a supported provider.

Constructors

ProviderSpec({required String name, required String kind, required String api, required String defaultBaseUrl, required List<String> apiKeyEnvNames, required int contextWindow, required int maxTokens, bool reasoning = true, List<String> input = const ['text', 'image'], bool visible = true, bool endpointLocked = false})
Creates a provider spec.
const

Properties

api → String
The API dialect recorded on built models (e.g. anthropic-messages).
final
apiKeyEnvNames → List<String>
API-key base names, in preference order. The first present in the secrets store wins; rotation stacks _2, _3, ... suffixes on the chosen base name.
final
contextWindow → int
Default total context window in tokens.
final
defaultBaseUrl → String
Default API base URL.
final
endpointLocked → bool
The wire serves ONLY this spec's own defaultBaseUrl: the credentials are account-scoped (OAuth) and the endpoint dialect is not spoken by other hosts (chatgpt-codex — the Codex Responses wire on chatgpt.com). A persisted provider/baseUrl PAIR pointing an endpoint-locked kind elsewhere is not servable; the boot restore degrades the pair (loud warning + fallback) instead of refusing to boot or mis-resolving keys (gh-760 review).
final
hashCode → int
The hash code for this object.
no setterinherited
input → List<String>
Default input modalities.
final
kind → String
Adapter kind consumed by providerStreamFunction: openai-completions, anthropic, google, dial, or chatgpt-codex.
final
maxTokens → int
Default maximum output tokens.
final
name → String
Canonical provider name (e.g. openrouter, anthropic).
final
reasoning → bool
Whether models on this provider default to reasoning output.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
visible → bool
Whether this provider shows in the CLI/app provider pickers.
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