Skip to content

Interface: ForkModelRoutingOtherwiseBuilder<TParentIn, TReq> ​

Defined in: builders/fork-model-routing-otherwise-builder.ts:14

Terminal sub-builder interface for downward fork model routing after .inheritParentWithEffort(...).

Requires .otherwisePool(modelOrPool) before compiling into a ForkModelRoutingConfig.

Type Parameters ​

Type ParameterDefault typeDescription
TParentInunknownParent actor input payload type.
TRequnknownFork tool call request payload type.

Methods ​

otherwisePool() ​

ts
otherwisePool(modelOrPool): ForkModelRoutingOtherwiseBuilder<TParentIn, TReq>;

Defined in: builders/fork-model-routing-otherwise-builder.ts:24

Binds the fallback model or model pool used when inheritParentWithEffort is not matched.

Completes the conditional model routing rule for the forked child session.

Parameters ​

ParameterTypeDescription
modelOrPool| MaybeBuilder<ModelASTNode> | MaybeBuilder<PoolNode<ModelASTNode>>Fallback model or pool AST node.

Returns ​

ForkModelRoutingOtherwiseBuilder<TParentIn, TReq>

New immutable model routing builder.


toAST() ​

ts
toAST(): ForkModelRoutingConfig<TParentIn, TReq>;

Defined in: builders/fork-model-routing-otherwise-builder.ts:35

Compiles the model routing configuration into a frozen ForkModelRoutingConfig.

Validates that both .inheritParentWithEffort(...) and .otherwisePool(...) have been configured.

Returns ​

ForkModelRoutingConfig<TParentIn, TReq>

Deeply frozen fork model routing configuration.

Released under the MIT License.