ModelWindowKey class final

The identity a context window is registered under: the same (provider, modelId, baseUrl) triple every provider request carries.

Constructors

ModelWindowKey({required String provider, required String modelId, String? baseUrl})
Creates a key from explicit identity parts.
const
ModelWindowKey.of(Model model)
Builds the key for model — provider case-folded, base URL trailing-slash-normalized (saved entries and pinned chains disagree on the trailing slash routinely; they are the same endpoint).
factory

Properties

baseUrl → String?
The endpoint base URL, trailing-slash-normalized; null for blank.
final
hashCode → int
The hash code for this object.
no setteroverride
modelId → String
The model id (claude-sonnet-5-5, anthropic/… on OpenRouter).
final
provider → String
The provider id (openrouter, copilot, …), case-folded.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override