Interface: EscalateOnRetryStrategyBuilder<TItem>
Defined in: builders/escalate-on-retry-strategy-builder.ts:12
Fluent configurator for 'escalate-on-retry' pool strategies ($.escalateOnRetry()).
Configures empirical completion success-rate and sample-count thresholds used to escalate across ordered candidate models in a pool across retry attempts.
Extends
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TItem | unknown | Pool item AST node type. |
Methods
minSamples()
minSamples(count): EscalateOnRetryStrategyBuilder<TItem>;Defined in: builders/escalate-on-retry-strategy-builder.ts:34
Sets the minimum sample count required before evaluating minSuccessRate.
Candidates with fewer than count recorded invocations are not penalized by minSuccessRate.
Parameters
| Parameter | Type | Description |
|---|---|---|
count | number | Minimum number of recorded invocations. |
Returns
EscalateOnRetryStrategyBuilder<TItem>
New immutable strategy builder.
minSuccessRate()
minSuccessRate(rate): EscalateOnRetryStrategyBuilder<TItem>;Defined in: builders/escalate-on-retry-strategy-builder.ts:23
Sets the minimum empirical completion success rate required before escalating to the next model in the pool.
Candidates whose empirical success rate falls below rate after minSamples are skipped on retry.
Parameters
| Parameter | Type | Description |
|---|---|---|
rate | number | Minimum empirical success rate in $[0, 1]$. |
Returns
EscalateOnRetryStrategyBuilder<TItem>
New immutable strategy builder.
toAST()
toAST(): EscalateOnRetryPoolStrategyNode;Defined in: ast/ast-builder.ts:20
Compiles the current builder configuration into a deeply frozen passive AST node.
Validates required builder invariants at compilation time and returns an immutable plain-object AST representation containing zero execution methods.
Returns
EscalateOnRetryPoolStrategyNode
Deeply frozen passive AST node.