Skip to content

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 ParameterDefault typeDescription
TItemunknownPool item AST node type.

Methods ​

minSamples() ​

ts
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 ​

ParameterTypeDescription
countnumberMinimum number of recorded invocations.

Returns ​

EscalateOnRetryStrategyBuilder<TItem>

New immutable strategy builder.


minSuccessRate() ​

ts
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 ​

ParameterTypeDescription
ratenumberMinimum empirical success rate in $[0, 1]$.

Returns ​

EscalateOnRetryStrategyBuilder<TItem>

New immutable strategy builder.


toAST() ​

ts
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.

Inherited from ​

AstBuilder.toAST

Released under the MIT License.