CostOptimizedStrategy class
Selects providers by estimated cost-per-token (cheapest first).
Uses AIConfig.extraParams['cost_per_1m_input_tokens'] if available.
Falls back to a built-in model→price map for known models.
- Implemented types
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
-
selectProviders(
List< AIProvider> available, Map<String, List< latencyHistory) → List<Duration> >AIProvider> -
Orders the available providers based on this strategy's logic.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited